/* =====================================================================
   Sahima Care Services — NDIS Knowledge Hub
   Shared stylesheet for the "Daily Life Assistance" pillar + spoke pages.
   Editorial serif content, wrapped in the standard Sahima site chrome
   (navbar + footer + dark mode), recoloured to the Sahima blue palette.
   ===================================================================== */

:root {
  --primary: #4A7CDE;
  --primary-dark: #3A5FBF;
  --accent: #5B9BD5;
  --gradient: linear-gradient(135deg, #4A7CDE 0%, #5B9BD5 100%);

  /* editorial content tokens */
  --ink: #1e293b;
  --ink-soft: #43506b;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-tint: #f1f5f9;
  --line: #e2e8f0;
  --primary-tint: rgba(74, 124, 222, 0.08);
  --primary-tint-2: rgba(74, 124, 222, 0.14);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.05);

  /* site-chrome tokens (navbar / footer, matching the rest of the site) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --card-bg: #ffffff;
  --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --border-color: #e2e8f0;

  --radius: 16px;
  --radius-lg: 20px;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-inter: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-nav: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1200px;
  --nav-h: 82px;
}

[data-theme="dark"] {
  --ink: #f1f5f9;
  --ink-soft: #cbd5e1;
  --muted: #94a3b8;
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-tint: #334155;
  --line: #334155;
  --primary-tint: rgba(74, 124, 222, 0.16);
  --primary-tint-2: rgba(74, 124, 222, 0.28);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);

  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --card-bg: #1e293b;
  --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  --navbar-bg: rgba(15, 23, 42, 0.95);
  --border-color: #334155;
}

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

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-inter);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---- reading progress bar ---- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px; width: 0;
  background: var(--gradient);
  z-index: 2000;
  transition: width 0.12s ease-out;
}

/* ---- preloader ---- */
.preloader {
  position: fixed; inset: 0;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.loader {
  width: 60px; height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- theme toggle ---- */
.theme-toggle {
  position: fixed; bottom: 100px; right: 30px;
  width: 50px; height: 50px;
  background: var(--gradient);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem; cursor: pointer;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(74, 124, 222, 0.4);
  transition: transform 0.3s ease;
}
.theme-toggle:hover { transform: translateY(-5px); }
.theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: block; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }

/* =====================================================================
   SITE NAVBAR (matches the rest of the website)
   ===================================================================== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%;
  padding: 1rem 5%;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000;
  background: var(--navbar-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  font-family: var(--font-nav);
}
.navbar .logo { display: flex; align-items: center; }
.navbar .logo img { height: 50px; width: auto; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-primary); font-weight: 500; position: relative; transition: color 0.3s ease; }
.nav-links a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--gradient); transition: width 0.3s ease; }
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--primary); }
.nav-links > li { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 0.5rem; }
.dropdown-toggle i { font-size: 0.7rem; transition: transform 0.3s ease; }
.dropdown:hover .dropdown-toggle i { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--card-bg); min-width: 280px; border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
  padding: 1rem 0; margin-top: 1rem; list-style: none; z-index: 1000;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; margin-top: 0.5rem; }
.dropdown-menu li { padding: 0; }
.dropdown-menu a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem; color: var(--text-primary); text-decoration: none; transition: all 0.3s ease; font-size: 0.95rem; }
.dropdown-menu a:hover { background: rgba(74, 124, 222, 0.1); color: var(--primary); }
.dropdown-menu a::after { display: none; }
.dropdown-menu i { width: 20px; color: var(--primary); }
.nav-cta {
  padding: 0.8rem 2rem; background: var(--gradient); color: #fff; border: none;
  border-radius: 50px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.nav-cta:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(74, 124, 222, 0.4); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 30px; height: 3px; background: var(--text-primary); border-radius: 3px; }

/* ---- mobile menu ---- */
.mobile-menu {
  position: fixed; top: 0; right: -100%; width: 80%; max-width: 400px; height: 100vh;
  background: var(--bg-primary); padding: 2rem; z-index: 1001;
  transition: right 0.4s ease; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  font-family: var(--font-nav);
}
.mobile-menu.active { right: 0; }
.mobile-menu-close { position: absolute; top: 1.5rem; right: 1.5rem; font-size: 1.5rem; cursor: pointer; color: var(--text-primary); }
.mobile-nav-links { list-style: none; margin-top: 4rem; }
.mobile-nav-links li { margin-bottom: 1.5rem; }
.mobile-nav-links a { font-size: 1.2rem; font-weight: 500; color: var(--text-primary); text-decoration: none; }
.mobile-nav-links a:hover { color: var(--primary); }
.mobile-dropdown-toggle { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.mobile-dropdown-toggle i { transition: transform 0.3s ease; color: var(--text-secondary); }
.mobile-dropdown-toggle.active i { transform: rotate(180deg); }
.mobile-dropdown-menu { list-style: none; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding-left: 1rem; }
.mobile-dropdown-menu.active { max-height: 400px; }
.mobile-dropdown-menu li { margin-bottom: 1rem; }
.mobile-dropdown-menu li:first-child { margin-top: 1rem; }
.mobile-dropdown-menu a { font-size: 1rem; color: var(--text-secondary); }
.mobile-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000; }
.mobile-overlay.active { opacity: 1; visibility: visible; }

/* ---- back to top ---- */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
  background: var(--gradient); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem; cursor: pointer;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
  z-index: 999; box-shadow: 0 10px 30px rgba(74, 124, 222, 0.4);
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* =====================================================================
   PAGE LAYOUT
   ===================================================================== */
.pagegrid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) 5% 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3.5rem;
  align-items: start;
}
.pagemain { min-width: 0; }

