/* ==========================================================================
   HeartWise — Design System
   Warm, trustworthy, editorial dating-advice aesthetic.
   Palette: terracotta clay + warm cream + sage + soft gold.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Color */
  --cream:      #FBF6EF;
  --cream-2:    #F5EDE2;
  --paper:      #FFFFFF;
  --ink:        #2A2320;
  --ink-2:      #6B5F58;
  --ink-3:      #9A8D84;
  --clay:       #BE5A45;
  --clay-2:     #A3462F;
  --clay-tint:  #F7E6DF;
  --sage:       #6C7F5F;
  --sage-tint:  #E9EEE3;
  --gold:       #D8A13F;
  --gold-tint:  #F8EED8;
  --line:       #EADFD3;
  --line-2:     #DCCDBD;

  /* Type */
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Space & shape */
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 26px;
  --r-xl: 40px;
  --shadow-sm: 0 1px 2px rgba(42,35,32,.05), 0 2px 8px rgba(42,35,32,.04);
  --shadow-md: 0 4px 14px rgba(42,35,32,.07), 0 12px 34px rgba(42,35,32,.06);
  --shadow-lg: 0 10px 30px rgba(42,35,32,.10), 0 30px 60px rgba(42,35,32,.08);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--clay-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }
ul, ol { padding-left: 1.15em; }
:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.015em;
  color: var(--ink);
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p { color: var(--ink); }
.lede { font-size: clamp(1.1rem, 1.9vw, 1.3rem); color: var(--ink-2); line-height: 1.6; }
.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clay);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--clay);
  border-radius: 2px;
}
.serif-italic { font-family: var(--serif); font-style: italic; font-weight: 500; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.wrap-narrow { max-width: var(--wrap-narrow); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { max-width: 640px; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.section-head h2 { margin-top: .6rem; }
.section-head p { margin-top: .8rem; color: var(--ink-2); }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; max-width: none; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: .82rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--clay); color: #fff; box-shadow: 0 6px 18px rgba(190,90,69,.28); }
.btn-primary:hover { background: var(--clay-2); box-shadow: 0 10px 26px rgba(190,90,69,.34); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--paper); border-color: var(--clay); color: var(--clay-2); }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: #5b6d4f; }
.btn-sm { padding: .6rem 1.1rem; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251,246,239,.86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(42,35,32,.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-dot { color: var(--clay); }
.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav-links { display: flex; align-items: center; gap: 1.7rem; list-style: none; padding: 0; margin: 0; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .97rem; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--clay); border-radius: 2px; transition: width .28s var(--ease);
}
.nav-links a:hover { text-decoration: none; color: var(--clay-2); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-toggle {
  display: none; background: none; border: 1.5px solid var(--line-2); border-radius: 12px;
  width: 46px; height: 46px; align-items: center; justify-content: center; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 88% 8%, rgba(216,161,63,.16), transparent 70%),
    radial-gradient(55% 60% at 4% 92%, rgba(108,127,95,.14), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy h1 { margin-top: 1rem; }
.hero-copy h1 em { font-style: italic; color: var(--clay); }
.hero-copy .lede { margin-top: 1.3rem; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.trust-item { display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--ink-2); font-weight: 500; }
.trust-item svg { width: 20px; height: 20px; color: var(--sage); flex: none; }
.hero-media { position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: 46% 46% 44% 44% / 40% 40% 46% 46%;
  box-shadow: var(--shadow-lg);
}
.hero-media::after {
  content: ""; position: absolute; inset: -14px -14px 14px 14px; z-index: -1;
  border: 2px dashed var(--line-2); border-radius: 46% 46% 44% 44% / 40% 40% 46% 46%;
}
.hero-badge {
  position: absolute; bottom: 8%; left: -6%;
  background: var(--paper); border-radius: var(--r-md); padding: .85rem 1.1rem;
  box-shadow: var(--shadow-md); display: flex; align-items: center; gap: .7rem;
  border: 1px solid var(--line);
}
.hero-badge .num { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--clay); line-height: 1; }
.hero-badge .lbl { font-size: .78rem; color: var(--ink-2); line-height: 1.25; }

/* ---------- Marquee / trust strip ---------- */
.strip { background: var(--ink); color: var(--cream); padding-block: 1.1rem; }
.strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.6rem; font-size: .88rem; letter-spacing: .02em; }
.strip-inner span { display: inline-flex; align-items: center; gap: .5rem; opacity: .92; }
.strip-inner svg { width: 17px; height: 17px; color: var(--gold); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: clamp(1.2rem, 2.6vw, 1.9rem); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.post-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.post-card-media { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card-media img { transform: scale(1.05); }
.post-card-body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card-body h3 { font-size: 1.28rem; margin-top: .7rem; }
.post-card-body h3 a { color: var(--ink); }
.post-card-body h3 a:hover { color: var(--clay-2); text-decoration: none; }
.post-card-body p { margin-top: .6rem; color: var(--ink-2); font-size: .96rem; }
.post-card-foot { margin-top: auto; padding-top: 1.1rem; display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--ink-3); }

.tag {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .34rem .7rem; border-radius: 999px; background: var(--clay-tint); color: var(--clay-2);
}
.tag--sage { background: var(--sage-tint); color: #4f5f45; }
.tag--gold { background: var(--gold-tint); color: #8a6417; }
.tag--ink { background: #efe9e2; color: var(--ink-2); }

/* ---------- Featured (editorial split) ---------- */
.featured { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 3vw, 2.4rem); align-items: stretch; }
.featured-main {
  position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 420px;
  display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow-md);
}
.featured-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.featured-main::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(42,35,32,0) 30%, rgba(42,35,32,.82) 100%); }
.featured-main-body { position: relative; z-index: 2; padding: clamp(1.5rem, 3vw, 2.4rem); }
.featured-main-body h3 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-top: .7rem; }
.featured-main-body p { color: rgba(255,255,255,.86); margin-top: .6rem; max-width: 46ch; }
.featured-main .tag { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(4px); }
.featured-side { display: flex; flex-direction: column; gap: 1.1rem; }
.mini-card { display: flex; gap: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: .85rem; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.mini-card:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.mini-card img { width: 92px; height: 92px; border-radius: 12px; object-fit: cover; flex: none; }
.mini-card h4 { font-size: 1.02rem; line-height: 1.3; }
.mini-card h4 a { color: var(--ink); }
.mini-card h4 a:hover { color: var(--clay-2); text-decoration: none; }
.mini-card .meta { font-size: .78rem; color: var(--ink-3); margin-top: .4rem; }

/* ---------- Category strip ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.cat-card {
  display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem 1.3rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--clay); background: var(--clay-tint); text-decoration: none; }
.cat-card .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sage-tint); color: var(--sage); }
.cat-card .ico svg { width: 22px; height: 22px; }
.cat-card h3 { font-size: 1.08rem; }
.cat-card span { font-size: .82rem; color: var(--ink-3); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--ink); color: var(--cream); border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 3.4rem); position: relative; overflow: hidden;
}
.newsletter::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 80% at 90% 10%, rgba(216,161,63,.22), transparent 70%); }
.newsletter-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.newsletter h2 { color: #fff; }
.newsletter p { color: rgba(251,246,239,.78); margin-top: .7rem; }
.newsletter-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1; min-width: 200px; padding: .85rem 1.1rem; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08); color: #fff; font-size: .98rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form input:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,.12); }
.newsletter-note { font-size: .8rem; color: rgba(251,246,239,.55); margin-top: .8rem; }

/* ---------- Author box ---------- */
.author-box { display: flex; gap: 1.4rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; }
.author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--clay-tint); }
.author-box h3 { font-size: 1.2rem; }
.author-box .role { font-size: .85rem; color: var(--clay); font-weight: 600; }
.author-box p { font-size: .94rem; color: var(--ink-2); margin-top: .5rem; }

