/* ============ FOUNDER'S VERDICT — Tabloid × Court ============ */

:root {
  --paper: #f1e9d6;
  --paper-2: #ebe0c4;
  --ink: #0d0c0a;
  --ink-soft: #1a1814;
  --stamp: #b81d1d;
  --stamp-2: #8a1010;
  --gold: #c19a37;
  --redact: #0d0c0a;
  --rule: rgba(13, 12, 10, 0.85);
  --shadow: 0 2px 0 #0d0c0a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Space Mono', ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Newsprint paper texture: layered halftone + grain */
body {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(139, 90, 30, 0.06) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(139, 90, 30, 0.05) 0, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.025) 1px, transparent 1.5px);
  background-size: 100% 100%, 100% 100%, 4px 4px;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.012) 0 1px, transparent 1px 3px);
  z-index: 1;
  mix-blend-mode: multiply;
}

/* Display fonts */
.display { font-family: 'Playfair Display', 'Times New Roman', serif; font-weight: 900; letter-spacing: -0.02em; line-height: 0.92; }
.condensed { font-family: 'Oswald', 'Impact', sans-serif; letter-spacing: 0.02em; }
.mono { font-family: 'Space Mono', ui-monospace, monospace; }
.typewriter { font-family: 'Special Elite', 'Courier New', monospace; }
.smallcaps { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 600; }

/* ============ MASTHEAD ============ */
.app { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; padding: 16px 18px 80px; }

.masthead {
  border-top: 6px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 10px 0 6px;
  margin-bottom: 6px;
  position: relative;
}
.masthead .meta-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em;
  border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin-bottom: 8px;
}
.masthead .title {
  font-family: 'Playfair Display', serif; font-style: italic; font-weight: 900;
  font-size: clamp(38px, 11vw, 64px);
  text-align: center; line-height: 0.9; letter-spacing: -0.03em;
}
.masthead .title em { font-style: normal; }
.masthead .subtitle {
  text-align: center; font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase; margin-top: 6px; padding: 4px 0;
  border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink);
}

/* ============ INPUT CARD ============ */
.intake {
  margin-top: 18px;
  padding: 18px 16px;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  position: relative;
  box-shadow: 4px 4px 0 var(--ink);
}
.intake::before {
  content: 'CASE FILE №';
  position: absolute; top: -10px; left: 14px;
  background: var(--paper); padding: 0 8px;
  font-size: 10px; letter-spacing: 0.25em; font-weight: 700;
  font-family: 'Oswald', sans-serif;
}
.intake::after {
  content: attr(data-case);
  position: absolute; top: -10px; right: 14px;
  background: var(--paper); padding: 0 8px;
  font-size: 10px; letter-spacing: 0.15em;
  font-family: 'Space Mono', monospace;
}

.field { margin-bottom: 14px; }
.field label {
  display: block; font-family: 'Oswald', sans-serif;
  text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 11px; font-weight: 600; margin-bottom: 5px;
  color: var(--ink);
}
.field label .req { color: var(--stamp); }
.field label .hint { float: right; font-weight: 400; opacity: 0.55; letter-spacing: 0.08em; }

.input, .textarea {
  width: 100%; background: var(--paper);
  border: 1px solid var(--ink); border-radius: 0;
  padding: 10px 12px; font-family: 'Space Mono', monospace; font-size: 14px;
  color: var(--ink); resize: none;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 120ms;
}
.input:focus, .textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink), 3px 3px 0 var(--ink); }
.textarea { min-height: 90px; line-height: 1.5; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }

/* API key drawer */
.keybar {
  margin-top: 6px; padding: 10px 12px; border: 1px dashed var(--ink);
  background: rgba(0,0,0,0.03); font-size: 11px; line-height: 1.5;
}
.keybar summary { cursor: pointer; font-family: 'Oswald'; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 600; font-size: 11px; }
.keybar summary::marker { content: '▸ '; }
.keybar[open] summary::marker { content: '▾ '; }
.keybar a { color: var(--stamp); font-weight: 700; }
.keybar input {
  margin-top: 8px; width: 100%; background: var(--paper);
  border: 1px solid var(--ink); padding: 7px 10px; font-family: 'Space Mono'; font-size: 12px;
}

