/* Martin D. Eisenstein, CPA & Attorney at Law — site stylesheet
   Palette sampled from the MDE & IBMC combined logo. */

:root {
  --indigo: #4858A8;
  --indigo-deep: #2F3B84;
  --indigo-ink: #1E2760;
  --indigo-tint: #EEF0FA;
  --indigo-tint-2: #DDE1F4;
  --green: #50A868;
  --green-deep: #2E7A46;
  --green-tint: #ECF6EF;
  --green-tint-2: #D5EBDC;
  --blue: #0078E0;
  --ink: #171C3A;
  --ink-2: #4A5070;
  --ink-3: #7A7F9C;
  --ground: #F4F5F9;
  --surface: #FFFFFF;
  --surface-2: #FAFBFD;
  --line: #DDE0EC;
  --line-2: #C9CDE0;
  --shadow: 0 1px 2px rgba(23,28,58,.06), 0 8px 24px -12px rgba(23,28,58,.18);
  --focus: #0078E0;
  --logo-chip: transparent;
  --warn-tint: #FFF6D6;
  --warn-ink: #7A5A00;
  --warn-line: #E8CD6A;
  --radius: 10px;
  --radius-lg: 16px;
  --max: 1140px;
  --gutter: clamp(16px, 4vw, 40px);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --indigo: #97A3EC;
    --indigo-deep: #B7C0F5;
    --indigo-ink: #E1E5FA;
    --indigo-tint: #1E2450;
    --indigo-tint-2: #283068;
    --green: #7FCB95;
    --green-deep: #A6DDB5;
    --green-tint: #17301F;
    --green-tint-2: #1F4029;
    --blue: #5BA8F5;
    --ink: #E9EBF5;
    --ink-2: #B4B9D3;
    --ink-3: #8A90B0;
    --ground: #0F1226;
    --surface: #171B36;
    --surface-2: #1C2140;
    --line: #2A3057;
    --line-2: #3A4170;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    --focus: #8FC3FF;
    --logo-chip: #FFFFFF;
    --warn-tint: #3A3110;
    --warn-ink: #F3DC8A;
    --warn-line: #7A6520;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --indigo: #97A3EC;
  --indigo-deep: #B7C0F5;
  --indigo-ink: #E1E5FA;
  --indigo-tint: #1E2450;
  --indigo-tint-2: #283068;
  --green: #7FCB95;
  --green-deep: #A6DDB5;
  --green-tint: #17301F;
  --green-tint-2: #1F4029;
  --blue: #5BA8F5;
  --ink: #E9EBF5;
  --ink-2: #B4B9D3;
  --ink-3: #8A90B0;
  --ground: #0F1226;
  --surface: #171B36;
  --surface-2: #1C2140;
  --line: #2A3057;
  --line-2: #3A4170;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
  --focus: #8FC3FF;
  --logo-chip: #FFFFFF;
  --warn-tint: #3A3110;
  --warn-ink: #F3DC8A;
  --warn-line: #7A6520;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--indigo); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; margin: 0; color: var(--ink); text-wrap: balance; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.45rem); }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.5rem); }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; }
p { margin: 0; }
p + p, .prose > * + * { margin-top: 1em; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2em; margin-bottom: .5em; }
.prose h3 { margin-top: 1.8em; margin-bottom: .4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
strong { font-weight: 600; }
.eyebrow { font-family: var(--font-body); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--indigo); margin-bottom: .9rem; }
.eyebrow.green { color: var(--green-deep); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
.small { font-size: .92rem; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.35em; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; line-height: 1.2; transition: background .15s, color .15s, border-color .15s, transform .15s; font-family: var(--font-body); }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-deep); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); background: var(--surface); }
.btn-sm { padding: .55em 1em; font-size: .92rem; }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-green { color: #0F1226; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary, :root:not([data-theme="light"]) .btn-green { color: #0F1226; } }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin-top: 1.6rem; }
.arrow-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: .4em; align-items: center; }
.arrow-link::after { content: "→"; transition: transform .15s; }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; padding: 6px 8px; border-radius: 8px; background: var(--logo-chip); margin-left: -8px; }
.brand img { height: 40px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.nav > ul > li { position: relative; }
.nav a, .nav button.navbtn { display: inline-flex; align-items: center; gap: .35em; padding: .55em .8em; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav a:hover, .nav button.navbtn:hover, .nav > ul > li.open > .navbtn { background: var(--indigo-tint); color: var(--indigo-ink); }
.nav .navbtn .chev { width: 10px; height: 10px; transition: transform .15s; }
.nav > ul > li.open .chev { transform: rotate(180deg); }
.menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; display: none; z-index: 60; }
.nav > ul > li.open > .menu { display: block; }
.menu a { display: block; padding: .6em .8em; font-weight: 500; border-radius: 8px; }
.menu a small { display: block; font-weight: 400; color: var(--ink-2); font-size: .85rem; line-height: 1.35; }
.menu a:hover { background: var(--indigo-tint); }
.menu .menu-head { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: .5em .8em .2em; font-weight: 600; }
.nav .cta { margin-left: .5rem; }
.nav a.btn.cta { background: var(--indigo); color: #fff; padding: .55em 1.05em; border-radius: 999px; }
.nav a.btn.cta:hover { background: var(--indigo-deep); color: #fff; }
:root[data-theme="dark"] .nav a.btn.cta { color: #0F1226; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a.btn.cta { color: #0F1226; } }
.hamb { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line-2); border-radius: 8px; padding: 8px 10px; color: var(--ink); cursor: pointer; }
.hamb svg { width: 22px; height: 22px; }
@media (max-width: 980px) {
  .hamb { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .75rem var(--gutter) 1.25rem; margin: 0; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li > a, .nav > ul > li > .navbtn { width: 100%; justify-content: space-between; padding: .8em .6em; border-bottom: 1px solid var(--line); border-radius: 0; }
  .menu { position: static; box-shadow: none; border: 0; border-radius: 0; padding: .25rem 0 .5rem .75rem; min-width: 0; }
  .nav .cta { margin: 1rem 0 0; width: 100%; justify-content: center; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section.tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section.indigo { background: var(--indigo-tint); }
.section.green { background: var(--green-tint); }
.section-head { max-width: 720px; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head h2 { margin-bottom: .75rem; }
.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 2.5vw, 1.75rem); }
.card h3 { margin-bottom: .6rem; }
.card p + p { margin-top: .7em; }
.card .eyebrow { margin-bottom: .6rem; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding-left: 1.4em; position: relative; }
.plain-list li + li { margin-top: .55em; }
.plain-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: .55em; height: .55em; border-radius: 50%; background: var(--indigo); }
.plain-list.green li::before { background: var(--green); }
.check-list li::before { content: "✓"; background: none; color: var(--green-deep); top: 0; font-weight: 700; width: auto; height: auto; }

/* ---------- Hero (home) ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { max-width: 56ch; }
.hero-cred { display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin-top: 1.6rem; }
.pill { display: inline-flex; align-items: center; gap: .4em; padding: .35em .8em; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.pill .dot { width: .5em; height: .5em; border-radius: 50%; background: var(--green); }
.hero-visual { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1rem, 2.5vw, 1.75rem); box-shadow: var(--shadow); }
.hero-visual figcaption { font-size: .88rem; color: var(--ink-2); margin-top: .75rem; text-align: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* mechanism diagram */
.mech { width: 100%; height: auto; font-family: var(--font-body); }
.mech .box { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.2; }
.mech .box.cpa { stroke: var(--indigo); }
.mech .box.law { stroke: var(--green); }
.mech .box.plan { fill: var(--indigo); stroke: var(--indigo); }
.mech .box.out { fill: var(--surface); stroke: var(--line-2); }
.mech .lbl { fill: var(--ink); font-size: 15px; font-weight: 600; }
.mech .sub { fill: var(--ink-2); font-size: 12px; }
.mech .lbl.inv { fill: #fff; }
.mech .sub.inv { fill: #E4E7FA; }
.mech .path { fill: none; stroke: var(--line-2); stroke-width: 1.6; }
.mech .path.cpa { stroke: var(--indigo); }
.mech .path.law { stroke: var(--green); }
.mech .path.out { stroke: var(--indigo); stroke-dasharray: 4 4; }
.mech .seam { fill: var(--warn-tint); stroke: var(--warn-line); }
.mech .seam-lbl { fill: var(--warn-ink); font-size: 12px; font-weight: 600; }
:root[data-theme="dark"] .mech .lbl.inv { fill: #0F1226; }
:root[data-theme="dark"] .mech .sub.inv { fill: #2A3057; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mech .lbl.inv { fill: #0F1226; } :root:not([data-theme="light"]) .mech .sub.inv { fill: #2A3057; } }

/* ---------- Two doors ---------- */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(1.25rem, 3vw, 2rem); }
.door { position: relative; border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 1rem; overflow: hidden; }
.door::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; }
.door.exit::before { background: var(--indigo); }
.door.mfo::before { background: var(--green); }
.door h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); }
.door .plain-list { margin-top: .25rem; }
.door .btn-row { margin-top: auto; padding-top: .5rem; }

/* ---------- Compare ---------- */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.25rem; }
.compare .col { border-radius: var(--radius-lg); padding: clamp(1.25rem, 2.5vw, 1.75rem); border: 1px solid var(--line); background: var(--surface); }
.compare .col.us { border-color: var(--indigo); background: var(--indigo-tint); }
.compare .col h3 { margin-bottom: .75rem; }
.compare .col .tag { display: inline-block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: .25em .7em; border-radius: 999px; margin-bottom: .9rem; }
.compare .col.them .tag { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.compare .col.us .tag { background: var(--indigo); color: #fff; }
:root[data-theme="dark"] .compare .col.us .tag { color: #0F1226; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .compare .col.us .tag { color: #0F1226; } }

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.25rem; counter-reset: tl; }
.tl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; position: relative; }
.tl .when { font-family: var(--font-display); font-size: 1.5rem; color: var(--indigo-deep); margin-bottom: .25rem; }
.tl .room { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; margin-bottom: .9rem; }
.tl.wide .room { color: var(--green-deep); }
.tl.narrow .room { color: var(--warn-ink); }
.tl.late .room { color: var(--ink-3); }
.tl ul { margin-top: .5rem; }

/* ---------- Proof ---------- */
.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem; }
.proof .item { padding: 1.1rem 1.25rem; border-left: 3px solid var(--indigo); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.proof .item b { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; line-height: 1.15; margin-bottom: .25rem; }
.proof .item span { color: var(--ink-2); font-size: .95rem; }
.quote { border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); padding: clamp(1.5rem, 3vw, 2.25rem); position: relative; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.4; font-style: italic; color: var(--ink); }
.quote blockquote::before { content: "“"; color: var(--green); font-size: 3rem; line-height: 0; vertical-align: -0.5em; margin-right: .1em; font-style: normal; }
.quote figcaption { margin-top: 1rem; color: var(--ink-2); font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--indigo-ink); color: #F1F3FC; border-radius: var(--radius-lg); padding: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #D8DCF3; }
.cta-band .btn-primary { background: #fff; color: var(--indigo-ink); }
.cta-band .btn-primary:hover { background: #E4E8FF; color: var(--indigo-ink); }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.cta-band .contact { font-size: 1.05rem; line-height: 1.7; }
.cta-band .contact a { color: #fff; }
:root[data-theme="dark"] .cta-band { background: var(--indigo-tint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-band { background: var(--indigo-tint); } }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Page head (subpages) ---------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.page-head.exit { background: linear-gradient(180deg, var(--indigo-tint), var(--surface)); }
.page-head.mfo { background: linear-gradient(180deg, var(--green-tint), var(--surface)); }
.page-head h1 { margin-bottom: 1rem; max-width: 20ch; }
.page-head .lede { margin-top: .25rem; }
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 1.25rem; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Steps (ordered processes) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: 1rem; }
.steps > li { counter-increment: st; display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.4rem; }
.steps > li::before { content: counter(st); font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--indigo); font-weight: 500; }
.steps.green > li::before { color: var(--green-deep); }
.steps h3 { margin-bottom: .4rem; font-size: 1.25rem; }
.steps .who { display: inline-block; margin-top: .6rem; font-size: .85rem; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: .25em .7em; border-radius: 999px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .97rem; min-width: 560px; }
th, td { text-align: left; padding: .85em 1em; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); background: var(--surface-2); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
td.k { font-weight: 600; white-space: nowrap; }

/* ---------- Notices ---------- */
.notice { border-radius: var(--radius); padding: 1rem 1.25rem; border: 1px solid var(--line); background: var(--surface-2); }
.notice.draft { background: var(--warn-tint); border-color: var(--warn-line); color: var(--warn-ink); }
.notice.draft b { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; display: block; margin-bottom: .3rem; }
.notice.info { background: var(--indigo-tint); border-color: var(--indigo-tint-2); color: var(--ink); }

/* ---------- FAQ ---------- */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.25rem; }
.faq details + details { margin-top: .6rem; }
.faq summary { cursor: pointer; list-style: none; padding: 1.05rem 0; font-weight: 600; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--indigo); line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 1.2rem; color: var(--ink-2); max-width: 70ch; }
.faq .a p + p { margin-top: .7em; }

/* ---------- Case notes ---------- */
.case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 2.5vw, 1.75rem); display: grid; gap: 1rem; }
.case .meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.case h3 { font-size: 1.35rem; }
.case dl { margin: 0; display: grid; gap: .8rem; }
.case dt { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--indigo); margin-bottom: .2rem; }
.case.mfo dt { color: var(--green-deep); }
.case dd { margin: 0; color: var(--ink-2); }