/* ---- breadcrumbs ---- */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  font-family: var(--font-nav);
  font-size: 0.85rem; color: var(--muted);
  margin-bottom: 1.75rem;
}
.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: var(--line); }

/* ---- article head ---- */
.arthead { margin-bottom: 2rem; }
.eyebrow {
  font-family: var(--font-nav);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 0.85rem;
}
.arthead h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.12; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 1.1rem;
}
.artmeta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  font-family: var(--font-nav); font-size: 0.88rem; color: var(--muted);
}
.artmeta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* ---- hero image ---- */
.arthero {
  margin: 0 0 2.5rem; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); background: var(--bg-soft);
}
.arthero.inline { margin: 1.5rem 0 2.5rem; }
.arthero img { width: 100%; height: auto; }
.arthero figcaption { font-family: var(--font-nav); font-size: 0.8rem; color: var(--muted); padding: 0.75rem 1rem; text-align: center; }

/* =====================================================================
   PROSE
   ===================================================================== */
.prose { font-family: var(--font-body); }
.prose > p { font-size: 1.13rem; line-height: 1.85; color: var(--ink-soft); margin-bottom: 1.4rem; }
.prose h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem); line-height: 1.25; color: var(--ink);
  margin: 2.75rem 0 1.1rem; letter-spacing: -0.01em;
}
.prose h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--ink); margin: 2rem 0 0.75rem; }
.prose ul, .prose ol { margin: 0 0 1.5rem; padding-left: 0; list-style: none; }
.prose ul li, .prose ol li { position: relative; font-size: 1.1rem; line-height: 1.8; color: var(--ink-soft); padding-left: 1.9rem; margin-bottom: 0.7rem; }
.prose ul li::before { content: ''; position: absolute; left: 0.15rem; top: 0.7em; width: 8px; height: 8px; border-radius: 50%; background: var(--gradient); }
.prose ol { counter-reset: li; }
.prose ol li { counter-increment: li; }
.prose ol li::before {
  content: counter(li); position: absolute; left: 0; top: 0.15em;
  width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary); border-radius: 50%;
  font-family: var(--font-nav); font-size: 0.8rem; font-weight: 700;
}
.prose p a, .prose li a {
  color: var(--primary); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; font-weight: 600; transition: color 0.2s ease;
}
.prose p a:hover, .prose li a:hover { color: var(--primary-dark); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose em { font-style: italic; }

/* ---- quick answer ---- */
.quickanswer { background: var(--primary-tint); border: 1px solid var(--primary-tint-2); border-radius: var(--radius); padding: 1.6rem 1.8rem; margin: 2rem 0; }
.qa-label { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-nav); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.6rem; }
.qa-label svg { width: 20px; height: 20px; flex: none; }
.quickanswer p { font-size: 1.08rem; line-height: 1.8; color: var(--ink-soft); margin: 0; }

