@import url("/static/css/tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 1.5; }
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--oxide); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* App shell */
.shell { display: flex; flex-direction: column; gap: 24px; padding-block: 28px 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 4px 4px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
/* Wordmark only: the name set in the serif, no icon (FEATURES-2026-10-25 §8). */
.wordmark { font-family: var(--font-serif); font-size: 25px; font-weight: 600; font-variation-settings: "opsz" 60; line-height: 1;
  letter-spacing: -0.025em; color: var(--cream); }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pill { display: inline-flex; align-items: center; font-size: 12px; letter-spacing: 0.04em; color: var(--text-strong);
  border: 1px solid var(--rule); border-radius: var(--radius-pill); padding: 6px 12px; }
.pill.demo { color: var(--bg); background: var(--accent-2); border-color: var(--accent-2); font-weight: 600; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--text-2); padding: 0 4px; }
.crumbs ol { display: contents; list-style: none; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--text-2); }
.crumbs a { color: var(--text-strong); text-decoration: none; }
.crumbs a:hover { color: var(--accent-2); }

/* Cards */
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Blocks are open sections with a 2px navy rule on top, not boxed cards (handoff §2 Layout). */
.card { display: flex; flex-direction: column; gap: 14px; padding: 16px 0 8px; border-radius: 0;
  background: transparent; border: 0; border-top: 2px solid var(--navy); min-width: 0; }
.card.error { border-top-color: var(--oxide); }
.section-title { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lede { margin: 0; font-family: var(--font-serif); font-size: clamp(21px, 2.4vw, 26px); line-height: 1.3; color: var(--cream); text-wrap: pretty; }
.muted { color: var(--text-2); }
h1.page-title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: clamp(34px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); padding: 0; text-wrap: balance; }
h3.sub { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 22px; color: var(--ink); }

.tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 14px; min-height: 96px;
  border-radius: var(--radius-tile); background: var(--tile); border: 1px solid var(--tile-border); }
.tile-label { font-size: 13px; line-height: 1.3; color: var(--text-2); }
.tile-value { font-family: var(--font-serif); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }

/* States */
@keyframes ma-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.skel { border-radius: var(--radius-tile); background: var(--tile); border: 1px solid var(--tile-border); min-height: 96px; animation: ma-pulse 1.4s ease-in-out infinite; }
.skel.line { min-height: 22px; border-radius: 6px; border: 0; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.empty { display: flex; flex-direction: column; gap: 10px; }
.alert { display: flex; align-items: flex-start; gap: 12px; }
.alert svg { flex: none; margin-top: 3px; }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--negative-bg); border: 0; border-left: 3px solid var(--oxide); color: var(--ink); }
.ok-text { color: var(--positive); }
.readonly { opacity: 0.45; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--navy); border-radius: var(--radius); background: transparent; color: var(--navy);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--d5); color: var(--navy); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--on-navy); font-weight: 600; }
.btn.primary:hover { background: var(--d2); border-color: var(--d2); color: var(--on-navy); }
.btn.danger { border-color: var(--oxide); color: var(--oxide); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 15px; font-weight: 500; color: var(--text); }
.field .help { font-size: 13px; line-height: 1.4; color: var(--text-2); }
.input, .select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.input:focus, .select:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.fields { display: grid; gap: 22px 28px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.segmented legend { font-size: 15px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.segmented label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--button-border); cursor: pointer; font-size: 15px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span { color: var(--bg); }
.segmented label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

table.data { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.data thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); }
table.data tbody th { font-weight: 500; color: var(--ink); }
table.data td.num, table.data th.num { text-align: right; }
.table-wrap { overflow-x: auto; margin: 0 -4px; position: relative; }



