/* ════════════════════════════════
   BRAND COLORS
   Change these to rebrand the site.
   All other colors are in variables.css.
════════════════════════════════ */

:root {
  /* ── Primary accent (buttons, hover states, category labels) ── */
  --color-primary: #1d9bf0;
  --color-primary-hover: #017dd0;
  --color-primary-rgb: 29, 155, 240;   /* used for rgba() focus rings */
  --color-primary-quote: #0387e1;      /* used for quote/author text hover only */

  /* ── Body link color ── */
  --color-link: #1d9bf0;

  /* ── Social share buttons ── */
  --color-twitter: #1a91da;
  --color-linkedin: #0a66c2;
  --color-facebook: #0a66c2;

  /* ── Badge colors (hot / trending / popular labels on cards) ── */
  --color-badge-hot-bg: #fdecea;
  --color-badge-trending-bg: #fff3e0;
  --color-badge-trending: #e65100;
  --color-badge-popular-bg: #e3f2fd;
  --color-badge-popular: #1565c0;
}

/* ════════════════════════════════
   DESIGN TOKENS
   All CSS custom properties in one place
════════════════════════════════ */

:root {
  /* ── Colors ── */
  /* ── Base ── */
  --color-bg: #f1f3ec;
  --color-surface: #fffdf9;
  --color-surface-subtle: #eaece2;
  --color-border: #dbe0d2;
  --color-white: #ffffff;

  /* ── Text ── */
  --color-text: #233238;
  --color-text-muted: #5c7078;
  --color-text-subtle: #445058;

  /* ── Overlays ── */
  --color-overlay-light: rgba(0,0,0,.15);
  --color-overlay-mid: rgba(0,0,0,.25);
  --color-overlay-backdrop: rgba(0,0,0,.4);
  --color-overlay-modal: rgba(0,0,0,.5);
  --color-overlay-heavy: rgba(0,0,0,.85);

  /* ── Prose / Code ── */
  --color-prose-subtext: #444444;
  --color-code-bg: #111111;
  --color-code-text: #e5e5e5;

  /* ── Hero placeholders ── */
  --color-placeholder-main: #222222;
  --color-placeholder-side: #333333;

  /* ── Typography ── */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', monospace;

  /* ── Spacing ── */
  --gap: 1.5rem;
  --gap-hero: 4px;

  /* ── Sizing ── */
  --container: 1080px;
  --hero-height: 560px;

  /*
   * Breakpoints (use these values in @media queries — CSS vars don't work inside @media)
   * --bp-xs:  480px   extra small (home strips)
   * --bp-sm:  600px   small mobile ceiling / search modal
   * --bp-sm2: 640px   footer columns
   * --bp-md:  768px   tablet / nav switch
   * --bp-lg:  1024px  desktop layout (2-column, sidebar)
   */

  /* ── Radius ── */
  --radius: 8px;
  --radius-lg: 12px;

  /* ── Shadows ── */
  --shadow-sm: 0 2px 10px rgba(51,58,52,.06);
  --shadow-md: 0 10px 26px rgba(51,58,52,.08);

  /* ── Animation ── */
  --transition-time: 0.3s;
}

@media (min-width: 768px) {
  :root {
    --hero-height: 420px;
  }
}

/* ════════════════════════════════
   RESET & BASE STYLES
   Normalize browser defaults
════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

/* ── Images ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Links ── */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-primary);
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Screen reader only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  border-radius: 4px;
  z-index: 9999;
}
.skip-link:focus {
  top: 1rem;
}

/* ════════════════════════════════
   LAYOUT UTILITIES
   Container & responsive layout
════════════════════════════════ */

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

@media (min-width: 768px) { /* --bp-md */
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) { /* --bp-lg */
  .container {
    padding: 0 2.5rem;
  }
}

.site-header {
  position: static;
  background: var(--color-bg);
  border-bottom: none;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: 56px;
  align-items: center;
  height: 56px;
  position: relative;
}

.header-right {
  grid-column: 2 / 4;
  grid-row: 1;
  display: contents;
}

