/* Chinese Zodiac (Tool 19, prefix cz-) — the verdict hero (Hanzi and branch dial), the breakdown bento, the animals and the table.
   Loaded through the `styles:` list in chinese-zodiac.njk, so it sits in <head>, BEFORE the tool kit's inline <style> blocks.
   Rules are scoped `.cz .x`; where one restyles a kit class it carries one more class than the kit's `.tk .x`, so it outranks it.
   Depends on tokens.css, partials/tool-kit-css.njk and partials/result-kit-css.njk.

   Language: Atelier Cinnabar on the night surface (#0B1020). One plain Hanzi character in the accent colour, one geometric dial, one
   800-weight pillar name. No red-and-gold clipart, no brush fonts, no illustrated animals. */
.tk.cz {
  --tk-accent: var(--brand-cinnabar, #D9381E);
  --night: var(--bg-ink, #0B1020);
  --night-raised: var(--bg-ink-raised, #141B30);
  --night-text: #F8FAFC;
  --night-muted: #94A3B8;
  --night-soft: #CBD5E1;
  --night-line: rgba(248, 250, 252, 0.14);
  --glow: #E8472B;
  --glow-soft: #FF8A6C;
  --hanzi: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", serif;
}
.tk.cz > * + * { margin-top: 16px; }
.tk.cz > .tk-head { margin-bottom: 20px; }
.tk.cz > .tk-head + * { margin-top: 0; }
.tk.cz > .sr-only { margin: 0; }

/* ================= Form ================= */
.cz .cz-form { display: grid; gap: 12px; }
.cz .cz-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.cz .cz-row .field { flex: 1 1 220px; max-width: 320px; }
.tk.cz .btn { background: var(--c-ink); border-bottom: 3px solid var(--c-accent); }
.tk.cz .btn:hover { box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--c-ink) 70%, transparent); }
.tk.cz .btn-sm.primary { background: var(--c-ink); border-color: var(--c-ink); }
.tk.cz .btn-sm.primary:hover:not(:disabled) { background: var(--c-ink); }
.cz .cz-hint { margin: 0; }
.cz .cz-sample { margin: 0; align-self: center; justify-self: center; width: min(100%, 260px); }
.cz .cz-sample-dial { display: block; width: 100%; height: auto; }

/* ================= Level 1: the verdict ================= */
.cz .cz-funnel > * + * { margin-top: 16px; }
.cz .cz-hero { container: cz / inline-size; position: relative; overflow: hidden; border-radius: var(--r-card); background: var(--night); color: var(--night-text); padding: 22px 18px 18px; scroll-margin-top: 80px; }
@media (min-width: 720px) { .cz .cz-hero { padding: 36px 40px 28px; } }
.cz .cz-hero::before { content: ""; position: absolute; left: -16%; top: -20%; width: 90%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(232, 71, 43, 0.2), rgba(232, 71, 43, 0)); pointer-events: none; }
.cz .cz-hero > * { position: relative; }
.cz .cz-hero :focus-visible { outline: 3px solid color-mix(in srgb, var(--glow) 60%, transparent); outline-offset: 2px; border-radius: 6px; }
.cz .cz-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.cz .cz-eyebrow { margin: 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--glow-soft); }
.cz .cz-stamp { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 14px 4px 10px; border-radius: 999px; border: 1px solid rgba(232, 71, 43, 0.7); background: rgba(232, 71, 43, 0.14); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #FBC7BA; }
.cz .cz-stamp[data-state="corrected"] { background: var(--glow); border-color: var(--glow); color: #fff; }
.cz .cz-stamp .ic { width: 16px; height: 16px; }
.cz .cz-stage { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.cz .cz-hanzi { font-family: var(--hanzi); font-size: clamp(7.5rem, 46cqw, 16rem); font-weight: 400; line-height: 1; color: var(--glow); text-shadow: 0 0 60px rgba(232, 71, 43, 0.34); user-select: none; }
.cz .cz-dial { flex: 0 1 min(44cqw, 280px); width: min(44cqw, 280px); }
.cz .bd { display: block; width: 100%; height: auto; }
.cz .bd-ring { fill: none; stroke: rgba(248, 250, 252, 0.28); stroke-width: 1.2; }
.cz .bd-tick { stroke: rgba(248, 250, 252, 0.28); stroke-width: 1.2; }
.cz .bd-dot { fill: rgba(248, 250, 252, 0.55); }
.cz .bd-spoke { stroke: var(--glow); stroke-width: 1.6; }
.cz .bd-halo { fill: rgba(232, 71, 43, 0.22); }
.cz .bd-on { fill: var(--glow); }
.cz .bd-core { fill: rgba(248, 250, 252, 0.55); }
.cz .cz-pillar { margin-top: 18px; font-size: clamp(2.75rem, 13cqw, 7.5rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.94; text-wrap: balance; overflow-wrap: anywhere; }
.cz .cz-hook { margin-top: 18px; max-width: 30ch; font-size: clamp(1.1875rem, 1rem + 1vw, 1.625rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.cz .cz-essence { margin-top: 10px; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--glow-soft); }
.cz .cz-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin-top: 22px; border: 1px solid var(--night-line); border-radius: 14px; background: var(--night-line); overflow: hidden; }
.cz .cz-cell { padding: 12px 14px; background: var(--night); min-width: 0; }
.cz .cz-cell dt { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--night-muted); }
.cz .cz-cell dd { margin-top: 2px; font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cz .cz-year { margin-top: 12px; font-size: 0.8125rem; color: var(--night-muted); }
.cz .cz-hero .rk-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--night-line); justify-content: flex-start; }
.tk.cz .cz-hero .btn-sm { background: rgba(248, 250, 252, 0.06); border-color: var(--night-line); color: var(--night-text); }
.tk.cz .cz-hero .btn-sm:hover:not(:disabled) { background: rgba(248, 250, 252, 0.14); border-color: rgba(248, 250, 252, 0.3); }
.tk.cz .cz-hero .btn-sm.primary { background: var(--glow); border-color: var(--glow); color: #fff; }
.tk.cz .cz-hero .btn-sm.primary:hover:not(:disabled) { background: var(--glow); filter: brightness(1.08); }
.cz .cz-hero .fine-print { color: var(--night-muted); }

/* ================= Level 3: the breakdown ================= */
.cz .cz-bento { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .cz .cz-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cz .cz-t-correction { grid-column: 1 / -1; } }
.cz .cz-tile { padding: 20px 20px 18px; border: 1px solid var(--c-line); border-radius: var(--r-card); background: var(--c-card); }
.cz .cz-tile h3 { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-accent-ink); }
.cz .cz-tile-v { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 1.875rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.cz .cz-tile-h { font-family: var(--hanzi); font-size: 1.75rem; font-weight: 400; letter-spacing: 0; color: var(--c-accent); }
.cz .cz-tile-k { margin-top: 4px; font-size: 0.9375rem; font-weight: 700; color: var(--c-muted); }
.cz .cz-tile-b { margin-top: 10px; font-size: 1rem; font-weight: 600; color: var(--c-ink); }
.cz .cz-tile-s { margin-top: 10px; font-size: 0.875rem; font-weight: 600; color: var(--c-muted); }
.cz .cz-t-correction[data-state="corrected"] { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); box-shadow: inset 4px 0 0 var(--c-accent); }
.cz .cz-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cz .cz-compare div { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: 12px; }
.cz .cz-compare span { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-muted); }
.cz .cz-compare b { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.cz .cz-compare .is-wrong b { color: var(--c-muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--c-accent); }
.cz .cz-compare .is-right { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 6%, transparent); }
.cz .cz-compare .is-right b { color: var(--c-accent-ink); }

/* ================= Static: animals, dates, method ================= */
.cz .cz-list { display: grid; gap: 4px 28px; margin-top: 8px; padding: 0; list-style: none; }
@media (min-width: 720px) { .cz .cz-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cz .cz-list li { display: flex; gap: 14px; padding: 12px 8px 12px 0; border-top: 1px solid var(--c-line); }
.cz .cz-list li.is-on { background: color-mix(in srgb, var(--c-accent) 6%, transparent); box-shadow: inset 3px 0 0 var(--c-accent); padding-left: 12px; }
.cz .cz-list-h { flex: none; width: 2.5rem; font-family: var(--hanzi); font-size: 2rem; line-height: 1.1; color: var(--c-accent); }
.cz .cz-list b { font-size: 1.0625rem; letter-spacing: -0.01em; }
.cz .cz-list-e { margin-left: 6px; font-size: 0.8125rem; font-weight: 700; color: var(--c-muted); }
.cz .cz-list p { margin-top: 4px; font-size: 0.9375rem; color: var(--c-muted); }
.cz .cz-list .cz-list-n { font-size: 0.8125rem; font-weight: 700; color: var(--c-accent-ink); }
.cz .cz-dates-scroll { max-height: 440px; margin-top: 12px; overflow: auto; border: 1px solid var(--c-line); border-radius: 12px; }
.cz .cz-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.cz .cz-table th, .cz .cz-table td { padding: 10px 14px; border-top: 1px solid var(--c-line); text-align: left; white-space: nowrap; }
.cz .cz-table thead th { position: sticky; top: 0; border-top: 0; background: var(--c-card); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--c-muted); box-shadow: 0 1px 0 var(--c-line); }
.cz .cz-table tbody th { font-weight: 800; }
.cz .cz-table td:nth-child(2) { color: var(--c-muted); }
.cz .cz-table tr.is-on th, .cz .cz-table tr.is-on td { color: var(--c-accent-ink); font-weight: 800; background: color-mix(in srgb, var(--c-accent) 7%, transparent); }
.cz .cz-dates-h { font-family: var(--hanzi); color: var(--c-accent); margin-left: 4px; }
.cz .cz-rules { display: grid; gap: 14px 28px; }
@media (min-width: 720px) { .cz .cz-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cz .cz-rules dt { font-weight: 800; letter-spacing: -0.01em; }
.cz .cz-rules dd { margin-top: 2px; color: var(--c-muted); font-size: 0.9375rem; }
.cz .cz-next { display: grid; gap: 4px; }
.cz .cz-next-link { display: flex; align-items: center; gap: 14px; padding: 6px 0; color: inherit; text-decoration: none; }
.cz .cz-next-link .ic { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--c-accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.cz .cz-next-link span { display: grid; gap: 2px; color: var(--c-muted); font-size: 0.9375rem; }
.cz .cz-next-link b { color: var(--c-ink); font-size: 1.0625rem; letter-spacing: -0.01em; }
.cz .cz-next-link:hover b { color: var(--c-accent-ink); }
