/* ============================================================
   Keystone EA™ — Design System
   ============================================================ */

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

:root {
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --brand-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Brand */
  --brand-ink: #1c2024;
  --brand-blue: #3f6aa1;

  /* Surfaces — cool paper */
  --bg: #f6f7f9;
  --bg-2: #eceff3;
  --card: #ffffff;
  --surface: #f1f3f7;
  --ink: #1c2024;
  --ink-2: #545e6a;
  --ink-3: #869099;
  --ink-4: #b4bcc6;
  --border: #e4e8ee;
  --border-2: #d2d8e1;
  --shadow-sm: 0 1px 2px rgba(28,32,36,.05), 0 1px 3px rgba(28,32,36,.05);
  --shadow-md: 0 4px 16px rgba(28,32,36,.09), 0 1px 3px rgba(28,32,36,.05);
  --shadow-lg: 0 18px 48px rgba(28,32,36,.16), 0 4px 12px rgba(28,32,36,.08);

  /* Layer accents */
  --l-supporting: #5C6166;
  --l-governance: #00838F;
  --l-strategy:   #B00020;
  --l-business:   #E65100;
  --l-data:       #5E00A3;
  --l-application:#0a4bd1;
  --l-technology: #00824c;

  --l-supporting-soft: #f1efea;
  --l-governance-soft: #e3f5f6;
  --l-strategy-soft:   #fdeeee;
  --l-business-soft:   #fdf2e6;
  --l-data-soft:       #f4eaff;
  --l-application-soft:#e9f0ff;
  --l-technology-soft: #e6f8ee;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --maxw: 1180px;
  --nav-h: 62px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

[data-theme="dark"] {
  --brand-blue: #5385c2;
  --bg: #11171d;
  --bg-2: #0d1218;
  --card: #182028;
  --surface: #1e2831;
  --ink: #f3f5f8;
  --ink-2: #aab4c0;
  --ink-3: #7d8894;
  --ink-4: #55616d;
  --border: #273038;
  --border-2: #36414d;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,.45);
  --shadow-lg: 0 22px 54px rgba(0,0,0,.6);

  --l-supporting-soft: #211f1a;
  --l-governance-soft: #0a2729;
  --l-strategy-soft:   #2a0f12;
  --l-business-soft:   #281708;
  --l-data-soft:       #1f0f2e;
  --l-application-soft:#0c1733;
  --l-technology-soft: #07271a;

  --l-supporting: #9aa0a6;
  --l-governance: #2bc2cf;
  --l-strategy:   #ff5a6e;
  --l-business:   #ff9248;
  --l-data:       #c08cff;
  --l-application:#6f9bff;
  --l-technology: #34c98a;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 18px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(63,106,161,.18); }
[data-theme="dark"] ::selection { background: rgba(83,133,194,.34); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ── Layout primitives ──────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 28px; }
section { position: relative; }
.section-pad { padding: clamp(56px, 9vw, 116px) 0; }
.hr { height: 1px; background: var(--border); border: 0; }

/* ── Eyebrow / section heading ──────────────────────────── */
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before {
  content: ''; width: 18px; height: 1px; background: var(--ink-4); display: inline-block;
}
.eyebrow.no-rule::before { display: none; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.022em; font-weight: 500; }
.h-sec { font-size: clamp(28px, 4.2vw, 43px); margin: 16px 0 0; font-weight: 500; }
.lede { font-size: clamp(16px, 1.7vw, 19px); color: var(--ink-2); max-width: 62ch; margin-top: 18px; line-height: 1.62; }

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 22px; height: 22px; flex-shrink: 0; color: var(--ink); }
.brand-name { font-family: var(--brand-font); font-size: 17px; font-weight: 700; letter-spacing: -.005em;
  color: var(--ink); line-height: 1; white-space: nowrap; }
.brand-ea { color: var(--brand-blue); margin-left: .12em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-size: 14px; color: var(--ink-2); padding: 7px 13px; border-radius: 8px;
  font-weight: 450; transition: color .15s, background .15s; position: relative;
}
.nav-link:hover { color: var(--ink); background: var(--bg-2); }
.nav-link.active { color: var(--ink); font-weight: 500; }
.nav-link.active::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 1px; height: 2px;
  border-radius: 2px; background: var(--brand-blue); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.theme-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
  transition: color .15s, border-color .15s, transform .2s;
}
.theme-btn:hover { color: var(--ink); border-color: var(--border-2); }
.theme-btn:active { transform: scale(.92); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .ico-sun { display: none; }
[data-theme="dark"] .theme-btn .ico-sun { display: block; }
[data-theme="dark"] .theme-btn .ico-moon { display: none; }
.nav-toggle { display: none; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink); cursor: pointer; place-items: center; }
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 18px 18px; gap: 2px;
    transform: translateY(-130%); transition: transform .32s var(--ease); box-shadow: var(--shadow-md);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { padding: 12px 14px; font-size: 15.5px; }
  .nav-toggle { display: grid; }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font);
  font-size: 14.5px; font-weight: 500; padding: 12px 20px; border-radius: 11px;
  cursor: pointer; border: 1px solid transparent; transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand-blue); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--card); border-color: var(--ink-4); transform: translateY(-2px); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: clamp(56px, 11vw, 132px) 0 clamp(48px, 7vw, 92px); position: relative; overflow: hidden; }
