/* Zhen app CSS: the sidebar frame and its pages (overview, check, directories, verdict pages). A tool, not a
   landing page: dense, quiet, white panels on white smoke, one accent (the main button), heat only in verdicts.
   Loaded after page.css; everything here is scoped to the app's own classes. */

.as {
  --side: 248px;
  --as-line: rgb(0 0 0 / .09);
  --as-panel: #ffffff;
  --as-ease: cubic-bezier(.23, 1, .32, 1);
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  min-height: 100svh;
  background: var(--p-bg);
}
.as__top, .as__scrim, .as__burger { display: none; }

/* ---------------------------------------------------------------- sidebar */
.as__side {
  position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: var(--s-5);
  padding: var(--s-4) var(--s-3); border-right: 1px solid var(--as-line); background: #fafafa; overflow-y: auto;
}
.as__head { padding: 0 var(--s-2); }
.as__brand { display: inline-flex; align-items: center; gap: 8px; font: 500 18px/1 var(--font-display); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.as__brand .mark { width: 16px; height: 16px; }
.as__search { position: relative; }
.as__search input {
  width: 100%; height: 36px; padding: 0 var(--s-3) 0 32px; border: 1px solid var(--as-line); border-radius: 8px;
  background: var(--as-panel); color: var(--ink); font: 400 13px/1 var(--font-mono);
}
.as__search input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.as__icon { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.as__nav { display: grid; gap: var(--s-5); }
.as__group-h { margin: 0 0 4px; padding: 0 var(--s-2); font: 500 12px/1.4 var(--font-text); color: var(--muted); }
.as__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.as__nav a {
  display: flex; align-items: center; min-height: 34px; padding: 0 var(--s-2); border-radius: 7px; color: var(--ink);
  text-decoration: none; font: 450 14px/1.2 var(--font-text); transition: background-color .15s ease;
}
.as__nav a[aria-current="page"] { background: rgb(0 0 0 / .07); font-weight: 550; }
.as__nav a[aria-current="page"]::before { content: ""; width: 3px; height: 14px; margin-right: 8px; border-radius: 2px; background: var(--heat-3); }
@media (hover: hover) and (pointer: fine) { .as__nav a:hover { background: rgb(0 0 0 / .045); } }
.as__status { margin-top: auto; display: grid; gap: 2px; padding: var(--s-4) var(--s-2) 0; border-top: 1px solid var(--as-line); }
.as__status p { margin: 0; font: 400 12px/1.5 var(--font-text); color: var(--muted); }
.as__status .mono { font-size: 12px; color: var(--ink); }
.as__status a { margin-top: var(--s-2); font: 500 12px/1.5 var(--font-text); color: var(--ink); text-decoration: none; }
.as__status a:hover { text-decoration: underline; text-underline-offset: 3px; }
.as__links { display: flex; gap: var(--s-4); }
.as__links a { margin-top: var(--s-2); }

/* ---------------------------------------------------------------- main column */
.as__main { min-width: 0; padding: var(--s-6) clamp(16px, 3vw, 40px) var(--s-5); display: flex; flex-direction: column; gap: var(--s-5); }
/* The page fills the column up to 1600px and stays centred on wider screens, so no side is left blank. */
.as__main > * { max-width: 1600px; width: 100%; margin-inline: auto; }
.as__foot { margin-top: auto; padding-top: var(--s-5); border-top: 1px solid var(--as-line); font: 400 12px/1.5 var(--font-text); color: var(--muted); }

.pg-head { display: grid; gap: var(--s-1); }
.pg-head h1, .as .vp__head h1 { margin: 0; font: 500 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.15 var(--font-display); letter-spacing: -0.02em; }
.pg-head p { margin: 0; max-width: 70ch; font: 400 14px/1.55 var(--font-text); color: var(--muted); }

.panel-app { background: var(--as-panel); border: 1px solid var(--as-line); border-radius: 12px; padding: var(--s-4) var(--s-5); min-width: 0; }
.panel-app--flush { padding: 0; overflow-x: auto; }
.panel-app__head { margin-bottom: var(--s-3); }
.panel-app__head h2 { margin: 0; font: 550 15px/1.3 var(--font-text); letter-spacing: 0; }
.panel-app__head p { margin: 2px 0 0; font: 400 13px/1.45 var(--font-text); color: var(--muted); }
.panel-app__more { display: inline-block; margin-top: var(--s-3); font: 500 13px/1.4 var(--font-text); color: var(--ink); }
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--as-line); border: 1px solid var(--as-line); border-radius: 12px; overflow: hidden; }
.kpi { background: var(--as-panel); padding: var(--s-4) var(--s-5); display: grid; gap: 4px; }
.kpi__label { margin: 0; font: 500 12px/1.3 var(--font-text); color: var(--muted); }
.kpi__value { margin: 0; font: 500 26px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi__note { margin: 0; font: 400 12px/1.4 var(--font-text); color: var(--muted); }

/* ---------------------------------------------------------------- tables */
.tbl { width: 100%; border-collapse: collapse; font: 400 13px/1.4 var(--font-text); }
.tbl th, .tbl td { padding: 9px var(--s-3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--as-line); }
.tbl thead th { font: 500 12px/1.3 var(--font-text); color: var(--muted); white-space: nowrap; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl tbody th { font-weight: 500; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl a { color: var(--ink); text-decoration: none; font-weight: 500; }
.tbl a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mono, .tbl .mono { font-family: var(--font-mono); font-size: 12.5px; }
.tbl__sub { display: block; font: 400 12px/1.4 var(--font-text); color: var(--muted); }
.panel-app:not(.panel-app--flush) .tbl :is(th, td):first-child { padding-left: 0; }
.panel-app:not(.panel-app--flush) .tbl :is(th, td):last-child { padding-right: 0; }
.tbl--dir thead th { position: sticky; top: 0; background: var(--as-panel); }
@media (hover: hover) and (pointer: fine) { .tbl--dir tbody tr:hover { background: #fafafa; } }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; background: rgb(255 91 50 / .12); color: #8a2500; font: 500 12px/1.4 var(--font-text); white-space: nowrap; }
.empty { margin: 0; padding: var(--s-6); text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- PoD boards */
.kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-head__sub { font: 400 15px/1.4 var(--font-text); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.note-app { margin: 0; font: 400 12px/1.5 var(--font-text); color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px/1.4 var(--font-text); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(0 0 0 / .2); }
.status[data-status="leading"]::before { background: #2f9e44; }
.status[data-status="tie-later"]::before, .status[data-status="ranked"]::before { background: var(--heat-2); }
.status[data-status="fails"] { color: var(--sev-danger); }
.status[data-status="fails"]::before { background: var(--heat-4); }
tr[data-status="leading"] > td { background: rgb(47 158 68 / .05); }

/* ---------------------------------------------------------------- toolbar above a directory */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.toolbar input, .toolbar select { height: 36px; padding: 0 var(--s-3); border: 1px solid var(--as-line); border-radius: 8px; background: var(--as-panel); color: var(--ink); font: 400 14px/1 var(--font-text); }
.toolbar input { flex: 1 1 260px; min-width: 0; }
.toolbar input:focus-visible, .toolbar select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.toolbar .btn { height: 36px; min-height: 36px; padding: 0 var(--s-4); font-size: 14px; }
.toolbar__count { margin-left: auto; font: 400 13px/1 var(--font-text); color: var(--muted); }
.as .btn { transition: transform 160ms var(--as-ease), background-color .15s ease; }
.as .btn:active { transform: scale(.97); }

/* ---------------------------------------------------------------- /check */
.ck2 { display: grid; gap: var(--s-5); }
.ck2__form { display: grid; gap: var(--s-2); }
.ck2__label { font: 500 13px/1.3 var(--font-text); }
.ck2__row { display: flex; gap: var(--s-2); }
.ck2__row input { flex: 1; min-width: 0; height: 48px; padding: 0 var(--s-4); border: 1px solid var(--as-line); border-radius: 10px; background: #fafafa; color: var(--ink); font: 400 16px/1 var(--font-mono); }
.ck2__row input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; background: #fff; }
.ck2__row .btn { height: 48px; }
.ck2__error { margin: 0; color: var(--sev-danger); font-size: 14px; }
.ck2__try { margin: 0; font: 400 13px/1.5 var(--font-text); color: var(--muted); }
.ck2__try a { color: var(--ink); }

/* ---------------------------------------------------------------- the kit's one-section-per-screen rule is for the
   landing page; app sections size to their content */
.as main > :is(section, .section) { height: auto; min-height: 0; }
.as main > :is(section, .section):not(.panel-app) { padding: 0; }
.as main > section.panel-app { padding: var(--s-4) var(--s-5); }
.as main > section.panel-app--flush { padding: 0; }
.as main > :is(section, .section) > .wrap { height: auto; }

/* ---------------------------------------------------------------- verdict pages inside the frame */
.as .vp .wrap { width: 100%; margin: 0; }
.as .vp__head { margin-bottom: var(--s-4); }
.as .vp__card { box-shadow: none; border-color: var(--as-line); border-radius: 12px; }

/* ---------------------------------------------------------------- narrow screens: the sidebar is a drawer */
@media (max-width: 1023px) {
  .as { grid-template-columns: minmax(0, 1fr); }
  .as__top {
    display: flex; position: sticky; top: 0; z-index: 30; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 16px; background: rgb(250 250 250 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--as-line);
  }
  .as__burger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; }
  .as__burger svg { width: 18px; height: 18px; }
  .as__side { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform 280ms cubic-bezier(.32, .72, 0, 1); }
  .as__toggle:checked ~ .as__side { transform: none; }
  .as__toggle:checked ~ .as__scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / .3); }
  .as__main { padding: var(--s-5) 16px; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .toolbar__count { margin-left: 0; width: 100%; }
  .ck2__row { flex-direction: column; }
  .tbl--dir :is(th, td):is(:nth-child(2), :nth-child(5), :nth-child(6)) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .as__side { transition: none; } }

.mono-h { font-family: var(--font-mono) !important; letter-spacing: -0.01em !important; }
.pg-head p a { color: var(--ink); }
.as .vp__more-head h2 { font: 550 15px/1.3 var(--font-text); letter-spacing: 0; }
.as .vp__more-head p { font-size: 13px; }

/* ================================================================ the heat scale: the app's unit. Chrome stays grey;
   heat appears only where it measures something. 0 no circuits, 1 cool, 5 hottest. */
.as {
  --u-fill-3: rgb(0 0 0 / .1);
  --h1: #e6e6e8; --h2: #ffd8a6; --h3: #ffb957; --h4: #ff8c40; --h5: #ff5b32; --h6: #b31d00;
}
[data-h="1"] { --hc: var(--h1); } [data-h="2"] { --hc: var(--h3); } [data-h="3"] { --hc: var(--h4); }
[data-h="4"] { --hc: var(--h5); } [data-h="5"] { --hc: var(--h6); }

/* header row and the live block reading (the app's status signature) */
.eyebrow { margin: 0; font: 500 13px/1.3 var(--font-text); color: var(--muted); letter-spacing: 0; }

/* ---------------------------------------------------------------- the heat field (Overview's moment) */
.as main > section.heatmap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 0; padding: 0; overflow: hidden; }
.heat__copy { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); border-right: 1px solid var(--as-line); }
.heat__figure { margin: var(--s-2) 0 0; font: 400 clamp(64px, 5vw + 24px, 104px)/.9 var(--font-display); letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.heat__figure span { font-size: .42em; letter-spacing: 0; margin-left: 4px; color: var(--h6); vertical-align: .9em; }
.heat__lede { margin: 0; max-width: 30ch; font: 400 15px/1.5 var(--font-text); color: var(--ink); }
.heat__facts { margin: auto 0 0; display: grid; gap: 0; border-top: 1px solid var(--as-line); }
.heat__facts > div { display: flex; justify-content: space-between; gap: var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--as-line); font: 400 13px/1.4 var(--font-text); }
.heat__facts dt { color: var(--muted); }
.heat__facts dd { margin: 0; font: 500 14px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }
.heat__field {
  position: relative; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-6);
  background-color: #fbfbfb;
  background-image: linear-gradient(rgb(0 0 0 / .035) 1px, transparent 1px), linear-gradient(90deg, rgb(0 0 0 / .035) 1px, transparent 1px);
  background-size: 24px 24px;
}
.heat__hint { margin: 0; font: 400 12px/1.4 var(--font-text); color: var(--muted); }
.hf { display: grid; gap: var(--s-5); }
.hf__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15px, 1fr)); gap: 3px; }
.hf__cell { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--hc, transparent); transition: transform 120ms var(--as-ease), box-shadow 120ms ease; }
.hf__cell[data-h="0"] { box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
a.hf__cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { a.hf__cell:hover { transform: scale(1.35); box-shadow: 0 0 0 1.5px var(--ink); position: relative; z-index: 1; } }
.hf__legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px var(--s-4); }
.hf__legend li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 8px; font: 400 12px/1.3 var(--font-text); color: var(--muted); }
.hf__legend .hf__cell { width: 14px; height: 14px; background: var(--hc, transparent); }
.hf__legend b { font: 500 12px/1 var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }

/* heat meter in tables: five cells, filled to the step */
.hc { display: inline-flex; gap: 2px; vertical-align: middle; }
.hc i { width: 6px; height: 12px; border-radius: 1.5px; background: rgb(0 0 0 / .08); }
.hc i[data-on] { background: var(--hc); }
.hc[data-h="1"] i[data-on] { background: #c9c9cd; }
.heat-cell { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }

/* thin bars */
.bar { display: block; height: 6px; border-radius: 3px; background: rgb(0 0 0 / .05); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: #2b2b2e; }
.bar[data-hot] i { background: var(--h5); }
.num-bar { display: grid; gap: 4px; justify-items: end; }
.num-bar .bar { width: 64px; height: 4px; }

/* panels grid variants */
.panels--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.panel-app__head--row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.panel-app__head--row .panel-app__more { margin-top: 0; white-space: nowrap; }

/* ranked list with bars */
.rank { list-style: none; margin: 0; padding: 0; display: grid; }
.rank li { display: grid; grid-template-columns: 20px minmax(0, 150px) minmax(0, 1fr) 56px; grid-template-rows: auto auto; align-items: center; column-gap: var(--s-3); padding: 9px 0; border-bottom: 1px solid var(--as-line); }
.rank li:last-child { border-bottom: 0; }
.rank__n { font: 400 12px/1 var(--font-mono); color: var(--muted); }
.rank a { color: var(--ink); text-decoration: none; font-size: 12.5px; }
.rank a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rank__v { font: 500 13px/1 var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
.rank__meta { grid-column: 2 / -1; margin-top: 4px; font: 400 12px/1.3 var(--font-text); color: var(--muted); }

/* names several processors use */
.names { list-style: none; margin: 0; padding: 0; display: grid; }
.names li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: var(--s-3); row-gap: 4px; padding: 9px 0; border-bottom: 1px solid var(--as-line); }
.names li:last-child { border-bottom: 0; }
.names a { color: var(--ink); text-decoration: none; font: 500 13px/1.3 var(--font-text); }
.names a:hover { text-decoration: underline; text-underline-offset: 3px; }
.names__dots { grid-row: 1 / span 2; grid-column: 2; align-self: center; display: inline-flex; gap: 3px; }
.names__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--h4); }
.names__v { font: 400 12px/1.3 var(--font-text); color: var(--muted); }

