/* Plus Jakarta Sans, self-hosted (SIL Open Font License, see /fonts/OFL.txt) */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ==========================================================
   VenturePanda shared styles
   Light theme by default; dark theme via [data-theme="dark"]
   (set before paint by the small script in each page's <head>).
   ========================================================== */

:root {
  --bg: #F7F8FC;
  --surface: #FFFFFF;
  --text: #0B0F1A;
  --heading: #0B0F1A;
  --body-ink: #2A3045;
  --muted: #5B627A;
  --faint: #9AA0B4;
  --accent: #3355FF;          /* links, buttons, highlights */
  --accent-hover: #2443E6;
  --on-accent: #FFFFFF;       /* text on an accent background */
  --navy-card: #0B0F1A;       /* always-dark panels (featured cards, hero) */
  --gold: #8FA4FF;            /* light electric, used on dark panels */
  --gold-soft: #DCE3FF;
  --border: #E3E6EF;
  --tag-bg: #EEF1FF;
  --ring: rgba(51,85,255,0.18);
  --shadow: rgba(11,15,26,0.10);
  --nav-bg: rgba(247,248,252,0.90);
  --serif: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0B0F1A;
  --surface: #131A2B;
  --text: #F2F4FA;
  --heading: #F2F4FA;
  --body-ink: #C9CEDD;
  --muted: #959CB3;
  --faint: #687089;
  --accent: #6E8BFF;
  --accent-hover: #8FA4FF;
  --on-accent: #0B0F1A;
  --navy-card: #18213A;
  --border: #232C44;
  --tag-bg: #18213A;
  --ring: rgba(110,139,255,0.25);
  --shadow: rgba(0,0,0,0.40);
  --nav-bg: rgba(11,15,26,0.88);
  color-scheme: dark;
}

/* No-JS fallback: follow the system setting */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0B0F1A;
    --surface: #131A2B;
    --text: #F2F4FA;
    --heading: #F2F4FA;
    --body-ink: #C9CEDD;
    --muted: #959CB3;
    --faint: #687089;
    --accent: #6E8BFF;
    --accent-hover: #8FA4FF;
    --on-accent: #0B0F1A;
    --navy-card: #18213A;
    --border: #232C44;
    --tag-bg: #18213A;
    --ring: rgba(110,139,255,0.25);
    --shadow: rgba(0,0,0,0.40);
    --nav-bg: rgba(11,15,26,0.88);
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  padding-top: 60px;
  min-height: 100vh;
  animation: fadeIn 0.5s ease-in;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleUp { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* ---------- Navigation ---------- */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideInDown 0.6s ease-out;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
  min-width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-logo span { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after { width: 100%; }

.nav-links a.nav-start-here {
  color: var(--accent);
  font-weight: 500;
  background: var(--tag-bg);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.nav-links a.nav-start-here::after { display: none; }

/* Search, theme and menu buttons */
.nav-actions { display: flex; align-items: center; gap: 4px; margin-left: 22px; }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer;
  color: var(--muted); border-radius: 50%;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--accent);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Reading progress (guide pages) */
.read-progress {
  position: fixed; top: 60px; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  transform-origin: left; transform: scaleX(0); z-index: 99; pointer-events: none;
}

/* ---------- Tags and article lists ---------- */

.tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--tag-bg);
  padding: 3px 10px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.article-item {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: slideInUp 0.6s ease-out backwards;
  display: block;
}

.article-item.has-icon { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 20px; align-items: start; }

.article-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.article-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.article-desc {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

.article-meta { font-size: 13px; color: var(--faint); }

/* Category icons */
.g-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--tag-bg), var(--surface));
  border: 1px solid var(--border);
  color: var(--accent);
  transition: all 0.3s ease;
  flex: none;
}
.g-icon svg { width: 24px; height: 24px; }
.g-icon svg .acc { color: var(--gold); }
.g-icon.sm { width: 34px; height: 34px; border-radius: 10px; }
.g-icon.sm svg { width: 17px; height: 17px; }