/* ---- table of contents ---- */
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.85rem; margin: 2.25rem 0; }
.toc h2 { font-family: var(--font-nav); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; }
.toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; columns: 2; column-gap: 2.5rem; }
.toc li { counter-increment: toc; margin-bottom: 0.55rem; break-inside: avoid; }
.toc a { font-family: var(--font-nav); font-size: 0.95rem; color: var(--ink-soft); text-decoration: none; display: flex; gap: 0.6rem; transition: color 0.2s ease; }
.toc a::before { content: counter(toc) '.'; color: var(--primary); font-weight: 700; }
.toc a:hover { color: var(--primary); }

/* ---- note / tip callouts ---- */
.note, .tip { border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 2rem 0; font-family: var(--font-body); }
.note { background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.note strong { color: var(--ink); }
.note, .note p { font-size: 1.05rem; line-height: 1.75; color: var(--ink-soft); }
.tip { background: var(--primary-tint); border: 1px solid var(--primary-tint-2); }
.tip-label { font-family: var(--font-nav); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.4rem; }
.tip p { font-size: 1.05rem; line-height: 1.75; color: var(--ink-soft); margin: 0; }

/* ---- local (area context) callout ---- */
.local { background: linear-gradient(135deg, rgba(74,124,222,0.06), rgba(91,155,213,0.10)); border: 1px solid var(--primary-tint-2); border-radius: var(--radius-lg); padding: 1.75rem 2rem; margin: 2.5rem 0; }
.local-label { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-nav); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.75rem; }
.local-label svg { width: 20px; height: 20px; flex: none; }
.local h2 { margin: 0 0 0.75rem; }
.local p { font-family: var(--font-body); font-size: 1.08rem; line-height: 1.8; color: var(--ink-soft); margin: 0; }
.local .arthero { margin-top: 1.5rem; margin-bottom: 0; }

/* ---- table ---- */
.tablewrap { overflow-x: auto; margin: 1.75rem 0 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.tablewrap table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--bg); font-family: var(--font-nav); }
.tablewrap caption { caption-side: top; text-align: left; font-size: 0.85rem; color: var(--muted); padding: 0.9rem 1.1rem; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.tablewrap th, .tablewrap td { padding: 0.95rem 1.15rem; text-align: left; font-size: 0.95rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tablewrap thead th { background: var(--gradient); color: #fff; font-weight: 600; }
.tablewrap tbody tr:nth-child(even) { background: var(--bg-soft); }
.tablewrap tbody tr:last-child td { border-bottom: none; }
.tablewrap td strong { color: var(--ink); }

/* ---- hub grid ---- */
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1.75rem 0 2.5rem; }
.hub-card { display: flex; flex-direction: column; gap: 0.4rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
a.hub-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--primary); }
.hc-num { font-family: var(--font-nav); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }
.hc-title { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.3; color: var(--ink); }
.hc-desc { font-family: var(--font-body); font-size: 0.95rem; line-height: 1.55; color: var(--muted); }
.hub-card.soon { cursor: default; background: var(--bg-soft); }
.hub-card.soon:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--line); }
.hc-soon { align-self: flex-start; margin-top: 0.35rem; font-family: var(--font-nav); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--bg-tint); border: 1px solid var(--line); padding: 0.2rem 0.6rem; border-radius: 50px; }

