:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #5e584f;
  --line: #e4d8c8;
  --paper: #f6f1e8;
  --card: #fffdf8;
  --accent: #9a3412;
  --accent-ink: #fff7ed;
  --warn: #7c2d12;
  --warn-bg: #fff1e6;
  --stale: #8a5a12;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, #f3e1cc 0%, transparent 55%),
    var(--paper);
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-end;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.55rem 0.75rem 0.35rem;
}

h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.eyebrow, .lede, #status, .swipe, .asof, .tag {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
  color: var(--accent);
}

.lede, #status {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 12rem;
}

.baseline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  color: var(--muted);
}

.baseline div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.baseline button {
  background: transparent;
  color: var(--accent);
  border: 1px solid #e7cbb8;
  padding: 0.18rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
}

.baseline button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

button {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 0.78rem/1 "Avenir Next", "Segoe UI", sans-serif;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

#live {
  background: transparent;
  color: var(--accent);
  border: 1px solid #e7cbb8;
}

#live[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

body.live table {
  min-width: 28rem;
}

td.flash .price {
  color: var(--accent);
}

.notices {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 0.75rem 0.3rem;
  display: grid;
  gap: 0.3rem;
}

.notice {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid #f0c7ad;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

.notice strong { font-weight: 650; }

.notice.live-note {
  background: #f3eee4;
  color: var(--ink);
  border-color: var(--line);
}

.scrubber {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 0.75rem 0.35rem;
}

.scrubber-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scrubber button {
  background: transparent;
  color: var(--accent);
  border: 1px solid #e7cbb8;
  padding: 0.22rem 0.5rem;
  font-size: 0.75rem;
}

.scrubber input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

#when-label {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.75rem;
}

th:not(:first-child) {
  min-width: 6.4rem;
}

.swipe {
  display: none;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 0.75rem 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.table-wrap {
  max-width: 1440px;
  margin: 0 auto 0;
  padding: 0 0.75rem;
  overflow-x: auto;
}

.fine-print {
  max-width: 1440px;
  margin: 0.25rem auto 0.8rem;
  padding: 0 0.75rem;
  color: #8a847c;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  min-width: 1200px;
  box-shadow: 0 16px 40px rgba(70, 42, 16, 0.06);
}

caption.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

th, td {
  text-align: left;
  padding: 0.22rem 0.38rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.2;
}

th {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #fbf7f1;
  position: sticky;
  top: 0;
}

th:first-child, td:first-child {
  position: sticky;
  left: 0;
  background: var(--card);
  min-width: 10.5rem;
  z-index: 1;
}

th:first-child { z-index: 2; background: #fbf7f1; }

th button.sort {
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: inherit;
  cursor: pointer;
}

th button.sort:hover,
th button.sort:focus-visible {
  color: var(--ink);
}

.name { margin: 0; font-weight: 600; font-size: 0.8rem; }

.meta {
  margin: 0;
  color: var(--muted);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.64rem;
}

.price {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

td.other-session {
  background: #eceae4;
  color: #9a948a;
}

td.other-session .price,
td.other-session .delta,
td.other-session .asof,
td.other-session .tag {
  color: #9a948a;
}

.delta {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
}

.delta.up,
.delta.down { color: #b42318; }
.delta.flat { color: var(--muted); }

.progress {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 0.75rem 0.3rem;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.72rem;
}

.progress li { color: var(--muted); }
.progress .ok { color: var(--ink); }
.progress .error { color: var(--warn); }

tfoot th, tfoot td {
  background: #fbf7f1;
  border-bottom: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

tfoot th:first-child, tfoot td:first-child { background: #fbf7f1; }

tr.fact th,
tr.fact td {
  background: var(--card);
  border-bottom: 0;
  color: #8a847c;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding-top: 0.16rem;
  padding-bottom: 0.16rem;
}

tr.fact th:first-child,
tr.fact td:first-child {
  background: var(--card);
  font-weight: 400;
}

.asof, .tag {
  display: block;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.15;
}

.tag { color: var(--stale); }

@media (max-width: 720px) {
  .top { flex-direction: column; align-items: stretch; }
  .swipe { display: block; }
  th:first-child, td:first-child { min-width: 8.5rem; }
}