.header-right .header-search {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.header-right nav {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

/* ── Left: hamburger + logo ── */
.header-left {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 6px;
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--color-surface-subtle); }
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

.site-brand {
  font-size: clamp(1.5rem, 3.5vw, 1.85rem);
  line-height: 1;
  font-weight: 900;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.site-brand:hover { color: var(--color-primary); }

/* ── Right: search + category links ── */
.header-search {
  display: flex;
  align-items: center;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 2px 2px 2px 14px;
  transition: border-color .08s ease, box-shadow .08s ease;
}
.header-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

.header-search__input {
  width: 180px;
  height: 32px;
  padding: 0 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text);
  background: none;
  border: none;
}
.header-search__input:focus {
  outline: none;
}

.header-search__input::-webkit-search-cancel-button,
.header-search__input::-webkit-search-decoration {
  display: none;
}

.header-search .search-toggle {
  width: 32px;
  height: 32px;
  border-radius: 100px;
  border: none;
  background: none;
}
.header-search .search-toggle:hover {
  background: var(--color-primary);
  color: #fff;
}

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  border-radius: 6px;
  transition: color .08s, background .08s;
  flex-shrink: 0;
}
.search-toggle:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

.header-right nav ul {
  list-style: none;
  display: flex;
  gap: 12px;
}

.header-right nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  border-radius: 100px;
  box-shadow: 0 3px 12px rgba(51,58,52,0.06);
  transition: background-color .08s ease, color .08s ease, box-shadow .08s ease, transform .06s ease;
}
.header-right nav a:hover,
.header-right nav a.active {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 6px 16px rgba(90,125,140,0.3);
  transform: translateY(-1px);
}
.header-right nav a:active {
  transform: translateY(0) scale(0.96);
}

.nav-toggle { display: none; }

@media (max-width: 599px) { /* --bp-sm-max */
  .nav-toggle { display: flex; }

  .header-right { display: none; }

  .header-inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .header-left {
    grid-column: 1;
    justify-self: center;
  }

  .nav-toggle {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
  }
}

/* ── Drawer ── */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.nav-drawer.is-open { pointer-events: auto; }

.nav-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: var(--color-overlay-backdrop);
  opacity: 0;
  transition: opacity .25s ease;
}
.nav-drawer.is-open .nav-drawer__backdrop { opacity: 1; }

.nav-drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 80vw);
  background: var(--color-white);
  padding: 1.25rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(-100%);
  transition: transform .25s ease;
  overflow-y: auto;
}
.nav-drawer.is-open .nav-drawer__panel { transform: translateX(0); }

.nav-drawer__close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0.75rem;
  margin-bottom: 0.25rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-drawer__close:hover { color: var(--color-text); }

.nav-drawer__search {
  display: flex;
  align-items: center;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 4px 4px 4px 18px;
  margin-bottom: 1rem;
  transition: border-color .08s ease, box-shadow .08s ease;
}
.nav-drawer__search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

.nav-drawer__search-input {
  flex: 1;
  width: 100%;
  height: 44px;
  padding: 0 0.5rem 0 0;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--color-text);
  background: none;
  border: none;
}

.nav-drawer__search-input:focus {
  outline: none;
}

.nav-drawer__search-input::-webkit-search-cancel-button,
.nav-drawer__search-input::-webkit-search-decoration {
  display: none;
}

.nav-drawer__search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: none;
  border: none;
  border-radius: 100px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color .08s ease, color .08s ease;
}

.nav-drawer__search-submit:hover {
  background: var(--color-primary);
  color: #fff;
}

.nav-drawer__search-submit:active {
  transform: scale(0.94);
}

.nav-drawer__panel nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.nav-drawer__panel nav a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}
.nav-drawer__panel nav a:hover,
.nav-drawer__panel nav a.active { color: var(--color-primary); }

/* ════════════════════════════════
   HERO SECTION
   Large featured image area with overlay text
════════════════════════════════ */

.home-hero {
  background: var(--color-bg);
  padding: 0 0 10px 0;
}

.home-hero__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-hero);
  min-height: var(--hero-height);
}

@media (min-width: 768px) { /* --bp-md */
  .home-hero__layout {
    grid-template-columns: 2fr 1fr;
    align-items: stretch;
  }
}

/* ── Container Elements ── */
.home-hero__main,
.home-hero__side-item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
}

.home-hero__main {
  min-height: 280px;
}

@media (min-width: 768px) { /* --bp-md */
  .home-hero__main {
    min-height: var(--hero-height);
  }
}

.home-hero__side {
  display: flex;
  flex-direction: column;
  gap: var(--gap-hero);
}

.home-hero__side-item {
  flex: 1;
  min-height: 280px;
}

@media (min-width: 768px) { /* --bp-md */
  .home-hero__side-item {
    min-height: calc((var(--hero-height) - var(--gap-hero)) / 2);
  }
}

