/* The check portal. One memorable thing — the passport; everything else is a quiet
   report: data first, hairlines where they separate data, status as ink. */

:root {
  --paper: #eef2f0;
  --surface: #ffffff;
  --ink: #15202b;
  --muted: #56616c;
  --faint: #86909a;
  --rule: #d5dcdf;
  --rule-strong: #b8c2c7;
  --cover: #6b1d2e;
  --cover-ink: #fbf3f4;
  --link: #6b1d2e;
  --foil: #a8842a;
  --ok: #1d7a4f;
  --bad: #b42318;
  --warn: #946100;
  --info: #2b5c8a;
  --g1: rgba(107, 29, 46, 0.05);
  --g2: rgba(168, 132, 42, 0.07);
  --sans: "Onest", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  --r: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131619;
    --surface: #1b2026;
    --ink: #e6ebee;
    --muted: #a3adb6;
    --faint: #76808a;
    --rule: #2b333b;
    --rule-strong: #3b454e;
    --cover: #8a2b40;
    --cover-ink: #fbeff2;
    --link: #e8a0b0;
    --foil: #d4b35a;
    --ok: #4cc08a;
    --bad: #f07a6e;
    --warn: #e0a83c;
    --info: #74aee3;
    --g1: rgba(222, 110, 135, 0.06);
    --g2: rgba(212, 179, 90, 0.06);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #131619;
  --surface: #1b2026;
  --ink: #e6ebee;
  --muted: #a3adb6;
  --faint: #76808a;
  --rule: #2b333b;
  --rule-strong: #3b454e;
  --cover: #8a2b40;
  --cover-ink: #fbeff2;
  --link: #e8a0b0;
  --foil: #d4b35a;
  --ok: #4cc08a;
  --bad: #f07a6e;
  --warn: #e0a83c;
  --info: #74aee3;
  --g1: rgba(222, 110, 135, 0.06);
  --g2: rgba(212, 179, 90, 0.06);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 116px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

h1,
h2,
p {
  margin: 0;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.875em;
  letter-spacing: 0;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 28px;
  }
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.8125rem;
  line-height: 1.5;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--r);
  z-index: 50;
}

.skip:focus {
  left: 16px;
}

.probe-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* ── the bar ─────────────────────────────────────────────────────────────── */

.top {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink) !important;
  min-width: 0;
}

.crest {
  width: 30px;
  height: 30px;
  flex: none;
}

.crest rect {
  fill: var(--cover);
}

.crest g {
  fill: none;
  stroke: #e8c66a;
  stroke-width: 2.2;
}

.brand-name {
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-by {
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .brand-by {
    display: none;
  }
}

.top-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.btn {
  font: 500 0.875rem/1 var(--sans);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  padding: 9px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--ink);
}

.btn-primary {
  background: var(--cover);
  border-color: var(--cover);
  color: var(--cover-ink);
}

.btn-primary:hover {
  filter: brightness(1.08);
  border-color: var(--cover);
}

.btn-icon {
  padding: 7px;
  display: grid;
  place-items: center;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.btn-icon svg path {
  fill: currentColor;
  stroke: none;
}

@media (max-width: 520px) {
  #again {
    display: none;
  }
}

/* ── hero ────────────────────────────────────────────────────────────────── */

.hero {
  padding: 40px 0 36px;
}

.hero-title {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  line-height: 1.06;
  font-weight: 650;
  letter-spacing: -0.025em;
  max-width: 16ch;
}

.hero-lead {
  margin-top: 14px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

.hero-grid {
  margin-top: 32px;
  display: grid;
  gap: 24px;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 36px;
    align-items: start;
  }
}

/* ── the passport ────────────────────────────────────────────────────────── */

.passport {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background:
    repeating-radial-gradient(circle at 18% 28%, transparent 0 9px, var(--g1) 9px 10px),
    repeating-radial-gradient(circle at 86% 74%, transparent 0 11px, var(--g2) 11px 12px),
    linear-gradient(160deg, var(--surface), var(--surface));
  border: 1px solid var(--rule-strong);
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(21, 32, 43, 0.45);
}

.pp-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--cover);
  color: var(--cover-ink);
}

.pp-title {
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8125rem;
}

.pp-title-alt {
  opacity: 0.72;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.6875rem;
}

.pp-code {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: #f0d78e;
}

.pp-body {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 20px 12px;
}

@media (max-width: 560px) {
  .pp-body {
    grid-template-columns: 1fr;
  }
}

.pp-photo {
  display: grid;
  align-content: start;
  gap: 10px;
}

@media (max-width: 560px) {
  .pp-photo {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: end;
    gap: 14px;
  }

  .pp-photo .rosette {
    width: 96px;
    height: 96px;
  }
}

.rosette {
  width: 132px;
  height: 132px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--surface);
}

.rosette path {
  fill: none;
  stroke-width: 0.45;
  stroke-linejoin: round;
}

.rosette-a {
  stroke: var(--cover);
}

.rosette-b {
  stroke: var(--foil);
}

.pp-number {
  display: grid;
  gap: 2px;
  font-size: 0.75rem;
  color: var(--muted);
}

.pp-number code {
  color: var(--ink);
  font-size: 0.8125rem;
}

.pp-fields {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
}

@media (max-width: 760px) {
  .pp-fields {
    grid-template-columns: 1fr;
  }
}

.pp-field {
  min-width: 0;
  border-bottom: 1px dotted var(--rule-strong);
  padding-bottom: 6px;
}

.pp-field dt {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.pp-field dd {
  margin: 0;
  font-weight: 550;
  overflow-wrap: anywhere;
}

.pp-field dd.mono {
  font-weight: 500;
}

.pp-field dd.pending {
  color: var(--faint);
  font-weight: 400;
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    opacity: 0.45;
  }
}

