/* CanopyMarket — design tokens
   canopy  #0E3B2C  deep forest ink: brand, headings
   leaf    #1F7A4D  confirmations, verified states
   indigo  #2E3A87  adire indigo: interactive controls
   gold    #F2B33D  premium figures only
   paper   #F4F7F4  cool green-white ground
*/
:root {
  --canopy: #0E3B2C; --leaf: #1F7A4D; --indigo: #2E3A87; --indigo-2: #3C4BB0; --gold: #F2B33D; --gold-ink: #6B4A00;
  --paper: #F4F7F4; --surface: #FFFFFF; --surface-2: #EAF0EB; --line: #D5DFD8; --line-2: #BFCDC3;
  --ink: #12261D; --ink-2: #44594E; --ink-3: #6D8077; --warn: #A2410B; --warn-bg: #FCEBDD; --ok-bg: #E1F2E7;
  --focus: #2E3A87; --shadow: 0 1px 0 rgba(14,59,44,.06), 0 12px 32px -18px rgba(14,59,44,.35);
  --r-panel: 22px; --r-ctl: 999px; --r-sm: 10px;
  --f: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canopy: #9ED9B8; --leaf: #5CC48A; --indigo: #A9B4FF; --indigo-2: #C3CBFF; --gold: #F5C25C; --gold-ink: #F5C25C;
    --paper: #0D1813; --surface: #13231B; --surface-2: #1A2E24; --line: #24392E; --line-2: #33503F;
    --ink: #E5EFE9; --ink-2: #B4C6BC; --ink-3: #87998F; --warn: #FFB27D; --warn-bg: #3A2416; --ok-bg: #173826;
    --focus: #A9B4FF; --shadow: 0 1px 0 rgba(0,0,0,.3), 0 16px 40px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canopy: #9ED9B8; --leaf: #5CC48A; --indigo: #A9B4FF; --indigo-2: #C3CBFF; --gold: #F5C25C; --gold-ink: #F5C25C;
  --paper: #0D1813; --surface: #13231B; --surface-2: #1A2E24; --line: #24392E; --line-2: #33503F;
  --ink: #E5EFE9; --ink-2: #B4C6BC; --ink-3: #87998F; --warn: #FFB27D; --warn-bg: #3A2416; --ok-bg: #173826;
  --focus: #A9B4FF; --shadow: 0 1px 0 rgba(0,0,0,.3), 0 16px 40px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 80px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f); font-size: 1rem; line-height: 1.55;
  font-variation-settings: "opsz" 14; font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--indigo); text-underline-offset: 3px; }
