/* ============================================================
   Round 3B — Animeakie reference (higher fidelity)
   Adds page-level layout helpers + rich poster placeholders.
   No new colors or type tokens — everything reads from system.css.
   ============================================================ */

.sr { /* shorthand body-level system-root */ }

/* ---------- Shell ---------- */
.ak-wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 820px) { .ak-wrap { padding: 0 20px; } }

/* In-page page switcher (replaces the old black ribbon). Floats bottom-LEFT
   so it doesn't collide with the Tweaks switcher bottom-right.
   Compact by default (round chip), expands on hover — never covers content. */
.ak-pageswitch {
  position: fixed; left: 20px; bottom: 20px; z-index: 90;
  background: var(--color-text-primary);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex; align-items: stretch;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  border-radius: 999px;
  overflow: hidden;
  max-width: 44px;
  transition: max-width 280ms cubic-bezier(.4,0,.2,1), box-shadow 200ms;
}
.ak-pageswitch:hover,
.ak-pageswitch:focus-within {
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.24);
}
.ak-pageswitch > * {
  padding: 8px 12px;
  color: inherit;
  text-decoration: none;
  border-right: 1px solid rgba(255,255,255,0.12);
  display: inline-flex; align-items: center;
  white-space: nowrap;
}
.ak-pageswitch > *:last-child { border-right: none; }
.ak-pageswitch .label {
  opacity: 0.95;
  font-weight: 600;
  padding: 8px 14px;
  min-width: 44px;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.ak-pageswitch a:hover { background: rgba(255,255,255,0.08); }
.ak-pageswitch a.active { background: var(--color-accent); color: var(--color-accent-ink); }

/* ---------- Section headings ---------- */
.ak-sec { padding: var(--space-8) 0; }
.ak-sec-head {
  display: flex; align-items: baseline; gap: 20px;
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-text-primary);
  margin-bottom: var(--space-7);
}
.ak-sec-head .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.ak-sec-head h2 {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
}
.ak-sec-head .more {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* ---------- Grids ---------- */
.ak-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.ak-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
.ak-grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; }
.ak-grid-3-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 56px; }
@media (max-width: 1100px) {
  .ak-grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .ak-grid-3, .ak-grid-4 { grid-template-columns: 1fr 1fr; }
  .ak-grid-2-1, .ak-grid-3-2 { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .ak-grid-3, .ak-grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   POSTER PLACEHOLDERS — rich, abstract, color-locked to art
   Each `.poster` is a self-contained composition. Layered
   gradients + small SVG noise. Poster label sits in bottom-left
   like a still-frame watermark.
   ============================================================ */
.poster {
  position: relative;
  overflow: hidden;
  background: #1a1916;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  color: #fff;
}
.poster::after {
  content: attr(data-label);
  position: absolute; left: 12px; bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  z-index: 3;
}
.poster .title-overlay {
  position: absolute; left: 20px; right: 20px; top: 24px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: rgba(255,255,255,0.96);
  text-shadow: 0 1px 20px rgba(0,0,0,0.3);
  z-index: 2;
}

/* Individual poster compositions — named variants */
.poster.p-frieren {
  background:
    radial-gradient(ellipse 60% 50% at 30% 35%, #f0d094 0%, #c09560 25%, transparent 60%),
    radial-gradient(circle at 78% 82%, #6a2e2a 0%, transparent 55%),
    linear-gradient(175deg, #3a3220 0%, #20180f 60%, #0c0804 100%);
}
.poster.p-frieren::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(0,0,0,0.4), transparent 40%),
    repeating-linear-gradient(92deg, transparent 0 80px, rgba(255,220,180,0.03) 80px 81px);
}

.poster.p-vinland {
  background:
    radial-gradient(circle at 20% 80%, #6b4f2a 0%, transparent 55%),
    linear-gradient(165deg, #b8a878 0%, #8a7650 40%, #3a3020 100%);
}
.poster.p-vinland::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(0,0,0,0.35), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 30%);
}

.poster.p-yamada {
  background:
    radial-gradient(ellipse at 60% 40%, #e9d5c2 0%, transparent 60%),
    linear-gradient(180deg, #c88878 0%, #8e5a58 50%, #4a3634 100%);
}
.poster.p-yamada::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.3), transparent 45%);
}

.poster.p-monster {
  background:
    radial-gradient(circle at 50% 30%, rgba(180,30,30,0.35) 0%, transparent 45%),
    linear-gradient(180deg, #1a0e0c 0%, #0a0604 100%);
}
.poster.p-monster::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 30%, transparent 30%, rgba(0,0,0,0.6) 70%);
}

.poster.p-ghibli {
  background:
    radial-gradient(ellipse at 80% 10%, #fef3d4 0%, transparent 50%),
    linear-gradient(180deg, #a8c98a 0%, #7ba658 40%, #3a5a2e 100%);
}
.poster.p-ghibli::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.25), transparent 50%);
}