.pp-stamps {
  position: absolute;
  right: 20px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.stamp {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 3px solid currentColor;
  border-radius: 6px;
  outline: 1px solid currentColor;
  outline-offset: 2px;
  transform: rotate(-8deg);
  opacity: 0.86;
  mix-blend-mode: multiply;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

:root[data-theme="dark"] .stamp {
  mix-blend-mode: normal;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stamp {
    mix-blend-mode: normal;
  }
}

.stamp-ok {
  color: var(--ok);
}

.stamp-bad {
  color: var(--bad);
}

.stamp-warn {
  color: var(--warn);
  font-size: 0.75rem;
  transform: rotate(5deg);
}

.landed .stamp {
  animation: land 0.42s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.landed .stamp + .stamp {
  animation-delay: 0.16s;
}

@keyframes land {
  from {
    opacity: 0;
    transform: rotate(-14deg) scale(1.6);
  }
}

@media (max-width: 560px) {
  .pp-stamps {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 4px 20px 8px;
  }
}

.pp-mrz {
  display: grid;
  gap: 2px;
  padding: 12px 20px 14px;
  border-top: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface) 88%, var(--paper));
  overflow: hidden;
}

.pp-mrz code {
  font-size: clamp(0.5625rem, 0.4rem + 0.7vw, 0.8125rem);
  letter-spacing: 0.16em;
  color: var(--muted);
  white-space: nowrap;
  font-variant-ligatures: none;
  font-feature-settings: "calt" 0, "liga" 0;
}

/* ── the verdict ─────────────────────────────────────────────────────────── */

.verdict {
  display: grid;
  gap: 10px;
  align-content: start;
}

.score-label {
  color: var(--muted);
  font-size: 0.875rem;
}

.report-json {
  display: none;
}

.score {
  font-size: clamp(3.5rem, 2.6rem + 3vw, 5.25rem);
  line-height: 0.95;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.score.pending {
  color: var(--faint);
}

.score-unit {
  font-size: 0.32em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 6px;
}

.tone-ok {
  color: var(--ok);
}

.tone-warn {
  color: var(--warn);
}

.tone-bad {
  color: var(--bad);
}

.checked {
  font-weight: 550;
  margin-top: 4px;
}

.issues {
  margin-top: 8px;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}

.issues-title {
  font-size: 1rem;
  font-weight: 650;
  margin-bottom: 8px;
}

.issues ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.issues li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.issues li .badge {
  align-self: start;
  margin-top: 2px;
}

.issues a {
  color: var(--ink) !important;
  text-decoration-color: var(--rule-strong);
}

.issues a:hover {
  text-decoration-color: currentColor;
}

.clean {
  margin-top: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  color: var(--ok);
  font-weight: 550;
}

.privacy {
  margin-top: 10px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

a.btn {
  text-decoration: none;
  display: inline-block;
  text-align: center;
  color: var(--ink);
}

a.btn-primary {
  color: var(--cover-ink) !important;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.share-status {
  display: grid;
  gap: 6px;
}

.share-row {
  display: flex;
  gap: 8px;
}

.share-url {
  flex: 1;
  min-width: 0;
  font: 0.8125rem var(--mono);
  padding: 8px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
}

.shared-note {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 14px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r);
}

.about {
  padding: 32px 0 8px;
}

.about h2 {
  font-size: 1.25rem;
  font-weight: 650;
}

.about p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 78ch;
}

/* ── badges: status as ink ───────────────────────────────────────────────── */

.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.35;
}

.badge-fail {
  color: var(--bad);
}

.badge-warn {
  color: var(--warn);
}

.badge-info {
  color: var(--info);
}

.badge-ok {
  color: var(--ok);
}

/* ── section navigation ──────────────────────────────────────────────────── */

.secnav-slot {
  position: sticky;
  top: 0;
  z-index: 20;
}

.secnav {
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.secnav-in {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-top: 12px;
  padding-bottom: 12px;
}

.secnav-in::-webkit-scrollbar {
  display: none;
}

.secnav a {
  color: var(--muted) !important;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 500;
}

.secnav a:hover {
  color: var(--ink) !important;
}

/* ── report sections ─────────────────────────────────────────────────────── */

.report {
  padding-top: 8px;
  padding-bottom: 56px;
}

.block {
  display: grid;
  gap: 18px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 980px) {
  .block {
    grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
    gap: 36px;
  }
}

.block-head h2 {
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.block-lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 44ch;
}

.block-body {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.facts {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
}

.fact {
  display: grid;
  grid-template-columns: minmax(120px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
  padding: 11px 16px;
  border-top: 1px solid var(--rule);
}

.fact:first-child {
  border-top: 0;
}

@media (max-width: 560px) {
  .fact {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.fact dt {
  color: var(--muted);
  font-size: 0.875rem;
}

.fact dd {
  margin: 0;
  overflow-wrap: anywhere;
  min-width: 0;
}

.plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.finding {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.finding:first-child {
  border-top: 0;
  padding-top: 2px;
}

@media (max-width: 560px) {
  .finding {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .finding .badge {
    justify-self: start;
  }
}

.finding .badge {
  justify-self: start;
  align-self: start;
  margin-top: 3px;
}

.f-title {
  font-weight: 600;
}

.f-text {
  margin-top: 4px;
  color: var(--ink);
  max-width: 72ch;
}

.f-fix {
  margin-top: 6px;
  color: var(--muted);
  max-width: 72ch;
  padding-left: 12px;
  border-left: 2px solid var(--rule-strong);
}

/* ── footer ──────────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding: 28px 0 40px;
}

.foot-in {
  display: grid;
  gap: 6px;
  font-size: 0.875rem;
}

.noscript {
  padding: 24px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .landed .stamp,
  .pp-field dd.pending {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