h1, h2, h3, h4 { color: var(--canopy); line-height: 1.1; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4.2rem); font-variation-settings: "opsz" 96, "wdth" 82; font-weight: 750; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-variation-settings: "opsz" 72, "wdth" 88; }
h3 { font-size: 1.25rem; font-variation-settings: "opsz" 32; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
[hidden] { display: none !important; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { width: min(var(--wrap), 100% - 32px); margin-inline: auto; display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--canopy); text-decoration: none; font-weight: 750; font-size: 1.15rem;
  font-variation-settings: "opsz" 40, "wdth" 85; letter-spacing: -0.02em; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: var(--r-ctl); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.on { color: var(--canopy); background: var(--surface-2); font-weight: 650; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gold);
  color: #3a2a00; font-size: .72rem; font-weight: 700; margin-left: 4px; }
.top-act { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-grid; place-items: center; cursor: pointer; }
.iconbtn:hover { border-color: var(--line-2); }
.menu { display: none; }
@media (max-width: 900px) {
  .menu { display: inline-grid; }
  .nav { position: fixed; inset: calc(64px + env(safe-area-inset-top, 0px)) 0 auto 0; flex-direction: column; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 12px 16px 20px; margin: 0; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 1.05rem; }
  .top-act .btn-ghost { display: none; }
}

/* Buttons and controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: 1rem;
  padding: 13px 22px; border-radius: var(--r-ctl); border: 1.5px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.1;
  transition: background .15s, border-color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--indigo); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #0D1813; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0D1813; } }
.btn-primary:hover { background: var(--indigo-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--surface); }
.btn-soft { background: var(--surface-2); color: var(--canopy); }
.btn-soft:hover { background: var(--line); }
.btn.sm { padding: 8px 14px; font-size: .9rem; }
.btn.lg { padding: 17px 28px; font-size: 1.1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--indigo); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
.hint { display: block; font-weight: 400; color: var(--ink-3); font-size: .82rem; margin-top: 2px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-2);
  border-radius: 12px; padding: 12px 14px; min-height: 48px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 22%, transparent); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; font-size: .9rem; pointer-events: none; }
.money input { padding-left: 54px; }
.field { margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { margin: 0; padding: 10px 16px; border: 1.5px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); cursor: pointer;
  font-weight: 550; font-size: .93rem; color: var(--ink-2); }
.seg input:checked + label { border-color: var(--indigo); background: color-mix(in srgb, var(--indigo) 10%, var(--surface)); color: var(--indigo); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--indigo); flex: none; }

/* Hero: the sentence builder is the signature element */
.hero { padding: clamp(40px, 8vw, 96px) 0 48px; }
.hero h1 { max-width: 14ch; margin-bottom: 18px; }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 54ch; margin-bottom: 36px; }
.sentence { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(22px, 4vw, 40px);
  box-shadow: var(--shadow); }
.sentence-line { font-size: clamp(1.4rem, 3.1vw, 2.3rem); line-height: 1.55; font-variation-settings: "opsz" 60, "wdth" 90; font-weight: 450;
  color: var(--ink-2); letter-spacing: -0.015em; margin: 0 0 22px; max-width: none; }
.slot { position: relative; display: inline-block; vertical-align: baseline; }
.slot select, .slot input { font: inherit; font-weight: 700; color: var(--canopy); background: transparent; border: 0; border-bottom: 3px solid var(--gold);
  border-radius: 0; padding: 0 30px 2px 2px; min-height: 0; width: auto; max-width: 100%; letter-spacing: inherit; cursor: pointer;
  background-position: calc(100% - 12px) 58%, calc(100% - 6px) 58%; background-size: 6px 6px; }
.slot select:focus, .slot input:focus { box-shadow: none; border-bottom-color: var(--indigo); }
.slot input { cursor: text; padding-right: 2px; }
.sentence-act { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.or-describe { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line-2); }
.or-describe summary { cursor: pointer; font-weight: 650; color: var(--indigo); list-style: none; }
.or-describe summary::-webkit-details-marker { display: none; }
.or-describe summary::before { content: "+ "; }
.or-describe[open] summary::before { content: "− "; }
.describe-row { margin-top: 14px; display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { border: 1px solid var(--line-2); background: transparent; border-radius: var(--r-ctl); padding: 7px 14px; font: inherit; font-size: .9rem;
  color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--canopy); color: var(--canopy); }
.chip.on { background: var(--canopy); color: var(--paper); border-color: var(--canopy); }

/* Market strip */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 8px 0 0; }
.strip div { padding: 22px 18px 20px 0; }
.strip b { display: block; font-size: 2rem; font-variation-settings: "opsz" 72, "wdth" 80; color: var(--canopy); line-height: 1; font-variant-numeric: tabular-nums; }
.strip span { color: var(--ink-2); font-size: .9rem; }

