:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: #e1e0d9;
  --accent: #2a78d6;
  /* Stats charts: one hue per chart, in turn (validated categorical slots; red and green stay for up/down). */
  --chart-1: #2a78d6; --chart-2: #eb6834; --chart-3: #1baf7a; --chart-4: #6250d6; --chart-5: #e87ba4;
  --up: #006300;
  --down: #d03b3b;
  --warn-bg: #fff5dc;
  --warn-ink: #6b4a00;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --border: #2c2c2a;
    --accent: #3987e5; --up: #0ca30c; --down: #e66767;
    --chart-1: #3987e5; --chart-2: #d95926; --chart-3: #199e70; --chart-4: #9085e9; --chart-5: #d55181;
    --warn-bg: #3a2e10; --warn-ink: #f3d68b;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --border: #2c2c2a;
  --accent: #3987e5; --up: #0ca30c; --down: #e66767;
    --chart-1: #3987e5; --chart-2: #d95926; --chart-3: #199e70; --chart-4: #9085e9; --chart-5: #d55181;
  --warn-bg: #3a2e10; --warn-ink: #f3d68b;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }
h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }

.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 24px; align-items: center;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img { display: block; }
.wordmark { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.wordmark span { color: var(--accent); font-weight: 700; }
/* Header menu (static/menu.js): inline links on wide screens, a dropdown behind a Menu button on narrow ones. */
.topnav { margin-left: auto; position: relative; font-size: 13px; }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.menu-list a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.menu-list a:hover { color: var(--ink); background: var(--surface-2); }
.menu-list a[aria-current="page"] { color: var(--accent); font-weight: 600; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.menu-list small { display: none; }
.menu-toggle { display: none; align-items: center; gap: 6px; padding: 7px 11px; font: inherit; font-size: 13px; font-weight: 500;
  color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.menu-toggle:hover { background: var(--surface-2); }
.menu-toggle .m-close, .topnav.open .menu-toggle .m-open { display: none; }
.topnav.open .menu-toggle .m-close { display: inline; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .menu-list { display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; flex-direction: column; gap: 2px;
    min-width: 260px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.18); }
  .topnav.open .menu-list { display: flex; }
  .menu-list a { padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--ink); white-space: normal; }
  .menu-list small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
}
.search { position: relative; flex: 1; max-width: 640px; }
.search input {
  width: 100%; padding: 9px 12px; font: inherit; color: var(--ink); background: var(--page);
  border: 1px solid var(--border); border-radius: 8px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); max-height: 60vh; overflow: auto;
}
.results li { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.results li:hover, .results li[aria-selected="true"] { background: var(--surface-2); }
.results .r-name { font-weight: 500; }
.results .r-sub { color: var(--ink-2); font-size: 12px; }

.banner { margin: 16px 24px 0; padding: 10px 14px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); }

