/* The first-credit-to-nomination page: a ledger on warm paper. On top of
   formatter-page.css (the base, .wrap, .section, .pitch, .others, .btn).
   Two colours: ink and a fountain-pen blue; the paper carries everything
   else. page.js repeats the hex values for the SVG and the share image.
   See .claude/data-pages-registry.md, "Per page". */

.fc-body {
  --paper: #f4eddd;
  --paper-2: #ebe2cd;
  --paper-3: #e1d6bd;
  --rule: rgba(62, 46, 24, 0.16);
  --rule-2: rgba(62, 46, 24, 0.32);
  --ink: #241e16;
  --ink-2: #5a4f41;
  --ink-3: #8a7e6b;
  --blue: #2f4f8a;
  --blue-wash: rgba(47, 79, 138, 0.12);
  background: var(--paper);
  color: var(--ink);
}
.fc-body ::selection { background: var(--blue); color: #fff; }
.fc { min-width: 0; }
.fc .wrap { max-width: 1120px; }

/* ───────────────────── the head ───────────────────── */
.fc-sheet { padding: 60px 0 56px; }
.fc-head { max-width: 760px; }
.fc-sheet h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.6vw, 68px);
  font-weight: 500; letter-spacing: -0.02em; line-height: 1.02;
  margin: 0; text-wrap: balance;
}
.fc-lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 22px 0 0; max-width: 62ch; }

/* The headline number: a ledger total in Newsreader. */
.fc-figure { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; border-top: 1px solid var(--rule-2); padding-top: 18px; }
.fc-big { margin: 0; font-family: var(--serif); line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.fc-num { font-size: clamp(84px, 11vw, 136px); font-weight: 500; font-variant-numeric: lining-nums; }
.fc-unit { font-size: clamp(30px, 3.6vw, 44px); font-style: italic; font-weight: 400; color: var(--ink-2); margin-left: 4px; }
.fc-big-sub { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 44ch; align-self: center; }
.fc-big-sub b { color: var(--ink); font-weight: 600; }

/* ───────────────────── controls: index tabs and chips ───────────────────── */
.fc-controls { margin-top: 40px; }
.fc-tabs { display: flex; flex-wrap: wrap; gap: 0 2px; border-bottom: 1px solid var(--rule-2); }
.fc-tab {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2);
  background: var(--paper-2); border: 1px solid var(--rule); border-bottom: none;
  border-radius: 6px 6px 0 0; padding: 9px 14px 8px; cursor: pointer;
  margin-bottom: -1px; position: relative; font-variant-numeric: tabular-nums;
}
.fc-tab:hover { color: var(--ink); background: var(--paper-3); }
.fc-tab[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 600; border-color: var(--rule-2); padding-bottom: 9px; z-index: 1; }
.fc-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.fc-tab small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.fc-chiprow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px 0 0; }
.fc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-chip {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2);
  background: transparent; border: 1px solid var(--rule-2); border-radius: 999px;
  padding: 6px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.fc-chip i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-block; }
.fc-chip:hover { color: var(--ink); border-color: var(--ink); }
.fc-chip[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.fc-chip[aria-pressed="true"] i { background: #fff; border-color: #fff; }
.fc-chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.fc-find { display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--ink-2); flex: 0 1 320px; min-width: 200px; }
.fc-find span { white-space: nowrap; }
.fc-find input {
  flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--ink);
  background: transparent; border: none; border-bottom: 1px solid var(--rule-2); padding: 4px 2px;
}
.fc-find input::placeholder { color: var(--ink-3); }
.fc-find input:focus-visible { outline: none; border-bottom: 2px solid var(--blue); }
.fc-find input::-webkit-search-cancel-button { cursor: pointer; }

/* ───────────────────── the ledger ───────────────────── */
.fc-ledger-fig { margin: 22px 0 0; }
.fc-ledger { position: relative; width: 100%; min-height: 360px; cursor: crosshair; }
.fc-ledger:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.fc-ledger svg { display: block; width: 100%; height: auto; }
.fc-key { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--ink-2); }
.fc-key span { display: inline-flex; align-items: center; gap: 8px; }
.fc-key i { display: inline-block; }
.fc-k-strip { width: 26px; height: 3px; background: var(--ink); }
.fc-k-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.fc-k-debut { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--blue); background: var(--paper); }

