/* =====================================================================
   İstanbul — design system
   Modelled on The New Yorker's web design. Their licensed faces are
   replaced with the closest open-source equivalents:
     Irvin Heading   → Marcellus SC      (--font-display)
     Adobe Caslon    → Libre Caslon Text (--font-serif)
     Graphik         → Hanken Grotesk    (--font-sans)
     Neutraface      → Josefin Sans      (--font-byline)
   ===================================================================== */

:root {
  --font-display: 'Marcellus SC', 'Times New Roman', serif;
  --font-serif: 'Libre Caslon Text', 'Times New Roman', Times, serif;
  --font-sans: 'Hanken Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-byline: 'Josefin Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --color-text: #000;
  --color-text-secondary: #333;
  --color-byline: #121212;
  --color-meta: #666;
  --color-rubric: #db3334;
  --color-rule: #e5e5e5;
  --color-rule-strong: #000;
  --color-bg: #fff;
  --color-bg-subtle: #f7f7f7;
  --color-accent: #0787ca;
  --color-accent-hover: #056a9e;
  --color-footer: #121212;
  --color-promo: #fdd8de;
  --color-focus: #0787ca;
  --color-success: #1d7a46;
  --color-error: #c4161c;

  --container: 1600px;
  --gutter: 64px;
  --gap: 32px;
  --header-h: 64px;
  --nav-h: 48px;
  --body-measure: 720px;

  /* Libre Caslon runs larger than Adobe Caslon, so sizes are nudged down
     to keep The New Yorker's line lengths and rhythm. */
  --type-body: 19px;
  --lh-body: 31px;
  --type-hed-card: 20px;
  --lh-hed-card: 26px;
  --type-dek-card: 16px;
  --lh-dek-card: 23px;
  --type-dek-hero: 19px;
  --lh-dek-hero: 28px;
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: var(--type-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: #000; color: #fff;
  font: 600 13px/1 var(--font-sans);
  padding: 12px 16px;
}
.skip-link:focus { top: 8px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- typographic primitives ---------- */

.rubric {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-rubric);
}
.rubric--plain { color: var(--color-text); }
.rubric--light { color: #fff; }

.hed-display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

.byline {
  font-family: var(--font-byline);
  font-weight: 600;
  font-size: 15px;
  line-height: 18px;
  color: var(--color-byline);
}
.byline a:hover { text-decoration: underline; }
.byline__prefix { font-weight: 600; }

.meta {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 14px;
  color: var(--color-meta);
}

.link-arrow {
  font: 600 13px/1.3 var(--font-sans);
  color: var(--color-text);
}
.link-arrow:hover { text-decoration: underline; }

/* ---------- buttons & forms ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 30px; padding: 0 16px;
  border: 0; border-radius: 2px;
  font: 500 12px/1 var(--font-sans);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--accent { background: var(--color-accent); color: #fff; }
.btn--accent:hover { background: var(--color-accent-hover); }
.btn--black { background: #000; color: #fff; }
.btn--black:hover { background: #333; }
.btn--ghost { background: transparent; color: #000; border: 1px solid #000; }
.btn--ghost:hover { background: #000; color: #fff; }
.btn--lg {
  height: 48px; padding: 0 28px;
  font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
}
.btn--block { width: 100%; }
.btn--danger { background: var(--color-error); color: #fff; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 12px;
  border: 1px solid var(--color-rule); border-radius: 999px;
  background: #fff;
  font: 600 13px/1 var(--font-sans);
  color: #000;
}
.pill:hover { border-color: #000; }
.pill svg { width: 22px; height: 22px; }
.pill--light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.pill--light:hover { border-color: #fff; }

.field { display: grid; gap: 6px; margin-bottom: 20px; }
.field label, .field .label {
  font: 600 13px/1.2 var(--font-sans);
  color: #000;
}
.field .hint { font: 400 12px/1.4 var(--font-sans); color: var(--color-meta); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid #c4c4c4; border-radius: 0;
  background: #fff;
  font: 400 15px/1.4 var(--font-sans);
  padding: 12px 14px;
  min-height: 48px;
  transition: border-color .15s ease;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #000; box-shadow: 0 0 0 1px #000; }
.textarea { min-height: 160px; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 10px; font: 500 14px/1.3 var(--font-sans); }
.checkbox input { width: 18px; height: 18px; accent-color: #000; }

.alert {
  font: 500 14px/1.45 var(--font-sans);
  padding: 12px 16px; margin-bottom: 20px;
  border-left: 3px solid;
}
.alert--error { color: var(--color-error); background: #fdf1f1; border-color: var(--color-error); }
.alert--success { color: var(--color-success); background: #eef8f1; border-color: var(--color-success); }

/* =====================================================================
   Header
   ===================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--color-rule);
}
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding: 0 32px;
}
.site-header__left, .site-header__right { display: flex; align-items: center; gap: 20px; }
.site-header__right { justify-content: flex-end; }
.site-header__tagline { font: 500 12px/1 var(--font-sans); }
.site-header__tagline em { font-style: italic; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; min-width: 40px; padding: 0 4px;
  background: none; border: 0;
  font: 500 12px/1 var(--font-sans);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { opacity: .7; }

.logo {
  display: block;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #000;
  padding-top: 4px;
}
.logo--sm { font-size: 26px; }
.logo--lg { font-size: 44px; }
.logo--light { color: #fff; }

.header-link { font: 500 12px/1 var(--font-sans); letter-spacing: -0.01em; }
.header-link:hover { text-decoration: underline; }

/* account dropdown */
.account-menu { position: relative; }
.account-menu summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 12px/1 var(--font-sans);
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after {
  content: ''; border: 4px solid transparent; border-top: 5px solid currentColor;
  transform: translateY(3px);
}
.account-menu__panel {
  position: absolute; right: 0; top: calc(100% + 14px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-rule);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 8px 0;
}
.account-menu__panel a, .account-menu__panel button {
  display: block; width: 100%; text-align: left;
  padding: 10px 20px;
  background: none; border: 0;
  font: 500 13px/1.2 var(--font-sans);
}
.account-menu__panel a:hover, .account-menu__panel button:hover { background: var(--color-bg-subtle); }
.account-menu__who {
  padding: 8px 20px 12px; margin-bottom: 4px;
  border-bottom: 1px solid var(--color-rule);
  font: 400 12px/1.4 var(--font-sans); color: var(--color-meta);
}
.account-menu__who strong { display: block; color: #000; font-weight: 600; font-size: 13px; }

/* ---------- section navigation strip ---------- */

.section-nav {
  background: #fff;
  border-bottom: 1px solid var(--color-rule);
}
.section-nav--sticky { position: sticky; top: var(--header-h); z-index: 40; margin-top: 40px; }
.section-nav--top { border-top: 1px solid var(--color-rule); }
.section-nav ul {
  display: flex; justify-content: center; align-items: center; gap: 4px 14px;
  height: var(--nav-h);
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav ul::-webkit-scrollbar { display: none; }
.section-nav a {
  display: block; white-space: nowrap;
  font: 500 13px/1 var(--font-sans);
  letter-spacing: -0.01em;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.section-nav a:hover, .section-nav a[aria-current="page"] { border-bottom-color: #000; }

/* ---------- drawer menu (native <dialog>) ---------- */

.drawer {
  position: fixed; inset: 0 auto 0 0;
  width: min(400px, 92vw); max-width: none;
  height: 100dvh; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: #fff;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .28s ease, overlay .28s allow-discrete, display .28s allow-discrete;
}
.drawer[open] { transform: translateX(0); }
@starting-style { .drawer[open] { transform: translateX(-100%); } }
.drawer::backdrop { background: rgba(0,0,0,.45); }
.drawer__top {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); padding: 0 24px;
  border-bottom: 1px solid var(--color-rule);
}
.drawer__body { padding: 24px; }
.drawer__search { display: flex; border-bottom: 1px solid #000; margin-bottom: 28px; }
.drawer__search input {
  flex: 1; border: 0; padding: 10px 0;
  font: 400 19px/1.3 var(--font-serif);
}
.drawer__search input:focus { outline: none; }
.drawer__search button { background: none; border: 0; padding: 0 4px; }
.drawer__search svg { width: 20px; height: 20px; }
.drawer__label {
  font: 600 11px/1 var(--font-sans);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-meta);
  margin: 0 0 12px;
}
.drawer__list { margin-bottom: 28px; }
.drawer__list a, .drawer__list button {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 12px 0;
  border: 0; border-bottom: 1px solid var(--color-rule);
  background: none; text-align: left;
  font: 400 21px/1.2 var(--font-serif);
}
.drawer__list a:hover, .drawer__list button:hover { text-decoration: underline; }
.drawer__list--small a, .drawer__list--small button { font: 500 14px/1.2 var(--font-sans); padding: 11px 0; }

/* =====================================================================
   Layout blocks
   ===================================================================== */

.block { margin-top: 64px; }
.block--tight { margin-top: 40px; }

.section-head {
  border-top: 1px solid var(--color-rule);
  padding-top: 16px;
  text-align: center;
  margin-bottom: 40px;
}
.section-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 34px;
  text-transform: uppercase;
}
.section-head__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.section-head__sub {
  margin-top: 10px;
  font-size: 19px; line-height: 28px; color: var(--color-text);
}
.section-head__sub--italic { font-style: italic; }
.section-head__icon { display: block; margin: 8px auto 6px; width: 56px; height: 40px; }
.section-head__icon--wide { width: 240px; height: 64px; margin-top: 4px; }

/* ---------- split hero (text | image) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}
.split__text {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  max-width: 520px; margin: 0 auto;
  padding: 32px 0;
}
.split__text .rubric { margin-bottom: 12px; }
.split__hed {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  line-height: 41px;
  text-transform: uppercase;
}
.split__hed a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.split__dek {
  margin-top: 14px;
  font-size: var(--type-dek-hero);
  line-height: var(--lh-dek-hero);
  color: var(--color-text-secondary);
}
.split__dek .byline { font-size: 17px; color: #000; }
.split__byline { margin-top: 16px; }
.split__actions { margin-top: 20px; }
.split__media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.split--hero { padding-top: 24px; }
.split--reverse .split__media { order: -1; }

.feature-dark {
  background: #000; color: #fff;
}
.feature-dark .split { padding: 0 48px 0 0; }
.feature-dark .split__dek, .feature-dark .byline { color: #fff; }
.feature-dark .split__media img { aspect-ratio: 4 / 5; max-height: 560px; margin: 24px 0; }

.feature-image {
  position: relative; color: #fff;
  min-height: 560px;
  display: grid; align-items: center;
  overflow: hidden;
}
.feature-image > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.75) 70%); }
.feature-image .split__text { position: relative; z-index: 1; margin-right: 6%; margin-left: auto; }
.feature-image .split__dek, .feature-image .byline { color: #fff; }

/* ---------- card grids ---------- */

.grid {
  display: grid;
  gap: 40px var(--gap);
}
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--ruled > * { position: relative; }
.grid--4.grid--ruled > :not(:nth-child(4n + 1))::before,
.grid--3.grid--ruled > :not(:nth-child(3n + 1))::before,
.grid--2.grid--ruled > :not(:nth-child(2n + 1))::before {
  content: ''; position: absolute; top: 0; bottom: 0;
  left: calc(var(--gap) / -2);
  border-left: 1px solid var(--color-rule);
}

.card { display: flex; flex-direction: column; }
.card__media { display: block; margin-bottom: 16px; overflow: hidden; background: var(--color-bg-subtle); }
.card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.02); }
.card .rubric { margin-bottom: 6px; }
.card__hed {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--type-hed-card);
  line-height: var(--lh-hed-card);
}
.card__hed a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card__dek {
  margin-top: 8px;
  font-size: var(--type-dek-card);
  line-height: var(--lh-dek-card);
  color: var(--color-text-secondary);
}
.card .byline { margin-top: 10px; }

.card--center { align-items: center; text-align: center; }
.card--center .card__media { width: 48%; min-width: 140px; }
.card--center .card__media img { aspect-ratio: 3 / 4; }
.card--plain .card__media { width: 100%; }
.card--plain .card__media img { aspect-ratio: 1 / 1; }
.card--plain .card__hed { font-size: 21px; line-height: 27px; }

.card--text { padding-top: 0; }
.card--text .card__hed { font-size: 22px; line-height: 28px; }

/* ---------- horizontal carousel ---------- */

.carousel { position: relative; }
.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3.5 * var(--gap)) / 4.5);
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: #8a8a8a #f1f1f1;
}
.carousel__track > * { scroll-snap-align: start; position: relative; }
.carousel__track > * + *::before {
  content: ''; position: absolute; top: 0; bottom: 0;
  left: calc(var(--gap) / -2);
  border-left: 1px solid var(--color-rule);
}
.carousel__nav { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.carousel__btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--color-rule); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.carousel__btn:hover { border-color: #000; }
.carousel__btn svg { width: 16px; height: 16px; }

/* ---------- river (list with image) ---------- */

.river { border-top: 1px solid var(--color-rule); }
.river__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--gap);
  padding: 32px 0;
  border-bottom: 1px solid var(--color-rule);
}
.river__item--noimg { grid-template-columns: minmax(0, 1fr); }
.river__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.river__text { align-self: center; max-width: 680px; }
.river__text .rubric { margin-bottom: 8px; }
.river__hed { font-size: 26px; line-height: 32px; font-weight: 400; }
.river__hed a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.river__dek { margin-top: 10px; font-size: 17px; line-height: 25px; color: var(--color-text-secondary); }
.river__meta { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }

