/* ================================================================
 STATION 16 — Professional News Publication Design System
 style.css

 Table of Contents
 ─────────────────────────────────────────────────────────────────
 01  Google Fonts
 02  Design Tokens
 03  Reset & Normalise
 04  Base Typography
 05  Layout & Container
 06  Navigation
 07  Ticker / Breaking Bar
 08  Section Divider Heads
 09  Hero Feature Card
 10  Article Card Grid
 11  Article Page — Header & Byline
 12  Article Page — Hero Image & Caption
 13  Article Page — Body Text
 14  Article Page — End Elements (Tags, Share)
 15  Sidebar — Latest Articles
 16  Related Articles
 17  Reading Progress Bar
 18  Meta Bar (Breadcrumb / Back Link)
 19  Loading Spinner
 20  Error & Empty States
 21  Footer
 22  Keyframes & Micro-Animations
 23  Responsive — Tablet  (≤ 1080px)
 24  Responsive — Small Tablet  (≤ 860px)
 25  Responsive — Mobile  (≤ 600px)
================================================================ */

/* ================================================================
 01  GOOGLE FONTS
 Playfair Display — editorial display serif (headlines)
 Lora            — comfortable reading serif (article body)
 Inter           — clean geometric sans (all UI / meta)
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Lora:ital,wght@0,400;0,600;1,400;1,600&family=Playfair+Display:ital,wght@0,600;0,700;0,800;0,900;1,700&display=swap');

/* ================================================================
 02  DESIGN TOKENS
================================================================ */

:root {
  /* ── Brand ── */
  --orange: #ff8000;
  --orange-deep: #e67200;
  --orange-wash: rgba(255, 128, 0, 0.07);

  /* ── Neutral scale (greyscale + one brand accent only) ── */
  --dark: #111111;
  --ink: #1a1a1a;
  --body: #2d2d2d;
  --muted: #6b6b6b;
  --faint: #9b9b9b;
  --hairline: #d0d0d0;
  --rule: #e3e3e3;
  --surface: #f7f7f7;
  --surface-alt: #eeeeee;
  --white: #ffffff;

  /* ── Typefaces ── */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial,
    sans-serif;

  /* ── Type scale ── */
  --t-xs: 10.5px;
  --t-sm: 12px;
  --t-base: 14px;
  --t-md: 16px;
  --t-lg: 19px;
  --t-xl: 22px;
  --t-2xl: 28px;
  --t-3xl: 38px;
  --t-4xl: 46px;
  --t-hero: 54px;

  /* ── Layout widths ── */
  --max: 1260px;
  /* outer page container   */
  --content: 1060px;
  /* article-page container  */
  --article: 740px;
  /* article header column   */
  --reading: 680px;
  /* comfortable reading col */

  /* ── Spacing rhythm (8 px base) ── */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;
  --s20: 80px;

  /* ── Easing ── */
  --fast: 0.15s ease;
  --ease: 0.2s ease;
  --slow: 0.38s ease;

  /* ── Z-index layers ── */
  --z-base: 0;
  --z-nav: 300;
  --z-prog: 9999;

  /* ── Shadows ── */
  --shadow-nav: 0 2px 16px rgba(0, 0, 0, 0.44);
}

/* ================================================================
 03  RESET & NORMALISE
================================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings:
    'liga' 1,
    'kern' 1;
}

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

ul,
ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

input {
  font: inherit;
}

/* Custom text highlight */
::selection {
  background: var(--orange);
  color: var(--white);
}

/* Accessible focus ring */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Slim scrollbar (webkit) */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--hairline);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--faint);
}

/* ================================================================
 04  BASE TYPOGRAPHY
================================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  font-feature-settings:
    'liga' 1,
    'kern' 1,
    'lnum' 1;
}

/* Running-text links (inside article body only) */
.art-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  transition:
    border-color var(--fast),
    color var(--fast);
}

.art-body a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ================================================================
 05  LAYOUT & CONTAINER
================================================================ */

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 22px;
}

/* Thin orange rule that sits above the nav */
.accent-strip {
  height: 3px;
  background: var(--orange);
}

