/* =====================================================================
   전사 Kiro 하네스 가이드 — Design System
   Register: brand · Theme: pristine engineering docs, confident crimson
   Fonts: Pretendard + JetBrains Mono · Color: OKLCH · Motion: ease-out-expo
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* AWS-aligned brand — Smile orange + squid-ink navy (deliberate identity match) */
  --brand:        oklch(0.79 0.16 63);   /* AWS orange — fills, CTA, accents */
  --brand-strong: oklch(0.55 0.15 50);   /* readable orange — links, emphasis text */
  --brand-press:  oklch(0.47 0.13 48);
  --brand-soft:   oklch(0.962 0.03 66);
  --brand-line:   oklch(0.84 0.10 66);
  --accent:       oklch(0.55 0.13 248);  /* AWS console blue — secondary */

  /* three layers (distinct in hue AND luminance) */
  --central:  oklch(0.74 0.16 61);   /* orange */
  --team:     oklch(0.55 0.13 248);  /* AWS blue */
  --personal: oklch(0.60 0.10 188);  /* teal */
  --central-soft:  oklch(0.965 0.035 66);
  --team-soft:     oklch(0.955 0.03 248);
  --personal-soft: oklch(0.955 0.028 188);

  /* semantic */
  --ok:   oklch(0.56 0.12 158);
  --warn: oklch(0.64 0.13 85);
  --ok-soft:   oklch(0.95 0.04 158);
  --warn-soft: oklch(0.96 0.07 90);

  /* surfaces — light (pure white; whisper-cool neutrals under navy ink) */
  --bg:        oklch(1 0 0);
  --surface:   oklch(0.985 0.003 252);
  --surface-2: oklch(0.966 0.005 252);
  --surface-3: oklch(0.945 0.007 252);
  --border:    oklch(0.90 0.008 252);
  --border-2:  oklch(0.84 0.012 252);

  /* ink — squid-ink navy */
  --ink:      oklch(0.26 0.028 252);
  --ink-dim:  oklch(0.44 0.022 252);
  --ink-mute: oklch(0.55 0.016 252);
  --on-brand: oklch(0.23 0.03 252);      /* navy text on orange */

  --code-bg:  oklch(0.24 0.022 255);
  --code-ink: oklch(0.92 0.008 250);

  --shadow-1: 0 1px 2px oklch(0.24 0.02 28 / .06), 0 2px 8px oklch(0.24 0.02 28 / .05);
  --shadow-2: 0 4px 12px oklch(0.24 0.02 28 / .08), 0 16px 40px oklch(0.24 0.02 28 / .10);
  --ring: 0 0 0 3px oklch(0.79 0.16 63 / .34);

  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 30px;

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1160px;

  /* semantic z-scale (never arbitrary 9999) */
  --z-base: 1; --z-sticky: 200; --z-tabbar: 210; --z-topbar: 220;
  --z-backdrop: 300; --z-modal: 310; --z-toast: 400; --z-tooltip: 500;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);          /* ~ease-out-quint */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --brand:        oklch(0.80 0.155 66);
  --brand-strong: oklch(0.82 0.14 66);
  --brand-press:  oklch(0.86 0.12 68);
  --brand-soft:   oklch(0.32 0.08 60);
  --brand-line:   oklch(0.46 0.10 60);
  --accent:       oklch(0.70 0.13 246);

  --central:  oklch(0.80 0.15 65);
  --team:     oklch(0.70 0.13 246);
  --personal: oklch(0.72 0.10 190);
  --central-soft:  oklch(0.32 0.08 60);
  --team-soft:     oklch(0.30 0.06 246);
  --personal-soft: oklch(0.30 0.05 190);

  --ok:   oklch(0.72 0.13 158);
  --warn: oklch(0.78 0.12 88);
  --ok-soft:   oklch(0.30 0.06 158);
  --warn-soft: oklch(0.32 0.06 90);

  --bg:        oklch(0.20 0.018 255);
  --surface:   oklch(0.245 0.02 255);
  --surface-2: oklch(0.285 0.022 255);
  --surface-3: oklch(0.325 0.024 255);
  --border:    oklch(0.36 0.022 255);
  --border-2:  oklch(0.44 0.026 255);

  --ink:      oklch(0.95 0.008 250);
  --ink-dim:  oklch(0.78 0.014 250);
  --ink-mute: oklch(0.64 0.016 250);
  --on-brand: oklch(0.20 0.02 255);

  --code-bg:  oklch(0.15 0.015 258);
  --code-ink: oklch(0.90 0.01 250);

  --shadow-1: 0 1px 2px oklch(0 0 0 / .4);
  --shadow-2: 0 8px 24px oklch(0 0 0 / .45), 0 24px 60px oklch(0 0 0 / .40);
  --ring: 0 0 0 3px oklch(0.80 0.155 66 / .42);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.68;
  font-feature-settings: "ss01","cv01"; -webkit-font-smoothing: antialiased;
  letter-spacing: -0.006em; overflow-x: hidden;
  transition: background .45s var(--ease-out), color .3s ease;
}