/* Admin layout */
.admin { display: flex; flex-wrap: wrap; min-height: 100vh; }
.admin aside { flex: 1 1 260px; min-width: 0; padding: 24px 16px 20px; background: var(--bg-deep); border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 20px; }
.admin main { flex: 999 1 600px; min-width: 0; padding: clamp(16px, 4vw, 40px); display: flex; flex-direction: column; gap: 20px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius); text-decoration: none; color: var(--text-strong); font-size: 15px; }
.admin-nav a:hover { background: var(--d5); color: var(--cream); }
@media (max-width: 719px) {
  .admin-nav { flex-direction: row; overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
  .admin-nav a { flex: none; border: 1px solid var(--rule); }
}
.kv { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); column-gap: 12px; row-gap: 10px; font-size: 15px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.login { max-width: 420px; margin: 10vh auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }

.card p { margin: 0; }

/* Exchange-rate rows stack on phones instead of squeezing four columns. */
@media (max-width: 719px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  table.stack th, table.stack td { display: block; padding: 0; border: 0; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
}

/* Dashboard */
.small { font-size: 14px; }
.tile-value.neg { color: var(--negative); }
.tile-value.small-value { font-size: 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.notes { margin: 0; padding-left: 18px; color: var(--accent-2); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.pill-btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--rule); border-radius: var(--radius-pill);
  background: transparent; color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.pill-btn[aria-selected="true"], .pill-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.year-pills, .tablist { display: flex; flex-wrap: wrap; gap: 8px; }
.split { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.split .sub { font-size: 19px; margin-bottom: 4px; }
.split [role="tabpanel"] > .sub { display: none; }
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split [role="tabpanel"][hidden] { display: block; }
  .split [role="tabpanel"] > .sub { display: block; }
  .tablist { display: none; }
}
.split.always { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.ranklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ranklist li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ranklist li:last-child { border-bottom: 0; }
.ranklist .rank { font-size: 15px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ranklist .who, .attention .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ranklist .who a, .attention .who a, .award-name a { color: var(--text); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.ranklist .who a:hover, .attention .who a:hover, .award-name a:hover { color: var(--accent-2); text-decoration: underline; }
.ranklist .score { font-size: 20px; font-weight: 600; color: var(--cream); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.change { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.change.up { color: var(--positive); }
.change.down { color: var(--negative); }
.awards .tile { justify-content: flex-start; }
.award-name { font-size: 16px; line-height: 1.3; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.critical { background: var(--negative); }
.dot.watch { background: var(--accent-2); }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.attention { list-style: none; margin: 0; padding: 0; }
.attention li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.attention li:last-child { border-bottom: 0; }
.attention .sev { padding-top: 6px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--d5); stroke-width: 1; }
.chart .axis.zero { stroke: var(--rule); stroke-width: 1; }
.chart .tick { fill: var(--text-2); font-size: 12px; font-family: var(--font-sans); }
.chart .axis-label { fill: var(--text-2); font-size: 13px; font-family: var(--font-sans); }
.chart .pt { fill: var(--d4); stroke: var(--accent); stroke-width: 1.2; }
.chart .pt.neg { fill: var(--oxide); stroke: var(--negative); }
.chart a:hover .pt, .chart a:focus .pt { fill: var(--accent-2); stroke: var(--cream); }
.chart a:focus { outline: none; }
.chart a:focus-visible .pt { stroke-width: 3; }
@media (max-width: 480px) { .tile-value { font-size: 22px; } }
.chart { max-width: 900px; }
.dot.positive { background: var(--positive); }

/* Sector and company pages */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
table.data td.strong { font-weight: 600; color: var(--cream); }
table.data td.neg, .kf-value.neg { color: var(--negative); }
.block { display: block; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.filters .grow { flex: 1 1 240px; }
.filters .field { min-width: 0; }
.filters .select { min-width: 190px; }
.check-label { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; font-size: 15px; cursor: pointer; }
.check { width: 22px; height: 22px; accent-color: var(--accent); }
table.ranking { min-width: 820px; }
table.ranking td a { color: var(--text); font-weight: 500; text-decoration: none; }
table.ranking td a:hover { color: var(--accent-2); text-decoration: underline; }
th button.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; min-height: 32px; font: inherit; color: inherit; }
th button.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.chart .bar { fill: var(--d4); stroke: var(--accent); stroke-width: 1; }

.company-score { display: flex; flex-wrap: wrap; gap: 10px 40px; }
.score-block { display: flex; flex-direction: column; gap: 4px; }
.big-number { font-size: 34px; font-weight: 600; letter-spacing: -0.01em; color: var(--cream); font-variant-numeric: tabular-nums; }
.kf-list { list-style: none; margin: 0; padding: 0; }
.kf { display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(70px, 0.6fr) minmax(140px, 2fr) minmax(90px, 0.8fr); gap: 6px 14px;
  align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kf:last-child { border-bottom: 0; }
.kf-label { font-size: 15px; }
.kf-value { font-size: 18px; font-weight: 600; color: var(--cream); font-variant-numeric: tabular-nums; text-align: right; }
.kf-bar { display: flex; flex-direction: column; gap: 4px; }
.kf-median { text-align: right; }
@media (max-width: 600px) {
  .kf { grid-template-columns: minmax(0, 1fr) auto; }
  .kf-bar { grid-column: 1 / -1; }
  .kf-median { grid-column: 1 / -1; text-align: left; }
}
.pbar { position: relative; height: 8px; border-radius: 4px; background: var(--tile-hover); overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 4px; background: var(--accent); }
.pbar-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--rule); }
.advice { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.advice-item { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius-tile); background: var(--tile); border: 1px solid var(--tile-border); }
.advice-item.critical { border-color: var(--oxide); }
.advice-item.positive { border-color: var(--d3); }
.advice-text { font-size: 16px; line-height: 1.45; color: var(--text); }
.sev-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-strong); }
.footnote { font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 12px; }
.flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.flags li { display: flex; align-items: baseline; gap: 10px; }
.spark { display: block; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.spark-end { fill: var(--cream); }
.lang-toggle { min-height: 44px; padding: 0 16px; }
.field-label { font-size: 15px; font-weight: 500; }
.field.job { border-top: 1px solid var(--line); padding-top: 16px; }
.summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
pre.log { white-space: pre-wrap; font-size: 13px; color: var(--text-2); margin: 0; }
.tiles.awards { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }

/* Admin management sections */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plain-list > li:last-child { border-bottom: 0; }
.plain-list .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.plain-list .who a { color: var(--text); font-weight: 500; }
.editor { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--radius-tile); background: var(--tile); border: 1px solid var(--tile-border); }
textarea.input { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pair .field label { font-size: 13px; color: var(--text-2); font-weight: 400; }
.ranklist.compact li { padding: 8px 0; grid-template-columns: 32px minmax(0, 1fr) auto; }
.ranklist.compact .score { font-size: 16px; }
.file { font: inherit; color: var(--text); min-height: 44px; }
.file::file-selector-button { min-height: 44px; margin-right: 12px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--button-border); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.company-row { align-items: flex-start; }
.company-controls { display: grid; grid-template-columns: auto minmax(120px, 1fr) minmax(130px, 0.8fr) minmax(120px, 1fr) auto; gap: 8px; align-items: center; flex: 3 1 560px; }
@media (max-width: 900px) { .company-controls { grid-template-columns: minmax(0, 1fr); } }
.secret { padding: 12px 14px; border-radius: var(--radius-tile); border: 1px solid var(--d3); background: var(--tile); overflow-wrap: anywhere; }
table.audit td.detail { font-size: 13px; color: var(--text-2); max-width: 520px; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--accent-2); }
.notes.plain { color: var(--text); }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: var(--radius-pill); border: 1px solid var(--accent-2);
  color: var(--accent-2); font-size: 12px; font-weight: 600; vertical-align: middle; }

/* Server-rendered public pages */
.skip { position: absolute; left: -9999px; top: 8px; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--bg); z-index: 20; }
.skip:focus { left: 16px; }

.search-mini .input { height: 44px; width: min(260px, 60vw); }
.search-big { display: flex; flex-direction: column; gap: 8px; }
.search-row { display: flex; gap: 8px; flex-wrap: wrap; }
.search-row .input { flex: 1 1 240px; }
.hero { display: flex; flex-direction: column; gap: 14px; padding: 8px 4px 4px; max-width: 760px; }
.page-subtitle { margin: 8px 4px 0; font-family: var(--font-serif); font-weight: 400; font-size: 24px; color: var(--cream); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sev-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--radius-pill); border: 1px solid; white-space: nowrap; }
.sev-label.critical { color: var(--negative-text); border-color: var(--oxide); }
.sev-label.critical::before { content: "▲"; font-size: 10px; }
.sev-label.watch { color: var(--accent-2); border-color: var(--d3); }
.sev-label.watch::before { content: "●"; font-size: 10px; }
.sev-label.positive { color: var(--positive); border-color: var(--d3); }
.sev-label.positive::before { content: "✓"; font-size: 11px; }
.attention li { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
svg.pbar { width: 100%; height: 8px; display: block; }
svg.pbar .pbar-bg { fill: var(--tile-hover); }
svg.pbar .pbar-fill { fill: var(--accent); }
svg.pbar .pbar-mid { fill: var(--rule); }
.explainer { font-size: 16px; color: var(--cream); }
.qa { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.qa .sub { font-size: 19px; margin-bottom: 6px; }
.plain-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.prose p { max-width: 70ch; }
.year-pills a.pill-btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }
.year-pills a.pill-btn[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
tr.unranked[hidden], tr[hidden] { display: none; }
.company-head { display: flex; flex-direction: column; gap: 8px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.report-cta { flex-direction: column; }
@media (max-width: 899px) { .split [role="tabpanel"][hidden] { display: none; } }
.advice-item .sev-label, .flags .sev-label { align-self: flex-start; }
.issue { align-items: flex-start; }
.issue-controls { display: flex; flex-direction: column; gap: 8px; flex: 1 1 320px; min-width: 0; }

/* Front page (FEATURES-2026-10-25 §8): search first, sector tiles, trust strip. */
.hero-title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12;
  letter-spacing: -0.015em; color: var(--cream); text-wrap: balance; }
.search-big .input { height: 60px; font-size: 18px; }
.sector-tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .sector-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sector-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 88px; padding: 14px;
  border-radius: var(--radius-tile); background: var(--tile); border: 1px solid var(--tile-border); color: var(--text);
  text-decoration: none; font: inherit; text-align: left; cursor: pointer; }
a.sector-tile { border-color: var(--accent); }
a.sector-tile:hover { background: var(--tile-hover); color: var(--cream); }
.sector-tile .name { font-size: 17px; font-weight: 600; color: var(--cream); }
.sector-tile .state { font-size: 13px; color: var(--text-2); }
button.sector-tile[aria-pressed="true"] .state { color: var(--accent-2); }
.trust-strip { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0 4px; list-style: none; font-size: 14px; color: var(--text-2); }

/* Company page above the fold: score, profile, one peer sentence. */
.fold { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .fold { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.fold-score { display: flex; flex-direction: column; gap: 8px; }
.fold-score .big-number { font-size: 56px; line-height: 1; }
.profile { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: start; }
.profile-name { margin: 0; font-family: var(--font-serif); font-size: 24px; color: var(--cream); }
.profile-name .role { color: var(--text-2); font-size: 18px; }
.profile p { margin: 0; }
.pmap { width: 88px; height: 88px; }
.pmap-frame { fill: none; stroke: var(--navy); stroke-width: 1.5; }
.pmap-q { fill: var(--d4); }
.pmap-cut { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 3; }
.pmap-ring { fill: none; stroke: var(--cream); stroke-width: 2; }
.pmap-dot { fill: var(--cream); }
.change-line { margin: 0; font-size: 17px; color: var(--text-strong); }
.roles dt { font-weight: 500; }
.pad { padding: 0 4px; }
.peer-compare { margin: 0; font-size: 18px; line-height: 1.4; color: var(--cream); border-top: 1px solid var(--line); padding-top: 14px; }
.lists4 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .lists4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.filter-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.filter-grid > .field:first-child { grid-column: 1 / -1; }
@media (max-width: 699px) { .filter-grid label { font-size: 14px; } }
@media (min-width: 700px) { .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .filter-grid > .field:first-child { grid-column: auto; } }
.pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.notice-soft { margin: 0; padding: 10px 12px; border-radius: var(--radius-tile); border: 1px solid var(--d3); color: var(--accent-2); font-size: 14px; }
.small-input { height: 44px; min-width: 70px; max-width: 110px; }
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
.answer p { margin: 0 0 8px; }
.animal { display: block; width: 100%; height: auto; color: var(--cream); }
.animal-wrap { width: 132px; max-width: 100%; margin: 4px 0 2px; }
.animal-cell { display: block; width: 96px; margin-bottom: 4px; }

/* --- Design 25.10.2026: page frame (DESIGN_HANDOFF.md §1, §2) ------------------------------- */
.wrap { width: 100%; max-width: var(--content); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .wrap { padding-left: 40px; padding-right: 40px; } }

.label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.serif { font-family: var(--font-serif); }

/* Logo lockup: navy square with a serif M, two-line wordmark (roman «Morning», italic «Analytics»). */
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--navy); text-decoration: none; }
.logo:hover { color: var(--navy); }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--navy);
  color: var(--paper); font-family: var(--font-serif); font-weight: 600; font-size: 32px; line-height: 1; padding-top: 2px; }
.logo-word { display: flex; flex-direction: column; font-family: var(--font-serif); font-size: 19px; font-weight: 500; line-height: 1.02; letter-spacing: -0.01em; }
.logo-word em { font-style: italic; font-weight: 400; }
@media (max-width: 719px) {
  .logo-mark { width: 34px; height: 34px; font-size: 25px; }
  .logo-word { font-size: 15px; }
}

.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.mainnav { display: none; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 14px; }
.mainnav a, .menu-panel a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.mainnav a:hover, .menu-panel a:hover { text-decoration: underline; color: var(--ink); }
.mainnav a[aria-current="page"], .menu-panel a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--navy); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.lang-switch { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.lang-switch strong { color: var(--ink); }
.lang-switch a { color: var(--muted); min-height: 44px; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.lang-switch a:hover { color: var(--ink); text-decoration: underline; }
.mainnav .lang-switch { border-left: 1px solid var(--rule); padding-left: 20px; }
.phone-nav { display: flex; align-items: center; gap: 8px; }
.menu { position: static; }
.menu summary { list-style: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; cursor: pointer; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; left: 0; right: 0; top: 66px; z-index: 30; display: flex; flex-direction: column; padding: 8px 16px 16px;
  background: var(--paper); border-bottom: 1px solid var(--ink); }
.menu-panel a { border-bottom: 1px solid var(--rule); font-size: 16px; }
.site-header { position: relative; }
@media (min-width: 900px) {
  .mainnav { display: flex; }
  .phone-nav { display: none; }
}

.crumbs { font-size: 13px; color: var(--muted); padding: 0; }
.crumbs li + li::before { content: "/"; margin: 0 6px 0 0; color: var(--muted); }
.crumbs a { color: var(--navy); text-decoration: underline; }

.site-footer { margin-top: 96px; border-top: 1px solid var(--ink); }
.footer-row { display: flex; flex-wrap: wrap; gap: 24px 32px; justify-content: space-between; padding-block: 36px 48px; font-size: 13px; color: var(--muted); }
.footer-text { display: flex; flex-direction: column; gap: 10px; max-width: 600px; }
.footer-text p { margin: 0; }
.footer-word { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--navy); }
.footer-word em { font-weight: 400; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; align-items: flex-start; }
.footer-links a { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--oxide); }
@media (max-width: 719px) { .site-footer { margin-top: 48px; } .footer-row { padding-block: 20px 28px; font-size: 12px; } }
.skip { background: var(--navy); color: var(--paper); border-radius: var(--radius); }