/* ── Background Images ── */
.home-hero__main-img,
.home-hero__side-img {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.home-hero__main-img img,
.home-hero__main-placeholder,
.home-hero__side-img img,
.home-hero__side-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease-out;
}

.home-hero__main-placeholder {
  background: var(--color-placeholder-main);
}

.home-hero__side-placeholder {
  background: var(--color-placeholder-side);
}

.home-hero__main:hover .home-hero__main-img img,
.home-hero__side-item:hover .home-hero__side-img img {
  transform: scale(1.15);
}

/* ── Overlays (Dark gradient for text readability) ── */
.home-hero__main-overlay,
.home-hero__side-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-hero__main-overlay {
  background: linear-gradient(to top, var(--color-overlay-heavy) 0%, rgba(0,0,0,.2) 50%, transparent 100%);
}

.home-hero__side-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, var(--color-overlay-light) 60%, transparent 100%);
}

/* ── Click Target (invisible link layer) ── */
.home-hero__main-link,
.home-hero__side-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* ── Content Wrapper ── */
.home-hero__main-body,
.home-hero__side-body {
  position: relative;
  z-index: 1;
  width: 100%;
}

.home-hero__main-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.home-hero__side-body {
  padding: 1rem 1.1rem;
}

/* ── Titles ── */
.home-hero__main-title,
.home-hero__side-title {
  box-decoration-break: clone;
  background: var(--color-overlay-mid);
  padding: 0.15em 0.25em;
  display: inline;
  color: var(--color-white);
}

.home-hero__main-title {
  font-size: clamp(1.75rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.home-hero__side-title {
  font-size: clamp(1.35rem, 1.8vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
}

/* ── Links in Titles ── */
.home-hero__main-title a,
.home-hero__side-title a {
  color: var(--color-white);
}

.home-hero__main:hover .home-hero__main-title a,
.home-hero__side-item:hover .home-hero__side-title a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-hero__main-title a:hover {
  color: rgba(255,255,255,.85);  /* intentional: slightly dimmed white on hover */
}

.home-hero__side-title a:hover {
  color: rgba(255,255,255,.8);
}

/* ════════════════════════════════
   HOME PAGE LAYOUT
   Multi-column grid with articles and sidebar
════════════════════════════════ */

.home-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  width: 100%;
}

@media (min-width: 1024px) { /* --bp-lg */
  .home-body {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    align-items: start;
  }
}

/* ── Article Columns (spans 2 of 3 columns) ── */
.home-articles {
  grid-column: 1 / 3;
}

/* ── Topic Pills (above the quote strip) ── */
.home-topics {
  margin-bottom: 2rem;
}

/* ── Post Strip (section wrapper) ── */
.quote-strip {
  margin-bottom: 3rem;
}

.strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.strip-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.strip-more {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: .04em;
}

.strip-more:hover {
  color: var(--color-primary);
}

.strip-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0 0 3rem;
}

/* ── Card Grids ── */
.strip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) { /* --bp-xs */
  .strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) { /* --bp-md */
  .strip-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 2-column grid variant ── */
.strip-grid--column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  grid-auto-flow: dense;
}

