/* Tasko legal & support pages — matches landing.css. Follows the system theme; the nav toggle overrides it (data-theme on <html>). */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap");

:root {
  --bg: #FAFAFB;
  --surface: #FFFFFF;
  --surface-2: #F2F2F5;
  --text: #0B0B10;
  --body: #2E2E36;
  --muted: #5E5E68;
  --hair: rgba(11, 11, 16, 0.10);
  --hair-strong: rgba(11, 11, 16, 0.18);
  --accent: #5A36E3;
  --accent-press: #4A28C9;
  --accent-text: #4A28C9;
  --accent-soft: #F1EDFF;
  --max: 1200px;
  --gutter: 20px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light dark;
}
/* Dark theme: explicit choice (data-theme="dark", from localStorage "tasko.theme"), or the system setting when no choice is saved. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  --bg: #0B0B10;
  --surface: #131319;
  --surface-2: #17171F;
  --text: #F4F4F7;
  --body: #D4D4DB;
  --muted: #A0A0AB;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.16);
  --accent-text: #A993FF;
  --accent-soft: rgba(108, 71, 255, 0.18);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0B10;
    --surface: #131319;
    --surface-2: #17171F;
    --text: #F4F4F7;
    --body: #D4D4DB;
    --muted: #A0A0AB;
    --hair: rgba(255, 255, 255, 0.08);
    --hair-strong: rgba(255, 255, 255, 0.16);
    --accent-text: #A993FF;
    --accent-soft: rgba(108, 71, 255, 0.18);
  }
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1280px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--hair);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav .links { display: none; gap: 4px; margin-left: auto; }
.nav .links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav .links a:hover { color: var(--text); text-decoration: none; }
.nav .btn { margin-left: auto; }
@media (min-width: 720px) {
  .nav .links { display: flex; }
  .nav .btn { margin-left: 8px; }
}

/* Theme toggle (nav) — wired up in config.js */
.theme-toggle {
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  margin-left: auto; border: 1px solid var(--hair-strong); border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 50%; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.nav .theme-toggle + .btn { margin-left: -10px; }
@media (min-width: 720px) { .nav .theme-toggle { margin-left: 0; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 15px/1 var(--font); letter-spacing: -0.01em; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-press); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair-strong); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 14px; }

/* Document */
.doc { max-width: 720px; margin: 0 auto; padding: 48px var(--gutter) 88px; }
.doc h1 { font-size: clamp(36px, 7vw, 56px); line-height: 1.02; font-weight: 600; letter-spacing: -0.045em; margin: 0 0 12px; text-wrap: balance; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 36px; padding-bottom: 28px; border-bottom: 1px solid var(--hair); }
.doc h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--body); font-size: 16px; line-height: 1.7; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--accent-text); }
.doc b, .doc strong { color: var(--text); font-weight: 600; }
.doc .box {
  background: var(--accent-soft); color: var(--body); border-radius: 20px;
  padding: 20px 22px; margin: 20px 0; line-height: 1.65;
}
.doc details { border-top: 1px solid var(--hair); }
.doc details:last-of-type { border-bottom: 1px solid var(--hair); }
.doc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 12px 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 17px; letter-spacing: -0.015em;
}
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after {
  content: ""; flex: none; width: 12px; height: 12px; color: var(--muted);
  background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  transition: transform .2s ease;
}
.doc details[open] summary::after { transform: rotate(45deg); }
.doc details p { margin: 0 0 18px; padding-right: 28px; color: var(--muted); }
@media (min-width: 768px) { .doc { padding-top: 80px; } }

/* Forms (support contact) */
.form { display: flex; flex-direction: column; gap: 12px; }
.form input, .form select, .form textarea {
  height: 52px; border-radius: 16px; border: 1px solid var(--hair-strong);
  background: var(--surface); color: var(--text); padding: 0 16px; font: 16px var(--font);
}
.form textarea { height: 160px; padding: 14px 16px; resize: vertical; }

/* Footer */
footer { border-top: 1px solid var(--hair); padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center; }
footer .links { display: flex; flex-wrap: wrap; gap: 0 4px; }
footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--muted); }
footer a:hover { color: var(--text); }
@media (min-width: 720px) { footer .links { margin-left: auto; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