h1,h2,h3,h4 { color: var(--ink); font-weight: 800; line-height: 1.12; margin: 0;
  letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0 0 1em; color: var(--ink-dim); text-wrap: pretty; }
a { color: var(--brand-strong); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd, samp { font-family: var(--mono); font-size: 0.86em; }
strong { color: var(--ink); font-weight: 700; }
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.prose { max-width: 72ch; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: var(--z-topbar);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand b { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.02em; }
.brand small { display: block; font-family: var(--mono); font-size: 0.68rem;
  color: var(--ink-mute); font-weight: 500; letter-spacing: 0; margin-top: 1px; }
.grow { flex: 1; }
.ghost-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--surface);
  color: var(--ink-dim); font-family: var(--sans); font-weight: 650; font-size: 0.86rem; cursor: pointer;
  transition: border-color .2s var(--ease-out), color .2s, transform .2s var(--ease-out); }
.ghost-btn:hover { color: var(--ink); border-color: var(--brand); transform: translateY(-1px); }
.ghost-btn svg { width: 17px; height: 17px; }

/* ---------- Tabs ---------- */
.tabbar { position: sticky; top: 64px; z-index: var(--z-tabbar);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 16px; background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 650; color: var(--ink-mute);
  white-space: nowrap; transition: color .2s var(--ease-out); }
.tab .ti { width: 18px; height: 18px; opacity: .7; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--brand-strong); }
.tab[aria-selected="true"] .ti { opacity: 1; }
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2.5px;
  border-radius: 3px 3px 0 0; background: var(--brand); transform: scaleX(0); transform-origin: center;
  transition: transform .3s var(--ease-out-expo); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }

/* ---------- Panels ---------- */
.panel { display: none; padding: clamp(40px, 6vw, 72px) 0 100px; }
.panel.active { display: block; }
.panel-fade { animation: panelIn .5s var(--ease-out-expo); }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .panel-fade { animation: none; } }

/* reveal — enhances an already-visible default (only hidden once JS opts in) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out-expo), transform .6s var(--ease-out-expo); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1 !important; transform: none !important; transition: none; } }

/* ---------- Section scaffolding ---------- */
.section { margin-top: clamp(56px, 8vw, 92px); }
.section-lead { max-width: 68ch; }
.section h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); margin-bottom: 12px; }
.section h2 .num { font-family: var(--mono); font-size: 0.5em; font-weight: 600; color: var(--brand);
  vertical-align: 0.35em; margin-right: 12px; letter-spacing: 0; }
.section > p { font-size: 1.05rem; }
.hr { height: 1px; background: var(--border); border: none; margin: clamp(48px,7vw,80px) 0; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (max-width: 940px) { .hero { grid-template-columns: 1fr; } }
.hero-kicker { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 0.78rem;
  font-weight: 600; color: var(--brand-strong); background: var(--brand-soft);
  border: 1px solid var(--brand-line); padding: 6px 13px; border-radius: 999px; letter-spacing: 0; }
.hero-kicker .live { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 var(--brand); animation: live 2.2s var(--ease-out) infinite; }
@keyframes live { 0%{ box-shadow: 0 0 0 0 oklch(0.79 0.16 63 / .5);} 70%{ box-shadow: 0 0 0 8px oklch(0.79 0.16 63 / 0);} 100%{ box-shadow: 0 0 0 0 transparent;} }
@media (prefers-reduced-motion: reduce){ .hero-kicker .live { animation: none; } }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 850; letter-spacing: -0.038em; margin: 22px 0 0; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.24rem); color: var(--ink-dim); margin-top: 20px; max-width: 44ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px; border-radius: var(--r-sm);
  font-family: var(--sans); font-weight: 700; font-size: 0.96rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s var(--ease-out), box-shadow .25s var(--ease-out), background .2s; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }

