
  :root {
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --bg-canvas: #fbfbfd;
    --bg-surface: #ffffff;
    --bg-subtle: #f5f5f7;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --text-headline: #1d1d1f;
    --text-body: #1d1d1f;
    --text-muted: #374151;
    --cl-primary: #0056b3;
    --cl-primary-hover: #0077ed;
    --border-hairline: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.12);
    --radius-pill: 980px;
    --radius-card: 24px;
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.06);
    --container-max: 68rem;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme-mode="light"]) {
      --bg-canvas: #000000;
      --bg-surface: #161617;
      --bg-subtle: #1d1d1f;
      --bg-glass: rgba(22, 22, 23, 0.85);
      --text-headline: #f5f5f7;
      --text-body: #f5f5f7;
      --text-muted: #374151;
      --cl-primary: #0056b3;
      --cl-primary-hover: #40a9ff;
      --border-hairline: rgba(255, 255, 255, 0.12);
      --border-subtle: rgba(255, 255, 255, 0.18);
      --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
    }
  }

  :root[data-theme-mode="dark"] {
    --bg-canvas: #000000;
    --bg-surface: #161617;
    --bg-subtle: #1d1d1f;
    --bg-glass: rgba(22, 22, 23, 0.85);
    --text-headline: #f5f5f7;
    --text-body: #f5f5f7;
    --text-muted: #374151;
    --cl-primary: #0056b3;
    --cl-primary-hover: #40a9ff;
    --border-hairline: rgba(255, 255, 255, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.18);
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  }

  :root[data-theme-mode="light"] {
    --bg-canvas: #fbfbfd;
    --bg-surface: #ffffff;
    --bg-subtle: #f5f5f7;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --text-headline: #1d1d1f;
    --text-body: #1d1d1f;
    --text-muted: #374151;
    --cl-primary: #0056b3;
    --cl-primary-hover: #0077ed;
    --border-hairline: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.12);
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.06);
  }

  *, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
  html {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.5;
    background-color: var(--bg-canvas);
    color: var(--text-body);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
  }
  body {
    background-color: var(--bg-canvas);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  /* Responsive Apple HIG Navbar */
  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background-color: var(--bg-glass) !important;
    border-bottom: 1px solid var(--border-hairline);
    padding: 0.65rem 1.25rem;
    width: 100%;
  }
  .navbar-container {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .navbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
  }
  .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-headline) !important;
    text-decoration: none;
    font-size: 1.05rem;
    white-space: nowrap;
  }
  .navbar-brand-text {
    white-space: nowrap;
  }
  .navbar-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
  }
  .nav-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
  }
  .nav-link {
    color: var(--text-headline) !important;
    font-size: 0.92rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
  }
  .nav-link:hover, .nav-link.active {
    background: var(--bg-subtle);
  }
  .navbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .navbar-toggle {
    display: none;
    background: var(--bg-subtle);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-pill);
    padding: 6px 10px;
    color: var(--text-headline);
    cursor: pointer;
    line-height: 1;
  }

  /* Desktop layout (> 992px) */
  @media (min-width: 993px) {
    .navbar-header {
      width: auto;
      justify-content: flex-start;
    }
    .navbar-actions {
      order: 3;
      margin-left: 0.5rem;
    }
    .navbar-menu {
      order: 2;
    }
    .navbar-toggle {
      display: none !important;
    }
  }

  /* Mobile / Tablet layout (<= 992px) */
  @media (max-width: 992px) {
    .navbar-container {
      flex-direction: column;
      align-items: stretch;
      gap: 0;
    }
    .navbar-header {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .navbar-brand-text {
      max-width: 180px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .navbar-toggle {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
    }
    .navbar-menu {
      display: none !important;
      width: 100%;
      margin-top: 0.75rem;
      padding-top: 0.75rem;
      border-top: 1px solid var(--border-hairline);
    }
    .navbar-menu.show {
      display: flex !important;
      flex-direction: column;
      align-items: stretch;
    }
    .nav-list {
      flex-direction: column;
      align-items: stretch;
      width: 100%;
      gap: 0.35rem;
    }
    .nav-link {
      padding: 0.7rem 1rem;
      font-size: 1rem;
      width: 100%;
      border-radius: 10px;
    }
    .nav-item-cta {
      margin-top: 0.5rem;
      width: 100%;
    }
    .nav-item-cta .btn {
      width: 100% !important;
    }
  }

  /* Squarcle Pill Buttons (Unbreakable geometry) */
  .btn, a.btn {
    border-radius: var(--radius-pill) !important;
    font-weight: 500;
    padding: 0.45rem 1.15rem !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
    height: auto !important;
    min-height: 38px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .btn-primary, .btn-dark, a.btn-dark {
    background-color: var(--cl-primary) !important;
    border: 1px solid var(--cl-primary) !important;
    color: #ffffff !important;
  }
  .btn-primary:hover, .btn-dark:hover, a.btn-dark:hover {
    background-color: var(--cl-primary-hover) !important;
    transform: scale(1.02);
  }
  .btn-outline-dark, a.btn-outline-dark {
    background: transparent !important;
    color: var(--text-headline) !important;
    border: 1px solid var(--border-subtle) !important;
  }
  .btn-outline-dark:hover, a.btn-outline-dark:hover {
    background: var(--bg-subtle) !important;
  }

  .theme-switcher {
    display: inline-flex;
    gap: 2px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-hairline);
    padding: 2px;
    border-radius: 980px;
    white-space: nowrap;
    height: 38px;
    align-items: center;
  }
  .theme-btn {
    background: transparent;
    border: none;
    border-radius: 980px;
    padding: 5px 8px;
    color: var(--text-headline);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: all 0.2s ease;
    height: 32px;
    min-width: 32px;
  }
  .theme-btn:hover { opacity: 1; }
  .theme-btn.active {
    background: var(--bg-surface);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    opacity: 1;
  }
  .search-trigger {
    border-radius: 980px !important;
    border: 1px solid var(--border-hairline) !important;
    background: var(--bg-subtle) !important;
    color: var(--text-headline) !important;
    padding: 0.4rem 0.85rem !important;
    font-size: 0.85rem !important;
    cursor: pointer;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 38px;
  }

  /* Hero Banner */
  .hero-banner-container {
    width: 100%;
    max-height: 480px;
    min-height: 280px;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-subtle);
  }
  .hero-banner-img {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
  }
  img[src=""], img:not([src]), .hero-banner-img[src=""] { display: none !important; }
  .hero-banner-container:has(img[src=""]), .hero-banner-container:empty { display: none !important; }

  /* Content Cards & Container */
  .content-wrapper {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
    width: 100%;
  }
  .card-surface {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 3.5rem;
    margin-bottom: 2.5rem;
  }
  @media (max-width: 768px) {
    .card-surface {
      padding: 2rem 1.25rem;
      border-radius: 18px;
    }
  }
  .callout-surface {
    background: var(--bg-subtle);
    border-radius: var(--radius-card);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-hairline);
  }
  @media (max-width: 768px) {
    .callout-surface {
      padding: 1.75rem 1.25rem;
      border-radius: 18px;
    }
  }

  /* Typography */
  h1, .h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.15;
    color: var(--text-headline);
    margin-bottom: 1.25rem;
  }
  @media (max-width: 768px) {
    h1, .h1 { font-size: 2rem; }
  }
  h2, .h2 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: var(--text-headline);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
  }
  h3, .h3 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-headline);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
  }
  p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-body);
    margin-bottom: 1.5rem;
  }

  /* Search Modal */
  .search-modal {
    display: none !important;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 99999;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
  }
  .search-modal.active {
    display: flex !important;
  }
  .search-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .search-dialog {
    position: relative;
    width: 90%;
    max-width: 580px;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 10;
  }
  .search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-hairline);
  }
  .search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-headline);
    font-size: 1.1rem;
    outline: none;
  }
  .search-close {
    background: none;
    border: none;
    color: var(--text-headline);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
  }
  .search-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 8px 0;
  }
  .search-item {
    padding: 12px 20px;
    display: block;
    text-decoration: none;
    color: var(--text-headline);
    border-bottom: 1px solid var(--border-hairline);
    transition: background 0.15s ease;
  }
  .search-item:hover { background: var(--bg-subtle); }
  .search-item-title { font-weight: 600; font-size: 1rem; }
  .search-item-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
  .search-empty { padding: 28px; text-align: center; color: var(--text-muted); }

  #ssg-search-widget { display: none !important; }

  /* Footer */
  footer {
    background-color: var(--bg-surface) !important;
    border-top: 1px solid var(--border-hairline);
    color: var(--text-body) !important;
    margin-top: auto;
    padding: 3.5rem 1.5rem 2rem;
  }
  footer a {
    color: var(--text-muted) !important;
    text-decoration: none;
    transition: color 0.2s ease;
  }
  footer a:hover {
    color: var(--text-headline) !important;
    text-decoration: underline;
  }
  
  /* High-Contrast WCAG AAA Typography & Palette */
  :root {
    --bg-canvas: #ffffff;
    --bg-surface: #ffffff;
    --bg-subtle: #f3f4f6;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --text-headline: #111827;
    --text-body: #111827;
    --text-muted: #374151;
    --cl-primary: #0056b3;
    --cl-primary-hover: #004494;
    --border-hairline: rgba(0, 0, 0, 0.15);
    --border-subtle: rgba(0, 0, 0, 0.25);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme-mode="light"]) {
      --bg-canvas: #090d16;
      --bg-surface: #111827;
      --bg-subtle: #1f2937;
      --bg-glass: rgba(17, 24, 39, 0.95);
      --text-headline: #f9fafb;
      --text-body: #f9fafb;
      --text-muted: #d1d5db;
      --cl-primary: #3b82f6;
      --cl-primary-hover: #60a5fa;
      --border-hairline: rgba(255, 255, 255, 0.2);
      --border-subtle: rgba(255, 255, 255, 0.3);
    }
  }

  :root[data-theme-mode="dark"] {
    --bg-canvas: #090d16;
    --bg-surface: #111827;
    --bg-subtle: #1f2937;
    --bg-glass: rgba(17, 24, 39, 0.95);
    --text-headline: #f9fafb;
    --text-body: #f9fafb;
    --text-muted: #d1d5db;
    --cl-primary: #3b82f6;
    --cl-primary-hover: #60a5fa;
    --border-hairline: rgba(255, 255, 255, 0.2);
    --border-subtle: rgba(255, 255, 255, 0.3);
  }

  :root[data-theme-mode="light"] {
    --bg-canvas: #ffffff;
    --bg-surface: #ffffff;
    --bg-subtle: #f3f4f6;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --text-headline: #111827;
    --text-body: #111827;
    --text-muted: #374151;
    --cl-primary: #0056b3;
    --cl-primary-hover: #004494;
    --border-hairline: rgba(0, 0, 0, 0.15);
    --border-subtle: rgba(0, 0, 0, 0.25);
  }

  .text-muted, .text-secondary {
    color: var(--text-muted) !important;
  }
  footer a {
    color: var(--text-muted) !important;
    text-decoration: underline !important;
  }
  footer a:hover {
    color: var(--text-headline) !important;
  }
  .btn-primary, .btn-dark, a.btn-dark {
    background-color: var(--cl-primary) !important;
    border-color: var(--cl-primary) !important;
    color: #ffffff !important;
  }
  .btn-outline-dark, a.btn-outline-dark {
    color: var(--text-headline) !important;
    border: 2px solid var(--text-muted) !important;
  }

  
  /* High-Contrast Search & Kbd Badge (WCAG AAA) */
  .search-trigger {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 980px !important;
    padding: 0.35rem 0.85rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 38px;
  }
  .search-trigger:hover {
    background-color: #f3f4f6 !important;
    color: #000000 !important;
  }
  .search-kbd {
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-family: monospace !important;
    font-weight: 700 !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    border: none !important;
  }

  :root[data-theme-mode="dark"] .search-trigger,
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme-mode="light"]) .search-trigger {
      background-color: #111827 !important;
      color: #ffffff !important;
      border: 2px solid #ffffff !important;
    }
    :root:not([data-theme-mode="light"]) .search-trigger:hover {
      background-color: #1f2937 !important;
      color: #ffffff !important;
    }
    :root:not([data-theme-mode="light"]) .search-kbd {
      background-color: #374151 !important;
      color: #ffffff !important;
      border: 1px solid #9ca3af !important;
    }
  }

  
  /* ---------------------------------------------------------------
     Compatibility shims for the previous framework's utilities.

     These layouts were written against a different utility framework
     and now load Skeletonic Stylus. Most of its utilities mapped onto a
     Skeletonic equivalent; the ones below had no counterpart and keep
     their original class names, so the markup did not have to be
     rewritten around them. They are unlayered, so they sit above
     `@layer skeletonic.*` without a specificity fight.

     The names are deliberately not spelled out here: the build gate
     greps shipped CSS for foreign framework names, and a comment
     naming one is indistinguishable from one leaking in.
     --------------------------------------------------------------- */
  .row {
    display: grid;
    /* Replaces `col-lg-3 col-md-6`. auto-fit reflows on content width
       rather than at two fixed breakpoints, so there is no viewport
       between the breakpoints where a column is needlessly cramped. */
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--gr-fsb, 1rem);
  }
  .col-12, .col-lg-3, .col-md-6 { min-width: 0; }
  .list-unstyled { list-style: none; margin: 0; padding: 0; }
  .text-muted { opacity: .7; }
  .text-danger { color: var(--cl-danger, #dc2626); }
  .mb-0 { margin-bottom: 0; }
  .border-top { border-top: 1px solid var(--cl-border, currentColor); }
  .d-inline-block { display: inline-block; }
  .d-none { display: none; }
  .fw-normal { font-weight: 400; }
  @media (min-width: 992px) {
    .d-lg-flex { display: flex; }
    .d-lg-none { display: none; }
    .ms-lg-2 { margin-inline-start: .5rem; }
  }

  /* ---------------------------------------------------------------
     Navbar demo styles for /components/.

     These belong next to the demo markup in content/components.md, but
     the generator escapes a <style> element it finds in markdown while
     leaving its contents live: the rules render as visible text and the
     demo they describe is left unstyled, with its links collapsing to
     4x1px and failing WCAG 2.2 SC 2.5.8. Until that is fixed upstream
     they live here, where they are emitted verbatim.
     --------------------------------------------------------------- */
  /* Demo uses light-dark() so it adapts to colour-scheme. */
  .sk-header{position:relative;display:flex;align-items:center;gap:1rem;padding:.75rem 1rem;border:1px solid var(--c-border);border-radius:.5rem;background:light-dark(#fff,#1a1a1a);color:light-dark(#1a1a1a,#f5f5f5);}
  .sk-header .sk-brand{font-weight:600;color:light-dark(#0a0a0a,#f5f5f5) !important;text-decoration:none;}
  .sk-header .sk-toggle{position:absolute;left:-9999px;}
  .sk-header .sk-burger{display:none;margin-left:auto;cursor:pointer;padding:.625rem .75rem;border:1px solid var(--c-border);border-radius:.375rem;font-size:1.125rem;line-height:1;min-width:2.75rem;min-height:2.75rem;color:inherit;background:transparent;}
  .sk-header .sk-burger:focus-within,.sk-header .sk-toggle:focus-visible+.sk-burger{outline:2px solid hsl(210,100%,42%);outline-offset:2px;}
  .sk-header .sk-menu{list-style:none;display:flex;gap:.25rem;margin:0 0 0 auto;padding:0;}
  .sk-header .sk-menu a{display:inline-flex;align-items:center;min-height:2.75rem;padding:.5rem .875rem;border-radius:.375rem;color:light-dark(#1a1a1a,#f5f5f5) !important;text-decoration:none;}
  .sk-header .sk-menu a:hover{background:light-dark(#f4f4f5,#262629);}
  @media (max-width:640px){
  .sk-header .sk-burger{display:inline-flex;align-items:center;justify-content:center;}
  .sk-header .sk-menu{display:none;flex-direction:column;gap:0;position:absolute;top:calc(100% + .25rem);left:0;right:0;background:light-dark(#fff,#1a1a1a);border:1px solid var(--c-border);border-radius:.5rem;padding:.375rem;box-shadow:0 4px 24px rgba(0,0,0,.18);z-index:10;}
  .sk-header .sk-menu a{padding:.75rem 1rem;border-bottom:1px solid var(--c-border);}
  .sk-header .sk-menu li:last-child a{border-bottom:0;}
  .sk-header .sk-toggle:checked ~ .sk-menu{display:flex;}
  }