.fc-read { margin: 22px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 72ch; }
.fc-read b { color: var(--ink); font-weight: 600; }
.fc-found { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 72ch; }
.fc-found[hidden] { display: none; }
.fc-found b { color: var(--ink); font-weight: 600; }
.fc-found button {
  font: inherit; font-size: inherit; color: var(--blue); font-weight: 600; background: none; border: none; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em;
}
.fc-found button:hover, .fc-found button:focus-visible { text-decoration-color: currentColor; outline: none; }

/* ───────────────────── share ───────────────────── */
.fc-share { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.fc-btn {
  display: inline-flex; align-items: center; gap: 9px; font: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--ink); background: transparent; border: 1px solid var(--rule-2); border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
}
.fc-btn:hover { border-color: var(--ink); }
.fc-btn:disabled { opacity: 0.6; cursor: default; }
.fc-btn-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fc-btn-ink:hover { background: var(--blue); border-color: var(--blue); }
.fc-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.fc-reset { color: var(--ink-2); border-style: dashed; }
.fc-reset[hidden] { display: none; }
.fc-share-note { font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; min-height: 20px; }
.fc-share-note svg { color: var(--blue); }

/* ───────────────────── the list ───────────────────── */
.fc-list { margin-top: 28px; border-top: 1px solid var(--rule); padding-top: 14px; }
.fc-list summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink-2); list-style-position: inside; }
.fc-list summary:hover { color: var(--ink); }
.fc-list summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.fc-table-wrap { margin-top: 12px; max-height: 560px; overflow: auto; border: 1px solid var(--rule); border-radius: 4px; }
.fc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fc-table th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--rule-2); background: var(--paper-2); position: sticky; top: 0; }
.fc-table td { padding: 8px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.4; }
.fc-table td small { display: block; color: var(--ink-3); font-size: 12.5px; }
.fc-table .fc-td-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fc-table tr.is-found td { background: var(--blue-wash); }
.fc-table tr.is-unknown td.fc-td-n { color: var(--ink-3); }

/* ───────────────────── the tooltip ───────────────────── */
.fc-tip {
  position: fixed; z-index: 30; max-width: 300px; pointer-events: none;
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink);
  padding: 10px 13px 11px; font-size: 13.5px; line-height: 1.45;
  box-shadow: 3px 3px 0 var(--paper-3);
}
.fc-tip[hidden] { display: none; }
.fc-tip b { display: block; font-size: 15px; font-weight: 600; }
.fc-tip .fc-tip-gap { font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.1; margin: 4px 0 6px; color: var(--blue); }
.fc-tip .fc-tip-gap i { font-size: 15px; color: var(--ink-2); margin-left: 3px; }
.fc-tip span { display: block; color: var(--ink-2); }