/* processor lists on the overview */
.plist { list-style: none; margin: 0; padding: 0; display: grid; }
.plist li { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px 56px; align-items: center; gap: var(--s-3); padding: 8px 0; border-bottom: 1px solid var(--as-line); }
.plist li:last-child { border-bottom: 0; }
.plist a { display: grid; min-width: 0; color: var(--ink); text-decoration: none; }
.plist a:hover .plist__name { text-decoration: underline; text-underline-offset: 3px; }
.plist__name { font: 500 13px/1.3 var(--font-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist__addr { font-size: 12px; color: var(--muted); }
.plist__v { font: 500 13px/1 var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }

/* PoD cost strip and ladder */
.cs-cell { min-width: 140px; }
.cs { display: block; width: 100%; max-width: 180px; height: 12px; overflow: visible; }
.cs line { stroke: rgb(0 0 0 / .14); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cs circle { fill: #8d8d93; }
.cs .cs__lead { fill: var(--h5); }
.ladder { margin: 0; display: grid; gap: var(--s-2); }
.ladder svg { display: block; width: 100%; height: auto; overflow: visible; }
.ladder__tick line { stroke: rgb(0 0 0 / .07); stroke-dasharray: 2 4; }
.ladder__tick text { font: 400 11px var(--font-mono); fill: var(--muted); }
.ladder__dot { fill: rgb(43 43 46 / .55); stroke: #fff; stroke-width: 1.5; }
.ladder__dot[data-lead] { fill: var(--h5); }
.ladder__lead line { stroke: var(--h6); stroke-width: 1; }
.ladder__lead text { font: 500 12px var(--font-text); fill: var(--h6); }
.ladder figcaption { display: flex; justify-content: space-between; gap: var(--s-3); font: 400 12px/1.4 var(--font-text); color: var(--muted); }

@media (max-width: 1023px) {
  .as main > section.heatmap { grid-template-columns: minmax(0, 1fr); }
  .heat__copy { border-right: 0; border-bottom: 1px solid var(--as-line); }
  .panels--7-5 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639px) {
  .heat__copy, .heat__field { padding: var(--s-5) var(--s-4); }
  .hf__legend { grid-template-columns: minmax(0, 1fr); }
  .hf__grid { grid-template-columns: repeat(auto-fill, 11px); gap: 2px; }
  .hf__cell { border-radius: 2px; }
  .rank li { grid-template-columns: 20px minmax(0, 1fr) 56px; }
  .rank .bar { display: none; }
  .plist li { grid-template-columns: minmax(0, 1fr) auto 56px; }
  .plist .bar { display: none; }
}
.ladder__most text { font: 500 12px var(--font-text); fill: var(--ink); }

/* ---------------------------------------------------------------- /check: the instrument and the three levels */
.ck3 { display: grid; gap: var(--s-5); }
.as main > section.ck3 { padding: var(--s-6); }
.ck3__form { display: grid; gap: var(--s-2); }
.ck3__label { font: 500 13px/1.3 var(--font-text); color: var(--muted); }
.ck3__row { display: flex; gap: var(--s-2); }
.ck3__row input {
  flex: 1; min-width: 0; height: 56px; padding: 0 var(--s-5); border: 1px solid rgb(0 0 0 / .14); border-radius: 12px;
  background: #fafafa; color: var(--ink); font: 400 17px/1 var(--font-mono);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ck3__row input::placeholder { color: #9a9aa0; font-family: var(--font-text); font-size: 15px; }
.ck3__row input:focus, .ck3__row input:focus-visible { outline: none; border-color: var(--h5); background: #fff; box-shadow: 0 0 0 4px rgb(255 91 50 / .14); }
.ck3__row input[aria-invalid] { border-color: var(--h6); }
.ck3__row .btn { height: 56px; padding: 0 var(--s-6); border-radius: 12px; }
.ck3__error { margin: 0; color: var(--h6); font: 400 14px/1.4 var(--font-text); }
.ck3__accepts { display: grid; gap: var(--s-2); padding-top: var(--s-5); border-top: 1px solid var(--as-line); }
.ck3__accepts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.ck3__accepts a {
  display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--as-line); border-radius: 10px; background: #fafafa;
  color: var(--ink); text-decoration: none; transition: border-color .15s ease, background-color .15s ease, transform 160ms var(--as-ease);
}
.ck3__accepts a span { font: 400 12px/1.3 var(--font-text); color: var(--muted); }
.ck3__accepts a code { font: 500 13px/1.3 var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .ck3__accepts a:hover { border-color: rgb(0 0 0 / .2); background: #fff; } }
.ck3__accepts a:active { transform: scale(.98); }

.levels { display: grid; gap: var(--s-4); }
.levels__head h2 { margin: 0; font: 550 15px/1.3 var(--font-text); }
.levels__head p { margin: 2px 0 0; font: 400 13px/1.45 var(--font-text); color: var(--muted); }
.levels__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); align-items: start; }
.level { background: var(--as-panel); border: 1px solid var(--as-line); border-radius: 12px; overflow: hidden; }
.level__head { display: grid; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--as-line); }
.level[data-level="danger"] .level__head { background: linear-gradient(#fff4f0, #fff); box-shadow: inset 0 3px 0 var(--h6); }
.level[data-level="caution"] .level__head { background: linear-gradient(#fff8ef, #fff); box-shadow: inset 0 3px 0 var(--h4); }
.level[data-level="clear"] .level__head { box-shadow: inset 0 3px 0 #c9c9cd; }
.level__title { display: inline-flex; align-items: center; gap: 10px; font: 550 14px/1.3 var(--font-text); }
.level__head p { margin: 0; font: 400 13px/1.5 var(--font-text); color: var(--muted); }
.level__list { list-style: none; margin: 0; padding: var(--s-2); display: grid; gap: 2px; }
.level__list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: var(--s-3); row-gap: 2px;
  padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; transition: background-color .15s ease;
}
@media (hover: hover) and (pointer: fine) { .level__list a:hover { background: #f6f6f7; } }
.level__name { font: 500 13.5px/1.3 var(--font-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.level__list code { grid-column: 1; font: 400 12px/1.3 var(--font-mono); color: var(--muted); }
.level__kind { grid-column: 2; grid-row: 1 / span 2; align-self: center; font: 400 12px/1 var(--font-text); color: var(--muted); }

@media (max-width: 1023px) {
  .levels__cols { grid-template-columns: minmax(0, 1fr); }
  .ck3__accepts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .as main > section.ck3 { padding: var(--s-4); }
  .ck3__row { flex-direction: column; }
  .ck3__row .btn { width: 100%; }
}

/* ---------------------------------------------------------------- Chinese
   The Funnel faces have no CJK glyphs: name the system Chinese faces after them so Latin and digits keep the brand
   faces. Negative tracking crushes Chinese, so headings sit at zero there. */
html:lang(zh-CN) {
  --font-display: "Funnel Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-text: "Funnel Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", monospace;
  --display-tracking: 0;
  --display-tracking-xl: 0;
}
html:lang(zh-CN) :is(h1, h2, h3, h4, .t-card, .nav__logo) { letter-spacing: 0; }
/* ch measures a Latin "0"; a Chinese character is about two of them, so ch caps cut Chinese lines in half. */
html:lang(zh-CN) .hero--centred h1 { max-width: 12em; }
html:lang(zh-CN) .hero--centred .hero__lead { max-width: 32em; }
html:lang(zh-CN) .closing__cta h2 { max-width: 14em; }
html:lang(zh-CN) .footer__lede { max-width: 14em; }
html:lang(zh-CN) .statement__head .mo-lt__type { max-width: 10em; }

/* ---------------------------------------------------------------- seller badge
   Quiet by default: a badge is a fact about the seller, not a verdict. An active badge gets a dark edge (heat colours
   mean findings, so they stay out); the button stays secondary so it never competes with the verdict. */
.bdg__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.bdg__chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; background: rgb(0 0 0 / .05); font: 500 12px/1 var(--font-text); color: var(--muted); white-space: nowrap; }
.bdg__chip[data-state="active"] { background: var(--ink); color: #fff; }
.bdg__chip[data-state="revoked"] { background: color-mix(in oklab, var(--h6) 12%, transparent); color: var(--h6); }
.bdg__note { margin: 0; font: 400 13px/1.55 var(--font-text); color: var(--muted); }
.bdg__card { display: grid; gap: 4px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }
.bdg__card[data-active] { border-left: 3px solid var(--ink); }
.bdg__state { margin: 0; font: 500 14px/1.4 var(--font-text); color: var(--ink); }
.bdg__line { margin: 0; font: 400 13px/1.5 var(--font-text); color: var(--muted); }
.bdg__line a { color: var(--ink); }
.bdg__act { display: grid; gap: var(--s-3); justify-items: start; }
.bdg__act .btn:disabled { opacity: .55; cursor: progress; }
.bdg__step { margin: 0; font: 400 13px/1.5 var(--font-text); color: var(--ink); }
.bdg__warn { color: var(--ink); }
.bdg__err { margin: 0; font: 400 13px/1.5 var(--font-text); color: var(--h6); }

/* ================================================================ verdict pages (circuit, processor, netlist)
   One moment: Zhen's reading, a gauge of five rising columns lit in the heat colours up to the verdict's step,
   set on the same graph paper as the Overview's heat field. Everything around it is quiet white panels. */
.vx { display: grid; gap: var(--s-5); }
.vx__crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); font: 400 13px/1.4 var(--font-text); color: var(--muted); }
.vx__crumbs li + li::before { content: "/"; margin-right: var(--s-2); opacity: .45; }
.vx__crumbs a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.vx__crumbs a:hover { color: var(--ink); }
.vx__crumbs [aria-current] { color: var(--ink); }
.vx__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4) var(--s-6); }
.vx__title { display: grid; gap: var(--s-2); min-width: 0; }
.vx__title h1 { margin: 0; font: 500 clamp(28px, 1.6vw + 18px, 44px)/1.05 var(--font-display); letter-spacing: -0.025em; color: var(--ink); overflow-wrap: anywhere; }
.vx__sub { margin: 0; font: 400 14px/1.5 var(--font-text); color: var(--muted); }
.vx__actions { display: flex; align-items: center; gap: var(--s-5); }
.vx__actions .link { font: 500 14px/1.4 var(--font-text); }
.vx__actions .btn { height: 40px; min-height: 40px; padding: 0 var(--s-4); font-size: 14px; border-radius: 10px; }

/* One sheet: the reading on the left, the facts and the badge in a ruled column on the right, always the same height. */
.vx-sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); background: var(--as-panel); border: 1px solid var(--as-line); border-radius: 16px; overflow: hidden; }
.vx-sheet__side { display: flex; flex-direction: column; border-left: 1px solid var(--as-line); }
.vx-sheet__side > .vx-panel { padding: var(--s-5) var(--s-5) var(--s-4); background: none; border: 0; border-radius: 0; }
.vx-sheet__side > .vx-panel + .vx-panel { border-top: 1px solid var(--as-line); }
.vx-sheet__side > .vx-panel:last-child { flex: 1; align-content: start; }

/* ---------------------------------------------------------------- the reading */
.vx-reading { display: flex; flex-direction: column; min-width: 0; }
.vx-reading__head { flex: 1; }
.vx-findings { flex: none; }
.vx-finding--none .vx-finding__detail { align-self: center; }
.vx-reading__head {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: center; gap: var(--s-6); min-height: 200px; padding: var(--s-6) var(--s-6) var(--s-5);
  background-color: #fbfbfb;
  background-image: linear-gradient(rgb(0 0 0 / .035) 1px, transparent 1px), linear-gradient(90deg, rgb(0 0 0 / .035) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
  border-bottom: 1px solid var(--as-line);
}
.vx-reading[data-level="none"] .vx-reading__head { border-bottom: 0; }
.vx-gauge { display: inline-flex; align-items: flex-end; gap: 6px; height: 72px; padding: 0 2px; }
.vx-gauge i { width: 14px; border-radius: 3px; background: rgb(0 0 0 / .07); }
.vx-gauge i:nth-child(1) { height: 28px; } .vx-gauge i:nth-child(2) { height: 39px; } .vx-gauge i:nth-child(3) { height: 50px; }
.vx-gauge i:nth-child(4) { height: 61px; } .vx-gauge i:nth-child(5) { height: 72px; }
.vx-gauge[data-step="1"] i[data-on] { background: var(--ink); }
.vx-gauge[data-step="3"] i:nth-child(1)[data-on], .vx-gauge[data-step="5"] i:nth-child(1)[data-on] { background: var(--h2); }
.vx-gauge[data-step="3"] i:nth-child(2)[data-on], .vx-gauge[data-step="5"] i:nth-child(2)[data-on] { background: var(--h3); }
.vx-gauge[data-step="3"] i:nth-child(3)[data-on], .vx-gauge[data-step="5"] i:nth-child(3)[data-on] { background: var(--h4); }
.vx-gauge[data-step="5"] i:nth-child(4)[data-on] { background: var(--h5); }
.vx-gauge[data-step="5"] i:nth-child(5)[data-on] { background: var(--h6); }
.vx-reading__said { display: grid; gap: 6px; min-width: 0; }
.vx-reading__eyebrow { margin: 0; font: 500 12px/1.4 var(--font-text); color: var(--muted); }
.vx-reading__level { margin: 0; max-width: 26ch; font: 500 clamp(24px, 1vw + 16px, 32px)/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
.vx-reading[data-level="danger"] .vx-reading__level { color: var(--h6); }
.vx-reading__tally { margin: 0; max-width: 64ch; font: 400 13px/1.55 var(--font-mono); color: var(--muted); }
.vx-reading[data-level="none"] .vx-reading__tally { font-family: var(--font-text); font-size: 14px; }

.vx-findings { list-style: none; margin: 0; padding: 0 var(--s-6); display: grid; }
.vx-finding { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-5) 0; }
.vx-finding + .vx-finding { border-top: 1px solid var(--as-line); }
.vx-finding__sev { display: inline-flex; align-items: center; gap: 8px; height: 24px; font: 500 13px/1 var(--font-text); color: var(--muted); }
.vx-finding__sev::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #c9c9cd; }
.vx-finding[data-sev="caution"] .vx-finding__sev { color: var(--ink); }
.vx-finding[data-sev="caution"] .vx-finding__sev::before { background: var(--h4); }
.vx-finding[data-sev="danger"] .vx-finding__sev { color: var(--h6); }
.vx-finding[data-sev="danger"] .vx-finding__sev::before { background: var(--h6); }
.vx-finding__body { display: grid; gap: 4px; min-width: 0; }
.vx-finding__area { margin: 0; font: 500 12px/24px var(--font-text); color: var(--muted); }
.vx-finding__title { margin: 0; font: 500 17px/1.4 var(--font-text); color: var(--ink); }
.vx-finding__detail { margin: 0; max-width: 72ch; font: 400 15px/1.6 var(--font-text); color: color-mix(in oklab, var(--ink) 72%, transparent); overflow-wrap: anywhere; }
.vx-reading__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-5); padding: var(--s-4) var(--s-6); border-top: 1px solid var(--as-line); background: #fcfcfc; font: 400 12px/1.5 var(--font-text); color: var(--muted); }
.vx-reading__foot b { font: 500 12px/1.5 var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- side panels */
.vx-panel { display: grid; gap: var(--s-3); padding: var(--s-5); background: var(--as-panel); border: 1px solid var(--as-line); border-radius: 16px; }
.vx-panel__h { margin: 0; font: 500 15px/1.3 var(--font-text); letter-spacing: 0; color: var(--ink); }
.vx-facts { margin: 0; display: grid; }
.vx-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding: 10px 0; border-top: 1px solid var(--as-line); }
.vx-facts dt { flex: none; font: 400 13px/1.5 var(--font-text); color: var(--muted); }
.vx-facts dd { margin: 0; min-width: 0; text-align: right; font: 400 13px/1.5 var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.vx-facts .vp__note { display: block; font-size: 12px; }
.vx-panel .bdg__act .btn { height: 40px; min-height: 40px; padding: 0 var(--s-4); font-size: 14px; border-radius: 10px; }
.vx-panel .bdg__card { border-radius: 10px; }

/* ---------------------------------------------------------------- related records */
.vx-more { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.vx-more__head { display: grid; gap: var(--s-1); max-width: 70ch; }
.vx-more__head h2 { margin: 0; font: 500 20px/1.25 var(--font-display); letter-spacing: -0.01em; }
.vx-more__head p { margin: 0; font: 400 14px/1.55 var(--font-text); color: var(--muted); }
.vx-list { list-style: none; margin: 0; padding: 0; display: grid; background: var(--as-panel); border: 1px solid var(--as-line); border-radius: 16px; overflow: hidden; }
.vx-list li + li { border-top: 1px solid var(--as-line); }
.vx-list a { display: grid; grid-template-columns: 96px 160px minmax(0, 1fr); align-items: center; gap: var(--s-4); min-height: 48px; padding: 0 var(--s-5); color: var(--ink); text-decoration: none; transition: background-color .15s ease; }
.vx-list__label { font: 500 15px/1.2 var(--font-display); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-list__sub { font: 400 12px/1.2 var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-list__tag { font: 400 13px/1.3 var(--font-text); color: var(--muted); }
.vx-list__tag[data-on] { color: var(--ink); }
.vx-list a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .vx-list a:hover { background: rgb(0 0 0 / .045); } }

@media (max-width: 1099px) {
  .vx-sheet { grid-template-columns: minmax(0, 1fr); }
  .vx-sheet__side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); border-left: 0; border-top: 1px solid var(--as-line); }
  .vx-sheet__side > .vx-panel + .vx-panel { border-top: 0; border-left: 1px solid var(--as-line); }
  .vx-reading__head { min-height: 0; }
}
@media (max-width: 679px) {
  .vx-sheet__side > .vx-panel + .vx-panel { border-left: 0; border-top: 1px solid var(--as-line); }
  .vx-list a { grid-template-columns: 64px minmax(0, 1fr); padding: var(--s-2) var(--s-4); }
  .vx-list__tag { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 639px) {
  .vx-reading__head { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); padding: var(--s-5) var(--s-4); }
  .vx-gauge { height: 48px; } .vx-gauge i { width: 10px; }
  .vx-gauge i:nth-child(1) { height: 18px; } .vx-gauge i:nth-child(2) { height: 26px; } .vx-gauge i:nth-child(3) { height: 33px; }
  .vx-gauge i:nth-child(4) { height: 41px; } .vx-gauge i:nth-child(5) { height: 48px; }
  .vx-findings { padding: 0 var(--s-4); }
  .vx-finding { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); padding: var(--s-4) 0; }
  .vx-reading__foot { padding: var(--s-3) var(--s-4); }
  .vx__actions { width: 100%; justify-content: space-between; }
}

/* ================================================================ wallet picker (seller badge)
   A plain white sheet on a dimmed page: wallets as even rows, then the three steps a badge takes in DM Mono. */
.wp { width: min(440px, calc(100vw - 32px)); max-height: calc(100svh - 32px); margin: auto; padding: 0; border: 0; border-radius: 16px; background: transparent; color: var(--ink); overflow: visible; }
.wp::backdrop { background: rgb(17 17 17 / .36); backdrop-filter: blur(2px); }
.wp[open] { animation: wp-in 200ms cubic-bezier(.23, 1, .32, 1); }
.wp[open]::backdrop { animation: wp-fade 200ms ease-out; }
@keyframes wp-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes wp-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wp[open], .wp[open]::backdrop { animation: none; } }
.wp__sheet { display: grid; background: var(--as-panel, #fff); border: 1px solid rgb(0 0 0 / .09); border-radius: 16px; box-shadow: 0 24px 64px -24px rgb(0 0 0 / .35); overflow: hidden; }
.wp__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) var(--s-5) var(--s-4); }
.wp__head h2 { margin: 0; font: 500 20px/1.25 var(--font-display); letter-spacing: -0.01em; }
.wp__head p { margin: 6px 0 0; max-width: 34ch; font: 400 13px/1.5 var(--font-text); color: var(--muted); }
.wp__close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -4px -8px 0 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.wp__close:hover { background: rgb(0 0 0 / .05); color: var(--ink); }
.wp__close:focus-visible, .wp__wallet:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.wp__list { list-style: none; margin: 0; padding: 0 var(--s-3); display: grid; gap: 4px; }
.wp__wallet { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: 0 var(--s-3); border: 1px solid rgb(0 0 0 / .08); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform 160ms cubic-bezier(.23, 1, .32, 1); }
.wp__wallet:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) { .wp__wallet:hover { background: #fafafa; border-color: rgb(0 0 0 / .18); } }
.wp__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #f4f4f5; overflow: hidden; font: 500 15px/1 var(--font-display); color: var(--ink); }
.wp__icon img { width: 28px; height: 28px; border-radius: 7px; }
.wp__icon--okx { background: var(--ink); color: #fff; }
.wp__icon--okx svg { fill: currentColor; }
.wp__name { font: 500 15px/1.3 var(--font-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp__tag { font: 400 12px/1 var(--font-text); color: var(--muted); white-space: nowrap; }
.wp__list li:first-child .wp__wallet:not(.wp__wallet--get) .wp__tag { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.wp__list li:first-child .wp__wallet:not(.wp__wallet--get) .wp__tag::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--h4, #ff8c40); }
.wp__wallet--get { border-style: dashed; }
.wp__none { margin: var(--s-3) var(--s-5) 0; font: 400 13px/1.5 var(--font-text); color: var(--muted); }
.wp__steps { list-style: none; margin: var(--s-5) 0 0; padding: var(--s-4) var(--s-5) var(--s-5); display: grid; gap: 10px; border-top: 1px solid rgb(0 0 0 / .08); background-color: #fbfbfb;
  background-image: linear-gradient(rgb(0 0 0 / .03) 1px, transparent 1px), linear-gradient(90deg, rgb(0 0 0 / .03) 1px, transparent 1px); background-size: 24px 24px; }
.wp__steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: var(--s-3); font: 400 13px/1.4 var(--font-text); color: var(--ink); }
.wp__steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #fff; border: 1px solid rgb(0 0 0 / .1); font: 500 12px/1 var(--font-mono); }
.bdg__step { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s-3); }
.bdg__cancel { margin-left: auto; padding: 4px 10px; border: 1px solid rgb(0 0 0 / .12); border-radius: 8px; background: #fff; color: var(--ink); font: 500 13px/1.2 var(--font-text); cursor: pointer; transition: background-color .15s ease; }
.bdg__cancel:hover { background: rgb(0 0 0 / .04); }
.bdg__cancel:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* ================================================================ page loading (app)
   Grey blocks in the shape of a page header and two panels, with a slow light sweep. */
.ld { display: grid; gap: var(--s-4); }
.ld > div { border-radius: 12px; background: linear-gradient(90deg, rgb(0 0 0 / .045) 0%, rgb(0 0 0 / .075) 50%, rgb(0 0 0 / .045) 100%) 0 0 / 200% 100%; animation: ld-sweep 1.2s linear infinite; }
.ld__title { width: min(320px, 60%); height: 36px; }
.ld__line { width: min(520px, 90%); height: 14px; border-radius: 6px !important; }
.ld__panel { height: 320px; margin-top: var(--s-2); }
.ld__panel--short { height: 160px; margin-top: 0; }
@keyframes ld-sweep { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ld > div { animation: none; } }
/* A phone is too narrow for name and tag on one line: the tag drops under the name instead of cutting it off. */
@media (max-width: 479px) {
  .wp__wallet { grid-template-columns: 40px minmax(0, 1fr); row-gap: 2px; padding-block: var(--s-2); }
  .wp__icon { grid-row: span 2; }
  .wp__tag { grid-column: 2; }
}

/* ================================================================ not found */
.nf { display: grid; gap: var(--s-5); max-width: 640px; padding-block: var(--s-6); }
.nf__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
