:root {
  --paper: #fbfbfa;
  --ink: #1a1a1a;
  --ink-2: #4a4a48;
  --ink-3: #7a7a76;
  --rule: #d6d3ca;
  --rule-strong: #b8b4a8;
  --hover: #8b1e1e;
  --tag: #6a3f1e;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

html.dark {
  --paper: #1a1a19;
  --ink: #fbfbfa;
  --ink-2: #b0b0ac;
  --ink-3: #74746f;
  --rule: #333330;
  --rule-strong: #4a4a45;
  --hover: #d97878;
  --tag: #c9a675;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.5;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--paper); }

.icon {
  width: 1em; height: 1em;
  display: inline-block; vertical-align: -0.125em;
  flex-shrink: 0; fill: currentColor;
}

/* ================= MASTHEAD ================= */
header.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 30;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.masthead-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}
.masthead-wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.masthead-wordmark:hover { text-decoration: underline; }
.masthead-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.masthead-nav a {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  padding: 4px 0;
  position: relative;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.masthead-nav a:hover { text-decoration: underline; }
.masthead-nav a.active { color: var(--ink); }
.masthead-nav a.active:hover { text-decoration: none; }
.masthead-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--ink);
}
.contact-link {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-2);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.contact-link:hover { text-decoration: underline; }
.theme-toggle {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--rule-strong);
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 12px;
  margin-left: 8px;
  transition: color 0.15s, border-color 0.15s, background 0.25s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle .icon-sun { display: inline; }
.theme-toggle .icon-moon { display: none; }
html.dark .theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-moon { display: inline; }

/* ================= SECTION HEADS ================= */
.section-head {
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 40px 24px;
  display: block;
}
.section-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.section-head .description {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 640px;
  line-height: 1.5;
}

/* ================= HERO ITEM ================= */
.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 40px 48px;
  border-bottom: 1px solid var(--rule);
}
.hero-inner {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 48px;
  align-items: start;
}
.hero-text { padding-top: 16px; }
.hero-dateline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.hero-headline {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  color: var(--ink);
  display: block;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.hero-item:hover .hero-headline { text-decoration: underline; }
.hero-standfirst {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.hero-byline {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-byline .role {
  color: var(--ink-2);
  font-weight: 600;
  letter-spacing: 0.12em;
}
.hero-image {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--rule);
}
.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.hero-item:hover .hero-image img { transform: scale(1.02); }
.hero-item { cursor: pointer; display: block; }

/* ================= THREE-UP ================= */
.three-up {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 40px 32px;
}
.three-up-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.three-up-item { cursor: pointer; display: block; }
.three-up-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--rule);
  margin-bottom: 18px;
}
.three-up-image img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.6s ease;
}
.three-up-item:hover .three-up-image img { transform: scale(1.02); }
.three-up-headline {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.three-up-item:hover .three-up-headline { text-decoration: underline; }
.three-up-standfirst {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.three-up-byline {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ================= DATED LIST ================= */
.dated-list {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 40px 80px;
}
.dated-item {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  cursor: pointer;
  align-items: center;
  transition: background 0.15s;
}
.dated-item:hover .dated-headline { text-decoration: underline; }
.dated-date {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-3);
  padding-top: 4px;
}
.dated-body {
  max-width: 640px;
}
.dated-headline {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.dated-standfirst {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.dated-byline {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dated-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--rule);
  justify-self: end;
  width: 100%;
}
.dated-image.dated-image--landscape {
  aspect-ratio: 3 / 2;
}
.dated-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.6s ease;
}
.dated-item:hover .dated-image img { transform: scale(1.02); }
.dated-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rule);
  color: var(--ink-3);
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  padding: 12px;
  text-align: center;
}