@media (max-width: 480px) { /* --bp-xs */
  .strip-grid--column {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════
   HOME SEARCH HERO
   Large centered search, Google-homepage-style
════════════════════════════════ */

.home-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.75rem 1rem 2.5rem;
  background-image: radial-gradient(rgba(90,125,140,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.home-search__title {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 14px;
}

.home-search__subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.home-search__form {
  position: relative;
  width: 100%;
  max-width: 490px;
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border-radius: 24px;
  padding: 8px 8px 8px 24px;
  box-shadow: 0 10px 26px rgba(51,58,52,0.08);
  transition: box-shadow .1s ease;
}

.home-search__form:focus-within {
  box-shadow: 0 12px 30px rgba(90,125,140,0.16);
}

.home-search__input {
  flex: 1;
  width: 100%;
  height: auto;
  padding: 10px 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: none;
  border: none;
  border-radius: 0;
}

.home-search__input:focus {
  outline: none;
}

.home-search__input::-webkit-search-cancel-button,
.home-search__input::-webkit-search-decoration {
  display: none;
}

.home-search__submit {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 12px 24px;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color .08s ease, transform .06s ease, box-shadow .08s ease;
}

.home-search__submit:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 14px rgba(90,125,140,0.35);
}

.home-search__submit:active {
  transform: scale(0.95);
}

.home-search__submit svg {
  display: none;
}

.home-search__submit::after {
  content: 'Search';
  font-size: 0.95rem;
}

.home-topics .article-tags {
  justify-content: center;
  align-items: center;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 1.5rem;
  border-top: none;
  border-bottom: none;
  gap: 10px;
}

.home-topics .tag {
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.25em 0.75em;
  box-shadow: 0 2px 10px rgba(51,58,52,0.05);
  transition: none;
}

.home-topics .tag:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(90,125,140,0.3);
  transform: translateY(-1px);
}

.home-topics .tag:active {
  transform: translateY(0) scale(0.96);
}

/* ════════════════════════════════
   QUOTE LIST
   Rounded card grid, quote-first with a quiet author line
════════════════════════════════ */

.quote-list-section__title {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 24px;
}

.quote-list {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 2;
  column-gap: 18px;
}

.quote-list--single {
  column-count: 1;
}

@media (max-width: 640px) { /* --bp-sm-max */
  .quote-list {
    column-count: 1;
  }
}

.quote-list__item {
  break-inside: avoid;
  margin-bottom: 18px;
  background: var(--color-surface);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 4px 18px rgba(51,58,52,0.06);
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow .12s ease, transform .12s ease;
}

.quote-list__item:hover {
  box-shadow: 0 14px 32px rgba(90,125,140,0.18);
  transform: translateY(-3px);
}

.quote-list__item:active {
  transform: translateY(-1px);
  transition-duration: .08s;
}

.quote-list__item--ad {
  background: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-list__item--ad:hover {
  box-shadow: none;
  transform: none;
}

.quote-list__body {
  display: block;
  max-width: 60ch;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--color-text);
  white-space: pre-line;
  margin-bottom: 16px;
  transition: color .08s ease;
}

.quote-list__item:hover .quote-list__body {
  color: var(--color-primary-quote);
}

.quote-list__author {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: color .08s ease;
}


.quote-list__author:hover {
  color: var(--color-primary-quote);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* ════════════════════════════════
   POST CARD
   Article preview card (vertical desktop, horizontal mobile)
════════════════════════════════ */

.quote-card {
  background: var(--color-surface);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

@media (min-width: 768px) { /* --bp-md */
  .quote-card {
    flex-direction: column;
    gap: 0;
  }
}

/* ── Image Wrapper ── */
.quote-card__img-wrap {
  display: block;
  overflow: hidden;
  border-radius: 0;
  flex-shrink: 0;
}

.quote-card__img-wrap img,
.quote-card__img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform var(--transition-time) ease, filter var(--transition-time) ease;
}

.quote-card__img-placeholder {
  background: var(--color-surface-subtle);
}

.quote-card:hover .quote-card__img-wrap img {
  transform: scale(1.04);
  filter: brightness(1.1);
}

/* ── Mobile: Square thumbnail ── */
@media (max-width: 767px) { /* --bp-md-max */
  .quote-card__img-wrap {
    width: 100px;
    min-width: 100px;
  }

  .quote-card__img-wrap img,
  .quote-card__img-placeholder {
    aspect-ratio: 1;
  }
}

/* ── Desktop: Full width ── */
@media (min-width: 768px) { /* --bp-md */
  .quote-card__img-wrap {
    width: 100%;
  }
}

/* ── Content Wrapper ── */
.quote-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 767px) { /* --bp-md-max */
  .quote-card__body {
    padding: 0;
  }
}

@media (min-width: 768px) { /* --bp-md */
  .quote-card__body {
    padding: 0.75rem 0;
  }
}

/* ── Title ── */
.quote-card__title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
  transition: color var(--transition-time) ease;
}

@media (max-width: 767px) { /* --bp-md-max */
  .quote-card__title {
    font-size: 1.1rem;
    line-height: 1.4;
  }
}

.quote-card__title:hover,
.quote-card:hover .quote-card__title {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quote-card__author {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.quote-card__author:hover {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Metadata ── */
.quote-card__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.quote-card__badge {
  text-transform: capitalize;
}

.quote-card__badge--hot {
  background: var(--color-badge-hot-bg);
  color: var(--color-primary);
}

.quote-card__badge--trending {
  background: var(--color-badge-trending-bg);
  color: var(--color-badge-trending);
}

.quote-card__badge--popular {
  background: var(--color-badge-popular-bg);
  color: var(--color-badge-popular);
}

.quote-card__read-time {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* ════════════════════════════════
   SIDEBAR
   Widgets, newsletter form, related reading
════════════════════════════════ */

.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ════ SIDEBAR WIDGET ════ */

.sidebar-widget {
  background: var(--color-surface-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* ── Sticky positioning for article sidebar ── */
.sidebar-widget--sticky {
  position: sticky;
  top: 72px;
  background: transparent;
  padding: 0;
}

/* ── Ad slot wrapper: no card chrome, the ad box supplies its own border ── */
.sidebar-widget--ad {
  background: transparent;
  padding: 0;
  display: flex;
  justify-content: center;
}

/* ════ MOST SHARED LIST ════ */

.sidebar-most-shared {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  counter-reset: shared;
}

.sidebar-most-shared li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
  padding-left: 2.25rem;
  position: relative;
  counter-increment: shared;
}

.sidebar-most-shared li::before {
  content: counter(shared);
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-border);
  line-height: 1;
}

.sidebar-most-shared a {
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
}

.sidebar-most-shared a:hover {
  color: var(--color-primary);
}

/* ════ CATEGORIES LIST ════ */

.sidebar-cats {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.sidebar-cats li {
  border-bottom: 1px solid var(--color-border);
}

.sidebar-cats li:last-child {
  border-bottom: none;
}

.sidebar-cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.sidebar-cats a:hover {
  color: var(--color-primary);
}

.sidebar-cats span {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* ════ RELATED READING ════ */

.sidebar-related {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-related li {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.sidebar-related img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 0;
  transition: transform var(--transition-time) ease, filter var(--transition-time) ease;
}

.sidebar-related li:hover img {
  transform: scale(1.04);
  filter: brightness(1.1);
}

.sidebar-related__title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
  padding: 0.75rem 0;
  transition: color var(--transition-time) ease;
}

.sidebar-related li:hover .sidebar-related__title {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ════════════════════════════════
   ARTICLE PAGE
   Hero, content layout, related reading
════════════════════════════════ */

/* ════ ARTICLE TITLE + IMAGE ════ */

.article-title {
  font-size: clamp(28px, 7.5vw, 44px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-text);
  letter-spacing: -0.025em;
  padding-top: 30px;
  margin-bottom: 1.25rem;
}

.article-img-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 1.75rem;
  aspect-ratio: 16 / 9;
}

.article-img-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.article-byline__meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ════ ARTICLE LAYOUT ════ */

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 1rem;
  padding-bottom: 5rem;
  align-items: start;
}

@media (min-width: 1024px) { /* --bp-lg */
  .article-layout {
    grid-template-columns: minmax(0, 720px) 280px;
    gap: 2rem;
  }

  .article-sidebar {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }
}

.article-main {
  min-width: 0;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.article-body {
  min-width: 0;
}

.article-ad-banner {
  display: flex;
  justify-content: center;
}

/* ════ ARTICLE TAGS ════ */

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.article-tags .tag {
  font-size: 0.9375rem;
}

/* ════ ARTICLE SHARE ════ */

.article-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface-subtle);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.article-share__label {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.article-share__buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  min-height: 44px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-white);
}

.share-btn--twitter {
  background: var(--color-twitter);
}

.share-btn--linkedin {
  background: var(--color-linkedin);
}

.share-btn--facebook {
  background: var(--color-facebook);
}

.share-btn--copy {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text);
  cursor: pointer;
}

.share-btn--copy:hover {
  background: var(--color-surface-subtle);
  opacity: 1;
}

.share-btn:hover {
  opacity: .85;
  text-decoration: none;
  color: var(--color-white);
}

/* ════ SHARE TOAST ════ */

.share-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--color-text);
  color: var(--color-bg);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
  white-space: nowrap;
}

.share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ════════════════════════════════
   PROSE & ARTICLE CONTENT
   Rich text styling for markdown content
════════════════════════════════ */

.article-excerpt {
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--color-prose-subtext);
  font-weight: 700;
  margin-bottom: 1.4rem;
}

.prose {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--color-text);
}

