/* BioDataHelm 0.1 (Phase 1 shell). Self-hosted fonts; no external requests. */
:root {
  --bg: #ffffff; --bg-soft: #f4f6f8; --surface: #ffffff; --surface-2: #f1f3f5;
  --fg: #1b2430; --muted: #4a5562; --faint: #6b7480; --border: #e3e6ea; --border-strong: #c9d3dc;
  --teal: #17767c; --teal-strong: #0f5a5f; --teal-soft: #e2f3f4;
  --purple: #5b4a8a; --purple-soft: #efecf6;
  --amber-fg: #6b4a00; --amber-soft: #fbf0d9;
  --focus: #1b2430;
  --gauge-zone: #c5cede; --gauge-fill: #5f7396; --gauge-line: #6a4fb3;
  --lm-off: #eef0f2; --lm-off-fg: #8b95a1;
  --lm-green: #1f6b3a; --lm-blue: #1f5f99; --lm-amber: #9a6400; --lm-red: #a12b2b; --lm-purple: #5b4a8a;
  --shadow: 0 8px 24px rgba(20, 30, 40, .12);
  --font: "DM Sans", system-ui, sans-serif; --display: "Titillium Web", "DM Sans", sans-serif;
  --serif: "Crimson Pro", Georgia, serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --k-data: #13767c; --k-ai: #6a44c2; --k-sw: #1d64c4; --k-plat: #3b4cb0; --k-mat: #9c5a00; --k-inst: #a8432a;
  --radius: 10px; --wrap: 1200px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151c; --bg-soft: #141c25; --surface: #17202a; --surface-2: #1d2733;
    --fg: #e6ebf0; --muted: #b0bac5; --faint: #8f9aa6; --border: #2a3542; --border-strong: #3a4757;
    --teal: #5fc4cb; --teal-strong: #8fd9de; --teal-soft: #12363a;
    --purple: #b9a8e6; --purple-soft: #2a2440;
    --amber-fg: #f3cf86; --amber-soft: #3a2e12; --focus: #e6ebf0;
    --gauge-zone: #34405a; --gauge-fill: #8ea2c6; --gauge-line: #c3b1f2;
    --lm-off: #222c38; --lm-off-fg: #8f9aa6;
    --k-data: #5fc4cb; --k-ai: #ad92f2; --k-sw: #74adf5; --k-plat: #97a3f2; --k-mat: #f0b660; --k-inst: #f2917a;
    --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --bg: #0f151c; --bg-soft: #141c25; --surface: #17202a; --surface-2: #1d2733;
  --fg: #e6ebf0; --muted: #b0bac5; --faint: #8f9aa6; --border: #2a3542; --border-strong: #3a4757;
  --teal: #5fc4cb; --teal-strong: #8fd9de; --teal-soft: #12363a;
  --purple: #b9a8e6; --purple-soft: #2a2440;
  --amber-fg: #f3cf86; --amber-soft: #3a2e12; --focus: #e6ebf0;
  --gauge-zone: #34405a; --gauge-fill: #8ea2c6; --gauge-line: #c3b1f2;
  --lm-off: #222c38; --lm-off-fg: #8f9aa6;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  --k-data: #5fc4cb; --k-ai: #ad92f2; --k-sw: #74adf5; --k-plat: #97a3f2; --k-mat: #f0b660; --k-inst: #f2917a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font); }
a { color: var(--teal); }
a:hover { color: var(--teal-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 34px; } h2 { font-size: 28px; } h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--fg); color: var(--bg); padding: 10px 14px; z-index: 1000; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 14px; } .tiny { font-size: 12.5px; }
.loading { padding: 64px 24px; color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: .9em; }

/* Beta note */
.beta-note { background: var(--amber-soft); color: var(--amber-fg); font-size: 14px; text-align: center; padding: 8px 16px; }

/* Header and menu */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; }
.logo { height: 44px; width: auto; display: block; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; } :root[data-theme="dark"] .logo-dark { display: block; }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-group { position: relative; }
.nav-btn { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 10px 14px; min-height: 44px; box-sizing: border-box; border-radius: 8px; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--teal); }
.nav-btn[data-tone="purple"] { color: var(--purple); }
.nav-btn[aria-expanded="true"], .nav-btn:hover { background: var(--surface-2); }
.nav-btn.current { box-shadow: inset 0 -3px 0 currentColor; }
.nav-btn svg { transition: transform .15s; }
.nav-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: none; flex-direction: column; }
.nav-pop.open { display: flex; }
.nav-pop .pop-hint { padding: 8px 12px; font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.nav-pop a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--fg); }
.nav-pop a:hover, .nav-pop a:focus-visible { background: var(--surface-2); }
.nav-pop a b { font-size: 15px; } .nav-pop a span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.nav-link { color: var(--fg); text-decoration: none; font-weight: 500; padding: 10px; }
.nav-link.current { text-decoration: underline; text-underline-offset: 6px; }
.nav-cta { background: var(--purple); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 16px; border-radius: 8px; margin-left: 4px; }
:root[data-theme="dark"] .nav-cta { color: #17141d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-cta { color: #17141d; } }
.nav-cta:hover { color: #fff; filter: brightness(1.1); }
.theme-btn { all: unset; cursor: pointer; min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.theme-btn:hover { background: var(--surface-2); }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--fg); font: 600 15px var(--font); }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 8px; }
  .main-nav.open { display: flex; }
  .nav-pop { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
  .logo { height: 36px; }
}