.hero-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 58px 58px; opacity: .4;
  mask-image: radial-gradient(ellipse 90% 70% at 70% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 0%, #000 0%, transparent 72%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 12px; letter-spacing: .04em; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px 6px 10px; margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 22%, transparent); }
.hero h1 {
  font-size: clamp(38px, 7vw, 78px); font-weight: 500; letter-spacing: -.035em; line-height: 1.0;
}
.hero h1 .muted { color: var(--ink-3); }
.hero-sub { font-size: clamp(17px, 2.1vw, 22px); color: var(--ink-2); max-width: 60ch;
  margin-top: 26px; line-height: 1.55; font-weight: 400; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }

/* ── Stat band ──────────────────────────────────────────── */
.stat-band { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card);
  overflow: hidden; box-shadow: var(--shadow-sm); }
.stat { padding: 22px 18px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-n { font-size: clamp(28px, 3.4vw, 38px); font-weight: 500; letter-spacing: -.03em; line-height: 1; font-family: var(--mono); }
.stat-l { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; letter-spacing: .01em; }
@media (max-width: 860px) { .stat-band { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3n) { border-right: none; } .stat:nth-child(-n+3) { border-bottom: 1px solid var(--border); } }
@media (max-width: 460px) { .stat-band { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: 1px solid var(--border); } .stat:nth-child(2n) { border-right: none; } }

/* ── Generic cards ──────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); }

/* Pillar cards */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 880px) { .pillars { grid-template-columns: 1fr; } }
.pillar { padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .26s var(--ease), box-shadow .26s, border-color .26s; position: relative; overflow: hidden; }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.pillar-top { display: flex; align-items: center; justify-content: space-between; }
.pillar-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--border); }
.pillar-ico svg { width: 21px; height: 21px; color: var(--ink); }
.pillar-num { font-family: var(--mono); font-size: 12px; color: var(--ink-4); }
.pillar h3 { font-size: 20px; font-weight: 500; }
.pillar p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; flex: 1; }
.pillar-link { font-size: 13.5px; font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px; }
.pillar-link svg { width: 14px; height: 14px; transition: transform .2s; }
.pillar:hover .pillar-link svg { transform: translateX(4px); }

