:root {
  --paper: #f4f5f7;
  --ink: #1a1c1e;
  --muted: #3c4250;
  --ticket: #ffd60a;
  --ticket-bad: #ffc9c4;
  --line: #c5c9d1;
  --pad: clamp(1.25rem, 5vw, 6rem);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Literata", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.55;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 2;
}

.skip:focus { top: 1rem; }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem var(--pad) 1rem;
  border-bottom: 1px solid var(--ink);
}

.mark {
  font-family: "Darker Grotesque", sans-serif;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

nav a {
  color: var(--ink);
  font-family: "Darker Grotesque", sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

nav a:hover { text-decoration: underline; }

main {
  padding: 2.25rem var(--pad) 2rem;
}

h1 {
  font-family: "Literata", Georgia, serif;
  font-weight: 650;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0 0 1rem;
  max-width: 10em;
  scroll-margin-top: 1rem;
}

.lede,
form.check,
.facts,
.notes,
.out,
.alert,
.try,
.error,
footer p,
td,
th,
summary + p {
  max-width: 40rem;
}

.lede { margin: 0 0 2rem; }

.ticket {
  background: var(--ticket);
  margin: 0 calc(-1 * var(--pad)) 1.5rem;
  padding: 1.6rem var(--pad) 1.4rem;
  animation: rise 220ms ease-out;
}

.ticket.is-bad { background: var(--ticket-bad); }

.kicker,
.detail,
.token-line {
  margin: 0;
  max-width: 36rem;
}

.figure {
  font-family: "Darker Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(4.75rem, 16vw, 8rem);
  line-height: 0.8;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  margin: 0.35rem 0 0.7rem;
  overflow-wrap: anywhere;
}

.kicker { overflow-wrap: anywhere; }

.facts {
  margin: 0.25rem 0 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.facts dt { margin: 0; }

.facts dd {
  margin: 0;
  font-family: "Darker Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.notes {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
}

.notes li { margin: 0 0 0.75rem; }

.out,
.try {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.out { margin: 1rem 0 1.25rem; }

main a { color: inherit; }

.alert { margin: 0 0 2rem; }

form.check { margin-top: 0.5rem; }

.mode-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 0 0 1.3rem;
}

.modes label {
  font-family: "Darker Grotesque", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  padding: 0.35rem 0 0.2rem;
  cursor: pointer;
}

#mode-buy:checked ~ .modes label[for="mode-buy"],
#mode-hold:checked ~ .modes label[for="mode-hold"] {
  color: var(--ink);
  border-bottom-color: var(--ticket);
}

#mode-buy:focus-visible ~ .modes label[for="mode-buy"],
#mode-hold:focus-visible ~ .modes label[for="mode-hold"] {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.buy-only,
.hold-only { display: none; }

#mode-buy:checked ~ .fields .buy-only,
#mode-hold:checked ~ .fields .hold-only { display: block; }

.field { margin: 0 0 1.15rem; }

.field label,
.hint {
  display: block;
}

.hint {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0.35rem 0 0;
}

.field input {
  width: 100%;
  font: 600 1.65rem/1.15 "Darker Grotesque", sans-serif;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  padding: 0.3rem 0 0.25rem;
}

.field input::placeholder {
  color: #5e6570;
  font-weight: 500;
}

button.do,
.do-link {
  display: inline-block;
  font-family: "Darker Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border: 0;
  border-radius: 0;
  padding: 0.75rem 1rem 0.65rem;
  min-height: 48px;
  cursor: pointer;
  transition: background-color 120ms linear;
}

button.do:hover,
.do-link:hover { background: #000; }

.error {
  color: #8e1b1b;
  margin: 0 0 1rem;
}

table {
  width: 100%;
  max-width: 40rem;
  border-collapse: collapse;
  margin: 0.5rem 0 1.5rem;
}

caption {
  text-align: left;
  margin: 0 0 0.6rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.5rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

th {
  font-family: "Darker Grotesque", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--ticket);
  padding-left: 0.4rem;
}

details {
  max-width: 40rem;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}

summary {
  font-family: "Darker Grotesque", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
}

summary + p { margin: 0.55rem 0 0.2rem; }

footer {
  padding: 0.5rem var(--pad) 3rem;
}

footer p {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  h1 { max-width: none; }
  .facts dd { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ticket { animation: none; }
  button.do,
  .do-link { transition: none; }
}
