/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

      :root {
        color-scheme: light;

        --page-max: 1320px;
        --content-max: 1180px;
        --reading-max: 980px;

        --bg: #ffffff;
        --bg-soft: #f6f7f9;
        --bg-subtle: #fafbfc;
        --surface: #ffffff;
        --surface-raised: #ffffff;

        --ink: #0e1116;
        --ink-soft: #252c36;
        --muted: #657080;
        --muted-light: #9aa3b0;

        --line: #e4e7eb;
        --line-strong: #d6dbe2;

        --accent: #1c5cff;
        --accent-soft: #e9efff;
        --accent-border: #c3d2ff;

        --ok: #047857;
        --ok-soft: #ecfdf5;
        --ok-border: #b6e7d2;

        --warn: #b45309;
        --warn-soft: #fef6e7;
        --warn-border: #f0d9a8;

        --danger: #b32020;
        --danger-soft: #feecec;

        --dark: #0d1117;
        --dark-soft: #111820;
        --dark-line: #232a33;
        --dark-ink: #c9d3df;
        --dark-muted: #7d8998;

        --shadow-sm: 0 1px 2px rgba(14, 17, 22, 0.06);

        --shadow-md: 0 12px 32px -22px rgba(14, 17, 22, 0.22);

        --shadow-lg: 0 28px 70px -42px rgba(14, 17, 22, 0.36);

        --radius-sm: 7px;
        --radius-md: 10px;
        --radius-lg: 14px;
        --radius-xl: 18px;

        --mono:
          ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

        --font:
          Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
          "Segoe UI", sans-serif;

        --nav-bg: rgba(255, 255, 255, 0.88);
      }

      html[data-theme="dark"] {
        color-scheme: dark;

        --bg: #0b0f14;
        --bg-soft: #111720;
        --bg-subtle: #0e141b;
        --surface: #121821;
        --surface-raised: #171e28;

        --ink: #edf2f7;
        --ink-soft: #d9e1eb;
        --muted: #98a4b4;
        --muted-light: #6f7b8b;

        --line: #252e39;
        --line-strong: #34404e;

        --accent: #6d96ff;
        --accent-soft: rgba(74, 119, 255, 0.14);
        --accent-border: rgba(109, 150, 255, 0.35);

        --ok: #5dd6a0;
        --ok-soft: rgba(34, 197, 94, 0.1);
        --ok-border: rgba(93, 214, 160, 0.28);

        --warn: #e7a84b;
        --warn-soft: rgba(217, 144, 31, 0.11);
        --warn-border: rgba(231, 168, 75, 0.3);

        --danger: #f08080;
        --danger-soft: rgba(240, 128, 128, 0.12);

        --dark: #080c11;
        --dark-soft: #0d131a;
        --dark-line: #252e39;
        --dark-ink: #d9e1eb;
        --dark-muted: #7d8998;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);

        --shadow-md: 0 12px 32px -22px rgba(0, 0, 0, 0.45);

        --shadow-lg: 0 28px 70px -42px rgba(0, 0, 0, 0.65);

        --nav-bg: rgba(11, 15, 20, 0.86);
      }

      /* ==========================================================================
   RESET
   ========================================================================== */

      * {
        box-sizing: border-box;
      }

      html {
        scroll-behavior: smooth;
      }

      body {
        margin: 0;
        background: var(--bg);
        color: var(--ink);

        font-family: var(--font);
        font-size: 16px;
        line-height: 1.6;

        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;

        transition:
          background 0.2s ease,
          color 0.2s ease;
      }

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

      button,
      input {
        font: inherit;
      }

      button {
        color: inherit;
      }

      code,
      kbd,
      pre {
        font-family: var(--mono);
      }

      ::selection {
        background: var(--accent-soft);
      }

      /* ==========================================================================
   LAYOUT SYSTEM
   ========================================================================== */

      .page-shell {
        width: 100%;
      }

      .container {
        width: min(calc(100% - 48px), var(--content-max));
        margin-inline: auto;
      }

      .section {
        width: 100%;
        border-top: 1px solid var(--line);
      }

      .section-shell {
        width: min(calc(100% - 48px), var(--content-max));

        margin-inline: auto;
        padding-block: 88px;
      }

      .section-shell-wide {
        width: min(calc(100% - 48px), var(--page-max));

        margin-inline: auto;
      }

      .reading-shell {
        width: min(100%, var(--reading-max));

        margin-inline: auto;
      }

      /* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

      h1,
      h2,
      h3,
      h4,
      h5,
      h6,
      p {
        margin-top: 0;
      }

      h1,
      h2,
      h3 {
        letter-spacing: -0.025em;
      }

      .section-kicker {
        margin: 0 0 12px;

        font-size: 12px;
        font-weight: 650;
        letter-spacing: 0.1em;
        text-transform: uppercase;

        color: var(--accent);
      }

      .section-title {
        margin: 0;

        max-width: 24ch;

        font-size: clamp(28px, 3vw, 38px);
        line-height: 1.15;
      }

      .section-deck {
        margin: 16px 0 0;

        max-width: 60ch;

        font-size: 17px;
        line-height: 1.65;

        color: var(--muted);
      }

      /* ==========================================================================
   NAVIGATION
   ========================================================================== */

      .nav {
        position: sticky;
        top: 0;
        z-index: 100;

        height: 64px;

        border-bottom: 1px solid var(--line);

        background: var(--nav-bg);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
      }

      .nav-inner {
        width: min(calc(100% - 48px), var(--content-max));

        height: 100%;

        margin-inline: auto;

        display: flex;
        align-items: center;
        gap: 28px;
      }

      .brand {
        display: inline-flex;
        align-items: center;
        gap: 9px;

        font-size: 17px;
        font-weight: 700;
        letter-spacing: -0.035em;

        flex-shrink: 0;
      }

      .brand-mark {
        width: 25px;
        height: 25px;

        flex: none;
      }

      .nav-links {
        display: flex;
        align-items: center;
        gap: 22px;

        margin-left: 4px;

        font-size: 13.5px;
        color: var(--muted);
      }

      .nav-links a {
        transition: color 0.15s ease;
        text-decoration: none;
      }

      .nav-links a:hover {
        color: var(--ink);
        text-decoration: none;
      }

      .nav-actions {
        margin-left: auto;

        display: flex;
        align-items: center;
        gap: 10px;
      }

      .theme-toggle {
        width: 36px;
        height: 36px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        padding: 0;

        border: 1px solid var(--line);
        border-radius: 9px;

        background: var(--surface);

        cursor: pointer;

        transition:
          background 0.15s ease,
          border-color 0.15s ease,
          transform 0.15s ease;
      }

      .theme-toggle:hover {
        border-color: var(--line-strong);
        transform: translateY(-1px);
      }

      .theme-icon {
        width: 17px;
        height: 17px;
      }

      .icon-moon {
        display: block;
      }

      .icon-sun {
        display: none;
      }

      html[data-theme="dark"] .icon-moon {
        display: none;
      }

      html[data-theme="dark"] .icon-sun {
        display: block;
      }

      /* ==========================================================================
   BUTTONS
   ========================================================================== */

      .btn {
        min-height: 40px;

        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;

        padding: 10px 17px;

        border: 1px solid transparent;
        border-radius: 9px;

        font-size: 14px;
        font-weight: 600;

        cursor: pointer;

        transition:
          background 0.15s ease,
          border-color 0.15s ease,
          color 0.15s ease,
          transform 0.15s ease,
          box-shadow 0.15s ease;
      }

      .btn:hover {
        transform: translateY(-1px);
      }

      .btn-primary {
        background: var(--ink);
        color: var(--bg);
      }

      .btn-primary:hover {
        box-shadow: var(--shadow-md);
      }

      .btn-secondary {
        background: var(--surface);
        color: var(--ink);

        border-color: var(--line);
      }

      .btn-secondary:hover {
        border-color: var(--line-strong);
      }

      .btn-sm {
        min-height: 34px;
        padding: 7px 12px;

        font-size: 13px;
      }

      /* ==========================================================================
   HERO
   ========================================================================== */

      .hero {
        width: min(calc(100% - 48px), var(--content-max));

        margin-inline: auto;

        text-align: center;

        padding: 36px 0 36px;
      }

      .eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 8px;

        margin: 0 0 28px;
        padding: 5px 13px;

        border: 1px solid var(--line);
        border-radius: 999px;

        background: var(--surface);

        font-size: 13px;
        color: var(--muted);
      }

      .status-dot {
        width: 6px;
        height: 6px;

        border-radius: 50%;

        background: var(--ok);
      }

      .hero h1 {
        max-width: 20ch;

        margin-inline: auto;

        font-size: clamp(36px, 5vw, 60px);
        line-height: 1.05;
      }

      .hero h1 code {
        display: inline-block;

        padding: 2px 9px;

        border: 1px solid var(--line);
        border-radius: 8px;

        background: var(--bg-soft);

        font-size: 0.78em;
        font-weight: inherit;

        color: var(--ink);
      }

      .hero-sub {
        max-width: 62ch;

        margin: 24px auto 0;

        font-size: 17.5px;
        line-height: 1.65;

        color: var(--muted);
      }

      .hero-actions {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;

        margin: 32px 0 16px;
      }

      .hero-micro {
        margin: 0;

        font-size: 13px;
        color: var(--muted);
      }

      .hero-strip {
        margin: 22px 0 0;

        font-family: var(--mono);
        font-size: 12.5px;

        color: var(--muted);
      }

      /* ==========================================================================
   SPEC INPUT
   ========================================================================== */

      .loader-section {
        width: min(calc(100% - 48px), 760px);

        margin-inline: auto;

        padding: 8px 0 46px;
      }

      .spec-input {
        display: flex;
        align-items: center;
        gap: 8px;

        padding: 7px;

        border: 1px solid var(--line);
        border-radius: 13px;

        background: var(--surface);

        box-shadow: var(--shadow-sm);
      }

      .spec-input:focus-within {
        border-color: var(--accent-border);

        box-shadow: 0 0 0 4px var(--accent-soft);
      }

      .spec-input input {
        min-width: 0;
        flex: 1;

        padding: 0 12px;

        border: 0;
        outline: 0;

        background: transparent;
        color: var(--ink);

        font-family: var(--mono);
        font-size: 13.5px;
      }

      .spec-input input::placeholder {
        color: var(--muted-light);
      }

      .examples {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;

        margin: 14px 0 0;
        padding: 0;

        list-style: none;

        font-size: 13px;
      }

      .examples-label {
        color: var(--muted);
      }

      .chip {
        padding: 5px 12px;

        border: 1px solid var(--line);
        border-radius: 999px;

        background: var(--surface);

        color: var(--muted);

        cursor: pointer;

        transition:
          border-color 0.15s ease,
          color 0.15s ease,
          background 0.15s ease;
      }

      .chip:hover {
        color: var(--ink);
        border-color: var(--line-strong);
      }

      .chip-warning {
        color: var(--warn);
        border-color: var(--warn-border);
        background: var(--warn-soft);
      }

      /* ==========================================================================
   PRODUCT DEMO
   ========================================================================== */

      .demo-section {
        padding: 34px 0 72px;

        border-top: 1px solid var(--line);

        background: var(--bg-soft);
      }

      .demo-shell {
        width: min(calc(100% - 48px), var(--content-max));

        margin-inline: auto;
      }

      .demo-tabs-wrap {
        display: flex;
        justify-content: center;

        margin-bottom: 20px;
      }

      .demo-tabs {
        display: inline-flex;

        max-width: 100%;
        overflow-x: auto;

        padding: 3px;

        border: 1px solid var(--line);
        border-radius: 11px;

        background: var(--bg);

        scrollbar-width: none;
      }

      .demo-tabs::-webkit-scrollbar {
        display: none;
      }

      .demo-tab {
        white-space: nowrap;

        padding: 8px 16px;

        border: 0;
        border-radius: 8px;

        background: transparent;

        color: var(--muted);

        font-size: 13.5px;
        font-weight: 550;

        cursor: pointer;
      }

      .demo-tab[aria-selected="true"] {
        background: var(--surface-raised);
        color: var(--ink);

        box-shadow: var(--shadow-sm);
      }

      /* ==========================================================================
   APP FRAME
   ========================================================================== */

      .stage {
        display: none;

        min-height: min(74vh, 690px);

        overflow: hidden;

        border: 1px solid var(--line);
        border-radius: var(--radius-lg);

        background: var(--surface);

        box-shadow: var(--shadow-lg);
      }

      .stage.on {
        display: block;
      }

      .chrome {
        height: 42px;

        display: flex;
        align-items: center;
        gap: 10px;

        padding: 0 14px;

        border-bottom: 1px solid var(--line);

        background: var(--bg-subtle);

        color: var(--muted);

        font-size: 12px;
      }

      .chrome-lights {
        display: flex;
        gap: 6px;
      }

      .chrome-lights span {
        width: 9px;
        height: 9px;

        border-radius: 50%;

        background: var(--line-strong);
      }

      .chrome-path {
        font-family: var(--mono);
      }

      .chrome-spacer {
        margin-left: auto;
      }

      .pill {
        display: inline-flex;
        align-items: center;

        white-space: nowrap;

        padding: 3px 9px;

        border: 1px solid var(--line);
        border-radius: 999px;

        background: var(--surface);

        font-size: 11px;
        color: var(--muted);
      }

      .pill-ok {
        color: var(--ok);
        border-color: var(--ok-border);
        background: var(--ok-soft);
      }

      .pill-warn {
        color: var(--warn);
        border-color: var(--warn-border);
        background: var(--warn-soft);
      }

      /* ==========================================================================
   SPEC EDITOR DEMO
   ========================================================================== */

      .editor-demo {
        display: grid;
        grid-template-columns: 250px minmax(0, 1fr);

        min-height: 640px;
      }

      .outline {
        overflow: auto;

        padding: 12px 0;

        border-right: 1px solid var(--line);

        background: var(--bg-subtle);

        font-size: 12.5px;
      }

      .panel-label {
        padding: 0 14px 8px;

        font-size: 10.5px;
        font-weight: 650;
        letter-spacing: 0.08em;
        text-transform: uppercase;

        color: var(--muted-light);
      }

      .tree-row {
        display: flex;
        align-items: center;
        gap: 6px;

        padding: 4px 14px;

        color: var(--ink);

        font-family: var(--mono);
        font-size: 12px;
      }

      .tree-row:hover {
        background: var(--bg-soft);
      }

      .tree-row.active {
        color: var(--accent);
        background: var(--accent-soft);
      }

      .indent-1 {
        padding-left: 14px;
      }
      .indent-2 {
        padding-left: 30px;
      }
      .indent-3 {
        padding-left: 46px;
      }
      .indent-4 {
        padding-left: 62px;
      }

      .twisty {
        width: 10px;
        color: var(--muted-light);
        font-size: 9px;
      }

      .method-tag {
        padding: 1px 5px;

        border-radius: 4px;

        font-size: 10px;
        font-weight: 750;
      }

      .get {
        color: #1550c0;
        background: #e8f1ff;
      }

      .post {
        color: #116b3f;
        background: #e9f8ef;
      }

      .put {
        color: #8a5a10;
        background: #fdf3e3;
      }

      .delete {
        color: #b32020;
        background: #feecec;
      }

      html[data-theme="dark"] .get {
        color: #8eb5ff;
        background: rgba(74, 119, 255, 0.16);
      }

      html[data-theme="dark"] .post {
        color: #78d8a0;
        background: rgba(34, 197, 94, 0.13);
      }

      html[data-theme="dark"] .put {
        color: #e7b96e;
        background: rgba(217, 144, 31, 0.14);
      }

      html[data-theme="dark"] .delete {
        color: #ff9b9b;
        background: rgba(240, 128, 128, 0.13);
      }

      .flag {
        margin-left: auto;
        color: var(--warn);
      }

      .editor-main {
        min-width: 0;

        display: flex;
        flex-direction: column;
      }

      .code-area {
        flex: 1;

        overflow: auto;

        padding: 14px 0;

        font-family: var(--mono);
        font-size: 12.5px;
        line-height: 1.75;
      }

      .code-line {
        display: flex;

        white-space: pre;
      }

      .code-number {
        width: 54px;
        flex: none;

        padding-right: 13px;

        text-align: right;

        color: var(--muted-light);

        user-select: none;
      }

      .code-number.error {
        color: var(--warn);
        font-weight: 700;
      }

      .code-content {
        padding-right: 20px;
      }

      .code-line.highlight {
        background: var(--accent-soft);
      }

      .syntax-key {
        color: #8250df;
      }
      .syntax-string {
        color: #0a6640;
      }
      .syntax-number {
        color: #b3560d;
      }
      .syntax-comment {
        color: #98a1ad;
      }

      html[data-theme="dark"] .syntax-key {
        color: #c4b5fd;
      }
      html[data-theme="dark"] .syntax-string {
        color: #86efac;
      }
      html[data-theme="dark"] .syntax-number {
        color: #fbbf24;
      }
      html[data-theme="dark"] .syntax-comment {
        color: #6f7b8b;
      }

      .squiggle {
        text-decoration: underline wavy var(--warn);
        text-decoration-skip-ink: none;
      }

      .problems {
        max-height: 180px;

        overflow: auto;

        border-top: 1px solid var(--line);

        background: var(--bg-subtle);
      }

      .problems-head {
        display: flex;
        align-items: center;
        gap: 14px;

        padding: 8px 14px;

        border-bottom: 1px solid var(--line);

        color: var(--muted);

        font-size: 12px;
      }

      .problems-head strong {
        color: var(--ink);
      }

      .problem-row {
        display: flex;
        align-items: flex-start;
        gap: 10px;

        padding: 8px 14px;

        border-bottom: 1px solid var(--line);

        font-size: 12px;
      }

      .problem-location {
        flex: none;

        color: var(--accent);

        font-family: var(--mono);
      }

      .problem-message {
        color: var(--ink-soft);
      }

      .problem-rule {
        margin-left: auto;

        color: var(--muted-light);

        font-family: var(--mono);
        font-size: 10.5px;
      }

      .status-bar {
        height: 30px;

        display: flex;
        align-items: center;
        gap: 16px;

        padding: 0 14px;

        border-top: 1px solid var(--line);

        color: var(--muted);

        font-family: var(--mono);
        font-size: 10.5px;
      }

      /* ==========================================================================
   DEBUG DEMO
   ========================================================================== */

      .debug-demo {
        display: grid;
        grid-template-columns: 232px minmax(0, 1fr);

        min-height: 640px;
      }

      .collection {
        overflow: auto;

        padding: 12px 0;

        border-right: 1px solid var(--line);

        background: var(--bg-subtle);
      }

      .collection-row {
        display: flex;
        align-items: center;
        gap: 7px;

        padding: 4px 14px;

        font-family: var(--mono);
        font-size: 12px;
      }

      .collection-row.active {
        color: var(--accent);
        background: var(--accent-soft);
      }

      .request-pane {
        min-width: 0;

        display: flex;
        flex-direction: column;
      }

      .url-bar {
        display: flex;
        align-items: center;
        gap: 8px;

        padding: 12px 14px;

        border-bottom: 1px solid var(--line);
      }

      .http-method {
        padding: 8px 10px;

        border: 1px solid var(--line);
        border-radius: 8px;

        background: var(--bg-soft);

        color: var(--ok);

        font-family: var(--mono);
        font-size: 12px;
        font-weight: 750;
      }

      .request-url {
        min-width: 0;
        flex: 1;

        overflow: hidden;

        padding: 8px 11px;

        border: 1px solid var(--line);
        border-radius: 8px;

        text-overflow: ellipsis;
        white-space: nowrap;

        font-family: var(--mono);
        font-size: 12px;
      }

      .request-var {
        color: var(--accent);
      }

      .environment {
        padding: 8px 10px;

        border: 1px solid var(--line);
        border-radius: 8px;

        color: var(--muted);

        font-size: 12px;
      }

      .subtabs {
        display: flex;
        gap: 2px;

        overflow-x: auto;

        padding: 0 14px;

        border-bottom: 1px solid var(--line);

        scrollbar-width: none;
      }

      .subtabs::-webkit-scrollbar {
        display: none;
      }

      .subtab {
        flex: none;

        padding: 9px 12px;

        border-bottom: 2px solid transparent;

        color: var(--muted);

        font-size: 12.5px;
      }

      .subtab.active {
        color: var(--ink);

        border-bottom-color: var(--ink);

        font-weight: 600;
      }

      .badge {
        display: inline-block;

        margin-left: 5px;
        padding: 1px 5px;

        border-radius: 999px;

        background: var(--bg-soft);

        color: var(--muted);

        font-size: 10px;
      }

      .request-body {
        padding: 13px 14px;

        border-bottom: 1px solid var(--line);

        background: var(--bg-subtle);

        font-family: var(--mono);
        font-size: 12px;
        line-height: 1.8;

        color: var(--muted);
      }

      .response-meta {
        display: flex;
        align-items: center;
        gap: 9px;

        padding: 9px 14px;

        border-bottom: 1px solid var(--line);
      }

      .response-body {
        flex: 1;

        overflow: auto;

        padding: 14px;

        font-family: var(--mono);
        font-size: 12px;
        line-height: 1.8;
      }

      .contract-warning {
        margin: 0 14px 14px;

        padding: 12px 14px;

        border: 1px solid var(--warn-border);
        border-radius: 10px;

        background: var(--warn-soft);

        color: var(--ink-soft);

        font-size: 12px;
      }

      .contract-warning strong {
        display: block;

        margin-bottom: 4px;

        color: var(--warn);
      }

      /* ==========================================================================
   MCP DEMO
   ========================================================================== */

      .mcp-demo {
        min-height: 640px;

        padding: 20px;

        background: var(--bg-subtle);
      }

      .mcp-header {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;

        margin-bottom: 6px;
      }

      .mcp-header h4 {
        margin: 0;

        font-size: 14px;
      }

      .mcp-description {
        margin: 0 0 18px;

        color: var(--muted);

        font-family: var(--mono);
        font-size: 12px;
      }

      .tools-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
        gap: 12px;
      }

      .tool-card {
        padding: 14px;

        border: 1px solid var(--line);
        border-radius: 11px;

        background: var(--surface);
      }

      .tool-derivation {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;

        margin-bottom: 10px;

        color: var(--muted-light);

        font-family: var(--mono);
        font-size: 10.5px;
      }

      .tool-derivation strong {
        color: var(--ink);
      }

      .tool-card h5 {
        margin: 0 0 5px;

        font-family: var(--mono);
        font-size: 13px;
      }

      .tool-card p {
        margin: 0 0 10px;

        color: var(--muted);

        font-size: 12px;
      }

      .arguments {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
      }

      .argument {
        padding: 2px 7px;

        border: 1px solid var(--line);
        border-radius: 5px;

        background: var(--bg-soft);

        color: var(--ink-soft);

        font-family: var(--mono);
        font-size: 10.5px;
      }

      .tool-footer {
        display: flex;
        align-items: center;
        gap: 8px;

        margin-top: 10px;
        padding-top: 9px;

        border-top: 1px solid var(--line);

        color: var(--muted-light);

        font-size: 10.5px;
      }

      .mcp-log {
        margin-top: 14px;
        padding: 14px 16px;

        overflow: auto;

        border-radius: 11px;

        background: var(--dark);

        color: var(--dark-ink);

        font-family: var(--mono);
        font-size: 11.5px;
        line-height: 1.9;
      }

      .log-time {
        color: var(--dark-muted);
      }
      .log-ok {
        color: #4ade80;
      }
      .log-warn {
        color: #fbbf24;
      }

      /* ==========================================================================
   DOCS DEMO
   ========================================================================== */

      .docs-demo {
        display: grid;
        grid-template-columns: 210px minmax(0, 1fr) 400px;

        min-height: 640px;
      }

      .docs-nav {
        overflow: auto;

        padding: 16px 0;

        border-right: 1px solid var(--line);

        background: var(--bg-subtle);
      }

      .docs-group {
        padding: 14px 16px 6px;

        color: var(--muted-light);

        font-size: 10px;
        font-weight: 650;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .docs-nav a {
        display: block;

        padding: 5px 16px;

        color: var(--muted);

        font-size: 12.5px;
      }

      .docs-nav a.active {
        color: var(--accent);

        box-shadow: inset 2px 0 0 var(--accent);

        font-weight: 600;
      }

      .docs-main {
        min-width: 0;

        overflow: auto;

        padding: 28px 30px;
      }

      .docs-main h3 {
        margin-bottom: 4px;

        font-size: 24px;
      }

      .endpoint-path {
        margin: 0 0 18px;

        color: var(--muted);

        font-family: var(--mono);
        font-size: 12px;
      }

      .docs-lede {
        margin-bottom: 22px;

        color: var(--ink-soft);

        font-size: 14px;
      }

      .docs-heading {
        margin: 24px 0 8px;

        color: var(--muted-light);

        font-size: 10.5px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .parameter-list {
        border-top: 1px solid var(--line);
      }

      .parameter {
        padding: 12px 0;

        border-bottom: 1px solid var(--line);
      }

      .parameter-name {
        font-family: var(--mono);
        font-size: 12px;
      }

      .parameter-type {
        margin-left: 5px;

        color: var(--muted-light);

        font-family: var(--mono);
        font-size: 11px;
      }

      .required {
        margin-left: 5px;

        color: var(--warn);

        font-size: 10px;
        font-weight: 700;
      }

      .parameter-description {
        margin-top: 3px;

        color: var(--muted);

        font-size: 12px;
      }

      .code-panel {
        overflow: auto;

        padding: 16px;

        border-left: 1px solid var(--dark-line);

        background: var(--dark);
        color: var(--dark-ink);
      }

      .languages {
        display: inline-flex;
        gap: 2px;

        padding: 3px;

        border: 1px solid var(--dark-line);
        border-radius: 8px;

        background: var(--dark-soft);
      }

      .language {
        padding: 4px 9px;

        border-radius: 5px;

        color: var(--dark-muted);

        font-family: var(--mono);
        font-size: 10.5px;
      }

      .language.active {
        background: var(--dark-line);
        color: var(--dark-ink);
      }

      .code-panel-title {
        margin: 16px 0 7px;

        color: var(--dark-muted);

        font-size: 10px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .code-box {
        padding: 12px;

        border: 1px solid var(--dark-line);
        border-radius: 9px;

        background: var(--dark-soft);
      }

      .code-box pre {
        margin: 0;

        white-space: pre-wrap;
        word-break: break-word;

        font-size: 11px;
        line-height: 1.8;
      }

      .cmd {
        color: #e6edf5;
      }
      .flag-code {
        color: #7dd3fc;
      }
      .string-code {
        color: #86efac;
      }
      .key-code {
        color: #c4b5fd;
      }
      .number-code {
        color: #fbbf24;
      }

      /* ==========================================================================
   FEATURE SECTIONS
   ========================================================================== */

      .feature-section {
        border-top: 1px solid var(--line);
      }

      .feature-section:nth-of-type(even) {
        background: var(--bg-soft);
      }

      .feature-layout {
        display: grid;
        grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
        gap: 72px;

        align-items: center;
      }

      .feature-layout.reverse {
        grid-template-columns: minmax(520px, 1.1fr) minmax(0, 0.9fr);
      }

      .feature-copy {
        min-width: 0;
        height: 100%;
      }

      .feature-list {
        display: grid;
        gap: 16px;

        margin: 28px 0 0;
        padding: 0;

        list-style: none;
      }

      .feature-list li {
        position: relative;

        padding-left: 22px;

        color: var(--ink-soft);

        font-size: 14.5px;
      }

      .feature-list li::before {
        content: "";

        position: absolute;
        top: 8px;
        left: 0;

        width: 8px;
        height: 8px;

        border-radius: 2px;

        background: var(--accent);
      }

      .feature-list strong {
        color: var(--ink);
      }

      /* ==========================================================================
   FEATURE PREVIEW SYSTEM
   ========================================================================== */

      .feature-preview {
        overflow: hidden;

        border: 1px solid var(--line);
        border-radius: 15px;

        background: var(--surface);

        box-shadow: var(--shadow-lg);
      }

      .preview-topbar {
        height: 40px;

        display: flex;
        align-items: center;
        gap: 9px;

        padding: 0 13px;

        border-bottom: 1px solid var(--line);

        background: var(--bg-subtle);

        color: var(--muted);

        font-size: 11px;
      }

      .preview-lights {
        display: flex;
        gap: 5px;
      }

      .preview-lights span {
        width: 8px;
        height: 8px;

        border-radius: 50%;

        background: var(--line-strong);
      }

      .preview-title {
        font-family: var(--mono);
      }

      .preview-body {
        min-height: 390px;
      }

      /* ==========================================================================
   MINI SPEC EDITOR PREVIEW
   ========================================================================== */

      .mini-editor {
        display: grid;
        grid-template-columns: 160px minmax(0, 1fr);

        min-height: 390px;
      }

      .mini-tree {
        padding: 12px 0;

        border-right: 1px solid var(--line);

        background: var(--bg-subtle);

        font-family: var(--mono);
        font-size: 10px;
      }

      .mini-tree-row {
        padding: 4px 11px;

        color: var(--muted);
      }

      .mini-tree-row.active {
        color: var(--accent);

        background: var(--accent-soft);
      }

      .mini-code {
        min-width: 0;

        display: flex;
        flex-direction: column;
      }

      .mini-code-content {
        flex: 1;

        padding: 14px 0;

        font-family: var(--mono);
        font-size: 10.5px;
        line-height: 1.8;
      }

      .mini-line {
        display: flex;
      }

      .mini-ln {
        width: 38px;
        flex: none;

        padding-right: 9px;

        text-align: right;

        color: var(--muted-light);
      }

      .mini-problems {
        border-top: 1px solid var(--line);

        background: var(--bg-subtle);
      }

      .mini-problem-head {
        padding: 7px 12px;

        border-bottom: 1px solid var(--line);

        font-size: 10px;
        font-weight: 650;
      }

      .mini-problem {
        display: flex;
        gap: 8px;

        padding: 8px 12px;

        color: var(--muted);

        font-size: 10px;
      }

      .mini-problem b {
        color: var(--warn);
      }

      /* ==========================================================================
   MINI DEBUG PREVIEW
   ========================================================================== */

      .mini-debug {
        display: grid;
        grid-template-columns: 130px minmax(0, 1fr);

        min-height: 390px !important;
      }

      .mini-collection {
        padding: 12px 0;

        border-right: 1px solid var(--line);

        background: var(--bg-subtle);

        font-family: var(--mono);
        font-size: 10px;
      }

      .mini-request {
        min-width: 0;
      }

      .mini-url {
        display: flex;
        align-items: center;
        gap: 7px;

        padding: 11px;

        border-bottom: 1px solid var(--line);
      }

      .mini-method {
        padding: 5px 6px;

        border-radius: 5px;

        background: var(--ok-soft);

        color: var(--ok);

        font-family: var(--mono);
        font-size: 9px;
        font-weight: 750;
      }

      .mini-url-input {
        flex: 1;

        overflow: hidden;

        padding: 5px 7px;

        border: 1px solid var(--line);
        border-radius: 5px;

        color: var(--muted);

        text-overflow: ellipsis;
        white-space: nowrap;

        font-family: var(--mono);
        font-size: 9px;
      }

      .mini-send {
        padding: 5px 8px;

        border-radius: 5px;

        background: var(--ink);
        color: var(--bg);

        font-size: 9px;
      }

      .mini-tabs {
        display: flex;
        gap: 14px;

        padding: 8px 12px;

        border-bottom: 1px solid var(--line);

        color: var(--muted-light);

        font-size: 9px;
      }

      .mini-tabs .active {
        color: var(--ink);
        font-weight: 700;
      }

      .mini-response {
        padding: 13px;

        font-family: var(--mono);
        font-size: 10px;
        line-height: 1.8;
      }

      .mini-contract {
        margin: 0 12px 12px;

        padding: 9px;

        border: 1px solid var(--warn-border);
        border-radius: 7px;

        background: var(--warn-soft);

        color: var(--warn);

        font-size: 9px;
      }

      /* ==========================================================================
   MINI MCP PREVIEW
   ========================================================================== */

      .mini-mcp {
        padding: 18px;

        background: var(--bg-subtle);

        min-height: 390px;
      }

      .mini-mcp-header {
        display: flex;
        align-items: center;
        gap: 8px;

        margin-bottom: 14px;
      }

      .mini-mcp-title {
        font-size: 12px;
        font-weight: 700;
      }

      .mini-mcp-count {
        padding: 2px 7px;

        border: 1px solid var(--line);
        border-radius: 999px;

        color: var(--muted);

        font-size: 9px;
      }

      .mini-tools {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px;
      }

      .mini-tool {
        padding: 11px;

        border: 1px solid var(--line);
        border-radius: 8px;

        background: var(--surface);
      }

      .mini-tool-source {
        margin-bottom: 7px;

        color: var(--muted-light);

        font-family: var(--mono);
        font-size: 8px;
      }

      .mini-tool-name {
        margin-bottom: 5px;

        font-family: var(--mono);
        font-size: 10px;
        font-weight: 700;
      }

      .mini-tool-args {
        color: var(--muted);

        font-size: 9px;
      }

      .mini-log {
        margin-top: 10px;
        padding: 10px;

        border-radius: 8px;

        background: var(--dark);

        color: var(--dark-muted);

        font-family: var(--mono);
        font-size: 9px;
        line-height: 1.8;
      }

      /* ==========================================================================
   MINI DOCS PREVIEW
   ========================================================================== */

      .mini-docs {
        display: flex;
        /* display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 150px; */

        min-height: 390px;
      }

      .mini-doc-nav {
        padding: 12px 0;

        border-right: 1px solid var(--line);

        background: var(--bg-subtle);

        font-size: 9px;
      }

      .mini-doc-nav-title {
        padding: 7px 11px 4px;

        color: var(--muted-light);

        font-size: 8px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
      }

      .mini-doc-nav-item {
        padding: 4px 11px;

        color: var(--muted);
      }

      .mini-doc-nav-item.active {
        color: var(--accent);

        box-shadow: inset 2px 0 var(--accent);
      }

      .mini-doc-main {
        padding: 20px 18px;
        flex: 1;
      }

      .mini-doc-main h4 {
        margin: 0 0 3px;

        font-size: 14px;
      }

      .mini-doc-path {
        margin-bottom: 15px;

        color: var(--muted);

        font-family: var(--mono);
        font-size: 8px;
      }

      .mini-doc-text {
        margin-bottom: 14px;

        color: var(--muted);

        font-size: 9px;
        line-height: 1.6;
      }

      .mini-doc-section {
        margin: 12px 0 5px;

        color: var(--muted-light);

        font-size: 8px;
        letter-spacing: 0.07em;
        text-transform: uppercase;
      }

      .mini-doc-param {
        padding: 7px 0;

        border-top: 1px solid var(--line);

        font-family: var(--mono);
        font-size: 9px;
      }

      .mini-doc-code {
        padding: 14px 10px;

        background: var(--dark);

        color: var(--dark-ink);

        font-family: var(--mono);
        font-size: 8px;
        line-height: 1.8;
      }

      /* ==========================================================================
   WHY SECTION
   ========================================================================== */

      .why-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;

        margin-top: 42px;
      }

      .why-card {
        padding: 22px;

        border: 1px solid var(--line);
        border-radius: 13px;

        background: var(--surface);
      }

      .why-number {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 30px;
        height: 30px;

        margin-bottom: 16px;

        border-radius: 8px;

        background: var(--accent-soft);
        color: var(--accent);

        font-family: var(--mono);
        font-size: 12px;
        font-weight: 700;
      }

      .why-card h3 {
        margin-bottom: 8px;

        font-size: 16px;
      }

      .why-card p {
        margin: 0;

        color: var(--muted);

        font-size: 13.5px;
      }

      /* ==========================================================================
   PRICING
   ========================================================================== */

      .pricing-grid {
        display: grid;
        grid-template-columns: 1.15fr 1fr;
        gap: 22px;

        margin-top: 40px;
      }

      .pricing-card {
        padding: 30px;

        border: 1px solid var(--line);
        border-radius: 16px;

        background: var(--surface);
      }

      .pricing-card.featured {
        border-color: var(--accent-border);

        box-shadow: 0 24px 50px -36px rgba(28, 92, 255, 0.45);
      }

      .pricing-card h3 {
        margin-bottom: 6px;

        font-size: 19px;
      }

      .pricing-tag {
        margin: 0 0 22px;

        color: var(--muted);

        font-size: 13px;
      }

      .price {
        display: flex;
        align-items: baseline;
        gap: 8px;
      }

      .price-value {
        font-size: 44px;
        font-weight: 700;
        letter-spacing: -0.04em;
      }

      .price-period {
        color: var(--muted);
        font-size: 13px;
      }

      .pricing-list {
        display: grid;
        gap: 11px;

        margin: 24px 0 28px;
        padding: 0;

        list-style: none;

        color: var(--ink-soft);
        font-size: 14px;
      }

      .pricing-list li::before {
        content: "→";

        margin-right: 8px;

        color: var(--accent);
      }

      .pricing-note {
        margin: 15px 0 0;

        color: var(--muted);

        font-size: 12px;
      }

      .eval-bar {
        margin-top: 26px;
        padding: 17px 19px;

        border: 1px dashed var(--line);
        border-radius: 12px;

        background: var(--bg-soft);

        color: var(--muted);

        font-size: 13.5px;
      }

      .eval-bar strong {
        color: var(--ink);
      }

      /* ==========================================================================
   FAQ
   ========================================================================== */

      .faq-shell {
        width: min(100%, var(--reading-max));

        margin-inline: auto;
      }

      .faq-heading {
        margin-bottom: 30px;
      }

      details {
        padding: 19px 0;

        border-bottom: 1px solid var(--line);
      }

      details:first-of-type {
        border-top: 1px solid var(--line);
      }

      summary {
        list-style: none;

        color: var(--ink);

        font-size: 16px;
        font-weight: 600;

        cursor: pointer;
      }

      summary::-webkit-details-marker {
        display: none;
      }

      summary::before {
        content: "+";

        display: inline-block;

        width: 24px;

        color: var(--accent);

        font-size: 18px;
        font-weight: 500;
      }

      details[open] summary::before {
        content: "–";
      }

      details p {
        max-width: 72ch;

        margin: 12px 0 0 24px;

        color: var(--muted);

        font-size: 14.5px;
      }

      /* ==========================================================================
   FOOTER
   ========================================================================== */

      .footer {
        border-top: 1px solid var(--line);
      }

      .footer-shell {
        width: min(calc(100% - 48px), var(--content-max));

        margin-inline: auto;

        padding: 52px 0 28px;
      }

      .footer-grid {
        display: grid;
        grid-template-columns: 1.4fr repeat(4, 1fr);
        gap: 36px;
      }

      .footer-brand p {
        max-width: 26ch;

        margin: 13px 0 0;

        color: var(--muted);

        font-size: 13px;
      }

      .footer-column h6 {
        margin: 0 0 12px;

        color: var(--muted-light);

        font-size: 10.5px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .footer-column ul {
        display: grid;
        gap: 8px;

        margin: 0;
        padding: 0;

        list-style: none;

        color: var(--muted);

        font-size: 13px;
      }

      .footer-column a:hover {
        color: var(--ink);
      }

      .footer-bottom {
        display: flex;
        justify-content: space-between;
        gap: 20px;

        margin-top: 44px;
        padding-top: 20px;

        border-top: 1px solid var(--line);

        color: var(--muted);

        font-size: 12px;
      }

      /* ==========================================================================
   RESPONSIVE
   ========================================================================== */

      @media (max-width: 1100px) {
        .docs-demo {
          grid-template-columns: 180px minmax(0, 1fr) 300px;
        }

        .feature-layout,
        .feature-layout.reverse {
          grid-template-columns: 1fr;
          gap: 40px;
        }

        .feature-layout.reverse .feature-copy {
          order: 1;
        }

        .feature-layout.reverse .feature-preview {
          order: 2;
        }

        .why-grid {
          grid-template-columns: repeat(2, 1fr);
        }

        .footer-grid {
          grid-template-columns: repeat(3, 1fr);
        }

        .footer-brand {
          grid-column: span 3;
        }
      }

      @media (max-width: 900px) {
        .nav-links {
          display: none;
        }

        .editor-demo,
        .debug-demo {
          grid-template-columns: 1fr;
        }

        .outline,
        .collection {
          max-height: 200px;

          border-right: 0;
          border-bottom: 1px solid var(--line);
        }

        .docs-demo {
          grid-template-columns: 1fr;
        }

        .docs-nav {
          display: none;
        }

        .code-panel {
          min-height: 350px;

          border-top: 1px solid var(--dark-line);
          border-left: 0;
        }

        .pricing-grid {
          grid-template-columns: 1fr;
        }

        .mini-docs {
          grid-template-columns: 100px minmax(0, 1fr);
        }

        .mini-doc-code {
          display: none;
        }
      }

      @media (max-width: 640px) {
        .container,
        .section-shell,
        .section-shell-wide,
        .hero,
        .demo-shell,
        .loader-section,
        .footer-shell {
          width: calc(100% - 32px);
        }

        .section-shell {
          padding-block: 64px;
        }

        .nav {
          height: 58px;
        }

        .nav-inner {
          width: calc(100% - 32px);
        }

        .nav-actions .btn-secondary {
          display: none;
        }

        .hero {
          padding-top: 58px;
        }

        .hero h1 {
          font-size: 36px;
        }

        .hero-sub {
          font-size: 16px;
        }

        .hero-strip {
          line-height: 1.8;
        }

        .spec-input {
          flex-direction: column;
          align-items: stretch;
        }

        .spec-input input {
          min-height: 42px;
        }

        .demo-section {
          padding-bottom: 44px;
        }

        .stage {
          border-radius: 11px;
        }

        .chrome-path {
          overflow: hidden;

          max-width: 150px;

          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .chrome .pill:not(.pill-ok):not(.pill-warn) {
          display: none;
        }

        .url-bar {
          flex-wrap: wrap;
        }

        .request-url {
          order: 3;
          flex-basis: 100%;
        }

        .environment {
          display: none;
        }

        .tools-grid {
          grid-template-columns: 1fr;
        }

        .mcp-demo {
          padding: 12px;
        }

        .mini-editor,
        .mini-debug {
          grid-template-columns: 110px minmax(0, 1fr);
        }

        .mini-tools {
          grid-template-columns: 1fr;
        }

        .mini-tree,
        .mini-collection {
          font-size: 8.5px;
        }

        .why-grid {
          grid-template-columns: 1fr;
        }

        .footer-grid {
          grid-template-columns: 1fr 1fr;
        }

        .footer-brand {
          grid-column: span 2;
        }

        .footer-bottom {
          flex-direction: column;
        }
      }

      /* ==========================================================================
   V2.0 FINAL REFINEMENTS — LAYOUT, PREVIEW SCALE, FAQ WIDTH, PRODUCT STORY
   ========================================================================== */

      /* Feature previews should read as real application surfaces, not thumbnails. */
      .feature-layout {
        grid-template-columns: minmax(0, 0.82fr) minmax(620px, 1.18fr);
        gap: clamp(44px, 5vw, 78px);
      }
      .feature-layout.reverse {
        grid-template-columns: minmax(620px, 1.18fr) minmax(0, 0.82fr);
      }
      .feature-preview {
        width: 100%;
        min-height: 520px;
      }
      .feature-preview .preview-body {
        min-height: 470px;
      }

      /* The mini editor had flex rows without a stable row box, causing visual drift. */
      .mini-code-content {
        padding: 12px 0 16px;
        line-height: 1.55;
      }
      .mini-line {
        min-height: 26px;
        height: 26px;
        align-items: center;
        white-space: pre;
      }
      .mini-line > span:last-child {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .mini-ln {
        height: 26px;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
      }

      /* FAQ intentionally uses the full content measure instead of a narrow reading column. */
      .faq-shell {
        width: 100%;
        max-width: var(--content-max);
      }
      .faq-heading .section-title,
      .faq-heading .section-deck {
        max-width: 68ch;
      }
      details p {
        max-width: 88ch;
      }

      /* Stronger product differentiation: one file becomes four native capabilities. */
      .product-model {
        margin-top: 42px;
        display: grid;
        grid-template-columns: 1.1fr repeat(4, 1fr);
        border: 1px solid var(--line);
        border-radius: 16px;
        overflow: hidden;
        background: var(--surface);
        box-shadow: var(--shadow-md);
      }
      .product-model-source,
      .product-model-node {
        min-height: 178px;
        padding: 24px;
      }
      .product-model-source {
        background: var(--dark);
        color: var(--dark-ink);
      }
      .product-model-source code {
        display: block;
        margin-top: 16px;
        color: #86efac;
        font-size: 14px;
      }
      .product-model-node {
        border-left: 1px solid var(--line);
      }
      .product-model-node strong {
        display: block;
        margin-bottom: 8px;
        font-size: 15px;
      }
      .product-model-node p,
      .product-model-source p {
        margin: 0;
        font-size: 13px;
        line-height: 1.55;
        color: var(--muted);
      }
      .product-model-source p {
        color: var(--dark-muted);
      }
      .product-model-label {
        color: var(--accent);
        font-family: var(--mono);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
      }

      @media (max-width: 1180px) {
        .product-model {
          grid-template-columns: repeat(2, 1fr);
        }
        .product-model-source {
          grid-column: span 2;
        }
        .product-model-node:nth-child(3) {
          border-left: 0;
        }
      }
      @media (max-width: 1100px) {
        .feature-layout,
        .feature-layout.reverse {
          grid-template-columns: 1fr;
        }
        .feature-preview {
          min-height: 480px;
        }
      }
      @media (max-width: 680px) {
        .product-model {
          grid-template-columns: 1fr;
        }
        .product-model-source {
          grid-column: auto;
        }
        .product-model-node {
          border-left: 0;
          border-top: 1px solid var(--line);
        }
        .faq-shell {
          width: 100%;
        }
      }

      /* ========================================================================
   V2.2 FINAL POLISH — FIX HERO CODE RHYTHM + LARGER PRODUCT PREVIEWS
   ======================================================================== */

      /* The first-screen editor must behave like a real code editor: every row has
   an explicit box. This prevents flex/content metrics from stretching lines. */
      .code-area {
        padding: 10px 0;
        line-height: normal;
      }
      .code-line {
        display: flex;
        align-items: center;
        height: 30px;
        min-height: 30px;
        max-height: 30px;
        line-height: 30px;
      }
      .code-number,
      .code-content {
        display: block;
        height: 30px;
        line-height: 30px;
      }
      .code-number {
        display: flex;
        align-items: center;
        justify-content: flex-end;
      }
      .code-content {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: pre;
      }

      /* Make the four capability previews feel like product screens, not cards. */
      .feature-layout {
        grid-template-columns: minmax(0, 0.76fr) minmax(700px, 1.24fr);
        gap: clamp(52px, 6vw, 96px);
      }
      .feature-layout.reverse {
        grid-template-columns: minmax(700px, 1.24fr) minmax(0, 0.76fr);
      }
      .feature-preview {
        min-height: 620px;
        border-radius: 18px;
      }
      .feature-preview .preview-body {
        min-height: 570px;
      }
      .mini-editor,
      .mini-debug {
        min-height: 570px;
      }

      /* ------------------------------------------------------------------------
   PRODUCT STORY: communicate the category difference in one scan.
   ------------------------------------------------------------------------ */
      .product-story-section {
        position: relative;
        overflow: hidden;
      }
      .product-story-head {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.75fr);
        gap: 80px;
        align-items: end;
      }
      .product-story-head .section-title {
        margin-bottom: 0;
        max-width: 16ch;
      }
      .product-story-deck {
        margin: 0;
        color: var(--ink-soft);
        font-size: clamp(16px, 1.25vw, 19px);
        line-height: 1.65;
      }
      .product-story-deck strong {
        color: var(--ink);
      }

      .product-flow {
        display: grid;
        grid-template-columns: minmax(260px, 0.8fr) 56px minmax(0, 2.2fr);
        align-items: stretch;
        margin-top: 54px;
      }
      .product-flow-source {
        min-height: 340px;
        padding: 34px;
        border: 1px solid var(--dark-line);
        border-radius: 20px;
        background: var(--dark);
        color: var(--dark-ink);
        box-shadow: var(--shadow-lg);
      }
      .product-flow-eyebrow {
        color: var(--accent);
        font-family: var(--mono);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.14em;
      }
      .product-file-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        margin: 42px 0 16px;
        border: 1px solid var(--dark-line);
        border-radius: 14px;
        background: var(--dark-soft);
        color: #86efac;
        font-family: var(--mono);
        font-size: 20px;
      }
      .product-file-name {
        color: #fff;
        font-family: var(--mono);
        font-size: 21px;
        font-weight: 650;
      }
      .product-file-alt {
        margin-top: 5px;
        color: var(--dark-muted);
        font-family: var(--mono);
        font-size: 12px;
      }
      .product-flow-source p {
        margin: 34px 0 0;
        color: var(--dark-muted);
        font-size: 13px;
        line-height: 1.65;
      }
      .product-flow-connector {
        position: relative;
        min-height: 100%;
      }
      .product-flow-connector::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        border-top: 1px dashed var(--line-strong);
      }
      .product-flow-connector span {
        position: absolute;
        top: calc(50% - 5px);
        right: -1px;
        width: 10px;
        height: 10px;
        border-top: 1px solid var(--accent);
        border-right: 1px solid var(--accent);
        transform: rotate(45deg);
      }
      .product-flow-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border: 1px solid var(--line);
        border-radius: 20px;
        overflow: hidden;
        background: var(--surface);
        box-shadow: var(--shadow-md);
      }
      .product-flow-tool {
        min-height: 170px;
        padding: 28px 30px;
        border-right: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
      }
      .product-flow-tool:nth-child(2n) {
        border-right: 0;
      }
      .product-flow-tool:nth-child(n + 3) {
        border-bottom: 0;
      }
      .product-flow-index {
        display: block;
        margin-bottom: 34px;
        color: var(--accent);
        font-family: var(--mono);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.12em;
      }
      .product-flow-tool strong {
        display: block;
        color: var(--ink);
        font-size: 17px;
      }
      .product-flow-tool p {
        margin: 8px 0 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.55;
      }

      .product-positioning {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 1px;
        margin-top: 24px;
        border: 1px solid var(--line);
        border-radius: 20px;
        overflow: hidden;
        background: var(--line);
      }
      .positioning-statement,
      .positioning-points {
        background: var(--surface);
      }
      .positioning-statement {
        padding: 38px 40px;
      }
      .positioning-mark {
        display: inline-block;
        margin-bottom: 20px;
        color: var(--accent);
        font-family: var(--mono);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
      }
      .positioning-statement h3 {
        margin: 0;
        color: var(--ink);
        font-size: clamp(24px, 2.4vw, 38px);
        line-height: 1.1;
        letter-spacing: -0.035em;
      }
      .positioning-statement p {
        max-width: 52ch;
        margin: 18px 0 0;
        color: var(--muted);
        line-height: 1.6;
      }
      .positioning-points {
        display: grid;
        align-content: center;
      }
      .positioning-points > div {
        display: grid;
        grid-template-columns: 94px 1fr;
        gap: 18px;
        align-items: center;
        padding: 18px 30px;
        border-bottom: 1px solid var(--line);
      }
      .positioning-points > div:last-child {
        border-bottom: 0;
      }
      .positioning-points span {
        color: var(--muted-light);
        font-family: var(--mono);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.08em;
      }
      .positioning-points strong {
        color: var(--ink-soft);
        font-size: 13px;
        line-height: 1.45;
      }

      @media (max-width: 1260px) {
        .feature-layout,
        .feature-layout.reverse {
          grid-template-columns: minmax(0, 0.9fr) minmax(580px, 1.1fr);
        }
        .feature-layout.reverse > :first-child {
          order: 2;
        }
        .feature-layout.reverse > :last-child {
          order: 1;
        }
      }
      @media (max-width: 1100px) {
        .feature-layout,
        .feature-layout.reverse {
          grid-template-columns: 1fr;
        }
        .feature-preview {
          min-height: 560px;
        }
        .feature-preview .preview-body {
          min-height: 510px;
        }
        .product-story-head {
          grid-template-columns: 1fr;
          gap: 22px;
        }
        .product-story-head .section-title {
          max-width: 20ch;
        }
      }
      @media (max-width: 820px) {
        .product-flow {
          grid-template-columns: 1fr;
          gap: 18px;
        }
        .product-flow-source {
          min-height: 280px;
        }
        .product-file-icon {
          margin-top: 28px;
        }
        .product-flow-connector {
          min-height: 30px;
        }
        .product-flow-connector::before {
          top: 50%;
          left: 20px;
          width: calc(100% - 40px);
        }
        .product-flow-connector span {
          top: calc(50% - 5px);
          right: 20px;
        }
        .product-positioning {
          grid-template-columns: 1fr;
        }
        .positioning-points > div {
          grid-template-columns: 82px 1fr;
        }
      }
      @media (max-width: 620px) {
        .code-line,
        .code-number,
        .code-content {
          height: 27px;
          min-height: 27px;
          max-height: 27px;
          line-height: 27px;
        }
        .code-area {
          font-size: 10.5px;
        }
        .feature-preview {
          min-height: 470px;
        }
        .feature-preview .preview-body {
          min-height: 420px;
        }
        .product-flow-tools {
          grid-template-columns: 1fr;
        }
        .product-flow-tool,
        .product-flow-tool:nth-child(2n),
        .product-flow-tool:nth-child(n + 3) {
          border-right: 0;
          border-bottom: 1px solid var(--line);
        }
        .product-flow-tool:last-child {
          border-bottom: 0;
        }
        .positioning-statement {
          padding: 30px 24px;
        }
        .positioning-points > div {
          padding: 17px 20px;
          grid-template-columns: 72px 1fr;
          gap: 12px;
        }
      }

      /* ========================================================================
   V2.2 FINAL — LAST-MILE PRODUCT + LAYOUT CORRECTIONS
   ======================================================================== */

      /*
  1. Fix the first-screen Spec Editor content disappearing:
     the previous white-space: pre + overflow clipping preserved the HTML
     indentation before each token and pushed the actual code off-screen.
     Keep every row fixed-height, but collapse source formatting whitespace.
*/
      .code-line {
        box-sizing: border-box;
        overflow: hidden;
      }
      .code-content {
        display: flex;
        align-items: center;
        height: 30px;
        min-width: 0;
        padding-left: calc(18px + var(--lvl, 0) * 16px);
        padding-right: 24px;
        overflow: hidden;
        white-space: normal;
        text-overflow: clip;
        transition: padding-left 0.15s ease;
      }
      .code-content > * {
        flex: none;
      }
      .code-content > .syntax-key:first-child {
        margin-left: 0;
      }
      .code-content > .syntax-key:not(:last-child),
      .code-content > .syntax-number:not(:last-child) {
        margin-right: 5px;
      }

      /*
  2. Keep product previews large while giving feature copy enough measure.
     The previous 700px preview minimum squeezed the copy column too hard.
*/
      .feature-layout,
      .feature-layout.reverse {
        grid-template-columns: minmax(420px, 0.95fr) minmax(620px, 1.05fr);
        gap: clamp(44px, 4.5vw, 76px);
        align-items: flex-start;
      }
      .feature-preview {
        min-height: 600px;
      }
      .feature-preview .preview-body,
      .mini-editor,
      .mini-debug {
        min-height: 550px;
      }

      .feature-preview.mini-spec-preview {
        min-height: 390px;
        max-height: 390px;
      }

      .feature-preview.mini-debug-preview {
        min-height: 390px;
        max-height: 390px;
      }

      .feature-preview.mini-mcp-preview {
        min-height: 390px;
        max-height: 390px;
      }

      .feature-preview.mini-doc-preview {
        min-height: 390px;
        max-height: 390px;
      }

      /* Let the copy breathe and reduce unnecessary headline wrapping. */
      .feature-copy {
        min-width: 0;
      }
      .feature-copy .section-title {
        max-width: 22ch;
      }
      .feature-copy .section-deck {
        max-width: 56ch;
      }

      /*
  3. Sharpen the category message:
     this is not "four tools in one dashboard". The OpenAPI file itself is
     the workspace and each capability operates directly from that contract.
*/
      .product-story-head .section-title {
        max-width: 18ch;
      }
      .product-story-deck {
        max-width: 48ch;
      }
      .product-flow-tool strong {
        font-size: 18px;
      }
      .product-flow-tool p {
        max-width: 30ch;
      }
      .positioning-statement h3 {
        max-width: 18ch;
      }
      .positioning-statement p {
        max-width: 46ch;
      }

      /* Preserve comfortable reading widths at intermediate desktop sizes. */
      @media (max-width: 1260px) {
        .feature-layout,
        .feature-layout.reverse {
          grid-template-columns: minmax(380px, 0.95fr) minmax(560px, 1.05fr);
          gap: 42px;
        }
      }
      @media (max-width: 1100px) {
        .feature-layout,
        .feature-layout.reverse {
          grid-template-columns: 1fr;
        }
        .feature-preview {
          min-height: 560px;
        }
        .feature-preview .preview-body,
        .mini-editor,
        .mini-debug {
          min-height: 510px;
        }
      }
      @media (max-width: 620px) {
        .code-content {
          height: 27px;
          min-height: 27px;
          max-height: 27px;
          line-height: 27px;
          padding-left: 10px;
          padding-right: 12px;
        }
        .feature-preview {
          min-height: 470px;
        }
        .feature-preview .preview-body,
        .mini-editor,
        .mini-debug {
          min-height: 420px;
        }
      }