/* Buttons, chips, forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); font: 700 15px var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--teal); color: var(--fg); }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-primary:hover { color: #0f151c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary, :root:not([data-theme="light"]) .btn-primary:hover { color: #0f151c; } }
.btn-danger { color: #b42318; border-color: #b42318; }
:root[data-theme="dark"] .btn-danger { color: #ff9a8f; border-color: #ff9a8f; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.chip { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); font: 500 14px var(--font); cursor: pointer; }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--teal-soft); border-color: var(--teal); color: var(--fg); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.tag-unchecked { background: var(--amber-soft); color: var(--amber-fg); }
.tag-cat { font-weight: 600; }
input[type="search"], input[type="text"], select, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; min-height: 44px; padding: 8px 12px; }
input[type="search"] { width: 100%; }
label { font-weight: 500; }

/* Page scaffolding */
.page { padding-top: 40px; padding-bottom: 72px; }
@media (max-width: 600px) { .wrap { padding-left: 16px; padding-right: 16px; } }
.page-head { margin-bottom: 24px; }
.page-head p { color: var(--muted); max-width: 760px; font-size: 17px; }
.eyebrow { font-family: var(--display); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: 13px; color: var(--teal); margin: 0 0 8px; }
.note { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 12px 16px; color: var(--muted); font-size: 14.5px; background: var(--bg-soft); }
.note strong { color: var(--fg); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* Home */
.hero { position: relative; background: #07131c url(../../images/hero-1600.webp) center/cover no-repeat; color: #fff; }
@media (max-width: 900px) { .hero { background-image: url(../../images/hero-900.webp); } }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(5, 14, 22, .72); }
.hero .wrap { position: relative; padding-top: 56px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 18px; }
.hero .eyebrow { color: #8fd9de; }
.hero h1 { font-size: 44px; line-height: 1.15; max-width: 820px; margin: 0; color: #fff; }
.hero h1 .amber { color: #dca37a; }
.hero h1 .tail { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.12em; color: #4cc3ca; }
.hero p.lede { max-width: 640px; font-size: 19px; color: #d5dde4; margin: 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: #c9d3dc; }
.hero .btn-ghost:hover { color: #fff; border-color: #fff; }
.hero .btn-primary { background: #17767c !important; border-color: #17767c !important; color: #fff !important; }
.hero form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 720px; }
.hero input[type="search"] { flex: 1 1 320px; min-width: 0; height: 52px; background: #fff; color: #1b2430; border-color: #c9d3dc; }
.hero form .btn { height: 52px; background: #e9f6f7; color: #1b2430; border-color: #c9d3dc; }
.hero .stats { color: #b9c5cf; font-size: 14px; margin: 0; }
@media (max-width: 640px) { .hero h1 { font-size: 32px; } .hero p.lede { font-size: 17px; } }
.band { padding: 72px 0; }
.band-soft { background: var(--bg-soft); }
.band h2 { font-size: 34px; color: var(--purple); }
.q-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--fg); background: var(--surface); }
.q-card:hover { border-color: var(--teal); color: var(--fg); }
.q-card .q-title { font-family: var(--display); font-weight: 700; font-size: 21px; }
.q-card .q-text { font-size: 15px; color: var(--muted); }
.q-card .q-go { font-size: 14px; font-weight: 700; color: var(--teal); }
.q-card[data-tone="purple"] .q-go, .q-card[data-tone="purple"] svg { color: var(--purple); }
.q-card svg { color: var(--teal); }
.aud { padding-top: 16px; border-top: 3px solid var(--teal); }
.aud.p { border-color: var(--purple); }
.aud h3 { font-size: 19px; }
.aud p { color: var(--muted); font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.steps .n { font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--teal); display: block; }
.steps b { display: block; font-size: 18px; margin: 4px 0; }
.steps span { color: var(--muted); font-size: 15px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.plan { border: 1px solid var(--border); border-radius: 12px; padding: 28px; background: var(--surface); }
.plan.commercial { border: 2px solid var(--purple); }
.plan h3 { font-size: 24px; }
.plan ul { padding-left: 20px; margin: 12px 0 18px; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; color: var(--purple); background: var(--purple-soft); padding: 3px 10px; border-radius: 999px; vertical-align: middle; }

/* Browse */
.browse { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .browse { grid-template-columns: minmax(0, 1fr); } .side { position: static !important; } }
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row > .lbl { font-size: 14px; color: var(--muted); margin-right: 4px; font-weight: 500; }
.count-line { font-size: 14px; color: var(--muted); margin: 8px 0; }
.rtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.rtable th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); }
.rtable td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rtable tr.sel td { background: var(--surface-2); }
.rtable tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.rtable tbody tr { cursor: pointer; }
.rtable tbody tr:hover td { background: var(--bg-soft); }
.rname { font-weight: 700; }
.racr { color: var(--muted); font-size: 13px; }
.rdesc { color: var(--muted); font-size: 13.5px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.side h3 { margin: 0; }
@media (max-width: 700px) { .rtable .hide-sm { display: none; } }

/* Depth gauge */
.gauge { display: inline-flex; align-items: center; gap: 10px; }
.gauge svg { display: block; }
.gauge .g-zone { fill: var(--gauge-zone); }
.gauge .g-fill { fill: var(--gauge-fill); }
.gauge .g-line { stroke: var(--gauge-line); stroke-width: 3; }
.gauge .g-dash { fill: none; stroke: var(--faint); stroke-dasharray: 3 3; }
.gauge .g-lbl { font-size: 13px; color: var(--muted); }
.gauge .g-lbl b { color: var(--fg); }
.gauge-h { display: flex; flex-direction: column; gap: 6px; }
.gauge-h .zones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); font-size: 12px; color: var(--muted); text-align: center; gap: 2px; }
.gauge-h .zones span.on { color: var(--fg); font-weight: 700; }

/* License map */
.lm { display: flex; flex-direction: column; gap: 10px; }
.lm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; border: 1px solid transparent; border-radius: 10px; padding: 4px; }
.lm-grid.unchecked { border: 1px dashed var(--faint); }
.lm-rowlbl { grid-column: 1 / -1; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.lm-cell { all: unset; box-sizing: border-box; cursor: pointer; border-radius: 8px; padding: 8px 6px; min-height: 56px; background: var(--lm-off); color: var(--lm-off-fg); display: flex; flex-direction: column; justify-content: space-between; gap: 2px; font-size: 11.5px; line-height: 1.25; }
.lm-cell .num { font-family: var(--mono); font-size: 11px; display: flex; justify-content: space-between; }
.lm-cell[data-on="true"] { color: #fff; }
.lm-cell[data-tone="green"][data-on="true"] { background: var(--lm-green); }
.lm-cell[data-tone="blue"][data-on="true"] { background: var(--lm-blue); }
.lm-cell[data-tone="amber"][data-on="true"] { background: var(--lm-amber); }
.lm-cell[data-tone="red"][data-on="true"] { background: var(--lm-red); }
.lm-cell[data-tone="purple"][data-on="true"] { background: var(--lm-purple); }
.lm-cell[aria-current="true"] { outline: 2px solid var(--focus); outline-offset: 1px; }
.lm-status { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lm-status .lm-cell { min-height: 40px; }
.lm-status .lm-cell[data-k="none"][data-on="true"] { background: var(--lm-red); color: #fff; }
.lm-status .lm-cell[data-k="unchecked"][data-on="true"] { background: var(--surface); color: var(--fg); border: 1px dashed var(--muted); }
.lm-explain { border-top: 1px solid var(--border); padding-top: 10px; font-size: 14px; }
.lm-explain .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lm-explain b { display: block; margin: 2px 0 4px; }
.lm-explain .applies { font-weight: 700; font-size: 13px; color: var(--muted); }
.lm.large .lm-grid .lm-cell { min-height: 74px; font-size: 13px; padding: 10px; }
.lm.large .lm-status .lm-cell { min-height: 44px; font-size: 13px; padding: 10px; }

/* Profile */
.profile-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
.facts { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 1.6fr); gap: 10px 16px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts dd .tag { margin-left: 6px; }
.section-title { font-size: 18px; margin: 28px 0 10px; }
.conn-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }

/* Tier badges */
.tier { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 6px; margin-left: 4px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tier-verified { background: var(--teal-soft); color: var(--teal-strong); }
.tier-channel { background: var(--purple-soft); color: var(--purple); }
.tier-secondary, .tier-estimate { background: var(--amber-soft); color: var(--amber-fg); }

/* Lifeline */
.lifeline svg { display: block; margin: 8px 0; min-width: 600px; max-width: 760px; }
.lifeline .legend { max-width: 760px; font-size: 12px; }
.ll-scroll { overflow-x: auto; }
.ll-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ll-act { font-family: var(--display); font-weight: 700; font-size: 15px; padding: 3px 12px; border-radius: 999px; background: var(--surface-2); }
.ll-act[data-a="Growing"] { background: var(--teal-soft); color: var(--teal-strong); }
.ll-act[data-a="Stagnant"], .ll-act[data-a="Declining"] { background: var(--amber-soft); color: var(--amber-fg); }
.ll-t { font: 11px var(--font); fill: var(--muted); }
.ll-h { font: 600 12px var(--font); fill: var(--fg); }
.ll-h .ll-t { font-weight: 400; }
.ll-grid { stroke: var(--border); }
.ll-axis { stroke: var(--border-strong); }
.ll-line { stroke: var(--teal); stroke-width: 2.5; }
.ll-line.ll-gap { stroke-dasharray: 5 4; stroke: var(--faint); }
.ll-pt { fill: var(--surface); stroke: var(--teal); stroke-width: 2; }
.ll-rel { stroke: var(--fg); stroke-width: 1.5; }
.ll-bar { fill: var(--gauge-fill); }
.ll-bar.ll-part { opacity: .4; }
.ll-use { stroke: var(--purple); stroke-width: 2; }
.ll-chk { fill: var(--fg); }
.ll-empty { fill: var(--bg-soft); stroke: var(--border-strong); stroke-dasharray: 4 4; }
.lifeline .legend span { white-space: nowrap; }
.lifeline .legend i { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin-right: 6px; border-top: 3px solid var(--teal); }
.lifeline .legend i.lg-gap { border-top: 3px dashed var(--faint); }
.lifeline .legend i.lg-era { height: 10px; border: 0; background: var(--purple); opacity: .2; }

/* Finder */
.finder-step { margin-bottom: 24px; }
.finder-access { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 24px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { all: unset; color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; box-sizing: border-box; cursor: pointer; border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 16px; min-height: 48px; background: var(--surface); font-weight: 500; }
.opt[aria-pressed="true"], .opt[aria-current="true"] { border-color: var(--teal); background: var(--teal-soft); font-weight: 700; }
.opt:hover { border-color: var(--teal); }
.res-card { display: flex; flex-direction: column; gap: 8px; }
.res-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.res-card a.title { font-weight: 700; font-size: 17px; text-decoration: none; color: var(--fg); }
.res-card a.title:hover { color: var(--teal); }

/* Coverage */
.cov-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.bar-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr 56px; gap: 10px; align-items: center; font-size: 14.5px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.bar { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal); }
.bar-row.thin .bar > i { background: var(--lm-amber); }
.bar-row .n { text-align: right; font-variant-numeric: tabular-nums; }

/* Graph */
.graph-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
@media (max-width: 1000px) { .graph-wrap { grid-template-columns: minmax(0, 1fr); } }
#cy { height: 640px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
@media (max-width: 700px) { #cy { height: 420px; } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; }
.tabs { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.tabs button { all: unset; cursor: pointer; padding: 10px 16px; min-height: 44px; box-sizing: border-box; font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--teal); color: #fff; }
:root[data-theme="dark"] .tabs button[aria-selected="true"] { color: #0f151c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs button[aria-selected="true"] { color: #0f151c; } }

/* Journeys */
.jlist { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.timeline { list-style: none; margin: 16px 0; padding: 0; counter-reset: s; }
.timeline li { position: relative; padding: 0 0 22px 48px; }
.timeline li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
:root[data-theme="dark"] .timeline li::before { color: #0f151c; }
.timeline li::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--border-strong); }
.timeline li:last-child::after { display: none; }
.timeline .act { font-weight: 700; }

/* Licensing explained */
.lic-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.lic-item { border-left: 6px solid var(--lm-off-fg); }
.lic-item[data-tone="green"] { border-color: var(--lm-green); } .lic-item[data-tone="blue"] { border-color: var(--lm-blue); }
.lic-item[data-tone="amber"] { border-color: var(--lm-amber); } .lic-item[data-tone="red"] { border-color: var(--lm-red); }
.lic-item[data-tone="purple"] { border-color: var(--lm-purple); }
.lic-item .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Modal and Your data */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 20, 35, .5); }
.modal-card { position: relative; background: var(--surface); color: var(--fg); border-radius: 12px; max-width: 680px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 22px 24px; box-shadow: var(--shadow); }
.modal-card.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h2 { font-size: 22px; margin: 0; }
.modal-x { all: unset; cursor: pointer; font-size: 28px; line-height: 1; min-width: 44px; min-height: 44px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; }
.dp-sec { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }
.dp-sec h3 { font-family: var(--font); font-size: 15px; margin: 0 0 6px; }
.dp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dp-table td { border-bottom: 1px solid var(--border); padding: 6px 4px; vertical-align: top; }
.dp-table td:first-child { color: var(--muted); width: 40%; }
.dp-raw summary { cursor: pointer; font-weight: 600; margin-top: 8px; }
.dp-raw pre { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow: auto; max-height: 300px; font-size: 12.5px; }
.dp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dp-paste { width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 10px; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font-family: var(--mono, monospace); font-size: 12.5px; resize: vertical; }
.data-chip { position: fixed; right: 16px; bottom: 16px; z-index: 150; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); font: 500 13px var(--font); box-shadow: var(--shadow); cursor: pointer; }
.data-chip:hover { border-color: var(--teal); }
.data-chip .dot-unsaved { width: 8px; height: 8px; border-radius: 50%; background: var(--lm-amber); display: none; }
.data-chip[data-unsaved="true"] .dot-unsaved { display: inline-block; }
@media (max-width: 600px) { .data-chip { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); } .data-chip .chip-t { display: none; } }
.req-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.req-table th, .req-table td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.req-table th { color: var(--muted); font-size: 13px; }
.nm-tag { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--teal-soft); color: var(--teal-strong); }
@media (horizontal-viewport-segments: 2) { .modal { justify-content: flex-start; padding-left: calc(env(viewport-segment-left 1 0) + 16px); } }

/* Footer */
.site-footer { background: #121a24; color: #c9d3dc; padding: 48px 0 32px; margin-top: 0; }
.site-footer a { color: #c9d3dc; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid #2b3846; margin-bottom: 8px; }
.footer-privacy { margin: 0; font-size: 14px; max-width: 560px; }
.site-footer .sf { padding: 1.25rem 0 0; border-top: 0; }
.site-footer .sf { --sf-link: #d6e2ec; --sf-fg: #c9d3dc; --sf-muted: #a8b4c0; --sf-border: #2b3846; --sf-bg: transparent; --sf-focus: #ffffff; --sf-max-width: 100%; }

@media print { .site-header, .site-footer, .data-chip, .beta-note { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* At a glance strip (deep profiles) */
.glance { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 20px 0 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.glance-cell { padding: 14px 16px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.glance-cell:first-child { border-left: 0; }
.glance-k { font-size: 12px; font-weight: 600; color: var(--muted); }
.glance-v { font-family: var(--display); font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--fg); overflow-wrap: anywhere; }
.glance-more { font-size: 12px; margin-top: auto; }
.glance-key { margin: 0 0 8px; }
.glance-key .tdot { margin: 0 3px 0 10px; }
.glance-key .tdot:first-child { margin-left: 0; }
.tdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 7px; vertical-align: middle; background: var(--faint); }
.tdot-verified { background: var(--teal); }
.tdot-channel { background: var(--purple); }
.tdot-secondary, .tdot-estimate { background: #c98a12; }
.tdot-judgment { background: transparent; border: 2px solid var(--muted); width: 9px; height: 9px; box-sizing: border-box; }
@media (max-width: 1000px) { .glance { grid-template-columns: repeat(3, minmax(0, 1fr)); } .glance-cell:nth-child(4) { border-left: 0; } .glance-cell:nth-child(n+4) { border-top: 1px solid var(--border); } }
@media (max-width: 560px) { .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } .glance-cell { border-left: 0; border-top: 1px solid var(--border); } .glance-cell:nth-child(even) { border-left: 1px solid var(--border); } .glance-cell:nth-child(-n+2) { border-top: 0; } }
/* Long links never overflow their box */
.conn-list a, .facts dd a, .dp-table a { overflow-wrap: anywhere; word-break: break-word; }

/* Journeys that combine inputs */
.jstages { list-style: none; padding: 0; margin: 16px 0 24px; display: flex; flex-direction: column; gap: 0; }
.jstage { position: relative; padding: 0 0 28px; }
.jstage:not(:last-child)::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 2px; height: 16px; background: var(--purple); opacity: .5; }
.jstage:not(:last-child)::before { content: ""; position: absolute; left: calc(50% - 5px); bottom: 0; border: 6px solid transparent; border-top-color: var(--purple); opacity: .6; }
.jstage-k { font-size: 12px; font-weight: 700; color: var(--purple); margin-bottom: 8px; }
.jstage-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.jstep { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.jstep-merge { border-color: var(--purple); box-shadow: inset 3px 0 0 var(--purple); }
.jstep .act { font-weight: 700; }
.jfrom { font-size: 12px; font-weight: 600; color: var(--purple); margin: 8px 0 0; }

/* Evidence and FAQ */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--purple); margin: 0 0 6px; }
.lede { font-size: 18px; max-width: 760px; }
.ev-card { border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; margin: 18px 0; background: var(--surface); max-width: 900px; }
.ev-card h2 { font-size: 20px; margin: 0 0 8px; display: flex; gap: 10px; align-items: center; }
.ev-num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: var(--purple-soft); color: var(--purple); font-size: 15px; }
.ev-stat { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--purple); margin: 4px 0 10px; }
.ev-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); margin: 8px 0 6px; max-width: 640px; }
.ev-seg { display: block; min-width: 2px; }
.ev-verified { background: var(--teal); } .ev-channel { background: var(--purple); } .ev-secondary { background: #c98a12; } .ev-estimate { background: var(--faint); }
details.faq { border-bottom: 1px solid var(--border); padding: 10px 0; max-width: 820px; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: 8px 0 4px; }

/* Country maps */
.geo-map { width: 100%; max-width: 760px; height: auto; display: block; margin: 8px 0 4px; }
.geo-map path { stroke: var(--surface); stroke-width: .5; }
.geo-none, .geo-neutral { fill: var(--surface-2); }
.geo-available { fill: #9fd3d6; } .geo-partsLimitedTo { fill: #e8b54d; } .geo-staysIn { fill: var(--purple); } .geo-barred { fill: #c0453b; } .geo-pick { fill: var(--teal); }
.geo-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 6px; }
i.geo-sw.geo-available { background: #9fd3d6; } i.geo-sw.geo-partsLimitedTo { background: #e8b54d; } i.geo-sw.geo-staysIn { background: var(--purple); } i.geo-sw.geo-barred { background: #c0453b; } i.geo-sw.geo-none { background: var(--surface-2); border: 1px solid var(--border); } i.geo-sw.geo-pick { background: var(--teal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .geo-available { fill: #2f6f73; } }
:root[data-theme="dark"] .geo-available { fill: #2f6f73; }
#geo-pick { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); max-width: 100%; }

.geo-pickrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
.geo-pickrow .chip { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--teal); background: var(--teal-soft); color: var(--teal-strong); cursor: pointer; }
.legend i.geo-sw { height: 12px; width: 12px; border-top: 0; }

/* Licensing explained: same grid and colors as the license map */
.lic-mini { max-width: 520px; margin: 18px 0 8px; }
.lic-mini .lm-cell { text-decoration: none; min-height: 50px; }
.lic-rowhead { font-size: 20px; margin: 28px 0 10px; }
.lic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lic-card { border-radius: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-top: 6px solid var(--lm-off-fg); scroll-margin-top: 90px; }
.lic-card h3 { font-size: 16px; margin: 6px 0; }
.lic-card p { margin: 0; }
.lic-card-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.lic-card .mark { font-weight: 700; }
.lic-card[data-tone="green"] { border-top-color: var(--lm-green); background: color-mix(in srgb, var(--lm-green) 7%, var(--surface)); }
.lic-card[data-tone="amber"] { border-top-color: var(--lm-amber); background: color-mix(in srgb, var(--lm-amber) 8%, var(--surface)); }
.lic-card[data-tone="red"] { border-top-color: var(--lm-red); background: color-mix(in srgb, var(--lm-red) 7%, var(--surface)); }
.lic-card[data-tone="blue"] { border-top-color: var(--lm-blue); background: color-mix(in srgb, var(--lm-blue) 7%, var(--surface)); }
.lic-card[data-tone="purple"] { border-top-color: var(--lm-purple); background: color-mix(in srgb, var(--lm-purple) 8%, var(--surface)); }
.lic-card[data-tone="green"] .mark { color: var(--lm-green); } .lic-card[data-tone="amber"] .mark { color: var(--lm-amber); } .lic-card[data-tone="red"] .mark { color: var(--lm-red); } .lic-card[data-tone="blue"] .mark { color: var(--lm-blue); } .lic-card[data-tone="purple"] .mark { color: var(--lm-purple); }
@media (max-width: 1000px) { .lic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lic-grid { grid-template-columns: 1fr; } }
/* Smaller country map on profiles */
.geo-box .geo-map { max-width: 540px; }

.org-chip { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 4px 0; }
.org-ico { width: 22px; height: 22px; vertical-align: middle; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .org-ico { filter: invert(1) brightness(1.4); } }
:root[data-theme="dark"] .org-ico { filter: invert(1) brightness(1.4); }

/* ---- 29 Oct UI fixes ---- */
/* Your-data chip: icon only until hovered or focused, so it covers less of the page. */
.data-chip { padding: 8px 11px; gap: 0; }
.data-chip .chip-t { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .2s ease, margin .2s ease; }
.data-chip:hover .chip-t, .data-chip:focus-visible .chip-t { max-width: 240px; margin-left: 8px; }
.data-chip[data-unsaved="true"] .dot-unsaved { margin-left: 6px; }
@media (prefers-reduced-motion: reduce) { .data-chip .chip-t { transition: none; } }
/* License grid: unlit cells keep a faint tint of their color, and long labels wrap instead of clipping. */
.lm-cell { min-width: 0; }
.lm-cell > span:last-child { hyphens: auto; -webkit-hyphens: auto; min-width: 0; }
.lm-cell[data-tone][data-on="false"] { background: color-mix(in srgb, var(--lm-off) 90%, var(--tone, var(--lm-off-fg)) 10%); color: color-mix(in srgb, var(--lm-off-fg) 60%, var(--tone, var(--lm-off-fg)) 40%); }
.lm-grid.unchecked .lm-cell[data-tone][data-on="false"] { background: var(--lm-off); color: var(--lm-off-fg); }
.lm-cell[data-tone="green"] { --tone: var(--lm-green); } .lm-cell[data-tone="blue"] { --tone: var(--lm-blue); }
.lm-cell[data-tone="amber"] { --tone: var(--lm-amber); } .lm-cell[data-tone="red"] { --tone: var(--lm-red); } .lm-cell[data-tone="purple"] { --tone: var(--lm-purple); }
.lm:not(.large) .lm-cell { font-size: 10.5px; padding: 6px 4px; letter-spacing: -0.1px; }
.lm:not(.large) .lm-grid { gap: 4px; }
/* Connection map table: type swatch; on phones each link becomes a short stacked row. */
.links-table .lt-type i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
@media (max-width: 700px) {
  .links-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .links-table, .links-table tbody, .links-table tr, .links-table td { display: block; width: auto; }
  .links-table tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .links-table td { border: 0; padding: 0; }
  .links-table .lt-link { color: var(--muted); font-size: 13px; margin: 2px 0; }
  .links-table .lt-link::before { content: "↓ "; }
  .links-table .lt-type { font-size: 12px; color: var(--muted); margin-top: 4px; }
}
.lt-more { display: none; }
@media (max-width: 700px) { .links-table:not(.show-all) .lt-extra { display: none; } .lt-more { display: block; margin-top: 12px; } }
.tag.tag-new { background: color-mix(in srgb, var(--lm-amber) 16%, var(--surface)); color: var(--lm-amber); border-color: color-mix(in srgb, var(--lm-amber) 40%, transparent); font-weight: 600; margin-left: 4px; }
.chip-fresh { border-color: color-mix(in srgb, var(--lm-amber) 50%, var(--border)); }
.filter-row .chip[aria-current="true"] { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.filter-row .chip:not([aria-current="true"]) { background: var(--surface); }
.list-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.list-bar .count-line { margin: 0; }
.list-bar select { width: auto; padding: 4px 8px; margin: 0 4px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0; }
.pager .pager-n { min-width: 38px; justify-content: center; }
.pager .pager-n[aria-current="page"] { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.pager button[disabled] { opacity: .45; cursor: default; }
.pager-gap { color: var(--muted); padding: 0 2px; }

/* AI model profiles */
.trained-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.trained-list a { overflow-wrap: anywhere; }
.tag.tag-warn { background: var(--amber-soft); color: var(--amber-fg); border-color: transparent; font-weight: 600; margin-left: 4px; }

/* Home: AI models band */
.band-ai { background: color-mix(in srgb, #0F766E 7%, var(--surface)); border-top: 1px solid color-mix(in srgb, #0F766E 20%, transparent); border-bottom: 1px solid color-mix(in srgb, #0F766E 20%, transparent); }
.ai-stats { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 20px 0 12px; }
.ai-stats div { display: flex; flex-direction: column; min-width: 150px; }
.ai-stats b { font-size: 34px; line-height: 1.1; color: var(--teal, #0F766E); }
.ai-stats span { font-size: 14px; color: var(--muted, #5b6470); max-width: 190px; }
.ai-ex { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.band-ai .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 600px) {
  .ai-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .ai-stats div { min-width: 0; }
  .ai-stats b { font-size: 28px; }
  .ai-stats span { font-size: 13px; }
}
.note.unsettled { border-color: #b45309; background: rgba(245,158,11,.08); margin: 12px 0; }

/* Model alternatives: comparison table */
.mtable td { vertical-align: top; }
.mtable .rname { font-weight: 600; }
.cu { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 13px; white-space: nowrap; border: 1px solid transparent; }
.cu-ok { background: rgba(15,118,110,.12); border-color: rgba(15,118,110,.35); }
.cu-warn { background: rgba(180,83,9,.12); border-color: rgba(180,83,9,.4); }
.cu-none { background: var(--surface); border-color: var(--border); color: var(--muted); }

/* My stack */
.stack-add.on { border-color: var(--teal); background: var(--teal-soft); }
.stack-items { list-style: none; padding: 0; margin: 8px 0 12px; }
.stack-items li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.linkish { all: unset; cursor: pointer; color: var(--muted); font-size: 13px; text-decoration: underline; }
.linkish:hover { color: var(--fg); }
.rep-sec { margin: 20px 0; padding: 14px 16px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; background: var(--surface); }
.rep-must { border-left-color: var(--teal); }
.rep-cannot { border-left-color: #c0453b; }
.rep-spread { border-left-color: #b45309; }
.rep-unknown { border-left-color: var(--border-strong); }
.rep-sec .section-title { margin-top: 0; }
.rep-list { list-style: none; padding: 0; margin: 8px 0 0; }
.rep-list > li { padding: 8px 0; border-top: 1px solid var(--border); }
.rep-list > li:first-child { border-top: 0; }

/* Link-check notices. Styled apart from the tier dots on purpose: a server
   answering is weaker evidence than a fact read at source, and the page must
   not let a reader mistake one for the other. */
:root { --lc-moved: #1f5f99; --lc-warn: #8a5a00; --lc-dead: #a12b2b }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --lc-moved: #7fb3e0; --lc-warn: #e0b765; --lc-dead: #e58a8a }
}
:root[data-theme="dark"] { --lc-moved: #7fb3e0; --lc-warn: #e0b765; --lc-dead: #e58a8a }

.linknote { margin-top: 14px; font-size: 14px }
.linknote-ok { border-color: var(--border) }
.linknote-moved { border-color: var(--lc-moved) }
.linknote-warn { border-color: var(--lc-warn) }
.linknote-dead { border-color: var(--lc-dead) }
.linknote code { font-size: 12px; word-break: break-all }
.ldot { font-size: 11px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap }
.ldot-warn { color: var(--lc-warn); border-color: var(--lc-warn) }
.ldot-dead { color: var(--lc-dead); border-color: var(--lc-dead) }
.ldot-moved { color: var(--lc-moved); border-color: var(--lc-moved) }

/* License overlay legend. Static swatches, not filters: the colors answer one
   question (may I use this commercially) and the legend says so. */
.leg-item { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 6px 0; font-size: 13px }
.leg-item i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none }

/* Journey flow: the boxes are laid out by the browser, and the connectors are
   drawn over them once their positions are known. The SVG is decorative — the
   "Combines N inputs" line under each box carries the same fact in words. */
.jflow { position: relative }
.jflow-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--purple); z-index: 0 }
.jflow-wires .wire { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: .62 }
/* A line that passes a stage rather than joining it. Dashed so that "goes
   around this step" and "feeds this step" are not the same mark. */
.jflow-wires .wire-skip { stroke-dasharray: 6 5; opacity: .5 }
/* The generic purple stage arrow is a decoration for lists with no wiring.
   Inside a flow the real edges are drawn, and leaving it on put an arrow in
   the middle of every gap that joined nothing to anything. */
.jflow .jstage::after, .jflow .jstage::before { display: none }
/* One column: no wires are drawn, so the plain stage arrow comes back. */
.jflow-plain .jstage:not(:last-child)::after, .jflow-plain .jstage:not(:last-child)::before { display: block }
.jflow .jstages { position: relative; z-index: 1 }
.jflow .jstep { background: var(--surface) }
@media (prefers-reduced-motion: reduce) { .jflow-wires { transition: none } }

/* Workflow modeller. The left stripe is the license color, so the chain's
   weak link is visible before you read a word of the report. */
.wf-list { list-style: none; padding: 0; margin: 14px 0 }
.wf-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px }
.wf-k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700 }
.wf-act { width: 100%; font: inherit; font-weight: 600; padding: 6px 8px; margin: 4px 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--fg) }
.wf-act:hover, .wf-act:focus { border-color: var(--border-strong); background: var(--bg-soft) }
.wf-res { margin: 2px 0 6px }
.wf-alt summary { cursor: pointer; font-size: 13px; color: var(--teal-strong) }
.wf-altlist { list-style: none; padding: 0; margin: 8px 0 0 }
.wf-altlist li { margin-bottom: 5px; font-size: 14px }
.wf-ops { margin: 8px 0 0; font-size: 13px }

/* License glyphs. Shape carries the meaning; color only reinforces it, so
   every state stays legible in one ink and in print. */
.glyph { flex: none; vertical-align: -0.2em }
.glyph-clear { color: var(--muted) }
.glyph-cond { color: var(--lc-warn) }
.glyph-block { color: var(--lc-dead) }
.glyph-unstated { color: var(--lc-warn) }
.glyphs { display: inline-flex; gap: 8px; align-items: center }

.glyph-panel { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px }
.glyph-panel li { display: flex; gap: 11px; align-items: flex-start }
.gp-k { margin: 0; font-weight: 600; font-size: 14px }
.gp-v { margin: 1px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted) }
.gp-unstated .gp-v { color: var(--lc-warn) }

.glyph-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 10px; font-size: 13px; color: var(--muted) }
.gl-item { display: inline-flex; align-items: center; gap: 6px }
.gl-sep { width: 1px; height: 18px; background: var(--border-strong) }
@media (max-width: 700px) { .glyph-panel { grid-template-columns: 1fr } }

/* Glyph popovers. The marks' wording was reachable by hover and by screen
   reader but not by touch or keyboard, which is the wrong two readers to leave
   out of the channel that exists because color is not enough. The trigger is a
   real button so both arrive by the same door. */
.glyphs-btn, .gl-btn { background: none; border: 0; padding: 2px 4px; margin: -2px -4px; font: inherit; color: inherit; cursor: pointer; border-radius: 6px }
.glyphs-btn:hover, .gl-btn:hover { background: var(--bg-soft) }
.glyphs-btn:focus-visible, .gl-btn:focus-visible { outline: 2px solid var(--lc-warn); outline-offset: 1px }
.glyphs-btn[aria-expanded="true"], .gl-btn[aria-expanded="true"] { background: var(--bg-soft) }

.glyph-pop { position: fixed; z-index: 90; width: min(340px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow: auto;
  background: var(--surface); color: var(--fg); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px 12px }
.glyph-pop[hidden] { display: none }
.pop-h { margin: 0 24px 2px 0; font-weight: 700; font-size: 15px }
.pop-ask { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-style: italic }
.pop-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px }
.pop-list li { display: flex; gap: 10px; align-items: flex-start }
.pop-note { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid var(--border); font-size: 12.5px; line-height: 1.5; color: var(--lc-warn) }
.pop-when { margin: 10px 0 0; font-size: 12.5px; color: var(--faint) }
.pop-more { margin: 9px 0 0; font-size: 13px }
.pop-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; padding: 2px 6px; font-size: 20px; line-height: 1;
  color: var(--faint); cursor: pointer; border-radius: 6px }
.pop-x:hover { color: var(--fg); background: var(--bg-soft) }
.pop-x:focus-visible { outline: 2px solid var(--lc-warn); outline-offset: 1px }

/* The page for people choosing terms. The count leads, because the number is
   the argument; the prose only explains what it costs. */
.pub-f { display: flex; gap: 22px; align-items: flex-start; padding: 20px 0; border-top: 1px solid var(--border) }
.pub-f h3 { margin: 0 0 6px; font-size: 19px }
.pub-f p { margin: 0 0 8px }
/* The figure and its "of 349" are one unit, so they center on each other
   rather than both ranging left off a 108px column — a 9 and a 216 otherwise
   sit at visibly different optical weights down the page. */
.pub-n { flex: none; width: 108px; margin: 0; text-align: center; font-family: var(--display); font-size: 40px; line-height: 1; font-weight: 700; color: var(--teal-strong) }
.pub-n span { display: block; font-size: 13px; font-weight: 600; color: var(--faint); font-family: var(--font) }
@media (max-width: 640px) { .pub-n { text-align: left } }
.pub-ask { margin: 10px 0 0 !important; padding: 9px 12px; background: var(--bg-soft); border-radius: 8px; font-size: 14px }
.pub-q { margin: 10px 0 0; padding-left: 22px; font-size: 15px; line-height: 1.6 }
.pub-q li { margin-bottom: 7px }
@media (max-width: 640px) { .pub-f { flex-direction: column; gap: 6px } .pub-n { width: auto } }

/* The line that ties the twelve license-type cells to the six decision marks.
   Both appear on a profile, and without this a reader has to guess whether one
   restates the other. */
.glyph-lede { margin: -2px 0 12px; max-width: 70ch }

/* License over time. A pinned build is bound by the license of that build, so
   the timeline matters more than the current value for anyone already shipping. */
.lh { display: grid; gap: 8px; margin: 2px 0 0 }
.lh-row { display: grid; grid-template-columns: 9em 1fr auto; gap: 4px 10px; align-items: baseline;
  padding: 7px 10px; background: var(--bg-soft); border-radius: 8px; border-left: 3px solid var(--border-strong) }
.lh-now { border-left-color: var(--teal) }
.lh-when { font-family: var(--mono); font-size: 12.5px; color: var(--muted) }
.lh-what { font-weight: 600; font-size: 14px }
.lh-src { font-size: 12.5px }
.lh-note { grid-column: 1 / -1; margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted) }
.lh-foot { margin: 2px 0 0; font-size: 12.5px; color: var(--faint) }
@media (max-width: 640px) { .lh-row { grid-template-columns: 1fr } }

/* "What changed" — the diff between what a saved stack recorded and the
   catalog today. A license move is not the same event as an address move, so
   the two are weighted differently rather than listed flat. */
.ch-sec { padding: 14px 16px; margin: 0 0 12px; background: var(--bg-soft); border-radius: 10px;
  border-left: 3px solid var(--border-strong) }
.ch-sec h2 { margin: 0 0 2px; font-size: 17px }
.ch-major { border-left-color: var(--lc-warn) }
.ch-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px }
.ch-list li { display: grid; grid-template-columns: 13em 1fr auto 1fr; gap: 4px 10px; align-items: baseline;
  font-size: 14px; padding: 6px 0; border-top: 1px solid var(--border) }
.ch-k { font-weight: 600 }
.ch-from { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px }
.ch-to { font-weight: 600 }
.ch-major .ch-to { color: var(--lc-warn) }
.ch-arrow { color: var(--faint) }
.ch-actions { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--border) }
@media (max-width: 700px) { .ch-list li { grid-template-columns: 1fr; gap: 1px } .ch-arrow { display: none } }

/* A fact we have not established is still a fact about our coverage, so it is
   shown rather than hidden — but quietly, so it does not compete with the
   rows that carry an answer. */
.facts dt.dt-quiet { color: var(--faint); font-weight: 500 }
.facts dd.dd-quiet { color: var(--faint); font-size: 13.5px }

/* License terms by part. A resource is often several licenses, and the part
   you depend on is the one that governs — AlphaFold 3's code is Apache-2.0
   and its weights are not. Tones reuse the license-map palette so the colors
   mean the same thing here as they do on the grid. */
.lc-part { border-left: 3px solid var(--border); padding-left: 10px; margin-bottom: 8px; }
.lc-part[data-tone="green"] { border-left-color: var(--lm-green); }
.lc-part[data-tone="red"]   { border-left-color: var(--lm-red); }
.lc-part[data-tone="blue"]  { border-left-color: var(--lm-blue); }
.lc-part[data-tone="amber"] { border-left-color: var(--lm-amber); }
.tag.lc-cu[data-tone="green"] { background: color-mix(in srgb, var(--lm-green) 14%, var(--surface)); color: var(--lm-green); }
.tag.lc-cu[data-tone="red"]   { background: color-mix(in srgb, var(--lm-red) 14%, var(--surface)); color: var(--lm-red); }
.tag.lc-cu[data-tone="blue"]  { background: color-mix(in srgb, var(--lm-blue) 14%, var(--surface)); color: var(--lm-blue); }
.tag.lc-cu[data-tone="amber"] { background: var(--amber-soft); color: var(--amber-fg); }

/* Events the lifeline does not plot: the date is not established, or the only
   source is not the provider's own record. Set apart deliberately — rule 4 of
   the accuracy plan keeps them out of the dated events' company rather than
   letting them borrow that authority. Quiet, not hidden. */
.ll-soft { border-left: 2px solid var(--line); padding-left: 10px; margin: 8px 0 4px; }
.ll-soft h3 { color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.ll-soft .tag { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* A component that is not a license term. Added 2026-11-02: an eligibility rule
   or a pointer to someone else's terms sat beside the license rows tone-coded as
   if it restricted use, which is how Optum's and TriNetX's academic access routes
   came to read as commercial restrictions. Grey, because the row is context. */
.lc-part[data-tone="grey"] { border-left-color: var(--line); }
.lc-part[data-tone="grey"] b { color: var(--muted); }
.tag.lc-cu[data-tone="grey"] { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.tag.lc-kind { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-style: italic; }

/* Journey steps colored by what you may do with the resource.
   Added 2026-11-03. The color used to be a 4px border-left on the <li>, which
   the timeline's own numbered circle (absolute, left:0, 32px) covered almost
   entirely — only the gaps between numbers showed, so it read as fragments.
   And color was the only carrier of a six-way distinction, which leaves a
   color-blind reader with nothing. The tag below says it in words; the rail
   moves onto the connector, where nothing is on top of it. */
.lic-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
           font-size: 12px; line-height: 1.6; white-space: nowrap;
           border: 1px solid currentColor; background: transparent; }
.lic-tag[data-lic="yes"]        { color: var(--lm-green); }
.lic-tag[data-lic="by_licence"] { color: var(--lm-blue); }
.lic-tag[data-lic="mixed"]      { color: var(--lm-amber); }
.lic-tag[data-lic="no"]         { color: var(--lm-red); }
.lic-tag[data-lic="unknown"]    { color: var(--muted); }
.lic-tag[data-lic="unread"]     { color: var(--muted); border-style: dashed; }

/* The rail: color the connector, which nothing covers, and thicken it so a
   4px signal is not competing with a 2px structural line. */
.timeline li[data-lic]::after      { width: 4px; left: 14px; }
.timeline li[data-lic="yes"]::after        { background: var(--lm-green); }
.timeline li[data-lic="by_licence"]::after { background: var(--lm-blue); }
.timeline li[data-lic="mixed"]::after      { background: var(--lm-amber); }
.timeline li[data-lic="no"]::after         { background: var(--lm-red); }
.timeline li[data-lic="unknown"]::after    { background: var(--muted); }
.timeline li[data-lic="unread"]::after     { background: var(--border-strong); }

/* The side-by-side layout has no connector of its own, so it keeps a border —
   but on a .jstep nothing is positioned over the left edge. */
.jstep[data-lic] { border-left: 5px solid var(--border-strong); }
.jstep[data-lic="yes"]        { border-left-color: var(--lm-green); }
.jstep[data-lic="by_licence"] { border-left-color: var(--lm-blue); }
.jstep[data-lic="mixed"]      { border-left-color: var(--lm-amber); }
.jstep[data-lic="no"]         { border-left-color: var(--lm-red); }
.jstep[data-lic="unknown"]    { border-left-color: var(--muted); }

/* Resource types (8 Nov 2026): one hue and one icon per kind, used wherever a
   resource appears. Identity only, never a verdict, so the tints stay light. */
.k-data { --k: var(--k-data); } .k-models { --k: var(--k-ai); } .k-software { --k: var(--k-sw); }
.k-platforms { --k: var(--k-plat); } .k-materials { --k: var(--k-mat); } .k-instruments { --k: var(--k-inst); }
.kind { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px 4px 6px; border-radius: 999px; color: var(--k); background: color-mix(in srgb, var(--k) 11%, transparent); border: 1px solid color-mix(in srgb, var(--k) 28%, transparent); white-space: nowrap; vertical-align: middle; }
.kind svg { width: 14px; height: 14px; flex: none; }
.kind-ico svg { width: 18px; height: 18px; }
.k-all { --k: var(--fg); }
.kind-tile.k-all b { color: var(--fg); }
.chip[data-kind] { display: inline-flex; align-items: center; gap: 6px; }
.chip[data-kind] svg { width: 15px; height: 15px; color: var(--k, var(--muted)); }
.chip[data-kind][aria-pressed="true"] { background: color-mix(in srgb, var(--k, var(--teal)) 14%, var(--surface)); border-color: var(--k, var(--teal)); color: var(--fg); }
.chip[data-kind] .n { font-size: 12px; color: var(--faint); font-weight: 500; }
.kind-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.kind-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 10px; border-radius: var(--radius); border: 1px solid var(--border); border-top: 3px solid var(--k); background: color-mix(in srgb, var(--k) 5%, var(--surface)); color: var(--fg); text-decoration: none; cursor: pointer; font: inherit; text-align: left; }
.kind-tile:hover, .kind-tile[aria-pressed="true"], .kind-tile[aria-current="true"] { border-color: var(--k); background: color-mix(in srgb, var(--k) 12%, var(--surface)); }
.kind-tile b { font-family: var(--display); font-size: 22px; line-height: 1; color: var(--k); }
.kind-tile span { font-size: 13px; color: var(--muted); }
.kind-tile .kind-ico { color: var(--k); }
@media (max-width: 1100px) { .kind-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kind-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .kind-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.res-card { border-left: 3px solid var(--k, var(--border)); }
.tag-human { background: var(--teal-soft); color: var(--teal-strong); border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); font-weight: 600; }
/* "Covers" line under a view's heading (8 Nov 2026) */
.covers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 16px; }

/* Data journeys by license (8 Nov 2026): the number circle carries the color,
   split by part for a mixed resource; the connector goes back to neutral. */
.timeline li[data-lic]::before { background: var(--lic-fill, var(--teal)); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong); text-shadow: 0 0 3px rgba(0,0,0,.55); }
.timeline li[data-lic="unread"]::before { color: var(--fg); text-shadow: none; }
.timeline li[data-lic]::after { width: 2px; left: 15px; background: var(--border-strong) !important; }
.jstep[data-lic] { border-left: 5px solid transparent; border-image: var(--lic-stripe) 1; border-image-slice: 0 0 0 1; }