/* ---- key takeaways ---- */
.takeaways { background: linear-gradient(135deg, rgba(74,124,222,0.06), rgba(91,155,213,0.09)); border: 1px solid var(--primary-tint-2); border-radius: var(--radius-lg); padding: 2rem 2.1rem; margin: 2.75rem 0; }
.takeaways h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--ink); margin-bottom: 1rem; }
.takeaways ul { list-style: none; margin: 0; padding: 0; }
.takeaways li { position: relative; font-family: var(--font-body); font-size: 1.06rem; line-height: 1.7; color: var(--ink-soft); padding-left: 2rem; margin-bottom: 0.7rem; }
.takeaways li::before { content: '\2713'; position: absolute; left: 0; top: 0.1em; width: 22px; height: 22px; display: grid; place-items: center; background: var(--primary); color: #fff; border-radius: 50%; font-family: var(--font-nav); font-size: 0.72rem; font-weight: 700; }

/* ---- FAQ ---- */
.faq { margin: 2.75rem 0; }
.faq h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 1.95rem); color: var(--ink); margin-bottom: 1.4rem; }
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 0.85rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 1.2rem 3rem 1.2rem 1.5rem; position: relative; font-family: var(--font-nav); font-weight: 600; font-size: 1.03rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 1.4rem; top: 1.5rem; width: 9px; height: 9px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(225deg); }
.faq .faq-a { padding: 0 1.5rem 1.35rem; }
.faq .faq-a p { font-family: var(--font-body); font-size: 1.03rem; line-height: 1.75; color: var(--ink-soft); margin: 0; }
.faq .faq-a a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* ---- related ---- */
.related { margin: 2.75rem 0; }
.related h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--ink); margin-bottom: 1.25rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.related-card { display: flex; flex-direction: column; gap: 0.35rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; text-decoration: none; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
a.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.rc-kicker { font-family: var(--font-nav); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }
.rc-title { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; line-height: 1.35; color: var(--ink); }
.related-card.soon { cursor: default; background: var(--bg-soft); }
.related-card.soon .rc-kicker { color: var(--muted); }

/* ---- conclusion ---- */
.conclusion { border-top: 1px solid var(--line); margin-top: 2.75rem; padding-top: 2rem; }
.conclusion h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--ink); margin-bottom: 0.9rem; }
.conclusion p { font-family: var(--font-body); font-size: 1.1rem; line-height: 1.85; color: var(--ink-soft); }