section.block { padding: 72px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head p { margin: 0; }

/* Catalogue */
.catalogue { columns: 3 300px; column-gap: 40px; }
.cat { break-inside: avoid; margin: 0 0 30px; }
.cat h3 { font-size: 1.1rem; margin-bottom: 2px; }
.cat p { font-size: .88rem; color: var(--ink-3); margin-bottom: 8px; }
.cat ul { list-style: none; padding: 0; margin: 0; }
.cat li button { background: none; border: 0; padding: 6px 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; width: 100%;
  border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.cat li button:hover { color: var(--indigo); }
.cat li button span { color: var(--ink-3); font-size: .82rem; white-space: nowrap; }

/* Steps (true sequence) */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 28px; counter-reset: s; }
.steps li { list-style: none; counter-increment: s; border-top: 3px solid var(--canopy); padding-top: 16px; }
.steps li::before { content: counter(s); display: block; font-weight: 750; font-size: 1.6rem; color: var(--gold-ink); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .steps li::before { color: var(--gold); }
.steps { padding: 0; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Quote layout */
.quote { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; padding: 40px 0 80px; align-items: start; }
@media (max-width: 980px) { .quote { grid-template-columns: 1fr; } }
.progress { display: flex; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; flex-wrap: wrap; }
.progress li button { background: none; border: 0; font: inherit; padding: 6px 12px 6px 0; color: var(--ink-3); cursor: pointer; font-size: .92rem; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.progress li button i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: .78rem; }
.progress li.on button { color: var(--canopy); }
.progress li.on button i { background: var(--canopy); color: var(--paper); border-color: var(--canopy); }
.progress li.done button i { background: var(--ok-bg); border-color: var(--leaf); color: var(--leaf); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(20px, 3.5vw, 34px); }
.panel + .panel { margin-top: 18px; }
.panel-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.picker { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-height: 420px; }
.picker-cls { background: var(--surface-2); padding: 8px; overflow: auto; max-height: 520px; }
.picker-cls button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 10px; font: inherit; color: var(--ink-2); cursor: pointer; font-size: .93rem; }
.picker-cls button.on { background: var(--surface); color: var(--canopy); font-weight: 650; }
.picker-cls button em { font-style: normal; float: right; color: var(--indigo); font-weight: 700; }
.picker-list { padding: 8px 18px; overflow: auto; max-height: 520px; }
.prod { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; margin: 0; font-weight: 400; }
.prod:last-child { border-bottom: 0; }
.prod input { width: 20px; height: 20px; accent-color: var(--indigo); margin-top: 2px; }
.prod b { display: block; font-weight: 650; color: var(--ink); }
.prod span { color: var(--ink-2); font-size: .88rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 650; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); margin: 4px 4px 0 0; vertical-align: middle; }
.tag.req { background: var(--warn-bg); color: var(--warn); }
.tag.ok { background: var(--ok-bg); color: var(--leaf); }
.tag.tk { background: color-mix(in srgb, var(--indigo) 12%, var(--surface)); color: var(--indigo); }
@media (max-width: 680px) { .picker { grid-template-columns: 1fr; } .picker-cls { display: flex; overflow-x: auto; max-height: none; } .picker-cls button { white-space: nowrap; width: auto; } }
.picker-search { margin-bottom: 14px; }

.basket { list-style: none; padding: 0; margin: 0; }
.basket li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.basket li:first-child { padding-top: 0; }
.basket h4 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rm { background: none; border: 0; color: var(--ink-3); cursor: pointer; font: inherit; font-size: .85rem; text-decoration: underline; }

/* Premium meter (sticky) */
.meter { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); background: var(--canopy); color: var(--paper); border-radius: var(--r-panel); padding: 26px; }
:root[data-theme="dark"] .meter { background: #0A2A1F; color: var(--ink); border: 1px solid var(--line-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .meter { background: #0A2A1F; color: var(--ink); border: 1px solid var(--line-2); } }
.meter h3 { color: inherit; font-size: 1rem; font-weight: 600; opacity: .85; margin-bottom: 10px; }
.meter .big { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 750; font-variation-settings: "opsz" 96, "wdth" 80; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.meter .range { opacity: .85; margin-top: 8px; font-size: .95rem; font-variant-numeric: tabular-nums; }
.meter ul { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid rgba(255,255,255,.18); }
.meter li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .9rem; font-variant-numeric: tabular-nums; }
.meter li span:first-child { opacity: .85; }
.meter .tiny { color: inherit; opacity: .7; margin: 16px 0 0; }
.meter-empty { opacity: .8; }
@media (max-width: 980px) { .meter { position: static; } }

/* Results */
.res-head { padding: 40px 0 10px; }
.res-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .res-grid { grid-template-columns: 1fr; } }
.estimate { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(20px, 3.5vw, 32px); }
.estimate .total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin-bottom: 4px; }
.estimate .total b { font-size: clamp(2.4rem, 5vw, 3.6rem); font-variation-settings: "opsz" 96, "wdth" 78; color: var(--canopy); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.band { position: relative; height: 14px; border-radius: 99px; background: var(--surface-2); margin: 22px 0 8px; }
.band i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 45%, transparent), var(--gold)); }
.band em { position: absolute; top: -6px; width: 4px; height: 26px; border-radius: 2px; background: var(--canopy); transform: translateX(-2px); }
.band-l { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lines { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: .93rem; }
.lines th, .lines td { text-align: left; padding: 11px 8px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines th { font-weight: 600; color: var(--ink-3); font-size: .82rem; }
.lines td.r, .lines th.r { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.factors { font-size: .85rem; color: var(--ink-2); margin-top: 6px; }
.factors summary { cursor: pointer; color: var(--indigo); font-weight: 600; }
.factors ul { padding-left: 18px; margin: 8px 0 0; }
.alert { border-radius: 16px; padding: 16px 18px; background: var(--warn-bg); color: var(--ink); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.alert h4 { color: var(--warn); margin-bottom: 6px; }
.alert ul { margin: 6px 0 10px; padding-left: 18px; }
.alert.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--leaf) 30%, transparent); }
.alert.ok h4 { color: var(--leaf); }
.side-stack > * + * { margin-top: 18px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 2px; margin: 36px 0 0; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 14px; font: inherit; font-weight: 600; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--canopy); border-bottom-color: var(--gold); }
.tabs button span { font-weight: 500; color: var(--ink-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.role-about { margin: 16px 0 6px; color: var(--ink-2); font-size: .93rem; }

.ents { list-style: none; padding: 0; margin: 0; }
.ent { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ent-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 750; font-size: .95rem; color: var(--canopy); background: var(--surface-2); font-variation-settings: "wdth" 80; }
.ent h4 { margin: 0 0 2px; font-size: 1.04rem; color: var(--ink); }
.ent h4 button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.ent h4 button:hover { color: var(--indigo); text-decoration: underline; text-underline-offset: 3px; }
.ent-meta { color: var(--ink-2); font-size: .86rem; }
.ent-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ent-act .iconbtn { width: 38px; height: 38px; }
.iconbtn.on { background: var(--gold); border-color: var(--gold); color: #3a2a00; }
.fit { font-size: .78rem; font-weight: 700; color: var(--leaf); }
@media (max-width: 680px) { .ent { grid-template-columns: 40px minmax(0,1fr); } .ent-act { grid-column: 1 / -1; justify-content: flex-start; } }
.more { margin: 18px 0 0; }

/* Directory */
.dir-bar { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 8px; }
@media (max-width: 820px) { .dir-bar { grid-template-columns: 1fr 1fr; } .dir-bar > :first-child { grid-column: 1 / -1; } }
.dir-count { color: var(--ink-2); font-size: .92rem; margin: 6px 0 4px; }

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(6, 20, 14, .45); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--paper); overflow: auto;
  padding: calc(28px + env(safe-area-inset-top, 0px)) clamp(20px, 4vw, 40px) calc(40px + env(safe-area-inset-bottom, 0px)); box-shadow: -20px 0 60px rgba(0,0,0,.2); animation: slide .28s cubic-bezier(.2,.8,.2,1); }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-x { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 18px; }
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0; margin: 18px 0; font-size: .92rem; }
.dl dt, .dl dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.dl dt { color: var(--ink-3); font-weight: 550; padding-right: 12px; }
.dl dd { overflow-wrap: anywhere; }
@media (max-width: 520px) { .dl { grid-template-columns: 1fr; } .dl dt { border-bottom: 0; padding-bottom: 0; } }
.intel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-top: 22px; }
.intel h3 { display: flex; align-items: center; gap: 10px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 0 var(--leaf); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--leaf) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.skel { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sh 1.3s infinite linear; margin: 10px 0; }
@keyframes sh { to { background-position: -200% 0; } }
.intel ul { padding-left: 18px; }
.intel .src a { font-size: .85rem; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(120%); background: var(--canopy); color: var(--paper);
  padding: 12px 20px; border-radius: 99px; font-weight: 600; z-index: 80; transition: transform .25s; max-width: calc(100% - 32px); text-align: center; }
