@font-face { font-family: "Alfa Slab One"; src: url(/fonts/AlfaSlabOne-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Special Elite"; src: url(/fonts/SpecialElite-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(/fonts/CourierPrime-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(/fonts/CourierPrime-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --paper: #f2e9d2;
  --paper-2: #ebe0c4;
  --ink: #1b2440;
  --ink-2: #4a5068;
  --red: #c8312a;
  --red-ink: rgba(200, 49, 42, .9);
  --rule: rgba(27, 36, 64, .25);
  --slab: "Alfa Slab One", Georgia, serif;
  --type: "Special Elite", "Courier New", monospace;
  --mono: "Courier Prime", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--mono);
  background-image:
    radial-gradient(rgba(27,36,64,.035) 1px, transparent 1px),
    radial-gradient(rgba(200,49,42,.02) 1px, transparent 1px);
  background-size: 7px 7px, 13px 13px;
}
a { color: var(--ink); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Masthead */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1080px; margin: 0 auto; padding: 14px 16px;
  border-bottom: 3px double var(--ink);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--type); text-decoration: none; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.counter { font-family: var(--type); font-size: 14px; text-align: right; color: var(--ink-2); }
.counter b { font-family: var(--slab); font-weight: 400; color: var(--ink); font-size: 18px; letter-spacing: .02em; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: center; padding: 28px 0 8px; }
.kicker { font-family: var(--type); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
h1 { font-family: var(--slab); font-weight: 400; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -.01em; }
h1 em { font-style: normal; color: var(--red); }
.lede { font-size: 19px; max-width: 34em; margin: 0 0 8px; }
.hero-art { position: relative; }
.hero-art img { display: block; width: 100%; filter: drop-shadow(0 1px 0 rgba(0,0,0,.02)); }

/* Form */
.form-sheet {
  position: relative;
  border: 2px solid var(--ink);
  background: #f6efdc;
  padding: 22px 22px 18px;
  margin: 18px 0 34px;
  box-shadow: 6px 6px 0 var(--ink);
}
.form-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 14px; font-family: var(--type); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
label.field { display: block; font-family: var(--type); font-size: 15px; margin-bottom: 6px; }
textarea {
  width: 100%; min-height: 220px; resize: vertical;
  font: 16px/1.5 var(--mono); color: var(--ink);
  background: repeating-linear-gradient(#f9f3e3, #f9f3e3 29px, rgba(27,36,64,.12) 30px);
  border: 1px solid var(--ink); padding: 8px 12px; line-height: 30px;
}
textarea:focus, button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.samples { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.samples button { margin-right: 4px; }
.wc { font-size: 13px; color: var(--ink-2); font-family: var(--type); }

.btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  font: 400 20px/1 var(--slab); letter-spacing: .02em;
  color: var(--paper); background: var(--red);
  border: 2px solid var(--ink); padding: 14px 22px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn.small { font-size: 15px; padding: 9px 13px; box-shadow: 3px 3px 0 var(--ink); background: var(--ink); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.error { color: var(--red); font-family: var(--type); min-height: 1.4em; margin: 8px 0 0; }

.stamp-in { animation: thud .55s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes thud {
  0% { transform: scale(2.6) rotate(-30deg); opacity: 0; }
  60% { transform: scale(.94) rotate(-10deg); opacity: 1; }
  100% { transform: scale(1) rotate(-12deg); opacity: .92; }
}
.notes { color: var(--ink-2); margin: 0 0 10px; }
.findings { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.findings li { border: 1px solid var(--rule); padding: 3px 8px; font-size: 14px; background: var(--paper); }
.findings b { color: var(--red); }
.fineprint { font-size: 13px; color: var(--ink-2); }
.arf { font-family: var(--type); color: var(--red); }
@keyframes spin-in { from { transform: rotate(-200deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.shake { animation: shake .3s linear .45s; }
@keyframes shake { 25% { transform: translate(2px, 1px); } 50% { transform: translate(-2px, -1px); } 75% { transform: translate(1px, -1px); } }

.share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 6px 12px; }
.embed { margin: 6px 6px 34px; }
.embed summary { cursor: pointer; font-family: var(--type); }
.embed textarea { min-height: 84px; line-height: 1.4; background: #f9f3e3; font-size: 13px; margin-top: 8px; }
.embed img { margin-top: 10px; }

/* Registry */
.section { border-top: 3px double var(--ink); padding: 26px 0 8px; }
h2 { font: 400 clamp(28px, 4vw, 40px)/1.1 var(--slab); margin: 0 0 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { border: 2px solid var(--ink); padding: 12px 14px; background: #f6efdc; }
.stat b { display: block; font: 400 34px/1.1 var(--slab); }
.stat span { font-family: var(--type); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: 12.5em 1fr 4.5em; gap: 10px; align-items: center; font-size: 14px; margin: 5px 0; }
.bars .bar { height: 14px; border: 1px solid var(--ink); background: var(--paper-2); }
.bars .bar i { display: block; height: 100%; background: var(--red); width: 0; transition: width .8s; }
.bars .n { text-align: right; font-family: var(--type); }

.method { columns: 2; column-gap: 36px; }
.method p { margin-top: 0; break-inside: avoid; }
.tells { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.tells li { border: 1px dashed var(--ink); padding: 2px 8px; font-size: 14px; }

.foot { max-width: 1080px; margin: 30px auto 0; padding: 18px 16px 40px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.selfcheck b { color: var(--red); }

.cta { text-align: center; margin: 0 0 14px; }
.report { text-align: center; font-size: 14px; }
.prose { max-width: 42em; padding: 26px 0; }
.prose h1 { font-size: clamp(36px, 5vw, 56px); }
.prose h2 { margin-top: 28px; font-size: 28px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 18px; }
  .hero-art { order: -1; max-width: 300px; margin: 0 auto; }
  .stats { grid-template-columns: 1fr; }
  .bars li { grid-template-columns: 9em 1fr 3.5em; font-size: 13px; }
  .method { columns: 1; }
  .masthead { flex-wrap: wrap; }
  .counter { text-align: left; }
  .form-sheet { padding: 16px 14px; box-shadow: 4px 4px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Tabs and image form */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs [role="tab"] {
  font: 400 14px/1 var(--type); text-transform: uppercase; letter-spacing: .06em;
  background: transparent; color: var(--ink-2); border: 1px solid var(--rule); padding: 9px 12px; cursor: pointer;
}
.tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.form-head { align-items: center; }
.drop {
  position: relative; display: grid; place-items: center; min-height: 220px; cursor: pointer;
  border: 2px dashed var(--ink); background: #f9f3e3; padding: 18px; text-align: center;
}
.drop.over { background: #f3e2c4; border-color: var(--red); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { max-height: 340px; width: auto; border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); background: #fff; }
.drop.has-image { grid-template-rows: auto auto; gap: 10px; }
.drop-hint { font-size: 15px; color: var(--ink-2); }
.drop-hint b { color: var(--ink); font-family: var(--type); font-weight: 400; font-size: 18px; }
.auto { font-family: var(--type); color: var(--red); margin: 12px 0 0; }
.checklist { border: 1px solid var(--rule); margin: 14px 0 0; padding: 10px 14px 12px; }
.checklist legend { font-family: var(--type); font-size: 15px; padding: 0 6px; }
#checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 14px; }
#checklist .check { font-size: 15px; }

/* ---- The certificate: an engraved document that scales like an image */
.cert { container-type: inline-size; margin: 22px 0 6px; outline: none; }
.cert-in {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #f6eedb url(/assets/cert-frame.webp?v=20261024121026) center / 100% 100% no-repeat;
  padding: 8.6cqw 10cqw 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 22px 46px -20px rgba(27,36,64,.55);
}
.cert-ribbon {
  width: 50cqw; aspect-ratio: 4.5 / 1; margin-top: -1cqw; flex: none;
  background: url(/assets/ribbon.webp?v=20261024121026) center / contain no-repeat;
  display: grid; place-items: center;
}
.cert-ribbon span { font: 400 3.1cqw/1 var(--slab); color: var(--ink); letter-spacing: .02em; transform: translateY(-1.1cqw); }
.cert-lead { font: 400 1.75cqw/1.35 var(--type); color: var(--ink-2); max-width: 60cqw; margin: .6cqw 0 0; }
.cert-lead b { color: var(--ink); font-weight: 400; }
.cert-grade { position: relative; margin: 1cqw 0 0; line-height: .9; }
.cert-num { font: 400 13cqw/.9 var(--slab); color: var(--ink); letter-spacing: -.02em; }
.cert-of { font: 400 4.6cqw/1 var(--slab); color: var(--ink-2); }
.cert-stamp { position: absolute; width: 16cqw; height: auto; right: -18cqw; top: -2.5cqw; mix-blend-mode: multiply; transform: rotate(-12deg); opacity: .9; }
.cert-level { font: 400 3.7cqw/1.1 var(--type); color: var(--red); text-transform: uppercase; letter-spacing: .04em; margin: 1.2cqw 0 0; }
.cert-verdict { font: italic 400 2.05cqw/1.4 var(--mono); max-width: 60cqw; margin: 1.2cqw 0 0; }
.cert-verdict .arf { font-style: normal; }
.cert-foot { position: absolute; left: 11cqw; right: 11cqw; bottom: 9.6cqw; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; }
.cert-sig { display: flex; flex-direction: column; align-items: center; justify-self: start; }
.cert-sig img { width: 21cqw; mix-blend-mode: multiply; margin-bottom: .3cqw; }
.cert-sig span, .cert-date span { font: 400 1.45cqw/1 var(--type); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); border-top: 1px solid var(--ink); padding-top: .8cqw; min-width: 17cqw; }
.cert-date { display: flex; flex-direction: column; align-items: center; }
.cert-date b { font: 400 1.9cqw/1.2 var(--mono); margin-bottom: .6cqw; }
.cert-wax { justify-self: end; width: 10cqw; height: auto; mix-blend-mode: multiply; transform: rotate(8deg); margin-bottom: -.6cqw; }

@container (max-width: 560px) {
  .cert-in { aspect-ratio: 2 / 3; background-image: url(/assets/cert-frame-portrait.webp?v=20261024121026); padding: 13cqw 13cqw 0; }
  .cert-ribbon { width: 76cqw; margin-top: -1cqw; }
  .cert-ribbon span { font-size: 4.6cqw; transform: translateY(-1.6cqw); }
  .cert-lead { font-size: 3.5cqw; max-width: none; margin-top: 1cqw; }
  .cert-grade { margin-top: 4cqw; }
  .cert-num { font-size: 25cqw; }
  .cert-of { font-size: 8cqw; }
  .cert-stamp { width: 21cqw; right: -9cqw; top: -15cqw; }
  .cert-level { font-size: 6cqw; margin-top: 3cqw; }
  .cert-verdict { font-size: 3.8cqw; max-width: none; margin-top: 3cqw; }
  .cert-foot { left: 14cqw; right: 14cqw; bottom: 14cqw; grid-template-columns: 1fr auto 1fr; column-gap: 1cqw; }
  .cert-sig img { width: 25cqw; }
  .cert-sig span, .cert-date span { font-size: 2.4cqw; min-width: 22cqw; }
  .cert-date b { font-size: 3cqw; }
  .cert-date { grid-column: 3; grid-row: 1; }
  .cert-wax { grid-column: 2; grid-row: 1; width: 15cqw; justify-self: center; margin-bottom: -4cqw; }
}

.report-sheet { margin: 6px 0 18px; padding: 14px 16px; border: 1px solid var(--rule); background: #f6efdc; }
.report-sheet .fineprint { border: 0; padding: 0; margin: 10px 0 0; }