.poster.p-isekai {
  background:
    linear-gradient(135deg, #8a4a9e 0%, #4a2c78 50%, #1a1438 100%),
    #1a1438;
}
.poster.p-isekai::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 60%, rgba(255,200,120,0.3) 0%, transparent 35%),
    linear-gradient(0deg, rgba(0,0,0,0.3), transparent);
}

.poster.p-chainsaw {
  background:
    linear-gradient(180deg, #b8302e 0%, #6a1a18 50%, #2a0a08 100%);
}
.poster.p-chainsaw::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent 0 20px, rgba(0,0,0,0.08) 20px 21px),
    linear-gradient(0deg, rgba(0,0,0,0.4), transparent 45%);
}

.poster.p-subtitles {
  background: #f6f3ec;
  color: #141310;
  border: 1px solid var(--color-rule);
}
.poster.p-subtitles::after { color: rgba(20,19,16,0.55); }
.poster.p-subtitles .title-overlay { color: var(--color-text-primary); text-shadow: none; }
.poster.p-subtitles::before {
  content: "字幕 · sub · translation";
  position: absolute;
  right: 18px; bottom: 40px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  color: var(--color-accent);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: right;
}

.poster.p-shinkai {
  background:
    radial-gradient(ellipse at 50% 100%, #ffc888 0%, transparent 50%),
    linear-gradient(180deg, #3a4a7a 0%, #6080c0 50%, #a8b8dc 100%);
}
.poster.p-shinkai::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(200,80,40,0.3) 0%, transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.3) 0%, transparent 8%);
}

.poster.p-yuasa {
  background:
    conic-gradient(from 220deg at 40% 60%, #f4c85c, #e85a3a, #4a2a78, #0a6090, #f4c85c);
}
.poster.p-yuasa::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.3), transparent 55%);
  mix-blend-mode: multiply;
}

.poster.p-asano {
  background:
    linear-gradient(180deg, #d8d4c8 0%, #a8a49a 60%, #3a3832 100%);
}
.poster.p-asano::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(20,20,20,0.04) 3px 4px);
}

.poster.p-dossier {
  background:
    linear-gradient(180deg, #141310 0%, #141310 100%);
  color: #fffdf7;
}
.poster.p-dossier::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, transparent 40%, var(--color-accent) 40%, var(--color-accent) 42%, transparent 42%),
    linear-gradient(135deg, transparent 55%, var(--color-accent) 55%, var(--color-accent) 56%, transparent 56%),
    linear-gradient(135deg, transparent 70%, var(--color-accent) 70%, var(--color-accent) 73%, transparent 73%);
  opacity: 0.85;
}

/* ---------- Homepage: banner strip under header ---------- */
.ak-banner {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 14px 0;
  display: flex; gap: 28px; align-items: center;
  border-bottom: 1px solid var(--color-rule);
}
.ak-banner .dot { color: var(--color-accent); }

/* ---------- Featured hero (home) ---------- */
.ak-hero {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: 40px;
  padding: 48px 0 64px;
  border-bottom: 2px solid var(--color-text-primary);
}
@media (max-width: 820px) { .ak-hero { grid-template-columns: 1fr; gap: 24px; } }
.ak-hero .poster { aspect-ratio: 4/3; }
.ak-hero .h-body { display: flex; flex-direction: column; justify-content: center; }
.ak-hero .h-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}
.ak-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  font-weight: 500;
  text-wrap: balance;
}
.ak-hero .dek {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 44ch;
  margin: 0 0 28px;
}
.ak-hero .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-top: 20px;
  border-top: 1px solid var(--color-rule);
  display: flex; gap: 20px; flex-wrap: wrap;
}
.ak-hero .meta b { color: var(--color-text-primary); font-weight: 500; }