/* ── Layer stack (home) ─────────────────────────────────── */
.layerstack { display: flex; flex-direction: column; gap: 8px; }
.layer-row {
  display: grid; grid-template-columns: 188px 1fr; gap: 18px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent, var(--border-2));
  border-radius: var(--radius); padding: 16px 18px; transition: transform .2s var(--ease), box-shadow .2s;
}
.layer-row:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.layer-id { display: flex; flex-direction: column; gap: 6px; }
.layer-pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); }
.layer-blurb { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.layer-objs { display: flex; flex-wrap: wrap; gap: 6px; }
.obj-chip {
  font-size: 12px; font-weight: 450; padding: 5px 10px; border-radius: 7px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 7px; transition: border-color .15s, color .15s, background .15s;
}
.obj-chip:hover { color: var(--ink); border-color: var(--border-2); }
.obj-chip .swatch { width: 8px; height: 8px; border-radius: 2.5px; flex-shrink: 0; }
@media (max-width: 680px) { .layer-row { grid-template-columns: 1fr; gap: 12px; } }

/* ── Object cards (metamodel) ───────────────────────────── */
.layer-group { margin-top: 14px; }
.layer-group + .layer-group { margin-top: 40px; }
.layer-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.layer-head .layer-pill { font-size: 12px; }
.layer-head p { font-size: 14px; color: var(--ink-2); flex: 1; min-width: 240px; }
.obj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.obj-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card);
  transition: transform .22s var(--ease), box-shadow .22s, border-color .22s; }
.obj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.obj-card-head { padding: 11px 15px; display: flex; align-items: center; gap: 9px; color: #fff; }
.obj-card-head .glyph { width: 9px; height: 9px; border-radius: 2px; background: rgba(255,255,255,.85); }
.obj-card-head h4 { font-size: 14.5px; font-weight: 500; letter-spacing: -.005em; color: #fff; }
.obj-card-body { padding: 13px 15px 15px; }
.obj-card-body .short { font-size: 12px; font-family: var(--mono); color: var(--ink-3); letter-spacing: .01em;
  text-transform: uppercase; margin-bottom: 7px; }
.obj-card-body .long { font-size: 13.5px; color: var(--ink-2); line-height: 1.58; }

/* ── Relationships ──────────────────────────────────────── */
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 880px) { .rel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .rel-grid { grid-template-columns: 1fr; } }
.rel-card { padding: 18px 18px 20px; transition: transform .22s var(--ease), box-shadow .22s; }
.rel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rel-glyph { height: 26px; display: flex; align-items: center; margin-bottom: 14px; }
.rel-glyph svg { overflow: visible; }
.rel-card h4 { font-size: 16px; font-weight: 500; display: flex; align-items: center; gap: 9px; }
.rel-code { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 6px; }
.rel-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.58; margin-top: 9px; }

/* ── Rules matrix ───────────────────────────────────────── */
.matrix-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.matrix-controls .ctl-label { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3); margin-right: 4px; }
.chip-toggle { font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--card); color: var(--ink-2); transition: all .16s; display: inline-flex; align-items: center; gap: 7px; }
.chip-toggle .swatch { width: 9px; height: 9px; border-radius: 50%; }
.chip-toggle[aria-pressed="true"] { color: #fff; border-color: transparent; }
.chip-toggle:hover { border-color: var(--ink-4); }
.matrix-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  -webkit-overflow-scrolling: touch; }
table.matrix { border-collapse: separate; border-spacing: 0; font-size: 12px; width: max-content; min-width: 100%; }
table.matrix th, table.matrix td { padding: 0; text-align: center; }
table.matrix thead th { position: sticky; top: 0; z-index: 3; background: var(--surface);
  font-weight: 500; color: var(--ink-2); height: 132px; vertical-align: bottom; border-bottom: 1px solid var(--border-2); }
table.matrix thead th .rot { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap;
  padding: 9px 0 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .02em; margin: 0 auto; }
table.matrix th.corner { position: sticky; left: 0; z-index: 5; background: var(--surface);
  text-align: left; padding: 10px 14px; vertical-align: bottom; min-width: 168px; }