/* ================= ARCHIVE INTRO ================= */
.archive-intro {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 40px 0;
}
.archive-intro-inner {
  max-width: 640px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.archive-intro p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* In-body media block: either a quiet "video available on request" note
   or an inline video embed, placed between standfirst and body paragraphs */
.article-body-note {
  margin: 0 0 40px;
  padding: 20px 24px;
  border-left: 2px solid var(--tag, var(--ink-2));
  background: color-mix(in srgb, var(--rule) 25%, transparent);
}
.article-body-note-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tag, var(--ink-2));
  font-weight: 500;
  margin-bottom: 8px;
}
.article-body-note p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}
.article-body-note p a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-3);
}
.article-body-video {
  margin: 0 0 40px;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  position: relative;
}
.article-body-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Inline body figure — image sized to the text column, native aspect preserved */
.article-body .body-figure {
  margin: 0 0 32px;
}
.article-body .body-figure img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--rule);
}

/* ================= ARTICLE PAGE (Wilton Place blog pattern) ================= */

/* Kicker strip: fixed under masthead, holds "Story · Title" + progress bar below */
.article-kicker {
  position: sticky;
  top: 68px; /* sits directly under the sticky masthead */
  z-index: 29; /* just under the masthead so its border tucks behind */
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  /* progress bar is positioned at the bottom edge of this element */
}
.article-kicker-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 48px;
}
.article-kicker-title {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 400;
}
.article-kicker-back {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s;
}
.article-kicker-back:hover { color: var(--ink); }
.article-kicker-back .icon { width: 14px; height: 14px; }

/* Reading progress bar — overlays the kicker's bottom edge (sits on top of the
   1px border), filled left-to-right by inner .reading-progress-bar as JS updates width.
   Positioned absolute inside the kicker so it adds ZERO flow space. */
.article-kicker .reading-progress {
  position: absolute;
  left: 0; right: 0;
  bottom: -1px; /* sit on top of the kicker's 1px border */
  height: 2px;
  z-index: 30;
  background: transparent;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--tag, var(--ink));
  transition: width 0.05s linear;
}

/* Hero (video or image) sits at top of article */
.article-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  position: relative;
}
.article-hero iframe,
.article-hero img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
  object-fit: cover;
  display: block;
}
.article-hero-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 12px;
  background: #1a1a1a;
  color: #999;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  padding: 24px;
  text-align: center;
}
.article-hero-placeholder .private-note {
  font-style: normal;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b8985a;
}
.article-hero-placeholder a {
  color: #d4a866;
  border-bottom: 1px solid #d4a866;
  padding-bottom: 1px;
}

/* Article container with narrow centre column. No manual margin needed —
   the sticky masthead + kicker + progress stack take their natural flow space. */
.article {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 44px;
  position: relative;
}
.article-inner {
  display: grid;
  grid-template-columns: 1fr minmax(0, 640px) 1fr;
  gap: 40px;
  padding: 80px 0 40px;
}
.article-body {
  grid-column: 2;
}
.article-rail {
  grid-column: 3;
  font-family: var(--sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  padding-top: 8px;
}

h1.article-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4.5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 24px;
}
h1.article-title .it { font-style: italic; }

.article-tag {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--tag, var(--ink-2));
  margin-bottom: 40px;
  font-weight: 500;
}

.article-standfirst {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 40px;
}

.article-body p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 24px;
}
.article-body p.q {
  font-style: italic;
  color: var(--ink);
  margin-top: 40px;
}
.article-body p.q + p { margin-top: 0; }
.article-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-3);
  padding-bottom: 1px;
  text-decoration: none;
}
.article-body a:hover { border-bottom-color: var(--ink); }

.article-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 40px 0 14px;
  color: var(--ink);
}

/* Full-bleed inline image inside article flow (grid breakout) */
.article-breakout {
  grid-column: 1 / -1;
  margin: 40px -44px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.article-breakout img { width: 100%; height: auto; display: block; }
.article-breakout.pair {
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 0 44px;
  margin: 40px 0;
}

/* Placeholder note (for case studies still being written) */
.article-placeholder-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-3);
  padding: 20px;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--rule) 30%, transparent);
  margin: 20px 0;
}