.home { max-width: 760px; margin: 64px auto; padding: 0 24px; }
.home h1 { font-size: 30px; }
.lede { color: var(--ink-2); font-size: 16px; }
.howto { color: var(--ink-2); list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.howto li { display: flex; align-items: center; gap: 12px; margin: 0; }
.howto-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

#company { padding: 20px 24px 64px; max-width: 1400px; margin: 0 auto; }
.company-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: 13px; }
.meta .pill { padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  font: inherit; font-weight: 500; padding: 7px 12px; border-radius: 8px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-sm { padding: 3px 8px; font-size: 12px; }

.job { margin: 16px 0 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.job-text { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.bar { height: 4px; background: var(--surface-2); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.spinner { width: 12px; height: 12px; border: 2px solid var(--grid); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabs { display: flex; gap: 4px; margin: 20px 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; align-items: flex-end; }
.tabs button {
  font: inherit; font-weight: 500; padding: 8px 12px; background: none; border: 0; color: var(--ink-2); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.units { margin-left: auto; color: var(--ink-2); font-size: 12px; display: flex; gap: 6px; align-items: center; padding-bottom: 6px; white-space: nowrap; }
.units select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 2px 4px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; min-width: 0; }
.card .sub { color: var(--muted); font-size: 12px; margin: -8px 0 12px; }
.chart { position: relative; height: 280px; }
.empty { color: var(--ink-2); padding: 24px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: 10px; }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.tile .label { color: var(--ink-2); font-size: 12px; }
.tile .value { font-size: 22px; font-weight: 600; margin-top: 2px; }
.tile .delta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.delta .up { color: var(--up); }
.delta .down { color: var(--down); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-top: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 6px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--grid); }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
thead th { color: var(--ink-2); font-weight: 500; font-size: 12px; vertical-align: bottom; }
thead th .h-sub { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
tr.subtotal td { font-weight: 600; }
tr.derived td:first-child { color: var(--ink-2); font-style: italic; }
td.na { color: var(--muted); }
td.ai { background: color-mix(in srgb, var(--s7) 9%, transparent); }
td.cmp { color: var(--ink-2); }
.conflict { text-decoration: underline dotted var(--down); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legend-note { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 12px; padding: 8px 12px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

.status { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); }
.status.ok { color: var(--up); }
.status.bad { color: var(--down); }
.badge { font-size: 11px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--ink-2); }

.cell-tip {
  position: fixed; z-index: 50; max-width: 380px; padding: 8px 10px; font-size: 12px; line-height: 1.45; pointer-events: none;
  white-space: pre-line;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.15);
}

@media (max-width: 640px) {
  .topbar { padding: 10px 16px; gap: 12px; }
  #company { padding: 16px 16px 48px; }
  .home { margin: 32px auto; padding: 0 16px; }
  .chart { height: 240px; }
  .units { margin-left: 8px; }
}

/* Group entities */
.group-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.g-summary { color: var(--ink-2); font-size: 13px; }
.g-summary strong { color: var(--ink); }
.g-ult, .g-built { margin-top: 4px; }
.g-built { color: var(--muted); font-size: 12px; }
.g-controls { display: flex; gap: 6px; align-items: center; color: var(--ink-2); font-size: 12px; flex-wrap: wrap; }
.g-controls select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 2px 4px; }
.g-chart { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; max-height: 72vh; }
.g-chart svg { display: block; }
.g-link { fill: none; stroke: var(--axis); stroke-width: 1.5; }
.g-dashed { stroke-dasharray: 5 4; }
.g-share { font-size: 11px; fill: var(--ink-2); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.g-node rect { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.g-node .g-stripe { stroke: none; }
.g-name { font-size: 13px; font-weight: 600; fill: var(--ink); }
.g-sub { font-size: 11px; fill: var(--ink-2); }
.g-focus rect:first-of-type { stroke: var(--accent); stroke-width: 2.5; }
.g-click { cursor: pointer; }
.g-click:hover rect:first-of-type, .g-click:focus rect:first-of-type { stroke: var(--accent); }
.g-click:focus { outline: none; }
.g-dup rect:first-of-type { stroke-dasharray: 3 3; }
.g-dup .g-name, .g-dissolved .g-name { fill: var(--ink-2); }
.g-dissolved .g-name { text-decoration: line-through; }

/* People */
.person-page { padding: 20px 24px 64px; max-width: 1400px; margin: 0 auto; }
.g-former { opacity: 0.45; }
tr.former td { color: var(--muted); }
#g-people .sub, #person .sub { color: var(--muted); font-size: 12px; margin: -6px 0 10px; }
@media (max-width: 640px) { .person-page { padding: 16px 16px 48px; } }

.psc-status { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; margin-top: 24px; }

.size-pill { cursor: help; }
.has-tip { cursor: help; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
[data-tip]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* events tab */
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-chip { font: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; }
.ev-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.ev-chip .n { color: var(--muted); }
.ev-chip.off { color: var(--muted); background: transparent; }
.ev-chip.off .dot { opacity: 0.3; }
.ev-year { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 20px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.ev-list { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: 64px 12px 1fr; gap: 10px; padding: 7px 0; align-items: start; }
.ev + .ev { border-top: 1px solid var(--surface-2); }
.ev-date { color: var(--ink-2); font-size: 12px; padding-top: 1px; white-space: nowrap; }
.ev-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; }
.ev.key .ev-title { font-weight: 600; }
.ev:not(.key) .ev-dot { transform: scale(0.7); }
.ev-detail { color: var(--ink-2); font-size: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.ev-meta { color: var(--muted); font-size: 11px; margin-top: 1px; }
.ev-link { margin-left: 8px; }

/* administration statement */
.adm { margin-bottom: 16px; }
.adm h2 { margin-bottom: 2px; }
.adm h3 { font-size: 13px; font-weight: 600; margin: 16px 0 4px; }
.adm-head { margin-bottom: 12px; }
.adm-head .sub { color: var(--muted); font-size: 12px; }
.adm-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.adm-label { color: var(--ink-2); font-size: 12px; min-width: 132px; }
.adm-tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--ink); cursor: help; }
.adm-tag.primary { background: color-mix(in srgb, var(--s8) 16%, transparent); border-color: color-mix(in srgb, var(--s8) 45%, transparent); font-weight: 600; }
.adm-tag.outcome { background: var(--surface-2); color: var(--ink-2); }
.adm-text { color: var(--ink); font-size: 13px; line-height: 1.55; max-width: 860px; }
.adm-text p { margin: 0 0 8px; }
.adm details { margin-top: 6px; }
.adm summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.adm-bg { margin-top: 12px; }
.linkish { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
@media (max-width: 600px) { .adm-label { min-width: 100%; } }

/* reconciliation: figures that don't add up, and figures corrected to add up */
.check-fail { background: color-mix(in srgb, var(--down) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--down) 45%, transparent); }
td.fixed, span.fixed { background-image: linear-gradient(135deg, var(--up) 0 6px, transparent 6px); background-repeat: no-repeat; }
span.fixed { padding-left: 8px; }

/* home: recently viewed & analysed */
.activity { margin-top: 32px; }
.activity h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--up); animation: pulse 1.6s ease-in-out infinite; }
.activity[data-idle="true"] .pulse { background: var(--muted); animation: none; }
.ac-idle { padding: 10px 14px; font-size: 13px; color: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }
.activity-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.activity-list li + li { border-top: 1px solid var(--border); }
.activity-list a { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) 120px; gap: 12px; align-items: center;
  padding: 10px 14px; color: inherit; text-decoration: none; font-size: 13px; }
.activity-list a:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ac-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-msg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; position: relative; }
.ac-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.4s; }
.ac-busy i { width: 35%; position: absolute; animation: busy 1.4s ease-in-out infinite; }
@keyframes busy { from { left: -35%; } to { left: 100%; } }
@media (max-width: 640px) {
  .activity-list a { grid-template-columns: 1fr 80px; }
  .ac-msg { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { .pulse, .ac-busy i { animation: none; } }
.recent { margin-top: 40px; }
.recent h2 { font-size: 15px; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.recent-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.recent-card:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgb(0 0 0 / 0.06); }
.rc-name { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.rc-sub { color: var(--muted); font-size: 12px; }
.rc-status { color: var(--down); text-transform: capitalize; }
.rc-figs { display: flex; gap: 14px; font-size: 13px; font-weight: 600; }
.rc-figs em { display: block; font-style: normal; font-weight: 400; color: var(--muted); font-size: 11px; }
.rc-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; color: var(--muted); font-size: 11px; }

/* footer */
.site-footer { margin-top: 56px; padding: 22px 24px 28px; border-top: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; min-width: 0; }
.footer-nav a { color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .disclaimer, .site-footer .attribution { max-width: 1200px; margin: 12px auto 0; line-height: 1.5; }
.site-footer .disclaimer { color: var(--warn-ink); background: var(--warn-bg); padding: 8px 12px; border-radius: 8px; }
.site-footer .attribution { color: var(--muted); }
.site-footer .attribution a { color: inherit; }

/* about page */
.about { max-width: 880px; margin: 48px auto; padding: 0 24px; }
.about h1 { font-size: 30px; margin-bottom: 8px; }
.about h2 { font-size: 18px; margin: 32px 0 8px; }
.about p, .about li { color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.about ul { padding-left: 20px; }
.about section + section { margin-top: 48px; }
.about .about-logo { display: block; width: 240px; max-width: 70%; margin: 0 0 20px; }
.about code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

@media (max-width: 640px) {
  .topbar { gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
  .wordmark { font-size: 17px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .home, .about { padding: 0 16px; margin-top: 32px; }
}

/* a year whose accounts Companies House has no document for */
th.missing { color: var(--muted); background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--muted) 12%, transparent) 6px 8px); }
th.missing .h-sub { color: var(--warn-ink); }
td.missing { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--muted) 8%, transparent) 6px 8px); }