table.matrix th.corner span { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; }
table.matrix tbody th.rowhead { position: sticky; left: 0; z-index: 2; background: var(--card);
  text-align: left; padding: 8px 14px; font-weight: 500; color: var(--ink); white-space: nowrap;
  border-right: 1px solid var(--border-2); border-bottom: 1px solid var(--border); font-size: 12.5px; }
table.matrix tbody th.rowhead .rh { display: inline-flex; align-items: center; gap: 8px; }
table.matrix tbody th.rowhead .swatch { width: 9px; height: 9px; border-radius: 2.5px; flex-shrink: 0; }
table.matrix td.cell { width: 38px; min-width: 38px; height: 38px; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border); position: relative; cursor: default; }
table.matrix td.cell.diag { background: var(--bg-2); }
table.matrix td .dots { display: flex; align-items: center; justify-content: center; gap: 2px; height: 100%; flex-wrap: wrap; padding: 5px; }
table.matrix td .rdot { width: 7px; height: 7px; border-radius: 50%; opacity: .92; transition: transform .12s, opacity .12s; }
table.matrix td.dim .rdot { opacity: .12; }
table.matrix td.cell:hover { outline: 2px solid var(--ink); outline-offset: -2px; z-index: 1; }
table.matrix tr:hover td { background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.matrix-hint { font-size: 13px; color: var(--ink-3); margin-top: 14px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.matrix-legend-dot { display: inline-flex; align-items: center; gap: 6px; }
.matrix-legend-dot .rdot { width: 8px; height: 8px; border-radius: 50%; }

/* tooltip */
.cell-tip { position: fixed; z-index: 200; background: var(--ink); color: var(--bg); font-size: 12.5px;
  padding: 9px 12px; border-radius: 9px; box-shadow: var(--shadow-lg); pointer-events: none; max-width: 260px;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; line-height: 1.5; }
.cell-tip.show { opacity: 1; transform: translateY(0); }
.cell-tip b { font-weight: 500; }
.cell-tip .pair { font-family: var(--mono); font-size: 11px; opacity: .7; display: block; margin-bottom: 4px; }
.cell-tip .rels { display: block; margin-top: 2px; }

/* ── Viewpoints ─────────────────────────────────────────── */
.vp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 820px) { .vp-grid { grid-template-columns: 1fr; } }
.vp-card { overflow: hidden; transition: transform .24s var(--ease), box-shadow .24s; display: flex; flex-direction: column; }
.vp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.vp-head { padding: 22px 24px 20px; border-left: 4px solid var(--accent); background: var(--accent-soft); }
.vp-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.vp-name { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.vp-count { font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.vp-desc { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.vp-body { padding: 18px 24px 22px; }
.vp-obj-label { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 11px; }
.vp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lvl-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 450;
  padding: 4px 9px; border-radius: 7px; border: 1px solid; white-space: nowrap; }
.lvl-tag .swatch { width: 8px; height: 8px; border-radius: 2.5px; }

/* viewpoint x object matrix */
.vpm-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table.vpm { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; font-size: 13px; }
table.vpm th, table.vpm td { padding: 11px 12px; text-align: center; border-bottom: 1px solid var(--border); }
table.vpm thead th { position: sticky; top: 0; background: var(--surface); font-weight: 500; font-size: 12px;
  color: var(--ink-2); z-index: 2; border-bottom: 1px solid var(--border-2); line-height: 1.25; vertical-align: bottom; }
table.vpm thead th.obj-col, table.vpm tbody th { text-align: left; }
table.vpm tbody th { position: sticky; left: 0; background: var(--card); font-weight: 450; color: var(--ink);
  white-space: nowrap; z-index: 1; border-right: 1px solid var(--border); }
table.vpm tbody th .rh { display: inline-flex; align-items: center; gap: 8px; }
table.vpm tbody th .swatch { width: 8px; height: 8px; border-radius: 2.5px; }
table.vpm tbody tr:hover td, table.vpm tbody tr:hover th { background: var(--bg-2); }
.vpm-check { color: var(--accent, var(--ink)); font-weight: 600; }
.vpm-dot { color: var(--ink-4); }
table.vpm thead th .vph { display: inline-block; max-width: 92px; }

/* ── Methodology ────────────────────────────────────────── */
.method-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 36px; }
@media (max-width: 620px){ .method-stats{ grid-template-columns: repeat(2,1fr);} }
.ms { padding: 18px; text-align: center; }
.ms-n { font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1; }
.ms-l { font-size: 12px; color: var(--ink-3); margin-top: 7px; }

.phase-rail { display: flex; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }
.phase-btn { flex: 1; min-width: 140px; text-align: left; cursor: pointer; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 15px; position: relative;
  transition: border-color .2s, transform .2s, box-shadow .2s; overflow: hidden; }
.phase-btn::before { content:''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--pc); transform: scaleY(0); transform-origin: top; transition: transform .25s var(--ease); }
.phase-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.phase-btn.active { border-color: color-mix(in srgb, var(--pc) 45%, var(--border)); }
.phase-btn.active::before { transform: scaleY(1); }
.phase-btn .pb-top { display: flex; align-items: center; gap: 10px; }
.phase-btn .pb-num { font-family: var(--mono); font-size: 12px; font-weight: 500; width: 30px; height: 30px;
  border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--pc); flex-shrink: 0; }
