/* ONZU /how — the app's calmer sibling. Standalone on purpose:
   shares brand tokens with styles.css but never its app-specific rules. */
:root {
  --bg-0: var(--brand-navy);
  --accent: var(--brand-aqua);
  --accent-2: color-mix(in srgb, var(--brand-aqua) 82%, white);
  --gold: var(--brand-gold);
  --spell: var(--brand-amethyst);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.12);
  --text: var(--brand-cloud);
  --text-dim: var(--brand-mist);
  --good: var(--brand-success);
  --bad: var(--brand-error);
  /* Keep the standalone guide on the same role-based corner language as the app. */
  --r-lg: 30px;
  --r-md: 20px;
  --r-sm: 14px;
  --r-xs: 6px;
  --r-pill: 999px;
  --font-display: "Fredoka", "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg-0); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(84, 230, 225, 0.08), transparent),
    radial-gradient(900px 500px at 10% 110%, rgba(169, 122, 245, 0.07), transparent);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px 80px; }
header.site {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 22px 20px; max-width: 780px; margin: 0 auto;
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--text); }
.logo img { display: block; width: 120px; height: auto; }
.logo:hover { text-decoration: none; }
nav.crumbs { margin-left: auto; }
nav.crumbs a { position: relative; display: inline-block; padding: 4px 0 6px; color: var(--text-dim); text-decoration: none;
  font: 800 .9rem var(--font-display); letter-spacing: .01em; }
nav.crumbs a::before { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px; background: currentColor; }
nav.crumbs a:hover { color: var(--text); text-decoration: none; }
nav.pages {
  display: flex; gap: 8px; flex-wrap: wrap; max-width: 780px;
  margin: 0 auto 30px; padding: 0 20px;
}
nav.pages a {
  padding: 7px 13px; border-radius: var(--r-pill); background: var(--surface);
  border: 1px solid var(--border); color: var(--text-dim); font-size: .82rem; font-weight: 700;
}
nav.pages a:hover { color: var(--text); text-decoration: none; border-color: var(--accent); }
nav.pages a.on { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--brand-aqua) 10%, transparent); }

h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 5.5vw, 2.6rem); line-height: 1.15; margin: 10px 0 6px; }
mark.legal-pending { background: color-mix(in srgb, var(--brand-gold) 28%, transparent); color: inherit; border-radius: var(--r-xs); padding: 0 .25em; }
.kicker { color: var(--accent); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.lede { color: var(--text-dim); font-size: 1.12rem; margin: 8px 0 30px; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; margin: 42px 0 10px; }
h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; margin: 26px 0 6px; }
p, li { color: color-mix(in srgb, var(--brand-cloud) 88%, var(--brand-mist)); }
strong { color: var(--text); }
.dim { color: var(--text-dim); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 18px 22px; margin: 18px 0;
}
.card.callout { border-color: color-mix(in srgb, var(--brand-aqua) 40%, transparent); }
/* Callout semantics: aqua = the mechanism (how it works), amethyst = the lines we hold (promises, guardrails).
   Gold is reserved for earned outcomes and never appears as a border. */
.card.warn, .card.lines { border-color: color-mix(in srgb, var(--brand-amethyst) 45%, transparent); }
.card h3 { margin-top: 4px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.tile {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px 20px; color: var(--text);
}
.tile:hover { text-decoration: none; border-color: var(--accent); background: var(--surface-2); }
.tile .ti { display: block; margin-bottom: 8px; }
.tile .ti svg { width: 30px; height: 30px; display: block; color: var(--spell); }
.tile b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; margin: 6px 0 3px; }
.tile span { color: var(--text-dim); font-size: .9rem; }

table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 16px 0; font-size: .92rem; }
/* Tables never force horizontal scrolling on a phone. Fixed layout gives each column a share of the
   available width so words wrap at spaces; only a genuinely too-long token (a slash list) breaks inside. */
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: break-word; }
th:first-child, td:first-child { width: 27%; }
th:nth-child(3):last-child, td:nth-child(3):last-child { width: 22%; }
@media (max-width: 480px) {
  th, td { padding: 10px 8px; }
  th { font-size: .7rem; letter-spacing: .03em; }
  th:first-child, td:first-child { width: 34%; }                     /* two-column tables: room for "Handwriting" */
  table:has(th:nth-child(3)) th:first-child, table:has(th:nth-child(3)) td:first-child { width: 26%; }
  th:nth-child(3):last-child, td:nth-child(3):last-child { width: 25%; } /* "ANSWER STYLE" stays whole */
}
th { color: var(--text-dim); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 4px; }

.boxes { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.box { flex: 1; min-width: 96px; text-align: center; padding: 12px 8px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); }
.box b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.box small { color: var(--text-dim); }
.box.b1 { border-color: var(--bad); } .box.b3 { border-color: var(--spell); } .box.b5 { border-color: var(--accent); }

/* Fridge note: the two-or-three-sentence version a tired parent reads at 9pm. */
.fridge { background: var(--surface); border-left: 4px solid var(--accent); border-radius: var(--r-sm);
  padding: 16px 20px; margin: 20px 0 28px; font-size: 1.08rem; line-height: 1.6; }
.fridge p { margin: 0; color: var(--text); }
.fridge p + p { margin-top: 8px; }
/* Fold-outs: the exact rules, verbatim, one tap away. */
details.rules { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); margin: 18px 0; padding: 0 20px; }
details.rules summary { cursor: pointer; padding: 14px 0; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--accent); list-style: none; }
details.rules summary::-webkit-details-marker { display: none; }
details.rules summary::before { content: "\25B8"; display: inline-block; width: 1.1em; transition: transform .15s ease; }
details.rules[open] summary::before { transform: rotate(90deg); }
details.rules[open] { padding-bottom: 8px; }
details.rules > h2 { margin-top: 10px; font-size: 1.15rem; }
details.rules > h2:first-of-type { margin-top: 4px; }
details.rules .tablewrap, details.rules .boxes { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { details.rules summary::before { transition: none; } }

.swatches { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.sw { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text-dim); }
.sw i { width: 18px; height: 18px; border-radius: var(--r-xs); display: inline-block; }

kbd, code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 1px 7px; color: var(--accent-2); }

/* Footer: one language across login, guide and landing page.
   Byline · quiet links (the login's "See how it works" treatment) · pronunciation cue. */
footer.site {
  max-width: 780px; margin: 60px auto 0; padding: 26px 20px; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: .85rem; display: flex; gap: 12px 22px; flex-wrap: wrap; align-items: center;
}
footer.site .foot-byline { flex: 1 1 100%; }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer.site nav a { position: relative; padding: 4px 0 6px; color: var(--text-dim); text-decoration: none;
  font: 800 .9rem var(--font-display); letter-spacing: .01em; }
footer.site nav a::before { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px; background: currentColor; }
footer.site nav a:hover { color: var(--text); text-decoration: none; }
footer.site .foot-say { margin-left: auto; font-size: .8rem; letter-spacing: .02em; }
.cta {
  display: inline-block; background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--brand-ink); font-weight: 800; padding: 12px 22px; border-radius: var(--r-pill); font-family: var(--font-display);
}
.cta:hover { text-decoration: none; filter: brightness(1.08); }
