:root {
  color-scheme: light;
  --ink: #142c33;
  --muted: #536970;
  --line: #d2dfe0;
  --teal: #005f5c;
  font: 16px/1.5 Inter, system-ui, sans-serif;
  color: var(--ink);
  background: #f2f6f5;
}
* { box-sizing: border-box }
body { margin: 0 }
header { background: #fff; border-bottom: 1px solid var(--line) }
.bar, main { width: min(100% - 40px, 1160px); margin: auto }
.bar { min-height: 64px; display: flex; align-items: center; justify-content: space-between }
.bar strong { display: flex; align-items: center; gap: .22em; font-size: 23px; letter-spacing: -.055em }
.bar em { color: var(--teal); font-style: normal }
.brand-mark { width: 22px; height: 25px; margin-right: 6px; background: var(--teal); clip-path: polygon(0 0,100% 0,100% 35%,35% 35%,35% 52%,84% 52%,84% 75%,0 100%) }
.bar a { color: var(--teal); text-decoration: none; font-weight: 650; font-size: 14px }
main { padding: 28px 0 12px }
.heading { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: clamp(24px,4vw,44px); border-radius: 18px; background: linear-gradient(102deg,#102e36 18%,#124347 70%,#175553); color: white }
.heading::after {
  content: ""; z-index: -1; position: absolute; inset: 0 0 0 38%; opacity: .68;
  background: repeating-radial-gradient(circle at 78% 62%,transparent 0 29px,#74c9b74f 30px 31px,transparent 32px 48px),
    repeating-linear-gradient(0deg,transparent 0 31px,#a3e3d714 31px 32px),
    repeating-linear-gradient(90deg,transparent 0 31px,#a3e3d714 31px 32px);
  mask-image: linear-gradient(90deg, transparent,#000 40%);
}
h1 { font-size: clamp(30px,4.5vw,57px); line-height: 1.02; letter-spacing: -.052em; margin: 0; font-weight: 630 }
h2 { font-size: 22px; letter-spacing: -.035em; margin: 23px 0 12px }
button, input { font: inherit }
button { border: 1px solid #bacccc; border-radius: 8px; background: white; color: var(--ink); cursor: pointer; padding: 8px 13px; font-size: 14px; font-weight: 580 }
button:hover:enabled { background: #e0f1ed; border-color: #73a9a0 }
button.primary { background: #a8f1d3; border: 0; padding: 11px 18px; color: #073b38 }
button.primary:hover:enabled { background: #c1ffe5 }
button:disabled { opacity: .5; cursor: default }
:focus-visible { outline: 3px solid #2585b1; outline-offset: 3px }
.scores { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; align-items: start; margin: 16px 0 8px }
details { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0 16px; margin: 8px 0 }
details > summary { padding: 13px 0; cursor: pointer; font-weight: 630 }
details > summary::marker { color: var(--teal); font-size: .8em }
details[open] { padding-bottom: 12px }
.scores details { --tone: #60737a; margin: 0; box-shadow: 0 2px 7px #142c3307 }
.scores details[data-level="LOW"] { --tone: #006952 }
.scores details[data-level="MEDIUM"] { --tone: #8a5400 }
.scores details[data-level="HIGH"] { --tone: #a03236 }
.scores details[data-key="detectionConfidence"] { --tone: #265e86 }
.scores details[open] { grid-column: span 2 }
.scores summary { display: block }
.scores summary::-webkit-details-marker { display: none }
.scores summary span { display: block; color: var(--muted); font-size: 12px; font-weight: 550 }
.scores summary strong { display: block; margin: 6px 0; color: var(--tone); font-size: clamp(17px,2vw,26px); letter-spacing: -.04em; line-height: 1.25 }
.scores summary strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 7px 3px 0; border-radius: 50%; background: currentColor }
.scores ul { padding: 0; list-style: none }
.scores li details { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 0; font-size: 13px }
.scores li summary { display: list-item }
#notice { min-height: 20px; font-size: 13px; margin: 9px 0 }
p, .hint, summary small { color: var(--muted) }
p { font-size: 14px; overflow-wrap: anywhere }
main > section > details > summary { padding: 16px 0 }
summary small { padding-left: 10px; font-size: 13px; font-weight: 450 }
.hint { display: block; margin-bottom: 10px }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 }
label { display: inline-block; margin: 5px 8px 5px 0; font-size: 14px }
input[type="checkbox"] { accent-color: var(--teal) }
input:not([type="checkbox"]) { max-width: 100%; border: 1px solid var(--line); padding: 6px 9px; border-radius: 6px }
.readings { display: grid; grid-template-columns: 1fr auto; margin: 4px 0 12px; font-size: 14px }
.readings dt, .readings dd { padding: 7px 0; margin: 0; border-bottom: 1px solid var(--line) }
.readings dd { text-align: right; font-weight: 600; color: var(--teal) }
#provider-result { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,275px),1fr)); gap: 12px }
.provider-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-width: 0 }
.provider-card h3 { margin: 0 0 8px; font-size: 16px }
.provider-card .readings { grid-template-columns: minmax(0,1fr) minmax(0,1.8fr); column-gap: 12px; margin-bottom: 0 }
.provider-card dd { overflow-wrap: anywhere }
.provider-card .provider-warning { color: #a03236; background: #fff0ef; padding-inline: 6px; border-radius: 4px }
#history-filter:not([hidden]) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px }
#history-comparison select { max-width: min(100%, 260px); font: inherit }
#history-diff > .provider-card { margin: 8px 0 }
#journal-result > details > .provider-card { margin: 8px 0 }
#net-result > .provider-card { margin: 8px 0 }
pre { font: 13px/1.5 ui-monospace,monospace; overflow-wrap: anywhere; white-space: pre-wrap; background: #f3f7f6; padding: 10px; border-radius: 6px }
footer { margin: 20px 0; color: var(--muted); font-size: 12px }
@media (max-width: 800px) {
  .scores { grid-template-columns: repeat(3,minmax(0,1fr)) }
}
@media (max-width: 580px) {
  .bar, main { width: calc(100% - 24px) }
  .bar { min-height: 52px }
  main { padding-top: 12px }
  .scores { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px }
  .scores > details { padding-inline: 10px }
  summary small { display: block; padding-left: 13px }
  .readings { font-size: 13px }
}
@media print {
  header, button, .actions, input, footer { display: none }
  main { width: 100% }
  .heading { color: black; background: white; padding: 0 }
  .heading::after { display: none }
  .scores { display: block }
  details { break-inside: avoid }
}
