/* ourmatrix.net — family mail portal */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5f6b7a;
  --border: #dde3ea;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-text: #ffffff;
  --notice-bg: #fff8e6;
  --notice-border: #f0d48a;
  --radius: 10px;
  --max-width: 760px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #1a2028;
    --text: #e6eaef;
    --muted: #9aa5b1;
    --border: #2c3540;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --notice-bg: #2a2416;
    --notice-border: #6b5a2a;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  margin: 0;
  padding: 1rem 0;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.brand-tld {
  color: var(--accent);
}

/* Hero */
.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.2;
}

.lead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.hint {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Button */
.button {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--accent-hover);
}

.button:focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: 3px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.card p {
  margin: 0 0 1rem;
}

.notice {
  background: var(--notice-bg);
  border-color: var(--notice-border);
}

.notice ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* Settings table */
.settings {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.settings th,
.settings td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.settings thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings tbody th {
  font-weight: 600;
  white-space: nowrap;
}

.settings tbody tr:last-child th,
.settings tbody tr:last-child td {
  border-bottom: none;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  word-break: break-all;
}

/* Device setup */
details {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}

details:first-of-type {
  border-top: none;
  padding-top: 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

details ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

details li + li {
  margin-top: 0.35rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  padding: 1.25rem 0;
}

/* Small screens */
@media (max-width: 520px) {
  .hero {
    padding: 2.5rem 0 2rem;
  }

  .button {
    display: block;
  }

  .card {
    padding: 1.1rem;
  }

  .settings th,
  .settings td {
    padding: 0.5rem 0.4rem;
  }
}