/* a ratio value that's possible but unusual (e.g. a tax rate over 60%): dotted underline, explained on hover */
td.unusual { text-decoration: underline dotted var(--warn-ink); text-underline-offset: 3px; cursor: help; }

.recent-more { display: flex; justify-content: center; margin-top: 16px; }
.recent-more .btn { min-width: 140px; }

/* search dropdown groups */
.results .r-group { cursor: default; padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.results .r-group:hover { background: none; }
.results .r-group + li[role=option] { margin-top: 0; }
.results li.r-group:not(:first-child) { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; border-radius: 0; }
.results .r-loading { cursor: default; color: var(--muted); font-size: 12px; }
.results .r-loading:hover { background: none; }
.results .r-icon { color: var(--s2); font-size: 9px; vertical-align: 2px; margin-right: 6px; }
.results .r-count { float: right; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ---------------------------------------------------------------- home page tour */
.tour { margin: 28px 0 8px; }
.tv-window { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.08); }
.tv-chrome { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tv-chrome > i { width: 10px; height: 10px; border-radius: 50%; background: var(--axis); }
.tv-chrome > i:nth-child(1) { background: #ff5f57; } .tv-chrome > i:nth-child(2) { background: #febc2e; } .tv-chrome > i:nth-child(3) { background: #28c840; }
.tv-url { flex: 1; margin: 0 8px; padding: 3px 10px; border-radius: 6px; background: var(--page); color: var(--muted); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-pause { width: 26px; height: 22px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; position: relative; }
.tv-pause::before, .tv-pause::after { content: ""; position: absolute; top: 6px; width: 3px; height: 9px; background: var(--ink-2); border-radius: 1px; }
.tv-pause::before { left: 8px; } .tv-pause::after { left: 13px; }
.tv-paused .tv-pause::before { left: 9px; width: 0; height: 0; background: none; border-left: 8px solid var(--ink-2); border-top: 5px solid transparent; border-bottom: 5px solid transparent; top: 5px; }
.tv-paused .tv-pause::after { display: none; }
.tv-caption { padding: 14px 18px 0; font-weight: 600; font-size: 15px; }
.tv-stage { position: relative; height: 300px; padding: 10px 18px 16px; overflow: hidden; }
.tv-scene { position: absolute; inset: 10px 18px 16px; opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .45s; }
.tv-scene.tv-in { opacity: 1; transform: none; }

.tv-steps { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tv-steps button { flex: 1 1 0; min-width: 84px; position: relative; overflow: hidden; padding: 6px 8px 8px; font: inherit; font-size: 12px;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.tv-steps button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.tv-steps button i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); }
.tv-steps button[aria-selected="true"] i { width: 100%; }
.tv-steps button.tv-run i { width: 0; animation: tv-progress var(--ms) linear forwards; }
.tv-steps button.tv-hold i { animation-play-state: paused; }
@keyframes tv-progress { to { width: 100%; } }

/* search */
.tv-search { padding: 4px 0 8px; }
.tv-input { display: flex; align-items: center; height: 38px; padding: 0 12px; border: 2px solid var(--accent); border-radius: 8px; background: var(--page); font-size: 15px; }
.tv-caret { width: 2px; height: 18px; margin-left: 1px; background: var(--accent); animation: tv-blink 1s steps(1) infinite; }
@keyframes tv-blink { 50% { opacity: 0; } }
.tv-results { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
.tv-show-results .tv-results { opacity: 1; transform: none; }
.tv-results li { display: flex; flex-direction: column; padding: 5px 10px; border-radius: 6px; }
.tv-results li b { font-size: 13px; font-weight: 600; } .tv-results li span { font-size: 11px; color: var(--ink-2); }
.tv-results .tv-group { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding-top: 6px; }
.tv-show-results .tv-hit { animation: tv-pick 0.6s 1.4s forwards; }
@keyframes tv-pick { to { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); } }
.tv-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--s2); margin-right: 6px; vertical-align: 1px; }

/* accounts chart */
.tv-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.tv-head b { font-size: 15px; } .tv-head span { color: var(--ink-2); font-size: 12px; }
.tv-head em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 6px; }
.tv-chart { width: 100%; height: 240px; overflow: visible; }
.tv-bar rect { fill: var(--s1); transform-origin: 0 190px; transform: scaleY(0); animation: tv-grow .7s calc(var(--i) * 110ms + 150ms) cubic-bezier(.2,.8,.2,1) forwards; }
.tv-bar:last-child rect { fill: var(--s3); }
.tv-val { font-size: 11px; fill: var(--ink); text-anchor: middle; opacity: 0; animation: tv-fade .4s calc(var(--i) * 110ms + 700ms) forwards; font-variant-numeric: tabular-nums; }
.tv-yr { font-size: 11px; fill: var(--muted); text-anchor: middle; }
@keyframes tv-grow { to { transform: scaleY(1); } }
@keyframes tv-fade { to { opacity: 1; } }

/* ratios */
.tv-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-top: 6px; }
.tv-tile { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--page);
  opacity: 0; transform: scale(.96); animation: tv-pop .45s calc(var(--i) * 140ms + 100ms) forwards; }
