/* rankings.css - tiered "editorial" rankings page (design B) */
:root {
  --rk-ink: #100f0d;
  --rk-muted: #6f6a64;
  --rk-faint: #a8a39c;
  --rk-accent: #fa053f;
  --rk-paper: #f9f4ee;
  --rk-rule: #ddd6cc;
  --rk-mono: "JetBrains Mono", ui-monospace, monospace;
  --rk-serif: "Crimson Pro", Georgia, serif;
  /* tier ramp - muted, brand-anchored */
  --t1: #fa053f;
  --t2: #d2603f;
  --t3: #c2922f;
  --t4: #6f9466;
  --t5: #8d8579;
}

* {
  box-sizing: border-box;
}

body.rk-page {
  margin: 0;
  background: var(--rk-paper);
  color: var(--rk-ink);
  font-family: var(--rk-serif);
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.rk-page .wrap {
  --rk-mast-space: clamp(2.5rem, 6vw, 4.5rem);

  max-width: 940px;
  margin: 0 auto;
  padding: var(--rk-mast-space) clamp(1.25rem, 4vw, 3rem) 4rem;
}

/* masthead */
.rk-page .mast {
  padding-top: 0;
}

.rk-page .mast h1 {
  margin: 0;
  color: var(--rk-accent);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  text-transform: lowercase;
}

.rk-page .mast .lede {
  max-width: 38rem;
  margin: 0;
  color: var(--rk-muted);
  font-size: 1.05rem;
  text-decoration-color: transparent;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition:
    color 140ms ease,
    text-decoration-color 140ms ease;
}

.rk-page .mast .lede[data-mode-switch="true"] {
  cursor: pointer;
}

.rk-page .mast .lede[data-mode-switch="true"]:hover,
.rk-page .mast .lede[data-mode-switch="true"]:focus-visible {
  color: var(--rk-ink);
  outline: none;
  text-decoration-color: color-mix(in oklch, var(--rk-muted), transparent 70%);
}

.rk-page .lede-attribution {
  color: var(--rk-accent);
  font-weight: 600;
}

.rk-page .tabs {
  display: flex;
  gap: 1.6rem;
  margin: var(--rk-mast-space) 0 0;
  font-family: var(--rk-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rk-page .tabs a {
  padding-bottom: 4px;
  color: var(--rk-faint);
  cursor: pointer;
  text-decoration: none;
}

.rk-page .tabs a.on {
  color: var(--rk-ink);
  border-bottom: 1.5px solid var(--rk-accent);
}

.rk-page .tabs a:hover {
  color: var(--rk-ink);
}

.rk-page .status {
  margin: 1rem 0 0;
  color: var(--rk-faint);
  font-family: var(--rk-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.rk-page .status.is-error {
  color: var(--rk-accent);
}

/* cover - fixed 2:3 frame so captions align */
.rk-page .cv {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.rk-page .cv--ph {
  background: var(--tint, #ddd);
}

.rk-page .cv-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.rk-page .cv .ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 8px 9px;
  color: rgba(20, 16, 13, 0.78);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.14;
}

.rk-page .cv .ph::before {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22) 0 7px,
    transparent 7px 14px
  );
  content: "";
  opacity: 0.6;
}

/* tier sections */
.rk-page .ed-sec {
  margin-top: 2.6rem;
}

.rk-page .ed-head {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rk-ink);
}

.rk-page .ed-head .num {
  color: var(--rk-accent);
  font-family: var(--rk-mono);
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
}

.rk-page .ed-head .nm {
  font-size: 1.15rem;
  font-style: italic;
}

.rk-page .ed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 1.4rem 1.1rem;
  align-items: start;
  margin-top: 1.2rem;
}

.rk-page .ed-grid--book-split {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 1.1rem;
  align-items: flex-start;
}

.rk-page .ed-grid--book-split .ed-tile {
  position: relative;
  width: min(112px, 100%);
}

.rk-page .ed-grid--book-split .ed-tile::before {
  position: absolute;
  top: 0;
  left: calc(-0.55rem - 0.5px);
  width: 1px;
  height: 11rem;
  background: transparent;
  content: "";
}

.rk-page .ed-grid--book-split .ed-tile--split-start::before {
  background: var(--rk-ink);
}

.rk-page .ed-cap {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  margin-top: 0.45rem;
}

.rk-page .ed-cap .r {
  color: var(--rk-muted);
  font-family: var(--rk-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.rk-page .ed-cap .tt {
  font-size: 0.92rem;
  line-height: 1.16;
}

.rk-page .ed-tile--future .cv {
  filter: saturate(0.88);
}

.rk-page .ed-cap--future {
  display: block;
}

.rk-page .ed-cap--future .r,
.rk-page .ed-cap--future .tt {
  display: block;
}

.rk-page .ed-cap--future .r {
  margin-bottom: 0.16rem;
  color: var(--rk-accent);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rk-page .old {
  color: var(--rk-accent);
  font-family: var(--rk-mono);
  font-size: 0.72em;
  font-weight: 700;
}

.rk-page .ed-cap .old {
  margin-left: 0.08em;
}

.rk-page .mast .old {
  margin: 0 0.04em;
}

.rk-page .ed-empty {
  margin-top: 2rem;
  color: var(--rk-muted);
  font-style: italic;
}

.rk-page .ed-loading {
  color: var(--rk-faint);
  font-family: var(--rk-mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* bottom notes */
.rk-page .game-note {
  max-width: 42rem;
  margin-top: 3.2rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rk-rule);
  color: var(--rk-muted);
  font-size: 1rem;
  line-height: 1.45;
}

.rk-page .game-note p {
  margin: 0;
}

.rk-page .game-note p + p {
  margin-top: 0.9rem;
}

/* what-next grid */
.rk-page .wn-grid {
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
}

.rk-page .wn-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 1.1rem 0.9rem;
}

.rk-page .wn-cap {
  display: block;
}

.rk-page .wn-meta,
.rk-page .wn-cap .tt {
  display: block;
}

.rk-page .wn-meta {
  margin-bottom: 0.18rem;
}

.rk-page .wn-cap .r {
  color: var(--rk-accent);
}

.rk-page .wn-detail {
  margin-left: 0.36rem;
  color: var(--rk-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.rk-page .wn-cap .tt {
  font-size: 0.95rem;
}

.rk-page .wn-tile--compact .wn-cap .r,
.rk-page .wn-tile--compact .wn-detail {
  font-size: 11px;
}

.rk-page .wn-tile--compact .wn-cap .tt {
  font-size: 0.88rem;
}

/* footer */
.rk-page .foot {
  margin-top: 3.5rem;
  padding-top: 1.3rem;
  color: var(--rk-muted);
  font-size: 0.95rem;
  font-style: italic;
}

.rk-page .foot a {
  color: var(--rk-muted);
}

.rk-page .foot a:hover {
  color: var(--rk-accent);
}
