
:root {
  --bg: #FAFAF5;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
  --faint: #94A3B8;
  --border: #E4E4DC;
  --border-soft: #F1F1EA;
  --accent: #D97706;
  --accent-hover: #B45309;
  --accent-soft: #FEF3C7;
  --accent-deep: #78350F;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: 'Fraunces', Georgia, ui-serif, serif;
  --mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(10,10,10,0.04);
  --shadow: 0 4px 12px rgba(10,10,10,0.06);
  --shadow-lg: 0 12px 32px rgba(10,10,10,0.08);
  --brand: #1e6b4a;
  --accent-yellow: #f5c542;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0F1F;
    --card: #131A2D;
    --text: #F5F5F0;
    --muted: #94A3B8;
    --faint: #64748B;
    --border: #1E293B;
    --border-soft: #131A2D;
    --accent: #FBBF24;
    --accent-hover: #FCD34D;
    --accent-soft: #422006;
    --accent-deep: #FDE68A;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  }
}
:root[data-theme="dark"] {
  --bg: #0A0F1F; --card: #131A2D; --text: #F5F5F0; --muted: #94A3B8; --faint: #64748B;
  --border: #1E293B; --border-soft: #131A2D; --accent: #FBBF24; --accent-hover: #FCD34D;
  --accent-soft: #422006; --accent-deep: #FDE68A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4); --shadow: 0 4px 12px rgba(0,0,0,0.4); --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  transition: background-color .2s ease, color .2s ease;
}
::selection { background: var(--accent); color: white; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--sans); letter-spacing: -0.02em; margin: 0; color: var(--text); }

/* ---- wrap ---- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }
.wrap-tight { max-width: 800px; margin: 0 auto; padding: 0 24px; }


/* ==== Cmd+K modal search ==== */
.search-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,10,10,0.6); backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 20vh; padding-left: 20px; padding-right: 20px;
}
.search-modal.open { display: flex; }
.search-modal .panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 100%; max-width: 640px;
  padding: 20px;
}
.search-modal .head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.search-modal .head h4 {
  font-size: 15px; font-weight: 600; color: var(--text); margin: 0;
}
.search-modal .close {
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  font-size: 20px; font-family: var(--sans); padding: 4px 8px; border-radius: 6px;
}
.search-modal .close:hover { background: var(--border-soft); color: var(--text); }
.search-modal input {
  width: 100%; padding: 14px 16px;
  border: 2px solid var(--accent); border-radius: 12px;
  background: var(--bg); color: var(--text);
  font-size: 15px; font-family: var(--sans);
  outline: none;
}
.search-modal input::placeholder { color: var(--faint); }
.search-modal .hint {
  display: flex; justify-content: center; gap: 16px;
  margin-top: 14px;
  font-size: 12px; color: var(--muted);
}
.search-modal .hint kbd {
  font-family: var(--mono); font-size: 11px;
  padding: 2px 6px; background: var(--border-soft); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text);
}
.search-results {
  max-height: 50vh; overflow-y: auto;
  margin-top: 14px; padding: 0; list-style: none;
}
.search-results li { padding: 0; }
.search-results a {
  display: block; padding: 12px 14px; border-radius: 8px;
  color: var(--text); text-decoration: none;
}
.search-results a:hover, .search-results a:focus { background: var(--border-soft); text-decoration: none; }
.search-results .r-title { font-weight: 600; font-size: 15px; margin: 0 0 3px; }
.search-results .r-cat {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent);
}

/* ---- kickers & labels ---- */
.kicker {
  display: inline-block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent);
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  margin: 0 0 24px;
}
.section-head .title-block h2 {
  font-size: 30px; font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em; margin: 6px 0 4px;
}
.section-head .title-block p {
  color: var(--muted); font-size: 15px; margin: 0;
  max-width: 60ch;
}
.section-head .more {
  font-size: 14px; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 8px;
  transition: background .15s ease;
  white-space: nowrap;
}
.section-head .more:hover { background: var(--border-soft); text-decoration: none; }
.section-head .more .arrow { transition: transform .15s ease; }
.section-head .more:hover .arrow { transform: translateX(3px); }
@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---- HERO (top of home) ---- */
.home-hero { padding: 56px 0 32px; }
.home-hero .kicker { margin-bottom: 8px; }
.home-hero h1 {
  font-size: clamp(36px, 5.5vw, 56px); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.03em;
  margin: 0 0 12px; max-width: 20ch;
}
.home-hero p {
  color: var(--muted); font-size: 18px; margin: 0;
  max-width: 60ch;
}

