:root {
  --bg: #161410;
  --panel: #221c16;
  --ink: #f3eadc;
  --muted: #9a8f7e;
  --line: #3a3228;
  --up: #c6e07a;
  --down: #e07a6a;
  --ok: #7aad7a;
  --bad: #c46a5a;
  --accent: #e2b15a;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}
body { max-width: 1100px; margin: 0 auto; padding: 28px 20px 64px; }
.top { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.eyebrow { margin: 0; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
h1 { margin: 4px 0 0; font-size: 32px; font-weight: 600; }
h2 { font-size: 18px; margin: 28px 0 10px; }
.today, .muted, .disclaimer, .asof, .chart-cap { color: var(--muted); }
.tabs { display: flex; gap: 8px; margin: 22px 0 14px; }
.tabs a, .filters a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tabs a.on, .filters a.on { background: var(--panel); border-color: var(--accent); }
.fresh { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line); }
.pill.ok { color: var(--ok); }
.pill.bad { color: var(--bad); }
.fresh a.pill { text-decoration: none; }
.upload {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 22px 0 0;
}
.stale { color: var(--down); }
.upload h2 { margin: 0 0 10px; }
.upload-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upload-form input[type="file"] { color: var(--ink); max-width: 100%; }
.notice {
  margin: 0 0 10px;
  color: var(--ok);
}
.notice.bad { color: var(--down); }
.warn {
  background: #3a221c;
  border: 1px solid var(--bad);
  color: var(--down);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.warn p { margin: 0 0 6px; }
.warn p:last-child { margin: 0; }
.hero, .periods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.hero > div, .periods article {
  background: var(--panel);
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.label { margin: 0; color: var(--muted); font-size: 13px; }
.nav { font-size: 28px; margin: 6px 0 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero p, .periods p { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.disclaimer { font-size: 13px; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
.orig-ccy { margin: 4px 0 0; font-size: 12px; color: var(--muted); font-weight: 400; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.empty { color: var(--muted); }
.chart { width: 100%; height: 180px; color: var(--accent); background: var(--panel); border-radius: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters + .filters { margin-top: 8px; }
.hint { font-size: 13px; margin-top: 14px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.account-cell { min-width: 12em; }
.account-edit { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.account-name {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}
.account-name:hover { color: var(--accent); text-decoration-color: var(--accent); }
.account-rename {
  display: none;
  margin: 0;
  padding: 2px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  line-height: 0;
  border-radius: 4px;
}
.account-rename:hover,
.account-rename:focus-visible { color: var(--accent); }
.account-input {
  background: var(--panel);
  border: 1px solid var(--accent);
  color: var(--ink);
  font: inherit;
  padding: 3px 8px;
  border-radius: 6px;
  min-width: 12em;
  max-width: 18em;
}
.account-save {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
}
.upload-submit {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 12px;
  cursor: pointer;
}
.account-extra { margin-left: 6px; }
html.js .account-input,
html.js .account-save { display: none; }
html.js .account-rename { display: inline-flex; align-items: center; }
html.js .account-cell.editing .account-input { display: inline-block; }
html.js .account-cell.editing .account-save { display: inline-flex; }
html.js .account-cell.editing .account-name,
html.js .account-cell.editing .account-extra,
html.js .account-cell.editing .account-rename { display: none; }
@media (max-width: 700px) {
  table { font-size: 13px; }
  h1 { font-size: 26px; }
}