.tv-tile span { display: block; color: var(--ink-2); font-size: 12px; }
.tv-tile b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tv-tile svg { width: 100%; height: 24px; }
.tv-tile polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: tv-draw 1.2s calc(var(--i) * 140ms + 400ms) forwards; vector-effect: non-scaling-stroke; }
@keyframes tv-pop { to { opacity: 1; transform: none; } }
@keyframes tv-draw { to { stroke-dashoffset: 0; } }

/* group */
.tv-tree { position: relative; height: 270px; }
.tv-links { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv-links path { fill: none; stroke: var(--axis); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 160; stroke-dashoffset: 160;
  animation: tv-draw .7s calc(var(--i) * 260ms + 500ms) forwards; }
.tv-node { position: absolute; transform: translateY(-50%); width: 21%; padding: 7px 9px; border: 1px solid var(--border);
  border-left: 4px solid var(--s1); border-radius: 8px; background: var(--page); opacity: 0;
  animation: tv-fade .45s forwards; animation-delay: calc(var(--i) * 140ms + 200ms); }
.tv-node b { display: block; font-size: 12px; line-height: 1.25; } .tv-node span { font-size: 10.5px; color: var(--muted); }
.tv-node.tv-person { border-left-color: var(--s2); width: 13%; }
.tv-node.tv-foreign { border-left-color: var(--s7); }
.tv-tree > .tv-node:nth-of-type(2) { animation-delay: 700ms; }
.tv-tree > .tv-node:nth-of-type(n+3) { animation-delay: calc(var(--i) * 180ms + 1200ms); }
.tv-tree > .tv-foreign { animation-delay: calc(var(--i) * 220ms + 2000ms) !important; }

/* directors & shareholders: the company's people, then one person's page */
.tv-people { position: relative; height: 100%; }
.tv-panel-a, .tv-panel-b { position: absolute; inset: 0; }
.tv-panel-a { animation: tv-leave .45s 3.6s forwards; }
.tv-panel-b { opacity: 0; transform: translateX(24px); animation: tv-pop .5s 3.9s forwards; }
@keyframes tv-leave { to { opacity: 0; transform: translateX(-24px); } }
.tv-ppl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tv-ppl td { padding: 6px 8px; border-bottom: 1px solid var(--surface-2); }
.tv-ppl td:nth-child(2), .tv-ppl td:nth-child(3) { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.tv-ppl td:last-child { text-align: right; }
.tv-ppl tr { opacity: 0; animation: tv-fade .35s calc(var(--i) * 160ms + 150ms) forwards; }
.tv-ppl tr td:first-child { color: var(--accent); font-weight: 500; }
.tv-ppl .tv-ben td { animation: tv-hl .5s 2.6s forwards; }
.tv-ppl .tv-ben td:first-child { animation-name: tv-pick; }  /* the accent bar on the first cell only */
@keyframes tv-hl { to { background: var(--surface-2); } }
.tv-sub { margin-top: 12px; } .tv-sub span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tv-stats { display: flex; gap: 12px; margin: 6px 0 8px; }
.tv-stats span { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--page); font-size: 12px; color: var(--ink-2); }
.tv-stats b { display: block; font-size: 21px; line-height: 1.2; color: var(--ink); letter-spacing: -.02em; }
.tv-list div:nth-child(n+5) { display: none; }
.tv-list div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--surface-2);
  opacity: 0; animation: tv-fade .35s calc(var(--i) * 150ms + 4.4s) forwards; }