/* ---- Editor's picks ---- */
.picks-section { padding: 32px 0 64px; }
.picks-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 24px;
}
@media (max-width: 900px) { .picks-grid { grid-template-columns: 1fr; } }

/* Big featured card — image-forward */
.pick-big {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--card); border: 1px solid var(--border);
  display: block; text-decoration: none;
  min-height: 480px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.pick-big:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pick-big .cover {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.pick-big .cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 30%, rgba(0,0,0,0.75) 90%, rgba(0,0,0,0.92) 100%);
}
.pick-big .content {
  position: relative; z-index: 1; height: 100%;
  min-height: 480px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 32px; color: #ffffff;
}
.pick-big .badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  color: #ffffff; border: 1px solid rgba(255,255,255,0.2);
  padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  align-self: flex-start; margin-bottom: 16px;
}
.pick-big .badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-yellow); }
.pick-big h3 {
  color: #ffffff;
  font-size: clamp(24px, 3vw, 34px); font-weight: 700;
  line-height: 1.15; letter-spacing: -0.02em;
  margin: 0 0 12px;
  max-width: 20ch;
}
.pick-big .excerpt {
  color: rgba(255,255,255,0.85);
  font-size: 15px; line-height: 1.55;
  max-width: 55ch; margin: 0 0 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pick-big .read {
  display: inline-flex; align-items: center; gap: 6px;
  color: #ffffff; font-size: 14px; font-weight: 600;
}
.pick-big .read .arrow { transition: transform .15s ease; }
.pick-big:hover .read .arrow { transform: translateX(3px); }

/* Small pick cards — horizontal with image left */
.picks-side { display: flex; flex-direction: column; gap: 24px; }
.pick-small {
  display: grid; grid-template-columns: 120px 1fr; gap: 16px;
  border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--border);
  padding: 16px; text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
  min-height: 128px;
}
.pick-small:hover { border-color: var(--faint); transform: translateY(-2px); text-decoration: none; }
.pick-small .thumb {
  width: 120px; height: 120px; border-radius: 8px; overflow: hidden;
  background: var(--border-soft);
}
.pick-small .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick-small .body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pick-small .badge {
  font-size: 10px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em;
  display: inline-flex; align-items: center; gap: 5px;
}
.pick-small .badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.pick-small h4 {
  font-size: 16px; font-weight: 600; line-height: 1.3;
  color: var(--text); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pick-small:hover h4 { color: var(--accent); }

@media (max-width: 640px) {
  .pick-small { grid-template-columns: 96px 1fr; }
  .pick-small .thumb { width: 96px; height: 96px; }
}

/* ---- section wrappers ---- */
.section { padding: 24px 0 48px; }
.section + .section { padding-top: 48px; border-top: 1px solid var(--border); }

/* ---- 3-col card grid ---- */
.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

/* ---- Standard card ---- */
.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-2px); border-color: var(--faint);
  box-shadow: var(--shadow); text-decoration: none;
}
.card .cover-wrap {
  position: relative; aspect-ratio: 16 / 9;
  overflow: hidden; background: var(--border-soft);
}
.card .cover-wrap > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .cover-wrap > img { transform: scale(1.04); }
.card .body {
  padding: 20px; flex: 1;
  display: flex; flex-direction: column; gap: 10px;
}
.card .badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.card .badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.card h3 {
  font-size: 18px; font-weight: 600; line-height: 1.3;
  color: var(--text); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover h3 { color: var(--accent); }
.card .snippet {
  color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- Category page hero ---- */
.cat-hero { padding: 64px 0 40px; }
.cat-hero .kicker { margin-bottom: 8px; }
.cat-hero h1 {
  font-size: clamp(40px, 6vw, 60px); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 12px;
}
.cat-hero p { color: var(--muted); font-size: 18px; margin: 0; max-width: 60ch; }

/* ==== POST PAGE ==== */
.post-wrap {
  max-width: 1200px; margin: 0 auto; padding: 48px 24px 80px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px; align-items: start;
}
@media (max-width: 1000px) {
  .post-wrap { grid-template-columns: 1fr; gap: 32px; }
}

.article { min-width: 0; }
.article header { margin-bottom: 32px; }
.article .badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 16px;
}
.article .badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.article h1 {
  font-size: clamp(30px, 4vw, 44px); font-weight: 700;
  line-height: 1.1; letter-spacing: -0.025em;
  color: var(--text); margin: 0 0 20px;
}
.article .byline {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 15px;
}
.article .byline img {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
}
.article .cover-lg {
  margin: 32px 0;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9; background: var(--border-soft);
}
.article .cover-lg img { width: 100%; height: 100%; object-fit: cover; }
.article .disclosure {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  padding: 12px 16px; border-radius: 8px;
  font-size: 14px; color: var(--muted); margin: 0 0 32px;
}
.article .disclosure a { color: var(--accent-hover); text-decoration: underline; }
.article .body {
  font-size: 17px; line-height: 1.75;
  color: var(--text);
  max-width: 68ch;
}
.article .body p { margin: 0 0 1.15em; }
.article .body h2 {
  font-size: 26px; font-weight: 700; line-height: 1.25;
  letter-spacing: -0.02em; margin: 2em 0 0.6em;
}
.article .body h3 {
  font-size: 20px; font-weight: 600; line-height: 1.3;
  letter-spacing: -0.01em; margin: 1.6em 0 0.5em;
}
.article .body h4 {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin: 1.5em 0 0.5em;
}
.article .body ul, .article .body ol { padding-left: 1.4em; }
.article .body li { margin: 0.4em 0; }
.article .body blockquote {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  margin: 1.5em 0; padding: 0.5em 1em; border-radius: 4px;
}
.article .body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article .body a:hover { color: var(--accent-hover); }
.article .body strong { color: var(--text); font-weight: 700; }
.article .body code {
  background: var(--border-soft); border-radius: 4px; padding: 2px 6px;
  font-family: var(--mono); font-size: 0.9em; color: var(--accent-hover);
}
.article .body img {
  border-radius: 12px; border: 1px solid var(--border); margin: 1.5em 0;
}
.article .body table {
  width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px;
}
.article .body th, .article .body td {
  border-bottom: 1px solid var(--border); padding: 12px; text-align: left; vertical-align: top;
}
.article .body th { font-weight: 700; }

/* Share row */
.share-row {
  margin: 48px 0 0; padding: 24px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.share-row .label {
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin-right: 8px;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--text); font-size: 14px; font-weight: 500;
  font-family: var(--sans); cursor: pointer; text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.share-btn:hover { border-color: var(--faint); background: var(--border-soft); text-decoration: none; color: var(--text); }
.share-btn .icn { font-weight: 700; }

/* Author card at post foot */
.author-card {
  margin: 48px 0 0; padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card);
  display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: center;
}
.author-card img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent);
}
.author-card h4 { font-size: 18px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.author-card .role {
  font-size: 11px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px;
}
.author-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---- Right sidebar (banner) ---- */
.side {
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 96px;
}
@media (max-width: 1000px) { .side { position: static; } }
.side-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.side-banner {
  aspect-ratio: 300 / 250;
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 12px; text-align: center;
  background:
    repeating-linear-gradient(45deg, var(--border-soft) 0 1px, transparent 1px 12px),
    var(--card);
  padding: 24px;
}
.side-banner .label {
  font-weight: 600; color: var(--muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
}
.side-newsletter {
  padding: 20px;
}
.side-newsletter h4 {
  font-size: 15px; font-weight: 700; margin: 0 0 6px;
}
.side-newsletter p { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.side-newsletter .row {
  display: flex; align-items: stretch;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--bg);
}
.side-newsletter input {
  flex: 1; border: 0; background: transparent; outline: 0;
  padding: 10px 12px; font-size: 13px; color: var(--text); font-family: var(--sans);
}
.side-newsletter input::placeholder { color: var(--faint); }
.side-newsletter button {
  border: 0; background: var(--accent); color: white;
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  font-family: var(--sans); cursor: pointer;
}
.side-newsletter button:hover { background: var(--accent-hover); }
.side-related { padding: 16px; }
.side-related .kicker { display: block; margin-bottom: 10px; }
.side-related a {
  display: block; text-decoration: none;
  font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35;
  padding: 10px 0;
}
.side-related a:hover { color: var(--accent); }
.side-related .thumb {
  aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
  margin-bottom: 10px; background: var(--border-soft);
}
.side-related .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Legal / About ---- */
.legal { max-width: 800px; margin: 0 auto; padding: 64px 24px 0; }
.legal h1 { font-size: clamp(32px, 4vw, 46px); font-weight: 700; letter-spacing: -0.025em; margin: 0 0 20px; }
.legal .body { font-size: 17px; line-height: 1.7; color: var(--text); }
.legal .body p { margin: 0 0 1em; color: var(--muted); }
.legal .body h2 {
  font-size: 22px; font-weight: 700; margin: 1.8em 0 0.5em; color: var(--text); letter-spacing: -0.02em;
}
.legal .body a { color: var(--accent); text-decoration: underline; }
.legal .body a:hover { color: var(--accent-hover); }
.legal .body ul, .legal .body ol { padding-left: 1.4em; color: var(--muted); }
.legal .body strong { color: var(--text); }

.about-hero {
  max-width: 1000px; margin: 0 auto; padding: 64px 24px 32px;
  display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center;
}
@media (max-width: 640px) {
  .about-hero { grid-template-columns: 1fr; text-align: center; }
  .about-hero > img { margin: 0 auto; }
}
.about-hero > img {
  width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--accent);
}
.about-hero .kicker { margin-bottom: 8px; }
.about-hero h1 {
  font-size: clamp(36px, 5vw, 52px); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 8px;
}
.about-hero p.tag { color: var(--muted); font-size: 17px; margin: 0; }

/* ---- primary button (used in hero/CTA rarely) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 600; font-family: var(--sans);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); color: white; text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--faint); text-decoration: none; color: var(--text); }


/* ==== v10: GOODFOLIO-style header ==== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 250, 245, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding: 0;
}
:root[data-theme="dark"] .site-header { background: rgba(10,15,31,0.85); border-bottom-color: var(--border); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header { background: rgba(10,15,31,0.85); border-bottom-color: var(--border); }
}
.site-header .row {
  max-width: 1400px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; height: 72px; gap: 24px;
}
.header-pill { display: contents; }
.nav {
  display: none; align-items: center; gap: 4px;
  justify-self: start;
}
@media (min-width: 900px) { .nav { display: flex; } }
.nav a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.nav a svg { width: 14px; height: 14px; opacity: 0.6; }
.nav a:hover, .nav a.active {
  color: var(--text); background: var(--border-soft); text-decoration: none;
}
.nav a:hover svg, .nav a.active svg { opacity: 1; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  justify-self: center;
  padding: 0;
  border: 0;
  height: auto;
}
.brand svg { display: none; }
.brand .name {
  font-family: var(--sans); font-weight: 700;
  font-size: 18px; letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text);
}
@media (max-width: 640px) {
  .brand .name { font-size: 15px; letter-spacing: 0.2em; }
  .site-header .row { padding: 0 16px; }
}

.header-cta {
  display: flex; align-items: center; gap: 8px;
  justify-self: end;
}

/* Search trigger — pill w/ subtle look */
.search-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; font-family: var(--sans);
  transition: color .15s ease, border-color .15s ease;
}
.search-trigger:hover { color: var(--text); border-color: var(--faint); }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger .txt, .search-trigger .k { display: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--faint); }
.icon-btn svg { width: 16px; height: 16px; }

