/* Chess.com Ladder — a quiet, laboratory-label aesthetic.
   Cream paper, ink black, hairline rules, typewriter labels, wide spacing. */

/* Self-hosted fonts (downloaded from Google Fonts, OFL) — the preview does not load external font links. */
@font-face { font-family: 'Courier Prime'; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/CourierPrime-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Courier Prime'; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/CourierPrime-700-italic.woff2") format("woff2"); }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/CourierPrime-400.woff2") format("woff2"); }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/CourierPrime-700.woff2") format("woff2"); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Inter-400.woff2") format("woff2"); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter-500.woff2") format("woff2"); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter-600.woff2") format("woff2"); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Inter-700.woff2") format("woff2"); }
@font-face { font-family: 'Nunito'; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/Nunito-700-italic.woff2") format("woff2"); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Nunito-700.woff2") format("woff2"); }

:root {
  --paper: #f4f0e6;
  --paper-deep: #ece7da;
  --ink: #211e1a;
  --muted: #8b8474;
  --line: #d9d2bf;
  --line-dark: #b9b09a;
  --card: #faf8f2;
  --mono: "Courier Prime", "Courier New", Courier, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- header / nav ---------- */

.site-head {
  border-bottom: 1px solid var(--ink);
  padding: 1.6rem 1rem 1.2rem;
  text-align: center;
}
.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .42em;
  text-transform: uppercase;
  font-size: 1.05rem;
  margin: 0;
  padding-left: .42em; /* optical balance for letterspacing */
}
.wordmark a { color: var(--ink); text-decoration: none; }
.head-sub {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: .45rem 0 0;
}
nav.main {
  display: flex;
  justify-content: center;
  gap: 2.4rem;
  margin-top: 1.1rem;
}
nav.main a {
  font-family: var(--mono);
  font-size: .85rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: .2rem;
}
nav.main a:hover { border-bottom: 1px solid var(--ink); }
nav.main a.here { border-bottom: 1px solid var(--ink); }

/* ---------- layout ---------- */

main { max-width: 880px; margin: 0 auto; padding: 2.6rem 1.2rem 3.5rem; }

