:root {
  --paper: #e9ede0;
  --panel: #f4f6ee;
  --ink: #17261f;
  --soft: #55665d;
  --rule: #c3ccb9;
  --mark: #a80f63;
  --f0: #6a7670;
  --f1: #3a4fc0;
  --f2: #8a5a00;
  --f3: #0b7a6e;
  --f4: #2e7d24;
  --f5: #a80f63;
  --f6: #6d3bb5;
  --on-pill: #ffffff;
  --sans: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", Cantarell, "Noto Sans", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #18211d; --panel: #212c27; --ink: #e7ede4; --soft: #a6b5ab; --rule: #3c4a43; --mark: #ff7dbd;
    --f0: #7f8c85; --f1: #5a70e6; --f2: #a97412; --f3: #128c7f; --f4: #3f9633; --f5: #cc2a80; --f6: #8755d3;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--sans); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }
code, pre { font-family: var(--mono); font-size: .86em; }
pre { margin: .5rem 0 0; padding: .75rem; overflow-x: auto; background: var(--panel); border-left: 3px solid var(--rule); white-space: pre; }
.offscreen { position: absolute; left: -9999px; }

/* Measuring page */
.run-main { max-width: 34rem; margin: 18vh auto 0; padding: 0 1rem; }
.run-main h1 { margin: 0 0 .5rem; font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; }
.run-main p { margin: 0 0 1.5rem; }
/* An outline, not a border: a border would shrink the frame's viewport below the profile's 300 by 65. */
#widget iframe { display: block; max-width: 100%; border: 0; outline: 1px solid var(--rule); background: var(--panel); }
#status { margin-top: 1rem; color: var(--soft); min-height: 3em; }
#send { padding: .6rem 1rem; background: var(--ink); color: var(--paper); border: 0; font: inherit; cursor: pointer; }
#send:disabled { opacity: .6; cursor: default; }

/* Inside the cross-site frame. No margin, so the checkbox bounds mean the same thing as the profile's. */
body.frame { margin: 0; background: var(--panel); font: 14px/1 var(--sans); overflow: hidden; }
#box { position: absolute; left: 9px; top: 20.5px; display: inline-flex; align-items: center; gap: 12px; height: 24px; white-space: nowrap; }
#check { width: 24px; height: 24px; margin: 0; }

/* Report */
/* Dark in both themes, so the coloured hash segments keep their contrast. */
.hero { padding: 3rem clamp(1rem, 4vw, 3.5rem) 2.5rem; background: #17261f; color: #e9ede0; border-bottom: 1px solid var(--rule); }
.said { margin: 0 0 .5rem; font-size: 1.125rem; }
/* Sized to fit the 36-character string on one line. Narrower screens wrap between its three parts. */
.ja4 { margin: 0; font: 600 clamp(1.3rem, 4.1vw, 4.6rem)/1.15 var(--mono); letter-spacing: -.03em; }
.ja4 .seg { display: inline-block; }
.ja4 .sep { opacity: .45; }
.seg1 { color: #9fb2ff; }
.seg2 { color: #ffa3d0; }
.ja4parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem 2rem; margin: 1.5rem 0 0; max-width: 70rem; }
.ja4parts dt { font-weight: 600; }
.ja4parts dd { margin: 0; opacity: .85; font-size: .94rem; }
.ja4parts .seg0 dt { color: inherit; }
.who { margin: 1.5rem 0 0; font: .84rem/1.4 var(--mono); opacity: .8; overflow-wrap: anywhere; }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; margin-top: 1.5rem; }
.links a.primary { padding: .5rem .9rem; background: #e9ede0; color: #17261f; text-decoration: none; font-weight: 600; border-radius: 3px; }
main { padding: 0 clamp(1rem, 4vw, 3.5rem); }
section { padding: 2.75rem 0 .5rem; }
h2 { margin: 0 0 .5rem; font-size: 1.6rem; line-height: 1.2; letter-spacing: -.015em; }
h3 { margin: 0; font-size: 1rem; }
.lead { max-width: 44rem; margin: 0 0 1rem; color: var(--soft); }
.braid-controls { display: inline-flex; margin-bottom: .75rem; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; flex-wrap: wrap; }
.braid-controls button { padding: .4rem .8rem; background: transparent; color: var(--ink); border: 0; font: inherit; font-size: .94rem; cursor: pointer; }
.braid-controls button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: .75rem; font-size: .88rem; }
.key::before { content: ""; display: inline-block; width: .75em; height: .75em; margin-right: .35em; border-radius: 2px; background: var(--c); }
.f0 { --c: var(--f0); } .f1 { --c: var(--f1); } .f2 { --c: var(--f2); } .f3 { --c: var(--f3); } .f4 { --c: var(--f4); } .f5 { --c: var(--f5); } .f6 { --c: var(--f6); }
.braid { overflow-x: auto; padding-bottom: .75rem; margin-bottom: 1rem; }
.braid svg { display: block; }
.braid text { font-family: var(--mono); }
.col { font: 600 13px var(--sans) !important; fill: var(--ink); }
.ver { font-size: 11px; fill: var(--soft); }
.hdr rect { fill: var(--c); }
.pill { font-size: 11.5px; fill: var(--on-pill); pointer-events: none; }
.link { fill: none; stroke: var(--c); stroke-width: 1.5; opacity: .22; }
.link.moved { opacity: .75; stroke-width: 2; }
svg.focused .hdr:not(.on) { opacity: .16; }
.hdr.on .link { opacity: 1; stroke-width: 2.5; }
.hdr { outline: none; }
.hdr:focus-visible rect { stroke: var(--ink); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) { svg .hdr { transition: opacity .12s; } }
details { margin: .4rem 0; }
summary { cursor: pointer; }
.orders { columns: 26rem auto; column-gap: 2rem; }
.order { break-inside: avoid; margin: 1rem 0; }
.meta, .missing { margin: 0; font-size: .85rem; color: var(--soft); overflow-wrap: anywhere; }
.scroll { overflow-x: auto; }
table.facts { border-collapse: collapse; width: 100%; min-width: 46rem; font-size: .92rem; }
.facts th, .facts td { padding: .55rem .75rem .55rem 0; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); font-weight: 400; }
.facts thead th { border-top: 0; font-weight: 600; }
.facts tbody th span { display: block; font-weight: 600; }
.facts tbody th code { display: block; color: var(--soft); font-size: .78rem; overflow-wrap: anywhere; }
.facts tbody th small { display: block; max-width: 24rem; color: var(--soft); }
.facts td { font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; max-width: 24rem; }
.facts td.differs { color: var(--mark); }
.facts td pre { max-height: 16rem; color: var(--ink); }
.how { font-family: var(--sans); white-space: nowrap; }
.how.same { font-weight: 600; }
.how.ours { color: var(--soft); }
.how.none { color: var(--mark); }
.kv { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: .3rem 1rem; margin: 0 0 1rem; }
.kv dt { color: var(--soft); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
footer { margin-top: 2rem; padding: 1.5rem clamp(1rem, 4vw, 3.5rem) 3rem; border-top: 1px solid var(--rule); color: var(--soft); font-size: .9rem; }
footer p { max-width: 44rem; margin: 0; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: .5rem; } }