.tv-list b { font-size: 13px; font-weight: 500; color: var(--accent); }
.tv-list span { font-size: 12px; color: var(--ink-2); text-align: right; }

/* events */
.tv-timeline { position: relative; padding: 4px 0 0 2px; }
.tv-ev { display: grid; grid-template-columns: 44px 14px 1fr; gap: 10px; align-items: start; padding: 7px 0;
  border-top: 1px solid var(--surface-2); opacity: 0; transform: translateX(-10px); animation: tv-pop .45s calc(var(--i) * 420ms + 150ms) forwards; }
.tv-ev:first-child { border-top: 0; }
.tv-ev-y { color: var(--ink-2); font-size: 12px; font-weight: 600; padding-top: 1px; }
.tv-ev > i { width: 11px; height: 11px; border-radius: 50%; margin-top: 4px; }
.tv-ev b { display: block; font-size: 13px; } .tv-ev span { font-size: 12px; color: var(--ink-2); }

/* administration */
.tv-quote { color: var(--ink-2); font-size: 13px; line-height: 1.55; border-left: 3px solid var(--border); padding-left: 12px; margin: 10px 0 14px;
  opacity: 0; animation: tv-fade .6s .3s forwards; }
.tv-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-tag { font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--s8) 16%, transparent); border: 1px solid color-mix(in srgb, var(--s8) 45%, transparent);
  opacity: 0; transform: scale(.8); animation: tv-pop .35s calc(var(--i) * 260ms + 1100ms) cubic-bezier(.3,1.6,.5,1) forwards; }
.tv-tag.tv-out { background: var(--surface-2); border-color: var(--border); color: var(--ink-2); font-weight: 500; }

/* checks */
.tv-pl { width: 100%; max-width: 440px; border-collapse: collapse; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tv-pl th, .tv-pl td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: right; font-size: 14px; }
.tv-pl th:first-child, .tv-pl td:first-child { text-align: left; }
.tv-pl th { color: var(--ink-2); font-weight: 500; font-size: 12px; }
.tv-gp td { font-weight: 600; }
.tv-gp td:last-child { position: relative; }
.tv-bad, .tv-good { display: inline-block; padding: 2px 6px; border-radius: 4px; }
.tv-bad { background: color-mix(in srgb, var(--down) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--down) 50%, transparent);
  animation: tv-out .4s 3.2s forwards; }
