/* ————————————————————————————————————————————
   HAIRPIN HEROES — design system
   Race paper: warm cream stock, espresso ink,
   road-sign condensed type, one signal accent.
   ———————————————————————————————————————————— */

:root {
  /* Six base colours — editable from the CMS (Site settings → Theme colours).
     Everything else below is derived from them. */
  --paper: #0f2d22;
  --ink: #ede6d4;
  --accent: #ff5a26;
  --gold: #c9a962;
  --panel-ink: #0b241b;
  --panel-text: #ede6d4;

  --paper-2: color-mix(in srgb, var(--ink) 8%, var(--paper));
  --paper-3: color-mix(in srgb, var(--ink) 5%, var(--paper));
  --ink-dim: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --line: color-mix(in srgb, var(--ink) 22%, transparent);
  --line-soft: color-mix(in srgb, var(--ink) 11%, transparent);
  --panel-bone: var(--panel-text);
  --panel-bone-dim: color-mix(in srgb, var(--panel-text) 62%, var(--panel-ink));

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --bodyface: "Literata", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 540px at 72% -10%, color-mix(in srgb, var(--gold) 7%, transparent), transparent 62%),
    radial-gradient(900px 640px at -12% 24%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 55%);
  color: var(--ink);
  font-family: var(--bodyface);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style-position: inside; }

::selection { background: var(--accent); color: var(--paper); }

/* ————— frame & spine ————— */

.frame { display: grid; grid-template-columns: 64px 1fr; min-height: 100vh; }

.spine {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  border-right: 1px solid var(--line-soft);
}

.spine-mark {
  position: absolute;
  bottom: 24px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}

.spine-mark em { font-style: italic; font-weight: 600; color: var(--accent); }

.spine-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
}


.page { min-width: 0; display: flex; flex-direction: column; }

/* ————— top bar ————— */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 48px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 18px;
  min-width: 0;
}

.wordmark {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.topbar-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wordmark em {
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
  margin-left: 4px;
}

.topbar-actions { display: flex; gap: 10px; }

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 42px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}

.search-btn svg { width: 17px; height: 17px; }
.search-btn:hover, .search-btn.open { border-color: var(--accent); color: var(--accent); }

.search-panel { display: none; }

.search-panel.open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 28px 44px rgba(0, 0, 0, 0.4);
  padding: 20px 48px 26px;
}

.search-input {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding: 6px 0 12px;
  outline: none;
}

.search-input::placeholder { color: var(--ink-dim); opacity: 0.6; }
.search-input:focus { border-bottom-color: var(--accent); }

.search-results { display: flex; flex-direction: column; }

.search-hit { padding: 14px 2px; border-bottom: 1px solid var(--line-soft); }

.search-hit-title {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  margin-top: 6px;
  transition: color 0.25s;
}

.search-hit:hover .search-hit-title { color: var(--accent); }
.search-empty { padding: 16px 2px 4px; }

.account-btn svg { width: 18px; height: 18px; color: var(--ink); }
.account-btn.is-authed { border-color: var(--accent); }
.account-btn.is-authed svg { color: var(--accent); }

/* ————— reader auth modal ————— */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.auth-modal[hidden] { display: none; }

.auth-card {
  position: relative;
  width: min(440px, 100%);
  background: var(--paper-3);
  border: 1px solid var(--line);
  padding: 38px 34px 34px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.auth-card h3 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 6px 0 10px;
}

.auth-note { color: var(--ink-dim); font-style: italic; margin-bottom: 20px; }

[data-auth-close] {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: 0;
  color: var(--ink-dim);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

[data-auth-form] { display: flex; flex-direction: column; gap: 12px; }
.auth-status { margin-top: 14px; color: var(--accent); }

/* shared reader inputs & buttons */

input[type="email"],
.acc-form input,
.acc-form textarea,
[data-cform] textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--bodyface);
  font-size: 16px;
  padding: 12px 14px;
}

[data-cform] textarea { min-height: 96px; resize: vertical; }

[data-auth-form] button,
[data-cform] button,
.acc-actions [data-save-profile] {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 12px 20px;
  cursor: pointer;
}

.c-signin,
.save-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 11px 18px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

.c-signin:hover,
.save-btn:hover { border-color: var(--accent); color: var(--accent); }
.save-btn { margin-top: 18px; color: var(--ink-dim); }
.save-btn.is-saved { color: var(--accent); border-color: var(--accent); }

/* ————— comments ————— */

.comments { max-width: 660px; margin: 84px auto 0; }
.comments-form { margin-top: 22px; }
[data-cform] { display: flex; flex-direction: column; gap: 12px; }