.phase-btn .pb-name { font-size: 15px; font-weight: 500; }
.phase-btn.active .pb-name { color: var(--pc); }
.phase-btn .pb-count { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 9px; }

.phase-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); }
.pp-head { padding: 24px 26px; border-bottom: 1px solid var(--border); border-top: 3px solid var(--pc);
  background: var(--pc-soft); display: flex; gap: 18px; align-items: flex-start; }
.pp-num { font-family: var(--mono); font-size: 44px; font-weight: 500; line-height: .9; color: var(--pc); }
.pp-name { font-size: 24px; font-weight: 500; }
.pp-tag { font-size: 14.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.55; max-width: 70ch; }
.pp-meta { font-family: var(--mono); font-size: 11.5px; color: var(--pc); margin-top: 11px; letter-spacing: .02em; }
.tracks { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px){ .tracks { grid-template-columns: 1fr; } }
.track { padding: 22px 24px; border-right: 1px solid var(--border); }
.track:last-child { border-right: none; }
@media (max-width: 720px){ .track { border-right: none; border-bottom: 1px solid var(--border);} .track:last-child{border-bottom:none;} }
.track-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px;
  font-weight: 500; text-transform: uppercase; letter-spacing: .07em; padding: 5px 11px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pc) 40%, var(--border)); color: var(--pc); margin-bottom: 18px; }
.track-label .tl-dot { width: 7px; height: 7px; border-radius: 50%; }
.tg-name { font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); margin: 0 0 8px; }
.task-group + .task-group { margin-top: 18px; }
.subtask { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px; overflow: hidden;
  transition: border-color .15s; background: var(--card); }
.subtask:hover { border-color: var(--border-2); }
.st-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer; user-select: none; }
.subtask.open .st-row, .subtask:hover .st-row { background: var(--bg-2); }
.st-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; transition: transform .15s; }
.subtask.open .st-dot { transform: scale(1.4); }
.st-name { font-size: 13.5px; font-weight: 500; flex: 1; line-height: 1.35; }
.ai-badge { font-family: var(--mono); font-size: 9px; font-weight: 500; background: var(--l-data-soft);
  color: var(--l-data); padding: 2px 6px; border-radius: 4px; letter-spacing: .04em;
  border: 1px solid color-mix(in srgb, var(--l-data) 25%, transparent); }
.chev { color: var(--ink-3); flex-shrink: 0; transition: transform .22s var(--ease); }
.subtask.open .chev { transform: rotate(180deg); }
.st-desc { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.st-desc-inner { padding: 4px 14px 14px 31px; font-size: 13px; color: var(--ink-2); line-height: 1.65; }

/* ── Callout / prose ────────────────────────────────────── */
.prose p { font-size: 16px; color: var(--ink-2); line-height: 1.72; margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 500; }
.callout { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border); align-items: start; }
.callout .c-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--card); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--ink); }
.callout .c-ico svg { width: 18px; height: 18px; }
.callout h4 { font-size: 15px; margin-bottom: 4px; }
.callout p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