:root[data-theme="dark"] .toast { color: #0D1813; }
.toast.show { transform: translateX(-50%) translateY(0); }

.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 44px 0 60px; background: var(--surface-2); }
.foot-in { width: min(var(--wrap), 100% - 40px); margin-inline: auto; display: grid; grid-template-columns: 1fr 2fr auto; gap: 40px; }
.foot-brand { font-weight: 750; color: var(--canopy); font-size: 1.1rem; margin-bottom: 4px; }
.foot-legal p { font-size: .82rem; color: var(--ink-2); }
.foot-links { display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
@media (max-width: 820px) { .foot-in { grid-template-columns: 1fr; } }

.page-head { padding: 48px 0 8px; }
.prose { max-width: 70ch; }
.prose h3 { margin-top: 1.6em; }
.req-list { list-style: none; padding: 0; margin: 0; }
.req-list li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.empty { padding: 40px 0; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media print {
  .top, .foot, .tabs, .ent-act, .btn, .drawer, .toast, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .estimate, .panel { border: 1px solid #999; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.toast { visibility: hidden; }
.toast.show { visibility: visible; }
.alert.info { background: var(--surface); border-color: var(--line); }
.alert.info h4 { color: var(--canopy); }
.slot { max-width: 100%; }
.slot select { max-width: 100%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 48px; align-items: end; margin-bottom: 36px; }
.hero-top .lede { margin-bottom: 0; }
.hero h1 { max-width: 15ch; }
.preview { border-left: 3px solid var(--gold); padding: 4px 0 4px 22px; }
.preview h3 { font-size: 1.05rem; margin-bottom: 10px; }
.pv { list-style: none; padding: 0; margin: 0; }
.pv li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .93rem; color: var(--ink-2); }
.pv li b { color: var(--canopy); font-variant-numeric: tabular-nums; }
.pv-req { font-size: .88rem; margin: 14px 0 0; color: var(--ink-2); }
.pv-req b { color: var(--warn); font-weight: 650; }
@media (max-width: 900px) { .hero-top { grid-template-columns: 1fr; gap: 28px; } .preview { order: 2; } }
@media (max-width: 600px) { .preview { display: none; } }
main:focus { outline: none; }
@media (max-width: 420px) { .sentence-line { font-size: 1.25rem; } }
.resume { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface-2); border-radius: 12px; padding: 10px 16px; margin: -8px 0 18px; font-size: .92rem; color: var(--ink-2); }
.pickbtn { background: var(--surface); color: var(--indigo); border-color: var(--indigo); }
.pickbtn:hover { background: color-mix(in srgb, var(--indigo) 10%, var(--surface)); }
.pickbtn.on { background: var(--indigo); color: #fff; }
:root[data-theme="dark"] .pickbtn.on { color: #0D1813; }
.ent.picked { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%); }
.picks { list-style: none; padding: 0; margin: 0 0 14px; }
.picks li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; font-weight: 600; }
.tray { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 20; margin-top: 18px; }
.tray-in { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: var(--surface); border: 1.5px solid var(--indigo); border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow); }
.tray-in > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-list .rm { align-self: start; }
.toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.grid2 label .hint, .grid3 label .hint { display: inline; margin: 0 0 0 8px; }