.c-item { display: flex; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line-soft); }
.c-main { flex: 1; min-width: 0; }
.c-meta { margin-bottom: 7px; }
.c-body { font-size: 17px; line-height: 1.6; }

.c-avatar, .avatar-lg {
  flex: none;
  border-radius: 50%;
  background-color: var(--paper-2);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink-dim);
  overflow: hidden;
}
.c-avatar { width: 38px; height: 38px; font-size: 17px; }
.c-avatar.has-img, .avatar-lg.has-img { color: transparent; }

.acc-avatar { display: flex; align-items: center; gap: 18px; margin: 4px 0 6px; }
.avatar-lg { width: 84px; height: 84px; font-size: 34px; border: 1px solid var(--line); }
.avatar-upload {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 10px 16px;
  cursor: pointer;
  color: var(--ink);
  transition: color 0.25s, border-color 0.25s;
}
.avatar-upload:hover { border-color: var(--accent); color: var(--accent); }
.c-del, .saved-x {
  background: none;
  border: 0;
  color: var(--ink-dim);
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.c-del:hover, .saved-x:hover { color: var(--accent); }

/* ————— account page ————— */

.acc-form { display: flex; flex-direction: column; gap: 18px; max-width: 520px; margin-top: 12px; }
.acc-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.acc-hint { text-transform: none; letter-spacing: 0; font-style: italic; color: var(--ink-dim); }
.acc-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.acc-note { font-style: italic; }
.acc-saved { margin-top: 52px; }
.saved-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.saved-title { font-family: var(--display); font-size: 23px; font-weight: 600; }
.saved-title:hover { color: var(--accent); }
.author-bio { margin-top: 16px; max-width: 52ch; }

.menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 42px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.25s;
}

.menu-btn:hover { border-color: var(--accent); }

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav { display: none; }

.nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 28px 44px rgba(0, 0, 0, 0.4);
  padding: 10px 48px 28px;
}

.nav.open a {
  font-family: var(--display);
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s, padding-left 0.25s;
}

.nav.open a:hover { color: var(--accent); padding-left: 12px; }
.nav.open a[aria-current] { color: var(--accent); }

main {
  width: 100%;
  max-width: 1376px;
  margin: 0 auto;
  padding: 0 48px;
  flex: 1;
}

/* ————— shared type ————— */

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.kicker.accent, .kicker.accent a { color: var(--accent); }

.meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.stand {
  font-size: 18px;
  font-style: italic;
  color: var(--ink-dim);
  line-height: 1.55;
}

.byline {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color 0.25s, border-color 0.25s;
}

.byline:hover { color: var(--accent); border-bottom-color: var(--accent); }
.feature-panel .byline:hover { color: var(--accent); border-bottom-color: var(--accent); }

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ————— slideshows: postcards & archive ————— */

.postcards { margin-bottom: 0; }

@keyframes slideFade {
  from { opacity: 0; }
}

.postcard-slide {
  display: none;
  grid-template-columns: 1fr 340px;
  border: 1px solid var(--line-soft);
  background: var(--panel-ink);
  color: inherit;
}

.postcard-slide.is-active { display: grid; animation: slideFade 0.7s ease; }

.postcard-slide--flip { grid-template-columns: 340px 1fr; }
.postcard-slide--flip .postcard-photo { order: 2; }
.postcard-slide--flip .postcard-sheet { order: 1; }

.postcard-photo { min-width: 0; }

.postcard-photo img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  display: block;
}

.postcard-sheet {
  display: flex;
  flex-direction: column;
  padding: 26px 28px;
  background: var(--panel-ink);
  color: var(--panel-bone);
}

.sheet-title {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 0.98;
  margin: 8px 0 18px;
  transition: color 0.25s;
}

a.postcard-slide:hover .sheet-title { color: var(--accent); }

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spec-label { color: var(--panel-bone-dim); }
.spec-value { color: var(--panel-bone); text-align: right; }

.sheet-caption { margin-top: auto; padding-top: 18px; color: var(--panel-bone-dim); }

.arch-slide {
  display: none;
  position: relative;
  color: inherit;
}

.arch-slide.is-active { display: block; animation: slideFade 0.7s ease; }

.arch-slide img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--line-soft);
}

.arch-panel {
  position: absolute;
  left: 28px;
  bottom: 28px;
  max-width: min(70%, 560px);
  background: var(--panel-ink);
  color: var(--panel-bone);
  padding: 20px 26px;
  border: 1px solid var(--line-soft);
}

.arch-panel h4 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 0.98;
  margin-top: 8px;
  transition: color 0.25s;
}

.arch-slide:hover .arch-panel h4 { color: var(--accent); }