/* ---------- Generic surface block ---------- */
.block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow-1); }
.block.plain { background: none; box-shadow: none; }

.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.auto-fit { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 860px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }

/* ---------- Element reference rows (not a card grid) ---------- */
.elem-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 18px; align-items: center;
  padding: 18px 4px; border-bottom: 1px solid var(--border); }
.elem-row:last-child { border-bottom: none; }
.elem-ic { width: 44px; height: 44px; color: var(--el, var(--brand)); }
.elem-row h4 { font-size: 1.08rem; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.elem-row h4 .path { font-family: var(--mono); font-size: 0.74rem; font-weight: 500; color: var(--ink-mute); }
.elem-row p { margin: 4px 0 0; font-size: 0.93rem; }
.layer-chip { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  white-space: nowrap; border: 1px solid; }
.chip-central  { color: var(--central);  background: var(--central-soft);  border-color: var(--central); }
.chip-team     { color: var(--team);      background: var(--team-soft);      border-color: var(--team); }
.chip-personal { color: var(--personal);  background: var(--personal-soft);  border-color: var(--personal); }
@media (max-width: 680px){ .elem-row { grid-template-columns: 36px 1fr; } .elem-row .layer-chip { grid-column: 2; justify-self: start; } .elem-ic{width:36px;height:36px;} }

/* ---------- Callouts ---------- */
.note { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--r-sm); margin: 20px 0;
  border: 1px solid var(--border-2); background: var(--surface); }
.note svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent); }
.note p { margin: 0; font-size: 0.92rem; color: var(--ink-dim); }
.note.info { background: var(--team-soft); border-color: var(--team); } .note.info svg { color: var(--team); }
.note.warn { background: var(--warn-soft); border-color: var(--warn); } .note.warn svg { color: var(--warn); }
.note.tip  { background: var(--ok-soft);  border-color: var(--ok); }   .note.tip svg  { color: var(--ok); }

/* ---------- Code ---------- */
.code { position: relative; background: var(--code-bg); border-radius: var(--r-md); margin: 18px 0; overflow: hidden;
  border: 1px solid var(--border); }
.code-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 16px;
  border-bottom: 1px solid oklch(1 0 0 / .07); }
.code-bar .fname { font-family: var(--mono); font-size: 0.76rem; color: oklch(0.72 0.01 60); }
.code-bar .lang { font-family: var(--mono); font-size: 0.68rem; color: oklch(0.6 0.02 60);
  border: 1px solid oklch(1 0 0 /.12); padding: 2px 7px; border-radius: 6px; }
.copy { margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  background: oklch(1 0 0 / .06); border: 1px solid oklch(1 0 0 / .12); color: oklch(0.82 0.01 60);
  font-family: var(--sans); font-size: 0.74rem; font-weight: 650; padding: 5px 10px; border-radius: 8px; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s; }
.copy svg { width: 13px; height: 13px; }
.copy:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.copy.done { background: var(--ok); border-color: var(--ok); color: oklch(0.16 0.02 152); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.code code { font-family: var(--mono); font-size: 0.82rem; line-height: 1.65; color: var(--code-ink); white-space: pre; }
.tok-c { color: oklch(0.62 0.02 60); font-style: italic; }  /* comment */
.tok-k { color: oklch(0.82 0.14 66); }                       /* keyword/brand */
.tok-s { color: oklch(0.80 0.12 150); }                      /* string */
.tok-n { color: oklch(0.82 0.12 66); }                       /* number */
.tok-p { color: oklch(0.66 0.02 60); }                       /* punctuation */
.tok-a { color: oklch(0.78 0.10 232); }                      /* attr/key */

/* ---------- Table ---------- */
.table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.92rem;
  border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.table th, .table td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: var(--surface-2); font-size: 0.76rem; font-weight: 700; color: var(--ink-dim);
  text-transform: none; }