@media (min-width: 768px) { /* --bp-md */
  .prose { font-size: 1.125rem; }
}

@media (min-width: 1024px) { /* --bp-lg */
  .prose { font-size: 1.1875rem; }
}

/* ── Headings ── */
.prose h2 {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
}

.prose h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

/* ── Paragraphs ── */
.prose p {
  margin-bottom: 1.4rem;
}

/* ── Lists ── */
.prose ul,
.prose ol {
  margin: 0 0 1.4rem 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* ── Blockquotes ── */
.prose blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  border-left: none;
  border-top: 2px solid var(--color-border);
  border-bottom: 2px solid var(--color-border);
  background: none;
  font-size: 1.3rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.55;
  color: var(--color-prose-subtext);
  text-align: center;
}

.prose blockquote p {
  margin-bottom: 0;
  font-size: inherit;
}

/* ── Code ── */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface-subtle);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--color-primary);
}

.prose pre {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ── Media ── */
.prose img {
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

/* ── Links ── */
.prose a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--color-primary-hover);
}

/* ── Horizontal Rule ── */
.prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

/* ── Bold ── */
.prose strong {
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-top: 4rem;
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.footer-inner p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.footer-inner nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
}

.footer-inner nav a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.footer-inner nav a:hover { color: var(--color-primary); text-decoration: none; }