.tv-good { position: absolute; right: 10px; top: 7px; opacity: 0; background: color-mix(in srgb, var(--up) 14%, transparent);
  background-image: linear-gradient(135deg, var(--up) 0 6px, transparent 6px); animation: tv-fade .5s 3.4s forwards; }
@keyframes tv-out { to { opacity: 0; transform: translateY(-6px); } }
.tv-note { position: relative; font-size: 13px; margin-top: 14px; min-height: 40px; }
.tv-bad-n { color: var(--down); opacity: 0; animation: tv-fade .4s .9s forwards, tv-out .4s 3.2s forwards; position: absolute; }
.tv-good-n { color: var(--up); opacity: 0; animation: tv-fade .5s 3.5s forwards; position: absolute; }

@media (max-width: 640px) {
  .tv-stage { height: 356px; padding: 8px 12px 12px; }
  .tv-ev { padding: 5px 0; }
  .tv-ppl td { padding: 5px 4px; } .tv-ppl td:nth-child(3) { display: none; }
  .tv-list div:nth-child(n+4) { display: none; }
  .tv-stats { margin: 6px 0 8px; } .tv-stats span { padding: 7px 10px; } .tv-stats b { font-size: 20px; }
  .tv-steps button span { font-size: 11px; }
  .tv-scene { inset: 8px 12px 12px; }
  .tv-caption { padding: 12px 12px 0; font-size: 14px; }
  .tv-tiles { gap: 8px; } .tv-tile { padding: 10px; } .tv-tile b { font-size: 20px; }
  .tv-node { width: 24%; padding: 5px 6px; } .tv-node b { font-size: 10.5px; } .tv-node span { display: none; }
  .tv-node.tv-person { width: 17%; }
  .tv-steps button { min-width: 0; flex-basis: 30%; }
}
@media (prefers-reduced-motion: reduce) {
  .tour *, .tour *::before, .tour *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }
  .tv-bad, .tv-bad-n { display: none; }
}

/* ---------------------------------------------------------------- status page */
.status-overall { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 10px; font-weight: 600;
  border: 1px solid var(--border); margin: 8px 0 20px; }