.header-signup {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 600; font-family: var(--sans);
  text-decoration: none; white-space: nowrap;
  transition: background .15s ease;
}
.header-signup:hover { background: var(--muted); color: var(--bg); text-decoration: none; }

/* Mobile: hide left nav, keep centered wordmark + right icon */
@media (max-width: 899px) {
  .site-header .row { grid-template-columns: auto 1fr auto; }
  .brand { justify-self: start; }
}

/* ==== v10: XAVIERDUBOIS-style footer ==== */
.site-footer {
  background: #2a2836;
  padding: 40px 20px;
  margin-top: 96px;
}
.footer-card {
  max-width: 1200px; margin: 0 auto;
  background: #0A0A14; color: #F5F5F5;
  border-radius: 24px;
  padding: 64px 48px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
@media (max-width: 640px) {
  .site-footer { padding: 20px 12px; }
  .footer-card { padding: 40px 24px 24px; border-radius: 20px; }
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px;
  padding-bottom: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; gap: 40px; } }

.footer-contact .kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #A78BFA; margin: 0 0 12px; display: block;
}
.footer-contact h2 {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(28px, 3.5vw, 40px); line-height: 1.15;
  letter-spacing: -0.02em; color: #FFFFFF;
  margin: 0 0 24px; max-width: 14ch;
}
.footer-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px;
  background: #F5F5F0; color: #0A0A14;
  font-size: 14px; font-weight: 600; font-family: var(--sans);
  text-decoration: none;
  transition: background .15s ease, transform .05s ease;
  margin-bottom: 32px;
}
.footer-cta:hover { background: #FFFFFF; color: #0A0A14; text-decoration: none; }
.footer-cta:active { transform: scale(0.98); }
.footer-contact-detail { display: block; margin-bottom: 12px; }
.footer-contact-detail .kicker { margin-bottom: 8px; }
.copy-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #F5F5F5; font-family: var(--sans); font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.copy-pill:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: #F5F5F5; text-decoration: none; }
.copy-pill .icn { color: #A78BFA; display: inline-flex; }
.copy-pill svg { width: 14px; height: 14px; }

.footer-col h5 {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #A78BFA; margin: 0 0 20px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 12px 0; font-size: 15px; }
.footer-col a {
  color: #F5F5F5; text-decoration: none;
  transition: color .15s ease;
}
.footer-col a:hover { color: #A78BFA; }

.footer-divider {
  border: 0; border-top: 1px solid rgba(255,255,255,0.08);
  margin: 8px 0 24px;
}
.footer-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #A78BFA;
  padding-top: 8px;
}

/* v11: subtle grain background for distinctive feel */
body {
  background-image: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.035) 1px, transparent 0);
  background-size: 20px 20px;
}
:root[data-theme="dark"] body,
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background-image: radial-gradient(circle at 1px 1px, rgba(251, 191, 36, 0.04) 1px, transparent 0); } }