/* ---- soft CTA ---- */
.cta-soft { background: linear-gradient(135deg, #4A7CDE 0%, #5B9BD5 100%); border-radius: var(--radius-lg); padding: 2.75rem 2.5rem; margin: 3rem 0 1rem; color: #fff; box-shadow: 0 24px 50px rgba(74, 124, 222, 0.32); }
.cta-label { font-family: var(--font-nav); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; margin-bottom: 0.6rem; }
.cta-soft h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; margin-bottom: 0.85rem; color: #fff; }
.cta-soft p { font-family: var(--font-body); font-size: 1.08rem; line-height: 1.75; margin-bottom: 1.5rem; color: rgba(255, 255, 255, 0.94); }
.cta-soft strong { color: #fff; font-weight: 700; }
.cta-btn { display: inline-block; background: #fff; color: var(--primary-dark); font-family: var(--font-nav); font-weight: 600; font-size: 0.98rem; text-decoration: none; padding: 0.85rem 2rem; border-radius: 50px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15, 23, 42, 0.25); }

/* =====================================================================
   SIDEBAR
   ===================================================================== */
.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  align-self: start;
  max-height: calc(100vh - var(--nav-h) - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 1.25rem;
  padding-right: 4px;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.sidebar { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sw { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); }
.sw-title { font-family: var(--font-nav); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.sw-links { list-style: none; margin: 0; padding: 0; }
.sw-links li { margin-bottom: 0.15rem; }
.sw-links a { display: block; font-family: var(--font-nav); font-size: 0.92rem; color: var(--ink-soft); text-decoration: none; padding: 0.5rem 0.7rem; border-radius: 8px; border-left: 2px solid transparent; transition: background 0.2s ease, color 0.2s ease; }
.sw-links a:hover { background: var(--primary-tint); color: var(--primary); }
.sw-links a.cur { background: var(--primary-tint); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.sw-links span.soon { display: block; font-family: var(--font-nav); font-size: 0.92rem; color: var(--muted); padding: 0.5rem 0.7rem; border-left: 2px solid transparent; }
.sw-links span.soon::after { content: 'Soon'; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--bg-tint); border: 1px solid var(--line); border-radius: 50px; padding: 0.1rem 0.45rem; margin-left: 0.4rem; vertical-align: middle; }
.sw-cta { background: linear-gradient(135deg, rgba(74,124,222,0.08), rgba(91,155,213,0.12)); border: 1px solid var(--primary-tint-2); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.sw-cta p { font-family: var(--font-body); font-size: 0.98rem; line-height: 1.6; color: var(--ink-soft); margin-bottom: 1rem; }
.sw-cta strong { color: var(--ink); }
.sw-cta .cta-btn { background: var(--gradient); color: #fff; font-size: 0.9rem; padding: 0.7rem 1.5rem; }

/* =====================================================================
   SITE FOOTER (matches the rest of the website)
   ===================================================================== */
.footer { background: var(--bg-tertiary); color: var(--text-primary); padding: 5rem 5% 2rem; font-family: var(--font-nav); }
[data-theme="dark"] .footer { background: #0f172a; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; max-width: 1400px; margin: 0 auto; }
.footer-brand .logo { display: inline-flex; margin-bottom: 1.5rem; }
.footer-brand .logo img { height: 60px; }
.footer-brand p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 1.5rem; }
.footer-column h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.5rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--primary); }
.social-links { display: flex; gap: 1rem; }
.social-link { width: 50px; height: 50px; background: var(--bg-secondary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; transition: all 0.3s ease; }
.social-link:hover { background: var(--gradient); color: #fff; transform: translateY(-5px); }
.footer-disclaimer { max-width: 1400px; margin: 2.5rem auto 0; padding-top: 1.75rem; border-top: 1px solid var(--border-color); font-size: 0.78rem; line-height: 1.7; color: var(--text-secondary); }
.footer-bottom { border-top: 1px solid var(--border-color); margin-top: 1.5rem; padding-top: 2rem; text-align: center; color: var(--text-secondary); }

/* =====================================================================
   AUTHOR BIO BOX (above footer)
   ===================================================================== */
.author-section { max-width: var(--maxw); margin: 0 auto; padding: 0 5% 3.5rem; }
.author-box { display: flex; gap: 1.5rem; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem 2.25rem; }
.author-avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--gradient); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.8rem; box-shadow: 0 8px 20px rgba(74, 124, 222, 0.35); }
.author-info { min-width: 0; }
.author-label { font-family: var(--font-nav); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.35rem; }
.author-name { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--ink); margin: 0 0 0.15rem; }
.author-role { font-family: var(--font-nav); font-size: 0.92rem; color: var(--muted); margin: 0 0 0.85rem; }
.author-bio { font-family: var(--font-body); font-size: 1.02rem; line-height: 1.7; color: var(--ink-soft); margin: 0 0 1rem; }
.author-link { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-nav); font-weight: 600; font-size: 0.92rem; color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
.author-link:hover { color: var(--primary-dark); }
@media (max-width: 620px) { .author-box { flex-direction: column; gap: 1rem; padding: 1.5rem; } }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 992px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 960px) {
  .pagegrid { grid-template-columns: 1fr; gap: 2.5rem; }
  .sidebar { position: static; order: 2; max-height: none; overflow: visible; }
}
@media (max-width: 620px) {
  .brand__name small { display: none; }
  .toc ol { columns: 1; }
  .hub-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; text-align: center; }
  .social-links { justify-content: center; }
  .cta-soft { padding: 2rem 1.5rem; }
  .theme-toggle, .back-to-top { width: 45px; height: 45px; right: 20px; }
  .theme-toggle { bottom: 75px; }
  .back-to-top { bottom: 20px; }
}