/* ================================================================
 06  NAVIGATION
================================================================ */

.nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  box-shadow: var(--shadow-nav);
}

.nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 56px;
}

/* ── Logo ── */
.nav-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: opacity var(--fast);
}

.nav-logo:hover {
  opacity: 0.88;
}

.nav-logo .o {
  color: var(--orange);
}

/* ── Link list ── */
.nav-links {
  display: flex;
  align-items: stretch;
}

.nav-links li {
  display: flex;
  align-items: stretch;
}

/* ── Individual link ── */
.nav-links a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.15px;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
  position: relative;
  transition: color var(--fast);
}

/* Animated orange underline indicator */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--ease);
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--white);
}

/* Small dot used as a vertical separator between groups of links */
.nav-links .nav-sep {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.1);
  font-size: 18px;
  padding: 0 2px;
  pointer-events: none;
  user-select: none;
}

/* ================================================================
 07  TICKER / BREAKING BAR
================================================================ */

.ticker {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.ticker-inner {
  display: flex;
  align-items: center;
  height: 36px;
  gap: 11px;
}

.ticker-badge {
  flex-shrink: 0;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  padding: 0 13px;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.ticker-text {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================================
 08  SECTION DIVIDER HEADS
 Pattern: small uppercase label + horizontal rule extending right
================================================================ */

.sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.sec-head-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--faint);
  white-space: nowrap;
}

.sec-head-line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ================================================================
 09  HERO FEATURE CARD
================================================================ */

.hero-wrap {
  padding-top: 28px;
}

.hero-card {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--dark);
  cursor: pointer;
}

/* Image container — fixed height to create cinematic ratio */
.hero-img-wrap {
  width: 100%;
  height: 510px;
  overflow: hidden;
  line-height: 0;
}

.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-card:hover .hero-img-wrap img {
  transform: scale(1.025);
}

/* Dark gradient — heaviest at bottom where text sits */
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 20%,
    rgba(0, 0, 0, 0.1) 48%,
    rgba(0, 0, 0, 0.88) 100%
  );
  pointer-events: none;
}

.hero-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 40px 38px;
}

/* Orange pill — used only on hero (not on card tags) */
.hero-tag {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  padding: 4px 10px 3px;
  margin-bottom: 16px;
  line-height: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  max-width: 820px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
  transition: opacity var(--fast);
}

.hero-card:hover .hero-title {
  opacity: 0.9;
}

.hero-summary {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.58;
  max-width: 660px;
  margin-bottom: 12px;
}

.hero-date {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.44);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ================================================================
 10  ARTICLE CARD GRID
================================================================ */

/* Two-column page layout: articles + sidebar */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 288px;
  gap: 52px;
  padding: 38px 0 80px;
  align-items: start;
}

/* 3-column card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 24px;
}

/* Card wrapper */
.art-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

/* Image — 16:9 with overflow-hidden clip */
.art-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 13px;
  flex-shrink: 0;
  line-height: 0;
}

.art-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) ease;
}

.art-card:hover .art-card-img img {
  transform: scale(1.055);
}

/* Category tag — orange text, NO background (unlike hero) */
.art-tag {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--orange);
  margin-bottom: 7px;
  display: block;
}

/* Card headline */
.art-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 9px;
  transition: color var(--fast);
}

.art-card:hover .art-title {
  color: var(--orange);
}

/* One-line teaser */
.art-summary {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.58;
  flex: 1;
  margin-bottom: 10px;
}

/* Date / timestamp */
.art-date {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

/* Empty state when a filter returns nothing */
.state-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}

.state-empty p {
  font-size: 16px;
  margin-bottom: 6px;
}

.state-empty small {
  font-size: 13px;
  color: var(--faint);
}

/* ================================================================
 11  ARTICLE PAGE — HEADER & BYLINE
================================================================ */

.article-page {
  padding-bottom: 80px;
  min-height: 75vh;
}

/* Narrow centred header column */
.art-header {
  max-width: var(--article);
  margin-inline: auto;
  padding: 48px 22px 34px;
}

/* Category link above headline */
.art-cat-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--orange);
  margin-bottom: 20px;
  transition: opacity var(--fast);
}

