/* Homeproof property check. Document aesthetic: paper, ink, one coloured edge per verdict.
   Tokens: paper #FBFBF9, ink #1C2430, edge red #C8102E, amber #B7791F, green #2F7D5B,
           rule #D9DDE1, muted #5F6873, unavailable #A0A7AE, link #0F5C8C */
:root {
  --paper: #FBFBF9; --card: #FFFFFF; --ink: #1C2430; --edge: #C8102E; --amber: #B7791F; --green: #2F7D5B;
  --rule: #D9DDE1; --muted: #5F6873; --grey: #A0A7AE; --wash: #F1F2EF; --link: #0F5C8C;
  --red-wash: #FBEDEF; --amber-wash: #FBF4E6; --green-wash: #E9F4EE; --grey-wash: #F1F2EF;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(28, 36, 48, .05), 0 10px 30px -18px rgba(28, 36, 48, .25);
  --wide: 1080px; --narrow: 760px; --header-h: 60px; --subnav-h: 48px;
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }        /* the hidden attribute wins over any display rule below */
html { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; padding-top: 36px; padding-bottom: 72px; scroll-margin-top: var(--header-h); }
.container { width: 100%; max-width: var(--wide); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
main.narrow { max-width: var(--narrow); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 4.6vw, 46px); overflow-wrap: anywhere; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0 0 12px; }
.lead { font-size: 19px; line-height: 1.5; color: #3A4453; max-width: 60ch; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 10px; font-weight: 700; display: block; }
.eyebrow.light { color: rgba(255, 255, 255, .72); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
code, pre { font-family: var(--mono); }
code { font-size: .92em; }
pre { background: var(--wash); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; font-size: 13px; max-width: 100%; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.segmented a:focus-visible, .jump a:focus-visible, .nav a:focus-visible { outline-offset: -3px; }   /* inside clipped containers */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--radius); z-index: 100; }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- header & footer */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251, 251, 249, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.bar { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 10px 0; }
.brand .mark { width: 28px; height: 28px; flex: none; }
.brand-name { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.brand-desc { font-size: 13px; color: var(--muted); border-left: 1px solid var(--rule); padding-left: 10px; margin-left: 2px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; }
.nav a:hover { background: var(--wash); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
@media (max-width: 640px) {
  .bar { padding-bottom: 6px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-right: 32px;
         -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 10px; font-size: 14px; white-space: nowrap; }
}
.site-footer { border-top: 1px solid var(--rule); background: var(--wash); }
.foot { padding-top: 26px; padding-bottom: 34px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.foot-row { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.foot strong { color: var(--ink); font-family: var(--display); font-size: 17px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot p { margin: 0; max-width: 70ch; }

/* ---------------------------------------------------------------- controls */
.btn, button { font: inherit; font-weight: 700; padding: 11px 18px; background: var(--ink); color: #fff; border: 1px solid var(--ink);
               border-radius: var(--radius); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; line-height: 1.2; }
.btn:hover, button:hover { background: #2B3646; color: #fff; }
.btn.quiet, button.quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.quiet:hover, button.quiet:hover { background: var(--wash); color: var(--ink); }
.btn.light, button.light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .65); }
.btn.light:hover, button.light:hover { background: rgba(255, 255, 255, .14); }
.btn.small, button.small { padding: 7px 12px; font-size: 14px; }
input[type=text], input[type=search], textarea { font: inherit; padding: 12px 14px; border: 1px solid #8B939D; border-radius: var(--radius); background: #fff; width: 100%; color: var(--ink); }
input[type=text]:focus, input[type=search]:focus, textarea:focus { border-color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }
label { display: block; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.h-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 14px; }
.h-section { font-size: 22px; }
.h-card { font-size: 19px; }
.stack > * + * { margin-top: 44px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 4px; }

.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; padding: 4px 22px; }

/* status pills, dots, badges, tiers */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
        border: 1px solid var(--rule); color: var(--muted); background: var(--wash); white-space: nowrap; letter-spacing: .02em; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grey); flex: none; }
.pill.RED { color: #8E0B21; background: var(--red-wash); border-color: #EFC6CC; } .pill.RED::before { background: var(--edge); }
.pill.AMBER, .pill.key { color: #7A500F; background: var(--amber-wash); border-color: #EBD6AE; } .pill.AMBER::before, .pill.key::before { background: var(--amber); }
.pill.GREEN, .pill.ready { color: #1F5C41; background: var(--green-wash); border-color: #BFDCCB; } .pill.GREEN::before, .pill.ready::before { background: var(--green); }
.dot, .sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--grey); flex: none; }
.dot.RED, .sw.RED { background: var(--edge); } .dot.AMBER, .sw.AMBER { background: var(--amber); } .dot.GREEN, .sw.GREEN { background: var(--green); }
.dot.INK { background: var(--ink); }
.sw.ok, .sw.ready { background: var(--green); } .sw.partial, .sw.key { background: var(--amber); }
.sw.unavailable, .sw.skipped, .sw.demo, .sw.error { background: var(--grey); }
.sw.pending { background: transparent; border: 2px solid var(--grey); }
.sw.running { background: transparent; border: 2px solid var(--amber); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 2px; color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; vertical-align: middle; }
.badge.confirmed { border-color: var(--green); color: var(--green); }
.badge.pending { border-color: var(--amber); color: #7A500F; }
.badge.unanchored { border-color: var(--grey); color: var(--muted); }
.badge.failed, .badge.unsealed { border-color: var(--edge); color: var(--edge); }
.tier { display: inline-block; font-size: 12px; padding: 1px 7px; border: 1px solid var(--rule); border-radius: 2px; color: var(--muted); white-space: nowrap; }
.tier.V { border-color: var(--green); color: var(--green); }
.tier.I { border-color: #9DBBD1; color: #2F5F82; }
.tier.D { border-color: var(--amber); color: #7A500F; }
.tier.U { border-color: var(--grey); color: var(--muted); }

/* ---------------------------------------------------------------- home */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .85fr); gap: 40px; align-items: start; padding: 16px 0 4px; }
.hero h1 { max-width: 17ch; margin-bottom: 14px; }
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; gap: 28px; } }
form.search { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 22px 0 12px; }
form.search input { font-size: 17px; padding: 14px 16px; box-shadow: var(--shadow); }
@media (max-width: 560px) { form.search { grid-template-columns: 1fr; } }
.demo-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.steps ol { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.steps .num { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); font-weight: 600; display: grid; place-items: center; }
.steps strong { display: block; margin-bottom: 2px; }
.steps p { margin: 0; font-size: 14px; color: var(--muted); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--rule); background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.source { padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.source-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.stat { background: var(--wash); border-radius: var(--radius); padding: 14px 16px; }
.stat strong { font-family: var(--display); font-size: 30px; display: block; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
a.recent { display: grid; gap: 8px; align-content: start; justify-items: start; text-decoration: none; color: var(--ink); padding: 16px 18px; }
a.recent:hover { border-color: var(--ink); }
a.recent strong { font-family: var(--display); font-size: 17px; line-height: 1.25; }

/* products */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.product { padding: 18px 20px; }
.product p { margin: 0 0 8px; font-size: 14px; }
.product-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.product h3 { font-size: 20px; }
.price { font-family: var(--display); font-size: 22px; font-weight: 600; white-space: nowrap; }
.product.featured { border-color: var(--ink); }
#pricing { scroll-margin-top: calc(var(--header-h) + 16px); }
.pro { margin-top: 12px; padding: 0; }
.pro summary { cursor: pointer; padding: 14px 20px; font-weight: 700; color: var(--ink); font-size: 16px; list-style: none; display: flex; align-items: center; gap: 10px; }
.pro summary::before { content: "+"; font-family: var(--display); font-size: 20px; width: 22px; text-align: center; }
.pro[open] summary::before { content: "\2212"; }
.pro summary::-webkit-details-marker { display: none; }
.pro-body { padding: 4px 20px 16px; border-top: 1px solid var(--rule); }
.pro-body p { margin: 0 0 8px; font-size: 14px; }

/* ---------------------------------------------------------------- certificate */
.subnav { position: sticky; top: var(--header-h); z-index: 30; background: var(--paper); border-bottom: 1px solid var(--rule); }
.subnav-in { display: flex; align-items: center; gap: 18px; min-height: var(--subnav-h); }
.subnav-address { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; max-width: 26%; flex: none; min-width: 0; }
.subnav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jump { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 0; }
.jump a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 13px; color: var(--ink); text-decoration: none; border-radius: 999px; white-space: nowrap; }
.jump a:hover { background: var(--wash); }
.jump a.on { background: var(--ink); color: #fff; }
@media (max-width: 760px) { .subnav-address { display: none; } }

.cert-head { display: flex; justify-content: space-between; gap: 16px 24px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }
.cert-head > div:first-child { min-width: 0; flex: 1 1 420px; }
.cert-tools { display: grid; gap: 10px; justify-items: end; }
.meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
.segmented { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.segmented a { padding: 6px 14px; font-size: 14px; color: var(--ink); text-decoration: none; }
.segmented a + a { border-left: 1px solid var(--ink); }
.segmented a.on { background: var(--ink); color: #fff; }

.verdict { border-left: 12px solid var(--grey); background: var(--grey-wash); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 24px;
           display: grid; grid-template-columns: 1fr minmax(220px, 300px); gap: 12px 32px; align-items: center; margin: 0 0 24px; }
.verdict.RED { border-color: var(--edge); background: var(--red-wash); }
.verdict.AMBER { border-color: var(--amber); background: var(--amber-wash); }
.verdict.GREEN { border-color: var(--green); background: var(--green-wash); }
.verdict h2 { font-size: 26px; margin-bottom: 4px; }
.verdict p { margin: 0; }
.meter { height: 8px; background: rgba(28, 36, 48, .12); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.meter span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
@media (max-width: 720px) { .verdict { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.tile { background: var(--card); border: 1px solid var(--rule); border-left: 5px solid var(--grey); border-radius: var(--radius); padding: 12px 14px 14px;
        display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); min-height: 96px; }
.tile.RED { border-left-color: var(--edge); } .tile.AMBER { border-left-color: var(--amber); } .tile.GREEN { border-left-color: var(--green); }
.tile.empty { background: transparent; color: var(--muted); }
a.tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tile .name { font-family: var(--display); font-size: 17px; font-weight: 600; }
.tile .line { font-size: 13px; color: var(--muted); }
.rag-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.RED > .rag-label, .RED .rag-label { color: #8E0B21; } .AMBER > .rag-label, .AMBER .rag-label { color: #7A500F; } .GREEN > .rag-label, .GREEN .rag-label { color: #1F5C41; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); margin-bottom: 26px; }

.section-card { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--grey); border-radius: var(--radius);
                padding: 20px 24px 10px; margin: 0 0 18px; scroll-margin-top: calc(var(--header-h) + var(--subnav-h) + 16px); }
.section-card.RED { border-top-color: var(--edge); } .section-card.AMBER { border-top-color: var(--amber); } .section-card.GREEN { border-top-color: var(--green); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 12px; margin-bottom: 8px; flex-wrap: wrap; }
.section-head h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.finding { border-radius: var(--radius); padding: 12px 16px; margin: 8px 0 12px; border-left: 4px solid var(--grey); background: var(--grey-wash); }
.finding.RED { border-color: var(--edge); background: var(--red-wash); }
.finding.AMBER { border-color: var(--amber); background: var(--amber-wash); }
.finding.INFO { border-color: var(--green); background: var(--green-wash); }
.finding .sev { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 2px; margin-bottom: 4px; background: rgba(28, 36, 48, .08); color: var(--muted); }
.finding.RED .sev { color: #8E0B21; background: rgba(200, 16, 46, .12); } .finding.AMBER .sev { color: #7A500F; background: rgba(183, 121, 31, .16); } .finding.INFO .sev { color: #1F5C41; background: rgba(47, 125, 91, .14); }
.finding strong { display: block; margin-bottom: 2px; }
.finding p { margin: 0; font-size: 15px; }
.finding .act { margin-top: 6px; font-size: 14px; color: var(--muted); }
.finding .act span { font-weight: 700; color: var(--ink); margin-right: 4px; }
table.items { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 15px; }
table.items th { text-align: left; font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 12px 8px 0; border-bottom: 1px solid var(--rule); }
table.items td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.items tr:last-child td { border-bottom: 0; }
table.items td.val { font-weight: 700; }
table.items td.src { color: var(--muted); font-size: 13px; width: 18%; min-width: 7em; }
table.items td.val ul { font-weight: 400; }
table.items tr[hidden] { display: none !important; }
table.kv td:first-child { color: var(--muted); font-size: 13px; width: 130px; }
table.kv td.val { font-weight: 400; word-break: break-word; }
@media screen and (max-width: 720px) {
  table.items:not(.kv) thead { display: none; }
  table.items:not(.kv) tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  table.items:not(.kv) tr:last-child { border-bottom: 0; }
  table.items:not(.kv) td { display: block; border: 0; padding: 2px 0; white-space: normal; }
  table.items td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-top: 4px; }
}
ul.plain { margin: 4px 0 0; padding-left: 18px; }
.apps li { margin-bottom: 6px; }
details summary { cursor: pointer; color: var(--link); font-size: 14px; }
.note { font-size: 13px; color: var(--muted); display: block; margin-top: 3px; font-weight: 400; }

form.declare { margin: 30px 0; }
form.declare fieldset { border: 0; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; }
form.declare fieldset label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
form.declare input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
form.declare label > input[type=text], form.declare label > textarea { margin-top: 6px; }
@media (max-width: 640px) { form.declare fieldset { grid-template-columns: 1fr; } }

.seal { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px 28px; margin: 36px 0 12px;
        display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: center; scroll-margin-top: calc(var(--header-h) + var(--subnav-h) + 16px); }
.seal a { color: #fff; }
.seal .hash { display: block; font-size: 14px; word-break: break-all; margin: 6px 0 14px; padding: 10px 12px; background: rgba(255, 255, 255, .08); border-radius: var(--radius); }
.seal .small { color: rgba(255, 255, 255, .82); }
.seal .badge { border-color: rgba(255, 255, 255, .5); color: #fff; }
.seal .badge.confirmed { background: var(--green); border-color: var(--green); }
.seal .badge.pending { background: var(--amber); border-color: var(--amber); }
.seal .badge.failed { background: var(--edge); border-color: var(--edge); }
.seal-actions { margin-top: 14px; }
.seal-meta { margin: 12px 0 0; }
.stamp { width: 110px; height: 110px; border: 3px double rgba(255, 255, 255, .7); border-radius: 50%; display: grid; place-content: center; text-align: center; font-family: var(--display); transform: rotate(-8deg); }
.stamp span { font-size: 34px; font-weight: 600; line-height: 1; }
.stamp small { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
@media (max-width: 600px) { .seal { grid-template-columns: 1fr; } .stamp { display: none; } }
.anchorbox { border: 1px solid var(--rule); border-left: 6px solid var(--grey); border-radius: var(--radius); background: var(--card); padding: 16px 20px; margin-bottom: 8px; }
.anchorbox.confirmed { border-left-color: var(--green); }
.anchorbox.pending { border-left-color: var(--amber); }
.anchorbox form { display: inline; }
.back-top { position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center;
            text-decoration: none; box-shadow: var(--shadow); z-index: 20; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.back-top.show { opacity: 1; visibility: visible; }
.attrib { font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 24px; }
.print-only { display: none; }
form.declare { scroll-margin-top: calc(var(--header-h) + var(--subnav-h) + 16px); }

/* property pictures */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 12px; margin: 0 0 24px; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; break-inside: avoid; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--wash); }
.gallery figcaption { padding: 8px 12px 10px; font-size: 13px; color: var(--muted); }
.gallery figcaption strong { display: block; color: var(--ink); font-family: var(--display); font-size: 15px; margin-bottom: 2px; }
.gallery .credit { display: block; font-size: 11px; margin-top: 4px; }
.running-map { margin: 20px 0 0; }
.running-map img { display: block; width: 100%; height: auto; aspect-ratio: 760 / 240; object-fit: cover; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--wash); }
.running-map figcaption { margin-top: 4px; }
a.recent .thumb { width: calc(100% + 36px); max-width: none; height: auto; aspect-ratio: 26 / 10; object-fit: cover; margin: -16px -18px 6px; border-bottom: 1px solid var(--rule); background: var(--wash); }

/* section maps */
.section-body { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 20px; align-items: start; }
.section-body.has-map { grid-template-columns: minmax(0, 1fr) min(340px, 42%); }
.section-main { min-width: 0; }
.section-map { margin: 6px 0 14px; position: sticky; top: calc(var(--header-h) + var(--subnav-h) + 12px); }
.section-map img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--wash); }
.section-map figcaption { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.section-map .lg { display: inline-flex; align-items: center; gap: 4px; }
.section-map .lg i { display: inline-block; width: 10px; height: 10px; border: 1px solid rgba(28, 36, 48, .25); }
.section-card::after { content: ""; display: block; clear: both; }
.declare-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; margin: 12px 0; }
select { font: inherit; padding: 10px 12px; border: 1px solid #8B939D; border-radius: var(--radius); background: #fff; width: 100%; color: var(--ink); margin-top: 6px; }
@media (max-width: 720px) { .section-body.has-map { grid-template-columns: minmax(0, 1fr); } .section-map { position: static; margin: 4px 0 14px; } .declare-grid { grid-template-columns: 1fr; } }

/* interactive map, favourites, accounts */
.mapmodal { position: fixed; inset: 0; background: rgba(28, 36, 48, .62); z-index: 200; display: grid; place-items: center; padding: 16px; }
.mapmodal-box { background: #fff; border-radius: 8px; width: min(1040px, 96vw); height: min(82vh, 760px); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.mapmodal-head { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.mapmodal-close { margin-left: auto; background: transparent; color: var(--ink); border: 1px solid var(--rule); width: 36px; height: 36px; padding: 0; font-size: 22px; line-height: 1; border-radius: 50%; display: grid; place-items: center; }
.mapmodal-close:hover { background: var(--wash); color: var(--ink); }
#mapmodal-map { flex: 1; min-height: 0; background: var(--wash); }
body.modal-open { overflow: hidden; }
.section-map img, .gallery figure[data-layers] img { cursor: zoom-in; }
.star { background: transparent; border: 1px solid var(--rule); color: var(--grey); font-size: 18px; padding: 2px 10px; border-radius: 999px; line-height: 1.4; }
.star:hover { background: var(--wash); color: var(--amber); }
.star.on { color: var(--amber); border-color: var(--amber); background: var(--amber-wash); }
.inline { display: inline; }
.auth { max-width: 520px; }
.auth-form { margin-top: 16px; }
.auth-form > label { margin-bottom: 12px; }
.auth-form label > input, .auth-form label > select { margin-top: 6px; }
.kinds { border: 0; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.kinds legend { font-weight: 700; margin-bottom: 8px; }
.kind { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.kind input { margin-top: 4px; accent-color: var(--ink); }
.kind:has(input:checked) { border-color: var(--ink); background: var(--wash); }
.stack-section { margin-top: 36px; }
.declare-conn { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 16px 6px; margin: 14px 0; }
.declare-conn legend { font-weight: 700; padding: 0 6px; }
.seller-intro { margin-bottom: 18px; }

/* ---------------------------------------------------------------- verify */
.hash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 30px; }
.hash-card code { display: block; word-break: break-all; font-size: 13px; }
@media (max-width: 720px) { .hash-grid { grid-template-columns: 1fr; } }
table.chain td { font-size: 14px; }

/* ---------------------------------------------------------------- about */
.prose h2 { margin: 36px 0 10px; font-size: 24px; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose p, .prose ol, .prose ul { max-width: 70ch; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.toc { padding: 14px 18px; margin: 22px 0 6px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.toc li { margin: 2px 0; break-inside: avoid; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* ---------------------------------------------------------------- running, list, error */
.progress { list-style: none; padding: 0; margin: 12px 0 0; }
.progress li { padding: 9px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; }
.progress li:last-child { border-bottom: 0; }
.filter { max-width: 420px; margin: 0 0 14px; }
.error-page { text-align: center; padding: 48px 0; }
.error-page .lead { margin: 12px auto 24px; }

/* ------------------------------------------------- narrow screens (last, so these win over the rules above) */
@media (max-width: 900px) {
  /* below this the nav can wrap under the brand, so the header is taller than --header-h: it stops being
     sticky and the certificate's section bar takes the top of the viewport instead */
  :root { --header-h: 0px; }
  .brand-desc { display: none; }
  .site-header { position: static; }
  .jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; padding: 4px 0 6px; }
}

/* ---------------------------------------------------------------- print */
@media print {
  /* Compact A4 layout: smaller type, three pictures in a row, the map beside the findings and the table across the
     full width, each section boxed as a unit (short ones move to the next page whole; long ones carry their border
     on every page) and long lists cut to their first ten entries. Playwright sets the page margins and footer. */
  html { font-size: 10.5px; line-height: 1.4; scroll-padding-top: 0; }
  body { background: #fff; }
  .site-header, .site-footer, .subnav, .back-top, form, .btn, button, .noprint { display: none !important; }
  main { padding: 0; max-width: none; }
  .container { padding: 0; }
  .cert-head { margin-bottom: 6px; }
  .cert-head h1, .cert-head .address { font-size: 21px; line-height: 1.15; margin: 2px 0 4px; }
  .cert-head .meta, .cert-head .meta span { font-size: 9.5px; }
  .crumbs { font-size: 9px; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; }
  .gallery figure { break-inside: avoid; }
  .gallery figcaption { padding: 4px 8px 6px; font-size: 8.5px; line-height: 1.35; }
  .gallery figcaption strong { font-size: 10.5px; margin-bottom: 1px; }
  .gallery .credit { font-size: 7.5px; margin-top: 2px; }
  .verdict { padding: 8px 14px; margin-bottom: 10px; break-inside: avoid; border-left-width: 8px; }
  .verdict h2 { font-size: 15px; margin-bottom: 2px; }
  .verdict .small { font-size: 9.5px; }
  .meter { height: 5px; margin-bottom: 3px; }
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
  .tile { min-height: 0; padding: 5px 8px 6px; gap: 1px; border-left-width: 4px; break-inside: avoid; }
  .tile .name { font-size: 11.5px; }
  .tile .line { font-size: 9px; }
  .rag-label { font-size: 8px; }
  .legend { font-size: 9px; gap: 3px 12px; margin-bottom: 10px; }
  .tier { font-size: 8.5px; padding: 0 4px; }
  /* Every section starts a fresh page, however short the one before it was. The seal is the exception: it follows
     the last section straight on, wherever that ended. */
  .section-card { padding: 9px 12px 4px; margin: 0; border-top-width: 3px; break-before: page; break-inside: auto; box-decoration-break: clone; -webkit-box-decoration-break: clone; box-shadow: none; }
  .seal { break-before: auto; }
  .section-head { margin-bottom: 3px; break-after: avoid; }
  .section-head h2 { font-size: 14.5px; gap: 6px; }
  .section-head .small { font-size: 9px; }
  .section-body.has-map { display: grid; grid-template-columns: minmax(0, 1fr) 58mm; column-gap: 10px; align-items: start; }
  .section-body.has-map .section-main { display: contents; }
  .section-body.has-map .section-main > * { grid-column: 1; }
  .section-body.has-map .section-main > table.items { grid-column: 1 / -1; }
  .section-body.has-map .section-map { grid-column: 2; grid-row: 1 / span 40; position: static; margin: 0 0 6px; }
  .section-map img { width: 100%; height: auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .section-map figcaption { font-size: 8px; line-height: 1.35; }
  .finding { padding: 5px 9px; margin: 3px 0 5px; break-inside: avoid; border-left-width: 3px; }
  .finding strong { font-size: 10.5px; }
  .finding p { font-size: 9.5px; }
  .finding .act { font-size: 9px; margin-top: 3px; }
  .finding .sev { font-size: 7.5px; margin-bottom: 2px; }
  table.items { font-size: 9.5px; margin: 3px 0 4px; }
  table.items th { font-size: 8px; padding: 2px 8px 3px 0; }
  table.items td { padding: 3px 8px 3px 0; }
  table.items td.src { font-size: 8px; width: 15%; min-width: 0; }
  table.items tr { break-inside: avoid; }
  table.items tr.tall { break-inside: auto; }       /* a long list may run over the page rather than leave a blank half page */
  table.items .note { font-size: 8.5px; }
  thead { display: table-header-group; }
  ul.plain { margin: 0; padding-left: 12px; }
  ul.plain li { margin: 0 0 2px; }
  ul.apps li:nth-child(n+11):not(.more) { display: none; }
  details > summary { display: none; }
  .print-only { display: block; }
  li.print-only { display: list-item; }
  .seal { background: none; color: var(--ink); border: 2px solid var(--ink); padding: 10px 14px; break-inside: avoid; }
  .seal a, .seal .small, .seal .badge { color: var(--ink); }
  .seal .hash { background: none; border: 1px solid var(--rule); font-size: 9px; word-break: break-all; }
  .seal .badge.confirmed, .seal .badge.pending, .seal .badge.failed { background: none; }
  .seal .badge, .seal .eyebrow.light { color: var(--ink); border-color: var(--ink); }
  .stamp { border-color: var(--ink); }
  .card, .tile, .finding { box-shadow: none; }
  .dot, .sw, .meter span, .pill::before, .finding, .verdict, .tile, .section-card, .finding .sev, .tier { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { text-decoration: none; }
}

/* "Keep this check" prompt for visitors without an account */
.save-prompt{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin:0 0 22px;border-left:4px solid var(--green,#1B7A4A)}
.save-prompt .h-card{margin:0 0 4px}
.save-prompt p{margin:0;max-width:62ch}

/* Full certificate purchase panel */
.buy-panel{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin:0 0 22px;border-left:4px solid var(--ink,#1C2430)}
.buy-panel.done{border-left-color:var(--green,#1B7A4A)}
.buy-panel .h-card{margin:0 0 4px}
.buy-panel p{margin:0;max-width:62ch}
.buy-form{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:220px}
.buy-form .price-line{font-size:1.4rem;margin:0}
.buy-form label{display:flex;gap:6px;align-items:center}