/* SUBMIT — slammer */
.submit {
  width: 100%; margin-top: 18px; padding: 18px 16px;
  background: var(--ink); color: var(--paper);
  font-family: 'Oswald', sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.25em;
  font-size: 18px; border: none; cursor: pointer;
  position: relative; box-shadow: 4px 4px 0 var(--stamp);
  transition: transform 80ms, box-shadow 80ms;
}
.submit:hover:not(:disabled) { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--stamp); }
.submit:active:not(:disabled) { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--stamp); }
.submit:disabled { background: #555; box-shadow: 4px 4px 0 #999; cursor: not-allowed; }
.submit .gavel { display: inline-block; transform: rotate(-15deg); margin-right: 8px; }

/* Examples row */
.examples { margin-top: 12px; font-size: 11px; }
.examples-label { display: block; margin-bottom: 6px; }
.example-chip {
  display: inline-block; padding: 4px 10px; margin: 0 4px 4px 0;
  border: 1px solid var(--ink); background: var(--paper);
  font-size: 11px; cursor: pointer; font-family: 'Space Mono'; transition: all 100ms;
}
.example-chip:hover { background: var(--ink); color: var(--paper); }

/* ============ DELIBERATION ============ */
.deliberation {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
}
.deliberation::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.04) 1px, transparent 1.5px);
  background-size: 6px 6px;
  pointer-events: none;
}
.delib-stamp {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  border: 4px double var(--stamp); color: var(--stamp);
  padding: 6px 18px; font-family: 'Oswald'; font-weight: 700;
  letter-spacing: 0.3em; font-size: 12px;
  background: var(--paper);
}
.delib-title {
  font-family: 'Playfair Display', serif; font-style: italic; font-weight: 900;
  font-size: clamp(40px, 13vw, 84px); text-align: center; line-height: 0.95;
  margin-bottom: 18px;
}
.delib-cursor {
  display: inline-block; width: 0.5ch; background: var(--ink); height: 0.85em;
  vertical-align: -0.05em; animation: blink 0.7s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.delib-log {
  width: 100%; max-width: 480px;
  background: var(--ink); color: #d8e6c5;
  font-family: 'Space Mono', monospace; font-size: 12px;
  padding: 14px 16px; line-height: 1.7;
  border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--stamp);
  height: 260px;
  overflow: hidden;
}
.delib-log .line { white-space: pre-wrap; word-break: break-word; }
.delib-log .line.warn { color: #e6b85c; }
.delib-log .line.ok { color: #7fd082; }
.delib-log .line.bad { color: #ff6f6f; }
.delib-log .line.sub { color: #6e8a59; }

.delib-tip {
  margin-top: 14px; font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; opacity: 0.6;
}

/* ============ RESULT PAGE ============ */
.result-wrap {
  margin-top: 12px;
  position: relative;
}

/* Headline strip "EXTRA EXTRA" */
.extra-banner {
  background: var(--ink); color: var(--paper);
  text-align: center; padding: 6px 12px;
  font-family: 'Oswald'; font-weight: 700;
  letter-spacing: 0.4em; font-size: 11px;
  margin-bottom: 0;
}

/* THE VERDICT — giant headline */
.verdict-card {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  padding: 28px 18px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink);
}
.verdict-card::after {
  /* halftone bleed in corner */
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px;
  background-image: radial-gradient(circle, var(--ink) 1.4px, transparent 1.6px);
  background-size: 8px 8px;
  opacity: 0.2;
  pointer-events: none;
}

.verdict-kicker {
  text-align: center; font-family: 'Oswald';
  font-size: 11px; letter-spacing: 0.35em;
  text-transform: uppercase; padding-bottom: 10px;
  border-bottom: 1px solid var(--ink); margin-bottom: 10px;
}

.verdict-headline {
  font-family: 'Playfair Display', serif; font-weight: 900;
  font-style: italic; line-height: 0.88;
  text-align: center; letter-spacing: -0.025em;
  font-size: clamp(48px, 13vw, 92px);
  margin: 6px 0;
  position: relative;
  text-wrap: balance;
}
.verdict-headline .stamp-headline {
  color: var(--stamp);
  text-shadow: 1px 1px 0 var(--paper-2), -1px -1px 0 var(--paper-2);
}

.dek {
  text-align: center; font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 16px; line-height: 1.4;
  margin: 10px 14px 4px; opacity: 0.85;
  text-wrap: balance;
}

/* Tier card */
.tier-row {
  margin-top: 18px;
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  border-top: 3px double var(--ink); border-bottom: 3px double var(--ink);
  padding: 14px 4px;
}
.tier-letter {
  font-family: 'Playfair Display', serif; font-weight: 900;
  font-size: 92px; line-height: 0.85;
  width: 110px; text-align: center;
  border: 3px solid var(--ink);
  background: var(--ink); color: var(--paper);
  padding: 4px 0 8px;
  position: relative;
  box-shadow: 4px 4px 0 var(--stamp);
}
.tier-letter[data-tier="S"] { background: var(--stamp); color: var(--paper); border-color: var(--ink); }
.tier-letter[data-tier="A"] { background: var(--ink); color: var(--paper); }
.tier-letter[data-tier="B"] { background: var(--paper-2); color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.tier-letter[data-tier="C"] { background: var(--paper-2); color: var(--ink); }
.tier-letter[data-tier="D"] { background: var(--paper-2); color: var(--ink); }
.tier-letter[data-tier="F"] { background: #1a1814; color: var(--stamp); }

.tier-letter::after {
  content: 'TIER';
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink);
  padding: 1px 6px; font-family: 'Oswald'; font-size: 9px; letter-spacing: 0.25em;
}

.tier-meta { font-size: 13px; line-height: 1.5; }
.tier-meta .label { font-family: 'Oswald'; text-transform: uppercase; letter-spacing: 0.2em; font-size: 10px; opacity: 0.7; }
.tier-meta .name { font-family: 'Playfair Display'; font-weight: 900; font-style: italic; font-size: 22px; line-height: 1.1; margin: 2px 0; }
.tier-meta .archetype { font-family: 'Oswald'; text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; }

/* Sub-scores */
.scores { margin-top: 18px; }
.scores-title {
  font-family: 'Oswald'; text-transform: uppercase;
  letter-spacing: 0.3em; font-size: 11px; font-weight: 700;
  text-align: center; padding-bottom: 8px;
  border-bottom: 1px solid var(--ink); margin-bottom: 10px;
}
.score {
  display: grid; grid-template-columns: 92px 1fr 38px; gap: 10px;
  align-items: center; padding: 7px 0;
  border-bottom: 1px dashed rgba(13,12,10,0.4);
  font-family: 'Oswald';
}
.score:last-child { border-bottom: none; }
.score-label { text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; font-weight: 600; }
.score-bar {
  height: 14px; background: var(--paper);
  border: 1px solid var(--ink); position: relative;
}
.score-bar-fill {
  height: 100%; background: var(--ink);
  background-image: repeating-linear-gradient(45deg, var(--ink) 0 4px, var(--ink-soft) 4px 8px);
  width: 0;
  transition: width 900ms cubic-bezier(0.2, 1, 0.3, 1);
}
.score-bar-fill[data-tier="hot"] {
  background: var(--stamp);
  background-image: repeating-linear-gradient(45deg, var(--stamp) 0 4px, var(--stamp-2) 4px 8px);
}
.score-num {
  font-family: 'Space Mono'; font-weight: 700; font-size: 14px;
  text-align: right; tabular-nums: 1;
}

/* Score commentary */
.score-note {
  grid-column: 1 / -1; font-family: 'Space Mono'; font-size: 11px;
  font-style: italic; padding: 0 0 4px 102px; opacity: 0.7;
  line-height: 1.45;
}

/* Roast pull-quote */
.roast {
  margin-top: 22px;
  padding: 18px 16px 16px;
  border-top: 5px solid var(--stamp);
  border-bottom: 5px solid var(--stamp);
  background:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(184,29,29,0.04) 6px 7px),
    var(--paper-2);
  text-align: center; position: relative;
}
.roast::before {
  content: '“'; position: absolute; top: -8px; left: 12px;
  font-family: 'Playfair Display'; font-size: 80px; line-height: 1;
  color: var(--stamp); font-weight: 900;
}
.roast::after {
  content: '”'; position: absolute; bottom: -38px; right: 12px;
  font-family: 'Playfair Display'; font-size: 80px; line-height: 1;
  color: var(--stamp); font-weight: 900;
}
.roast-label {
  font-family: 'Oswald'; text-transform: uppercase;
  letter-spacing: 0.3em; font-size: 10px;
  display: inline-block; padding: 2px 8px;
  background: var(--stamp); color: var(--paper);
  margin-bottom: 8px;
}
.roast-text {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-weight: 900; font-size: clamp(20px, 5vw, 28px);
  line-height: 1.2; text-wrap: balance;
}
.roast-attrib {
  margin-top: 10px; font-family: 'Oswald';
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  opacity: 0.7;
}

/* Sections */
.section {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}
.section-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.section-num {
  font-family: 'Playfair Display'; font-weight: 900; font-style: italic;
  font-size: 28px; line-height: 1;
  width: 38px; height: 38px; background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.section-title {
  font-family: 'Oswald'; text-transform: uppercase;
  letter-spacing: 0.18em; font-weight: 700; font-size: 16px;
}

.bullets { list-style: none; }
.bullets li {
  position: relative; padding-left: 22px; margin-bottom: 8px;
  font-size: 14px; line-height: 1.5;
}
.bullets li::before {
  content: '▌'; position: absolute; left: 0; top: 1px;
  color: var(--stamp);
}

/* Competitor grid */
.comp-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.comp {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-size: 13px;
}
.comp-num {
  font-family: 'Playfair Display'; font-style: italic; font-weight: 900;
  font-size: 22px; line-height: 1;
}
.comp-body .comp-name { font-family: 'Oswald'; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 13px; }
.comp-body .comp-note { font-size: 12px; opacity: 0.75; line-height: 1.4; margin-top: 2px; }
.comp-threat {
  font-family: 'Oswald'; font-weight: 700; font-size: 10px;
  letter-spacing: 0.18em; padding: 3px 7px; text-transform: uppercase;
  border: 1px solid var(--ink);
}
.comp-threat[data-level="HIGH"] { background: var(--stamp); color: var(--paper); }
.comp-threat[data-level="MED"] { background: var(--gold); color: var(--ink); }
.comp-threat[data-level="LOW"] { background: var(--paper-2); color: var(--ink); }

/* Pivot box */
.pivot {
  margin-top: 18px; padding: 14px 14px;
  border: 2px dashed var(--ink); position: relative;
  background:
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(13,12,10,0.025) 8px 9px),
    var(--paper);
}
.pivot-stamp {
  position: absolute; top: -12px; left: 14px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink);
  padding: 2px 10px; font-family: 'Oswald'; font-weight: 700;
  letter-spacing: 0.25em; font-size: 11px;
}
.pivot p { font-size: 14px; line-height: 1.5; margin-bottom: 8px; }
.pivot p:last-child { margin-bottom: 0; }

/* Recruit callout (only shown on A/S tier) */
.recruit {
  margin-top: 22px; padding: 14px 14px 14px;
  border-top: 5px solid var(--gold);
  border-bottom: 5px solid var(--gold);
  background:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(193,154,55,0.06) 6px 7px),
    var(--paper-2);
  position: relative;
}
.recruit-stamp {
  display: inline-block;
  background: var(--gold); color: var(--ink);
  padding: 3px 10px; font-family: 'Oswald'; font-weight: 700;
  letter-spacing: 0.3em; font-size: 10px;
  margin-bottom: 10px; text-transform: uppercase;
}
.recruit-title {
  font-family: 'Playfair Display', serif; font-style: italic; font-weight: 900;
  font-size: clamp(22px, 5.4vw, 30px); line-height: 1.05; margin-bottom: 8px;
  text-wrap: balance;
}
.recruit-body {
  font-size: 14px; line-height: 1.55; margin-bottom: 12px;
}
.recruit-body strong {
  font-family: 'Oswald'; text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 700;
  background: var(--ink); color: var(--paper);
  padding: 1px 6px;
}
.recruit-actions {
  display: grid; grid-template-columns: 1fr; gap: 8px;
}
@media (min-width: 480px) {
  .recruit-actions { grid-template-columns: 1fr 1fr; }
}
.recruit-action {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px; border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font-family: 'Oswald'; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 12px;
  text-decoration: none; cursor: pointer;
  box-shadow: 3px 3px 0 var(--gold);
  transition: transform 80ms, box-shadow 80ms;
}
.recruit-action:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--gold); }
.recruit-action:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--gold); }
.recruit-action.alt { background: var(--paper); color: var(--ink); }