.art-cat-link:hover {
  opacity: 0.72;
}

.cat-dash {
  display: inline-block;
  width: 28px;
  height: 2.5px;
  background: currentColor;
  flex-shrink: 0;
  border-radius: 1px;
}

/* Display headline */
.art-hl {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.13;
  letter-spacing: -0.7px;
  margin-bottom: 22px;
}

/* Deck / summary below headline */
.art-deck {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.64;
  color: var(--muted);
  font-style: italic;
  padding-left: 18px;
  border-left: 3px solid var(--rule);
  margin-bottom: 26px;
}

/* Byline row */
.art-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.by-author {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.by-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
  margin: 0 10px;
  flex-shrink: 0;
}

.by-date {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.by-read-time {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
}

/* ================================================================
 12  ARTICLE PAGE — HERO IMAGE & CAPTION
================================================================ */

.art-hero-outer {
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: 22px;
}

.art-hero-img {
  width: 100%;
  overflow: hidden;
  background: var(--surface);
  line-height: 0;
}

.art-hero-img img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  display: block;
}

.art-hero-caption {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding-top: 9px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
  font-style: italic;
  line-height: 1.5;
}

.cap-bullet {
  width: 6px;
  height: 6px;
  background: var(--orange);
  flex-shrink: 0;
  margin-top: 4px;
}

/* ================================================================
 13  ARTICLE PAGE — BODY TEXT
================================================================ */

/* Body + sidebar two-column layout */
.art-wrap {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 0 64px;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: 22px;
  align-items: start;
}

/* Body column — capped at comfortable reading width */
.art-body {
  padding-top: 38px;
  max-width: var(--reading);
}

/* ── Running paragraph ── */
.art-body p {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.84;
  color: var(--body);
  margin-bottom: 28px;
}

/* ── Drop cap on lead paragraph ── */
.art-body p.p-lead::first-letter {
  font-family: var(--font-display);
  font-size: 82px;
  font-weight: 800;
  float: left;
  line-height: 0.76;
  margin: 6px 10px -6px 0;
  color: var(--ink);
}

/* ── Section heading (## in body source) ── */
.art-body h2 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 48px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

/* ── Label subheading (### in body source) ── */
.art-body h3 {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--muted);
  margin: 40px 0 14px;
}

/* ── Pull quote / blockquote (> in body source) ── */
.art-body blockquote {
  margin: 48px 0;
  padding: 22px 0 22px 28px;
  border-left: 4px solid var(--orange);
}

.art-body blockquote p {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 0;
}

.art-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  font-style: normal;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

/* ── Horizontal rule (--- in body source) ── */
.art-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

/* ================================================================
 14  ARTICLE PAGE — END ELEMENTS (Tags + Share Bar)
================================================================ */

.art-footer {
  max-width: var(--reading);
  margin-top: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

/* Tag pills */
.art-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tags-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-right: 4px;
}

.tag-pill {
  display: inline-block;
  padding: 5px 13px;
  background: var(--surface);
  border: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition:
    background var(--fast),
    border-color var(--fast),
    color var(--fast);
}

.tag-pill:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.share-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-right: 2px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1.5px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.2px;
  background: none;
  cursor: pointer;
  transition:
    border-color var(--fast),
    color var(--fast);
}

.share-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.share-btn.btn--copied {
  border-color: #22c55e;
  color: #22c55e;
}

/* ================================================================
 15  SIDEBAR — LATEST ARTICLES
 Used on both index.html (.sidebar) and post.html (.art-sidebar)
================================================================ */

.sidebar,
.art-sidebar {
  position: sticky;
  top: 70px;
  border-left: 1px solid var(--rule);
  padding-left: 28px;
}

/* Extra top-padding for article-page sidebar */
.art-sidebar {
  padding-top: 38px;
}

/* "Latest" heading — thick bottom border anchors the block */
.sb-head,
.aside-section-head {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 2px;
}

.sb-list li,
.sb-items li,
.aside-list li {
  border-bottom: 1px solid var(--rule);
}

.sb-item,
.aside-item {
  display: block;
  padding: 13px 0;
}