.footer-legal a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.footer-legal a:hover { color: var(--color-primary); }

@media (min-width: 640px) { /* --bp-sm2 */
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}
.search-modal.is-open { pointer-events: auto; }

.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--color-overlay-modal);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.search-modal.is-open .search-modal__backdrop { opacity: 1; }

.search-modal__panel {
  position: absolute;
  top: 60px;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(-20px);
  width: min(90vw, 600px);
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 20px 60px var(--color-overlay-light);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.search-modal.is-open .search-modal__panel {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}


.search-modal__content {
  padding: 16px 20px 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.search-modal__input-wrap {
  margin-bottom: 16px;
}

.search-modal__input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
}
.search-modal__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.1);
}

.search-modal__results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result {
  display: block;
  padding: 12px 16px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.search-result:hover {
  background: var(--color-surface-subtle);
  border-color: var(--color-border);
}

.search-result__title {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.search-result__excerpt {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-result__meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.search-modal__no-results {
  text-align: center;
  color: var(--color-text-muted);
  padding: 20px;
}

.search-modal__loading {
  text-align: center;
  color: var(--color-text-muted);
  padding: 20px;
}

@media (max-width: 600px) { /* --bp-sm */
  .search-modal__panel {
    width: min(90vw, calc(100vw - 20px));
    top: 56px;
  }

  .search-modal__content {
    max-height: calc(100vh - 120px);
  }
}

/* ════════════════════════════════
   SEARCH PAGE
   Full-page search: input + plain result list (no images)
════════════════════════════════ */

.search-page__empty {
  padding: 2rem 0.25rem;
}

.search-page__results-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding-top: 2rem;
  margin-bottom: 0.15rem;
}

.search-page__query {
  color: var(--color-primary-quote);
  padding-top: 0;
}

.search-page__matches {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.search-page__match-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.search-page__matches .article-tags {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.search-page__ad {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.search-page__empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.search-page__empty-hint {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.search-page__empty-suggestions {
  margin-bottom: 2rem;
}

.search-page__empty-suggestions-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.search-page__empty .article-tags {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.search-page__empty-links {
  display: flex;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.search-page__empty-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.search-page__empty-links a:hover {
  text-decoration: underline;
}


/* ════════════════════════════════
   TAXONOMY & UTILITIES
   Tags, pagination, categories, links
════════════════════════════════ */

/* ════ PAGE TITLE & CONTENT ════ */

.page-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  padding: 2rem 0 0.5rem;
  letter-spacing: -0.02em;
}

/* ════ TAXONOMY HEADER (author/topic pages) ════ */

.taxonomy-header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.taxonomy-header__kind {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.taxonomy-header__title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-content {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

/* ════ PAGINATION ════ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  padding: 2rem 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pagination a,
.pagination span {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--color-surface);
  color: var(--color-text);
}

.pagination a:hover {
  background: var(--color-text);
  color: var(--color-white);
  border-color: var(--color-text);
}

.pagination .active {
  background: var(--color-text);
  color: var(--color-white);
  border-color: var(--color-text);
}

.pagination__gap {
  border: none;
  background: none;
  padding: 0.4rem 0.2rem;
  color: var(--color-text-muted);
}

/* ════ A-Z NAV (authors index) ════ */

.az-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.5rem 0 1.5rem;
}

.az-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface-subtle);
}

.az-nav a:hover {
  background: var(--color-text);
  color: var(--color-white);
}

.az-nav a.active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ════ TAGS ════ */

.tag {
  display: inline-block;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25em 0.75em;
  border-radius: 100px;
  box-shadow: 0 2px 10px rgba(51,58,52,0.05);
  transition: none;
}

.tag:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(90,125,140,0.3);
  transform: translateY(-1px);
}

.tag:active {
  transform: translateY(0) scale(0.96);
}

/* ════ POPULAR TOPICS (topic index only) ════ */

.taxonomy-index__popular {
  margin-bottom: 2rem;
}

.taxonomy-index__popular-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.taxonomy-index__popular .article-tags {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.taxonomy-index__popular .tag {
  font-size: 0.9375rem;
}

/* ════ TAXONOMY INDEX LIST (topics/authors) ════ */
/* Multi-column layout instead of a wrapping pill cloud — easier to scan a long
   alphabetical list than a single wide wrapped block. */

.taxonomy-index__list {
  column-count: 2;
  column-gap: 2rem;
  margin-top: 1.5rem;
}

@media (min-width: 600px) { /* --bp-sm */
  .taxonomy-index__list {
    column-count: 3;
  }
}

@media (min-width: 900px) {
  .taxonomy-index__list {
    column-count: 4;
  }
}

.taxonomy-index__list .tag {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0.5rem;
  break-inside: avoid;
  white-space: normal;
  font-size: 0.9375rem;
}

/* ════ CATEGORY LINK ════ */

.cat-link {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.cat-link:hover {
  color: var(--color-primary-hover);
}

.cat-link--light {
  color: rgba(255,255,255,.8);
}

.cat-link--light:hover {
  color: var(--color-white);
}

/* ════ CARD METADATA ════ */

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.card-meta__sep {
  opacity: .4;
}

.card-meta__author {
  color: var(--color-text-muted);
}

.card-meta--light,
.card-meta--light .card-meta__author,
.card-meta--light time {
  color: rgba(255,255,255,.55);  /* intentional: dimmed white on dark overlays */
}

/* ════════════════════════════════
   PAGE LAYOUT
   Generic content pages (contact, about, legal, etc.)
════════════════════════════════ */

.page-layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.page-body .page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.error-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 5rem 1rem;
  text-align: center;
}

.error-page__code {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary);
  margin: 0;
}

.error-page__title {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.5rem;
  color: var(--color-text);
}

.error-page__desc {
  color: var(--color-text-muted);
  margin: 0 0 2rem;
}

.error-page__actions {
  display: flex;
  justify-content: center;
}

.error-page__btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--transition-time), color var(--transition-time);
}

.error-page__btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.error-page__btn--primary:hover {
  background: var(--color-primary-hover);
}

/* ════════════════════════════════
   AD SLOT PLACEHOLDER
   Empty grey box standing in for a real AdSense unit — see
   templates/partials/ad_slot.html.tmpl. Sized to the most common IAB ad units:
   300x250 Medium Rectangle, 728x90 Leaderboard (desktop), 320x50 Mobile Banner
   (the leaderboard's real-world mobile replacement — matches how AdSense actually
   serves a different creative below desktop widths, rather than scaling one down).
════════════════════════════════ */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background: var(--color-surface-subtle);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
}

.ad-slot__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ── Medium Rectangle (300x250) ── */
.ad-slot--rectangle {
  width: 300px;
  height: 250px;
  max-width: 100%;
}

/* ── Leaderboard (728x90) on desktop, Mobile Banner (320x50) below --bp-md ── */
.ad-slot--leaderboard {
  width: 728px;
  height: 90px;
  max-width: 100%;
}

@media (max-width: 767px) { /* --bp-md-max */
  .ad-slot--leaderboard {
    width: 320px;
    height: 50px;
  }
}

/* ── Wide Skyscraper (160x600) — tall sidebar unit ── */
.ad-slot--skyscraper {
  width: 160px;
  height: 600px;
  max-width: 100%;
}

.like-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.75rem;
  cursor: pointer;
  color: var(--color-text-muted, #9aa0a6);
  flex-shrink: 0;
  border-radius: 999px;
  opacity: 0;
  transform: scale(1);
  transition: opacity .15s ease, color .15s ease, background-color .15s ease, transform .15s ease;
}

.quote-list__item:hover .like-button,
.article-byline-row .like-button,
.like-button.is-liked {
  opacity: 1;
}

.like-button:hover {
  color: #e8547a;
  background-color: rgba(232, 84, 122, 0.1);
  transform: scale(1.1);
}

.like-button:active {
  transform: scale(0.92);
}

.like-button__icon {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-linecap: round;
  position: relative;
  z-index: 1;
  transition: fill .15s ease, transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.like-button.is-liked {
  color: #e8547a;
}

.like-button.is-liked .like-button__icon {
  fill: currentColor;
}

/* A soft ring that blooms outward and fades on like — kept as its own layer (rather than
   on the icon) so the bloom and the icon's settle don't fight over the same transform. */
.like-button::after {
  content: "";
  position: absolute;
  inset: -0.35rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(232, 84, 122, 0.4) 0%, rgba(232, 84, 122, 0) 70%);
  opacity: 0;
  transform: scale(0.4);
  pointer-events: none;
}

/* Expanding ripple rings — two, staggered — for a bigger, more celebratory "impact". */
.like-button__ring {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  border: 1.5px solid #e8547a;
  opacity: 0;
  pointer-events: none;
}

/* Small sparks that fly outward and spin — layered on top of the icon for the "pop" moment. */
.like-button__spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  color: #ff8fb0;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.like-button.is-liking .like-button__icon {
  animation: like-settle .55s cubic-bezier(0.32, 1.7, 0.5, 1);
}

.like-button.is-liking::after {
  animation: like-bloom .6s ease-out;
}

.like-button.is-liking .like-button__ring--1 {
  animation: like-ripple .7s ease-out;
}

.like-button.is-liking .like-button__ring--2 {
  animation: like-ripple .8s ease-out .1s;
}

.like-button.is-liking .like-button__spark--1 {
  --sx: 22px;
  --sy: -20px;
  animation: like-spark .65s ease-out .02s forwards;
}

.like-button.is-liking .like-button__spark--2 {
  --sx: -24px;
  --sy: -14px;
  animation: like-spark .65s ease-out .06s forwards;
}

.like-button.is-liking .like-button__spark--3 {
  --sx: 4px;
  --sy: 26px;
  animation: like-spark .65s ease-out .1s forwards;
}

@keyframes like-settle {
  0%   { transform: scale(0.6); }
  45%  { transform: scale(1.55); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

@keyframes like-bloom {
  0%   { opacity: 1; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(2); }
}

@keyframes like-ripple {
  0%   { opacity: 0.6; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(2.8); }
}

@keyframes like-spark {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(0deg); }
  25%  { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(1.1) rotate(110deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .like-button,
  .like-button__icon,
  .like-button::after,
  .like-button__ring,
  .like-button__spark {
    transition: none;
  }
  .like-button.is-liking .like-button__icon,
  .like-button.is-liking::after,
  .like-button.is-liking .like-button__ring--1,
  .like-button.is-liking .like-button__ring--2,
  .like-button.is-liking .like-button__spark--1,
  .like-button.is-liking .like-button__spark--2,
  .like-button.is-liking .like-button__spark--3 {
    animation: none;
  }
}

.quote-list__item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.article-byline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.article-byline-row__like {
  flex-shrink: 0;
}

.my-quotes-empty {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.my-quotes-empty__icon {
  width: 2.25rem;
  height: 2.25rem;
  fill: none;
  stroke: #e8547a;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: 0.55;
  margin-bottom: 1.25rem;
}

.my-quotes-empty__title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.my-quotes-empty__hint {
  font-size: 1rem;
  color: var(--color-text-muted, #666);
  max-width: 38ch;
  line-height: 1.6;
  margin: 0 auto;
}

/* Liked-card treatment: a light rosy wash so the whole card visibly "holds" the like, not just
   the button. No border change — the card's existing border stays put on like. :has() is
   supported by all current evergreen browsers; falls back to the plain card style (no wash) in
   anything older, which is a harmless no-op. */
.quote-list__item:has(.like-button.is-liked) {
  background: linear-gradient(rgba(232, 84, 122, 0.07), rgba(232, 84, 122, 0.07)), var(--color-surface);
  transition: background-color .3s ease, box-shadow .12s ease, transform .12s ease;
}

/* Header "My Quotes" link + count badge — a small cart-style indicator that pops when the
   count changes, so liking a quote reads as "added" no matter which page you're on. The link
   label is its own flex item (rather than a bare text node) so it centers on the same baseline
   as the badge instead of drifting relative to it. */
.my-quotes-link {
  display: inline-flex;
  align-items: center;
}

.my-quotes-link__label {
  display: inline-flex;
  align-items: center;
}

.my-quotes-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.4rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(232, 84, 122, 0.12);
  color: #e8547a;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.my-quotes-badge[hidden] {
  display: none;
}

.my-quotes-badge__icon {
  width: 0.85rem;
  height: 0.85rem;
  fill: currentColor;
  stroke: none;
}

.my-quotes-badge.is-bumping {
  animation: my-quotes-badge-bump .45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes my-quotes-badge-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); background-color: rgba(232, 84, 122, 0.28); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .my-quotes-badge.is-bumping {
    animation: none;
  }
}

