:root {
  --paper: #E7EFE2;
  --grid: #C3D5BC;
  --grid-strong: #A6BFA0;
  --ink: #17231B;
  --ink-soft: #4C5E50;
  --needle: #C8102E;
  --ship: #1E3F9A;
  --reset: #0F7A55;
  --meh: #A86A00;
  --cell: #F3F7F0;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1712; --grid: #1D2C22; --grid-strong: #2A3E30;
    --ink: #E4EEE0; --ink-soft: #93A794; --needle: #FF5464;
    --ship: #86A4FF; --reset: #4FD1A1; --meh: #F2B44B; --cell: #142019;
  }
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--needle); outline-offset: 3px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 32px 20px 64px; }

/* ---------- hero ---------- */
.hero { padding-top: 24px; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.by { font-size: 14px; font-weight: 700; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.by:hover { color: var(--needle); text-decoration: underline; }
.q {
  font-stretch: 62%;
  font-weight: 700;
  font-size: clamp(22px, 4.2vw, 34px);
  margin: 0;
  color: var(--ink-soft);
}
.verdict {
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(76px, 19vw, 210px);
  line-height: .86;
  letter-spacing: -.03em;
  margin: 8px 0 0;
  /* The tight line-height clips descenders ("Not yet."), so leave room for them above the subtitle. */
  padding-bottom: .13em;
}
.verdict.is-lie { color: var(--needle); }
.verdict-sub { font-size: clamp(17px, 2.4vw, 21px); max-width: 38em; margin: 18px 0 0; }

.trace {
  margin: 28px -20px 0;
  height: 150px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  position: relative;
}
.trace svg { display: block; width: 100%; height: 100%; }
.trace path { fill: none; stroke: var(--needle); stroke-width: 2.4; stroke-linejoin: round; }
.trace .pen {
  position: absolute; right: 18%; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .35;
}

.clock {
  display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline;
  margin-top: 18px;
}
.clock strong { font-stretch: 125%; font-weight: 800; font-size: clamp(28px, 6vw, 44px); font-variant-numeric: tabular-nums; }
.clock span { color: var(--ink-soft); }

/* ---------- vote ---------- */
.vote { margin-top: 28px; }
.detail .vote { margin-top: 14px; max-width: 40em; }
.vote-q { font-stretch: 62%; font-weight: 800; font-size: 22px; margin: 0 0 8px; }
.vote-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vb {
  font: inherit; font-stretch: 125%; font-weight: 900; font-size: clamp(17px, 3.4vw, 26px);
  padding: 16px 10px; border: 3px solid var(--ink); background: var(--cell); color: var(--ink);
  cursor: pointer;
}
.detail .vb { font-size: 17px; padding: 10px; }
.vb.lied { border-color: var(--needle); color: var(--needle); }
.vb.lied:hover, .vb.lied[aria-pressed="true"] { background: var(--needle); color: var(--paper); }
.vb.kept:hover, .vb.kept[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.vb:disabled { opacity: .6; cursor: progress; }
.bar { height: 16px; border: 2px solid var(--ink); background: var(--cell); margin-top: 12px; }
.bar i { display: block; height: 100%; width: 0; background: var(--needle); transition: width .3s; }
.vote-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.vote-note { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.vb:disabled[aria-pressed="false"] { cursor: not-allowed; }
.vote-err { color: var(--needle); font-weight: 700; }

/* ---------- tally ---------- */
.tally {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 44px; border: 2px solid var(--ink); background: var(--cell);
}
.tally div { padding: 14px 16px; border-left: 2px solid var(--ink); }
.tally div:first-child { border-left: 0; }
.tally b { display: block; font-stretch: 125%; font-weight: 900; font-size: clamp(30px, 6vw, 48px); line-height: 1; font-variant-numeric: tabular-nums; }
.tally .t-kept b { color: var(--ship); }
.tally .t-lie b { color: var(--needle); }

/* ---------- calendar ---------- */
h2 { font-stretch: 62%; font-weight: 800; font-size: 30px; margin: 56px 0 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd { font-size: 13px; color: var(--ink-soft); padding-left: 4px; }
.day {
  background: var(--cell); border: 2px solid var(--grid-strong);
  min-height: 84px; padding: 6px 8px; display: flex; flex-direction: column;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.day .n { font-weight: 800; font-size: 15px; }
.day .d { font-size: 12px; color: var(--ink-soft); }
.day .g { margin-top: auto; font-stretch: 125%; font-weight: 900; font-size: 22px; line-height: 1; }
.day .g small { font-stretch: 100%; font-weight: 700; font-size: 12px; margin-left: 5px; }
.day.ship { border-color: var(--ship); } .day.ship .g { color: var(--ship); }
.day.reset { border-color: var(--reset); } .day.reset .g { color: var(--reset); }
.day.debatable { border-color: var(--meh); border-style: dashed; } .day.debatable .g { color: var(--meh); }
.day.lie { background: var(--needle); border-color: var(--needle); color: var(--paper); }
.day.lie .d { color: inherit; opacity: .8; }
.day.today { border-color: var(--ink); border-width: 3px; }
.day.future { opacity: .45; cursor: default; }
.day[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.legend i { font-style: normal; font-weight: 900; margin-right: 4px; }
.c-ship { color: var(--ship); } .c-reset { color: var(--reset); }
.c-meh { color: var(--meh); } .c-lie { color: var(--needle); }

.detail {
  margin-top: 16px; border-left: 4px solid var(--ink); padding: 4px 0 4px 16px; min-height: 3em;
}
.detail h3 { margin: 0; font-size: 20px; }
.detail p { margin: 4px 0 0; max-width: 40em; }

/* ---------- log ---------- */
.log { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.log li { display: grid; grid-template-columns: 5.5em 7em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--grid-strong); }
.log li.empty { display: block; }
.log .ln { font-weight: 800; }
.log .ln span { display: block; font-weight: 400; color: var(--ink-soft); }
.log .ls { font-weight: 800; }
.log .ls span { display: block; font-weight: 400; font-size: 14px; color: var(--ink-soft); }
.log .ls.ship { color: var(--ship); } .log .ls.reset { color: var(--reset); }
.log .ls.debatable { color: var(--meh); } .log .ls.lie { color: var(--needle); }
.log p { margin: 0; }
.log p span { display: block; }
.log a { font-size: 14px; color: var(--ink-soft); }

/* ---------- footer ---------- */
.share {
  display: block; margin-top: 40px; padding: 18px 22px; text-align: center;
  background: var(--ship); color: var(--paper); text-decoration: none;
  border: 3px solid var(--ship);
  font-stretch: 125%; font-weight: 900; font-size: clamp(18px, 3.4vw, 26px);
}
.share-top { margin-top: 14px; }
.share span { display: inline-block; transition: transform .15s; }
.share:hover { background: var(--needle); border-color: var(--needle); }
.share:hover span { transform: translateX(6px); }
footer { margin-top: 40px; font-size: 14px; color: var(--ink-soft); max-width: 40em; }

@media (max-width: 640px) {
  .tally { grid-template-columns: repeat(2, 1fr); }
  .tally div:nth-child(3) { border-left: 0; }
  .tally div:nth-child(n+3) { border-top: 2px solid var(--ink); }
  .cal { gap: 3px; }
  .day { min-height: 58px; padding: 4px; }
  .day .d, .day .g small { display: none; }
  .day .g { font-size: 17px; }
  .log li { grid-template-columns: 4.5em 1fr; }
  .log li p { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .bar i, .share span { transition: none; }
}