.sb-tag,
.aside-item-tag {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--orange);
  margin-bottom: 5px;
  display: block;
}

.sb-title,
.aside-item-title {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.38;
  margin-bottom: 5px;
  display: block;
  transition: color var(--fast);
}

.sb-item:hover .sb-title,
.aside-item:hover .aside-item-title {
  color: var(--orange);
}

.sb-date,
.aside-item-date {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--faint);
  display: block;
}

/* ================================================================
 16  RELATED ARTICLES
================================================================ */

.related-section {
  max-width: var(--content);
  margin: 64px auto 0;
  padding-inline: 22px;
}

/* Header row: bold label + extending rule */
.related-head {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 3px solid var(--ink);
  padding-top: 20px;
  margin-bottom: 28px;
}

.related-head-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink);
  white-space: nowrap;
}

.related-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* 3-column grid with vertical rule dividers */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.rel-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  padding-right: 28px;
  padding-bottom: 28px;
  border-right: 1px solid var(--rule);
}

.rel-card:nth-child(n + 2) {
  padding-left: 28px;
}

.rel-card:last-child {
  border-right: none;
  padding-right: 0;
}

.rel-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 14px;
  line-height: 0;
}

.rel-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) ease;
}

.rel-card:hover .rel-img-wrap img {
  transform: scale(1.05);
}

.rel-cat {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--orange);
  margin-bottom: 7px;
  display: block;
}

.rel-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 8px;
  flex: 1;
  transition: color var(--fast);
}

.rel-card:hover .rel-title {
  color: var(--orange);
}

.rel-summary {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 8px;
}

.rel-date {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ================================================================
 17  READING PROGRESS BAR
================================================================ */

#readProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--orange);
  z-index: var(--z-prog);
  pointer-events: none;
  will-change: width;
  transition: width 0.07s linear;
}

/* ================================================================
 18  META BAR  (post.html — breadcrumb + back link)
================================================================ */

.meta-bar {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.meta-bar-inner {
  display: flex;
  align-items: center;
  height: 46px;
}

/* Back arrow + label */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
  transition: color var(--fast);
}

.back-link:hover {
  color: var(--orange);
}

.back-link svg {
  flex-shrink: 0;
  transition: transform var(--fast);
}

.back-link:hover svg {
  transform: translateX(-3px);
}

.meta-pipe {
  width: 1px;
  height: 16px;
  background: var(--rule);
  margin: 0 16px;
  flex-shrink: 0;
}

/* Breadcrumb trail */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--faint);
  min-width: 0;
  overflow: hidden;
}

.breadcrumb a:hover {
  color: var(--orange);
}

.bc-sep {
  color: var(--rule);
  font-size: 16px;
  line-height: 1;
}

.bc-cat {
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

/* ================================================================
 19  LOADING SPINNER
================================================================ */

.spinner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
}

/* Used as grid-column filler when inside .card-grid */
.spinner-wrap.grid-span {
  grid-column: 1 / -1;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--rule);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: s16spin 0.75s linear infinite;
  flex-shrink: 0;
}

/* ================================================================
 20  ERROR & EMPTY STATES
================================================================ */

.error-state {
  text-align: center;
  padding: 120px 22px;
  max-width: 520px;
  margin-inline: auto;
}

.error-state h2 {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--ink);
  margin-bottom: 14px;
}

.error-state p {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 32px;
}

.btn-home,
.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: opacity var(--fast);
}

.btn-home:hover,
.btn-primary:hover {
  opacity: 0.85;
}

/* ================================================================
 21  FOOTER
================================================================ */

.footer {
  background: var(--dark);
  border-top: 3px solid var(--orange);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding: 40px 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.footer-logo .o {
  color: var(--orange);
}

.footer-tagline {
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
}

/* Footer nav links */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 4px;
}

.footer-nav a {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: rgba(255, 255, 255, 0.36);
  transition: color var(--fast);
}

.footer-nav a:hover {
  color: var(--orange);
}

/* Copyright strip */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.24);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.24);
  transition: color var(--fast);
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.62);
}