/* v11: bigger, more confident wordmark */
.brand .name {
  font-size: 20px !important;
  letter-spacing: 0.28em !important;
  color: var(--text) !important;
}
:root[data-theme="dark"] .brand .name,
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .name { color: var(--text); } }

/* v11: pick up amber accent throughout */
.card:hover h3 { color: var(--accent); }
.card .badge { color: var(--accent); }
.card .badge .dot { background: var(--accent); }
.pick-big .badge .dot { background: var(--accent); }
.pick-small .badge { color: var(--accent); }
.pick-small .badge .dot { background: var(--accent); }
.pick-small:hover h4 { color: var(--accent); }
.article .badge { color: var(--accent); }
.article .badge .dot { background: var(--accent); }
.article .body a { color: var(--accent); }
.article .body a:hover { color: var(--accent-hover); }
.article .body code { color: var(--accent-hover); }
.article .disclosure { background: var(--accent-soft); border-left-color: var(--accent); }
.legal .body a { color: var(--accent); }
.legal .body a:hover { color: var(--accent-hover); }
.kicker { color: var(--accent); }
.about-hero > img { border-color: var(--accent); }
.author-card img { border-color: var(--accent); }
.author-card .role { color: var(--accent); }

/* ==== v11: new Granada-inspired centered hero ==== */
.corpsx-hero {
  text-align: center;
  padding: 80px 0 48px;
  position: relative;
}
@media (max-width: 640px) { .corpsx-hero { padding: 48px 0 32px; } }
.corpsx-hero .hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--muted);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.corpsx-hero .hero-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 30%, transparent);
}
.corpsx-hero .hero-doodles {
  position: relative; height: 0;
}
.corpsx-hero .doodle-l, .corpsx-hero .doodle-r {
  position: absolute; color: var(--accent); opacity: 0.7;
}
.corpsx-hero .doodle-l {
  left: calc(50% - 260px); top: 40px;
  transform: rotate(-12deg);
}
.corpsx-hero .doodle-r {
  right: calc(50% - 250px); top: -20px;
  transform: rotate(15deg);
}
@media (max-width: 900px) { .corpsx-hero .doodle-l, .corpsx-hero .doodle-r { display: none; } }
.corpsx-hero h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(40px, 6.5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 auto 20px;
  color: var(--text);
  max-width: 14ch;
}
.corpsx-hero .hero-lede {
  max-width: 46ch; margin: 0 auto 36px;
  color: var(--muted); font-size: 17px; line-height: 1.55;
}
.corpsx-hero .hero-cta-row {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.corpsx-hero .hero-cta-row .btn {
  padding: 12px 22px; font-size: 14px; border-radius: 999px;
}
.corpsx-hero .hero-cta-row .btn-primary {
  background: var(--accent); color: #FFFFFF; border-color: var(--accent);
}
.corpsx-hero .hero-cta-row .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #FFFFFF; }
.corpsx-hero .hero-cta-row .btn-ghost {
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
}
.corpsx-hero .hero-cta-row .btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent-hover); color: var(--accent-hover); }