.table tr:last-child td { border-bottom: none; }
.table td code { color: var(--brand-strong); }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface); }

/* ---------- Accordion ---------- */
.acc { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; margin-bottom: 12px;
  transition: border-color .2s var(--ease-out), box-shadow .25s; }
.acc[open], .acc.open { border-color: var(--border-2); box-shadow: var(--shadow-1); }
.acc-h { display: flex; align-items: center; gap: 14px; padding: 17px 18px; cursor: pointer; user-select: none; list-style: none; }
.acc-h::-webkit-details-marker { display: none; }
.acc-h:hover { background: var(--surface-2); }
.acc-h .g { width: 26px; height: 26px; flex: none; color: var(--el, var(--brand)); }
.acc-h h4 { flex: 1; font-size: 1.04rem; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.acc-h .path { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; color: var(--ink-mute); }
.acc-h .chev { width: 18px; height: 18px; color: var(--ink-mute); transition: transform .3s var(--ease-out-expo); }
.acc.open .chev { transform: rotate(90deg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease-out-expo); }
.acc.open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; }
.acc-inner { padding: 2px 18px 20px; border-top: 1px solid var(--border); }
@media (prefers-reduced-motion: reduce){ .acc-body { transition: none; } }

/* ---------- Interactive 3-layer explorer ---------- */
.explorer { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px){ .explorer { grid-template-columns: 1fr; } }
.layer-svg .band { cursor: pointer; transition: opacity .25s var(--ease-out), transform .3s var(--ease-out-expo); transform-origin: center; }
.layer-svg .band:hover { transform: translateX(4px); }
.layer-svg.has-sel .band:not(.sel) { opacity: .32; }
.layer-panel { position: sticky; top: 130px; }
.lp { display: none; }
.lp.show { display: block; animation: panelIn .35s var(--ease-out-expo); }
.lp .lp-tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.74rem;
  font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid; margin-bottom: 12px; }
.lp h3 { font-size: 1.3rem; margin-bottom: 8px; }
.lp ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.lp li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--ink-dim); align-items: flex-start; }
.lp li svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--el); }

/* ---------- Decision tree ---------- */
.tree { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: clamp(22px, 3.5vw, 34px); box-shadow: var(--shadow-1); }
.tree .step-q { animation: panelIn .35s var(--ease-out-expo); }
.tree .q-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.tree .q-head .qn { font-family: var(--mono); font-size: 0.78rem; color: var(--brand); font-weight: 600; }
.tree h3 { font-size: 1.25rem; margin: 6px 0 20px; }
.tree-opts { display: grid; gap: 12px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  padding: 17px 18px; border-radius: var(--r-md); border: 1px solid var(--border-2); background: var(--bg);
  color: var(--ink); font-family: var(--sans); font-size: 0.98rem; font-weight: 650; cursor: pointer;
  transition: transform .2s var(--ease-out), border-color .2s, background .2s; }
.opt:hover { transform: translateX(5px); border-color: var(--brand); background: var(--surface-2); }
.opt .oi { width: 26px; height: 26px; color: var(--brand); flex: none; }
.opt small { display: block; font-weight: 500; color: var(--ink-mute); font-size: 0.82rem; margin-top: 2px; }
.tree-result { animation: panelIn .4s var(--ease-out-expo); }
.rec { border: 1.5px solid var(--ok); border-radius: var(--r-lg); padding: 24px; background: var(--ok-soft); }
.rec .rec-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.74rem;
  font-weight: 700; color: var(--ok); margin-bottom: 10px; }
.rec h3 { font-size: 1.35rem; margin-bottom: 8px; }
.back { display: inline-flex; align-items: center; gap: 7px; background: none; border: none; cursor: pointer;
  color: var(--brand-strong); font-family: var(--sans); font-weight: 650; font-size: 0.86rem; margin-bottom: 16px; padding: 0; }
.back svg { width: 15px; height: 15px; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 2px; counter-reset: st; }
.stp { display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding: 8px 0 22px; position: relative; }
.stp:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 42px; bottom: 0; width: 2px; background: var(--border); }
.stp .sn { counter-increment: st; width: 40px; height: 40px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--brand); color: var(--brand-strong); font-weight: 800; font-family: var(--mono);
  display: grid; place-items: center; font-size: 0.9rem; z-index: 1; }