.page-kicker {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0 0 .8rem;
}
h1.page-title {
  text-align: center;
  font-weight: 400;
  font-size: 2.1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.rule { border: none; border-top: 1px solid var(--line-dark); margin: 1.6rem auto; max-width: 120px; }
.rule.wide { max-width: none; border-color: var(--line); }

/* ---------- the label (Le Labo-style specimen card) ---------- */

.label-card {
  background: var(--card);
  border: 1px solid var(--ink);
  padding: 2rem 2.2rem;
  margin: 0 auto;
  max-width: 640px;
}
.label-card .label-no {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: .7rem;
  margin-bottom: 1.2rem;
}
.label-card h2 {
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: .06em;
  margin: 0 0 .9rem;
}
.label-card p { margin: 0 0 1rem; }
.typed { font-family: var(--mono); font-size: .95rem; }

.spec {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: .85rem;
}
.spec td {
  border-top: 1px solid var(--line);
  padding: .45rem 0;
  vertical-align: top;
}
.spec td:first-child {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  width: 38%;
  padding-right: 1rem;
}

.btn {
  display: inline-block;
  margin-top: 1.6rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  padding: .65rem 1.6rem;
  font-family: var(--mono);
  font-size: .85rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.center { text-align: center; }

.view-note { font-family: var(--mono); font-size: .82rem; letter-spacing: .06em; color: var(--muted); }

/* ---------- commemorating (homepage) ---------- */

.commem { max-width: 640px; margin: 2.6rem auto 0; }

.commem-title { font-family: var(--mono); font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin: 0 0 .7rem; }

.commem-card { background: var(--card); border: 1px solid var(--line-dark); padding: 1.5rem 1.7rem; }

.commem-card p { margin: 0 0 1rem; }

.commem-list { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: .92rem; }

.commem-list li { display: flex; gap: .9rem; align-items: baseline; padding: .32rem 0; border-top: 1px solid var(--line); }

.commem-list li:first-child { border-top: none; }

.commem-list a { color: var(--ink); font-weight: 700; text-decoration: none; }

.commem-list a:hover { text-decoration: underline; }

.vet-name { font-weight: 700; background: linear-gradient(95deg, #14532D 0%, #1B9E57 48%, #5C7A35 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

.vet-id { color: var(--muted); min-width: 5.4em; }

.vet-date { margin-left: auto; color: var(--muted); }

/* ---------- prose sections ---------- */

.prose { max-width: 640px; margin: 0 auto; }
.prose h3 {
  font-size: .95rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 2.2rem 0 .7rem;
}
.prose p { margin: 0 0 .9rem; }

/* ---------- legend ---------- */

.legend-grid { font-size: .92rem; }
.legend-group {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: .3rem 1.6rem;
  padding: .6rem 0;
  border-top: 1px solid var(--line);
}
.legend-group:first-child { border-top: none; padding-top: .1rem; }
.legend-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem 1.2rem;
}
@media (max-width: 700px) {
  .legend-group { grid-template-columns: 1fr; }
  .legend-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.legend-cat {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0;
  padding-top: .15rem;
}
.note { font-size: .88rem; color: var(--muted); }

/* ---------- controls ---------- */

.controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.controls input[type="search"], .controls select {
  padding: .55rem .65rem;
  font-family: var(--mono);
  font-size: .9rem;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--card);
  color: var(--ink);
}
.controls input[type="search"] { flex: 1 1 220px; }
.controls input[type="search"], .controls select { min-width: 0; max-width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.chip {
  border: 1px solid var(--line-dark);
  background: transparent;
  border-radius: 0;
  padding: .3rem .8rem;
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .06em;
  cursor: pointer;
  color: var(--ink);
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.panel {
  border: 1px solid var(--line-dark);
  background: var(--card);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.4rem;
}
.panel.flat { padding: .4rem .8rem; }

/* ---------- data table ---------- */

table.data { width: 100%; min-width: 880px; border-collapse: collapse; font-size: .93rem; }
.table-scroll { overflow: auto; -webkit-overflow-scrolling: touch; max-height: calc(100vh - 2rem); }
table.data th, table.data td {
  text-align: left;
  padding: .5rem .55rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data th {
  font-family: var(--mono);
  font-weight: 400;
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
}
table.data thead th { position: sticky; top: 0; background: var(--card); z-index: 3; }
/* The table scrolls inside its own region within the card (the card stays
   intact at any width), and the headers pin to the top of that region. */
table.data tbody tr td { transition: background-color .9s ease; }
table.data tbody tr:hover td:not(.group-label) { background-color: rgba(33, 30, 26, .09); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: .88rem; }
a.user { color: var(--ink); font-weight: 700; text-decoration: none; }
.user { font-family: "Nunito", var(--sans); letter-spacing: 0; font-weight: 700; }
a.user:hover { text-decoration: underline; }
/* Closed accounts: one solid rule across the whole row instead of struck text (Emma, 10 Nov 2026).
   Painted once on the row itself: per-cell segments rendered unevenly (some thick, some thin). */
tr.closed-row td { position: relative; }
tr.closed-row td::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.6px; transform: translateY(-50%); background: rgba(33, 30, 26, 1); pointer-events: none; }
.closed-tag { color: var(--muted); font-size: .85rem; }
.tags { font-size: 1.02rem; line-height: 1.9; }
.group-label {
  background: var(--paper-deep);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.empty { text-align: center; color: var(--muted); padding: 2rem 0; font-family: var(--mono); }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 1.6rem 1rem 2.2rem;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .label-card { padding: 1.4rem 1.2rem; }
  h1.page-title { font-size: 1.6rem; }
  nav.main { gap: 1.4rem; }
  .controls input[type="search"], .controls select { flex: 1 1 100%; }
}

/* perks list on the tier cards */
.perks { list-style: none; margin: 0; padding: 0; }
.perks li { position: relative; padding: .18rem 0 .18rem 1.2rem; }
.perks li::before { content: "—"; position: absolute; left: 0; }
.perks li.ph { color: var(--muted); }
/* Coloured usernames (Emma, 10 Nov 2026: text colour instead of a highlight wash).
   The colour comes from the account's leftmost eligible flare (legend order);
   the Veteran green overrides everything. Palette: vibrant marker hues. */
.hl.hl-titled     { color: #e91e63; }
.hl.hl-coach      { color: #e67300; }
.hl.hl-topblogger { color: #0bf9ea; }
.hl.hl-premium    { color: #2b6ff2; }
.hl.hl-veteran    { color: #1b9e57; }

/* Gradient experiment (staging): usernames and legend labels take a slight
   gradient in their colour — a deep shade, the flat colour at the middle,
   a muted tone. The classes sit on the name element itself (a.user /
   .hidden-name) and on the legend label span (.leg-name). */

.user.hl, .hidden-name.hl, .hl .leg-name { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

.user.hl-titled, .hidden-name.hl-titled, .hl-titled .leg-name     { background-image: linear-gradient(95deg, #7a0c32 0%, #e91e63 48%, #9e4a63 100%); }

.user.hl-coach, .hidden-name.hl-coach, .hl-coach .leg-name        { background-image: linear-gradient(95deg, #7c3600 0%, #e67300 48%, #9a7b2d 100%); }

.user.hl-topblogger, .hidden-name.hl-topblogger, .hl-topblogger .leg-name { background-image: linear-gradient(95deg, #045d56 0%, #0bf9ea 48%, #4e937a 100%); }

.user.hl-premium, .hidden-name.hl-premium, .hl-premium .leg-name    { background-image: linear-gradient(95deg, #0a2a6e 0%, #2b6ff2 48%, #55628f 100%); }

.user.hl-veteran, .hidden-name.hl-veteran    { background-image: linear-gradient(95deg, #14532d 0%, #1b9e57 48%, #5c7a35 100%); }

/* group jump links above the table (ladder order, all groups only) */
.jump { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; align-items: baseline; margin: 0 0 1rem; font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; }
.jump[hidden] { display: none; }
.jump-label { color: var(--muted); text-transform: uppercase; }
.jump a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-dark); padding-bottom: 1px; }
.jump a:hover { border-bottom-color: var(--ink); }
tr[data-group] { scroll-margin-top: 3rem; }

/* learn-more buttons on the tier cards */
.more-btn {
  display: inline-block; margin-top: 1.3rem;
  font-family: var(--typed); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--ink); padding: .55rem 1.15rem;
}
.more-btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* donor card: smaller and more basic than the tier cards */
.label-card.mini { padding: 1.5rem 1.7rem 1.7rem; }
.label-card.mini h2 { font-size: 1.45rem; margin-bottom: .5rem; }

/* each flare sits in a fixed-width slot so the column aligns */
.fl { display: inline-block; width: 1.6em; text-align: center; }
/* the sacrilege heading keeps the brand's lowercase */
.legend-cat.keep-case { text-transform: none; }

/* titled rank before the username: courier, regular weight, like the ID */
.title-tag { font-family: var(--mono); font-weight: 400; font-size: .92rem; }

/* hidden username (perk): asterisks in place of the name, no link */
.hidden-name { font-weight: 600; font-family: var(--mono); letter-spacing: .12em; }
/* custom bio (perk): a courier line under the username, row stands taller */
.bio-line { font-family: var(--mono); font-size: .85rem; margin-top: .4rem; white-space: normal; }
tr.has-bio td { padding-top: 1.15rem; padding-bottom: 1.15rem; }

/* invert toggle under the chips */
.invert-toggle {
  display: inline-flex; align-items: center; gap: .55rem; margin-top: .75rem;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .08em;
  color: var(--muted); cursor: pointer; user-select: none;
}
.invert-toggle input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 14px; height: 14px; margin: 0; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; border-radius: 0;
}
.invert-toggle input:checked { background: var(--ink); box-shadow: inset 0 0 0 2.5px var(--paper); }
.invert-toggle:has(input:checked) { color: var(--ink); }

.spec a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.export-line { margin-top: .7rem; }
.export-line a { font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* the Visionary +: bold, with a soft gold halo */
.vis-plus { font-weight: 800; text-shadow: 0 0 6px rgba(201, 150, 30, .75), 0 0 2px rgba(201, 150, 30, .6); }

.note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Learn more popup (Tiers page) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(24, 21, 14, .55);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative; background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink); width: 100%; max-width: 430px;
  padding: 2rem 2rem 1.7rem; box-shadow: 0 18px 50px rgba(24, 21, 14, .35);
}
.modal-name { font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; font-size: .95rem; margin: 0 0 .3rem; }
.modal-sub { font-size: 1.7rem; font-weight: 700; margin: 0 0 .9rem; }
.modal-desc { color: var(--muted); line-height: 1.55; margin: 0; }
.modal-close {
  position: absolute; top: .35rem; right: .8rem; padding: .2rem;
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 1.3rem; color: var(--muted);
}
.modal-close:hover { color: var(--ink); }

.modal { max-width: 480px; }
.modal-desc p { margin: 0 0 .8rem; }
.modal-desc p:last-child { margin-bottom: 0; }
.modal-desc code, .prose code {
  font-family: var(--mono); font-size: .92em;
  background: rgba(24, 21, 14, .08); padding: .05em .35em;
}
.modal-desc a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.modal .buy-now { margin-top: 1.2rem; }

.version { font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; color: var(--muted); margin: .35rem 0 0; text-align: center; }

.it { font-style: italic; }
tr.it td.tags { font-style: normal; }
.proc { font-style: normal; }

.patterns { font-family: var(--mono); font-size: .92em; }