/* CTA row */
.cta-row {
  margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
@media (max-width: 420px) { .cta-row { grid-template-columns: 1fr; } }
.cta {
  padding: 14px; font-family: 'Oswald'; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 13px;
  border: 2px solid var(--ink); background: var(--paper);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 80ms, box-shadow 80ms;
}
.cta.primary { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--stamp); }
.cta:hover:not(:disabled) { transform: translate(-1px,-1px); }
.cta:active:not(:disabled) { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.cta:disabled { opacity: 0.5; cursor: progress; }

/* Footer */
.colophon {
  margin-top: 28px; padding-top: 12px;
  border-top: 3px double var(--ink);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  text-align: center; opacity: 0.6;
}
.colophon a { color: var(--stamp); }

/* ============ SHARE CARD (rendered offscreen for PNG) ============ */
.share-card {
  width: 1080px; height: 1350px; padding: 60px;
  background: var(--paper);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(139, 90, 30, 0.08) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(139, 90, 30, 0.06) 0, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.03) 1.4px, transparent 1.6px);
  background-size: 100% 100%, 100% 100%, 5px 5px;
  color: var(--ink);
  position: fixed; left: 0; top: 0;
  display: none; flex-direction: column;
  border: 8px solid var(--ink);
  box-sizing: border-box;
  overflow: hidden;
}
.share-card .sc-mast {
  border-top: 8px solid var(--ink); border-bottom: 2px solid var(--ink);
  padding: 12px 0; margin-bottom: 14px;
}
.share-card .sc-mast .row {
  display: flex; justify-content: space-between;
  font-family: 'Oswald'; font-size: 16px; letter-spacing: 0.3em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink); padding-bottom: 8px; margin-bottom: 12px;
}
.share-card .sc-title {
  font-family: 'Playfair Display'; font-style: italic; font-weight: 900;
  font-size: 96px; text-align: center; line-height: 0.9; letter-spacing: -0.03em;
}
.share-card .sc-sub {
  text-align: center; font-family: 'Oswald'; font-size: 14px;
  letter-spacing: 0.4em; text-transform: uppercase;
  border-top: 1px solid var(--ink); border-bottom: 4px double var(--ink);
  padding: 6px 0; margin-top: 10px;
}
.share-card .sc-verdict {
  display: flex; flex-direction: column; justify-content: center;
  text-align: center; padding: 14px 0; position: relative;
}
.share-card .sc-kicker {
  font-family: 'Oswald'; font-size: 18px; letter-spacing: 0.4em;
  text-transform: uppercase; margin-bottom: 18px;
}
.share-card .sc-headline {
  font-family: 'Playfair Display'; font-style: italic; font-weight: 900;
  font-size: 128px; line-height: 0.88; letter-spacing: -0.03em;
  color: var(--stamp);
  text-wrap: balance;
}
.share-card .sc-dek {
  margin-top: 22px; font-family: 'Playfair Display'; font-style: italic;
  font-size: 32px; line-height: 1.25; padding: 0 40px;
  text-wrap: balance;
}