.stp .sn::before { content: counter(st); }
.stp h4 { font-size: 1.05rem; margin-bottom: 4px; }
.stp p { margin: 0; font-size: 0.93rem; }

/* ---------- Roadmap ---------- */
.road { display: grid; gap: 0; }
.rphase { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 0 0 0 34px; position: relative; padding-bottom: 34px; }
.rphase::before { content: ""; position: absolute; left: 10px; top: 8px; bottom: -6px; width: 2px; background: var(--border); }
.rphase:last-child::before { display: none; }
.rphase .rd { position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--phc, var(--brand)); }
.rphase .rk { font-family: var(--mono); font-size: 0.74rem; font-weight: 600; color: var(--phc, var(--brand)); letter-spacing: 0; }
.rphase h4 { font-size: 1.15rem; margin: 3px 0 6px; }

/* ---------- Checklist ---------- */
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.check li { display: flex; gap: 13px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--surface); cursor: pointer; transition: border-color .18s, background .18s; }
.check li:hover { border-color: var(--border-2); }
.check li .cb { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border-2);
  display: grid; place-items: center; color: transparent; transition: .18s var(--ease-out); }
.check li .cb svg { width: 13px; height: 13px; }
.check li.on { border-color: var(--ok); background: var(--ok-soft); }
.check li.on .cb { background: var(--ok); border-color: var(--ok); color: oklch(0.18 0.02 152); }
.check li.on span { color: var(--ink-mute); text-decoration: line-through; }
.check li span { font-size: 0.95rem; }

/* ---------- Pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 650; border: 1px solid var(--border-2); background: var(--surface); color: var(--ink-dim); }
.pill .d { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--brand)); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 7px; font-family: var(--mono); font-size: 0.68rem; font-weight: 700; }
.badge.rec { color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok); }
.badge.alt { color: var(--ink-mute); background: var(--surface-2); border: 1px solid var(--border-2); }

/* ---------- SVG wrap + legend ---------- */
.figure { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: clamp(16px, 2.5vw, 26px); box-shadow: var(--shadow-1); }
.figure.bare { background: none; border: none; box-shadow: none; padding: 0; }
.figure svg { width: 100%; height: auto; display: block; }
.figcap { text-align: center; font-size: 0.85rem; color: var(--ink-mute); margin-top: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px 20px; justify-content: center; margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--ink-dim); font-weight: 600; }
.legend i { width: 13px; height: 13px; border-radius: 4px; display: block; }

/* ---------- Segmented toggle ---------- */
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.seg button { border: none; background: none; cursor: pointer; font-family: var(--sans); font-weight: 650; font-size: 0.88rem;
  color: var(--ink-mute); padding: 9px 18px; border-radius: 10px; transition: color .2s, background .25s var(--ease-out); }
.seg button[aria-selected="true"] { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-1); }
.flowpane { display: none; } .flowpane.show { display: block; animation: panelIn .4s var(--ease-out-expo); }

/* animated flow dashes */
.flow-line { stroke-dasharray: 7 9; animation: flowdash 1.1s linear infinite; }
@keyframes flowdash { to { stroke-dashoffset: -32; } }
@media (prefers-reduced-motion: reduce){ .flow-line { animation: none; } .lp.show, .tree-result, .step-q, .flowpane.show, .panel-fade { animation: none; } }

/* ---------- misc ---------- */
.eyebrow-solo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 0.76rem;
  font-weight: 600; color: var(--ink-mute); margin-bottom: 14px; }
.eyebrow-solo::before { content: ""; width: 22px; height: 2px; background: var(--brand); border-radius: 2px; }
.kv { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--border); color: var(--brand-strong);
  padding: 2px 7px; border-radius: 6px; font-size: 0.82em; }
.lead-figure { font-family: var(--mono); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); color: var(--brand); line-height: 1; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 860px){ .two-col { grid-template-columns: 1fr; } }

.footer { border-top: 1px solid var(--border); margin-top: 80px; padding: 34px 0 60px; color: var(--ink-mute); font-size: 0.86rem; }
.footer a { color: var(--ink-dim); }
.footer .fnote { font-family: var(--mono); font-size: 0.74rem; margin-top: 8px; }