.corpsx-hero .hero-trust {
  padding-top: 40px; border-top: 1px solid var(--border-soft);
}
.corpsx-hero .trust-label {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 16px;
}
.corpsx-hero .trust-logos {
  display: flex; align-items: center; justify-content: center; gap: 40px;
  flex-wrap: wrap;
}
.corpsx-hero .trust-logos span {
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  color: var(--muted); letter-spacing: -0.01em;
  opacity: 0.7;
  transition: opacity .15s ease, color .15s ease;
}
.corpsx-hero .trust-logos span:hover { opacity: 1; color: var(--text); }

/* ==== v11: 4-pick grid — big left + 3 small stacked right ==== */
.picks-grid-4 { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 900px) { .picks-grid-4 { grid-template-columns: 1fr; } }
.picks-grid-4 .picks-side { display: flex; flex-direction: column; gap: 16px; }
.picks-grid-4 .pick-small {
  min-height: 108px; padding: 12px;
}
.picks-grid-4 .pick-small .thumb { width: 96px; height: 96px; }

/* Section anchor scroll offset */
#picks { scroll-margin-top: 88px; }

/* ==== v12: Featured Reads horizontal strip ==== */
.featured-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .featured-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .featured-strip { grid-template-columns: 1fr; } }
.feat-card {
  position: relative;
  border-radius: var(--radius-lg); overflow: hidden;
  min-height: 340px;
  background: var(--card); border: 1px solid var(--border);
  display: block; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.feat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feat-card .feat-cover {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.feat-card .feat-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
}
.feat-card .feat-body {
  position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 20px;
  color: #FFFFFF;
  display: flex; flex-direction: column; gap: 12px;
}
.feat-card .feat-body .badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  color: #FFFFFF; padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; align-self: flex-start;
}
.feat-card .feat-body .badge .dot { background: var(--accent); }
.feat-card .feat-body h3 {
  color: #FFFFFF; font-size: 20px; line-height: 1.25;
  letter-spacing: -0.015em; font-weight: 700; margin: 0;
}
.feat-card .feat-body .read {
  display: inline-flex; align-items: center; gap: 4px;
  color: #FFFFFF; font-size: 13px; font-weight: 600;
}
.feat-card:hover .arrow { transform: translateX(3px); }
.feat-card .arrow { transition: transform .15s ease; }

