:root {
  color-scheme: dark;
  --bg: #0c0d0e;
  --surface: #151617;
  --raised: #202224;
  --border: #393b3d;
  --control: #727577;
  --text: #eef5ee;
  --sub: #bac8ba;
  --brand: #39ff14;
  --instrument: #f97316;
  --mint: #a7ff9f;
  --warning: #ffcf82;
  --danger: #ffaea1;
  font: 16px/1.55 Inter, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
.frame { width: min(100% - 2rem, 77rem); margin-inline: auto; }
.top { border-bottom: 1px solid var(--border); background: #101112; }
.mast, .foot { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 750; font-size: 1.17rem; letter-spacing: -.035em; }
.mode, label, .eyebrow, .reading, .metric strong, time, code {
  font-family: "IBM Plex Mono", Consolas, monospace; font-variant-numeric: tabular-nums;
}
.mode { color: var(--mint); font-size: .78rem; display: flex; align-items: center; gap: .55rem; }
.mode span { width: .48rem; height: .48rem; background: var(--brand); border-radius: 50%; }
.hero { padding: 2.5rem 0 1.55rem; display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 5.8vw, 4.1rem); line-height: 1.06; letter-spacing: -.063em; font-weight: 730; }
h2 { font-size: 1.4rem; letter-spacing: -.032em; line-height: 1.2; }
h3 { font-size: 1.06rem; letter-spacing: -.012em; line-height: 1.35; }
p + p { margin-top: .55rem; }
.hero p, .sub, .foot { color: var(--sub); }
.hero p { margin-top: .65rem; }
.site-control { min-width: 15rem; }
label { display: block; color: var(--sub); font-size: .81rem; }
button, input, select, textarea, .button {
  font: inherit; color: inherit; border: 1px solid var(--control); background: var(--raised); border-radius: .36rem;
  min-height: 2.75rem; padding: .55rem .8rem;
}
select, textarea { width: 100%; }
textarea { min-height: 8rem; resize: vertical; }
button, .button, summary, select { cursor: pointer; }
a { color: var(--mint); }
button:hover, .button:hover { border-color: var(--mint); }
.button { display: inline-flex; align-items: center; text-decoration: none; }
.primary { background: var(--brand); color: #0b180a; border-color: var(--brand); font-weight: 720; }
.secondary, .text-button { background: transparent; }
.text-button { border-color: transparent; color: var(--mint); text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
.toolbar { display: flex; justify-content: space-between; gap: .8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
nav { display: flex; gap: .4rem; align-items: center; }
nav button { border-color: transparent; background: transparent; }
nav [aria-current="page"] { color: var(--brand); background: #172416; border-color: #6f9d6c; }
#panel { min-height: 29rem; padding-top: 1.45rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.eyebrow { font-size: .72rem; color: var(--sub); text-transform: uppercase; letter-spacing: .07em; }
.cluster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.card, .box, .finding {
  border: 1px solid var(--border); border-radius: .55rem; background: var(--surface);
  padding: 1rem 1.15rem; min-width: 0;
}
.card {
  min-height: 18rem; display: grid; align-content: start; gap: .55rem;
  border-top: 2px solid #5a5048;
  background: linear-gradient(155deg, #1a1b1c 0%, var(--surface) 65%);
}
.card h3 { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.gauge {
  min-height: 7.2rem; width: min(100%, 14rem); margin: .2rem auto .15rem; padding-top: 2.35rem; text-align: center;
  position: relative; align-self: center;
}
.gauge::before, .gauge::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 5.85rem; pointer-events: none;
  mask: radial-gradient(ellipse 50% 100% at 50% 100%, transparent 90%, black 91% 99%, transparent);
}
.gauge::before {
  background: repeating-conic-gradient(from 270deg at 50% 100%, currentColor 0deg 1.2deg, transparent 1.2deg 7.5deg);
  color: #a8978b; opacity: .45;
}
.gauge::after {
  inset: .22rem .32rem auto; height: 5.21rem;
  background: conic-gradient(from 270deg at 50% 100%, var(--instrument) 0deg var(--sweep, 0deg), transparent 0);
  opacity: .95;
}
.full-gauge { --sweep: 180deg; }
.partial-gauge { --sweep: 90deg; }
.unknown-gauge::before { color: var(--sub); opacity: .38; }
.reading { display: block; font-size: clamp(1.65rem, 4vw, 2.7rem); letter-spacing: -.07em; line-height: 1.08; }
.gauge > span { display: block; margin: .9rem auto 0; color: var(--sub); font-size: .83rem; }
.tone-good { color: var(--mint); }
.tone-warning { color: var(--warning); }
.tone-danger { color: var(--danger); }
.tone-neutral { color: var(--sub); }
.badge { border: 1px solid currentColor; border-radius: .25rem; padding: .07rem .31rem; font-size: .73rem; white-space: nowrap; font-weight: 600; }
.findings, .stack { display: grid; gap: .75rem; margin-top: 1rem; }
.findings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.finding { overflow-wrap: anywhere; }
.finding summary { min-height: 2.75rem; align-content: center; font-weight: 650; }
.finding summary .badge { margin-right: .45rem; }
.finding p, .card p, .table-list dd { margin-top: .35rem; font-size: .93rem; }
.card time { display: block; color: var(--sub); font-size: .78rem; }
.actions, .filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-top: .75rem; }
.filters > div { min-width: 10rem; }
.table-list strong, .report-preview { overflow-wrap: anywhere; }
.section-spaced { margin-top: 1.6rem; }
.quiet-link { font-size: .9rem; }
.metrics { display: flex; gap: .55rem; flex-wrap: wrap; }
.metric { min-width: 6rem; flex: 1 0 auto; border: 1px solid var(--border); padding: .55rem .65rem; border-radius: .3rem; }
.metric strong { display: block; font-size: 1.24rem; }
.metric span { font-size: .78rem; color: var(--sub); }
.table-list, .event-list { padding: 0; margin-bottom: 0; list-style: none; }
.table-list li, .event-list li { padding: .62rem 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.table-list li > strong { margin-right: .45rem; }
.box summary { min-height: 2.75rem; align-content: center; cursor: pointer; font-weight: 650; }
.box h3 + p { margin-top: .5rem; }
.sample { border-inline-start: 3px solid var(--brand); }
.form-grid { display: grid; gap: .75rem; max-width: 42rem; margin-top: .8rem; }
.check { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; }
.check input { min-height: auto; width: 1.2rem; height: 1.2rem; accent-color: var(--brand); }
.error { color: var(--danger); }
.foot { color: var(--sub); border-top: 1px solid var(--border); margin-top: 2rem; font-size: .85rem; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 2; top: .5rem; left: .5rem; padding: .65rem; background: var(--bg); }
@media (max-width: 58rem) {
  .cluster { gap: .55rem; }
  .card { padding: .8rem; }
  .card h3 { flex-wrap: wrap; }
}
@media (max-width: 47rem) {
  .cluster { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .gauge { margin-inline: 0; }
}
@media (max-width: 35rem) {
  .hero, .toolbar, .section-head { align-items: start; flex-direction: column; }
  .hero { padding-top: 1.65rem; gap: .85rem; }
  .site-control { width: 100%; min-width: 0; }
  .findings { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  :root { color-scheme: light; --text: #111; --sub: #333; --border: #aaa; --mint: #174917; --warning: #663c00; --danger: #811700; }
  body, .box { background: white; color: #111; }
  .top, .toolbar, .hero, .foot, button, .button, .sample:not(.report-preview), .skip { display: none; }
  #panel > :not(.report-preview) { display: none; }
  .frame { width: 100%; }
  .box, .event-list li, .table-list li { break-inside: avoid; }
}