/* --- Design 25.10.2026: components and front page (DESIGN_HANDOFF.md §4.1, §5) ---------------- */
.h2 { margin: 6px 0 16px; font-family: var(--font-serif); font-weight: 500; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.h2.sm { font-size: clamp(24px, 2.6vw, 28px); margin-bottom: 12px; }
.empty-note { margin: 0; padding: 14px 0; color: var(--muted); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.placeholder-tag { display: inline-block; margin: 8px 0 0; padding: 2px 8px; border: 1px dashed var(--guide); color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.neg { color: var(--oxide); }
.nowrap { white-space: nowrap; }
.linkbtn { all: unset; color: var(--navy); text-decoration: underline; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.linkbtn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.linkbtn[aria-pressed="true"] { color: var(--muted); text-decoration: none; }

/* Search box: input and button joined, no pill shapes. */
.searchbox { display: flex; flex-wrap: wrap; max-width: 700px; }
.searchbox input { flex: 1 1 240px; min-width: 0; height: 48px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--ink); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.searchbox button { height: 48px; padding: 0 24px; font: inherit; font-size: 16px; font-weight: 600; color: var(--on-navy); background: var(--navy);
  border: 1px solid var(--navy); border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.searchbox button:hover { background: var(--d2); border-color: var(--d2); }
.searchbox input:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.searchbox.big input, .searchbox.big button { height: 60px; font-size: 18px; }
.searchbox.big button { padding: 0 32px; }
@media (max-width: 599px) {
  .searchbox input { flex-basis: 100%; border-right: 1px solid var(--ink); border-radius: var(--radius); }
  .searchbox button { flex: 1 1 100%; margin-top: 8px; border-radius: var(--radius); }
  .searchbox.big input { height: 56px; font-size: 16px; } .searchbox.big button { height: 48px; }
}

/* Hero */
.hero2 { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: flex-end; padding-block: 72px 48px; }
.hero2-main { flex: 1 1 560px; min-width: 0; }
.fp-h1 { margin: 16px 0 32px; font-family: var(--font-serif); font-weight: 500; font-size: clamp(34px, 5vw, 52px); line-height: 1.06; letter-spacing: -0.02em; max-width: 760px; text-wrap: balance; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; font-size: 14px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--muted); text-decoration: none; }
a.chip { color: var(--navy); border-color: var(--navy); font-weight: 500; }
a.chip.on { background: var(--navy); color: var(--on-navy); }
a.chip:hover { background: var(--d5); color: var(--navy); }
a.chip.on:hover { background: var(--d2); color: var(--on-navy); }
.hero2-aside { flex: 1 1 280px; max-width: 380px; border-top: 2px solid var(--navy); padding-top: 16px; }
.read-text { font-size: 20px; line-height: 1.35; margin: 10px 0 8px; }
@media (max-width: 719px) { .hero2 { padding-block: 32px 24px; } .fp-h1 { margin: 10px 0 20px; } }

/* Trust strip and source line */
.trust { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 36px; padding-block: 12px; font-size: 13px; color: var(--muted); }
.source-line { margin: 0; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }

/* Front page rows */
.fp-row { display: flex; flex-wrap: wrap; gap: 40px 56px; padding-block: 64px 0; }
.fp-wide { flex: 999 1 600px; min-width: 0; }
.fp-side { flex: 1 1 300px; min-width: 0; }
.fp-half { flex: 1 1 440px; min-width: 0; }
.fp-block { padding-block: 72px 0; }
@media (max-width: 719px) { .fp-row { padding-block: 40px 0; } .fp-block { padding-block: 48px 0; } }

/* Tabs (TabBar): without JS every panel shows with its heading. */
.tabbar { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.tab { all: unset; min-height: 44px; display: inline-flex; align-items: center; margin-right: 24px; color: var(--muted); font-weight: 500; cursor: pointer;
  border-bottom: 2px solid transparent; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--navy); }
.tab:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.tab-heading { margin: 24px 0 6px; font-family: var(--font-serif); font-weight: 500; font-size: 20px; }
.tabs.js .tab-heading { display: none; }
.tabs.js .tabpanel[hidden] { display: none; }
.table-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 4px; font-size: 13px; }
table.rank-table.collapsed tr.extra { display: none; }

/* Ranking table */
table.data a.co-name, .headlines a.co-name { font-family: var(--font-serif); font-size: 18px; font-weight: 500; color: var(--navy); text-decoration: none; }
table.data a.co-name:hover, .headlines a.co-name:hover { text-decoration: underline; color: var(--oxide); }
table.rank-table td { padding-block: 12px; }
.profile-badge { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); }
.pb-text { display: flex; flex-direction: column; color: var(--ink); line-height: 1.25; }
.pb-pos { font-size: 13px; color: var(--muted); }
.trend-line { stroke: var(--navy); stroke-width: 1.5; }
@media (max-width: 599px) { .hide-sm { display: none; } table.data a.co-name { font-size: 16px; } }

/* Animals: engraved PNG in a square box, artwork contained. Optional thin ring. */
img.animal { display: block; object-fit: contain; flex: none; }
.animal-28 { width: 28px; height: 28px; } .animal-36 { width: 36px; height: 36px; } .animal-40 { width: 40px; height: 40px; }
.animal-56 { width: 56px; height: 56px; } .animal-64 { width: 64px; height: 64px; } .animal-96 { width: 96px; height: 96px; }
.animal-ring { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--navy); border-radius: 50%; flex: none; }
.animal-ring-40 { width: 56px; height: 56px; } .animal-ring-64 { width: 96px; height: 96px; }

/* What changed */
.headlines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.headlines li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.headlines p { margin: 2px 0 4px; }

/* Navy stress test band */
.band { background: var(--navy); color: var(--on-navy); margin-top: 64px; }
.band-row { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: center; padding-block: 64px; }
.band-text { flex: 1 1 420px; min-width: 0; }
.band-text p { margin: 0 0 20px; color: var(--on-navy-2); max-width: 520px; }
.band a { color: var(--on-navy); font-weight: 600; }
.band a:hover { color: var(--on-navy-2); }
.label.on-navy { color: var(--on-navy-label); }
.h2.on-navy { color: var(--on-navy); font-size: clamp(28px, 3.2vw, 38px); margin: 8px 0 16px; }
.on-navy-2 { color: var(--on-navy-2); }
.band-bars { flex: 1 1 420px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sbar-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; color: var(--on-navy-2); }
.sbar-track { display: block; width: 100%; height: 8px; margin-top: 6px; }
.sbar-bg { fill: var(--d2); } .sbar-fill { fill: var(--on-navy); }
@media (max-width: 719px) { .band { margin-top: 40px; } .band-row { padding-block: 40px; } }

/* Position chart */
.poschart-wrap { max-width: 600px; }
.poschart { display: block; width: 100%; height: auto; overflow: visible; }
.pc-plot { fill: var(--surface); stroke: var(--rule); }
.pc-lead { fill: var(--d6); }
.pc-quad text.on-lead { stroke: var(--d6); }
.pc-grid line { stroke: var(--rule); stroke-width: 0.6; }
.pc-cut { stroke: var(--guide); stroke-dasharray: 2 4; }
.pc-quad text { font-family: var(--font-sans); font-size: 10px; font-weight: 600; fill: var(--muted); letter-spacing: 0.12em;
  paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.pc-b { fill: var(--d3); fill-opacity: 0.18; stroke: var(--d2); stroke-width: 0.9; }
.pc-pt { outline: none; }
.pc-pt .pc-b { transition: fill-opacity .15s ease, stroke-width .15s ease; }
.pc-pt.key .pc-b { fill: var(--navy); fill-opacity: 0.9; stroke: var(--surface); stroke-width: 1.5; }
a.pc-pt:hover .pc-b, a.pc-pt:focus-visible .pc-b { fill-opacity: 0.45; stroke: var(--navy); stroke-width: 1.6; }
a.pc-pt.key:hover .pc-b, a.pc-pt.key:focus-visible .pc-b { fill: var(--oxide); fill-opacity: 1; stroke: var(--surface); }
a.pc-pt:focus-visible .pc-b { outline: none; stroke: var(--ink); stroke-width: 2.2; }
.pc-names text { font-family: var(--font-serif); font-size: 13.5px; font-weight: 500; fill: var(--ink);
  paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.pc-axis text { font-family: var(--font-sans); font-size: 10px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.pc-axis .pc-title { font-size: 11px; letter-spacing: 0.02em; fill: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pc-pt .pc-b { transition: none; } }
.legend4 { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 40px; border-top: 1px solid var(--ink); }
.legend4 li { padding: 16px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.legend-head { display: inline-flex; align-items: center; gap: 12px; }
.legend-head strong { font-size: 19px; font-weight: 600; }

/* Sector tiles */
.stiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stile { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--rule); color: var(--muted); text-decoration: none; }
.stile-name { font-family: var(--font-serif); font-size: 22px; color: var(--ink); }
.stile-meta { font-size: 13px; }
.stile.live { background: var(--navy); border-color: var(--navy); color: var(--on-navy-2); }
.stile.live .stile-name { color: var(--on-navy); font-weight: 500; }
.stile.live:hover { background: var(--d2); }

/* Tools */
.tools { border-top: 1px solid var(--ink); }
.tool { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.tool p { margin: 2px 0 0; }
.tool-name { font-size: 20px; font-weight: 600; color: var(--ink); }
a.tool-name { color: var(--navy); }

/* --- Company page (DESIGN_HANDOFF.md §4.2, Company.dc.html) -------------------------------------------- */
.company2 { display: flex; flex-direction: column; }
.co-head { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.co-h1 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: clamp(34px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.co-meta { margin: 0; font-size: 13px; color: var(--muted); }
.co-years { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 12px; font-size: 14px; }
.co-year { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.co-year:hover { color: var(--ink); }
.co-year[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--navy); }
.company2 > .notice { margin: 16px 0 0; }

.co-fold { margin-top: 20px; border-top: 2px solid var(--navy); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0 48px; }
.co-cell { padding: 24px 0; min-width: 0; }
.co-cell + .co-cell { border-left: 1px solid var(--rule); padding-left: 32px; }
@media (max-width: 999px) { .co-cell + .co-cell { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); } }
.co-fold .label { margin: 0; }
.co-score { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 0; }
.co-num { font-family: var(--font-serif); font-weight: 500; font-size: clamp(88px, 10vw, 112px); line-height: 1; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.co-of { color: var(--muted); }
.co-read { margin: 8px 0 0; font-size: 14px; max-width: 360px; }
.co-small { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.co-lede { margin: 12px 0 0; font-family: var(--font-serif); font-size: 22px; line-height: 1.3; }
.co-profile { display: flex; gap: 18px; align-items: center; margin-top: 12px; }
.co-profile .animal-ring-64 { width: 88px; height: 88px; }
.co-pname { margin: 0; font-family: var(--font-serif); font-size: 28px; font-weight: 600; line-height: 1.1; }
.co-ppos { margin: 4px 0 0; }
.co-vs { margin: 12px 0 0; font-family: var(--font-serif); font-size: clamp(22px, 2.4vw, 26px); line-height: 1.25; }

.co-strip { display: flex; flex-wrap: wrap; gap: 6px 32px; padding-block: 10px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--muted); }

.co-row { display: flex; flex-wrap: wrap; gap: 40px 56px; margin-top: 56px; }
.co-col { flex: 1 1 480px; min-width: 0; }
.co-col.narrow { flex-basis: 260px; }
.co-block { margin-top: 56px; }
.co-gap { margin-top: 40px; }
.co-gap-s { margin-top: 16px; }
.co-sub { margin: 24px 0 8px; font-size: 15px; font-weight: 600; }
@media (max-width: 719px) { .co-row, .co-block { margin-top: 40px; } }

.kf-table th[scope="row"] { font-weight: 400; }
.kf-table td.num { font-weight: 500; }
.kf-pos { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.kf-pos svg.pbar { flex: 1 1 auto; max-width: 120px; height: 6px; }
.kf-pos .co-small { margin: 0; white-space: nowrap; }
svg.pbar .pbar-bg { fill: var(--d5); }
svg.pbar .pbar-fill { fill: var(--navy); }
svg.pbar .pbar-mid { fill: var(--guide); }
.comp-table { margin-top: 4px; }
.comp-table th[scope="row"] { font-weight: 400; }

.histchart-wrap { max-width: 600px; }
.histchart { display: block; width: 100%; height: auto; }
.hc-shade { fill: var(--d5); }
.hc-grid line { stroke: var(--rule); stroke-width: 0.8; }
.hc-base { stroke: var(--ink); }
.hc-line { fill: none; stroke: var(--navy); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.hc-median { fill: none; stroke: var(--d3); stroke-width: 1.6; stroke-dasharray: 5 4; }
.hc-pt { fill: var(--surface); stroke: var(--navy); stroke-width: 1.6; }
.hc-end { fill: var(--navy); }
.hc-name { font-family: var(--font-sans); font-size: 12px; font-weight: 600; fill: var(--navy); }
.hc-medlabel { font-family: var(--font-sans); font-size: 12px; fill: var(--muted); }
.hc-axis text { font-family: var(--font-sans); font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.hc-note { font-family: var(--font-sans); font-size: 11px; fill: var(--muted); }
.hc-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.hc-legend li { display: inline-flex; align-items: center; gap: 8px; }
.hc-key { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--navy); }
.hc-key.dash { border-top: 2px dashed var(--d3); }

.co-analysis { margin: 0 0 12px; font-family: var(--font-serif); font-size: 19px; line-height: 1.5; max-width: 62ch; }
.co-advice, .co-flags { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.co-advice li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.co-advice li p { margin: 6px 0 0; }
.co-advice li .co-small { margin-top: 4px; }
.co-flags li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sev-label { border-radius: var(--radius); }
.sev-label.positive { color: var(--navy); }

.co-qa { display: grid; gap: 0 40px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); border-top: 1px solid var(--ink); }
.co-qa > div { border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.co-qa .co-sub { margin-top: 16px; font-family: var(--font-serif); font-size: 19px; font-weight: 500; }

.co-facts .co-col { flex-basis: 380px; }
.co-facts .co-col.narrow { flex-basis: 260px; }
.co-dl { margin: 12px 0 0; border-top: 1px solid var(--ink); display: grid; grid-template-columns: minmax(120px, 160px) minmax(0, 1fr); font-size: 14px; }
.co-dl dt { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.co-dl dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); min-width: 0; overflow-wrap: anywhere; }
.co-rule { margin: 12px 0 16px; padding-top: 10px; border-top: 1px solid var(--ink); font-size: 14px; }
.co-links { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.co-links li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.co-links a.co-name { font-family: var(--font-serif); font-size: 17px; font-weight: 500; text-decoration: none; }
.co-links a.co-name:hover { text-decoration: underline; }

/* --- Sector page (DESIGN_HANDOFF.md §4.3, Sector.dc.html) --------------------------------------------- */
.sector2 { display: flex; flex-direction: column; }
.sec-head { margin-top: 8px; }
.sec-h1 { margin: 6px 0 10px; font-family: var(--font-serif); font-weight: 500; font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
.sec-lede { margin: 0; max-width: 720px; color: var(--muted); }
.sector2 .co-row.sec-first { margin-top: 32px; padding-top: 8px; border-top: 2px solid var(--navy); }
.sec-tabrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 24px; }
.tab-n { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-movers { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.sec-movers li { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.sec-movers li .co-small { margin-top: 4px; }
.sec-movers a.co-name { font-family: var(--font-serif); font-size: 18px; font-weight: 500; color: var(--navy); text-decoration: none; }
.sec-movers a.co-name:hover { text-decoration: underline; color: var(--oxide); }
.sec-move { font-family: var(--font-serif); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-chart { margin-top: 12px; }
.sec-article { border-top: 2px solid var(--navy); padding-top: 16px; align-self: flex-start; }
.sec-more { margin-top: 72px; display: flex; flex-direction: column; gap: 8px; }
.sec-more > .card { margin-top: 32px; }
@media (max-width: 719px) { .sec-more { margin-top: 48px; } }

/* --- About (DESIGN_HANDOFF.md §4.4, About.dc.html) ----------------------------------------------------- */
.about2 { display: flex; flex-wrap: wrap; gap: 40px 72px; margin-top: 16px; }
.about-main { flex: 1 1 560px; min-width: 0; max-width: 720px; }
.about-main > p { font-size: 17px; line-height: 1.6; margin: 0 0 16px; }
.about-h1 { margin: 8px 0 24px; font-family: var(--font-serif); font-weight: 500; font-size: clamp(34px, 5vw, 52px); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
.about-main > p.about-lede { font-family: var(--font-serif); font-size: clamp(20px, 2.2vw, 24px); line-height: 1.4; }
.about-sec { margin-top: 48px; border-top: 1px solid var(--ink); padding-top: 12px; }
.about-sec p { margin: 8px 0 0; }
.about-side { flex: 1 1 280px; max-width: 380px; align-self: flex-start; border-top: 2px solid var(--navy); padding-top: 16px; }
.about-side .co-dl { grid-template-columns: minmax(90px, 110px) minmax(0, 1fr); }
.about-side .co-links { margin-top: 24px; }

/* Old dashboard tiles in the new design: values must fit their tile. */
.tiles { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.tile { min-width: 0; }
.tile-value { font-size: clamp(20px, 1.8vw, 24px); overflow-wrap: normal; }
.about-h1 { margin-top: 18px; }

/* Position chart: tap-for-detail on phones. */
.pc-detail { margin: 10px 0 0; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 14px; }
.pc-detail a { font-family: var(--font-serif); font-size: 17px; font-weight: 500; }
a.pc-pt.on .pc-b { fill: var(--oxide); fill-opacity: 1; stroke: var(--surface); stroke-width: 1.5; }

/* Admin: hamburger menu and collapsible sections. */
.admin-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-head .section-title { margin: 0; flex: 1 1 auto; }
.admin-menu { display: flex; flex-direction: column; gap: 20px; }
.admin.menu-closed .admin-menu { display: none; }
.admin.menu-closed aside { flex: 0 0 auto; }
.menu-btn { all: unset; box-sizing: border-box; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); cursor: pointer; flex: none; }
.menu-btn:hover { border-color: var(--navy); }
.menu-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.menu-icon { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.menu-icon span { display: block; height: 2px; background: var(--navy); transition: transform .15s ease, opacity .15s ease; }
.menu-btn[aria-expanded="true"] .menu-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-tools { margin-bottom: 8px; }
.nav-tools .btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
@media (max-width: 899px) {
  .admin aside { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--rule); padding-block: 12px; position: sticky; top: 0; z-index: 20; }
  .admin-nav { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .admin-nav a { border: 0; }
  .admin:not(.menu-closed) aside { max-height: 100vh; overflow-y: auto; }
}
.sec-toggle { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 44px; cursor: pointer; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.sec-toggle:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.sec-chevron { width: 10px; height: 10px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease; flex: none; }
.card.collapsed .sec-chevron { transform: rotate(-45deg); }
.card.collapsed > :not(.sec-keep) { display: none !important; }
@media (prefers-reduced-motion: reduce) { .menu-icon span, .sec-chevron { transition: none; } }
.admin-head { flex-wrap: wrap; justify-content: space-between; }
.admin-head .logo { order: 1; }
.admin-head .menu-btn { order: 2; }
.admin-head .section-title { order: 3; flex: 1 1 100%; }
.admin.menu-closed aside { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--rule); padding-block: 12px; }
.admin.menu-closed .admin-head .section-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.admin main > .card.collapsed { padding-bottom: 0; }
.admin main > .card.collapsed .section-title { margin-bottom: 0; }
.admin main:has(> .card.collapsed) { gap: 4px; }

/* Company list: letters, filters and results. */
.companies2 { display: flex; flex-direction: column; gap: 24px; }
.cl-filters { border-top: 2px solid var(--navy); padding-top: 16px; }
.letters { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.letters a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 6px;
  border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--navy); font-weight: 500; }
.letters a:hover { border-color: var(--navy); }
.letters a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.letters a.all { padding: 0 14px; }
.cl-results .h2 { margin-top: 0; }
.cl-table a.co-name { font-size: 17px; }
.cl-org { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Sectors overview: one row per sector. */
.sectors2 { display: flex; flex-direction: column; gap: 24px; }
.sx-list { border-top: 2px solid var(--navy); }
.sx { display: flex; flex-wrap: wrap; gap: 16px 48px; padding-block: 28px; border-bottom: 1px solid var(--rule); }
.sx-main { flex: 1 1 420px; min-width: 0; }
.sx-side { flex: 1 1 340px; min-width: 0; }
.sx-name { margin: 6px 0 8px; font-family: var(--font-serif); font-weight: 500; font-size: clamp(26px, 3vw, 32px); line-height: 1.15; }
.sx-name a { color: var(--ink); text-decoration: none; }
.sx-name a:hover { text-decoration: underline; color: var(--navy); }
.sx-desc { margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.55; }
.sx-figs { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 24px; }
.sx-figs > div { border-top: 1px solid var(--ink); padding-top: 6px; }
.sx-figs dt { font-size: 12px; color: var(--muted); }
.sx-figs dd { margin: 2px 0 0; font-family: var(--font-serif); font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sx-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }

/* Admin: job status dashboard. Status is always written out; the dot and colour only support it. */
.jb-state { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; }
.jb-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--guide); }
.jb-state.ok .jb-dot { background: var(--navy); }
.jb-state.watch .jb-dot { background: var(--d3); }
.jb-state.critical .jb-dot { background: var(--oxide); }
.jb-state.critical { color: var(--oxide); }
.jb-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.jb-src { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--rule); border-top: 2px solid var(--navy); background: var(--surface); }
.jb-meta { font-size: 13px; color: var(--muted); }
.jb-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.jb-budget { display: flex; flex-direction: column; gap: 6px; }
.jb-num { font-family: var(--font-serif); font-size: 22px; font-variant-numeric: tabular-nums; }
.jb-bar { display: block; width: 100%; max-width: 240px; height: 8px; }
.jb-bg { fill: var(--d5); }
.jb-fill { fill: var(--navy); }
.jb-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.jb-queue li { display: inline-flex; gap: 8px; align-items: baseline; }
.jb-queue strong { font-family: var(--font-serif); font-size: 20px; font-weight: 500; }
.jb-table th[scope="row"] { font-weight: 400; }
.jb-open { color: var(--muted); font-size: 13px; }
.jb-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.jb-cell .jb-bar { max-width: 120px; flex: 1 1 auto; }
.jb-cell span { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jb-strip-cell { min-width: 240px; }
.jb-strip { display: block; width: 100%; min-width: 200px; height: 16px; }
.jb-axis { stroke: var(--rule); }
.jb-run { fill: var(--navy); }
.jb-fail { fill: var(--oxide); }
.admin main > .card { min-width: 0; } .admin main > .card p, .admin main > .card .tile-value, .admin main > .card .jb-meta { overflow-wrap: anywhere; }

/* Admin: six groups in the menu, the open group's sections under it. */
.admin-nav { gap: 2px; }
.nav-group { border-bottom: 1px solid var(--rule); padding-block: 2px; }
.admin-nav a.nav-g { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 56px; padding: 8px 14px; }
.nav-g-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.nav-g-desc { font-size: 12px; color: var(--muted); line-height: 1.35; }
.admin-nav a.nav-g[aria-current="page"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--navy); }
.nav-sub { display: flex; flex-direction: column; padding: 2px 0 8px 14px; }
.admin-nav .nav-sub a { min-height: 40px; padding: 0 12px; font-size: 14px; color: var(--muted); border-left: 1px solid var(--rule); border-radius: 0; }
.admin-nav .nav-sub a[aria-current="true"], .admin-nav .nav-sub a:hover { color: var(--navy); border-left-color: var(--navy); background: transparent; }
.admin-user { border-top: 1px solid var(--rule); padding-top: 16px; }
.group-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }
.group-title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; }
.group-head .muted { margin: 0; }
.group-head .nav-tools { margin: 6px 0 0; }
/* Needs action, and shortcuts to the other groups */
.att-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.att-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.att-list li > span:nth-child(2) { flex: 1 1 260px; min-width: 0; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-top: 8px; }
.quick-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--rule); border-top: 2px solid var(--navy);
  background: var(--surface); text-decoration: none; color: var(--ink); min-height: 44px; }
.quick-tile:hover { border-color: var(--navy); }
.quick-name { font-family: var(--font-serif); font-size: 19px; font-weight: 500; color: var(--navy); }
.quick-desc { font-size: 13px; color: var(--muted); }

/* Server errors in admin, and the public error page */
.err-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.err-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.err-list p { margin: 2px 0; }
.err-msg { color: var(--oxide); overflow-wrap: anywhere; }
.err-trace { max-height: 320px; overflow: auto; font-size: 12px; background: var(--surface); border: 1px solid var(--rule); padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.error-page { padding-block: 64px; }

/* Bankruptcies and liquidations */
.distress2 { display: flex; flex-direction: column; gap: 28px; }
.dz-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-top: 8px; }
.dz-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--rule); border-top: 2px solid var(--navy);
  background: var(--surface); text-decoration: none; color: var(--ink); }
.dz-tile:hover { border-color: var(--navy); }
.dz-tile.on { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.dz-n { font-family: var(--font-serif); font-size: 34px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dz-k { font-size: 14px; }
.yearbars-wrap { max-width: 600px; margin-top: 8px; }
.yearbars { display: block; width: 100%; height: auto; }
.yb-base { stroke: var(--ink); }
.yb-bar { fill: var(--navy); }
.yb-bar.partial { fill: var(--d4); }
.yb-n { font-family: var(--font-sans); font-size: 12px; fill: var(--ink); font-variant-numeric: tabular-nums; }
.yb-year { font-family: var(--font-sans); font-size: 12px; fill: var(--muted); }
.yb-note { font-family: var(--font-sans); font-size: 10px; fill: var(--muted); font-style: italic; }
.dz-list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.dz-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.dz-list .co-small { margin: 0; }

/* SSB sector context on the sector page */
.ssb .sub { margin-top: 20px; }
.ssb-figs { margin: 8px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 24px; }
.ssb-figs > div { border-top: 1px solid var(--ink); padding-top: 6px; min-width: 0; }
.ssb-figs dt { font-size: 12px; color: var(--muted); }
.ssb-figs dd { margin: 2px 0 0; font-family: var(--font-serif); font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ssb-figs dd.co-small { font-family: inherit; font-size: 13px; font-weight: 400; color: var(--muted); }
.ssb-bars { max-width: 640px; margin-top: 8px; }
.ssb-index { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.ssb-index p { margin: 0; }
.ssb-big { font-family: var(--font-serif); font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ssb-source { margin-top: 20px; }

/* Municipality pages */
.muni-big { margin: 4px 0 8px; }
.muni-big strong { font-family: var(--font-serif); font-size: 48px; font-weight: 500; font-variant-numeric: tabular-nums; }
.muni-score .table-wrap { max-width: 720px; }