/* ---------- Tools (self-check, slider) ---------- */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); }
.tool h3 { margin-bottom: .5rem; }
.q { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.q:last-of-type { border-bottom: 0; }
.q .qt { font-weight: 600; margin-bottom: .6rem; }
.opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.opts label { display: inline-flex; align-items: center; gap: .45em; border: 1.5px solid var(--line-2); border-radius: 999px; padding: .4em .9em; cursor: pointer; font-size: .95rem; background: var(--surface); }
.opts label:has(input:checked) { border-color: var(--indigo); background: var(--indigo-tint); color: var(--indigo-ink); }
.opts input { accent-color: var(--indigo); margin: 0; }
.result { margin-top: 1.25rem; border-radius: var(--radius); padding: 1.25rem 1.4rem; border: 1px solid var(--line); background: var(--surface-2); }
.result .score { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--indigo-deep); }
.result .band { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-top: .4rem; }
.result.wide { border-color: var(--green); background: var(--green-tint); }
.result.wide .band { color: var(--green-deep); }
.result.narrow { border-color: var(--warn-line); background: var(--warn-tint); }
.result.narrow .band { color: var(--warn-ink); }
.result.late { border-color: var(--indigo); background: var(--indigo-tint); }
.result.late .band { color: var(--indigo-deep); }
.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: .9rem 0; }
.meter i { display: block; height: 100%; background: var(--indigo); width: 0; transition: width .3s; }
.range-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; margin-bottom: 1rem; }
input[type=range] { width: 100%; accent-color: var(--indigo); }
.range-lbl { font-family: var(--font-display); font-size: 1.6rem; color: var(--indigo-deep); white-space: nowrap; }
.moves { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.moves li { display: grid; grid-template-columns: 7.2rem 1fr; gap: .75rem; align-items: start; padding: .75rem .9rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.moves .st { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: .3em .6em; border-radius: 6px; text-align: center; }
.moves .st.open { background: var(--green-tint-2); color: var(--green-deep); }
.moves .st.narrowing { background: var(--warn-tint); color: var(--warn-ink); }
.moves .st.closed { background: var(--line); color: var(--ink-3); text-decoration: line-through; }
.moves li.is-closed .mv { color: var(--ink-3); }
.moves .mv b { display: block; }
.moves .mv span { font-size: .92rem; color: var(--ink-2); }
@media (max-width: 520px) { .moves li { grid-template-columns: 1fr; } .moves .st { justify-self: start; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: .7em .85em; border: 1.5px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--indigo); outline: none; box-shadow: 0 0 0 3px var(--indigo-tint-2); }
.form textarea { min-height: 120px; resize: vertical; }
.form .hint { font-size: .86rem; color: var(--ink-2); font-weight: 400; }

/* ---------- Team ---------- */
.person { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: start; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--indigo-tint); color: var(--indigo-deep); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.5rem; border: 1px solid var(--indigo-tint-2); }
.person .role { color: var(--ink-2); font-size: .95rem; margin-bottom: .5rem; }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem; margin-top: clamp(2rem, 5vw, 4rem); color: var(--ink-2); font-size: .95rem; }
.footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.footer h4 { color: var(--ink); margin-bottom: .75rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: .45rem; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--indigo); text-decoration: underline; }
.footer .brand { margin-bottom: 1rem; }
.footer .brand img { height: 46px; }
.footer .legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); display: grid; gap: .75rem; max-width: 100%; }
@media (max-width: 900px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer .cols { grid-template-columns: 1fr; } }

/* ---------- Two-tone section split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.side-note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; }
.side-note h3 { font-size: 1.2rem; margin-bottom: .6rem; }

/* ---------- Preview (single-file) router ---------- */
.route { }
.route[hidden] { display: none !important; }
