/* ==========================================================================
   Modern Observers — main.css
   Light agency-meets-blog theme. The one recurring idea is the "window":
   every story is a tile with a small title bar (topic tab + three dots),
   echoing the brief's card-and-tile layout.
   ========================================================================== */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --ink: #1e293b;          /* Deep Slate — headings, dark tiles, footer */
  --ink-2: #334155;
  --text: #1f2a3b;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f8fafc;           /* Warm Light — page background */
  --surface: #ffffff;
  --blue: #2563eb;         /* Modern Blue — actions, links */
  --blue-dark: #1d4ed8;
  --blue-soft: #eaf1fe;
  --blue-line: #bfd3fb;
  --success: #15803d;
  --error: #b91c1c;

  --font: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-read: "Literata", Georgia, "Times New Roman", serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-xs: 7px;

  --gutter: clamp(16px, 3vw, 32px);
  --max: 1240px;
  --header-h: 72px;
  --logo-h: 40px;

  --shadow-lift: 0 18px 40px -22px rgba(30, 41, 59, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --tone-bg: #eef2f6;
  --tone-ink: #334155;
}

/* Topic tints. Applied to tiles, tabs, archive headers and shelves. */
.tone-home     { --tone-bg: #e7f3ec; --tone-ink: #256b4a; }
.tone-habits   { --tone-bg: #fdeee3; --tone-ink: #9a4413; }
.tone-tech     { --tone-bg: #e6eeff; --tone-ink: #1d4ed8; }
.tone-travel   { --tone-bg: #e2f4f6; --tone-ink: #0e6c80; }
.tone-discover { --tone-bg: #f1ecfd; --tone-ink: #6232c9; }
.tone-slate    { --tone-bg: #eef2f6; --tone-ink: #334155; }

/* ── Reset / base ───────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: #cfe0ff; color: var(--ink); }

.u-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--article { max-width: calc(780px + var(--gutter) * 2); }

.section { padding-top: clamp(48px, 6vw, 80px); }
.section--flush-top { padding-top: 8px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }

.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--blue-soft); }

.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

/* ── Shared atoms: tab, dots, meta, arrow, chip ─────────────────────────── */
.tab {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: var(--r-xs);
  background: var(--tone-bg);
  color: var(--tone-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: filter 0.18s;
}
a.tab:hover { filter: brightness(0.96) saturate(1.2); }

.card__dots {
  display: inline-flex;
  gap: 5px;
  flex-shrink: 0;
}
.card__dots i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-2);
}
.card__dots i:first-child { background: var(--tone-ink); opacity: 0.55; }

.meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}
.meta__sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.arrow { width: 18px; height: 18px; flex-shrink: 0; }

.chip {
  display: inline-flex;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.link-more:hover { color: var(--blue-dark); }
.link-more:hover .arrow { transform: translate(2px, -2px); }
.link-more .arrow { transition: transform 0.2s var(--ease); }

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.crumbs > a:hover { color: var(--blue); }

/* ── Reading progress ───────────────────────────────────────────────────── */
.read-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 3px;
  pointer-events: none;
}
.read-progress__fill { width: 0; height: 100%; background: var(--blue); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  transition: box-shadow 0.2s;
}
.site-header--scrolled { box-shadow: 0 10px 30px -24px rgba(30, 41, 59, 0.5); }

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}
/* Height comes from Customizer → Site Identity → Header Logo Height. */
.brand__img {
  width: auto;
  height: var(--logo-h);
  max-width: min(560px, 42vw);
  object-fit: contain;
  object-position: left center;
}

/* Phones: keep the logo from crowding out the menu button. */
@media (max-width: 599px) {
  .brand__img { height: min(var(--logo-h), 48px); max-width: 58vw; }
}
.brand__name {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-primary { display: none; margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.18s, color 0.18s;
}
.nav-list a:hover { background: var(--blue-soft); color: var(--blue-dark); }
.nav-list .current-menu-item > a,
.nav-list .current-category-ancestor > a,
.nav-list .current-post-ancestor > a { background: var(--ink); color: #fff; }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
}
.nav-toggle__bar:last-child { width: 12px; margin-left: 6px; }

@media (max-width: 419px) {
  .site-header__subscribe { display: none; }
}

@media (min-width: 1180px) {
  .nav-primary { display: block; }
  .nav-toggle { display: none; }
  .site-header__actions { margin-left: 8px; }
}

/* ── Mobile drawer ──────────────────────────────────────────────────────── */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.drawer[hidden] { display: none; }

.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  transition: opacity 0.25s;
}

.drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(400px, 88vw);
  background: var(--surface);
  box-shadow: -20px 0 50px -20px rgba(15, 23, 42, 0.35);
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.drawer__head .brand__img { height: min(var(--logo-h), 40px); max-width: 220px; }

.drawer__nav { padding: 12px 12px 0; }

.drawer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.drawer__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.drawer__list li + li { border-top: 1px solid var(--line); }
.drawer__list a:hover,
.drawer__list .current-menu-item > a { background: var(--blue-soft); color: var(--blue-dark); }

.drawer__foot {
  margin-top: auto;
  padding: 20px;
}
.drawer__lead {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.drawer__foot .btn { margin-top: 4px; }

/* Desktop never needs the drawer, even if JS left it open across a resize. */
@media (min-width: 1180px) {
  .drawer { display: none !important; }
}

/* ── Intro ──────────────────────────────────────────────────────────────── */
.intro { padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 3vw, 36px); }

.intro__inner {
  display: grid;
  gap: 24px;
}

.intro__title {
  max-width: 17ch;
  font-size: clamp(2.2rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.intro__aside {
  display: grid;
  gap: 20px;
  justify-items: start;
  max-width: 440px;
}
.intro__sub { color: var(--ink-2); font-size: 1.075rem; }

@media (min-width: 960px) {
  .intro__inner {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: end;
    gap: 48px;
  }
  .intro__aside { justify-self: end; padding-bottom: 8px; }
}

/* ── Card (the "window") ────────────────────────────────────────────────── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.card__media {
  display: block;
  margin: 0 12px;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--tone-bg);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.card:hover .card__media img { transform: scale(1.035); }

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 16px 18px 18px;
}

.card__title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.card__title a { transition: color 0.18s; }
/* Whole tile is clickable; the tab sits above this overlay. */
.card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.card:hover .card__title a { color: var(--blue-dark); }

.card__excerpt {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}
.card__foot .arrow {
  width: 34px; height: 34px;
  padding: 8px;
  border-radius: 50%;
  background: var(--tone-bg);
  color: var(--tone-ink);
  transition: background-color 0.2s, color 0.2s, transform 0.25s var(--ease);
}
.card:hover .card__foot .arrow { background: var(--blue); color: #fff; transform: rotate(45deg); }

/* No artwork: the tile carries its topic tint instead of an image. */
.card--no-media { background: var(--tone-bg); border-color: transparent; }
.card--no-media .card__body { padding-top: 28px; }
.card--no-media .card__title { font-size: 1.4rem; }
.card--no-media .card__foot .arrow { background: #fff; }
.card--no-media .tab { background: #fff; }

/* ── Homepage tiles ─────────────────────────────────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 440px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.feature__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.feature:hover .feature__img { transform: scale(1.03); }
.feature__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.55) 0%, rgba(30, 41, 59, 0) 26%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.55) 45%, rgba(15, 23, 42, 0) 75%);
}
.feature--no-media .feature__scrim { display: none; }

.feature__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.feature__label { color: #9dbcff; font-size: 14px; font-weight: 700; }
.feature .card__dots i { background: rgba(255, 255, 255, 0.35); }
.feature .card__dots i:first-child { background: var(--blue); opacity: 1; }

.feature__body {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: clamp(20px, 3.5vw, 36px);
  max-width: 760px;
}
.feature__title {
  color: #fff;
  font-size: clamp(1.75rem, 3.6vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.feature__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.feature__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.feature__excerpt {
  max-width: 56ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feature .meta { color: rgba(255, 255, 255, 0.72); }

@media (min-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .feature { grid-column: 1 / -1; min-height: 480px; }
}

@media (min-width: 1024px) {
  .tiles { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
  .tiles > * { grid-column: span 4; }
  .tiles .feature { grid-column: span 8; min-height: 540px; }
  .tiles .card--tall { grid-column: span 4; }
  .tiles .card--tall .card__media { flex: 1; aspect-ratio: auto; min-height: 200px; }
  .tiles .card--tall .card__body { flex: 0 0 auto; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  /* Four windows under the feature: keep them as an even 2x2. */
  .tiles .card--tall .card__excerpt { -webkit-line-clamp: 2; }
}

/* ── Section heads ──────────────────────────────────────────────────────── */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 24px;
}
.sec-head__title {
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  letter-spacing: -0.03em;
}

/* ── Topics ─────────────────────────────────────────────────────────────── */
.topics {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 300px);
  gap: 14px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
}

.topic {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--tone-bg);
  scroll-snap-align: start;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.topic:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.topic__name {
  color: var(--tone-ink);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.topic__desc { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.topic__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  color: var(--tone-ink);
  font-size: 14px;
  font-weight: 700;
}
.topic__foot .arrow {
  width: 34px; height: 34px;
  padding: 8px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s var(--ease);
}
.topic:hover .topic__foot .arrow { transform: rotate(45deg); }

@media (min-width: 720px) {
  .topics {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-inline: 0;
    padding: 0;
    overflow: visible;
  }
  .topic { grid-column: span 2; }
  .topic:nth-child(4) { grid-column: 2 / span 2; }
}

@media (min-width: 1100px) {
  .topics { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .topic,
  .topic:nth-child(4) { grid-column: auto; }
}

/* ── Grids ──────────────────────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 .card--wide { grid-column: 1 / -1; }
  .grid-3 .card--wide .card__media { aspect-ratio: 2 / 1; }
  .grid-3 .card--wide .card__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.12; }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .grid-3 .card--wide { grid-column: span 2; grid-row: span 2; }
  .grid-3 .card--wide .card__media { flex: 1; aspect-ratio: auto; min-height: 300px; }
  .grid-3 .card--wide .card__body { flex: 0 0 auto; padding: 20px 24px 22px; }
  .grid-3 .card--wide .card__excerpt { font-size: 16px; }
}

/* ── Topic shelves ──────────────────────────────────────────────────────── */
.shelf__box {
  display: grid;
  gap: 24px;
  padding: clamp(20px, 3.5vw, 36px);
  border-radius: calc(var(--r-lg) + 6px);
  background: var(--tone-bg);
}

.shelf__head {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.shelf__title { color: var(--tone-ink); font-size: clamp(1.6rem, 2.8vw, 2.2rem); letter-spacing: -0.03em; }
.shelf__desc { max-width: 52ch; color: var(--ink-2); }
.shelf .link-more { color: var(--tone-ink); margin-top: 4px; }

.shelf__grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(80%, 300px);
  gap: 14px;
  margin-inline: calc(clamp(20px, 3.5vw, 36px) * -1);
  padding: 2px clamp(20px, 3.5vw, 36px) 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: clamp(20px, 3.5vw, 36px);
  scrollbar-width: thin;
}
.shelf__grid .card { scroll-snap-align: start; border-color: transparent; }
.shelf__grid .card--no-media { background: #fff; }
.shelf__grid .card--no-media .tab,
.shelf__grid .card--no-media .card__foot .arrow { background: var(--tone-bg); }

/* The peeking next card already signals the swipe; hide the OS scrollbar. */
.topics,
.shelf__grid { scrollbar-width: none; }
.topics::-webkit-scrollbar,
.shelf__grid::-webkit-scrollbar { display: none; }

@media (min-width: 720px) {
  .shelf__grid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: 0;
    padding: 0;
    overflow: visible;
  }
}

@media (min-width: 900px) {
  .shelf__head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 32px; }
  .shelf__head .shelf__title,
  .shelf__head .shelf__desc { grid-column: 1; }
  .shelf__head .link-more { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
}

@media (min-width: 1100px) {
  .shelf__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Newsletter box ─────────────────────────────────────────────────────── */
.newsletter { padding: clamp(56px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); }

.newsletter__box {
  position: relative;
  display: grid;
  gap: 28px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: calc(var(--r-lg) + 8px);
  background: var(--blue);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.newsletter__copy { display: grid; gap: 14px; max-width: 560px; }
.newsletter__title {
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.newsletter__sub { color: rgba(255, 255, 255, 0.86); font-size: 1.1rem; }

.newsletter__form { position: relative; z-index: 1; max-width: 560px; }

/* Three stacked window outlines, the site's motif at poster scale. */
.newsletter__art {
  position: absolute;
  right: -40px;
  top: -30px;
  z-index: -1;
  width: 340px;
  height: 260px;
  pointer-events: none;
}
.newsletter__art span {
  position: absolute;
  width: 240px;
  height: 160px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18px 16px, rgba(255, 255, 255, 0.5) 3.5px, transparent 4.5px),
    radial-gradient(circle at 32px 16px, rgba(255, 255, 255, 0.3) 3.5px, transparent 4.5px),
    radial-gradient(circle at 46px 16px, rgba(255, 255, 255, 0.3) 3.5px, transparent 4.5px),
    linear-gradient(rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.07));
}
.newsletter__art span:nth-child(1) { top: 0; right: 40px; transform: rotate(-6deg); }
.newsletter__art span:nth-child(2) { top: 50px; right: 0; transform: rotate(4deg); }
.newsletter__art span:nth-child(3) { top: 100px; right: 70px; transform: rotate(-2deg); }

@media (max-width: 959px) {
  .newsletter__art { opacity: 0.45; right: -120px; top: -80px; }
}

@media (min-width: 960px) {
  .newsletter__box {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
  }
  .newsletter__art { right: -70px; top: auto; bottom: -150px; opacity: 0.7; }
}

/* ── Subscribe form (shared by box, popup, widget) ──────────────────────── */
.subscribe { display: grid; gap: 12px; }

.subscribe__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subscribe__input {
  flex: 1 1 220px;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
  transition: border-color 0.18s, box-shadow 0.18s;
}
.subscribe__input::placeholder { color: #94a3b8; }
.subscribe__input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.subscribe__btn { height: 52px; flex: 0 0 auto; }

.subscribe__note { color: var(--muted); font-size: 13.5px; }
.subscribe__note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.subscribe__note a:hover { color: var(--blue); }

.subscribe--stacked .subscribe__row { flex-direction: column; }
.subscribe--stacked .subscribe__input { flex-basis: auto; width: 100%; }
.subscribe--stacked .subscribe__btn { width: 100%; }

/* On the blue box: white field, slate button so the action still stands out. */
.subscribe--light .subscribe__input { border-color: transparent; }
.subscribe--light .subscribe__input:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35); }
.subscribe--light .subscribe__btn { background: var(--ink); }
.subscribe--light .subscribe__btn:hover { background: #0f172a; }
.subscribe--light .subscribe__note { color: rgba(255, 255, 255, 0.82); }
.subscribe--light .subscribe__note a:hover { color: #fff; }

@media (max-width: 479px) {
  .subscribe__row { flex-direction: column; }
  .subscribe__input { flex-basis: auto; width: 100%; }
  .subscribe__btn { width: 100%; }
}

.newsletter-form__msg {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 600;
}
.newsletter-form__msg[hidden] { display: none; }
.newsletter-form__msg--success { background: #dcfce7; color: var(--success); }
.newsletter-form__msg--error { background: #fee2e2; color: var(--error); }

/* ── Popup ──────────────────────────────────────────────────────────────── */
.modal {
  width: min(500px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: calc(var(--r-lg) + 4px);
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.modal::backdrop {
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal[open] { animation: modal-in 0.28s var(--ease); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal__card {
  position: relative;
  max-height: calc(100dvh - 32px);
  border-radius: inherit;
  background: var(--surface);
  overflow: auto;
  box-shadow: 0 30px 80px -30px rgba(15, 23, 42, 0.6);
}

.modal__bar {
  display: flex;
  gap: 6px;
  padding: 18px 22px;
  background: var(--ink);
}
.modal__bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}
.modal__bar i:first-child { background: var(--blue); }

.modal__close {
  position: absolute;
  top: 7px; right: 10px;
  border-color: transparent;
  background: transparent;
  color: #fff;
}
.modal__close:hover { border-color: rgba(255, 255, 255, 0.4); }

.modal__body {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 5vw, 36px);
}
.modal__title { font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.08; letter-spacing: -0.03em; }
.modal__sub { color: var(--ink-2); margin-bottom: 6px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  padding: clamp(48px, 6vw, 72px) 0 28px;
  background: var(--ink);
  color: #cbd5e1;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 24px;
  padding-bottom: 40px;
}

.footer-brand {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  justify-items: start;
  max-width: 440px;
}

.footer-logo { display: block; width: 100%; }
/* Render any uploaded logo as a single white mark on the slate footer. */
.footer-logo__img {
  /* Width-driven, so very wide wordmarks fill the column instead of shrinking;
     the Customizer logo height still caps squarer logos. */
  width: auto;
  max-width: min(420px, 100%);
  height: auto;
  max-height: max(var(--logo-h), 40px);
  filter: brightness(0) invert(1);
}
.footer-logo__name { color: #fff; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }

.footer-brand__desc { color: #94a3b8; font-size: 15px; }

.footer-col__heading {
  margin-bottom: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.footer-col__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-col__list a { color: #cbd5e1; font-size: 15px; transition: color 0.18s; }
.footer-col__list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
  .footer-brand { grid-column: auto; }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13.5px;
  color: #94a3b8;
}
.footer-bottom__link:hover { color: #fff; }

/* ── Article ────────────────────────────────────────────────────────────── */
.article-header { padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 3vw, 32px); }
.article-header__inner { max-width: 820px; }

.article-header__title {
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.article-header__dek {
  margin-top: 18px;
  color: var(--ink-2);
  font-family: var(--font-read);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.article-header__meta { margin-top: 20px; }

.article-hero { margin: 0 0 clamp(28px, 4vw, 48px); }
.article-hero__frame {
  border-radius: calc(var(--r-lg) + 4px);
  overflow: hidden;
  background: var(--tone-bg);
}
.article-hero__img {
  width: 100%;
  max-height: 640px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.article-hero__caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.article-hero--page .article-hero__img { aspect-ratio: 2 / 1; }

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}
.single-layout__main { min-width: 0; max-width: 720px; width: 100%; margin-inline: auto; }

@media (min-width: 1100px) {
  .single-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 64px; align-items: start; }
  .single-layout__main { margin-inline: 0; }
  .single-layout__side { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ── Long-form content ──────────────────────────────────────────────────── */
.entry-content {
  color: var(--text);
  font-family: var(--font-read);
  font-size: 1.125rem;
  line-height: 1.78;
  overflow-wrap: break-word;
}
.entry-content > * + * { margin-top: 1.25em; }
.entry-content > :first-child { margin-top: 0; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2em;
  font-family: var(--font);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.entry-content h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); letter-spacing: -0.025em; }
.entry-content h3 { font-size: 1.35rem; }
.entry-content h4 { font-size: 1.12rem; }
.entry-content h2 + *,
.entry-content h3 + *,
.entry-content h4 + * { margin-top: 0.6em; }

.entry-content a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.entry-content a:hover { color: var(--blue-dark); text-decoration-thickness: 2px; }

.entry-content strong { font-weight: 600; color: var(--ink); }

.entry-content ul,
.entry-content ol { padding-left: 0; list-style: none; }
.entry-content li { position: relative; padding-left: 2em; }
.entry-content li + li { margin-top: 0.55em; }
.entry-content ul > li::before {
  content: "";
  position: absolute;
  left: 0.5em;
  top: 0.68em;
  width: 8px; height: 8px;
  border-radius: 3px;
  background: var(--blue);
  transform: rotate(45deg);
}
.entry-content ol { counter-reset: item; }
.entry-content ol > li { counter-increment: item; }
.entry-content ol > li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0.22em;
  display: grid;
  place-items: center;
  width: 1.5em; height: 1.5em;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-family: var(--font);
  font-size: 0.8em;
  font-weight: 700;
  line-height: 1;
}
.entry-content li > ul,
.entry-content li > ol { margin-top: 0.55em; }

.entry-content blockquote,
.entry-content .wp-block-quote {
  position: relative;
  margin: 2em 0;
  padding: 28px 28px 24px 30px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.55;
}
.entry-content blockquote::before {
  content: "\201C";
  display: block;
  height: 0.55em;
  color: var(--blue);
  font-family: var(--font);
  font-size: 3.2rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}
.entry-content blockquote p + p { margin-top: 0.8em; }
.entry-content blockquote cite,
.entry-content .wp-block-quote cite {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
}

.entry-content .wp-block-pullquote {
  margin: 2em 0;
  padding: 0;
  border: 0;
}
.entry-content .wp-block-pullquote blockquote { margin: 0; }

.entry-content img:not(.emoji) {
  height: auto;
  border-radius: var(--r-md);
}
.entry-content figure { margin-inline: 0; }
.entry-content figcaption,
.entry-content .wp-caption-text {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.entry-content .wp-caption { max-width: 100%; }

.entry-content .alignwide { margin-inline: 0; }
.entry-content .aligncenter { margin-inline: auto; }
@media (min-width: 720px) {
  .entry-content .alignleft { float: left; max-width: 50%; margin: 0.3em 1.5em 1em 0; }
  .entry-content .alignright { float: right; max-width: 50%; margin: 0.3em 0 1em 1.5em; }
}

.entry-content hr {
  height: 1px;
  margin: 2.5em 0;
  border: 0;
  background: var(--line);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font);
  font-size: 15px;
}
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content th,
.entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { color: var(--ink); background: var(--bg); }

.entry-content code {
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: #eef2f6;
  font-family: var(--font-code);
  font-size: 0.85em;
}
.entry-content pre {
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #e2e8f0;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}
.entry-content pre code { padding: 0; background: none; }

.entry-content iframe,
.entry-content video { max-width: 100%; border-radius: var(--r-md); }

.entry-content::after { content: ""; display: table; clear: both; }

/* "Source: …" attribution line at the end of rewritten stories. */
.entry-content .source-note {
  margin-top: 2.2em;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
}
.entry-content .source-note a { color: var(--ink-2); font-weight: 600; }

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

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.article-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 40px;
}
.article-nav__item {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.article-nav__item:hover { border-color: var(--blue-line); box-shadow: var(--shadow-lift); }
.article-nav__label { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.article-nav__title { color: var(--ink); font-weight: 700; line-height: 1.3; }
.article-nav__item--next { text-align: right; }

@media (min-width: 640px) {
  .article-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-nav__item--next:only-child { grid-column: 2; }
}

/* ── Sidebar widgets ────────────────────────────────────────────────────── */
.sidebar { display: grid; gap: 20px; }

.widget {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.widget__title {
  margin-bottom: 16px;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}
.widget__text { margin-bottom: 16px; color: var(--ink-2); font-size: 15px; }

.widget--newsletter { background: var(--blue-soft); border-color: var(--blue-line); }
.widget--newsletter .subscribe__input { border-color: var(--blue-line); }

.widget--about { background: var(--ink); border-color: var(--ink); color: #cbd5e1; }
.widget--about .widget__title { color: #fff; }
.widget--about .widget__text { color: #cbd5e1; }

.mini-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.mini {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.mini__media {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-sm);
  background: var(--tone-bg);
  overflow: hidden;
}
.mini__media img { width: 100%; height: 100%; object-fit: cover; }
.mini__body { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.mini .tab { padding: 3px 8px; font-size: 12px; }
.mini__title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mini__title:hover { color: var(--blue-dark); }

.topic-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.topic-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.18s;
}
.topic-list__item:hover { background: var(--tone-bg); color: var(--tone-ink); }
.topic-list__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--tone-ink); opacity: 0.8; }
.topic-list__name { flex: 1; min-width: 0; }
.topic-list__count {
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tone-bg);
  color: var(--tone-ink);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

/* Core widgets someone might still drop into the sidebar. */
.widget ul:not(.mini-list):not(.topic-list) { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.widget ul:not(.mini-list):not(.topic-list) a { color: var(--ink); font-weight: 600; }
.widget ul:not(.mini-list):not(.topic-list) a:hover { color: var(--blue); }
.widget select,
.widget input[type="text"] { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font: inherit; }

/* ── Related ────────────────────────────────────────────────────────────── */
.related .card__title { font-size: 1.12rem; }

/* ── Archive ────────────────────────────────────────────────────────────── */
.archive-hero { padding: clamp(20px, 3vw, 32px) 0 clamp(24px, 3vw, 36px); }

.archive-hero__box {
  position: relative;
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: clamp(24px, 5vw, 56px);
  border-radius: calc(var(--r-lg) + 8px);
  background: var(--tone-bg);
  overflow: hidden;
}
.archive-hero__box .crumbs { margin-bottom: 4px; }

.archive-hero__title {
  max-width: 18ch;
  color: var(--ink);
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.archive-hero__desc { max-width: 58ch; color: var(--ink-2); font-size: 1.1rem; }
.archive-hero__count {
  margin-top: 4px;
  padding: 6px 12px;
  border-radius: var(--r-xs);
  background: #fff;
  color: var(--tone-ink);
  font-size: 14px;
  font-weight: 700;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination { margin-top: 48px; }
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.pagination .page-numbers,
.pagination .nav-links > span,
.pagination .nav-links > a {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}
.pagination a.page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination .page-numbers.dots { border-color: transparent; background: none; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty {
  display: grid;
  gap: 14px;
  justify-items: center;
  max-width: 560px;
  margin: 24px auto 0;
  padding: 0 0 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
  overflow: hidden;
}
.empty__bar {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.empty__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.empty__title { padding: 0 24px; font-size: 1.6rem; }
.empty__text { padding: 0 24px; color: var(--ink-2); }
.empty .btn { margin-top: 8px; }

/* ── Static pages ───────────────────────────────────────────────────────── */
.page-header { padding: clamp(28px, 5vw, 56px) 0 clamp(20px, 3vw, 32px); }
.page-header__title {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.page-header .meta { margin-top: 14px; }

.page-content { padding-bottom: 8px; }

/* Contact Form 7 and generic forms inside pages. */
.entry-content input[type="text"],
.entry-content input[type="email"],
.entry-content input[type="tel"],
.entry-content input[type="url"],
.entry-content textarea,
.entry-content select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
}
.entry-content input:focus,
.entry-content textarea:focus,
.entry-content select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18); }
.entry-content input[type="submit"],
.entry-content button[type="submit"] {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.entry-content input[type="submit"]:hover,
.entry-content button[type="submit"]:hover { background: var(--blue-dark); }
.entry-content .wpcf7-form p { margin-top: 1em; font-family: var(--font); font-size: 15px; }

/* ── 404 ────────────────────────────────────────────────────────────────── */
.error-page {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 48px);
}

.error-page__window {
  border-radius: calc(var(--r-lg) + 4px);
  background: var(--ink);
  overflow: hidden;
}
.error-page__bar {
  display: flex;
  gap: 6px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.error-page__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); }
.error-page__bar i:first-child { background: var(--blue); }
.error-page__code {
  padding: clamp(28px, 6vw, 64px) 24px;
  color: #fff;
  font-size: clamp(5rem, 18vw, 11rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-align: center;
}

.error-page__copy { display: grid; gap: 16px; justify-items: start; }
.error-page__title { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.04; letter-spacing: -0.035em; }
.error-page__desc { max-width: 46ch; color: var(--ink-2); font-size: 1.1rem; }
.error-page__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.error-page__topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

@media (min-width: 900px) {
  .error-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
}

/* ── Motion preferences ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Print ──────────────────────────────────────────────────────────────── */
@media print {
  .site-header,
  .drawer,
  .newsletter,
  .site-footer,
  .single-layout__side,
  .related,
  .read-progress { display: none !important; }
  body { background: #fff; }
}