/* ---------- Standard pages ---------- */

.guides-container,
.resources-container,
.about-container,
.contact-container {
  margin: 0 auto;
  padding: 80px 40px;
}

.guides-container, .resources-container { max-width: 720px; }
.about-container { max-width: 640px; }
.contact-container { max-width: 580px; }

.page-title {
  font-family: var(--serif);
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -1px;
  line-height: 1.15;
  animation: slideInUp 0.7s ease-out 0.1s backwards;
}

.page-subtitle {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 48px;
  font-weight: 300;
  animation: slideInUp 0.7s ease-out 0.2s backwards;
}

/* ---------- Article pages ---------- */

.article-full { max-width: 640px; margin: 0 auto; padding: 80px 40px; }

.back-btn {
  font-size: 13px;
  color: var(--muted);
  margin: -11px 0 37px;
  padding: 11px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  animation: slideInLeft 0.6s ease-out;
}

.article-full .article-tags { margin-bottom: 16px; gap: 12px; }

.article-full h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  animation: slideInUp 0.7s ease-out 0.1s backwards;
}

.article-intro { font-size: 18px; color: var(--muted); margin-bottom: 12px; font-weight: 300; animation: slideInUp 0.7s ease-out 0.2s backwards; }
.article-meta-full { font-size: 13px; color: var(--faint); margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); animation: slideInUp 0.7s ease-out 0.3s backwards; }

.body p { font-size: 17px; line-height: 1.85; color: var(--body-ink); margin-bottom: 24px; font-weight: 300; }
.body p strong { font-weight: 500; color: var(--text); }
.body ul, .body ol { margin: 0 0 24px 22px; }
.body li { font-size: 17px; line-height: 1.8; color: var(--body-ink); font-weight: 300; margin-bottom: 6px; padding-left: 4px; }
.body li strong { font-weight: 500; color: var(--text); }
.body li::marker { color: var(--gold); }
.body ol li::marker { font-weight: 500; color: var(--accent); }
.body .example { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 8px; padding: 18px 20px 2px; margin: 0 0 28px; }
.body .example p { font-size: 16px; margin-bottom: 14px; animation: none; }
.body .example-label { font-size: 11px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.body h2 { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--accent); margin: 40px 0 16px; line-height: 1.3; }
.body blockquote { border-left: 3px solid var(--accent); padding-left: 20px; margin: 32px 0; font-family: var(--serif); font-size: 20px; color: var(--accent); font-style: italic; line-height: 1.5; }

/* Key takeaways */
.takeaways {
  background: var(--navy-card); color: #fff; border-radius: 14px;
  padding: 24px 26px 22px; margin: 0 0 28px; position: relative; overflow: hidden;
}
.takeaways::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,183,156,.28), transparent 70%);
}
.takeaways-label { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.takeaways ul { list-style: none; position: relative; z-index: 1; }
.takeaways li { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.9); padding: 6px 0 6px 28px; position: relative; font-weight: 300; }
.takeaways li strong { color: #fff; font-weight: 500; }
.takeaways li::before {
  content: ''; position: absolute; left: 2px; top: 13px; width: 14px; height: 8px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg);
}

/* In this guide */
.toc { border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; margin: 0 0 40px; background: var(--surface); }
.toc-label { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 12px; padding: 7px 0; font-size: 15px; color: var(--body-ink);
  border-bottom: 1px dashed var(--border); transition: color 0.2s ease, padding 0.2s ease;
}
.toc li:last-child a { border-bottom: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-size: 12px; color: var(--gold); font-weight: 500; padding-top: 3px; min-width: 18px; }
.toc a.is-current { color: var(--accent); font-weight: 500; }