.share-card .sc-tier-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center;
  padding: 22px 8px; margin-top: 8px;
  border-top: 4px double var(--ink); border-bottom: 4px double var(--ink);
}
.share-card .sc-tier-letter {
  width: 200px; height: 200px;
  background: var(--ink);
  border: 6px solid var(--ink);
  box-shadow: 8px 8px 0 var(--stamp);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.share-card .sc-tier-letter-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Case summary line in the verdict block — compact, no border, single line */
.share-card .sc-case {
  margin: 12px auto 0;
  max-width: 880px;
  padding: 0 16px;
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  line-height: 1.4;
  font-style: italic;
  text-align: center;
  color: var(--ink);
}
.share-card .sc-case-label {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  font-family: 'Oswald', sans-serif;
  font-style: normal; font-weight: 700;
  letter-spacing: 0.3em; font-size: 12px;
  padding: 3px 10px; margin-right: 10px;
  vertical-align: middle;
}
.share-card .sc-case-text {
  vertical-align: middle;
}
.share-card .sc-tier-letter[data-tier="F"] { background: #1a1814; color: var(--stamp); }
.share-card .sc-tier-letter[data-tier="S"] { background: var(--stamp); color: var(--paper); }
.share-card .sc-tier-letter[data-tier="A"] { background: var(--ink); color: var(--paper); }
.share-card .sc-tier-letter[data-tier="B"] { background: var(--paper-2); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.share-card .sc-tier-letter[data-tier="C"],
.share-card .sc-tier-letter[data-tier="D"] { background: var(--paper-2); color: var(--ink); }

.share-card .sc-tier-name {
  font-family: 'Playfair Display'; font-style: italic; font-weight: 900;
  font-size: 48px; line-height: 1;
}
.share-card .sc-tier-arch {
  font-family: 'Oswald'; text-transform: uppercase; font-size: 18px;
  letter-spacing: 0.25em; margin-top: 8px;
}

.share-card .sc-scores {
  margin-top: 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px;
}
.share-card .sc-score {
  display: grid; grid-template-columns: 110px 1fr 50px; gap: 10px; align-items: center;
  font-family: 'Oswald'; font-size: 16px;
  border-bottom: 1px dashed rgba(13,12,10,0.4); padding: 8px 0;
}
.share-card .sc-score-label { text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700; }
.share-card .sc-score-bar { height: 16px; border: 2px solid var(--ink); background: var(--paper); }
.share-card .sc-score-bar-fill { height: 100%; background: var(--ink); }
.share-card .sc-score-num { font-family: 'Space Mono'; font-weight: 700; font-size: 18px; text-align: right; }

.share-card .sc-roast {
  margin-top: 20px;
  padding: 22px 28px;
  border-top: 8px solid var(--stamp); border-bottom: 8px solid var(--stamp);
  text-align: center;
}
.share-card .sc-roast-text {
  font-family: 'Playfair Display'; font-style: italic; font-weight: 900;
  font-size: 32px; line-height: 1.18;
  text-wrap: balance;
}

.share-card .sc-foot {
  margin-top: auto; padding-top: 14px;
  border-top: 3px double var(--ink);
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Oswald'; text-transform: uppercase;
  font-size: 14px; letter-spacing: 0.3em;
}
.share-card .sc-foot .url { color: var(--stamp); font-weight: 700; }

/* Stamp overlay (rotated) — anchored bottom-right so it sits with the footer */
.share-card .sc-stamp {
  position: absolute; bottom: 130px; right: 60px;
  border: 6px double var(--stamp); color: var(--stamp);
  padding: 10px 22px; font-family: 'Oswald'; font-weight: 700;
  letter-spacing: 0.4em; font-size: 26px;
  transform: rotate(8deg);
  background: rgba(241, 233, 214, 0.6);
  text-transform: uppercase;
}

/* ============ ANIMATIONS ============ */
@keyframes shake {
  0%, 100% { transform: translate(0,0) rotate(0); }
  10% { transform: translate(-3px,-2px) rotate(-1deg); }
  20% { transform: translate(3px,1px) rotate(1deg); }
  30% { transform: translate(-2px,2px) rotate(-0.5deg); }
  40% { transform: translate(2px,-1px) rotate(0.5deg); }
  50% { transform: translate(-1px,1px) rotate(0); }
}
.shake { animation: shake 420ms ease-out; }

@keyframes flash {
  0% { background: var(--paper); }
  10% { background: var(--stamp); }
  20% { background: var(--paper); }
  30% { background: var(--stamp); }
  100% { background: var(--paper); }
}
.flash { animation: flash 380ms ease-out; }

@keyframes stamp-slam-kf {
  0% { opacity: 0; transform: scale(3.5) rotate(-25deg); filter: blur(4px); }
  60% { opacity: 1; transform: scale(0.92) rotate(-2deg); filter: blur(0); }
  80% { opacity: 1; transform: scale(1.06) rotate(-1deg); }
  100% { opacity: 1; transform: scale(1) rotate(-1deg); filter: blur(0); }
}
.stamp-headline {
  display: inline-block;
  opacity: 0;
  transform: scale(3.5) rotate(-25deg);
}
.stamp-slam {
  opacity: 1 !important;
  transform: scale(1) rotate(-1deg) !important;
  animation: stamp-slam-kf 600ms cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 420ms ease-out both; }

@keyframes drum {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}
.drum { animation: drum 480ms ease-in-out infinite; }

/* Stagger helpers */
.d1 { animation-delay: 80ms; }
.d2 { animation-delay: 160ms; }
.d3 { animation-delay: 240ms; }
.d4 { animation-delay: 320ms; }
.d5 { animation-delay: 400ms; }
.d6 { animation-delay: 480ms; }

/* Toast */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  font-family: 'Oswald'; text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 12px; padding: 10px 16px; z-index: 200;
  box-shadow: 4px 4px 0 var(--stamp);
}

/* Error card */
.errorbox {
  margin-top: 14px; padding: 14px;
  border: 2px solid var(--stamp); background: var(--paper);
  position: relative;
}
.errorbox-title {
  font-family: 'Oswald'; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.25em; font-size: 12px; color: var(--stamp);
  margin-bottom: 6px;
}
.errorbox-body { font-size: 13px; line-height: 1.5; }

/* Hide scrollbars on the tasteful */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--ink); }
::-webkit-scrollbar-track { background: var(--paper-2); }