/* Foot nav — back to Featured Stories / Archive */
.article-foot-nav {
  max-width: 1600px;
  margin: 40px auto 0;
  padding: 24px 44px 100px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
}
.article-foot-nav a {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  transition: color 0.15s;
}
.article-foot-nav a:hover { color: var(--ink-3); }
.article-foot-nav a .icon { width: 14px; height: 14px; }

/* ================= ABOUT PAGE ================= */
.about-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 40px 100px;
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 48px;
  align-items: start;
}
.about-text {
  min-width: 0;
}
.about-page .about-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--rule);
  width: 160px;
}
.about-page .about-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.about-page .lede {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 24px;
  letter-spacing: -0.005em;
}
.about-page p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 20px;
}
.about-page a.inline-link {
  border-bottom: 1px solid var(--ink-2);
}
.about-page a.inline-link:hover { border-color: var(--ink); }

/* ================= FOOTER ================= */
footer.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--paper);
  padding: 32px 40px 40px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.footer-mark .colophon {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  margin-left: 12px;
}
.footer-links {
  display: flex;
  gap: 24px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-3);
  align-items: baseline;
}
.footer-links a {
  color: var(--ink-2);
  transition: color 0.15s;
}
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .masthead-inner {
    padding: 18px 20px;
    gap: 16px;
  }
  .masthead-wordmark { font-size: 20px; }
  .masthead-nav { gap: 18px; }
  .masthead-nav a, .contact-link { font-size: 13px; }
  .theme-toggle { width: 26px; height: 26px; }

  .section-head { padding: 48px 20px 24px; }
  .hero { padding: 32px 20px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 100%;
    margin: 0;
  }
  .hero-text { padding-top: 0; order: 2; }
  .hero-image { aspect-ratio: 3 / 2; order: 1; }
  .three-up { padding: 32px 20px; }
  .three-up-grid { grid-template-columns: 1fr; gap: 40px; }
  .dated-list { padding: 8px 20px 60px; }
  .dated-item {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 0;
    max-width: 100%;
  }
  .dated-image { order: 1; max-width: 100%; aspect-ratio: 3 / 2; }
  .dated-body { order: 2; }
  .dated-image.dated-image--landscape { aspect-ratio: 3 / 2; }
  .hero-headline { font-size: 24px; }
  .dated-headline { font-size: 20px; }
  .three-up-headline { font-size: 20px; }
  .hero-standfirst { font-size: 15px; }
  .dated-standfirst { font-size: 14px; }
  .archive-intro { padding: 12px 20px 0; }
  .article-kicker { top: 58px; }
  .article-kicker-inner { padding: 10px 20px; height: 40px; }
  .article-kicker-title { font-size: 10px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .article-hero { aspect-ratio: 3 / 2; }
  .article { padding: 0 24px; }
  .article-inner { grid-template-columns: 1fr; padding: 40px 0 20px; gap: 0; }
  .article-body { grid-column: 1; }
  .article-rail { grid-column: 1; margin-bottom: 24px; padding-top: 0; }
  h1.article-title { font-size: clamp(32px, 8vw, 44px); }
  .article-standfirst { font-size: 18px; }
  .article-body p { font-size: 17px; }
  .article-breakout { margin: 32px -24px; }
  .article-breakout.pair { grid-template-columns: 1fr; padding: 0; gap: 24px; margin: 32px 0; }
  .article-foot-nav { padding: 20px 24px 60px; }
  .about-page { padding: 40px 20px 60px; }
  .about-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-page .about-photo { width: 140px; }
  footer.site-footer { padding: 24px 20px 32px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 640px) {
  .masthead-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .masthead-nav { gap: 14px; }
  .masthead-nav a, .contact-link { font-size: 12px; }
  .contact-link { display: none; }
  .theme-toggle { margin-left: 4px; }
}