/* ---------- Editorial card (home) ---------- */
.ak-card { display: flex; flex-direction: column; }
.ak-card .poster { aspect-ratio: 4/3; margin-bottom: 16px; }
.ak-card .cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-rule);
}
.ak-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  font-weight: 500;
  text-wrap: balance;
}
.ak-card h3 a { color: inherit; text-decoration: none; }
.ak-card h3 a:hover { color: var(--color-accent); }
.ak-card .excerpt {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
}
.ak-card .foot {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: 8px;
  display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap;
}
.ak-card .foot > span { white-space: nowrap; }
.ak-card .foot .who { color: var(--color-text-primary); }
.ak-card .foot .sep { opacity: 0.5; }
.ak-card.compact .poster { aspect-ratio: 4/3; }
.ak-card.compact h3 { font-size: 18px; }

/* ---------- Most-read rail ---------- */
.ak-rail h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 20px;
  font-weight: 500;
}
.ak-rail .item {
  display: grid; grid-template-columns: 32px 1fr; gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--color-rule);
  align-items: baseline;
}
.ak-rail .item:first-of-type { border-top: none; padding-top: 4px; }
.ak-rail .item .n {
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
  color: var(--color-accent);
}
.ak-rail .item .t {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--color-text-primary);
}
.ak-rail .item .t a { color: inherit; text-decoration: none; }
.ak-rail .item .t a:hover { color: var(--color-accent); }
.ak-rail .item .m {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* ---------- Newsletter block ---------- */
.ak-news {
  background: var(--color-text-primary);
  color: var(--color-bg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  align-items: end;
  margin: 64px 0;
  position: relative;
  overflow: hidden;
}
.ak-news::before {
  content: "";
  position: absolute; top: -20%; right: -10%; width: 40%; aspect-ratio: 1;
  background: var(--color-accent);
  opacity: 0.18;
  filter: blur(60px);
  pointer-events: none;
}
.ak-news .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}
.ak-news h3 {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--color-bg);
  font-weight: 500;
  text-wrap: balance;
}
.ak-news p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-bg);
  opacity: 0.75;
  max-width: 48ch;
  margin: 0;
}
.ak-news form { display: flex; gap: 8px; position: relative; z-index: 1; }
.ak-news input {
  flex: 1;
  font-family: var(--font-body);
  padding: 16px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--color-bg);
  font-size: 15px;
}
.ak-news input::placeholder { color: rgba(255,255,255,0.4); }
.ak-news input:focus { outline: none; border-color: var(--color-accent); }
.ak-news button {
  font-family: var(--font-body);
  padding: 16px 22px;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  border: 1px solid var(--color-accent);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ak-news .smalls {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); margin-top: 16px;
}
@media (max-width: 820px) {
  .ak-news { grid-template-columns: 1fr; padding: 36px 28px; }
  .ak-news h3 { font-size: 32px; }
}

/* ---------- Dossier feature card (sticky) ---------- */
.ak-dossier {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  color: #fffdf7;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 32px;
}
.ak-dossier .poster {
  position: absolute; inset: 0; aspect-ratio: auto;
}
.ak-dossier .content { position: relative; z-index: 2; }
.ak-dossier::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.8), transparent 60%);
  z-index: 1;
}
.ak-dossier .chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  margin-bottom: 16px;
}
.ak-dossier h3 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 500;
  color: #fffdf7;
  margin: 0 0 12px;
  text-wrap: balance;
}
.ak-dossier .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,253,247,0.7);
}