/* ================================================================
 22  KEYFRAMES & MICRO-ANIMATIONS
================================================================ */

@keyframes s16spin {
  to {
    transform: rotate(360deg);
  }
}

/* Gentle upward fade — applied to dynamically rendered elements */
@keyframes s16rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered entrance for card grids */
.card-grid .art-card {
  animation: s16rise 0.32s ease both;
}

.card-grid .art-card:nth-child(2) {
  animation-delay: 0.05s;
}

.card-grid .art-card:nth-child(3) {
  animation-delay: 0.1s;
}

.card-grid .art-card:nth-child(4) {
  animation-delay: 0.08s;
}

.card-grid .art-card:nth-child(5) {
  animation-delay: 0.13s;
}

.card-grid .art-card:nth-child(6) {
  animation-delay: 0.18s;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================================================
 23  RESPONSIVE — TABLET  (≤ 1080px)
================================================================ */

@media (max-width: 1080px) {
  /* Nav: tighter link padding */
  .nav-links a {
    padding: 0 11px;
  }

  /* Homepage: narrower sidebar */
  .content-layout {
    grid-template-columns: 1fr 260px;
    gap: 36px;
  }

  /* 2-column card grid */
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Article page: narrower sidebar */
  .art-wrap {
    grid-template-columns: 1fr 240px;
    gap: 0 44px;
  }

  /* Related: 2 columns */
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rel-card:nth-child(2) {
    border-right: none;
    padding-right: 0;
  }

  .rel-card:nth-child(3) {
    grid-column: 1;
    padding-left: 0;
    border-right: none;
  }
}

/* ================================================================
 24  RESPONSIVE — SMALL TABLET  (≤ 860px)
================================================================ */

@media (max-width: 860px) {
  /* Homepage: drop to single column */
  .content-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Homepage sidebar reflows below grid */
  .sidebar {
    position: static;
    border-left: none;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 32px;
    margin-top: 36px;
  }

  /* Article page: hide sticky sidebar entirely */
  .art-sidebar {
    display: none;
  }

  /* Article page: single-column body */
  .art-wrap {
    grid-template-columns: 1fr;
  }

  /* Headline scaling */
  .art-hl {
    font-size: 32px;
  }

  .art-deck {
    font-size: 17px;
  }

  /* Hero scaling */
  .hero-title {
    font-size: 28px;
    letter-spacing: -0.3px;
  }

  .hero-img-wrap {
    height: 360px;
  }

  .hero-body {
    padding: 30px 24px 28px;
  }

  /* Article hero image */
  .art-hero-img img {
    max-height: 380px;
  }

  /* Footer: stack brand + nav vertically */
  .footer-top {
    flex-direction: column;
    gap: 24px;
  }
}

/* ================================================================
 25  RESPONSIVE — MOBILE  (≤ 600px)
================================================================ */

@media (max-width: 600px) {
  /* Nav: minimal link padding, tiny text */
  .nav-links a {
    padding: 0 9px;
    font-size: 10px;
    letter-spacing: 0.5px;
  }

  /* Hero */
  .hero-img-wrap {
    height: 260px;
  }

  .hero-title {
    font-size: 22px;
    letter-spacing: -0.2px;
  }

  .hero-summary {
    display: none;
  }

  .hero-body {
    padding: 24px 18px 22px;
  }

  .hero-tag {
    margin-bottom: 10px;
  }

  /* Article cards: single column, tighter gap */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Article typography */
  .art-hl {
    font-size: 26px;
    letter-spacing: -0.3px;
  }

  .art-deck {
    font-size: 16px;
  }

  .art-body p {
    font-size: 17px;
    line-height: 1.76;
  }

  .art-body blockquote p {
    font-size: 20px;
  }

  .art-hero-img img {
    max-height: 230px;
  }

  .art-header {
    padding: 28px 22px 24px;
  }

  /* Hide reading time — not critical on mobile */
  .by-read-time {
    display: none;
  }

  /* Related: single column */
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rel-card {
    border-right: none;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 24px;
  }

  .rel-card:last-child {
    border-bottom: none;
  }

  /* Footer */
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-nav {
    gap: 8px 16px;
  }
}