/* ───────────────────── the chapters ───────────────────── */
.fc-chapters { padding: 10px 0 40px; }
.fc-ch { padding: 48px 0 10px; border-top: 1px solid var(--rule-2); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 56px; align-items: start; }
.fc-ch-head { grid-column: 1; font-family: var(--serif); font-size: clamp(26px, 2.8vw, 34px); font-weight: 500; letter-spacing: -0.016em; line-height: 1.15; margin: 0; text-wrap: balance; }
.fc-ch-head b { color: var(--blue); font-weight: 500; }
.fc-ch-body { grid-column: 1; font-size: 16px; line-height: 1.65; color: var(--ink-2); margin: 0; max-width: 54ch; }
.fc-ch-chart { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.fc-ch-chart > svg { display: block; width: 100%; height: auto; }
.fc-ch-chart > svg text { font-family: var(--sans); }
.fc-ch-chart > svg [data-tip] { cursor: default; }
.fc-ch-foot { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.fc-ch-foot b { color: var(--ink-2); font-weight: 600; }

/* The long roads: a list of named strips. */
.fc-roads { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.fc-roads li { display: grid; grid-template-columns: minmax(0, 1fr) 54px; align-items: center; gap: 0 12px; }
.fc-roads .fc-road { min-width: 0; padding: 2px 0 4px; }
.fc-roads .fc-road i { display: block; position: relative; margin-top: 5px; margin-right: 6px; height: 4px; background: var(--ink); border-radius: 2px; }
.fc-roads .fc-road i::after { content: ""; position: absolute; right: -6px; top: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.fc-roads .fc-road span { display: block; font-size: 13px; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-roads .fc-road span b { color: var(--ink); font-weight: 600; }
.fc-roads .fc-road span small { color: var(--ink-3); margin-left: 6px; font-size: 12px; }
.fc-roads .fc-years { font-family: var(--serif); font-size: 22px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

/* ───────────────────── about ───────────────────── */
.fc-about { padding-top: 56px; border-top: 1px solid var(--rule-2); }
.fc-about h2 { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 42px); font-weight: 500; letter-spacing: -0.018em; margin: 0; }
.fc-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 56px; margin-top: 6px; }
.fc-about h3 { font-size: 17px; font-weight: 600; margin: 26px 0 0; }
.fc-about p, .fc-about li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.fc-about p { margin: 10px 0 0; max-width: 62ch; }
.fc-about ul { margin: 12px 0 0; padding: 0 0 0 18px; }
.fc-about li { margin: 6px 0 0; }
.fc-about li strong { color: var(--ink); font-weight: 600; }
.fc-about a:not(.btn) { color: var(--blue); font-weight: 600; }
.fc-about a:not(.btn):hover { text-decoration: underline; }
.fc-about p.fc-download { margin-top: 24px; }
.fc-about p.fc-small { font-size: 14px; color: var(--ink-3); }
.fc-about details.fc-licence { margin-top: 30px; }
.fc-about details.fc-licence summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.fc-about details.fc-licence pre {
  margin: 12px 0 0; padding: 16px 18px; background: var(--paper-2); border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--ink-2); overflow: auto; white-space: pre-wrap;
}
.fc-about .fc-tm { margin-top: 26px; max-width: none; }

/* The base's buttons on paper. */
.fc .btn-primary { background: var(--ink); color: var(--paper); }
.fc .btn-primary:hover { background: var(--blue); box-shadow: none; }
.fc .pitch { background: #fbf7ee; border-color: var(--rule); }
.fc .pitch li svg { color: var(--blue); }
.fc .pitch .btn:focus-visible, .fc-about .btn:focus-visible { outline-color: var(--blue); }
.fc .section h2 { font-family: var(--serif); font-weight: 500; }

/* ───────────────────── narrow screens ───────────────────── */
@media (max-width: 900px) {
  .fc-ch { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .fc-ch-chart { grid-column: 1; grid-row: auto; margin-top: 6px; }
  .fc-about-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .fc-sheet { padding: 40px 0 44px; }
  .fc-lede { font-size: 16.5px; }
  .fc-figure { margin-top: 32px; gap: 4px 0; }
  .fc-big-sub { font-size: 15.5px; }
  .fc-controls { margin-top: 30px; }
  .fc-tabs { gap: 0 1px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .fc-tabs::-webkit-scrollbar { display: none; }
  .fc-tab { padding: 8px 10px 7px; font-size: 13px; flex: none; }
  .fc-tab small { display: none; }
  .fc-find { flex-basis: 100%; }
  .fc-ledger { min-height: 300px; cursor: default; }
  .fc-key { font-size: 12.5px; gap: 6px 16px; }
  .fc-read { font-size: 15.5px; }
  .fc-share .fc-btn { flex: 1 1 100%; justify-content: center; }
  .fc-table th:nth-child(2), .fc-table td:nth-child(2) { display: none; }
  .fc-roads li { grid-template-columns: minmax(0, 1fr) 44px; }
  .fc-roads .fc-years { font-size: 19px; }
  .fc-tip { max-width: min(300px, calc(100vw - 32px)); }
}

@media (prefers-reduced-motion: no-preference) {
  .fc-chip, .fc-tab, .fc-btn { transition: background 0.15s, color 0.15s, border-color 0.15s; }
}