.postcard-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.postcard-nav { display: flex; gap: 8px; }

.postcard-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 34px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}

.postcard-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ————— featured story ————— */

.feature {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  margin-top: 64px;
}

.feature-first { margin-top: 72px; }

.feature-media {
  grid-column: 1 / 9;
  grid-row: 1;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.feature-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.feature:hover .feature-media img { transform: scale(1.025); }

.feature-panel {
  grid-column: 7 / 13;
  grid-row: 1;
  z-index: 2;
  background: var(--panel-ink);
  color: var(--panel-bone);
  padding: 38px 42px;
  margin-bottom: 56px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.feature-panel .kicker { color: var(--panel-bone-dim); }
.feature-panel .kicker.accent { color: var(--accent); }
.feature-panel .meta { color: var(--panel-bone-dim); margin-top: 20px; }
.feature-panel .stand { color: var(--panel-bone-dim); }

.feature-title {
  font-family: var(--display);
  font-size: clamp(32px, 3.8vw, 52px);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 0.98;
  margin: 14px 0 16px;
}

.feature-title a:hover { color: var(--accent); }

.readmore {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.readmore:hover { border-bottom-color: var(--accent); }

/* ————— sections ————— */

.section { margin: 110px 0; }
.section-tight { margin-top: 48px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 48px;
}

.section-head .rule { flex: 1; border-top: 1px solid var(--line); transform: translateY(-4px); }

/* ————— story feed ————— */

.feed {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 72px 44px;
}

.card {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.card-media {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  margin-bottom: 20px;
  background: var(--panel-ink);
}

.card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.card:hover .card-media img { transform: scale(1.035); }

.card .meta .cat { color: var(--accent); }

.card-title {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 0.98;
  margin: 10px 0 10px;
}

.card-title a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s ease;
  padding-bottom: 4px;
}

.card:hover .card-title a { background-size: 100% 2px; }

.card-stand {
  color: var(--ink-dim);
  font-style: italic;
  font-size: 16px;
  max-width: 46ch;
}

/* ————— category page ————— */

.cat-hero {
  position: relative;
  padding: 96px 0 24px;
}

.cat-hero-art {
  position: absolute;
  right: 0;
  bottom: 12px;
  width: clamp(240px, 32vw, 440px);
  pointer-events: none;
  user-select: none;
}

.cat-hero-body { position: relative; z-index: 1; }

.cat-hero h1 {
  font-family: var(--display);
  font-size: clamp(56px, 8.5vw, 120px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.9;
  margin-top: 16px;
}

.cat-hero .stand { max-width: 46ch; margin-top: 18px; }

/* ————— story list (category page) ————— */

.story-list { border-top: 2px solid var(--ink); }

.story-row {
  display: grid;
  grid-template-columns: 130px 1fr 210px;
  gap: 36px;
  align-items: center;
  padding: 34px 10px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, padding 0.3s;
}

.story-row:hover { background: var(--paper-2); padding-left: 22px; padding-right: 22px; }

.story-row h3 {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 0.98;
  transition: color 0.25s;
}

.story-row:hover h3 { color: var(--accent); }

.story-main p { color: var(--ink-dim); font-style: italic; font-size: 16px; margin-top: 9px; max-width: 60ch; }
.story-main .meta { display: block; margin-top: 14px; }

.story-thumb { overflow: hidden; border: 1px solid var(--line-soft); background: var(--panel-ink); }

.story-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.story-row:hover .story-thumb img { transform: scale(1.04); }

.empty { padding: 48px 0; }

/* ————— article page ————— */

.post-head {
  max-width: 860px;
  margin: 88px auto 0;
  text-align: center;
}

.post-title {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.9;
  margin: 22px 0 24px;
}

.post-stand {
  font-size: 21px;
  font-style: italic;
  color: var(--ink-dim);
  line-height: 1.5;
  max-width: 36em;
  margin: 0 auto;
}

.post-meta { margin-top: 30px; }
.post-meta span { color: var(--accent); padding: 0 7px; }

.post-hero { margin: 52px auto 80px; max-width: 1140px; }

.post-hero img {
  width: 100%;
  aspect-ratio: 21 / 10;
  object-fit: cover;
  border: 1px solid var(--line-soft);
}

.post-hero figcaption { margin-top: 13px; }

.post-body {
  max-width: 660px;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.75;
}

.page-body { margin-top: 56px; }

.post-body p { margin-bottom: 1.55em; }

.post-body:not(.page-body) > p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 5em;
  font-weight: 700;
  float: left;
  line-height: 0.82;
  padding: 4px 16px 0 0;
  color: var(--accent);
}

.post-body h2 {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.02;
  margin: 2.1em 0 0.7em;
}

.post-body h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  margin: 1.9em 0 0.65em;
}

.post-body a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: color 0.25s, border-color 0.25s;
}

.post-body a:hover { border-bottom-color: var(--accent); }

.post-body img,
.post-body .video-embed {
  width: min(88vw, 900px);
  margin-left: calc((100% - min(88vw, 900px)) / 2);
  margin-top: 56px;
  margin-bottom: 56px;
  border: 1px solid var(--line-soft);
}

.post-body blockquote {
  margin: 64px 0;
  padding: 38px 24px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.post-body blockquote p {
  font-family: var(--bodyface);
  font-style: italic;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
}

.post-body blockquote p + p { margin-top: 14px; font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); }

.video-embed {
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.post-end {
  max-width: 660px;
  margin: 80px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.post-end svg { width: 15px; color: var(--accent); flex-shrink: 0; }
.post-end a { color: var(--ink); border-bottom: 1px solid var(--line); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 2px solid var(--ink);
  margin-top: 88px;
}

.post-nav a { padding: 38px 24px; transition: background 0.3s; }
.post-nav a:hover { background: var(--paper-2); }
.post-nav a + a, .post-nav span + a { border-left: 1px solid var(--line); text-align: right; }

.post-nav h4 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.0;
  margin-top: 12px;
}

.post-nav a:hover h4 { color: var(--accent); }

/* ————— footer (inverted ink block) ————— */

.footer {
  background: var(--panel-ink);
  color: var(--panel-bone);
  border-top: none;
  margin-top: 0;
  padding: 26px 48px 30px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.footer { color: var(--panel-bone); }
.footer .meta { color: var(--panel-bone-dim); }
.footer .wordmark em { color: var(--accent); }

.wordmark-sm { font-size: 19px; }

.footer-tag {
  font-family: var(--bodyface);
  font-style: italic;
  color: var(--panel-bone-dim);
  font-size: 15px;
  margin-top: 5px;
}

.footer-nav { display: flex; flex-direction: column; gap: 7px; }
.footer-nav a:hover, .footer-right a:hover { color: var(--panel-bone); }

.footer-right { display: flex; flex-direction: column; gap: 7px; text-align: right; }

/* ————— responsive ————— */


@media (max-width: 1024px) {
  .feature-panel { grid-column: 5 / 13; padding: 30px 32px; }
  .feature-media { grid-column: 1 / 10; }
}

@media (max-width: 900px) {
  .frame { grid-template-columns: 1fr; }
  .spine { display: none; }
  main { padding: 0 20px; }
  .topbar { padding: 12px 20px; }

  .nav.open { padding: 6px 20px 20px; }
  .nav.open a { font-size: 30px; padding: 14px 2px; }
  .topbar-tag { display: none; }
  .wordmark { font-size: 26px; }
  .search-panel.open { padding: 16px 20px 22px; }
  .search-input { font-size: 26px; }

  .postcard-slide.is-active,
  .postcard-slide--flip.is-active { grid-template-columns: 1fr; }
  .postcard-slide--flip .postcard-photo { order: 0; }
  .postcard-slide--flip .postcard-sheet { order: 1; }
  .postcard-photo img { min-height: 0; aspect-ratio: 4 / 3; }
  .postcard-btn { width: 48px; height: 44px; }

  .arch-slide img { aspect-ratio: 4 / 3; }
  .arch-panel { position: static; max-width: none; border-top: 0; }

  .feature-first { margin-top: 40px; }

  .feature { display: block; }
  .feature-panel { margin: -56px 16px 0; position: relative; }

  .feed { display: block; }
  .card { margin: 0 0 56px; }
  .card-title { font-size: 30px; }

  .cat-hero { padding-top: 56px; }
  .cat-hero-art { width: 200px; bottom: auto; top: 20px; opacity: 0.55; }

  .story-row { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
  .story-thumb { order: -1; width: 100%; }
  .story-row:hover { padding-left: 10px; padding-right: 10px; }

  .section { margin: 72px 0; }
  .section-tight { margin-top: 36px; }

  .post-head { margin-top: 56px; text-align: left; }
  .post-stand { margin: 0; }
  .post-hero { margin: 36px auto 48px; }
  .post-hero img { aspect-ratio: 16 / 10; }
  .post-body img,
  .post-body .video-embed { width: 100%; margin-left: 0; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a + a, .post-nav span + a { border-left: 0; border-top: 1px solid var(--line); text-align: left; }

  .footer { padding: 24px 20px 30px; margin-top: 0; }
  .footer-right { text-align: left; }
}
