/* Contingency — calm, precise, quietly confident. No dashboards-for-the-
   sake-of-dashboards, no dead-man's-switch cliches. */

:root {
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-raised: #171b24;
  --border: #262b36;
  --text: #e7e9ee;
  --text-muted: #9aa2b1;
  --accent: #5b8def;
  --accent-strong: #7ba3f2;
  --danger: #e5675f;
  --safe: #4fb286;
  --radius: 10px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --border: #e2e5ea;
    --text: #171a21;
    --text-muted: #5b6270;
    --accent: #3462d6;
    --accent-strong: #24509e;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

a { color: var(--accent-strong); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--text); }

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.lede { color: var(--text-muted); font-size: 1.05rem; }

.hero-actions { display: flex; gap: 0.75rem; margin-top: 1.75rem; flex-wrap: wrap; }

.button-link, button.primary, button.secondary {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.98rem;
}

.primary, button.primary {
  background: var(--accent);
  color: #fff;
}
.primary:hover, button.primary:hover { background: var(--accent-strong); }

.secondary, button.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.auth-card, .dashboard-empty, .security-centre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
}

.stack { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1.5rem; }
.stack label { font-size: 0.88rem; color: var(--text-muted); margin-top: 0.75rem; }
.stack input {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: var(--text);
  font-size: 1rem;
}
.stack input:focus, .stack input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.stack button { margin-top: 1.25rem; }

.hint { color: var(--text-muted); font-size: 0.85rem; margin: 0.25rem 0 0; }
.foot-link { margin-top: 1.5rem; font-size: 0.92rem; color: var(--text-muted); }

.flash {
  background: rgba(79, 178, 134, 0.12);
  border: 1px solid var(--safe);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.flash-error {
  background: rgba(229, 103, 95, 0.12);
  border-color: var(--danger);
}

.link-button {
  background: none;
  border: none;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
}

.inline-form { display: inline; }

.sessions-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.sessions-table th, .sessions-table td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.sessions-table th { color: var(--text-muted); font-weight: 500; }
.current-session { background: rgba(91, 141, 239, 0.06); }
.tag {
  font-size: 0.75rem;
  color: var(--safe);
  border: 1px solid var(--safe);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem 1rem 3rem;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