/* What's next */
.whats-next { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.whats-next-label { font-size: 12px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.next-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.next-card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 18px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); transition: all 0.3s ease; position: relative;
}
.next-card .nk { font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.next-card .nt { font-family: var(--serif); font-size: 19px; line-height: 1.3; color: var(--text); }
.next-card .na { font-size: 14px; font-weight: 500; color: var(--accent); margin-top: auto; padding-top: 6px; }
.next-card.tool { background: var(--navy-card); border-color: var(--navy-card); }
.next-card.tool .nk { color: var(--gold); }
.next-card.tool .nt { color: #fff; }
.next-card.tool .na { color: var(--gold); }
.next-card.tool .g-icon { background: rgba(255,255,255,.08); border-color: rgba(201,183,156,.35); color: var(--gold); }

/* ---------- Footer ---------- */

footer { border-top: 1px solid var(--border); padding: 56px 40px 28px; background: var(--bg); }
.footer-inner { max-width: 1040px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 12px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer-brand .fb-text span { color: var(--text); }
.footer-tagline { font-size: 14px; color: var(--muted); margin: 12px 0 18px; max-width: 280px; line-height: 1.6; font-weight: 300; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: all 0.25s ease;
}
.footer-social svg { width: 17px; height: 17px; }
.footer-col h3 { font-size: 12px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col a { display: inline-block; font-size: 14px; color: var(--muted); padding: 5px 0; transition: color 0.2s ease; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--faint);
}
.footer-bottom a { color: var(--muted); }

/* ---------- Search ---------- */

.search-overlay {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(6,14,24,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 12vh 20px 20px;
}
.search-overlay.open { display: block; animation: fadeIn 0.18s ease-out; }
.search-box {
  max-width: 620px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; animation: scaleUp 0.2s ease-out;
}
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.search-field svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search-field input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--text);
  font-family: var(--sans); font-size: 18px; padding: 18px 0;
}
.search-field kbd {
  font-family: var(--sans); font-size: 11px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 7px; cursor: pointer; background: var(--bg);
}
.search-results { max-height: min(60vh, 460px); overflow-y: auto; padding: 8px; }
.search-results a {
  display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 14px; align-items: start;
  padding: 12px; border-radius: 10px; transition: background-color 0.15s ease;
}
.search-results a.active { background: var(--tag-bg); }
.sr-type { font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sr-title { font-family: var(--serif); font-size: 17px; color: var(--text); line-height: 1.3; }
.sr-snippet { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.sr-snippet mark { background: rgba(201,183,156,.35); color: inherit; border-radius: 3px; padding: 0 2px; }
.search-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.search-hint { padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--faint); display: flex; gap: 16px; }

/* ---------- Scroll reveal ----------
   Only hidden when JavaScript is running (html.js); a timer in <head>
   reveals everything if the script never loads. */

html.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1); animation: none !important; }
html.js .rv.in { opacity: 1; transform: none; }
html.js.reveal-all .rv { opacity: 1; transform: none; }

/* ---------- Status colours (calculators) in dark mode ---------- */

:root[data-theme="dark"] .check-result.bad { background: #3a1d1c; color: #f2b8b1; }
:root[data-theme="dark"] .check-result.warn { background: #3a2c12; color: #f1d39a; }
:root[data-theme="dark"] .check-result.good { background: #15301f; color: #a9dcb8; }
:root[data-theme="dark"] .calc-error { color: #f2b8b1 !important; }
:root[data-theme="dark"] .bar .b-fees, :root[data-theme="dark"] .bar .b-stock { background: #8a7a5e; }
:root[data-theme="dark"] .bar .b-cost, :root[data-theme="dark"] .bar .b-setup { background: #5d6b7a; }

/* ---------- Hover effects (mouse only) ---------- */

@media (max-width: 1024px) {
  .nav-links { gap: 20px; }
  .nav-actions { margin-left: 12px; }
}

@media (hover: hover) {
  .nav-logo:hover { opacity: 0.7; transform: scale(1.05); }
  .nav-links a:hover { color: var(--text); transform: translateY(-2px); }
  .nav-links a:hover::after { width: 100%; }
  .nav-links a.nav-start-here:hover { background: var(--accent); color: var(--on-accent); }
  .icon-btn:hover { color: var(--accent); background: var(--tag-bg); }
  .article-item:hover { opacity: 0.75; transform: translateX(8px); }
  .article-item:hover .tag { background: var(--accent); color: var(--on-accent); }
  .article-item:hover .g-icon { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
  .back-btn:hover { color: var(--text); transform: translateX(-4px); }
  .toc a:hover { color: var(--accent); padding-left: 4px; }
  .next-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 30px var(--shadow); }
  .next-card.tool:hover { border-color: var(--gold); }
  .footer-social a:hover { color: var(--on-accent); background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
  .footer-col a:hover { color: var(--accent); }
  .search-results a:hover { background: var(--tag-bg); }
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  nav { padding: 0 12px 0 20px; }
  .nav-logo { font-size: 18px; }
  .nav-actions { margin-left: auto; gap: 0; }
  .nav-toggle { display: flex; margin-right: 0; }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px var(--shadow);
    margin-left: 0;
  }

  nav.nav-open .nav-links { display: flex; }

  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }

  .nav-links a { display: flex; align-items: center; min-height: 48px; font-size: 16px; }
  .nav-links a::after { display: none; }
  .nav-links a.is-active { font-weight: 500; color: var(--accent); }
  .nav-links a.nav-start-here { display: inline-flex; min-height: 40px; margin: 6px 0; padding: 0 18px; }

  .guides-container,
  .resources-container,
  .about-container,
  .contact-container,
  .article-full { padding-left: 20px; padding-right: 20px; }

  footer { padding: 44px 20px 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .search-overlay { padding-top: 70px; }
}

@media (max-width: 600px) {
  nav { padding: 0 8px 0 16px; }
  .nav-logo { font-size: 17px; }
  .next-grid { grid-template-columns: minmax(0,1fr); }
  .article-item.has-icon { grid-template-columns: 42px minmax(0,1fr); gap: 16px; }
  .article-item .g-icon { width: 42px; height: 42px; border-radius: 12px; }
  .article-item .g-icon svg { width: 20px; height: 20px; }
}

/* Respect the "reduce motion" setting */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  html.js .rv { opacity: 1; transform: none; }
}

/* ---------- Rexyd type + logo ---------- */
.nav-logo { display: inline-flex; align-items: center; line-height: 0; }
.wordmark { display: block; height: 30px; width: auto; overflow: visible; }
.wordmark .wm-main { fill: var(--heading); }
.wordmark .wm-x { fill: var(--accent); }
.footer-brand { display: inline-flex; align-items: center; line-height: 0; }
.footer-brand .wordmark { height: 34px; }
.page-title, .article-full h1 { color: var(--heading); font-weight: 800; letter-spacing: -0.035em; }
.body h2 { color: var(--heading); font-weight: 700; letter-spacing: -0.02em; }
.article-title, .next-card .nt, .sr-title { font-weight: 700; letter-spacing: -0.015em; }
.body blockquote { font-style: normal; font-weight: 600; border-left-color: var(--accent); color: var(--heading); }
.takeaways { background: linear-gradient(135deg, #1B2BB8 0%, #3355FF 100%); }
.takeaways::after { background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); }
.takeaways-label { color: #DCE3FF; }
.takeaways li::before { border-color: #FFFFFF; }
.next-card.tool { background: #3355FF; border-color: #3355FF; }
.next-card.tool .nk, .next-card.tool .na { color: #DCE3FF; }
.next-card.tool .g-icon { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; }
.next-card.tool .g-icon svg .acc { color: #fff; }
.read-progress { background: linear-gradient(90deg, #8FA4FF, #3355FF); }
@media (max-width: 600px) { .wordmark { height: 26px; } }