/* ---------- Article ---------- */
.article-header { padding-block: clamp(2rem, 5vw, 3.2rem) 1.5rem; }
.article-header h1 { margin-top: 1rem; max-width: 20ch; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; margin-top: 1.4rem; font-size: .9rem; color: var(--ink-2); }
.article-meta img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.article-hero { border-radius: var(--r-lg); overflow: hidden; margin-block: 1.5rem 2.5rem; box-shadow: var(--shadow-md); }
.article-hero img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: 1fr 260px; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.article-body { max-width: 720px; }
.article-body > * + * { margin-top: 1.15rem; }
.article-body h2 { margin-top: 2.4rem; scroll-margin-top: 90px; }
.article-body h3 { margin-top: 1.8rem; scroll-margin-top: 90px; }
.article-body p, .article-body li { color: #3a322e; }
.article-body ul, .article-body ol { display: grid; gap: .5rem; }
.article-body strong { color: var(--ink); font-weight: 650; }
.article-body a { font-weight: 500; }
.article-body blockquote {
  border-left: 4px solid var(--clay); background: var(--clay-tint);
  padding: 1.1rem 1.4rem; border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--ink);
}
.callout { background: var(--sage-tint); border: 1px solid #d5e0cb; border-radius: var(--r-md); padding: 1.2rem 1.4rem; }
.callout h4 { color: #4f5f45; display: flex; align-items: center; gap: .5rem; }
.callout h4 svg { width: 20px; height: 20px; }
.callout p { font-size: .96rem; margin-top: .5rem; }
.callout--warn { background: var(--gold-tint); border-color: #ecd9a8; }
.callout--warn h4 { color: #8a6417; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
thead th { background: var(--cream-2); text-align: left; font-family: var(--sans); font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); padding: .85rem 1rem; border-bottom: 1px solid var(--line-2); }
tbody td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #fdfaf6; }
td strong { color: var(--ink); }

/* TOC */
.toc { position: sticky; top: 96px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.3rem; }
.toc h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { list-style: none; padding: 0; margin: .9rem 0 0; display: grid; gap: .55rem; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: .6rem; font-size: .9rem; color: var(--ink-2); line-height: 1.4; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--serif); color: var(--clay); font-weight: 600; font-size: .82rem; }
.toc a:hover, .toc a.is-active { color: var(--clay-2); text-decoration: none; }

/* FAQ */
.faq { display: grid; gap: .7rem; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 1.2rem; }
.faq summary { list-style: none; cursor: pointer; padding: 1.05rem 0; font-weight: 600; font-family: var(--serif); font-size: 1.08rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-size: 1.4rem; color: var(--clay); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.1rem; color: var(--ink-2); font-size: .96rem; }

/* Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .85rem; color: var(--ink-3); padding-top: 1.4rem; }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb .sep { color: var(--line-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(251,246,239,.72); margin-top: clamp(3rem, 7vw, 5rem); padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer .brand { color: #fff; }
.site-footer p { color: rgba(251,246,239,.62); font-size: .92rem; margin-top: 1rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-family: var(--sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .6rem; }
.footer-col a { color: rgba(251,246,239,.72); font-size: .92rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .82rem; color: rgba(251,246,239,.5); }
.footer-disclosure { font-size: .78rem; color: rgba(251,246,239,.45); margin-top: 1rem; max-width: 70ch; line-height: 1.6; }

/* ---------- Reveal animation (progressive enhancement) ----------
   Content is VISIBLE BY DEFAULT so it renders for no-JS users, Googlebot,
   and full-page screenshots. The hidden state applies only when JS is active
   (html.js) AND motion is allowed, and is released on load. */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  html.js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mx-auto { margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -60px; background: var(--clay); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 10px 10px; z-index: 100; transition: top .2s var(--ease); }
.skip-link:focus { top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; margin-inline: auto; }
  .hero-media::after { display: none; }
  .featured { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .newsletter-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem;
    position: absolute; top: 74px; left: 0; right: 0; background: var(--paper);
    padding: 1.5rem clamp(1.1rem,4vw,2rem) 1.8rem; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open .nav-links a { font-size: 1.05rem; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .hero-badge { left: 0; }
  .author-box { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.lang-switch a,
.lang-switch .lang-on { color: var(--ink-3); text-decoration: none; padding: .15rem .1rem; border-radius: 4px; }
.lang-switch a:hover { color: var(--clay-2); text-decoration: none; }
.lang-switch .lang-on { color: var(--clay); }
.lang-switch span[aria-hidden] { color: var(--line-2, #d8cec2); }
.lang-switch a:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
@media (max-width: 720px) {
  .nav.is-open .lang-switch { font-size: 1rem; }
}