/* ---------- Minimal list block (essais) ---------- */
.ak-list .row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--color-rule);
  align-items: baseline;
}
.ak-list .row:last-child { border-bottom: 1px solid var(--color-rule); }
.ak-list .row .date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.ak-list .row h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
  font-weight: 500;
}
.ak-list .row h3 a { color: inherit; text-decoration: none; }
.ak-list .row h3 a:hover { color: var(--color-accent); }
.ak-list .row p {
  font-family: var(--font-body);
  font-size: 14px; line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
}
.ak-list .row .mins {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .ak-list .row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Article page ---------- */
.ak-article-lead { padding: 56px 0 40px; }
.ak-article-lead .eyebrow-bar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline;
  margin-bottom: 24px;
}
.ak-article-lead h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 24px;
  max-width: 22ch;
  text-wrap: balance;
}
.ak-article-lead .dek {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.4;
  color: var(--color-text-secondary);
  max-width: 52ch;
  margin: 0 0 32px;
}
.ak-article-lead .meta-row {
  display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-rule);
}
.ak-article-lead .author {
  display: flex; gap: 14px; align-items: center;
}
.ak-article-lead .author .avatar {
  width: 44px; height: 44px;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 500;
  font-variation-settings: "opsz" 144;
}
.ak-article-lead .author .name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.ak-article-lead .author .role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.ak-article-lead .pubmeta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-left: auto;
}

/* Rating chip */
.ak-rating {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 16px;
  background: var(--color-text-primary);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.ak-rating b {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0;
}

/* Hero image (article) */
.ak-article-hero { position: relative; max-width: 1100px; margin: 0 auto; }
.ak-article-hero .poster { aspect-ratio: 16/9; }
.ak-article-hero figcaption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--color-rule);
  margin-top: 14px;
  display: flex; justify-content: space-between; gap: 24px;
}
.ak-article-hero figcaption em {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-secondary);
  font-style: italic;
  text-transform: none; letter-spacing: 0;
  max-width: 70%;
}

