/*
 * Plain on purpose: a normal box, a big button, a big Yes or No. Nothing to figure out.
 */
:root {
  --ink: #111111;
  --quiet: #444444;
  --line: #555555;
  --marker: #ffe500;
  --yes: #166534;
  --no: #b91c1c;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 3.8vw, 48px);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: #ffffff; color: var(--ink);
  font: 400 18px/1.45 Arial, Helvetica, sans-serif;
}
a, button.link { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover, button.link:hover { color: var(--quiet); }
:focus-visible, .button-outline:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.bar, main, footer { width: 100%; padding-inline: var(--gutter); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 26px; font-size: 17px; }
.brand { font-size: 24px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.mark { background: var(--marker); padding: 0 4px; }
main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 32px; }
footer { padding-block: 0 22px; font-size: 14px; color: var(--quiet); }
footer p { margin: 0; }
footer a { color: inherit; }

h1 { margin: 0; font-size: clamp(34px, 4.1vw, 52px); line-height: 1.1; font-weight: 700; }
h2 { margin: 0; font-size: clamp(22px, 2.5vw, 32px); line-height: 1.15; font-weight: 700; }

input, button { font: inherit; color: inherit; }
input { background: #ffffff; border: 2px solid var(--line); border-radius: 8px; padding: 0 14px; width: 100%; min-width: 0; }
input:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 0; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 8px; background: var(--ink); color: #ffffff; font-weight: 700; cursor: pointer; min-height: 48px;
}
button:disabled { opacity: 0.55; cursor: progress; }
button.link { background: none; padding: 0; min-height: 0; font-weight: 400; display: inline; color: var(--ink); }

/* ---- asking ---- */
.ask { width: 100%; max-width: 800px; margin-inline: auto; }
.ask label { display: block; margin-top: 34px; font-size: 20px; font-weight: 700; }
.line { display: flex; gap: 12px; margin-top: 10px; }
.line input { flex: 1; height: 72px; font-size: 30px; font-weight: 700; text-transform: uppercase; }
.line button { width: 180px; height: 72px; font-size: 26px; flex: none; }
.hint { margin: 10px 0 0; color: var(--quiet); }
.message { margin: 18px 0 0; font-weight: 700; }
.list-status { margin: 24px 0 0; }
.list-status:empty { display: none; }
.list-status.stale { font-weight: 700; }

/* ---- the answer ---- */
.result {
  width: 100%; max-width: 1080px; margin-inline: auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; align-items: start;
  grid-template-areas: "answer action" "file file";
}
.answer-side { grid-area: answer; }
.action-side { grid-area: action; }
.file-frame { grid-area: file; min-width: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
.frame-title {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; margin: 0; padding: 8px 14px;
  background: #f1f1f1; border-bottom: 2px solid var(--line); font-size: 15px; font-weight: 700;
}
.frame-title a { font-weight: 400; }
.frame-body {
  position: relative; margin: 0; height: 208px; overflow: auto; padding: 8px 14px;
  font: 400 14px/1.6 var(--mono); tab-size: 4; white-space: pre; background: #ffffff;
}
.frame-body mark { display: inline-block; min-width: 100%; background: var(--marker); color: var(--ink); font-weight: 700; }
.checking { width: 100%; max-width: 800px; margin: 16px auto 0; font-size: 20px; font-weight: 700; }
.answer:focus { outline: none; }
.answer { border-radius: 8px; padding: 32px; color: #ffffff; }
.answer.yes { background: var(--yes); }
.answer.no { background: var(--no); }
.answer.disagrees { background: var(--ink); }
.answer-word { margin: 0; display: flex; align-items: center; gap: 16px; font-size: clamp(56px, 7vw, 88px); line-height: 1; font-weight: 700; }
.answer-word .icon { stroke-width: 3; width: 0.85em; height: 0.85em; }
.answer-line { margin: 16px 0 0; font-size: clamp(20px, 2.1vw, 26px); line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.notice { margin: 16px 0 0; font-weight: 700; }
.detail { margin: 16px 0 0; }
.again { margin: 12px 0 0; }

.action-side > * + * { margin-top: 18px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pair label { font-size: 17px; font-weight: 700; }
.pair input { display: block; height: 54px; margin-top: 6px; font-weight: 400; }
.record { display: grid; gap: 14px; }
.company { font-size: 17px; font-weight: 700; }
.company input { display: block; height: 54px; margin-top: 6px; font-weight: 400; }
.button-outline {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 8px 14px; text-align: center;
  border: 2px solid var(--ink); border-radius: 8px; background: #ffffff; font-weight: 700; cursor: pointer;
}
.button-outline:hover, .button-outline.over { background: var(--marker); }
#download { min-height: 72px; font-size: 24px; padding: 8px 16px; }
#download.secondary { background: #ffffff; color: var(--ink); border: 2px solid var(--ink); min-height: 64px; font-size: 20px; }

.retry { display: grid; gap: 12px; }
.retry label { font-size: clamp(22px, 2.5vw, 32px); line-height: 1.15; font-weight: 700; }
.retry input { height: 72px; font-size: 30px; font-weight: 700; text-transform: uppercase; }
.retry button { min-height: 72px; font-size: 24px; }
.retry + .record { margin-top: 28px; }

.files { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.files:empty { display: none; }
.files li { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #dddddd; }
.files .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .size { color: var(--quiet); font-size: 15px; }
.files button { background: none; color: var(--ink); padding: 0; min-width: 44px; min-height: 44px; }
.status { margin: 0; font-size: 16px; }
.status:empty { display: none; }
.fine { font-size: 16px; color: var(--quiet); margin-bottom: 0; }
.older { width: 100%; max-width: 1080px; margin: 26px auto 0; font-weight: 700; font-size: 16px; }
.older button { font-weight: 400; margin-left: 4px; }
body.checked #older-words { display: none; }
body.checked main { justify-content: flex-start; padding-top: 40px; }
.letter-title { margin: 0; padding-top: 18px; border-top: 1px solid #dddddd; font-weight: 700; }
body:not(.checked) .older { max-width: 800px; }

.terms { max-width: 720px; }
.terms h2 { font-size: 19px; margin: 22px 0 0; }
.terms p { margin: 6px 0 0; }
.terms .fine { margin-top: 24px; }

/* ---- past lists, usage, confirming a record ---- */
.page { justify-content: flex-start; }
.page-title { font-size: clamp(34px, 4.1vw, 52px); }
.lede { margin: 12px 0 0; max-width: 62ch; }
.small-lede { font-size: 16px; color: var(--quiet); }
.archive { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: 16px; }
.archive th { text-align: left; font-size: 14px; font-weight: 700; padding: 6px 16px 6px 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.archive td { padding: 10px 16px 10px 0; border-bottom: 1px solid #dddddd; white-space: nowrap; }
.archive .num-col { text-align: right; font-variant-numeric: tabular-nums; }
.archive .hash { font: 400 12px var(--mono); color: var(--quiet); }
.archive th.hash { font: 700 14px Arial, Helvetica, sans-serif; color: var(--ink); }
.archive .links { text-align: right; padding-right: 0; }
.archive .links a + a { margin-left: 14px; }
.archive .note { display: block; font-size: 13px; color: var(--quiet); white-space: normal; }
.archive .toggle { display: none; }
.archive .detail-row { display: none; }
.archive .detail-row code { font: 400 12px var(--mono); overflow-wrap: anywhere; }

.verify { width: 100%; max-width: 860px; margin-inline: auto; }
.verify-note { margin: 12px 0 0; max-width: 62ch; }
.today { margin: 16px 0 0; font-weight: 700; }
.today.disagrees { background: var(--marker); width: fit-content; padding: 2px 8px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 20px; margin: 20px 0 0; }
.facts dt { color: var(--quiet); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts code { font: 400 14px var(--mono); }
.typed-title { font-size: 17px; margin: 24px 0 0; padding-top: 16px; border-top: 2px solid var(--ink); }
#typed .facts { margin-top: 8px; }
.message.alone { font-size: 22px; max-width: 800px; margin-inline: auto; width: 100%; }

.stats-sign-in { margin-top: 24px; max-width: 360px; display: grid; gap: 8px; }
.stats-sign-in input { height: 52px; }
.stat-totals { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 26px 0 0; }
.stat-totals div { display: flex; flex-direction: column-reverse; }
.stat-totals dd { margin: 0; font-size: clamp(36px, 5vw, 56px); font-weight: 700; line-height: 1; }
.stat-totals dt { font-size: 15px; color: var(--quiet); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .bar { padding-top: 18px; font-size: 15px; }
  .brand { font-size: 20px; }
  main { justify-content: flex-start; padding-block: 28px 24px; }
  footer { font-size: 13px; }

  /* The box gets the full width, then the example, then a full-width Check. */
  .ask { display: flex; flex-direction: column; }
  .ask label { margin-top: 28px; font-size: 17px; }
  .line { display: contents; }
  .line input { order: 1; flex: none; height: 60px; margin-top: 8px; font-size: 24px; }
  .hint { order: 2; margin-top: 8px; }
  .line button { order: 3; width: 100%; height: 60px; margin-top: 18px; font-size: 22px; }
  .message { order: 4; }
  .list-status { order: 5; margin-top: 20px; }

  body.checked main { padding-top: 20px; }
  .result { grid-template-columns: minmax(0, 1fr); gap: 18px; grid-template-areas: "answer" "file" "action"; }
  .frame-title { font-size: 14px; padding: 6px 10px; }
  .frame-body { height: 176px; padding: 6px 10px; font-size: 11px; tab-size: 2; }
  .answer { padding: 20px; }
  .answer-word { font-size: 56px; gap: 12px; }
  .answer-line { font-size: 20px; margin-top: 12px; }
  .action-side > * + * { margin-top: 12px; }
  .pair { gap: 10px; }
  .pair label, .company { font-size: 15px; }
  .company input { height: 46px; margin-top: 4px; }
  .pair input { height: 46px; margin-top: 4px; }
  .button-outline { min-height: 56px; }
  #download { min-height: 60px; font-size: 20px; }
  #download.secondary { min-height: 56px; font-size: 18px; }
  .retry label { font-size: 20px; }
  .retry input { height: 60px; font-size: 24px; }
  .retry button { min-height: 60px; font-size: 22px; }
  .retry + .record { margin-top: 18px; }
  .fine { font-size: 14px; }

  .archive .hash, .archive .file-date, .archive .links a + a { display: none; }
  .archive .copy { cursor: pointer; }
  .archive .copy .note { display: none; }
  .archive td:first-child { white-space: normal; }
  .archive td, .archive th { padding-right: 8px; }
  .scroll-table { overflow-x: auto; }
  .archive .toggle { display: inline-flex; background: none; color: var(--ink); padding: 0; min-width: 44px; min-height: 44px; vertical-align: middle; }
  .archive .copy.open .toggle .icon { transform: rotate(180deg); }
  .archive .detail-row:not([hidden]) { display: table-row; }
  .archive .detail-row td { white-space: normal; font-size: 14px; color: var(--quiet); }
  .archive td { padding-block: 6px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dt { margin-top: 10px; font-size: 14px; }
}
