/* Direction B: The Certificate. Values come from tokens.css and the design-source mockups. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--vellum-100);
  color: var(--ink-900);
  font: var(--fs-body-l)/1.5 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--blood-700); }
a:hover { color: #5e1219; }

.band { height: 18px; border-bottom: 3px solid var(--gold-500); background-size: 48px 48px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

.label {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--ink-600);
}
.label-bold { font-weight: 700; letter-spacing: .18em; }

.desk-only { display: none !important; }
.mob-only { }
.visually-hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Screens ---------- */
.screen { opacity: 1; transition: opacity .2s ease; }
.screen.is-leaving { opacity: 0; }
.screen.is-entering { opacity: 0; }

body:not([data-screen="home"]) .band { display: none; }

.crest { display: block; width: 62px; height: auto; }
.crest-sm { width: 34px; }

/* ---------- Buttons ---------- */
.btn {
  height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius-pill);
  font: 600 var(--fs-button) var(--font-body);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--night-900); color: var(--vellum-100); box-shadow: var(--btn-inset); }
.btn-outline { height: 50px; background: transparent; color: var(--night-900); border: 2px solid var(--night-900); font-size: 15px; }
.btn-burgundy {
  height: 64px; background: var(--blood-700); color: var(--vellum-100);
  font-weight: 700; font-size: 19px;
  box-shadow: inset 0 0 0 2px var(--blood-700), inset 0 0 0 4px var(--gold-300);
}
.btn-burgundy:hover { color: var(--vellum-100); }
.btn-block { width: 100%; }
.link-btn {
  min-height: var(--hit-min);
  background: none; border: 0; padding: 0 8px; cursor: pointer;
  font: 600 15px var(--font-body);
  color: var(--blood-700);
  text-decoration: underline; text-underline-offset: 3px;
}
.link-green { color: var(--night-900); }
.icon-btn {
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--night-900);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ---------- Arch frames ---------- */
.arch { position: relative; display: block; background: var(--gold-500); box-shadow: var(--shadow-1); }

/* ---------- Home ---------- */
.home-head { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 22px; text-align: center; }
.dept { color: var(--night-900); line-height: 1.5; letter-spacing: .2em; }
.diamond-rule { display: flex; align-items: center; gap: 10px; width: 100%; }
.diamond-rule span { flex: 1; height: 1px; background: var(--gold-500); }
.diamond-rule svg { fill: var(--gold-500); }

.home-main {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 14px 0 0; text-align: center;
}
.home-intro { display: flex; flex-direction: column; gap: 14px; }
.display-xl {
  margin: 0;
  font: 400 var(--fs-display-xl)/1 var(--font-display);
  color: var(--night-900);
}
.lede { margin: 0; color: var(--ink-900); text-wrap: pretty; }