/* ---------- page header (section, author, search…) ---------- */

.page-head {
  text-align: center;
  padding: 56px 0 40px;
}
.page-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.05;
  text-transform: uppercase;
}
.page-head__desc {
  max-width: 640px; margin: 16px auto 0;
  font-size: 19px; line-height: 28px; color: var(--color-text-secondary);
}
.page-head__meta { margin-top: 16px; }

.pagination {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  margin: 48px 0 0;
  font: 500 13px/1 var(--font-sans);
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--color-rule);
}
.pagination a:hover { border-color: #000; }
.pagination [aria-current="page"] { background: #000; color: #fff; border-color: #000; }

/* ---------- cartoon ---------- */

.cartoon { max-width: 760px; margin: 0 auto; }
.cartoon__title {
  font-family: var(--font-display);
  font-size: 30px; line-height: 34px;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.cartoon__figure { display: block; border: 1px solid var(--color-rule); padding: 24px; background: #fff; }
.cartoon__figure img { margin: 0 auto; max-height: 560px; width: auto; }
.cartoon__caption {
  margin-top: 18px; text-align: center;
  font-size: 21px; line-height: 30px; font-style: italic;
}
.cartoon__credit { margin-top: 10px; text-align: left; }
.cartoon__more { display: inline-block; margin-top: 28px; }

/* ---------- promo band ---------- */

.promo {
  max-width: 900px; margin: 0 auto;
  background: var(--color-promo);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 28px 40px;
}
.promo__art { width: 92px; height: 120px; }
.promo__title { font-size: 34px; line-height: 40px; }
.promo__sub { margin-top: 6px; font: 400 17px/1.4 var(--font-sans); }
.promo__sub em { font-family: var(--font-serif); }
.promo__form { display: flex; gap: 8px; margin-top: 16px; }
.promo__form .input { min-height: 44px; background: #fff; border-color: #000; }
.promo__form .btn { height: 44px; }

.notice {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  max-width: 760px; margin: 0 auto;
  font: 400 14px/1.4 var(--font-sans);
}
.notice a { color: var(--color-accent); text-decoration: underline; font-weight: 600; }
.notice__icon { width: 40px; height: 40px; flex: none; }

/* =====================================================================
   Article page
   ===================================================================== */

.article-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--header-h) - var(--nav-h));
  max-height: 900px;
}
.article-hero__text {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 48px max(48px, 8%);
}
.article-hero__text .rubric { margin-bottom: 14px; }
.article-hero__hed {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 49px;
  text-transform: uppercase;
  max-width: 560px;
}
.article-hero__dek {
  margin-top: 18px; max-width: 520px;
  font-size: 20px; line-height: 28px; font-style: italic;
  color: var(--color-byline);
}
.article-hero__byline { margin-top: 22px; }
.article-hero__date { margin-top: 6px; }
.article-hero__media { position: relative; overflow: hidden; background: var(--color-bg-subtle); }
.article-hero__media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.article-hero--noimg { grid-template-columns: 1fr; min-height: 0; padding: 40px 0 24px; }

.article-caption {
  display: flex; justify-content: flex-end;
  padding: 10px 32px 0;
}
.article-caption p { max-width: 50%; text-align: right; }
.article-caption .meta { line-height: 17px; }

.article-layout {
  display: grid;
  grid-template-columns: 96px minmax(0, var(--body-measure)) minmax(32px, 1fr) 300px;
  margin-top: 48px;
}
.article-rail { grid-column: 1; }
.article-main { grid-column: 2; min-width: 0; }
.article-aside { grid-column: 4; }

.bookmark-btn {
  position: sticky; top: calc(var(--header-h) + 260px);
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid var(--color-rule); border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.bookmark-btn:hover { border-color: #000; }
.bookmark-btn svg { width: 22px; height: 22px; }
.bookmark-btn .icon-filled { display: none; }
.bookmark-btn[aria-pressed="true"] .icon-filled { display: block; }
.bookmark-btn[aria-pressed="true"] .icon-empty { display: none; }

.listen { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }
.listen__btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--color-rule); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.listen__btn:hover { border-color: #000; }
.listen__btn svg { width: 14px; height: 14px; }
.listen__label { font: 600 12px/1 var(--font-sans); }
.listen__time { font: 500 12px/1 var(--font-sans); color: var(--color-meta); }
.listen__time::before { content: '•'; margin-right: 8px; color: #000; }

.body { font-size: var(--type-body); line-height: var(--lh-body); }
.body p { margin-bottom: 16px; }
.body > p:first-of-type::first-letter {
  float: left;
  font-size: 3.05em;
  line-height: 0.82;
  padding: 0.07em 0.08em 0 0;
  font-weight: 400;
}
.body em { font-style: italic; }
.body strong { font-weight: 700; }
.body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.body hr {
  border: 0; height: 0;
  margin: 40px 0;
}
.body hr + p::first-line { font-variant-caps: all-small-caps; letter-spacing: .04em; font-size: 1.08em; }
.body blockquote {
  margin: 40px 0;
  padding: 26px 0;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  text-align: center;
  font-size: 27px; line-height: 36px;
}
.body blockquote p { margin: 0; }
.body > p:last-child::after { content: ' ♦'; font-size: .8em; }
.body--verse { font-size: 20px; line-height: 34px; }
.body--verse > p:first-of-type::first-letter { float: none; font-size: inherit; line-height: inherit; padding: 0; }
.body--verse > p { margin-bottom: 28px; }

.article-end { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--color-rule); }
.author-bio { font-size: 17px; line-height: 26px; font-style: italic; color: var(--color-text-secondary); }
.author-bio a { font-style: normal; font-family: var(--font-byline); font-weight: 600; color: #000; }
.article-actions { display: flex; gap: 10px; margin-top: 28px; }

.aside-box { position: sticky; top: calc(var(--header-h) + 32px); }
.aside-box__title {
  font: 600 11px/1 var(--font-sans);
  letter-spacing: .08em; text-transform: uppercase;
  padding-bottom: 12px; border-bottom: 1px solid #000;
}
.aside-list li { padding: 16px 0; border-bottom: 1px solid var(--color-rule); }
.aside-list .rubric { font-size: 11px; margin-bottom: 4px; }
.aside-list__hed { font-size: 17px; line-height: 22px; }
.aside-list__hed a:hover { text-decoration: underline; }
.aside-list .byline { font-size: 13px; margin-top: 6px; }

.cartoon-page { padding: 48px 0 0; text-align: center; }
.cartoon-page .rubric { margin-bottom: 10px; }

/* =====================================================================
   Auth & account
   ===================================================================== */

.auth {
  max-width: 440px; margin: 0 auto;
  padding: 64px 0 24px;
}
.auth__title {
  font-family: var(--font-display);
  font-size: 36px; line-height: 40px;
  text-transform: uppercase;
  text-align: center;
}
.auth__sub { text-align: center; margin: 12px 0 32px; font-size: 17px; line-height: 25px; color: var(--color-text-secondary); }
.auth__switch {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--color-rule);
  text-align: center;
  font: 400 14px/1.4 var(--font-sans);
}
.auth__switch a { font-weight: 600; text-decoration: underline; }

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 64px;
  margin-top: 16px;
}
.account-card { border: 1px solid var(--color-rule); padding: 28px; }
.account-card + .account-card { margin-top: 24px; }
.account-card__title { font: 600 12px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 20px; }
.account-dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font: 400 14px/1.4 var(--font-sans); }
.account-dl dt { color: var(--color-meta); }
.account-dl dd { margin: 0; }

.empty {
  text-align: center; padding: 48px 24px;
  border: 1px dashed #ccc;
  font-size: 18px; line-height: 27px; color: var(--color-text-secondary);
}
.empty a { text-decoration: underline; }

/* =====================================================================
   Footer
   ===================================================================== */

.site-footer {
  margin-top: 96px;
  background: var(--color-footer);
  color: #fff;
  padding: 40px 0 48px;
}
.site-footer .logo { text-align: center; }
.site-footer__rule { border: 0; border-top: 1px solid #444; margin: 24px 0 32px; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.footer-cols__title {
  font-family: var(--font-display);
  font-size: 15px; line-height: 1; letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 14px;
  min-height: 15px;
}
.footer-cols a, .footer-cols button {
  display: block;
  background: none; border: 0; padding: 0;
  font: 500 13px/2 var(--font-sans);
  color: #c9c9c9;
}
.footer-cols a:hover, .footer-cols button:hover { color: #fff; text-decoration: underline; }
.site-footer__legal {
  margin-top: 8px;
  font: 400 12px/1.6 var(--font-sans);
  color: #9a9a9a;
  max-width: 900px;
}

/* =====================================================================
   Search
   ===================================================================== */

.search-form { max-width: 760px; margin: 0 auto; display: flex; border-bottom: 2px solid #000; }
.search-form input {
  flex: 1; border: 0; padding: 12px 0;
  font: 400 32px/1.2 var(--font-serif);
  background: transparent;
}
.search-form input:focus { outline: none; }
.search-form button { background: none; border: 0; padding: 0 6px; }
.search-form svg { width: 26px; height: 26px; }
.search-count { text-align: center; margin: 24px 0 8px; }

/* =====================================================================
   Admin
   ===================================================================== */

.admin-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 40px 0 24px;
  border-bottom: 1px solid #000;
}
.admin-head__title {
  font-family: var(--font-display);
  font-size: 40px; line-height: 1; text-transform: uppercase;
}
.admin-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-head__actions .btn { height: 40px; }
.admin-stats { display: flex; gap: 32px; margin-top: 10px; font: 500 13px/1 var(--font-sans); color: var(--color-meta); }
.admin-stats strong { color: #000; font-weight: 600; }
.admin-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 16px 0; border-bottom: 1px solid var(--color-rule); }
.admin-tabs a { font: 600 13px/1 var(--font-sans); padding: 8px 0; border-bottom: 2px solid transparent; color: var(--color-meta); }
.admin-tabs a[aria-current="page"] { color: #000; border-bottom-color: #000; }
.admin-tabs form { margin-left: auto; display: flex; gap: 8px; }
.admin-tabs .input { min-height: 36px; padding: 6px 12px; font-size: 13px; width: 240px; }
.admin-tabs .btn { height: 36px; }

.table { width: 100%; border-collapse: collapse; font: 400 14px/1.4 var(--font-sans); }
.table th {
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-meta);
  padding: 14px 12px; border-bottom: 1px solid #000;
}
.table td { padding: 14px 12px; border-bottom: 1px solid var(--color-rule); vertical-align: top; }
.table tr:hover td { background: #fafafa; }
.table__title { font: 400 18px/1.3 var(--font-serif); }
.table__title a:hover { text-decoration: underline; }
.table .rubric { font-size: 11px; }
.table__actions { white-space: nowrap; text-align: right; }
.table__actions a, .table__actions summary { font-weight: 600; font-size: 13px; margin-left: 14px; cursor: pointer; }
.table__actions a:hover, .table__actions summary:hover { text-decoration: underline; }
.table__actions details { display: inline-block; position: relative; }
.table__actions summary { list-style: none; color: var(--color-error); display: inline; }
.table__actions summary::-webkit-details-marker { display: none; }
.confirm {
  position: absolute; right: 0; top: 26px; z-index: 5;
  width: 240px; padding: 14px;
  background: #fff; border: 1px solid #000;
  text-align: left; white-space: normal;
  font: 400 13px/1.4 var(--font-sans);
}
.confirm .btn { margin-top: 10px; height: 34px; }

.status {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11px/1 var(--font-sans); letter-spacing: .04em; text-transform: uppercase;
}
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #bbb; }
.status--published::before { background: var(--color-success); }
.status--draft::before { background: #e0a100; }
.status--scheduled::before { background: var(--color-accent); }

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  margin-top: 32px;
}
.editor__title-input {
  width: 100%; border: 0; border-bottom: 1px solid var(--color-rule);
  padding: 8px 0 14px;
  font: 400 36px/1.2 var(--font-serif);
}
.editor__title-input:focus { outline: none; border-bottom-color: #000; }
.editor__dek-input {
  width: 100%; border: 0; border-bottom: 1px solid var(--color-rule);
  padding: 14px 0; resize: vertical; min-height: 64px;
  font: italic 400 20px/1.4 var(--font-serif);
}
.editor__dek-input:focus { outline: none; border-bottom-color: #000; }
.editor__tabs { display: flex; gap: 20px; margin: 24px 0 0; border-bottom: 1px solid var(--color-rule); }
.editor__tabs button {
  background: none; border: 0; padding: 10px 0;
  font: 600 13px/1 var(--font-sans); color: var(--color-meta);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.editor__tabs button[aria-selected="true"] { color: #000; border-bottom-color: #000; }
.editor__body {
  width: 100%; min-height: 560px;
  border: 0; padding: 20px 0;
  font: 400 18px/1.7 var(--font-serif);
  resize: vertical;
}
.editor__body:focus { outline: none; }
.editor__preview { padding: 24px 0; min-height: 560px; }
.editor__help { font: 400 12px/1.6 var(--font-sans); color: var(--color-meta); border-top: 1px solid var(--color-rule); padding-top: 12px; }
.editor__help code { background: var(--color-bg-subtle); padding: 1px 5px; }
.editor__side { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.editor__panel { border: 1px solid var(--color-rule); padding: 20px; }
.editor__panel + .editor__panel { margin-top: 16px; }
.editor__panel-title { font: 600 11px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.editor__panel .field { margin-bottom: 16px; }
.editor__panel .input, .editor__panel .select { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.editor__image-preview { margin-bottom: 12px; background: var(--color-bg-subtle); }
.editor__image-preview img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.editor__buttons { display: grid; gap: 8px; }
.editor__buttons .btn { height: 44px; }

.flash {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translateX(-50%);
  background: #000; color: #fff;
  font: 500 14px/1 var(--font-sans);
  padding: 14px 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  animation: flash-out 4s forwards;
}
@keyframes flash-out { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 1279px) {
  .article-layout { grid-template-columns: 72px minmax(0, var(--body-measure)) minmax(24px, 1fr) 260px; }
}

@media (max-width: 1023px) {
  :root { --gutter: 32px; --gap: 24px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4.grid--ruled > :not(:nth-child(4n + 1))::before { content: none; }
  .grid--4.grid--ruled > :nth-child(2n)::before {
    content: ''; position: absolute; top: 0; bottom: 0;
    left: calc(var(--gap) / -2); border-left: 1px solid var(--color-rule);
  }
  .carousel__track { grid-auto-columns: calc((100% - 1.5 * var(--gap)) / 2.5); }
  .article-layout { grid-template-columns: 64px minmax(0, 1fr) 0 0; }
  .article-aside { display: none; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor__side { position: static; }
  .account-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .site-header__tagline, .header-link--wide { display: none; }
}

@media (max-width: 767px) {
  :root {
    --gutter: 16px; --gap: 20px;
    --type-body: 18px; --lh-body: 29px;
  }
  .site-header__inner { padding: 0 12px; grid-template-columns: auto 1fr auto; }
  .site-header__inner .logo { text-align: center; font-size: 28px; }
  .site-header__right { gap: 10px; }
  .site-header__right .btn--accent { display: none; }
  .section-nav ul { justify-content: flex-start; }
  .split, .article-hero { grid-template-columns: minmax(0, 1fr); }
  .split__media { order: -1; }
  .split__hed { font-size: 30px; line-height: 35px; }
  .feature-dark .split { padding: 0 0 24px; }
  .feature-dark .split__media img { margin: 0; max-height: none; aspect-ratio: 4 / 3; }
  .feature-image { min-height: 0; padding-top: 62%; align-items: end; }
  .feature-image > img { height: 62%; bottom: auto; }
  .feature-image::after { background: linear-gradient(180deg, rgba(0,0,0,0) 30%, #000 62%); }
  .feature-image .split__text { margin: 0 auto; padding: 24px 16px 32px; }
  .article-hero { min-height: 0; max-height: none; }
  .article-hero__media { order: -1; aspect-ratio: 4 / 3; }
  .article-hero__text { padding: 28px 16px 8px; }
  .article-hero__hed { font-size: 32px; line-height: 37px; }
  .article-caption { justify-content: flex-start; padding: 8px 16px 0; }
  .article-caption p { max-width: none; text-align: left; }
  .article-layout { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .article-rail { grid-column: 1; grid-row: 2; }
  .article-main { grid-column: 1; grid-row: 1; }
  .bookmark-btn { position: fixed; right: 16px; bottom: 16px; top: auto; z-index: 30; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .grid--ruled > *::before { content: none !important; }
  .grid--ruled > * + * { border-top: 1px solid var(--color-rule); padding-top: 24px; }
  .grid { gap: 24px; }
  .carousel__track { grid-auto-columns: 78%; }
  .river__item { grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; padding: 20px 0; }
  .river__media { order: 2; }
  .river__media img { aspect-ratio: 1 / 1; }
  .river__hed { font-size: 20px; line-height: 26px; }
  .river__dek { display: none; }
  .page-head { padding: 36px 0 28px; }
  .page-head__title { font-size: 40px; }
  .promo { grid-template-columns: minmax(0, 1fr); padding: 24px; text-align: center; }
  .promo__art { display: none; }
  .promo__title { font-size: 26px; line-height: 32px; }
  .promo__form { flex-direction: column; }
  .footer-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--color-rule); padding: 12px 0; }
  .table td { border: 0; padding: 4px 0; }
  .table__actions { text-align: left; }
  .table__actions a:first-child { margin-left: 0; }
  .admin-tabs form { margin-left: 0; width: 100%; }
  .admin-tabs .input { width: 100%; }
  .search-form input { font-size: 24px; }
  .auth { padding-top: 40px; }
  .block { margin-top: 48px; }
  .section-head { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