/* Article shell w/ rails */
.ak-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 680px) 220px;
  gap: 48px;
  max-width: 1200px;
  margin: 64px auto 0;
  padding: 0 40px;
}
.ak-shell .rail-l {
  position: sticky; top: 32px; align-self: start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 140px;
  display: flex; flex-direction: column; gap: 0;
}
.ak-shell .rail-l .bignum {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.9;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
.ak-shell .rail-l .bignum em {
  font-style: normal;
  color: var(--color-accent);
  font-size: 28px;
  margin-left: 2px;
}
.ak-shell .rail-l .bignum-sub {
  color: var(--color-text-muted);
  margin-bottom: 36px;
}
.ak-shell .rail-l a {
  display: block;
  padding: 12px 0;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-top: 1px solid var(--color-rule);
}
.ak-shell .rail-l a:last-of-type { border-bottom: 1px solid var(--color-rule); }
.ak-shell .rail-l a:hover { color: var(--color-accent); }

.ak-shell .rail-r {
  position: sticky; top: 32px; align-self: start;
  padding-top: 140px;
}
.ak-shell .rail-r .hed {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.ak-shell .rail-r ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.ak-shell .rail-r li {
  counter-increment: toc;
  padding: 12px 0;
  border-top: 1px solid var(--color-rule);
  position: relative;
  padding-left: 32px;
}
.ak-shell .rail-r li:last-child { border-bottom: 1px solid var(--color-rule); }
.ak-shell .rail-r li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0; top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}
.ak-shell .rail-r a {
  color: var(--color-text-primary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.35;
}
.ak-shell .rail-r a:hover { color: var(--color-accent); }

/* Responsive: collapse rails on narrow viewports. */
@media (max-width: 1100px) {
  .ak-shell { grid-template-columns: 1fr !important; max-width: 720px; padding: 0 24px; }
  .ak-shell .rail-l, .ak-shell .rail-r { display: none !important; }
}

/* Article body */
.ak-body h2 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 56px 0 20px;
  text-wrap: balance;
}
.ak-body p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-primary);
  margin: 0 0 22px;
}
.ak-body p.drop::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 5.4em;
  line-height: 0.82;
  padding-right: 10px;
  padding-top: 6px;
  font-weight: 500;
  color: var(--color-text-primary);
}
.ak-body em { color: var(--color-text-primary); }
.ak-body a { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ak-body ::selection { background: var(--color-selection); }

/* Figures */
.ak-fig { margin: 48px 0; }
.ak-fig .poster { aspect-ratio: 16/10; }
.ak-fig figcaption {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid var(--color-accent);
}
/* Wide figure — kept flush with body column, same as inline figures. */
.ak-fig.wide { margin: 48px 0; }

/* Pull quote */
.ak-pull {
  margin: 64px 0;
  padding: 36px 0 36px 40px;
  border-left: 3px solid var(--color-accent);
}
.ak-pull p {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--color-text-primary);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.ak-pull footer {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 20px;
}

/* End byline */
.ak-endbyline {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 40px 0;
  border-top: 2px solid var(--color-text-primary);
  border-bottom: 1px solid var(--color-rule);
  margin-top: 56px;
}
.ak-endbyline .av {
  width: 80px; height: 80px;
  background: var(--color-accent); color: var(--color-accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 30px; font-weight: 500;
}
.ak-endbyline .who {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500;
  color: var(--color-text-primary);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.ak-endbyline .bio {
  font-family: var(--font-body);
  font-size: 14px; line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 62ch; margin: 0 0 12px;
}
.ak-endbyline .also {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.ak-endbyline .also a { color: var(--color-text-primary); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* Reading progress bar */
.ak-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 100; background: transparent; pointer-events: none;
}
.ak-progress > span {
  display: block; height: 100%; width: 0;
  background: var(--color-accent);
}

/* ---------- Header / footer overrides for Animeakie ---------- */
.ak-header {
  border-bottom: 1px solid var(--color-rule);
  background: var(--color-bg);
  position: sticky; top: 0; z-index: 40;
}
.ak-header .inner {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1320px; margin: 0 auto;
  padding: 20px 40px;
}
@media (max-width: 820px) { .ak-header .inner { padding: 16px 20px; grid-template-columns: auto 1fr auto; } }
.ak-header .logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  text-decoration: none;
  font-variation-settings: "opsz" 144;
}
.ak-header nav {
  display: flex; gap: 36px; justify-content: center;
  font-family: var(--font-body);
  font-size: 14px;
}
.ak-header nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 8px 0;
  position: relative;
}
.ak-header nav a:hover { color: var(--color-text-primary); }
.ak-header nav a.active {
  color: var(--color-text-primary);
}
.ak-header nav a.active::after {
  content: "";
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--color-accent);
}
.ak-header .util {
  display: flex; gap: 20px; align-items: center;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.ak-header .util a { color: inherit; text-decoration: none; }
.ak-header .util a:hover { color: var(--color-text-primary); }

/* Menu button (hamburger). Hidden on desktop, shown at ≤560. */
.ak-header .util .menu-btn {
  display: none;
  background: transparent; border: 1px solid var(--color-rule);
  width: 36px; height: 36px; padding: 0; cursor: pointer;
  color: var(--color-text-primary);
  align-items: center; justify-content: center;
}
.ak-header .util .menu-btn .i-close { display: none; }
body.menu-open .ak-header .util .menu-btn .i-open { display: none; }
body.menu-open .ak-header .util .menu-btn .i-close { display: inline; }
@media (max-width: 820px) { .ak-header nav { display: none; } }

.ak-footer {
  border-top: 2px solid var(--color-text-primary);
  background: var(--color-bg);
  margin-top: 96px;
  padding: 64px 0 32px;
}
.ak-footer .inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1320px; margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 820px) { .ak-footer .inner { grid-template-columns: 1fr 1fr; padding: 0 20px; } }
.ak-footer .brand .logo {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  font-variation-settings: "opsz" 144;
  margin-bottom: 12px;
  display: block;
}
.ak-footer .brand p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 40ch;
}
.ak-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 16px;
  font-weight: 500;
}
.ak-footer ul { list-style: none; padding: 0; margin: 0; }
.ak-footer li { padding: 5px 0; }
.ak-footer a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-primary);
  text-decoration: none;
}
.ak-footer a:hover { color: var(--color-accent); }
.ak-footer .bottom {
  max-width: 1320px; margin: 48px auto 0;
  padding: 20px 40px 0;
  border-top: 1px solid var(--color-rule);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
@media (max-width: 820px) { .ak-footer .bottom { padding: 20px 20px 0; flex-direction: column; gap: 10px; } }

/* Font for Animeakie (Fraunces opsz trick) */
.system-root[data-preset="animeakie"] .ak-hero h1,
.system-root[data-preset="animeakie"] .ak-article-lead h1,
.system-root[data-preset="animeakie"] .ak-sec-head h2,
.system-root[data-preset="animeakie"] .ak-card h3,
.system-root[data-preset="animeakie"] .ak-body h2,
.system-root[data-preset="animeakie"] .ak-pull p,
.system-root[data-preset="animeakie"] .ak-rail .item .t,
.system-root[data-preset="animeakie"] .ak-list .row h3,
.system-root[data-preset="animeakie"] .ak-news h3,
.system-root[data-preset="animeakie"] .ak-dossier h3,
.system-root[data-preset="animeakie"] .ak-endbyline .who,
.system-root[data-preset="animeakie"] .ak-header .logo,
.system-root[data-preset="animeakie"] .ak-footer .brand .logo {
  font-variation-settings: "opsz" 144;
}

/* =====================================================================
   MOBILE PASS — ≤560px. Tuned for 390–414px portrait (modern iPhones).
   Strategy: tighten padding, stack everything, shrink display sizes,
   keep the typographic system (Fraunces display, mono accents).
   ===================================================================== */
@media (max-width: 560px) {

  /* Shell padding — hug the edges a bit more, but leave real margins. */
  .ak-wrap { padding: 0 16px; }

  /* --- Header ----------------------------------------------------- */
  .ak-header .inner {
    grid-template-columns: auto 1fr auto;
    padding: 14px 16px;
    gap: 12px;
  }
  .ak-header .logo { font-size: 20px; }
  .ak-header .util { gap: 10px; font-size: 10px; }
  .ak-header .util a[data-hide-sm] { display: none; }
  .ak-header .util .menu-btn { display: inline-flex; }

  /* Mobile nav drawer — full-bleed below header when .menu-open. */
  .ak-header nav {
    position: fixed;
    top: 64px; /* under sticky header */
    left: 0; right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-rule);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 24px;
    z-index: 39;
    font-size: 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms, transform 220ms cubic-bezier(.4,0,.2,1);
  }
  body.menu-open .ak-header nav {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .ak-header nav a {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: -0.015em;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-rule);
    color: var(--color-text-primary);
    font-variation-settings: "opsz" 144;
  }
  .ak-header nav a.active::after { display: none; } /* the underline looks off at this size */
  .ak-header nav a.active { color: var(--color-accent); }

  /* --- Banner ----------------------------------------------------- */
  .ak-banner {
    flex-direction: column; align-items: flex-start;
    gap: 4px; padding: 10px 0;
    font-size: 10px; letter-spacing: 0.08em;
  }
  .ak-banner > *[style*="margin-left"] { margin-left: 0 !important; }

  /* --- Hero ------------------------------------------------------- */
  .ak-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 0 36px;
  }
  /* Poster extends slightly wider than text for a bit more presence,
     but stays inside the body with comfortable gutters. */
  .ak-hero .poster {
    aspect-ratio: 4/3;
    margin-left: -8px; margin-right: -8px;
    width: calc(100% + 16px);
  }
  .ak-hero h1 {
    font-size: 38px; line-height: 1.03; letter-spacing: -0.02em;
    margin-bottom: 14px;
  }
  .ak-hero .dek { font-size: 16px; line-height: 1.5; margin-bottom: 20px; }
  .ak-hero .h-cat { font-size: 10px; margin-bottom: 14px; }
  .ak-hero .meta {
    font-size: 10px; gap: 8px 16px; padding-top: 14px;
  }
  /* Poster title overlay — scale down the overlaid text. */
  .ak-hero .poster .title-overlay { font-size: 22px !important; }

  /* --- Section headings ------------------------------------------- */
  .ak-sec { padding: 40px 0; }
  .ak-sec-head {
    flex-direction: column; align-items: flex-start;
    gap: 8px; margin-bottom: 24px;
  }
  .ak-sec-head h2 { font-size: 26px; }
  .ak-sec-head .kicker { font-size: 10px; }
  .ak-sec-head .more { margin-left: 0; font-size: 11px; }

  /* --- Cards (grid-3 already collapses to 1col at ≤560) ----------- */
  .ak-card .poster {
    margin-left: -8px; margin-right: -8px;
    width: calc(100% + 16px);
  }
  .ak-card h3 { font-size: 20px; line-height: 1.2; }
  .ak-card .excerpt { font-size: 15px; }
  .ak-card .foot { font-size: 10px; gap: 6px; }
  .ak-card .cat { font-size: 10px; }

  /* --- Essais list row -------------------------------------------- */
  .ak-list .row { grid-template-columns: 1fr; gap: 4px; padding: 20px 0; }
  .ak-list .row .date { font-size: 10px; }
  .ak-list .row h3 { font-size: 19px; line-height: 1.25; }
  .ak-list .row p { font-size: 14px; }
  .ak-list .row .mins { font-size: 10px; color: var(--color-text-muted); }

  /* --- Dossier feature card --------------------------------------- */
  .ak-dossier { aspect-ratio: 4/5; padding: 24px; }
  .ak-dossier h3 { font-size: 24px; }

  /* --- Newsletter block ------------------------------------------- */
  .ak-news {
    grid-template-columns: 1fr !important;
    padding: 28px 20px !important;
    gap: 16px !important;
  }
  .ak-news h3 { font-size: 26px !important; }
  .ak-news .form { flex-direction: column; gap: 10px; }
  .ak-news .form input { width: 100%; }

  /* --- Article lead ----------------------------------------------- */
  .ak-article-lead { padding: 32px 0 28px; }
  .ak-article-lead .eyebrow-bar { gap: 10px; margin-bottom: 16px; font-size: 10px; }
  .ak-article-lead h1 {
    font-size: 38px; line-height: 1.03; letter-spacing: -0.02em;
    margin-bottom: 16px;
  }
  .ak-article-lead .dek { font-size: 17px; line-height: 1.5; margin-bottom: 24px; }
  .ak-article-lead .meta-row { gap: 16px 24px; padding-top: 16px; }
  .ak-article-lead .author .avatar { width: 36px; height: 36px; font-size: 14px; }
  .ak-article-lead .author .name { font-size: 13px; }
  .ak-article-lead .author .role { font-size: 9px; }
  .ak-article-lead .pubmeta { font-size: 10px; }

  /* --- Article body: the 3-column shell already collapses to 720px
     single column at ≤1100. We just tighten the type + chrome here. -- */
  .ak-shell { padding: 0 16px !important; }
  .ak-body { font-size: 17px; line-height: 1.7; }
  .ak-body h2 { font-size: 26px; margin-top: 40px; }
  .ak-body h3 { font-size: 20px; margin-top: 28px; }
  .ak-body .dropcap::first-letter,
  .ak-body p.dropcap::first-letter { font-size: 78px; line-height: 0.82; }

  /* Pull quote — full width, smaller type. */
  .ak-pullquote { font-size: 24px !important; padding: 24px 0 !important; margin: 28px 0 !important; }
  .ak-pullquote .attribution { font-size: 10px !important; }

  /* Inline figures: flush, smaller caption. */
  .ak-fig { margin: 28px 0 !important; }
  .ak-fig .poster {
    margin-left: -8px; margin-right: -8px;
    width: calc(100% + 16px);
  }
  .ak-fig figcaption { font-size: 11px !important; }

  /* End byline / also read */
  .ak-endbyline { flex-direction: column; align-items: flex-start; gap: 20px; padding: 28px 0; }
  .ak-endbyline .avatar { width: 52px; height: 52px; font-size: 18px; }

  /* Share row — wrap compactly. */
  .ak-share { gap: 10px; font-size: 10px; }

  /* --- Footer ----------------------------------------------------- */
  .ak-footer {
    margin-top: 56px;
    padding: 40px 0 24px;
  }
  .ak-footer .inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 16px;
  }
  .ak-footer .brand .logo { font-size: 24px; }
  .ak-footer .bottom { padding: 20px 16px 0; flex-direction: column; gap: 8px; align-items: flex-start; }

  /* --- Sticky bottom page-switcher — dev-only chrome, hide on mobile. */
  .ak-pageswitch { display: none !important; }
}

/* Extra-narrow (≤380px — iPhone SE / mini). */
@media (max-width: 380px) {
  .ak-hero h1, .ak-article-lead h1 { font-size: 32px; }
  .ak-sec-head h2 { font-size: 22px; }
  .ak-body { font-size: 16px; }
}
