  /* ============================= TOKENS ============================= */
  :root {
    --paper: #f5f6f8;
    --paper-raised: #ffffff;
    --ink: #14171c;
    --ink-soft: #565d68;
    --ink-faint: #8a909b;
    --line: #d8dce2;
    --line-strong: #b7bec9;
    --blue: #2454e0;
    --blue-dim: #e8edfc;
    --blue-ink: #0e2e8c;
    --title-grad-a: #3b7de8;
    --title-grad-b: #1748a8;
    --shadow: 0 1px 2px rgba(20, 23, 28, 0.04), 0 12px 32px -16px rgba(20, 23, 28, 0.14);

    --font-display: -apple-system, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --skyline-img: url("skyline-light.png");
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --paper: #0b1830;
      --paper-raised: #0f2040;
      --ink: #eaf0ff;
      --ink-soft: #9fb3d9;
      --ink-faint: #6c84b3;
      --line: #24406b;
      --line-strong: #35507f;
      --blue: #6ea8ff;
      --blue-dim: #16294a;
      --blue-ink: #cfe0ff;
      --title-grad-a: #bcdcff;
      --title-grad-b: #6fb4fa;
      --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 20px 44px -20px rgba(0, 0, 0, 0.6);
      --skyline-img: url("skyline-dark.png");
    }
  }
  :root[data-theme="dark"] {
    --paper: #0b1830;
    --paper-raised: #0f2040;
    --ink: #eaf0ff;
    --ink-soft: #9fb3d9;
    --ink-faint: #6c84b3;
    --line: #24406b;
    --line-strong: #35507f;
    --blue: #6ea8ff;
    --blue-dim: #16294a;
    --blue-ink: #cfe0ff;
    --title-grad-a: #bcdcff;
    --title-grad-b: #6fb4fa;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 20px 44px -20px rgba(0, 0, 0, 0.6);
    --skyline-img: url("skyline-dark.png");
  }
  :root[data-theme="light"] {
    --paper: #f5f6f8;
    --paper-raised: #ffffff;
    --ink: #14171c;
    --ink-soft: #565d68;
    --ink-faint: #8a909b;
    --line: #d8dce2;
    --line-strong: #b7bec9;
    --blue: #2454e0;
    --blue-dim: #e8edfc;
    --blue-ink: #0e2e8c;
    --title-grad-a: #3b7de8;
    --title-grad-b: #1748a8;
    --shadow: 0 1px 2px rgba(20, 23, 28, 0.04), 0 12px 32px -16px rgba(20, 23, 28, 0.14);
    --skyline-img: url("skyline-light.png");
  }

  /* ============================= RESET / BASE ============================= */
  * { box-sizing: border-box; }
  /* An author `display` rule on an element normally overrides the UA stylesheet's
     [hidden]{display:none} - this guarantees the hidden attribute always wins regardless of
     what any other rule on the page sets, so JS can keep toggling .hidden safely everywhere. */
  [hidden] { display: none !important; }
  html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  h1, h2, h3, h4, p { margin: 0; }
  h1, h2, h3, h4 { text-wrap: balance; font-weight: 800; letter-spacing: -0.02em; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

  /* ============================= THEME TOGGLE ============================= */
  .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 6px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink-soft);
    flex: none;
  }
  .theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
  .theme-toggle svg { display: none; }
  /* Icon shown = currently active theme. No explicit choice yet -> follow the browser's own setting */
  @media (prefers-color-scheme: light) { .theme-toggle .theme-icon-sun { display: block; } }
  @media (prefers-color-scheme: dark) { .theme-toggle .theme-icon-moon { display: block; } }
  /* Explicit choice via the button (persisted in localStorage) always wins over the browser setting */
  :root[data-theme="light"] .theme-toggle .theme-icon-moon { display: none; }
  :root[data-theme="light"] .theme-toggle .theme-icon-sun { display: block; }
  :root[data-theme="dark"] .theme-toggle .theme-icon-sun { display: none; }
  :root[data-theme="dark"] .theme-toggle .theme-icon-moon { display: block; }
  img, svg { display: block; max-width: 100%; }
  ::selection { background: var(--blue); color: var(--paper); }
  :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

  .mono {
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
  }
  .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 5px 10px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--paper) 15%, transparent);
    backdrop-filter: blur(3px);
  }
  .prose { max-width: 62ch; }

  .wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-left: clamp(24px, 6vw, 56px);
    padding-right: clamp(24px, 6vw, 56px);
  }

  /* faint blueprint grid, ambient, not a hero */
  .grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
      linear-gradient(var(--line) 1px, transparent 1px),
      linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.35;
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 640px);
    mask-image: linear-gradient(to bottom, black, transparent 640px);
  }
  @media (prefers-color-scheme: dark) { .grid-bg { opacity: 0.5; } }
  :root[data-theme="dark"] .grid-bg { opacity: 0.5; }
  :root[data-theme="light"] .grid-bg { opacity: 0.35; }

  /* faint city skyline, anchored to the bottom of the viewport, ambient like grid-bg.
     inset:0 (full viewport) so the tall spires never get clipped by an undersized box -
     only the natural viewport edge can crop it, same as grid-bg's own approach. */
  .skyline-bg {
    position: fixed;
    inset: 0;
    background-image: var(--skyline-img);
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: min(1600px, 120vw) auto;
    opacity: 0.16;
    z-index: 0;
    pointer-events: none;
  }
  @media (prefers-color-scheme: dark) { .skyline-bg { opacity: 0.26; } }
  :root[data-theme="dark"] .skyline-bg { opacity: 0.26; }
  :root[data-theme="light"] .skyline-bg { opacity: 0.16; }

  /* ============================= TITLE BLOCK / NAV ============================= */
  .titlebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 56px;
    padding: 0 clamp(16px, 4vw, 40px);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(10px) saturate(1.2);
    border-bottom: 1px solid var(--line);
  }
  .titlebar .mark { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 0.98rem; letter-spacing: -0.01em; }
  .titlebar .mark img { height: 26px; width: auto; display: block; }
  .titlebar .mark .logo-dark { display: none; }
  @media (prefers-color-scheme: dark) {
    .titlebar .mark .logo-light { display: none; }
    .titlebar .mark .logo-dark { display: block; }
  }
  :root[data-theme="dark"] .titlebar .mark .logo-light { display: none; }
  :root[data-theme="dark"] .titlebar .mark .logo-dark { display: block; }
  :root[data-theme="light"] .titlebar .mark .logo-light { display: block; }
  :root[data-theme="light"] .titlebar .mark .logo-dark { display: none; }
  .titlebar nav { display: flex; gap: 26px; margin-left: 8px; }
  .titlebar nav a { font-size: 0.86rem; color: var(--ink-soft); transition: color 0.15s var(--ease); white-space: nowrap; }
  .titlebar nav a:hover { color: var(--ink); }
  .titlebar nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
  .titlebar .spacer { flex: 1; }
  .titlebar > a.btn { display: none; }
  @media (min-width: 640px) { .titlebar > a.btn { display: inline-flex; } }
  .titlebar .rev {
    font-size: 0.68rem;
    color: var(--ink-faint);
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    padding: 3px 7px;
    display: none;
  }
  @media (min-width: 640px) { .titlebar .rev { display: inline-block; } }
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 3px;
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), opacity 0.15s var(--ease);
  }
  .btn-primary { background: var(--blue); color: #fff; }
  .btn-primary:hover { transform: translateY(-1px); opacity: 0.92; }
  .btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
  .btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
  .btn-sm { padding: 7px 12px; font-size: 0.78rem; }

  /* ============================= HERO ============================= */
  .hero {
    position: relative;
    z-index: 1;
    padding: 0 0 clamp(40px, 7vw, 80px);
    text-align: center;
  }
  .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;
  }
  /* Real logo as the page's opening thesis - full-bleed across the viewport, like a mounted
     sign filling the wall it's on, not a small framed icon. Transparent-background PNG, so the
     banner's own ground comes from the page background. Two source files (light/dark art, each
     matted against its own theme's paper color to keep clean edges) are swapped by theme. */
  .hero-logo-full {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: clamp(320px, 78vh, 900px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, var(--paper) 0%, var(--paper) 78%, transparent 100%);
    opacity: 0;
    transition: opacity 1s var(--ease);
  }
  .hero-logo-full.in { opacity: 1; }
  .hero-logo-full img {
    width: min(98vw, 1900px);
    max-height: 96%;
    height: auto;
    object-fit: contain;
    display: block;
  }
  .hero-logo-full .logo-dark { display: none; }
  @media (prefers-color-scheme: dark) {
    .hero-logo-full .logo-light { display: none; }
    .hero-logo-full .logo-dark { display: block; }
  }
  :root[data-theme="dark"] .hero-logo-full .logo-light { display: none; }
  :root[data-theme="dark"] .hero-logo-full .logo-dark { display: block; }
  :root[data-theme="light"] .hero-logo-full .logo-light { display: block; }
  :root[data-theme="light"] .hero-logo-full .logo-dark { display: none; }
  .hero-text { padding-top: clamp(32px, 6vw, 60px); }
  .hero .eyebrow { margin-bottom: 22px; font-size: 0.82rem; }
  .hero .sub {
    font-size: clamp(1.35rem, 3.4vw, 2.1rem);
    font-weight: 500;
    color: var(--ink-soft);
    margin-top: 18px;
    letter-spacing: -0.01em;
  }
  .hero .tagline {
    margin: 26px auto 0;
    max-width: 62ch;
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--ink-soft);
  }
  .hero .cta-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
    flex-wrap: wrap;
  }
  .hero .cta-row .btn { padding: 13px 24px; font-size: 0.92rem; }

  .statbar {
    position: relative;
    z-index: 1;
    margin-top: clamp(48px, 8vw, 84px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper-raised) 15%, transparent);
    backdrop-filter: blur(3px);
  }
  .statbar .wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  @media (max-width: 560px) {
    .statbar .wrap { grid-template-columns: repeat(2, 1fr); }
    .statbar .wrap > .stat:nth-child(3) { border-left: 0; }
    .statbar .wrap > .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  }
  .stat {
    padding: 22px 8px;
    text-align: center;
    border-left: 1px solid var(--line);
  }
  .statbar .wrap > .stat:first-child { border-left: 0; }
  .stat b {
    display: block;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.2rem, 2.6vw, 1.65rem);
    font-weight: 700;
    color: var(--ink);
  }
  .stat span { font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.02em; }

  /* ============================= RIBBON DEMO ============================= */
  .ribbon-demo { position: relative; z-index: 1; padding: clamp(40px, 6vw, 64px) 0 0; }
  .ribbon {
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    background: var(--paper-raised);
    box-shadow: var(--shadow);
    padding: 10px clamp(20px, 5vw, 56px) 14px;
  }
  .ribbon-tabs { display: flex; gap: 4px; }
  .ribbon-tab {
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 6px 6px 0 0;
    background: var(--blue-dim);
    color: var(--blue-ink);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
  }
  .ribbon-panels {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line-strong);
  }
  .ribbon-row {
    display: flex;
    /* one line like the real ribbon, scrolling sideways when the screen is narrower (wrapping
       looked like a table on phones and laptops); "safe" starts an overflowing row at its left
       edge instead of cutting both ends of a centred row (laptops at 1366-1536 px) */
    justify-content: safe center;
    align-items: stretch;
    padding: 10px 0;
    overflow-x: auto;
  }
  /* thin scrollbar in the site's own colours instead of the chunky grey system one */
  .ribbon-row { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  .ribbon-row:hover { scrollbar-color: var(--blue) transparent; }
  .ribbon-row::-webkit-scrollbar { height: 6px; }
  .ribbon-row::-webkit-scrollbar-track { background: transparent; }
  .ribbon-row::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
  .ribbon-row:hover::-webkit-scrollbar-thumb { background: var(--blue); }
  .ribbon-row:not(:last-child) { border-bottom: 1px solid var(--line); }
  .ribbon-panel {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    padding: 0 14px;
  }
  .ribbon-panel:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 92px;
    background: var(--line);
  }
  .ribbon-buttons { display: flex; flex: 1 1 auto; align-items: flex-start; flex-wrap: wrap; gap: 3px 6px; }
  .ribbon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 78px;
    height: 90px;
    padding: 8px 5px 7px;
    border-radius: 6px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--ink);
    text-align: center;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
  }
  .ribbon-btn:hover, .ribbon-btn:focus-visible { background: var(--blue-dim); color: var(--blue-ink); outline: none; }
  .ribbon-btn img { width: 34px; height: 34px; object-fit: contain; }
  .ribbon-btn .lbl { font-size: 0.7rem; line-height: 1.15; }
  .ribbon-panel-title {
    margin-top: auto;
    font-size: 0.68rem;
    color: var(--ink-faint);
    font-family: var(--font-mono);
    padding: 8px 0 0;
    white-space: nowrap;
  }
  .ribbon-split { display: flex; flex-direction: column; align-items: center; width: auto; min-width: 78px; }
  .ribbon-secondary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--paper) 40%, transparent);
  }
  .ribbon-secondary button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.8rem;
    line-height: 1.2;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
  }
  .ribbon-secondary button:hover, .ribbon-secondary button:focus-visible { background: var(--blue-dim); color: var(--blue-ink); outline: none; }
  .ribbon-secondary button img { width: 28px; height: 28px; object-fit: contain; flex: none; }

  .ribbon-stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 4px;
  }
  .ribbon-stack-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 3px;
    border-radius: 6px;
    border: none;
    background: none;
    cursor: pointer;
  }
  .ribbon-stack-btn img { width: 20px; height: 20px; object-fit: contain; flex: none; }
  .ribbon-stack-btn:hover, .ribbon-stack-btn:focus-visible { background: var(--blue-dim); color: var(--blue-ink); outline: none; }

  /* ============================= RIBBON TOOLTIP (Revit-style ScreenTip) ============================= */
  .ribbon-tip {
    position: fixed;
    z-index: 60;
    max-width: 300px;
    background: var(--paper-raised);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 10px 12px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.12s var(--ease), transform 0.12s var(--ease);
  }
  .ribbon-tip.visible { opacity: 1; transform: translateY(0); }
  .ribbon-tip-title { font-size: 0.86rem; font-weight: 700; color: var(--ink); }
  .ribbon-tip-desc { margin-top: 4px; font-size: 0.8rem; line-height: 1.4; color: var(--ink-soft); }

  @keyframes ribbonPulse {
    0%, 100% { box-shadow: none; }
    20%, 60% { box-shadow: 0 0 0 3px var(--blue); }
  }
  .feature-card.ribbon-highlight { animation: ribbonPulse 1.6s var(--ease); border-radius: 8px; }

  /* ============================= POSITIONING ============================= */
  .positioning { position: relative; z-index: 1; padding-top: clamp(72px, 11vw, 140px); padding-bottom: clamp(72px, 11vw, 140px); }
  .positioning .lede {
    font-size: clamp(1.5rem, 3.4vw, 2.3rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.28;
    max-width: 30ch;
    padding-left: 26px;
  }
  .positioning .lede em { color: var(--blue); font-style: normal; }
  .positioning-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 44px;
  }
  .positioning-grid .prose p + p { margin-top: 16px; }
  .positioning-grid .prose {
    color: var(--ink-soft);
    font-size: 1.28rem;
    line-height: 1.6;
    text-align: left;
    max-width: 100%;
    padding: 22px 26px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--paper) 15%, transparent);
    backdrop-filter: blur(3px);
  }

  /* ============================= JUMP NAV ============================= */
  .jumpnav-holder { position: sticky; top: 56px; z-index: 30; padding: 14px 0; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .jumpnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .jumpnav::-webkit-scrollbar { display: none; }
  .jumpnav a {
    flex: none;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-soft);
    border: 1px solid transparent;
    transition: all 0.15s var(--ease);
  }
  .jumpnav a .tag { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-faint); }
  .jumpnav a:hover { border-color: var(--line-strong); color: var(--ink); }
  .jumpnav a.active { background: var(--blue-dim); color: var(--blue-ink); }
  .jumpnav a.active .tag { color: var(--blue); }

  /* ============================= FLAGSHIP ============================= */
  .flagship { position: relative; z-index: 1; padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(24px, 4vw, 40px); scroll-margin-top: 120px; }
  .flagship-card {
    position: relative;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: clamp(28px, 5vw, 56px);
    overflow: hidden;
  }
  .flagship-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--blue);
  }
  .flagship-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; justify-content: space-between; margin-bottom: 24px; }
  .flagship-head .titlecol { display: flex; align-items: center; gap: 16px; }
  .flagship-icon {
    width: 76px; height: 76px;
    display: grid; place-items: center;
    border-radius: 8px;
    color: var(--blue);
    flex: none;
  }
  .flagship-icon svg { width: 28px; height: 28px; }
  .flagship-icon img { width: 64px; height: 64px; object-fit: contain; }
  .flagship h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
  .flagship-body { display: grid; grid-template-columns: 1fr; gap: 28px; }
  .flagship-desc { color: var(--ink-soft); font-size: 1.02rem; }
  .flagship-desc .flags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
  .flagship-note { margin-top: 18px; font-size: 0.78rem; color: var(--ink-faint); }
  .flag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    padding: 4px 8px;
    background: color-mix(in srgb, var(--paper) 15%, transparent);
    backdrop-filter: blur(3px);
  }

  /* ============================= FEATURE GROUPS ============================= */
  .group { position: relative; z-index: 1; padding-top: clamp(48px, 7vw, 84px); padding-bottom: clamp(48px, 7vw, 84px); scroll-margin-top: 120px; transition: padding-top 0.2s var(--ease), padding-bottom 0.2s var(--ease); }
  .group:has(.group-head[aria-expanded="false"]) { padding-top: 20px; padding-bottom: 20px; }
  .group-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    user-select: none;
    transition: margin-bottom 0.2s var(--ease);
  }
  .group-head[aria-expanded="false"] { margin-bottom: 0; }
  .group-head .sheetno {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--blue);
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    padding: 3px 8px;
  }
  .group-head h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); transition: color 0.15s var(--ease); }
  .group-head:hover h2 { color: var(--blue); }
  .group-head .count { margin-left: auto; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }
  .group-head .group-chevron {
    align-self: center;
    flex: none;
    color: var(--ink-faint);
    transition: transform 0.25s var(--ease), color 0.15s var(--ease);
  }
  .group-head:hover .group-chevron { color: var(--blue); }
  .group-head[aria-expanded="true"] .group-chevron { transform: rotate(90deg); }
  .group-head[aria-expanded="false"] + .feature-grid { display: none; }

  .feature-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
  @media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 32px; } }

  .feature-card {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  }
  .feature-card.reveal { opacity: 0; }
  .feature-card.reveal.in { opacity: 1; }
  .feature-card .flag { margin-top: auto; }

  .feature-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
  .feature-icon {
    width: 60px; height: 60px;
    display: grid; place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--ink);
    flex: none;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
  }
  .feature-icon:has(img) {
    border: none;
    background: color-mix(in srgb, var(--paper) 15%, transparent);
    backdrop-filter: blur(6px);
  }
  .feature-icon svg { width: 20px; height: 20px; }
  .feature-icon img { width: 52px; height: 52px; object-fit: contain; }
  .feature-card:hover .feature-icon { border-color: var(--blue); color: var(--blue); }
  .feature-card:hover .feature-icon:has(img) { background: color-mix(in srgb, var(--blue-dim) 70%, transparent); }
  /* "Что умеет ИИ" section — icons removed, text only (per request). Scoped to this grid so the
     standalone-tool cards elsewhere keep their icons. */
  #ai-functions-grid .feature-icon { display: none; }
  .feature-title {
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(180deg, var(--title-grad-a) 0%, var(--title-grad-b) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .feature-desc {
    color: var(--ink-soft);
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0 0 16px;
    max-width: 52ch;
    padding: 10px 14px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--paper) 15%, transparent);
    backdrop-filter: blur(3px);
  }

  .pricing-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    background: color-mix(in srgb, var(--paper) 15%, transparent);
    backdrop-filter: blur(3px);
  }
  .pricing-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 1rem;
  }
  .pricing-table th, .pricing-table td {
    text-align: left;
    padding: 16px 14px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  .pricing-table th {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 600;
  }
  .pricing-table td:last-child, .pricing-table th:last-child { text-align: right; white-space: nowrap; }
  .pricing-table tbody tr:hover { background: color-mix(in srgb, var(--paper) 15%, transparent); }
  .plan-name { font-weight: 700; color: var(--ink); white-space: normal; }
  .plan-note {
    display: block;
    margin-top: 2px;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--ink-faint);
  }

  /* ============================= CHECKOUT ============================= */
  .checkout-banner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px auto 0;
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--blue-dim) 70%, transparent);
    color: var(--blue-ink);
    font-size: 0.94rem;
  }
  .checkout-banner p { margin: 0; }
  .checkout-banner-close {
    margin-left: auto;
    flex: none;
    font-size: 1.3rem;
    line-height: 1;
    color: inherit;
    opacity: 0.7;
  }
  .checkout-banner-close:hover { opacity: 1; }

  .checkout-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: color-mix(in srgb, var(--ink) 45%, transparent);
    backdrop-filter: blur(4px);
  }
  .checkout-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: clamp(24px, 5vw, 36px);
  }
  .checkout-cart {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--blue-dim) 60%, transparent);
  }
  .checkout-cart-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .checkout-cart-name { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
  .checkout-cart-price { font-family: var(--font-mono); font-size: 1rem; color: var(--blue-ink); white-space: nowrap; }
  .checkout-cart-note { margin-top: 8px; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.4; }
  .checkout-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--ink-faint);
  }
  .checkout-close:hover { background: color-mix(in srgb, var(--paper) 15%, transparent); color: var(--ink); }

  /* Download hint - shown the moment a "Скачать" link is clicked (the download itself proceeds
     normally), so the Windows SmartScreen warning is expected before it appears. Reuses the
     checkout overlay/modal/close styles; only the step layout is new. */
  .download-hint-modal { max-width: 640px; }
  .download-hint-modal h3 { margin: 0 0 10px; font-size: 1.3rem; line-height: 1.25; color: var(--ink); }
  .download-hint-lede { margin: 0 0 20px; font-size: 0.92rem; line-height: 1.5; color: var(--ink-soft); }
  .download-hint-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
  .download-hint-step {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: color-mix(in srgb, var(--blue-dim) 45%, transparent);
  }
  .download-hint-step figcaption { margin-bottom: 10px; font-size: 0.88rem; line-height: 1.35; color: var(--ink); }
  .download-hint-step figcaption b { color: var(--blue-ink); }
  .download-hint-step img { display: block; width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); }
  .download-hint-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
  .download-hint-links { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; }
  .download-hint-links a { color: var(--ink-soft); text-decoration: underline; }
  .download-hint-links a:hover { color: var(--ink); }
  @media (max-width: 560px) {
    .download-hint-steps { grid-template-columns: 1fr; }
    .download-hint-foot .btn { width: 100%; }
  }

  .checkout-field { display: block; margin-bottom: 16px; }
  .checkout-field span { display: block; margin-bottom: 6px; font-size: 0.86rem; color: var(--ink-soft); }
  .checkout-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    color: var(--ink);
    font-size: 0.95rem;
    font-family: inherit;
  }
  .checkout-field input:focus { outline: none; border-color: var(--blue); }

  .checkout-payer-toggle { display: flex; gap: 10px; margin-bottom: 16px; }
  .checkout-radio {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 6px;
    border: 1px solid var(--line-strong);
    font-size: 0.86rem;
    cursor: pointer;
    transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
  }
  .checkout-radio:has(input:checked) { border-color: var(--blue); color: var(--blue); }
  .checkout-radio input { accent-color: var(--blue); }

  .checkout-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.82rem;
    color: var(--ink-soft);
    line-height: 1.4;
    cursor: pointer;
  }
  .checkout-consent input { margin-top: 3px; accent-color: var(--blue); flex: none; }
  .checkout-consent a { color: var(--ink); text-decoration: underline; }

  .checkout-error {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 6px;
    background: color-mix(in srgb, #e0433f 12%, transparent);
    border: 1px solid color-mix(in srgb, #e0433f 40%, transparent);
    color: #e0433f;
    font-size: 0.86rem;
  }
  .checkout-modal .cta-row { margin: 0; }
  .checkout-modal .btn-primary:disabled { opacity: 0.6; cursor: default; transform: none; }

  footer.site {
    position: relative; z-index: 1;
    border-top: 1px solid var(--line);
    padding-top: 44px;
    padding-bottom: 30px;
  }
  .footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; }
  .footer-mark { display: flex; align-items: center; gap: 10px; font-weight: 800; }
  .footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
  .footer-links a { font-size: 0.85rem; color: var(--ink-soft); }
  .footer-links a:hover { color: var(--blue); }
  .footer-note {
    display: inline-block;
    margin-top: 22px;
    padding: 6px 10px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--paper) 15%, transparent);
    backdrop-filter: blur(3px);
    font-size: 0.76rem;
    color: var(--ink-faint);
    font-family: var(--font-mono);
  }

  .final-cta { position: relative; z-index: 1; padding-top: clamp(60px, 9vw, 110px); padding-bottom: clamp(60px, 9vw, 110px); text-align: center; }
  .final-cta h2 { font-size: clamp(1.9rem, 5vw, 3.1rem); max-width: 20ch; margin: 0 auto; }
  .final-cta .cta-row { display: flex; justify-content: center; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

  @media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  }

  html { scroll-behavior: smooth; }

  /* ============================= LEGAL DOCUMENTS ============================= */
  /* Long-form readable text (oferta/privacy/consent/cookies) - a plain narrow column instead of
     the marketing feature-grid layout everything else on the site uses. */
  .legal { position: relative; z-index: 1; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(64px, 8vw, 96px); }
  .legal-doc { max-width: 760px; margin: 0 auto; }
  .legal-doc h1 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 6px; }
  .legal-meta { color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.8rem; margin-bottom: 36px; }
  .legal-doc h2 {
    font-size: 1.15rem;
    margin: 40px 0 14px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }
  .legal-doc h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }
  .legal-doc h3 { font-size: 1rem; font-weight: 700; margin: 22px 0 8px; }
  .legal-doc p { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.65; margin: 0 0 14px; }
  .legal-doc p:last-child { margin-bottom: 0; }
  .legal-doc ul, .legal-doc ol { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.65; margin: 0 0 14px; padding-left: 1.4em; }
  .legal-doc li { margin-bottom: 6px; }
  .legal-doc strong { color: var(--ink); font-weight: 700; }
  .legal-doc a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
  .legal-requisites {
    margin-top: 16px;
    padding: 18px 22px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 15%, transparent);
    font-size: 0.92rem;
    line-height: 1.7;
  }
  .legal-requisites .k { color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 8px; }
  .legal-placeholder { color: var(--blue); background: var(--blue-dim); padding: 1px 5px; border-radius: 3px; font-family: var(--font-mono); font-size: 0.9em; }
  .install-help-shot { max-width: 100%; height: auto; display: block; margin: 14px 0 28px; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

  /* install-help.html: same layout as other legal-style pages, but typography/color pulled from the main page (group-head/body) instead of the muted legal-doc look */
  .install-doc h1 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); font-weight: 700; letter-spacing: -0.015em; }
  .install-doc h2 { color: var(--ink); font-weight: 700; }
  .install-doc h3 { color: var(--ink); font-size: 1.15rem; font-weight: 700; }
  .install-doc p, .install-doc li { color: var(--ink); }