/* feature rows */
.feature-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
@media (max-width: 820px){ .feature-list{ grid-template-columns: 1fr;} }
.feature { padding: 22px; }
.feature .f-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border);
  display: grid; place-items: center; margin-bottom: 14px; color: var(--ink); }
.feature .f-ico svg { width: 19px; height: 19px; }
.feature h4 { font-size: 16.5px; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

/* ── Footer ─────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 52px 0 44px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { max-width: 360px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h5 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); margin-bottom: 14px; font-weight: 500; }
.footer-col a { display: block; font-size: 14px; color: var(--ink-2); padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-4); font-family: var(--mono); }

/* ── Reveal animation ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* page header block */
.page-head { padding: clamp(48px, 8vw, 88px) 0 8px; }
.breadcrumb { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--ink); }

/* ── Diagram editor (In Action) ─────────────────────────── */
.editor-shell { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 15px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.editor-title { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink); min-width: 0; }
.editor-title .et-ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--border); color: var(--ink-2); flex-shrink: 0; }
.editor-title .et-ico svg { width: 14px; height: 14px; }
.editor-title .et-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editor-title sup { font-size: 8px; opacity: .5; }
.editor-actions { display: flex; gap: 8px; flex-shrink: 0; }
.editor-btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font);
  font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 9px;
  border: 1px solid var(--border-2); background: var(--card); color: var(--ink);
  cursor: pointer; transition: border-color .16s, transform .16s, background .16s; }
.editor-btn:hover { border-color: var(--ink-4); transform: translateY(-1px); }
.editor-btn svg { width: 14px; height: 14px; }
.editor-frame-holder { position: relative; background: var(--bg-2);
  background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 22px 22px; flex: 1; min-height: 0; }
.editor-frame { width: 100%; height: clamp(560px, calc(100vh - 250px), 1080px); border: 0;
  display: block; background: transparent; position: relative; z-index: 1; }
.editor-loading { position: absolute; inset: 0; z-index: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 32px; }
.editor-loading .el-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--border); color: var(--ink-3); }
.editor-loading .el-ico svg { width: 22px; height: 22px; }
.editor-loading h4 { font-size: 16px; }
.editor-loading p { font-size: 13px; color: var(--ink-3); max-width: 340px; line-height: 1.55; }
.editor-shell.is-full { position: fixed; inset: 0; z-index: 1000; border-radius: 0; border: 0; height: 100vh; box-shadow: none; }
.editor-shell.is-full .editor-frame { height: 100%; }
@media (max-width: 560px) { .editor-actions .lbl { display: none; } }

/* ── Download cards ─────────────────────────────────────── */
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 760px; }
@media (max-width: 640px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-card { display: flex; flex-direction: column; gap: 12px; padding: 20px 20px 18px;
  transition: transform .22s var(--ease), box-shadow .22s, border-color .22s; }
.dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.dl-top { display: flex; align-items: center; justify-content: space-between; }
.dl-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--ink); }
.dl-ico svg { width: 19px; height: 19px; }
.dl-ext { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 7px; letter-spacing: .03em; text-transform: uppercase; }
.dl-card h4 { font-size: 16px; font-weight: 500; }
.dl-card p { font-size: 13px; color: var(--ink-2); line-height: 1.55; flex: 1; }
.dl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 2px;
  font-size: 13.5px; font-weight: 500; padding: 9px 14px; border-radius: 9px;
  background: var(--brand-blue); color: #fff; border: 1px solid transparent; transition: transform .18s var(--ease), box-shadow .18s, filter .18s; }
.dl-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); filter: brightness(1.06); }
.dl-btn svg { width: 15px; height: 15px; }
