/* Shared shell for the verdict microsites. Sites override tokens in their own CSS. */
/* Anton (SIL OFL 1.1, see fonts/OFL.txt), self-hosted so pages make no third-party requests. */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/_shared/fonts/anton-latin.woff2') format('woff2');
}
:root {
  --paper: #f2eee4;
  --ink: #151412;
  --muted: #6b665c;
  --line: #151412;
  --field: #fffdf8;
  --good: #1d7a47;
  --mixed: #c27c00;
  --bad: #e0381c;
  --tone: var(--ink);
  --display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151412;
    --ink: #f2eee4;
    --muted: #a39d90;
    --line: #f2eee4;
    --field: #1f1d1a;
    --good: #4fc083;
    --mixed: #f0a91e;
    --bad: #ff5a3c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--body);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
[hidden] { display: none !important; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(28px, 7vw, 72px) 16px 40px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.title {
  font: 400 clamp(3.25rem, 13vw, 6.5rem)/0.92 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0;
}
.lede { margin: 16px 0 28px; color: var(--muted); max-width: 32em; }

/* Form */
.field {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 16px;
  font: inherit;
  font-size: 1.125rem;
  color: var(--ink);
  background: var(--field);
  border: 2px solid var(--line);
  border-radius: 0;
  resize: vertical;
}
.field:focus { outline: 3px solid var(--bad); outline-offset: 2px; }
.field::placeholder { color: var(--muted); opacity: 1; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.count { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.error { margin: 14px 0 0; color: var(--bad); font-weight: 600; }

/* Buttons */
.btn {
  appearance: none;
  font: 400 1.25rem/1 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 16px 26px;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--bad);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--bad); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--bad); }
.btn:focus-visible { outline: 3px solid var(--bad); outline-offset: 4px; }
.btn[disabled] { cursor: progress; opacity: 0.7; transform: none; box-shadow: 5px 5px 0 var(--muted); }
.btn-ghost { color: var(--ink); background: transparent; box-shadow: none; }
.btn-ghost:hover, .btn-ghost:active { box-shadow: none; }

/* Result */
.result { --tone: var(--ink); animation: slam 260ms cubic-bezier(.2, 1.4, .4, 1) both; }
.result[data-tone='good'] { --tone: var(--good); }
.result[data-tone='mixed'] { --tone: var(--mixed); }
.result[data-tone='bad'] { --tone: var(--bad); }
.has-result header { display: none; }

/* Share card: everything worth screenshotting lives in here */
.card {
  background: var(--field);
  border: 2px solid var(--line);
  box-shadow: 8px 8px 0 var(--tone);
  padding: clamp(20px, 5vw, 36px);
  margin-right: 8px;
}
.card-brand {
  margin: 0 0 16px;
  font: 400 1.125rem/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--muted);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.roast { margin: 18px 0 0; font-size: clamp(1.25rem, 4.5vw, 1.5rem); line-height: 1.25; font-weight: 700; }
.challenge { margin: 28px 0 0; font-weight: 600; }
.link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin-top: 18px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link:hover { color: var(--ink); }
.link:focus-visible { outline: 3px solid var(--bad); outline-offset: 3px; }

.subject {
  margin: 0 0 18px;
  padding-left: 14px;
  border-left: 3px solid var(--muted);
  color: var(--muted);
  font-style: italic;
  overflow-wrap: anywhere;
}
.verdict {
  font: 400 clamp(2.75rem, 12.5vw, 6.5rem)/0.92 var(--display);
  text-transform: uppercase;
  color: var(--tone);
  margin: 0;
  outline: none;
  overflow-wrap: anywhere;
}
.percent { margin: 10px 0 0; font: 400 clamp(2rem, 8vw, 3.25rem)/1 var(--display); }
.percent small { font: 600 1rem/1 var(--body); color: var(--muted); margin-left: 8px; text-transform: lowercase; }
.line { margin: 12px 0 0; font-size: 1.0625rem; font-weight: 600; color: var(--muted); }
.torn { margin: 6px 0 0; color: var(--muted); }

.dims { list-style: none; margin: 28px 0 0; padding: 0; border-top: 2px solid var(--line); }
.dims li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 25%, transparent);
}
.ticks { display: flex; gap: 3px; }
.ticks i { width: 9px; height: 18px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.ticks i.on { background: var(--ink); }
.dims b { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }

.actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; }

.foot { margin-top: auto; padding-top: 48px; color: var(--muted); font-size: 0.8125rem; }
.foot p { margin: 0; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; padding: 0; list-style: none; }
.nav a { color: var(--muted); text-underline-offset: 3px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--ink); }

/* Supporting pages */
.page-top { margin: 0 0 28px; }
.page-top a { font: 400 1.125rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.page-title { font: 400 clamp(2.5rem, 10vw, 4.5rem)/0.95 var(--display); text-transform: uppercase; margin: 0 0 20px; }
.prose { max-width: 38em; }
.prose h2 { font: 400 1.625rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin: 40px 0 12px; }
.prose p, .prose li { margin: 0 0 12px; }
.prose ul { padding-left: 1.2em; }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose .meta { color: var(--muted); font-size: 0.9375rem; }
.page-cta { margin: 40px 0 0; }
a.btn { display: inline-block; text-decoration: none; }

/* Examples list */
.prose .examples { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--line); }
.examples li { padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 25%, transparent); }
.examples q { display: block; font-style: italic; quotes: '“' '”'; }
.ex-verdict { display: block; margin: 8px 0 4px; font: 400 1.5rem/1 var(--display); text-transform: uppercase; }
.ex-verdict small { font: 600 0.9375rem/1 var(--body); text-transform: none; color: var(--muted); margin-left: 6px; }
.ex-verdict[data-tone='good'] { color: var(--good); }
.ex-verdict[data-tone='mixed'] { color: var(--mixed); }
.ex-verdict[data-tone='bad'] { color: var(--bad); }
.ex-dims { color: var(--muted); font-size: 0.875rem; margin: 0 0 6px !important; }

@keyframes slam { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .result { animation: none; }
  .btn { transition: none; }
}
@media (max-width: 480px) {
  .ticks { display: none; }
  .form-row { flex-direction: column-reverse; align-items: stretch; }
  .count { text-align: right; }
  .actions .btn { flex: 1 1 100%; }
}