.status-overall[data-status="ok"] { border-color: color-mix(in srgb, var(--up) 45%, transparent); background: color-mix(in srgb, var(--up) 9%, transparent); }
.status-overall[data-status="degraded"] { border-color: color-mix(in srgb, #d99a1e 50%, transparent); background: color-mix(in srgb, #d99a1e 10%, transparent); }
.status-overall[data-status="down"] { border-color: color-mix(in srgb, var(--down) 50%, transparent); background: color-mix(in srgb, var(--down) 10%, transparent); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
[data-status="ok"] > .status-dot, [data-status="ok"] .si-head .status-dot { background: var(--up); }
[data-status="degraded"] > .status-dot, [data-status="degraded"] .si-head .status-dot { background: #d99a1e; }
[data-status="down"] > .status-dot, [data-status="down"] .si-head .status-dot { background: var(--down); }
.status-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.status-item { padding: 14px 18px; margin: 0; }
.status-item + .status-item { border-top: 1px solid var(--border); }
.si-head { display: flex; align-items: center; gap: 10px; }
.si-label { margin-left: auto; font-size: 13px; font-weight: 600; }
[data-status="ok"] .si-label { color: var(--up); }
[data-status="degraded"] .si-label { color: #d99a1e; }
[data-status="down"] .si-label { color: var(--down); }
.si-summary { margin: 4px 0 0 20px; color: var(--ink-2); font-size: 14px; }
.si-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0 20px; font-size: 12px; color: var(--muted); }
.si-facts em { font-style: normal; margin-right: 2px; }
.status-note { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- about page */
.about-hero { padding: 36px 32px; border: 1px solid var(--border); border-radius: 16px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--surface); }
.about-kicker { margin: 0 0 6px; font-size: 13px !important; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent) !important; }
.about .about-hero h1 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
.about-lede { font-size: 17px !important; max-width: 62ch; margin: 0 0 20px; }
.about-cta { display: inline-block; text-decoration: none; padding: 9px 18px; font-weight: 600; }
.about h3 { font-size: 15px; margin: 0; color: var(--ink); }
.about ul.about-cards { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.about-card { padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  display: flex; flex-direction: column; gap: 10px; }
.about .about-card p { margin: 0; font-size: 14px; line-height: 1.55; }
.about-sources { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 16px; }
.about-source { padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.about-source p { margin: 10px 0 0; font-size: 14px !important; }
.about-source-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.about-badge { margin-left: auto; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.about-badge.good { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.about-badge.warn { color: var(--warn-ink); background: var(--warn-bg); }
.about ol.about-steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0; display: grid; gap: 14px; }
.about-steps li { counter-increment: step; position: relative; padding-left: 44px; margin: 0; }
.about-steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent); }
.about-steps strong { color: var(--ink); }
.about-callout { padding: 14px 18px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink);
  font-size: 14px; line-height: 1.6; border-left: 4px solid #d99a1e; }
.about-fine { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  padding-top: 32px; border-top: 1px solid var(--border); }
.about-fine h2 { font-size: 15px !important; margin: 0 0 6px !important; }
.about-fine p { font-size: 14px !important; margin: 0; }
@media (max-width: 640px) {
  .about-hero { padding: 24px 20px; }
  .about .about-hero h1 { font-size: 27px; }
}

/* ---------------------------------------------------------------- no-JavaScript report (company pages) */
.js .ssr { display: none; }
.ssr-report { max-width: 1100px; margin: 24px auto; padding: 0 24px; }
.ssr-report dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; color: var(--ink-2); }
.ssr-report dt { font-weight: 600; color: var(--ink); }
.ssr-report dd { margin: 0; }
.ssr-report table { border-collapse: collapse; font-size: 13px; margin: 8px 0 24px; display: block; overflow-x: auto; }
.ssr-report th, .ssr-report td { padding: 4px 10px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.ssr-report th[scope="row"] { text-align: left; }

/* Refresh and re-read controls are for the site's administrator (see app/access.py). */
html:not(.admin) .admin-only { display: none !important; }

/* ---------------------------------------------------------------- administrations page */
.adm-page { max-width: 1180px; }
.adm-summary { font-size: 14px !important; }
.adm-tools { margin: 12px 0; }
.adm-tools input { width: 100%; max-width: 420px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.adm-wrap { border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.adm-table td { text-align: left; white-space: normal; padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: top; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table td a { font-weight: 600; }
.adm-date { white-space: nowrap; color: var(--ink) !important; font-variant-numeric: tabular-nums; }
.adm-formerly { margin-top: 2px; font-size: 12px; color: var(--muted); }
.adm-formerly strong { font-weight: 600; color: var(--ink-2); }
.adm-now { margin-top: 2px; font-size: 12px; color: var(--muted); }
.adm-now strong { font-weight: 600; color: var(--ink-2); }
.adm-which { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.adm-more { margin-left: 4px; padding: 0 5px; font-size: 11px; border: 1px solid var(--border); border-radius: 999px; cursor: help; }
.adm-num { color: var(--muted); font-size: 12px; margin-left: 4px; white-space: nowrap; }
.adm-unknown, .adm-empty { color: var(--muted); }
.adm-tags-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 16px 0 8px; font-size: 13px; font-weight: 600; }
.adm-tags-note { font-weight: 400; color: var(--muted); font-size: 12px; }
.adm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.adm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.adm-chip span { color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-chip:hover { border-color: var(--accent); color: var(--ink); }
.adm-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.adm-chip.active span { color: rgb(255 255 255 / 0.8); }
.adm-chip.covid:not(.active) { border-color: color-mix(in srgb, var(--s5) 55%, var(--border)); }
.adm-reasons { min-width: 180px; }
.adm-tag { display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px; font: inherit; font-size: 11.5px; line-height: 1.5; cursor: pointer;
  color: var(--ink-2); background: var(--surface-2); border: 1px solid transparent; border-radius: 999px; }
.adm-tag.primary { color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 600; }
.adm-tag:hover { border-color: var(--accent); }
.adm-tag.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.adm-yrs { text-align: right !important; font-variant-numeric: tabular-nums; color: var(--ink) !important; }
.adm-yrs-h { text-align: right !important; }
.adm-sort { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.adm-sort:hover, th.sorted .adm-sort { color: var(--accent); }
.adm-sort-icon { display: inline-block; width: 1em; text-align: center; }
.adm-firm .linkish { font-weight: 600; text-align: left; }
.adm-firm .linkish[title] { font-style: italic; font-weight: 500; }
/* Narrow screens: keep date, company, years, reasons and firm. */
@media (max-width: 760px) {
  .adm-table th:nth-child(5), .adm-table td:nth-child(5), .adm-table th:nth-child(6), .adm-table td:nth-child(6),
  .adm-table th:nth-child(8), .adm-table td:nth-child(8) { display: none; }
}

/* ---------------------------------------------------------------- popular companies page */
.pop-page { max-width: 1180px; }
.pop-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.pop-jump a { padding: 5px 11px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); }
.pop-jump a:hover { border-color: var(--accent); color: var(--ink); }
.pop-group { margin-top: 32px; scroll-margin-top: 80px; }
.pop-group h2 { font-size: 17px !important; margin: 0 0 12px !important; }
.pop-card .rc-name { font-size: 15px; }
.pop-status { display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: 11px; font-weight: 600; border-radius: 999px;
  color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); text-transform: capitalize; vertical-align: 2px; }

/* ---------------------------------------------------------------- changelog */
.cl-page { max-width: 820px; }
.cl-feed { font-size: 14px; white-space: nowrap; margin-left: 4px; }
.cl-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 8px; }
.cl-day { margin-top: 32px; }
.cl-day h2 { font-size: 13px !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  margin: 0 0 12px !important; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.about ul.cl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.cl-item { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; margin: 0 !important; }
.cl-item h3 { font-size: 15px; margin: 0; }
.cl-item h3 a { color: var(--ink); text-decoration: none; }
.cl-item h3 a:hover { color: var(--accent); text-decoration: underline; }
.about .cl-item p { margin: 3px 0 0; font-size: 14px; line-height: 1.55; }
.cl-kind { justify-self: start; margin-top: 1px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; border-radius: 999px; }
.cl-kind.new { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cl-kind.improved { color: var(--up); background: color-mix(in srgb, var(--up) 13%, transparent); }
.cl-kind.fixed { color: var(--warn-ink); background: var(--warn-bg); }
@media (max-width: 520px) { .cl-item { grid-template-columns: 1fr; gap: 4px; } }

/* Former names under a company's name */
.c-formerly { margin: -2px 0 6px; font-size: 14px; color: var(--ink-2); }
.c-formerly strong { color: var(--ink); font-weight: 600; }
.c-formerly-when { color: var(--muted); }
.c-formerly-more { margin-left: 4px; padding: 1px 7px; font-size: 12px; border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; }

/* ---------------------------------------------------------------- stats page */
.stats-page { max-width: 1000px; }
.stat { margin-top: 28px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.stat h3 { font-size: 17px; margin: 0 0 4px; }
.stat-group { margin: 44px 0 -8px !important; font-size: 22px !important; scroll-margin-top: 16px; }
.stat-groups { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.stat-groups a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px;
  color: var(--ink-2); text-decoration: none; background: var(--surface); }
.stat-groups a:hover { border-color: var(--accent); color: var(--ink); }
.stat { scroll-margin-top: 16px; }
.about .stat-sub { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.stat-tile { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--page); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat-label { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.stat-tile-note { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.stat-chart { position: relative; }
.stat-table { margin-top: 12px; font-size: 13px; }
.stat-table summary { cursor: pointer; color: var(--accent); }
.stat-table table { border-collapse: collapse; margin-top: 8px; }
.stat-table th, .stat-table td { padding: 4px 12px; border-bottom: 1px solid var(--border); text-align: right; }
.stat-table th[scope="row"], .stat-table thead th:first-child { text-align: left; font-weight: 500; white-space: normal; }
.stat-events { margin-top: 16px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.about .stat-events h4 { margin: 14px 0 6px; font-size: 14px; color: var(--ink); }
.stat-events ol, .stat-events ul { margin: 0; padding-left: 0; }
.stat-events ul { padding-left: 20px; }
.stat-events li { margin: 4px 0; }
.stat-event-list li { display: flex; gap: 10px; list-style: none; }
.stat-event-list strong { color: var(--ink); font-weight: 600; margin-right: 2px; }
.stat-event-mark { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--ink-2);
  font-size: 11px; font-weight: 600; line-height: 17px; text-align: center; color: var(--ink); background: var(--surface); }
.about .stat-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 520px) { .stat { padding: 14px; } .stat-value { font-size: 24px; } }

/* Contact form (/contact) */
.contact-form { display: grid; gap: 16px; margin-top: 28px; max-width: 640px; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.contact-form .opt { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea { font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; width: 100%; box-sizing: border-box; }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .contact-row { grid-template-columns: 1fr; } }
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .contact-note { margin: 0; font-size: 13px; color: var(--muted); }
.contact-form button { justify-self: start; }
.contact-status { margin: 0; font-size: 14px; color: var(--ink-2); min-height: 1.4em; }

/* cookie consent (static/consent.js) */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 560px; margin: 0 auto;
  display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; padding: 14px 16px; background: var(--surface);
  color: var(--ink); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.12); font-size: 14px; }
.consent p { margin: 0; flex: 1 1 280px; color: var(--ink-2); line-height: 1.45; }
.consent a { color: var(--accent); }
.consent-buttons { display: flex; gap: 8px; margin-left: auto; }
.consent button { font: inherit; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--ink); cursor: pointer; }
.consent button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
