/* Deaf — shared design tokens + primitives.
   Linked first on every page (app shell and the public landing) so app.css and
   landing.css only carry layout. Theme-aware: light + dark via prefers-color-scheme. */
:root {
  /* Native controls — the select dropdown list, the time picker's spinner and
     its clock icon — are painted by the browser, not by us. Without this they
     render in the OS's light palette on top of a dark page: the exact "small
     and white" look these tokens otherwise avoid. */
  color-scheme: dark light;
  --bg: #0b0f14;
  --surface: #141b24;
  --surface-2: #1c2733;
  --border: #2c3a49;
  --text: #eef3f8;
  --muted: #9fb0c0;
  --accent: #4ea1ff;
  --accent-2: #35d07f;
  --accent-ink: #04122a;
  --ok: #35d07f;
  --warn: #ffb020;
  --danger: #ff5c6c;
  --focus: #ffd34e;
  --radius: 14px;
  --maxw: 1080px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f6fa;
    --surface: #ffffff;
    --surface-2: #eef2f7;
    --border: #d0dae5;
    --text: #0d1620;
    --muted: #4a5b6b;
    --accent-ink: #ffffff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The `hidden` attribute must always win, even over a class that sets its own
   `display` (e.g. `.wizard-step { display: grid }`) — without `!important` the
   browser's default [hidden]{display:none} loses to any author rule with equal
   specificity, so a "hidden" wizard step still renders. */
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.sr-only, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; z-index: 100;
}

/* --- SVG icon system ---------------------------------------------------------
   {% icon "bell" %} renders <svg class="icon"><use href=".../icons.svg#bell"/></svg>.
   Glyphs use currentColor so they inherit text colour and theme automatically. */
.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.18em;
}
.icon-fill { fill: currentColor; stroke: none; }
.icon-lg { width: 2em; height: 2em; }
.icon-xl { width: 3rem; height: 3rem; }
.icon-accent { color: var(--accent); }
.icon-ok { color: var(--ok); }
.icon-danger { color: var(--danger); }
.icon-muted { color: var(--muted); }

/* Icon + short caption, with the long copy tucked into <details>. Used across
   the landing and the app so "less text, more pictures" is one pattern. */
.explain { display: grid; gap: 8px; }
.explain > .icon, .explain > .icon-lg, .explain > .icon-xl { color: var(--accent); }
.explain h3 { margin: 0; font-size: 1.05rem; }
.explain .cap { margin: 0; color: var(--muted); }
.explain details { margin: 0; }
.explain details > summary {
  cursor: pointer; color: var(--accent); font-size: .92rem; font-weight: 600;
  list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
}
.explain details > summary::-webkit-details-marker { display: none; }
.explain details > summary::after { content: "Más"; }
.explain details[open] > summary::after { content: "Menos"; }
.explain details > p { margin: 6px 0 0; color: var(--muted); font-size: .96rem; }

/* --- Brand: avisame.cc (templates/deaf/_logo.html, tools/brand_assets.py) --- */
.brand-icon { width: 1.9em; height: 1.9em; flex: none; display: block; }
.brand-word { font-weight: 800; letter-spacing: -.01em; }
.brand-tld { color: var(--accent); }