.home-upload { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 4px; }
.arch-upload {
  width: 250px; height: 286px; padding: 6px;
  border-radius: 125px 125px var(--radius-1) var(--radius-1);
  cursor: pointer;
  transition: transform .15s ease;
}
.arch-upload:focus-within { outline: var(--focus); outline-offset: 3px; }
.arch-upload.is-over { transform: scale(1.02); }
.arch-inner {
  width: 100%; height: 100%;
  border-radius: 119px 119px 2px 2px;
  background: var(--paper-50);
  border: 2px dashed var(--night-900);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 20px;
  color: var(--night-900);
}
.arch-upload.is-over .arch-inner { background: #f3ead2; }
.cam { width: 40px; height: 40px; }
.upload-title { font: 25px/1.1 var(--font-display); }
.upload-hint { font-size: var(--fs-body-s); color: var(--ink-600); }

.section-head { margin: 0; font: italic 400 var(--fs-display-m) var(--font-display); color: var(--night-900); }
.home-scale { width: 100%; margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.scale-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.scale-grid li { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.scale-grid canvas { width: 64px; height: 77px; }
.tier-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.tier-range { font-family: var(--font-label); font-size: 12px; color: var(--ink-600); }

.satire {
  padding: 24px 0 36px;
  font: italic 15px/1.5 var(--font-display);
  color: var(--ink-600);
  text-align: center;
}

/* ---------- Inner-screen header ---------- */
.screen-head { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gold-500); }
.head-text { display: flex; flex-direction: column; gap: 2px; }
.head-text .label { font-size: 11px; }
.head-title { font: 20px var(--font-display); color: var(--night-900); }

/* ---------- Analysing ---------- */
.analysing-main { padding: 22px 0 28px; display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 430px; margin: 0 auto; }
.arch-photo { width: 236px; height: 272px; padding: 6px; border-radius: 118px 118px var(--radius-1) var(--radius-1); }
.arch-photo-inner {
  position: relative; width: 100%; height: 100%;
  border-radius: 112px 112px 2px 2px; overflow: hidden;
  border: 3px solid var(--vellum-100);
  background: linear-gradient(160deg, #8a7558, #4b3d2c 70%);
}
.arch-photo-inner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.scanlines { position: absolute; inset: 0; background-image: linear-gradient(rgba(239,230,210,.08) 1px, transparent 1px); background-size: 100% 6px; }
.sweep {
  position: absolute; left: 0; right: 0; top: 40%; height: 4px;
  background: var(--gold-300); box-shadow: 0 0 14px 4px rgba(236,200,116,.65);
  animation: sweep 1.8s var(--ease-sweep) infinite alternate;
}
@keyframes sweep { from { top: -6%; } to { top: 100%; } }

.dial { position: relative; width: 220px; height: 118px; }
.dial svg { display: block; }
#needle { transform-origin: 110px 104px; transform: rotate(-70deg); transition: transform .75s cubic-bezier(.45,0,.4,1); }
.dial-l, .dial-r { position: absolute; bottom: -18px; font-family: var(--font-label); font-size: 10px; letter-spacing: .1em; color: var(--ink-600); }
.dial-l { left: 0; } .dial-r { right: 0; }

.status { margin-top: 10px; height: 30px; overflow: hidden; width: 100%; text-align: center; }
#status-line { display: inline-block; font: italic 23px/30px var(--font-display); color: var(--night-900); transition: opacity .2s ease, transform .2s ease; }
#status-line.out { opacity: 0; transform: translateY(-8px); }
#status-line.in { opacity: 0; transform: translateY(8px); transition: none; }

.checklist {
  width: 100%; margin: 0; padding: 14px 16px; list-style: none;
  background: var(--paper-50); border: 1px solid var(--line-200);
  display: flex; flex-direction: column; gap: 7px;
  font-family: var(--font-label); font-size: 14px;
}
.checklist li { display: flex; justify-content: space-between; color: #6d6450; }
.checklist li .st::before { content: "PENDING"; }
.checklist li.doing { font-weight: 700; color: var(--ink-900); }
.checklist li.doing .st { color: var(--blood-700); }
.checklist li.doing .st::before { content: "IN HAND"; }
.checklist li.doing .st::after { content: "_"; animation: blink 1s steps(1) infinite; }
.checklist li.done { color: var(--ink-900); }
.checklist li.done .st { color: var(--verdigris-600); font-weight: 700; }
.checklist li.done .st::before { content: "✓ DONE"; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Result ---------- */
.result-main { padding: 18px 0 8px; display: flex; flex-direction: column; gap: 16px; }
.card-stage {
  position: relative; margin: 0 auto;
  width: 100%; max-width: 420px; aspect-ratio: 1080 / 1920;
  box-shadow: var(--shadow-2);
  background: var(--vellum-100);
}
.card-stage > img { display: block; width: 100%; height: 100%; }
.seal { position: absolute; display: block; pointer-events: none; opacity: 0; }
.result-side { display: flex; flex-direction: column; gap: 16px; }
.verdict {
  margin: 0;
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  font: 400 60px/1 var(--font-display);
}
.summary { margin: 0; font-size: 18px; line-height: 1.5; color: var(--ink-900); }
.paper-box { padding: 12px 16px; background: var(--paper-50); border: 1px solid var(--line-200); display: flex; flex-direction: column; gap: 4px; }
.mitigation { font: italic 19px/1.3 var(--font-display); color: var(--night-900); }
.result-actions { display: flex; flex-direction: column; gap: 10px; }
.secondary-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.secondary-row .link-btn { height: 50px; }
.result-scale { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.result-scale .section-head { font-size: 22px; }
.scale-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.scale-list li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 6px 10px; border-radius: var(--radius-1); font-weight: 500; }
.scale-list li.is-current { background: #ecdcc0; font-weight: 700; }
.scale-list canvas { width: 34px; height: 41px; }

/* Reveal choreography */
.reveal .card-stage { animation: card-up .24s ease-out both; }
.reveal .seal-rosette-on { animation: rosette-in .32s var(--ease-rosette) .2s both; }
.reveal .seal-stamp-on { animation: stamp-in .16s var(--ease-stamp) .52s both; }
.reveal .card-stage.thud { animation: thud .09s linear; }
.reveal .result-actions, .reveal .paper-box { animation: fade-in .3s ease .9s both; }
@keyframes card-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rosette-in {
  0% { opacity: 0; transform: scale(.7) rotate(-14deg); }
  60% { opacity: 1; transform: scale(1.04) rotate(2deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes stamp-in {
  0% { opacity: 0; transform: scale(2.4) rotate(6deg); }
  80% { opacity: 1; transform: scale(.94); }
  100% { opacity: 1; transform: none; }
}
@keyframes thud { 50% { transform: translateY(4px); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.seal-shown { opacity: 1; }

/* ---------- Errors ---------- */
.error-main { padding: 30px 0 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; max-width: 430px; margin: 0 auto; min-height: calc(100vh - 80px); }
.error-art { position: relative; width: 250px; height: 254px; display: flex; align-items: center; justify-content: center; }
.error-title { margin: 12px 0 0; font: 400 30px/1.12 var(--font-display); color: var(--night-900); }
.error-aside { margin: 0; font: italic 28px var(--font-display); color: var(--blood-700); }
.error-body { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-900); text-wrap: pretty; }
.error-ref { margin: 0; font: 12px/1.4 var(--font-label); letter-spacing: .06em; color: var(--ink-600); word-break: break-word; }
.error-actions { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; }

.stamp {
  position: absolute; white-space: nowrap;
  padding: 6px 14px;
  background: rgba(239,230,210,.92);
  font: 700 26px/1.2 var(--font-label); letter-spacing: .06em;
}
.stamp-review { border: 4px dashed var(--ochre-700); color: var(--ochre-700); }
.stamp-alarm { border: 5px solid var(--blood-700); color: var(--blood-700); font-size: 28px; }

.err-photo { width: 220px; height: 254px; padding: 6px; border-radius: 110px 110px var(--radius-1) var(--radius-1); }
.err-photo .arch-photo-inner { border-radius: 104px 104px 2px 2px; background: linear-gradient(160deg, #b9b2a2, #7d7668); }
.err-photo img { filter: grayscale(.4); }
.in-tray { position: absolute; width: 190px; height: 150px; border: 1px solid #b3a47e; }
.in-tray.t1 { left: 30px; top: 40px; background: var(--line-100); transform: rotate(-6deg); }
.in-tray.t2 { left: 24px; top: 30px; background: #ece2c8; transform: rotate(4deg); }
.in-tray.t3 { left: 30px; top: 20px; background: var(--paper-50); padding: 16px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.in-tray .bar { height: 6px; background: #d8cba8; }
.mislaid-file { width: 200px; height: 160px; border: 2px dashed #8a7b58; display: flex; align-items: center; justify-content: center; transform: rotate(-3deg); font-family: var(--font-label); font-size: 14px; letter-spacing: .12em; color: #6d6450; }

/* ---------- Share sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(18,14,22,.66); z-index: 10; animation: fade-in .2s ease both; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11;
  max-width: 560px; margin: 0 auto;
  background: var(--vellum-100);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  border-top: 4px solid var(--gold-500);
  padding: 10px 20px 26px;
  display: flex; flex-direction: column; gap: 14px;
  animation: sheet-up .26s cubic-bezier(.2,.8,.3,1) both;
  max-height: 100vh; overflow-y: auto;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.grabber { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line-200); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font: 400 28px var(--font-display); color: var(--night-900); }
.link-field { display: flex; flex-direction: column; gap: 6px; }
.link-row { display: flex; gap: 8px; }
.link-row input {
  flex: 1; min-width: 0; height: 50px; padding: 0 14px;
  border: 1.5px solid var(--night-900); border-radius: var(--radius-1);
  background: var(--paper-50);
  font: 16px var(--font-label); color: var(--ink-900);
}
.btn-square {
  height: 50px; padding: 0 20px; border: 0; border-radius: var(--radius-1);
  background: var(--night-900); color: var(--vellum-100);
  font: 600 15px var(--font-body); cursor: pointer;
}
.btn-square:disabled { opacity: .6; cursor: wait; }
.net-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.net-btn {
  height: 52px; border-radius: 26px;
  background: var(--paper-50); color: var(--night-900);
  border: 1.5px solid var(--line-200);
  font: 600 15px var(--font-body);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
}
.net-btn svg { width: 22px; height: 22px; fill: currentColor; }
.net-btn:disabled { opacity: .6; cursor: wait; }
.notice { margin: 0; padding: 10px 12px; border: 1px dashed var(--blood-700); font-size: 13px; line-height: 1.45; color: var(--ink-900); }
.notice strong { font-family: var(--font-label); letter-spacing: .12em; color: var(--blood-700); }

/* ---------- Share page (/c/:id) ---------- */
.share-head { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.share-head .dept { font-size: 11px; letter-spacing: .16em; line-height: 1.45; }
.share-main { padding: 4px 0 8px; display: flex; flex-direction: column; gap: 16px; max-width: 480px; margin: 0 auto; }
.share-main .label { text-align: center; letter-spacing: .14em; }
.share-card { display: block; width: 100%; height: auto; box-shadow: var(--shadow-2); }
.share-h1 { margin: 6px 0 0; font: 400 38px/1.02 var(--font-display); color: var(--night-900); text-align: center; }
.share-context { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-900); text-align: center; text-wrap: pretty; }

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  :root {
    --fs-display-xl: clamp(52px, 7vw, 96px);
    --fs-body-l: 19px;
    --fs-body-s: 15px;
    --fs-label: 13px;
    --gutter: 32px;
  }
  .desk-only { display: revert !important; }
  .mob-only { display: none !important; }
  body .band { display: block !important; height: 22px; }

  .home-head { flex-direction: row; gap: 14px; padding: 22px 0; border-bottom: 1px solid var(--gold-500); text-align: left; }
  .home-head .crest { width: 44px; }
  .dept { font-size: 13px; }
  .home-main {
    display: grid; grid-template-columns: minmax(0, 1fr) 420px;
    grid-template-areas: "intro upload";
    column-gap: 56px; row-gap: 34px; align-items: center;
    padding: 48px 0; text-align: left;
  }
  .home-intro { grid-area: intro; gap: 22px; align-self: end; }
  .display-xl { line-height: .96; }
  .lede { max-width: 560px; line-height: 1.55; }
  .home-upload { grid-area: upload; margin: 0; }
  .arch-upload { width: 100%; max-width: 420px; height: 500px; padding: 8px; border-radius: 210px 210px 4px 4px; box-shadow: 0 10px 28px rgba(29,24,36,.25); }
  .arch-inner { border-radius: 202px 202px 2px 2px; gap: 14px; padding: 40px; text-align: center; }
  .cam { width: 52px; height: 52px; }
  .upload-title { font-size: 34px; line-height: 1.08; }
  .home-upload .btn { max-width: 420px; height: 58px; font-size: 18px; }
  .home-scale { margin: 0; gap: 12px; }
  .home-scale .section-head { font-size: 22px; }
  .scale-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 14px; }
  .scale-grid canvas { width: 58px; height: 70px; }
  .satire { border-top: 1px solid var(--gold-500); padding: 18px 0 28px; }

  .screen-head { padding: 22px 0; gap: 14px; }
  .screen-head .crest-sm { width: 44px; }
  .screen-head .head-text { flex-direction: row-reverse; justify-content: space-between; flex: 1; align-items: center; }
  .screen-head .head-text .label { font-size: 13px; }
  .screen-head .head-text .dept { letter-spacing: .2em; color: var(--night-900); }

  .result-main { flex-direction: row; align-items: flex-start; gap: 56px; padding: 40px 0; }
  .card-stage { flex: 0 0 auto; width: 460px; max-width: 460px; margin: 0; box-shadow: 0 14px 34px rgba(29,24,36,.3); }
  .result-side { flex: 1 1 380px; min-width: 0; gap: 22px; }
  .verdict { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .mitigation { font-size: 21px; }
  .paper-box { padding: 14px 18px; }
  .result-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .secondary-row { display: flex; align-items: center; gap: 12px; }
  .secondary-row .btn-outline { height: 56px; padding: 0 24px; font-size: 16px; }
  .secondary-row .link-btn { height: auto; font-size: 16px; }

  .share-main { max-width: 600px; padding-top: 24px; }
  .share-h1 { font-size: 56px; }
}

/* Analysing + error screens are phone-width columns even on desktop */
@media (min-width: 960px) {
  #screen-analysing .screen-head .head-text, #screen-error .screen-head .head-text { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .sweep { animation: none; display: none; }
  #needle { transition: none; }
  .reveal .card-stage, .reveal .seal-rosette-on, .reveal .seal-stamp-on, .reveal .result-actions, .reveal .paper-box { animation: fade-in .15s ease both; }
  .reveal .card-stage.thud { animation: none; }
  .sheet, .sheet-backdrop { animation: fade-in .15s ease both; }
}
.nowrap { white-space: nowrap; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- Gift shop ---------- */
.shop { margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--gold-500); display: flex; flex-direction: column; gap: 8px; }
.shop-lede { margin: 0 0 6px; font-size: 15px; line-height: 1.5; color: var(--ink-900); }
.shop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shop-item {
  width: 100%; padding: 0 0 12px; cursor: pointer; text-align: left;
  background: var(--paper-50); border: 1px solid var(--line-200); border-radius: var(--radius-1);
  display: flex; flex-direction: column; gap: 2px; overflow: hidden;
  font: inherit; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.shop-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.shop-item canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 8px; }
.shop-name { padding: 0 12px; font: 19px/1.15 var(--font-display); color: var(--night-900); }
.shop-price { padding: 0 12px; font: 700 14px var(--font-label); color: var(--ink-600); }
.shop-note { margin: 0; font-size: 13px; color: var(--ink-600); }
.shop-note:empty { display: none; }

.shop-sheet { max-width: 880px; }
.shop-sheet-body { display: flex; flex-direction: column; gap: 14px; }
.shop-mockup canvas { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; border-radius: var(--radius-1); }
.shop-detail { display: flex; flex-direction: column; gap: 12px; }
.shop-blurb { margin: 0; font: italic 19px/1.35 var(--font-display); color: var(--night-900); }
.opt { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.opt legend { padding: 0; margin-bottom: 6px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  position: relative; display: inline-flex; align-items: center; min-height: var(--hit-min); padding: 0 16px;
  border: 1.5px solid var(--line-200); border-radius: var(--radius-pill); background: var(--paper-50);
  font-weight: 600; font-size: 15px; color: var(--night-900); cursor: pointer;
}
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked) { border-color: var(--night-900); background: var(--night-900); color: var(--vellum-100); }
.pill:has(input:focus-visible) { outline: var(--focus); outline-offset: 2px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--night-900); border-radius: var(--radius-pill); overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 22px; color: var(--night-900); cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 32px; text-align: center; font: 700 17px var(--font-label); }
.price-line { margin: 0; font-size: 15px; color: var(--ink-600); }
.price-line strong { font: 400 30px var(--font-display); color: var(--night-900); margin-right: 6px; }
.shop-error { margin: 0; padding: 10px 12px; background: #f6e3e0; color: var(--blood-700); font-size: 14px; border-radius: var(--radius-1); }

@media (min-width: 720px) {
  .shop-sheet-body { flex-direction: row; align-items: flex-start; gap: 24px; }
  .shop-mockup { flex: 0 0 360px; }
  .shop-mockup canvas { max-width: 360px; }
  .shop-detail { flex: 1; }
}

/* ---------- Order page ---------- */
.order-title { margin: 0; font: 400 34px/1.1 var(--font-display); color: var(--night-900); text-align: center; }
.order-card { background: var(--paper-50); border: 1px solid var(--line-200); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.order-card img { width: 100%; height: auto; border-radius: var(--radius-1); }
.order-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: baseline; }
.order-card dd { margin: 0; font-size: 15px; }
.order-card .muted { color: var(--ink-600); }
.tracking { margin: 0; padding-left: 18px; }
.shop-sheet { max-height: 92vh; }
@media (max-width: 719px) { .shop-mockup canvas { max-width: 240px; } }

/* ---------- Legal pages + footer links ---------- */
.legal-links nav { margin-bottom: 6px; font: 600 14px var(--font-body); font-style: normal; }
.legal-links p { margin: 0; }
.legal { max-width: 720px; margin: 0 auto; padding: 8px 0 24px; }
.legal h1 { margin: 6px 0 4px; font: 400 42px/1.05 var(--font-display); color: var(--night-900); }
.legal h2 { margin: 28px 0 8px; font: 400 26px/1.15 var(--font-display); color: var(--night-900); }
.legal h3 { margin: 20px 0 6px; font: 600 17px var(--font-body); color: var(--night-900); }
.legal p, .legal li { font-size: 16px; line-height: 1.6; color: var(--ink-900); }
.legal mark { background: #f6e3e0; color: var(--blood-700); padding: 0 4px; font-family: var(--font-label); font-size: 14px; }
.notice a { color: var(--blood-700); }

/* ---------- Name the subject ---------- */
.intake-main { padding: 22px 0 28px; display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 430px; margin: 0 auto; }
.arch-intake { width: 200px; height: 230px; }
.arch-intake .arch-photo-inner { border-radius: 94px 94px 2px 2px; }
.intake-form { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.intake-form input {
  height: 58px; padding: 0 16px; width: 100%;
  border: 1.5px solid var(--night-900); border-radius: var(--radius-1);
  background: var(--paper-50);
  font: 26px var(--font-display); color: var(--night-900);
}
.intake-form input::placeholder { color: #9a8f78; font-style: italic; }
.intake-form input:focus-visible { outline: var(--focus); outline-offset: 2px; }
.intake-hint { margin: 0 0 6px; font-size: 14px; line-height: 1.45; color: var(--ink-600); }
.intake-form .link-btn { align-self: center; }
@media (min-width: 960px) {
  #screen-intake .screen-head .head-text { flex-direction: column; align-items: flex-start; }
}

/* ---------- Findings (readable on phones; the card stays uncluttered) ---------- */
.findings h2 { margin: 0 0 4px; }
.findings-list { margin: 0; padding: 0; list-style: none; counter-reset: f; display: flex; flex-direction: column; gap: 10px; }
.findings-list li { counter-increment: f; display: grid; grid-template-columns: 34px 1fr; font-size: 17px; line-height: 1.4; color: var(--ink-900); }
.findings-list li::before { content: counter(f, upper-roman) "."; font: 19px var(--font-display); color: var(--blood-700); }
@media (min-width: 960px) { .findings-list li { font-size: 18px; } }
.share-mitigation { margin: 6px 0 0; font: italic 18px/1.35 var(--font-display); color: var(--night-900); }
.share-mitigation .label { font-style: normal; margin-right: 6px; }
.share-card { max-width: 420px; margin: 0 auto; }

/* ---------- Far-Right Dog Map invitation ---------- */
.map-cta { margin-top: 12px; padding: 16px; background: var(--paper-50); border: 1.5px solid var(--night-900); border-radius: var(--radius-1); display: flex; flex-direction: column; gap: 8px; }
.map-lede { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-900); }
.map-form { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.map-row { display: flex; gap: 8px; }
.map-row input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px;
  border: 1.5px solid var(--night-900); border-radius: var(--radius-1); background: #fff;
  font: 600 18px var(--font-body); color: var(--night-900);
}
.map-row input::placeholder { color: #9a8f78; font-weight: 400; }
.map-row input:focus-visible { outline: var(--focus); outline-offset: 2px; }
.map-row .btn { flex: none; white-space: nowrap; }
.map-msg { margin: 0; font-size: 14px; color: var(--blood-700); }
.map-msg:empty { display: none; }
.map-msg.ok { color: var(--night-900); }
.map-done { display: flex; flex-direction: column; gap: 10px; }
.map-done p { margin: 0; font: italic 19px/1.35 var(--font-display); color: var(--night-900); }
.map-small { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-600); }
.map-small a { color: var(--night-900); }
.map-teaser { display: block; margin: 4px 0 8px; padding: 12px 14px; border: 1.5px dashed var(--night-900); border-radius: var(--radius-1); background: var(--paper-50); color: var(--ink-900); text-decoration: none; font-size: 15px; line-height: 1.45; }
.map-teaser strong { color: var(--night-900); }
.map-teaser .label { color: var(--blood-700); margin-right: 6px; }
.notify-form { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line-200); border-radius: var(--radius-1); background: var(--paper-50); }
.notify-head { margin: 0 0 4px; font-size: 15px; line-height: 1.45; }

/* ---------- Fund the Bureau + recommendations ---------- */
.tip-box { margin-top: 12px; padding: 14px 16px; border: 1.5px dashed var(--gold-500); border-radius: var(--radius-1); background: var(--paper-50); display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.tip-text { flex: 1 1 220px; }
.tip-title { margin: 0; font: italic 400 22px var(--font-display); color: var(--night-900); }
.tip-title::before { content: "🦴 "; font-style: normal; }
.tip-blurb { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-900); }
.tip-btn { flex: none; text-decoration: none; }
.recs { margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--gold-500); display: flex; flex-direction: column; gap: 10px; }
.recs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .recs-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rec-item { text-decoration: none; height: 100%; }
.rec-pic { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 8px; background: #fff; border-bottom: 1px solid var(--line-100); overflow: hidden; }
.rec-pic img { width: 100%; height: 100%; object-fit: contain; padding: 8%; box-sizing: border-box; }
.rec-pic-empty { background: var(--vellum-100); gap: 6px; align-content: center; }
.rec-pic-empty img { width: 38%; height: auto; padding: 0; opacity: .85; }
.rec-approved { font: 700 10.5px var(--font-label); letter-spacing: .16em; color: var(--blood-700); border: 1.5px solid var(--blood-700); padding: 3px 7px; transform: rotate(-4deg); }
.rec-pic .rec-ad { position: absolute; top: 6px; left: 6px; z-index: 1; background: rgba(248, 242, 227, .92); padding: 2px 6px; border-radius: 3px; }
.rec-joke { padding: 0 12px 4px; font-size: 13px; line-height: 1.4; color: var(--ink-900); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rec-item .shop-price { margin-top: auto; }
.rec, .ins-box { background: var(--paper-50); border: 1px solid var(--line-200); border-radius: var(--radius-1); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rec a.rec-go { margin-top: auto; align-self: flex-start; color: var(--night-900); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--gold-500); }
.rec-ad { font: 10.5px var(--font-label); letter-spacing: .14em; color: var(--ink-600); }
.rec-title { margin: 0; font: 19px/1.2 var(--font-display); color: var(--night-900); }
.rec-blurb { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-900); }
.ins-box { border-color: var(--night-900); }
.ins-box .btn { align-self: flex-start; text-decoration: none; }

/* ---------- Homepage small print ---------- */
.caution { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-600); font-style: italic; text-align: center; max-width: 420px; }
.scale-intro { margin: -6px 0 2px; font-size: 14px; line-height: 1.45; color: var(--ink-600); }
.tier-desc { font-size: 12.5px; line-height: 1.35; color: var(--ink-900); max-width: 22ch; }
.map-teaser .map-new { display: inline-block; background: var(--blood-700); color: var(--vellum-100); padding: 1px 6px; border-radius: 3px; letter-spacing: .12em; }

/* ---------- Thanks after sharing ---------- */
.share-thanks { padding: 14px 16px; border: 1.5px solid var(--night-900); border-radius: var(--radius-1); background: var(--paper-50); display: flex; flex-direction: column; gap: 6px; }
.share-thanks-title { margin: 0; font: italic 400 22px/1.2 var(--font-display); color: var(--night-900); }
.share-thanks p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.45; }
.share-thanks .btn { text-decoration: none; }
.share-thanks .link-btn { align-self: center; font-size: 14px; }

/* ---------- Quick-action dock (phones, results screen) ---------- */
.dock { display: none; }
@media (max-width: 959px) {
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
    display: flex; gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: var(--night-900); box-shadow: 0 -6px 18px rgba(0, 0, 0, .22);
  }
  #screen-result .wrap { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  #map-cta, #tip-box, #recs, #shop { scroll-margin-top: 12px; }
}
.dock-btn {
  flex: 1 1 0; min-width: 0; height: 54px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1.5px solid rgba(239,230,210, .35); border-radius: var(--radius-1); background: none;
  color: var(--vellum-100); text-decoration: none; cursor: pointer;
  font: 700 11px var(--font-label); letter-spacing: .1em; text-transform: uppercase;
}
.dock-btn[hidden] { display: none; }
.dock-btn svg { width: 20px; height: 20px; }
.dock-btn svg[hidden] { display: none; }
.dock-btn:active { transform: translateY(1px); }
.dock-btn:hover, .dock-btn:focus { color: var(--vellum-100); }
.dock-main, .dock-main:hover, .dock-main:focus { flex-grow: 1.35; background: var(--vellum-100); border-color: var(--vellum-100); color: var(--night-900); }
.dock-gold, .dock-gold:hover, .dock-gold:focus { border-color: var(--gold-500); color: var(--gold-300); }
.dock-flash { animation: dock-flash 1.2s ease; }
@keyframes dock-flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px var(--gold-500); } }

/* ---------- Honours sheet ---------- */
.hon-step { display: flex; flex-direction: column; gap: 10px; }
.hon-step[hidden] { display: none; }
.hon-lede { margin: 0; font-size: 15px; line-height: 1.45; }
.hon-tier-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hon-tier-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-200); border-radius: var(--radius-1); background: var(--paper-50); }
.hon-tier-list b { font: 700 18px var(--font-display); color: var(--blood-700); min-width: 34px; }
.hon-tier-list span { font-size: 13px; line-height: 1.25; }
.hon-tier-list strong { display: block; font: 700 13px var(--font-label); letter-spacing: .08em; color: var(--night-900); }
.hon-small { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-600); }
#hon-email { height: 50px; padding: 0 14px; font: 500 16px var(--font-body); color: var(--ink-900); background: #fff; border: 1.5px solid var(--night-900); border-radius: var(--radius-1); }
#hon-email:focus-visible { outline: var(--focus); outline-offset: 2px; }
.hon-style { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0; padding: 0; border: 0; }
.hon-style legend { float: left; margin-right: 6px; padding: 0; }
.hon-style label { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.hon-error { margin: 0; color: var(--blood-700); font-size: 14px; font-weight: 600; }
.hon-plain { align-self: center; font-size: 14px; }
.hon-spinner { align-self: center; width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--line-200); border-top-color: var(--gold-500); animation: hon-spin 1s linear infinite; margin: 6px 0; }
@keyframes hon-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hon-spinner { animation: none; } }
#hon-wait p { margin: 0; font-size: 15px; line-height: 1.45; }
.hon-done-title { margin: 0; font: 400 28px/1.15 var(--font-display); color: var(--night-900); }
.hon-done-img { display: block; width: 100%; max-width: 420px; align-self: center; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.hon-done-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hon-done-fig { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.hon-done-fig[hidden] { display: none; }
.hon-done-fig figcaption { color: var(--ink-600); }
#hon-view { text-decoration: none; }
.hon-painting-line { margin: 0; text-align: center; font-size: 15px; line-height: 1.45; }
#hon-painting { align-items: center; text-align: center; }
.hon-easel { position: relative; width: 150px; height: 180px; margin: 8px 0; border: 10px solid #c49b44; border-radius: 3px; box-shadow: inset 0 0 0 3px #8a6a24, 0 10px 20px rgba(0,0,0,.25); background: linear-gradient(135deg, #3b2a18, #5a4128 60%, #2a1d10); overflow: hidden; }
.hon-easel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 0%, rgba(236,200,116,.35) 45%, transparent 60%); transform: translateX(-100%); animation: hon-sweep 2.2s ease-in-out infinite; }
.hon-brush { position: absolute; width: 10px; height: 60px; right: 18px; bottom: 16px; background: linear-gradient(#7a5a1c 0 70%, #2a1d10 70%); border-radius: 4px; transform-origin: bottom center; animation: hon-paint 1.1s ease-in-out infinite alternate; }
@keyframes hon-sweep { to { transform: translateX(100%); } }
@keyframes hon-paint { from { transform: rotate(-24deg) translate(-40px, -30px); } to { transform: rotate(18deg) translate(-90px, -70px); } }
@media (prefers-reduced-motion: reduce) { .hon-easel::after, .hon-brush { animation: none; } }
.hon-done-actions .btn { text-decoration: none; height: auto; min-height: 50px; padding: 8px 12px; font-size: 15px; line-height: 1.2; }

/* ---------- Honours nomination box (replaces the tip box when honours are on) ---------- */
.hon-box {
  margin-top: 12px; padding: 18px 16px 16px; position: relative;
  background: var(--paper-50); border: 1.5px solid var(--gold-500); border-radius: var(--radius-1);
  box-shadow: inset 0 0 0 4px var(--paper-50), inset 0 0 0 5px var(--gold-300);
  display: flex; flex-direction: column; gap: 12px;
}
.hon-box-label { color: var(--blood-700); }
.hon-box-title { margin: 0; font: italic 400 28px/1.15 var(--font-display); color: var(--night-900); }
.hon-box-lede { margin: 0; font-size: 15px; line-height: 1.5; }
.hon-specimen { margin: 2px 0; text-align: center; }
.hon-specimen img { display: block; width: 78%; max-width: 340px; margin: 0 auto; transform: rotate(-2deg); box-shadow: 0 10px 24px rgba(0,0,0,.22); background: var(--line-200); aspect-ratio: 4 / 5; }
.hon-specimen figcaption { margin-top: 10px; font: 400 12px var(--font-label); letter-spacing: .08em; color: var(--ink-600); }
.hon-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hon-perks li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink-900); }
.hon-perks strong { display: block; font: 700 15.5px var(--font-body); color: var(--night-900); }
.hon-perks a { color: var(--night-900); }
.hon-perk-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; font-size: 19px; border-radius: 50%; background: #fbf3dc; border: 1px solid var(--gold-500); }
.hon-ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-200); border-radius: var(--radius-1); overflow: hidden; }
.hon-ladder li { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; background: #fff; }
.hon-ladder li + li { border-left: 1px solid var(--line-200); }
.hon-ladder li:last-child { background: #fbf3dc; }
.hon-ladder b { font: 400 20px var(--font-display); color: var(--blood-700); }
.hon-ladder span { font: 700 11px var(--font-label); letter-spacing: .06em; text-transform: uppercase; color: var(--night-900); text-align: center; }
.hon-box .btn, .share-thanks .btn { height: auto; min-height: 54px; padding: 10px 16px; line-height: 1.25; }
.hon-box .btn > span, .share-thanks .btn > span { text-align: center; }
.hon-box-small { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-600); text-align: center; }
@media (max-width: 959px) { #hon-box { scroll-margin-top: 12px; } }

/* ---------- The sister site, ismydogfarright.com, in its own green and gold ---------- */
.sister { --t-navy: #1f3a2d; --t-gold: #e8c77a; margin-top: 4px; }
.sister[hidden] { display: none; }
.sister-adlabel { display: flex; justify-content: space-between; margin: 0 0 6px; font: 700 10.5px var(--font-label); letter-spacing: .14em; color: var(--ink-600); }
.sister-panel { background: var(--t-navy); color: #f4ecd8; padding: 16px; border-radius: 4px; box-shadow: inset 0 0 0 3px #b8913a; }
.sister-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sister-mark { display: flex; align-items: center; gap: 8px; }
.sister-mark b { font: 400 19px/1.05 var(--font-display); }
.sister-mark b span, .sister-title em, .memo-sister-t em { color: var(--t-gold); }
.sister-kick { font: 700 11px var(--font-label); letter-spacing: .14em; color: var(--t-gold); text-align: right; }
.sister-title { margin: 12px 0; font: 400 28px/1.08 var(--font-display); color: #f4ecd8; }
.sister-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.sister-v1, .sister-v2 { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 12px; border-radius: 3px; text-align: center; }
.sister-v1 { background: var(--vellum-100); color: var(--ink-900); }
.sister-v2 { background: #f4ecd8; color: #1f3a2d; box-shadow: inset 0 0 0 1px #b8913a; }
.sister-q { font: 700 10px var(--font-label); letter-spacing: .1em; }
.sister-v1 .sister-q { color: var(--ink-600); }
.sister-score { font: 400 40px/1 var(--font-display); }
.sister-v1 .sister-tier { font: 700 11.5px/1.2 var(--font-body); }
.sister-v2 .sister-tier { font: 700 11px var(--font-label); letter-spacing: .06em; color: #7a1f2b; }
.sister-redact { display: block; width: 70px; height: 40px; background: #1f3a2d; border-radius: 2px; }
.sister-filed { position: absolute; top: -7px; right: -6px; background: var(--blood-700); color: var(--vellum-100); font: 700 9.5px var(--font-label); padding: 2px 5px; transform: rotate(6deg); }
.sister-text { margin: 0 0 14px; font-size: 14.5px; line-height: 1.45; color: #e6dcc4; }
.sister-cta { display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 8px 18px; border-radius: 999px; text-align: center; text-decoration: none;
  background: #f4ecd8; color: #1f3a2d; font: 600 16px/1.15 var(--font-body);
  box-shadow: inset 0 0 0 2px #f4ecd8, inset 0 0 0 4px #b8913a; }
.sister-cta:hover { background: #fff8e8; }
.sister-cta:focus-visible { outline: var(--focus); outline-offset: 3px; }
.sister-fine { margin: 8px 0 0; font: 400 11.5px var(--font-label); color: #c9bfa3; text-align: center; }

.memo-sister { --t-navy: #1f3a2d; --t-gold: #e8c77a; margin-top: 8px; background: var(--t-navy); color: #f4ecd8; padding: 12px; border-radius: 4px; box-shadow: inset 0 0 0 2px #b8913a; }
.memo-sister-t { margin: 0 0 10px; font: 400 21px/1.08 var(--font-display); }
.sister-duo-sm { gap: 8px; margin-bottom: 10px; }
.sister-duo-sm .sister-v1, .sister-duo-sm .sister-v2 { padding: 6px 6px 8px; gap: 2px; }
.sister-duo-sm .sister-score { font-size: 28px; }
.sister-duo-sm .sister-redact { width: 54px; height: 28px; }
.memo-sister .sister-cta { min-height: 46px; font-size: 15px; }
@media (min-width: 960px) { .sister { max-width: 460px; } }

/* ---------- Bureau memo: floats up from the bottom of the screen ---------- */
.memo {
  position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 9; max-width: 420px; margin: 0 auto;
  padding: 14px 14px 14px; background: var(--paper-50); border: 1px solid var(--line-200);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35); transform: rotate(-1.5deg);
  animation: memo-in .35s cubic-bezier(.2, .8, .3, 1.2) both;
}
@media (min-width: 960px) { .memo { left: auto; right: 28px; bottom: 28px; width: 380px; } }
.memo[hidden] { display: none; }
.memo.memo-out { animation: memo-out .26s ease-in both; }
@keyframes memo-in { from { opacity: 0; transform: translateY(24px) rotate(-4deg); } to { opacity: 1; transform: rotate(-1.5deg); } }
@keyframes memo-out { to { opacity: 0; transform: translateY(18px) rotate(1deg); } }
.memo-tape { position: absolute; top: -10px; left: 50%; width: 76px; height: 20px; margin-left: -38px; background: rgba(236, 200, 116, .78); transform: rotate(2deg); }
.memo-head { margin: 0 40px 0 0; font: 700 11px/1.35 var(--font-label); letter-spacing: .14em; color: var(--blood-700); }
.memo-text { margin: 6px 40px 10px 0; font-size: 14px; line-height: 1.35; color: var(--ink-900); }
.memo-row { display: flex; gap: 8px; }
.memo-btn {
  flex: 1 1 0; min-width: 0; min-height: 52px; padding: 8px 10px; cursor: pointer; overflow-wrap: anywhere;
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1.5px solid var(--night-900); border-radius: 10px; background: transparent;
  font: 700 12.5px/1.25 var(--font-body); color: var(--night-900);
}
.memo-btn[hidden] { display: none; }
.memo-btn-main { background: var(--night-900); color: var(--vellum-100); }
.memo-btn:active { transform: translateY(1px); }
.memo-text strong { font-weight: 700; }
.memo-btn-block { width: 100%; font-size: 15px; min-height: 48px; }
.memo-more { display: block; margin: 2px auto -6px; padding: 4px 10px; min-height: 32px; border: 0; background: none; cursor: pointer; font: 600 13px var(--font-body); color: var(--night-900); text-decoration: underline; text-underline-offset: 3px; }
.memo-close { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; padding: 2px; border: 0; background: none; cursor: pointer; color: var(--ink-600); }
.memo-close svg { width: 100%; height: 100%; display: block; }
.memo-close path { stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.memo-ring-bg { fill: none; stroke: var(--line-200); stroke-width: 2.5; }
/* The countdown: the gold ring empties over 10 seconds; when it ends, the memo closes. */
.memo-ring {
  fill: none; stroke: var(--gold-500); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 100.53; stroke-dashoffset: 0;
  transform: rotate(-90deg); transform-origin: 18px 18px;
  animation: memo-count 10s linear forwards;
}
.memo-paused .memo-ring { animation-play-state: paused; }
@keyframes memo-count { to { stroke-dashoffset: 100.53; } }
@media (prefers-reduced-motion: reduce) {
  .memo, .memo.memo-out { animation: none; }
}

/* ---------- The Bureau Bulletin ---------- */
/* Homepage ticker: under the masthead on phones, at its right-hand end on desktop. */
.bb-ticker { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 520px; text-decoration: none; color: var(--ink-900); background: var(--paper-50); border: 1px solid var(--blood-700); border-radius: 999px; padding: 6px 12px 6px 6px; font-size: 13.5px; line-height: 1.2; text-align: left; }
.bb-ticker i { flex: none; font: 700 10px var(--font-label); font-style: normal; letter-spacing: .12em; background: var(--blood-700); color: #fff; padding: 4px 8px; border-radius: 999px; }
.bb-ticker span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-ticker b { flex: none; color: var(--blood-700); }
.bb-ticker:hover span { text-decoration: underline; }
.bb-ticker:focus-visible { outline: 3px solid var(--verdigris-600); outline-offset: 2px; }

@media (min-width: 960px) { .home-head .bb-ticker { margin-left: auto; max-width: 560px; } }

/* The bulletin page */
.bb-main { max-width: 680px; margin: 0 auto; padding: 4px 0 8px; }
.bb { text-align: left; background: var(--paper-50); border: 1px solid var(--line-200); border-radius: 4px; padding: 0 0 22px; }
.bb-mast { border-bottom: 3px double var(--ink-900); margin: 0 18px; padding: 16px 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bb-mast b { font: 400 26px var(--font-display); color: var(--ink-900); }
.bb-mast span, .bb-strap { font: 700 10px var(--font-label); letter-spacing: .14em; color: var(--ink-600); }
.bb-mast span { text-align: right; }
.bb-strap { margin: 6px 18px 0; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line-200); padding-bottom: 6px; }
.bb-in { padding: 0 18px; }
.bb-kick { display: inline-block; margin-top: 16px; background: var(--blood-700); color: #fff; font: 700 10.5px var(--font-label); letter-spacing: .16em; padding: 3px 7px; }
.bb h1 { font: 400 32px/1.04 var(--font-display); color: var(--night-900); margin: 10px 0; }
.bb-stand { font: italic 18px/1.35 var(--font-display); margin: 0 0 12px; }
.bb-by { display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 700 10.5px var(--font-label); letter-spacing: .14em; color: var(--ink-600); border-top: 1px solid var(--line-200); border-bottom: 1px solid var(--line-200); padding: 7px 0; margin: 0 0 14px; }
.bb-quick { flex: none; display: inline-flex; align-items: center; gap: 5px; font: 700 12px var(--font-body); color: var(--vellum-100); background: var(--night-900); border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.bb-quick:focus-visible { outline: 3px solid var(--verdigris-600); outline-offset: 2px; }
.bb p { font-size: 15.5px; line-height: 1.55; margin: 0 0 12px; }
.bb .bb-stand { font-size: 18px; line-height: 1.35; }
.bb-drop::first-letter { float: left; font: 400 54px/0.85 var(--font-display); color: var(--blood-700); padding: 4px 6px 0 0; }
.bb .bb-pull { font: italic 21px/1.3 var(--font-display); color: var(--blood-700); border-top: 2px solid var(--blood-700); border-bottom: 2px solid var(--blood-700); padding: 10px 0; margin: 16px 0; text-align: center; }
.bb-files { background: var(--vellum-100); border: 1.5px dashed var(--line-200); border-radius: 6px; padding: 12px 14px 4px; margin: 6px 0 16px; }
.bb-files h2 { font: 700 11px var(--font-label); letter-spacing: .16em; color: var(--ink-600); margin: 0 0 10px; }
.bb-file { border-bottom: 1px solid var(--line-100); padding: 0 0 10px; margin: 0 0 10px; }
.bb-file:last-child { border: 0; }
.bb-file .t { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.bb-file .t b { font-size: 15px; }
.bb-file .st { flex: none; border: 2px solid var(--blood-700); color: var(--blood-700); font: 700 9.5px var(--font-label); letter-spacing: .12em; padding: 1px 5px; transform: rotate(-3deg); }
.bb-file p { font-size: 14.5px; margin: 4px 0 0; }
.bb .bb-sig { font: italic 22px var(--font-display); color: var(--night-900); margin: 16px 0 0; }
.bb-sig small { display: block; font: 700 11px var(--font-label); font-style: normal; letter-spacing: .14em; color: var(--ink-600); margin-top: 2px; }
.bb .bb-ps { font-size: 14px; color: var(--ink-600); }
.bb-share { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 18px 0 14px; padding: 14px; background: var(--vellum-100); border: 1px solid var(--line-200); border-radius: 8px; }
.bb-share h3 { margin: 0; color: var(--ink-600); }
.bb-share .link-row input { min-width: 0; flex: 1; }
.bb-share .net-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 520px) { .bb-share .net-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bb-cta { margin-top: 4px; }
.bb .bb-ooc { margin-top: 16px; border-top: 1px solid var(--line-200); padding-top: 12px; font-size: 13.5px; line-height: 1.5; }
.bb-ooc b { font: 700 11px var(--font-label); letter-spacing: .14em; display: block; margin-bottom: 4px; color: var(--ink-600); }
.bb-ooc a { color: var(--verdigris-600); }
@media (min-width: 960px) { .bb h1 { font-size: 42px; } .bb-in { padding: 0 32px; } .bb-mast, .bb-strap { margin-left: 32px; margin-right: 32px; } }

/* ---------- Compact phone homepage ----------
   Phones show about 640–700px before scrolling (less in WhatsApp or Instagram), so the
   masthead is one row, the intro is one line and the arch is shorter: the upload box and
   "Hand over the photograph" fit on the first screen. The full intro follows the button. */
@media (max-width: 959px) {
  .home-head { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; gap: 10px; padding-top: 12px; }
  .home-head .crest { width: 34px; }
  .home-head .dept { font-size: 11px; letter-spacing: .16em; line-height: 1.45; }
  .home-head .diamond-rule { display: none !important; }
  .home-head .bb-ticker { flex-basis: 100%; max-width: none; }
  .home-main { gap: 10px; padding-top: 4px; }
  .home-intro { gap: 6px; }
  .home-intro .display-xl { font-size: 44px; }
  .lede-short { font-size: 16px; line-height: 1.45; }
  .home-upload { gap: 10px; }
  .arch-upload { width: 236px; height: 230px; border-radius: 118px 118px var(--radius-1) var(--radius-1); }
  .arch-inner { border-radius: 112px 112px 2px 2px; padding: 12px 14px; gap: 6px; }
  .cam { width: 34px; height: 34px; }
  .lede-after { margin: 4px 0 0; }
}

/* ---------- Upload: make the arch feel tappable, and offer the camera ---------- */
/* A gentle double nudge shortly after the page appears, and a press when tapped. */
@keyframes arch-nudge {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.03); box-shadow: 0 0 0 7px rgba(185, 141, 58, .3), var(--shadow-1); }
}
.arch-upload { animation: arch-nudge 1.3s ease-in-out .9s 2; }
.arch-upload:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) { .arch-upload { animation: none; } .arch-upload:active { transform: none; } }
.tap-hint { display: inline-block; white-space: nowrap; margin-top: 6px; padding: 5px 12px; border-radius: 999px; background: var(--night-900); color: var(--vellum-100); font-weight: 600; font-size: 13px; letter-spacing: .01em; }
.camera-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 4px 12px; font-weight: 600; font-size: 15px; color: var(--night-900); }
.home-upload .camera-btn { margin-top: -8px; min-height: 36px; }

/* The upload box on a shared card page. */
.cu-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.cu-box.is-busy { opacity: .6; pointer-events: none; }
.cu-status { margin: 0; min-height: 1.2em; font-size: 14px; color: var(--ink-600); text-align: center; }
.cu-status:empty { display: none; }

/* ---------- The Tribunal's pointed (Gothic) arch ----------
   Every arch on the site is clipped to the same two-centred arch (radius 0.6 of the width),
   replacing the Bureau's round one. The corners set by border-radius above are cleared. */
.arch, .arch-inner, .arch-photo-inner, .err-photo .arch-photo-inner, .arch-intake .arch-photo-inner {
  border-radius: 0 0 var(--radius-1) var(--radius-1);
  clip-path: polygon(0% 100%, 0% 51.4%, 0.9% 42.3%, 3.7% 33.5%, 8.1% 25.2%, 14.2% 17.8%, 21.6% 11.3%, 30.3% 6.1%, 39.8% 2.3%, 50% 0%, 60.2% 2.3%, 69.7% 6.1%, 78.4% 11.3%, 85.8% 17.8%, 91.9% 25.2%, 96.3% 33.5%, 99.1% 42.3%, 100% 51.4%, 100% 100%);
}
.arch { background: linear-gradient(160deg, #d8b25e, var(--gold-500) 45%, #8a6528); }
.arch-inner { padding-top: 48px; border-color: transparent; }
.arch-photo-inner { background: linear-gradient(160deg, #4a4050, #2d2733 70%); }
.display-xl em { color: var(--blood-700); }

/* ---------- The candlelit hero (from the concept board) ----------
   The home page and the shared-card page open on candle-black with a faint gold hatch:
   vellum headline, gold "Evil?", gold labels, a vellum button ringed in gold. Everything
   below the gold rule stays on vellum. */
.hero {
  background-color: var(--night-900);
  background-image: repeating-linear-gradient(45deg, rgba(236,200,116,.05) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(236,200,116,.04) 0 2px, transparent 2px 9px);
  border-bottom: 3px solid var(--gold-500);
  color: var(--vellum-100);
  padding-bottom: 28px;
}
body[data-screen="home"] .band { display: none !important; }
.hero .dept, .hero .label { color: var(--gold-300); }
.hero .home-head { border-bottom-color: rgba(185,141,58,.5); }
.hero .display-xl { color: var(--vellum-100); }
.hero .display-xl em { color: var(--gold-300); }
.hero .lede { color: #e6dcc6; }
.hero .caution { color: #cbbfa6; }
.hero .camera-btn, .hero .link-btn { color: var(--gold-300); }
.hero .btn-primary, .hero .btn-burgundy {
  background: var(--vellum-100); color: var(--night-900);
  box-shadow: inset 0 0 0 2px var(--vellum-100), inset 0 0 0 4px var(--gold-500);
}
.hero .btn-primary:hover, .hero .btn-burgundy:hover { background: #fff8e8; }
.hero .arch { box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.hero .bb-ticker { background: rgba(239,230,210,.06); border-color: var(--gold-500); color: var(--vellum-100); }
.hero .bb-ticker i { background: var(--gold-300); color: var(--night-900); }
.hero .bb-ticker b { color: var(--gold-300); }
.hero .share-card { box-shadow: 0 14px 36px rgba(0,0,0,.5); }
.hero .share-main { padding-bottom: 24px; }
.home-below { display: flex; flex-direction: column; gap: 22px; padding-top: 28px; }
.share-below { padding-top: 24px; }
.home-below .map-teaser { margin: 0; }
@media (min-width: 960px) {
  .hero { padding-bottom: 8px; }
  .home-below { padding-top: 40px; gap: 36px; }
  .home-scale .section-head { font-size: 28px; }
}
@media (min-width: 960px) { .hero .home-intro { align-self: center; } .home-below { padding-bottom: 28px; } }
/* Phones: breathing room between the Gazette ticker and the headline. */
@media (max-width: 959px) { .home-head .bb-ticker { margin-bottom: 14px; } }
