:root {
  color-scheme: light;
  --ink: #102b2d;
  --muted: #647274;
  --soft: #5e6b6b;
  --line: #dde5e8;
  --line-strong: #c8d5cf;
  --paper: #fff;
  --canvas: #eef1f5;
  --deep: #0c2427;
  --teal: #08736f;
  --teal-soft: #dcefea;
  --teal-pale: #eff8f5;
  --coral: #c95f49;
  --coral-soft: #f9e6e0;
  --amber: #82520e;
  --amber-soft: #faefd8;
  --red: #a4424d;
  --red-soft: #f8e4e7;
  --shadow: 0 18px 50px rgba(16, 43, 45, 0.08);
  --sidebar: 248px;
  /* No webfont is served: every authenticated handler sets font-src 'none' and
     the repository holds no @font-face and no font file. The stack therefore
     names only families the platform already has, so the product renders in the
     system UI font by decision rather than falling to Arial by accident. */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-family: var(--font-sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.5; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; color: #fff; background: var(--deep); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sr-only, .sr-only-focusable:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { position: sticky; z-index: 30; top: 0; height: 66px; display: grid; grid-template-columns: var(--sidebar) 1fr auto; align-items: center; padding: 0 24px; color: #dcebea; background: rgba(12, 36, 39, 0.97); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; color: #fff; text-decoration: none; font-size: 18px; font-weight: 750; letter-spacing: -.03em; }
.brand-mark { width: 32px; height: 32px; display: grid; align-content: center; gap: 3px; padding: 7px; background: linear-gradient(145deg,#2caf9f,#08736f); border-radius: 9px; box-shadow: 0 7px 18px rgba(0,0,0,.18); }
.brand-mark i { display: block; height: 2px; background: #fff; border-radius: 999px; transform: rotate(-8deg); }
.brand-mark i:nth-child(2) { width: 82%; justify-self: end; opacity: .86; }
.brand-mark i:nth-child(3) { width: 62%; justify-self: end; opacity: .7; }
.topnav { display: flex; align-self: stretch; align-items: center; gap: 8px; }
.topnav a { position: relative; height: 100%; display: grid; place-items: center; padding: 0 15px; color: #9eb5b4; text-decoration: none; font-size: 13px; font-weight: 600; }
.topnav a:hover, .topnav a.is-current { color: #fff; }
.topnav a.is-current::after { content: ""; position: absolute; right: 15px; bottom: 0; left: 15px; height: 2px; background: #5bc5b9; border-radius: 999px 999px 0 0; }
.topbar-status { display: flex; align-items: center; gap: 8px; color: #abc0bf; font-size: 12px; }
.health-dot { width: 8px; height: 8px; background: #55c5a2; border-radius: 50%; box-shadow: 0 0 0 4px rgba(85,197,162,.12); }

.app-shell { min-height: calc(100vh - 66px); display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
.sidebar { position: sticky; top: 66px; height: calc(100vh - 66px); display: flex; flex-direction: column; padding: 28px 20px 20px; background: #f5f7f3; border-right: 1px solid var(--line); overflow-y: auto; }
.project-identity { padding: 0 8px 24px; border-bottom: 1px solid var(--line); }
.project-identity strong { display: block; margin: 5px 0 3px; font-size: 16px; line-height: 1.25; letter-spacing: -.02em; }
.project-identity small { color: var(--muted); }
.overline { margin: 0; color: var(--teal); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.side-nav { display: grid; gap: 4px; padding: 22px 0; }
.side-nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; color: #526466; text-decoration: none; border-radius: 9px; font-weight: 600; }
.side-nav a:hover { color: var(--teal); background: #e5eeea; }
.side-nav span { color: #9aabaa; font-size: 11px; letter-spacing: .08em; }
.side-nav i { font-style: normal; }
.sidebar-boundary { margin-top: auto; padding: 14px; display: flex; gap: 10px; color: #496164; background: #e5eeea; border-radius: 10px; font-size: 11px; line-height: 1.45; }
.sidebar-boundary > span { width: 19px; height: 19px; flex: none; display: grid; place-items: center; color: #fff; background: var(--teal); border-radius: 50%; font-size: 11px; font-weight: 700; }
.sidebar-boundary p { margin: 0; }

.workspace { width: min(1240px,100%); margin: 0 auto; padding: 40px 46px 90px; }
.hero-panel, .content-section { scroll-margin-top: 88px; }
.hero-panel { padding: 34px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.hero-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.hero-heading h1 { max-width: 760px; margin: 8px 0 7px; font-size: clamp(28px,3vw,43px); line-height: 1.08; letter-spacing: -.045em; }
.hero-summary { max-width: 760px; margin: 0; color: var(--muted); font-size: 15px; }
.review-state { flex: none; padding: 8px 11px; color: var(--amber); background: var(--amber-soft); border: 1px solid #ead7ae; border-radius: 999px; font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.trust-banner { margin-top: 28px; padding: 16px 18px; display: flex; gap: 13px; color: #365153; background: linear-gradient(90deg,#e5f2ed,#eef4f1); border-left: 3px solid var(--teal); border-radius: 4px 11px 11px 4px; }
.trust-icon { width: 23px; height: 23px; flex: none; display: grid; place-items: center; color: #fff; background: var(--teal); border-radius: 50%; font-size: 12px; font-weight: 800; }
.trust-banner strong { font-size: 12px; }
.trust-banner p { margin: 2px 0 0; font-size: 12px; }
.metric-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.metric { min-height: 116px; padding: 17px; display: flex; flex-direction: column; justify-content: space-between; background: #f5f7f3; border: 1px solid #dfe8e1; border-radius: 12px; }
.metric span { color: var(--muted); font-size: 11px; font-weight: 650; }
.metric strong { display: block; font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.metric small { color: var(--soft); font-size: 11px; }
.metric.is-alert strong { color: var(--amber); }
.metric.is-blocked strong { color: var(--red); font-size: 18px; }

.content-section { padding-top: 68px; }
.section-heading { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading h2 { margin: 5px 0 0; font-size: clamp(23px,2.5vw,32px); line-height: 1.15; letter-spacing: -.035em; }
.section-heading > p { max-width: 420px; margin: 0; color: var(--muted); font-size: 12px; }
.split-grid { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(320px,.82fr); gap: 16px; }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(16,43,45,.04); overflow: hidden; }
.surface-heading { min-height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.surface-heading h3 { margin: 0; font-size: 13px; }
.surface-heading span { color: var(--soft); font-size: 11px; }
.fact-list { display: grid; }
.fact-row { padding: 15px 20px; display: grid; grid-template-columns: minmax(130px,.75fr) minmax(0,1.25fr) auto; align-items: center; gap: 18px; border-top: 1px solid #e8ede9; }
.fact-row:first-child { border-top: 0; }
.fact-key { color: var(--muted); font-size: 11px; font-weight: 650; }
.fact-value { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 620; }
.fact-note { display: block; margin-top: 3px; color: var(--soft); font-size: 11px; font-weight: 450; }
.fact-state { padding: 4px 7px; color: var(--teal); background: var(--teal-soft); border-radius: 999px; font-size: 11px; font-weight: 750; text-transform: uppercase; }
.fact-state.unknown { color: var(--red); background: var(--red-soft); }
.fact-state.asserted { color: var(--amber); background: var(--amber-soft); }
.jurisdiction-list { margin: 0; padding: 12px 20px 17px; list-style: none; counter-reset: jurisdiction; }
.jurisdiction-item { position: relative; min-height: 53px; padding: 10px 0 10px 36px; border-bottom: 1px solid #e8ede9; }
.jurisdiction-item:last-child { border-bottom: 0; }
.jurisdiction-item::before { counter-increment: jurisdiction; content: counter(jurisdiction); position: absolute; top: 12px; left: 0; width: 22px; height: 22px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 7px; font-size: 11px; font-weight: 750; }
.jurisdiction-item strong { display: block; font-size: 11px; }
.jurisdiction-item span { color: var(--muted); font-size: 11px; }
.resolution-state { float: right; color: var(--teal); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.jurisdiction-trace { margin-top: 16px; }
.jurisdiction-trace-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.jurisdiction-trace-grid > div { min-width: 0; padding: 18px 20px 20px; }
.jurisdiction-trace-grid > div + div { border-left: 1px solid var(--line); }
.trace-label { margin: 0 0 10px; color: var(--soft); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.authority-decision-list, .workflow-gate-list { display: grid; gap: 8px; }
.authority-decision, .workflow-gate { padding: 13px 14px; background: #f5f7f3; border: 1px solid #e2e9e3; border-radius: 10px; }
.authority-decision-heading, .workflow-gate-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.authority-decision-heading strong, .workflow-gate-heading strong { display: block; font-size: 11px; }
.authority-decision-heading small, .workflow-gate > small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.decision-state { flex: none; padding: 4px 6px; color: var(--teal); background: var(--teal-soft); border-radius: 999px; font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.decision-state.verification_required { color: var(--amber); background: var(--amber-soft); }
.decision-state.omitted { color: var(--muted); background: #e8ede9; }
.decision-rule { display: block; margin-top: 8px; overflow-wrap: anywhere; color: var(--teal); font-size: 11px; }
.decision-advice, .workflow-gate p { margin: 7px 0 0; color: #405657; font-size: 11px; }
.decision-reason { display: block; margin-top: 7px; overflow-wrap: anywhere; color: var(--soft); font-size: 11px; }

.filter-row { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.filter-button { min-height: 34px; padding: 0 11px; color: #596a6b; background: #f5f7f3; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 11px; font-weight: 680; }
.filter-button span { margin-left: 5px; color: var(--soft); }
.filter-button[aria-pressed="true"] { color: #fff; background: var(--deep); border-color: var(--deep); }
.filter-button[aria-pressed="true"] span { color: #b8cecd; }
.finding-list { display: grid; gap: 10px; }
.finding-card { padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 12px; box-shadow: 0 8px 24px rgba(16,43,45,.035); }
.finding-card[data-state="verification_required"] { border-left-color: var(--amber); }
.finding-card[data-state="unknown"] { border-left-color: var(--red); }
.finding-card[data-state="potential_conflict"] { border-left-color: var(--coral); }
.finding-top { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; }
.finding-code { margin: 0 0 5px; color: var(--soft); font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; }
.finding-card h3 { max-width: 840px; margin: 0; font-size: 15px; line-height: 1.35; letter-spacing: -.012em; }
.state-badge { align-self: start; padding: 6px 9px; color: #176c60; background: var(--teal-soft); border-radius: 999px; font-size: 11px; font-weight: 750; text-transform: uppercase; white-space: nowrap; }
.state-badge.verification_required { color: var(--amber); background: var(--amber-soft); }
.state-badge.unknown { color: var(--red); background: var(--red-soft); }
.state-badge.potential_conflict { color: var(--coral); background: var(--coral-soft); }
.finding-determination { margin-top: 13px; padding-top: 13px; display: flex; flex-wrap: wrap; gap: 7px 22px; color: var(--muted); border-top: 1px solid #e8ede9; font-size: 11px; }
.finding-determination strong { color: var(--ink); }
.dimension-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); border: 1px solid #e2e9e3; border-radius: 9px; overflow: hidden; }
.dimension { min-width: 0; padding: 9px; background: #f5f7f3; border-left: 1px solid #e2e9e3; }
.dimension:first-child { border-left: 0; }
.dimension small { display: block; color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.dimension strong { display: block; margin-top: 3px; overflow: hidden; color: #4f6263; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.verification-box { margin-top: 13px; padding: 12px 14px; color: #765116; background: #fcf3e2; border-radius: 9px; }
.verification-box strong { display: block; margin-bottom: 3px; font-size: 11px; }
.verification-box p { margin: 0; font-size: 11px; }
.verification-box p + p { margin-top: 5px; }
.evidence-chips { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.evidence-chip { min-height: 29px; padding: 0 9px; color: var(--teal); background: var(--teal-pale); border: 1px solid #cfe3dd; border-radius: 7px; cursor: pointer; font-size: 11px; font-family: var(--font-mono); }
.evidence-chip:hover { background: var(--teal-soft); }

.plan-panel { padding: 24px; background: var(--deep); border-radius: 15px; box-shadow: var(--shadow); }
.plan-status-row { display: grid; grid-template-columns: minmax(0,1fr) 54px minmax(0,1fr); align-items: stretch; gap: 12px; }
.plan-card { padding: 18px; color: #e8f2f1; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.12); border-radius: 11px; }
.plan-card small { color: #88aaa9; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.plan-card strong { display: block; margin-top: 6px; font-size: 14px; }
.plan-card span { display: block; margin-top: 4px; color: #a7bfbd; font-size: 11px; }
.plan-card.is-empty { opacity: .72; border-style: dashed; }
.plan-arrow { display: grid; place-items: center; color: #6ebbb3; font-size: 20px; }
.plan-result { margin-top: 12px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #b8cecd; background: rgba(0,0,0,.13); border-radius: 10px; font-size: 11px; }
.plan-result strong { color: #fff; font-size: 12px; }
.plan-limitations { margin: 14px 0 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.plan-limitations li { padding-left: 17px; position: relative; color: #9eb5b4; font-size: 11px; }
.plan-limitations li::before { content: "•"; position: absolute; left: 2px; color: #64bdb4; }

.evidence-heading { align-items: center; }
.search-field input { width: min(320px,38vw); height: 40px; padding: 0 13px; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 9px; outline: none; font-size: 11px; }
.search-field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,115,111,.12); }
.evidence-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.evidence-row { min-width: 0; padding: 17px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 12px; align-items: start; text-align: left; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.evidence-row:hover { border-color: #a8c8c1; box-shadow: 0 8px 22px rgba(16,43,45,.05); }
.evidence-type-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 9px; font-size: 12px; font-weight: 800; }
.evidence-row strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-row small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-family: var(--font-mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-row > span:last-child { color: var(--teal); font-size: 18px; }
.empty-state { padding: 24px; color: var(--muted); text-align: center; background: var(--paper); border: 1px dashed var(--line-strong); border-radius: 11px; }
.blocker-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.blocker { min-height: 96px; padding: 16px 18px; display: flex; gap: 12px; color: #6b3840; background: #fbeced; border: 1px solid #efd6da; border-radius: 11px; font-size: 11px; }
.blocker span { width: 23px; height: 23px; flex: none; display: grid; place-items: center; color: #fff; background: var(--red); border-radius: 7px; font-size: 11px; font-weight: 750; }
.blocker p { margin: 1px 0 0; }

.evidence-drawer { position: fixed; z-index: 60; inset: 0; pointer-events: none; visibility: hidden; }
.evidence-drawer.is-open { pointer-events: auto; visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(5,22,24,.44); opacity: 0; transition: opacity .2s ease; }
.drawer-panel { position: absolute; top: 0; right: 0; width: min(520px,100%); height: 100%; padding: 25px; background: var(--paper); box-shadow: -25px 0 70px rgba(5,22,24,.2); transform: translateX(100%); transition: transform .24s ease; overflow-y: auto; }
.evidence-drawer.is-open .drawer-backdrop { opacity: 1; }
.evidence-drawer.is-open .drawer-panel { transform: translateX(0); }
.drawer-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 5px 0 0; font-size: 20px; overflow-wrap: anywhere; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); background: #edf1ed; border: 0; border-radius: 9px; cursor: pointer; font-size: 23px; }
.drawer-content { padding: 20px 0; display: grid; gap: 14px; }
.detail-group { padding: 15px; background: #f5f7f3; border: 1px solid #e2e9e3; border-radius: 10px; }
.detail-group h3 { margin: 0 0 10px; color: var(--muted); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.detail-row { padding: 7px 0; display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 12px; border-top: 1px solid #e2e9e3; }
.detail-row:first-of-type { border-top: 0; }
.detail-row span { color: var(--muted); font-size: 11px; }
.detail-row code { overflow-wrap: anywhere; color: var(--ink); font-family: var(--font-mono); font-size: 11px; }
.load-error { position: fixed; z-index: 80; right: 20px; bottom: 20px; max-width: 420px; padding: 18px; color: #6f3039; background: #fff1f2; border: 1px solid #e7bdc2; border-radius: 12px; box-shadow: var(--shadow); }
.load-error p { margin: 4px 0 0; font-size: 12px; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

@media (max-width: 1040px) {
  :root { --sidebar: 210px; }
  .workspace { padding-inline: 28px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dimension-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dimension:nth-child(4) { border-left: 0; border-top: 1px solid #e2e9e3; }
  .dimension:nth-child(n+4) { border-top: 1px solid #e2e9e3; }
}

@media (max-width: 780px) {
  .topbar { height: auto; min-height: 62px; grid-template-columns: 1fr auto; padding: 10px 16px; }
  .topnav { grid-column: 1 / -1; order: 3; overflow-x: auto; }
  .topnav a { min-height: 38px; height: auto; }
  .topbar-status { font-size: 0; }
  .app-shell { display: block; }
  .sidebar { position: static; width: auto; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .project-identity, .sidebar-boundary { display: none; }
  .side-nav { padding: 0; display: flex; overflow-x: auto; }
  .side-nav a { flex: none; }
  .workspace { padding: 24px 16px 70px; }
  .hero-panel { padding: 22px; }
  .hero-heading, .section-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .split-grid, .evidence-list, .blocker-list { grid-template-columns: 1fr; }
  .jurisdiction-trace-grid { grid-template-columns: 1fr; }
  .jurisdiction-trace-grid > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .fact-row { grid-template-columns: 1fr auto; gap: 7px 12px; }
  .fact-value { grid-column: 1 / -1; grid-row: 2; }
  .finding-top { grid-template-columns: 1fr; gap: 9px; }
  .state-badge { width: max-content; }
  .plan-status-row { grid-template-columns: 1fr; }
  .plan-arrow { transform: rotate(90deg); }
  .search-field, .search-field input { width: 100%; }
}

/* Authenticated intake chrome preserves the map-first prototype as the product UI. */
.intake-page {
  --ds-ink: #17343a;
  --ds-ink-soft: #31575a;
  --ds-primary: #0b6f6c;
  --ds-primary-bright: #15958d;
  --ds-mint: #dcefea;
  --ds-paper: #fff;
  --ds-sand: #eef1f5;
  --ds-peach: #f8e8df;
  --ds-positive: #1c9a6c;
  --ds-warning: #b57421;
  --ds-negative: #b55665;
  --ds-line: rgba(23, 52, 58, .13);
  --ds-muted: #647477;
  --ds-radius-sm: 8px;
  --ds-radius-md: 12px;
  --ds-radius-lg: 24px;
  /* One surface recipe for dashboard tiles, project cards and detail panels. */
  --ds-card-radius: 28px;
  --ds-card-rim: rgba(255, 255, 255, .68);
  --ds-card-shadow: 0 2px 0 rgba(49, 87, 90, .07), 0 10px 28px rgba(32, 56, 72, .045);
  --ds-shadow-sm: 0 2px 3px rgba(32, 56, 72, .025), 0 12px 32px rgba(32, 56, 72, .045);
  --ds-shadow-md: 0 14px 36px rgba(32, 56, 72, .08);
  min-height: 100vh;
  color: var(--ds-ink);
  background: var(--ds-sand);
  font-family: var(--font-sans);
}

/* Selectable choice tile: Untitled UI radio-card on Parpoli mineral tokens. */
.ds-choice-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.ds-choice-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.ds-choice-legend-label {
  margin: 0;
  padding: 0;
  color: var(--ds-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.ds-choice-field > legend {
  float: none;
  width: 100%;
  padding: 0;
  margin: 0;
  color: var(--ds-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.ds-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ds-choice-tile {
  min-height: 56px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  color: var(--ds-ink);
  background: color-mix(in srgb, var(--ds-mint) 52%, var(--ds-paper));
  border: 1px solid color-mix(in srgb, var(--ds-primary) 24%, var(--ds-line));
  border-radius: 12px;
  cursor: pointer;
  font: 550 14px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: left;
  text-wrap: pretty;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.ds-choice-tile:hover {
  background: color-mix(in srgb, var(--ds-mint) 78%, var(--ds-paper));
  border-color: color-mix(in srgb, var(--ds-primary) 42%, var(--ds-line));
}
.ds-choice-tile.is-active,
.ds-choice-tile[aria-pressed="true"] {
  background: color-mix(in srgb, var(--ds-mint) 88%, var(--ds-paper));
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 1px var(--ds-primary);
}

/* Shared application frame: one horizontal header, one centered working area. */
.topbar.prototype-product-nav {
  width: 100%; min-height: 64px; height: auto; margin: 0;
  padding: 8px max(24px, calc((100vw - 1200px) / 2));
  display: flex; align-items: center; gap: 32px;
  position: sticky; z-index: 30; top: 0; left: auto;
  color: var(--ds-ink); background: rgba(248, 250, 251, .96);
  border: 0; border-bottom: 1px solid var(--line); box-shadow: none;
  backdrop-filter: blur(16px);
}
.prototype-product-nav .brand { margin: 0; gap: 8px; color: var(--ds-ink); font-size: 21px; font-weight: 750; letter-spacing: -.06em; }
.brand .parpoli-mark { display: block; width: 32px; height: 32px; padding: 0; flex: none; background: none; border-radius: 12px; box-shadow: none; }
.prototype-product-nav .topnav { display: flex; width: auto; height: auto; align-self: center; gap: 8px; overflow: visible; }
.prototype-product-nav .topnav a { min-height: 44px; padding: 10px 14px; display: inline-flex; align-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 12px; font-size: 13px; font-weight: 650; text-decoration: none; }
.prototype-product-nav .topnav a::after { display: none; }
.prototype-product-nav .topnav a:hover, .prototype-product-nav .topnav a.is-current { color: var(--teal); background: var(--teal-soft); }
.prototype-session-actions { margin: 0 0 0 auto; display: flex; align-items: center; gap: 8px; }
.prototype-page { width: min(1280px, calc(100% - 64px)); min-height: calc(100vh - 80px); margin: 0 auto; padding: 40px 0 96px; }
.product-rail :is(a, button, summary, input, select):focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.product-rail [id] { scroll-margin-top: 100px; }

.candidate-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.creation-journey {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.product-crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: color-mix(in srgb, var(--ds-muted) 88%, var(--ds-ink));
  font: 500 12px/1.35 ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.product-crumbs a {
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
}

.product-crumbs a:hover { color: var(--ds-ink); text-decoration: underline; }
.product-crumbs-sep { color: color-mix(in srgb, var(--ds-muted) 70%, var(--ds-paper)); font-size: 13px; }
.product-crumbs [aria-current="page"] { color: var(--ds-ink); font-weight: 650; }

.journey-stepper { display: grid; gap: 8px; }
.journey-stepper-compact {
  display: none;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--ds-muted);
  font: 650 11px/1.35 ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.journey-stepper-compact strong { color: var(--ds-ink); font-size: 13px; }

.journey-stepper-list {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.journey-stepper-item {
  display: inline-flex;
  align-items: center;
  color: color-mix(in srgb, var(--ds-muted) 82%, var(--ds-paper));
  font: 600 12px/1.3 ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  white-space: nowrap;
}

.journey-stepper-item:not(:last-child)::after {
  margin: 0 9px;
  color: color-mix(in srgb, var(--ds-muted) 62%, var(--ds-paper));
  content: "›";
  font-weight: 500;
}

.journey-stepper-item.is-complete { color: var(--ds-ink-soft); }
.journey-stepper-item.is-current { color: var(--ds-ink); font-weight: 750; }

.journey-stepper-bar {
  height: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ds-line) 80%, var(--ds-paper));
  border-radius: 99px;
}

.journey-stepper-bar i {
  display: block;
  height: 100%;
  background: var(--ds-primary);
  border-radius: inherit;
}

@media (max-width: 720px) {
  .journey-stepper-list { display: none; }
  .journey-stepper-compact { display: flex; }
}

@media (max-width: 920px) {
  .candidate-mount { grid-row: 2; }
}

@media (max-width: 780px) {
  .topbar.prototype-product-nav { min-height: 60px; padding: 8px 18px; gap: 16px; }
  .prototype-product-nav .brand { font-size: 23px; }
  .prototype-product-nav .topnav { display: none; }
  .prototype-page { width: calc(100% - 36px); min-height: auto; margin: 0 auto; padding: 28px 0 64px; }
}

@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 102px; padding: 14px; }
  .dimension-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dimension:nth-child(odd) { border-left: 0; }
  .dimension:nth-child(n+3) { border-top: 1px solid #e2e9e3; }
  .content-section { padding-top: 52px; }
  .drawer-panel { padding: 20px; }
  .detail-row { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Stable page shells use the shared card surface before the application mounts. */
.sd-page-state{color:var(--foreground,#18272b);width:100%;min-width:0}
.sd-load-heading{margin-bottom:32px}.sd-load-eyebrow{display:block;font-size:11px;font-weight:650;letter-spacing:.1em;text-transform:uppercase;color:var(--muted,#647274);margin-bottom:12px}
.sd-load-heading h1,.sd-page-error h1{font-size:clamp(25px,3vw,32px);line-height:1.2;letter-spacing:-.035em;margin:0 0 14px;font-weight:650}
.sd-load-heading p{display:flex;align-items:center;gap:10px;color:var(--muted,#647274);font-size:14px;line-height:1.6;margin:0}
.sd-load-spinner{width:17px;height:17px;flex:none;border:2px solid var(--border,#e2e7ea);border-top-color:var(--accent,#08736f);border-radius:50%;animation:sd-load-turn .9s linear infinite}
.sd-load-layout{display:grid;grid-template-columns:minmax(0,760px) minmax(220px,1fr);gap:40px;align-items:start}
.sd-load-card{display:flex;flex-direction:column;gap:22px;background:#fff;border:1px solid var(--border,#e2e7ea);border-radius:16px;padding:30px;min-height:410px;box-shadow:0 2px 4px #18272b03}
.sd-load-bone{display:block;background:var(--surface-secondary,#edf0f2);border-radius:7px;animation:sd-load-pulse 1.8s ease-in-out infinite}
.sd-load-label{width:22%;height:10px}.sd-load-title{width:62%;height:23px}.sd-load-line{width:100%;height:12px}.sd-load-line+.sd-load-line{width:76%}.sd-load-field{height:48px;width:100%}.sd-load-block{height:130px;width:100%;border-radius:12px}.sd-load-action{height:42px;width:164px;margin-top:10px}.sd-load-dot{width:30px;height:30px;border-radius:9px;flex:none}
.sd-load-aside{padding:24px 0}.sd-load-aside>.sd-load-title{width:45%;height:16px;margin-bottom:32px}.sd-load-step{display:flex;align-items:center;gap:16px;margin-bottom:30px}.sd-load-step>div{display:grid;gap:9px;width:60%}
.sd-load-layout--dashboard{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.sd-load-layout--dashboard .sd-load-card{min-height:330px}.sd-load-layout--dashboard .sd-load-block{height:60px}
.sd-load-layout--detail,.sd-load-layout--results,.sd-load-layout--review{grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr)}
.sd-load-layout--detail .sd-load-block,.sd-load-layout--results .sd-load-block{height:200px}
/* Native details remains usable when the complete module graph fails. */
.sd-load-slow{display:block;max-width:760px;margin-top:24px;color:var(--muted,#647274);font-size:14px;line-height:1.6}
.sd-load-slow summary{cursor:pointer;min-height:44px;align-content:center;width:fit-content;text-decoration:underline;text-underline-offset:4px}
.sd-load-slow[open]{padding:20px 24px;border:1px solid var(--border,#e2e7ea);border-radius:12px;background:#fff}
.sd-load-slow p,.sd-page-error p{font-size:14px;line-height:1.65;color:var(--muted,#647274);max-width:65ch}.sd-page-state-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:22px}
.sd-page-error{max-width:760px;margin:32px auto;padding:32px;border:1px solid var(--border,#e2e7ea);border-radius:16px;background:#fff;box-shadow:0 2px 4px #18272b03}
@keyframes sd-load-pulse{50%{opacity:.45}}@keyframes sd-load-turn{to{transform:rotate(360deg)}}
@media(max-width:760px){.sd-load-layout,.sd-load-layout--dashboard,.sd-load-layout--detail,.sd-load-layout--results,.sd-load-layout--review{grid-template-columns:minmax(0,1fr);gap:20px}.sd-load-aside{display:none}.sd-load-card{padding:24px;min-height:380px}.sd-load-heading{margin-bottom:26px}.sd-load-layout--dashboard .sd-load-card:nth-child(n+2){display:none}.sd-page-error{padding:24px;margin:16px auto}.sd-page-state-actions a{white-space:normal;text-align:center}}
@media(prefers-reduced-motion:reduce){.sd-load-bone,.sd-load-spinner{animation:none}}

/* Match the unknown-count shell to the final saved map-results card. */
.sd-map-loading-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.sd-map-overview[data-summary-loading] .sd-map-gauge{color:#ffffff2b}
.sd-map-overview[data-summary-loading] .skeleton{background:#ffffff26;min-height:12px;border-radius:6px}
.sd-map-loading-metric{display:grid;gap:10px;padding:15px 13px;border:1px solid #ffffff20;border-radius:12px;margin-bottom:8px}
.sd-map-loading-metric .skeleton:first-child{height:17px;width:80%}.sd-map-loading-metric .skeleton:last-child{width:60%;height:12px}
.sd-map-loading-short{width:65%;height:14px;margin:12px 0}
.sd-map-loading-action{width:135px;height:24px}.sd-map-loading-note{width:92%;height:18px}.sd-map-loading-topic{width:70%;height:30px}
/* display:contents on mobile must not make a loading card shrink to its text. */
.product-rail .sd-map-overview.card{width:100%}

/* One CTA hierarchy for actions and action links; component priority is explicit.
   These are not navigation menus, filters, clickable rows or disclosures. */
.product-rail .sd-product-action[data-action-tier]{display:inline-flex;align-items:center;justify-content:center;gap:9px;box-sizing:border-box;max-width:100%;min-height:44px;height:auto;padding:10px 18px;border:1px solid transparent;border-radius:999px;font:inherit;font-size:13px;font-weight:600;line-height:1.5;text-align:center;white-space:normal;text-decoration:none;cursor:pointer;box-shadow:none;flex-shrink:0}
.product-rail .sd-product-action[data-action-tier=primary]{background:var(--accent,#08736f);border-color:var(--accent,#08736f);color:var(--accent-foreground,#fff)}
.product-rail .sd-product-action[data-action-tier=secondary]{background:#e8f2f1;border-color:#628d8b;color:#145c59}
.product-rail .sd-product-action[data-action-tier=tertiary]{background:transparent;border-color:transparent;color:var(--accent,#08736f);text-decoration:none}
.product-rail .sd-product-action[data-action-tier=danger]{background:#a4424d;border-color:#a4424d;color:#fff}
.product-rail .sd-product-action[data-action-tier=primary]:not([data-disabled]):not(:disabled):hover{background:#075f5c;border-color:#075f5c;color:#fff}
.product-rail .sd-product-action[data-action-tier=secondary]:not([data-disabled]):not(:disabled):hover{background:#d7e8e6;border-color:#427c78;color:#104b49}
.product-rail .sd-product-action[data-action-tier=tertiary]:not([data-disabled]):not(:disabled):hover{background:#e8f2f1;color:#104b49}
.product-rail .sd-product-action[data-action-tier=danger]:not([data-disabled]):not(:disabled):hover{background:#8a303c;border-color:#8a303c;color:#fff}
.product-rail .sd-product-action[data-action-tier]:is([data-disabled],:disabled,[aria-disabled=true]){opacity:.45;cursor:default;pointer-events:none}
.product-rail .sd-product-action[data-action-tier]:is(:focus-visible,[data-focus-visible=true]){outline:2px solid #647274;outline-offset:3px}
.sd-product-action svg{width:18px;height:18px;flex-shrink:0}
/* Size is independent of priority and applies equally to command and link. */
html .product-rail .sd-product-action[data-action-tier][data-action-size=sm]{min-height:32px;padding:5px 12px;font-size:12px;gap:6px}
html .product-rail .sd-product-action[data-action-tier][data-action-size=sm] svg{width:16px;height:16px}
@media(any-pointer:coarse){html .product-rail .sd-product-action[data-action-tier][data-action-size=sm]{min-height:44px}}
.sd-document-progress[data-compact] .chip{max-width:100%}

/* Preserved native intake nodes keep their existing handlers and command locks. */
.product-rail .sd-progressive-workspace :is(.primary-action,.secondary-action,.progressive-secondary-action){border-radius:999px;min-height:44px}
.product-rail .sd-progressive-workspace .primary-action{background:#08736f;border:1px solid #08736f;color:#fff}
.product-rail .sd-progressive-workspace :is(.secondary-action,.progressive-secondary-action){background:#e8f2f1;border:1px solid #628d8b;color:#145c59}
/* Stable scope information replaces an asynchronously mounted dead topic card. */
.sd-assessment-scope{display:flex;align-items:flex-start;gap:9px;padding:2px 4px;color:var(--muted);font-size:12px;line-height:1.6}
.sd-assessment-scope>svg{width:16px;height:16px;margin-top:2px;flex-shrink:0}.sd-assessment-scope p{margin:0}.sd-assessment-scope .link{font-size:inherit;color:var(--accent);text-decoration:underline;text-underline-offset:3px}
/* White is an explicit inverse treatment on a dark surface, never a default. */
.product-rail .sd-product-action[data-action-tier=primary][data-action-tone=inverse]{background:#fff;border-color:#fff;color:#133b39}
.product-rail .sd-product-action[data-action-tier=secondary][data-action-tone=inverse]{background:#ffffff12;border-color:#a7c9c6;color:#fff}
.product-rail .sd-product-action[data-action-tier=primary][data-action-tone=inverse]:not([data-disabled]):hover{background:#e8f2f1;border-color:#e8f2f1;color:#133b39}
.product-rail .sd-product-action[data-action-tier=secondary][data-action-tone=inverse]:not([data-disabled]):hover{background:#ffffff20;border-color:#fff;color:#fff}
@media(max-width:780px){.sd-assessment-scope{order:1}.sd-journey-summary:has(.sd-summary-reload){order:0}}

/* Approved 02 refined artwork: retain262:80 and at least a p-height of clear space. */
.brand { padding:16px; flex:none; }
.brand .brand-wordmark { display:block; width:123px; height:auto; flex:none; padding:0; background:none; box-shadow:none; border-radius:0; }
.topbar.prototype-product-nav { min-height:82px; padding-block:0; }
@media(max-width:390px) { .topbar.prototype-product-nav { padding-inline:8px; gap:0; } }