/* ==== v12: Industries We Cover ==== */
.industries-section .section-head { margin-bottom: 32px; }
.industries-section .ind-nav {
  display: flex; gap: 10px;
}
.industries-section .ind-arrow {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card); color: var(--text);
  cursor: pointer; font-family: var(--sans);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, background .15s ease;
}
.industries-section .ind-arrow:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.industries-section .ind-arrow svg { width: 18px; height: 18px; }

.industries-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr);
  gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.industries-track::-webkit-scrollbar { height: 6px; }
.industries-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.ind-card {
  position: relative; scroll-snap-align: start;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none;
  transition: transform .2s ease;
}
.ind-card:hover { transform: translateY(-3px); text-decoration: none; }
.ind-card .ind-cover {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.ind-card .ind-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 100%);
}
.ind-card .ind-content {
  position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 24px;
  color: #FFFFFF;
}
.ind-card .ind-num {
  display: inline-block;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.15em; opacity: 0.7; margin-bottom: 12px;
}
.ind-card h3 {
  color: #FFFFFF; font-size: 22px; font-weight: 700;
  line-height: 1.15; letter-spacing: -0.015em; margin: 0;
}

/* Featured amber card (first slot) */
.ind-featured {
  background: var(--accent);
  color: #FFFFFF;
}
.ind-featured .ind-content {
  position: static; padding: 32px 28px;
  display: flex; flex-direction: column; height: 100%; justify-content: space-between;
  gap: 24px;
}
.ind-featured .ind-num { opacity: 0.75; }
.ind-featured p {
  color: rgba(255,255,255,0.85); font-size: 14px; line-height: 1.55; margin: 8px 0 0;
}
.ind-featured .ind-cta {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  background: #FFFFFF; color: var(--accent);
  padding: 10px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  transition: transform .1s ease;
}
.ind-featured:hover .ind-cta { transform: translateX(4px); }
.ind-featured:hover .arrow { transform: translate(3px,-3px); }
.ind-featured .arrow { transition: transform .15s ease; }

@media (max-width: 640px) {
  .industries-section .ind-nav { display: none; }
}
