/* ==========================================================================
   Portfolio — design system
   ========================================================================== */

:root {
  /* Palette: Spring Meadow #CAFFA6 · Teal Waters #204654 · Glacial Sky #A9E0F1 · Morning Mist #F7F9E1 */
  --meadow: #caffa6;
  --teal: #204654;
  --sky: #a9e0f1;
  --mist: #f7f9e1;

  --bg: #f7f9e1;
  --surface: #fdfef6;
  --surface-2: #e3f3f8;
  --sky-band: #cfeaf3;
  --page-gradient:
    radial-gradient(70% 18% at 0% 30%, rgba(169, 224, 241, .55), transparent 70%),
    radial-gradient(60% 16% at 100% 62%, rgba(202, 255, 166, .40), transparent 70%),
    radial-gradient(70% 16% at 10% 88%, rgba(169, 224, 241, .45), transparent 70%),
    linear-gradient(180deg, #f7f9e1 0%, #e4f3f1 22%, #d3edf5 40%, #eaf6ea 58%, #dcf0f6 76%, #eefbdd 92%, #f7f9e1 100%);
  --ink: #204654;
  --ink-2: #4a6a75;
  --ink-3: #7d949b;
  --line: #d5e6e4;
  --line-strong: #b9d5da;
  --accent: #204654;
  --accent-2: #2f7f99;
  --accent-ink: #f7f9e1;
  --accent-soft: #c4e8f4;
  --highlight: #caffa6;
  --good: #3f9b2e;
  --bad: #d64545;
  --shadow-sm: 0 1px 2px rgba(32, 70, 84, .06);
  --shadow: 0 1px 2px rgba(32, 70, 84, .05), 0 8px 24px -8px rgba(32, 70, 84, .14);
  --shadow-lg: 0 2px 4px rgba(32, 70, 84, .05), 0 24px 48px -16px rgba(32, 70, 84, .22);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--page-gradient);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }

.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); margin: 14px 0 14px; }
.section-head p { color: var(--ink-2); font-size: 18px; margin: 0; }

.muted { color: var(--ink-2); }
.todo {
  background: repeating-linear-gradient(-45deg, rgba(245, 158, 11, .12) 0 6px, rgba(245, 158, 11, .06) 6px 12px);
  outline: 1px dashed rgba(245, 158, 11, .7);
  border-radius: 4px;
  padding: 0 4px;
  color: inherit;
}

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px;
  border-radius: 999px;
  font-weight: 500; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  cursor: pointer; white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px var(--accent); }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--meadow); color: var(--teal);
  font-size: 13px; font-weight: 700; letter-spacing: 0;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 15px; color: var(--ink-2);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--ink); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  cursor: pointer; transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

@media (max-width: 720px) {
  .menu-btn { display: grid; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 12px; font-size: 17px; border-radius: 10px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 80px); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -68px 0 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(760px 380px at 85% 10%, color-mix(in srgb, var(--sky) 80%, transparent), transparent 72%),
    radial-gradient(500px 260px at 10% 0%, color-mix(in srgb, var(--meadow) 45%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.status-pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); margin: 22px 0 22px; letter-spacing: -0.035em; }
/* Highlighted phrase: a Spring Meadow marker stroke behind the words */
.hero h1 .grad {
  background: linear-gradient(transparent 58%, var(--highlight) 58%, var(--highlight) 94%, transparent 94%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 .06em;
}
.hero-intro { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 560px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 36px; font-size: 14px; color: var(--ink-3); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 15px; height: 15px; }

.hub { width: 100%; max-width: 520px; margin-left: auto; }
.hub .wire { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }
.hub .wire-flow { stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-dasharray: 4 10; stroke-linecap: round; animation: dash 1.6s linear infinite; opacity: .8; }
.hub .ring { fill: none; stroke: var(--line); stroke-dasharray: 2 6; }
.hub .node-bg { fill: var(--surface); stroke: var(--line); }
.hub .node-label { fill: var(--ink); font: 600 14px var(--font); }
.hub .node-sub { fill: var(--ink-3); font: 500 11.5px var(--font-mono); letter-spacing: .02em; }
.hub .core-bg { fill: var(--ink); }
.hub .core-label { fill: var(--bg); font: 600 15px var(--font-display); }
.hub .core-sub { fill: var(--bg); opacity: .6; font: 500 11px var(--font-mono); letter-spacing: .06em; }
@keyframes dash { to { stroke-dashoffset: -28; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hub { margin: 8px auto 0; max-width: 460px; }
}

/* ---------- Branch cards (two disciplines) ---------- */
.branches { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.branch-card {
  position: relative; display: flex; flex-direction: column;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  min-height: 340px; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.branch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.branch-card .num { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.branch-card h3 { font-size: clamp(26px, 3vw, 34px); margin: 18px 0 12px; }
.branch-card p { color: var(--ink-2); max-width: 420px; }
.branch-card .go { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 24px; }
.branch-card .go-arrow {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); transition: transform .3s ease;
}
.branch-card:hover .go-arrow { transform: translateX(4px); }
.branch-card .go-arrow svg { width: 18px; height: 18px; }
.branch-art { position: absolute; right: 16px; top: 16px; width: 150px; opacity: .9; pointer-events: none; z-index: 0; }
.branch-card > :not(.branch-art) { position: relative; z-index: 1; }
.branch-card h3 { max-width: calc(100% - 150px); }
@media (max-width: 860px) { .branches { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .branch-art { width: 96px; opacity: .6; } .branch-card h3 { max-width: none; } .branch-card .num { display: block; max-width: calc(100% - 100px); } }

/* ---------- Automation list ---------- */
.a-list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.a-row + .a-row { border-top: 1px solid var(--line); }
.a-row a {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 22px;
  transition: background .15s;
}
.a-row a:hover { background: var(--surface-2); }
.a-row-text { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 6px 24px; align-items: baseline; }
.a-row-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: var(--ink); }
.a-row-sum { font-size: 15px; color: var(--ink-2); }
.a-row-go { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); transition: all .2s; }
.a-row-go svg { width: 16px; height: 16px; }
.a-row a:hover .a-row-go { background: var(--ink); color: var(--bg); transform: translateX(2px); }
@media (max-width: 720px) {
  .a-row a { padding: 16px; gap: 12px; }
  .a-row-text { grid-template-columns: 1fr; }
}

/* ---------- Main project cards ---------- */
.m-list { display: grid; gap: 20px; }
.m-card {
  display: block;
  border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow .3s ease, border-color .3s ease, transform .3s ease;
}
a.m-card:hover, .m-suite > summary:hover { border-color: var(--line-strong); }
a.m-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.m-suite > summary { list-style: none; cursor: pointer; }
.m-suite > summary::-webkit-details-marker { display: none; }
.m-card > summary, a.m-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); align-items: stretch; }
.m-text { display: flex; flex-direction: column; padding: clamp(24px, 4vw, 40px); }
.m-text h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 12px 0 12px; }
.m-text p { color: var(--ink-2); max-width: 560px; margin: 0 0 24px; }
.m-go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--accent); }
.m-go svg { width: 16px; height: 16px; transition: transform .2s; }
a.m-card:hover .m-go svg { transform: translateX(3px); }
.m-chev { display: inline-flex; transform: rotate(90deg); transition: transform .25s; }
.m-suite[open] .m-chev { transform: rotate(-90deg); }
.m-open { display: none; }
.m-suite[open] .m-open { display: inline; }
.m-suite[open] .m-closed { display: none; }
.m-thumb {
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: #f4f4f4; border-left: 1px solid var(--line);
  min-height: 220px;
}
.m-thumb img { max-width: 100%; max-height: 240px; object-fit: contain; }
/* Result cards: headline figure, and a real screenshot of what the user sees */
.m-stat { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 14px; font-size: 15px; color: var(--ink-2); }
.m-stat strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3vw, 34px); letter-spacing: -.03em; line-height: 1; color: var(--accent-2); }
.m-thumb-ui { position: relative; padding: 0; overflow: hidden; background: var(--surface-2); }
/* Pinned so the panel fills the card's height rather than setting it */
.m-thumb-ui img { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); width: 260px; max-width: calc(100% - 56px); max-height: none; border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 0; background: #fff;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }

/* Results-first automation page */
.a-tools { margin-top: 24px; }
.a-tools .chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; margin-right: 6px; }
.a-demo { display: flex; align-items: flex-start; justify-content: center; gap: clamp(16px, 3vw, 36px); flex-wrap: wrap; }
.a-demo-panel { margin: 0; flex: 0 1 420px; display: flex; flex-direction: column; gap: 14px; }
.a-demo-panel figcaption { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.a-demo-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 14px; }
.a-demo-frame { padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; display: flex; justify-content: center; }
.a-demo-frame img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.a-demo-arrow { align-self: flex-start; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); color: var(--accent-2); margin-top: 170px; }
.a-demo-arrow svg { width: 20px; height: 20px; }
@media (max-width: 860px) { .a-demo-arrow { transform: rotate(90deg); margin-top: 0; align-self: center; } .a-demo { flex-direction: column; align-items: center; } .a-demo-panel { flex-basis: auto; width: 100%; max-width: 420px; } }
.a-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; counter-reset: none; }
.a-steps li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.a-steps strong { color: var(--ink); font-size: 15px; line-height: 1.3; }
.a-step-n { font: 600 12px var(--font-mono); color: var(--accent-2); }
.m-drop { padding: 0 clamp(20px, 4vw, 40px) clamp(24px, 4vw, 40px); border-top: 1px solid var(--line); padding-top: clamp(24px, 4vw, 40px); }
.m-drop .sub-label { margin-top: 4px; }
@media (max-width: 860px) {
  .m-card > summary, a.m-card { grid-template-columns: 1fr; }
  .m-thumb { border-left: 0; border-top: 1px solid var(--line); min-height: 0; order: -1; border-top: 0; border-bottom: 1px solid var(--line); }
  .m-thumb img { max-height: 180px; }
  .m-thumb-ui { min-height: 220px; }
  .m-thumb-ui img { max-height: none; }
}

/* ---------- Case study header ---------- */
.detail-intro { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.detail-intro .lede { margin-bottom: 0; }
.modules { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.modules .sub-label { margin-bottom: 12px; }
.modules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.modules li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.modules .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
@media (max-width: 760px) { .detail-intro { grid-template-columns: 1fr; } }

.build { display: grid; gap: 0; margin-top: clamp(28px, 4vw, 40px); }
.build .frame-desktop .frame-view img { max-height: 560px; }
.build .handoff { margin: 8px 0 8px 18px; }
.hub-note { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: 14px; color: var(--ink-3); }
.hub-note svg { width: 16px; height: 16px; color: #16a34a; flex-shrink: 0; }
.hub-note a { color: var(--accent); }

/* ---------- Page header ---------- */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 48px); position: relative; }
.page-head::before {
  content: ""; position: absolute; inset: -68px 0 0 0; z-index: -1; pointer-events: none;
  background: radial-gradient(760px 320px at 80% 0%, color-mix(in srgb, var(--sky) 75%, transparent), transparent 72%);
}
.page-head h1 { font-size: clamp(38px, 5.6vw, 64px); margin: 16px 0 18px; letter-spacing: -.035em; }
.page-head .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 680px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-3); transition: color .15s; }
.crumb:hover { color: var(--ink); }
.crumb svg { width: 15px; height: 15px; }

.sub-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }

/* ---------- Detail page ---------- */
.detail-head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 40px); position: relative; }
.detail-head::before {
  content: ""; position: absolute; inset: -68px 0 0 0; z-index: -1; pointer-events: none;
  background: radial-gradient(760px 320px at 85% 0%, color-mix(in srgb, var(--sky) 75%, transparent), transparent 72%);
}
.detail-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 22px; }
.detail-head h1 { font-size: clamp(38px, 5.8vw, 66px); letter-spacing: -.035em; margin-bottom: 18px; }
.detail-head .lede { font-size: clamp(18px, 1.8vw, 21px); color: var(--ink-2); max-width: 720px; margin-bottom: 26px; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.metric {
  padding: 22px 22px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.metric:first-child { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.metric:first-child .metric-label { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.metric-value { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -.03em; line-height: 1; }
.metric-label { font-size: 14px; color: var(--ink-2); margin-top: 10px; line-height: 1.45; }

.detail-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-bottom: clamp(64px, 8vw, 112px); }
.toc { position: sticky; top: 96px; align-self: start; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 7px 0 7px 16px; margin-left: -1px;
  font-size: 14px; color: var(--ink-3); border-left: 2px solid transparent; transition: all .15s;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--accent); font-weight: 500; }
@media (max-width: 960px) { .detail-body { grid-template-columns: 1fr; } .toc { display: none; } }

.block { scroll-margin-top: 96px; padding-top: 8px; }
.block + .block { margin-top: clamp(48px, 6vw, 72px); }
.block-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.block-num {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font: 600 13px var(--font-mono); background: var(--accent-soft); color: var(--accent);
}
.block-head h2 { font-size: clamp(24px, 2.6vw, 30px); }
.prose { font-size: 17px; color: var(--ink-2); max-width: 720px; }
.prose p { margin-bottom: 1.1em; }
.prose ul { margin: 0 0 1.2em; padding: 0; list-style: none; display: grid; gap: 10px; }
.prose li { position: relative; padding-left: 28px; color: var(--ink); }
.prose li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 16px; height: 10px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) scale(.7); transform-origin: left top;
}
.callout {
  display: flex; gap: 14px; padding: 18px 20px; margin-top: 20px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  font-size: 15px; color: var(--ink-2); max-width: 720px;
}
.callout strong { color: var(--ink); display: block; margin-bottom: 2px; font-weight: 600; }
.callout-ic { flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.callout-ic svg { width: 17px; height: 17px; }

/* ---------- Flow diagram ---------- */
.diagram {
  margin-top: 28px;
  padding: clamp(18px, 3vw, 32px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 18px 18px,
    var(--surface-2);
}
.diagram-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.diagram-title { font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.legend .chip { height: 24px; font-size: 12px; padding: 0 9px; background: var(--surface); }

.flow { list-style: none; margin: 0; padding: 0; }
.flow > li + li::before {
  content: ""; display: block; width: 2px; height: 22px; margin-left: 30px;
  background-image: linear-gradient(180deg, var(--line-strong) 50%, transparent 0);
  background-size: 2px 6px;
  animation: flowdash 1.2s linear infinite;
}
@keyframes flowdash { to { background-position: 0 12px; } }
.node {
  display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start;
  padding: 12px 14px 12px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  max-width: 560px;
  transition: border-color .2s, transform .2s;
}
a.node:hover { border-color: var(--accent); transform: translateX(2px); }
.node-ic {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
}
.node-ic svg { width: 18px; height: 18px; }
.node-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; font-family: var(--font-mono); color: var(--ink-3); margin-bottom: 1px; }
.node-meta .app { color: var(--c); font-weight: 500; }
.node-title { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ink); }
.node-text { font-size: 14px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.node-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--accent); margin-top: 4px; font-weight: 500; }
.node-link svg { width: 13px; height: 13px; }

.flow-group {
  border: 1.5px dashed var(--line-strong); border-radius: 16px;
  padding: 14px 12px 12px;
  background: color-mix(in srgb, var(--surface) 50%, transparent);
  position: relative;
}
.group-label {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 12px var(--font-mono); color: var(--accent);
  padding: 3px 10px; border-radius: 999px; background: var(--accent-soft);
  margin-bottom: 12px;
}
.group-label svg { width: 13px; height: 13px; }
.flow-group > .flow > li + li::before { margin-left: 30px; }

.branch-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; position: relative; }
.branch-col { padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.branch-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.branch-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.branch-col.good .branch-label::before { background: var(--good); }
.branch-col.bad .branch-label::before { background: var(--bad); }
.branch-col.good { border-color: color-mix(in srgb, var(--good) 30%, var(--line)); }
.branch-col.bad { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.router-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px;
  font: 500 12px var(--font-mono); color: var(--ink-3);
}
.router-tag svg { width: 14px; height: 14px; }
.branch-col .node { padding: 10px 12px 10px 10px; grid-template-columns: 34px 1fr; gap: 12px; }
.branch-col .node-ic { width: 34px; height: 34px; }
.branch-col .flow > li + li::before { margin-left: 26px; }

.edges { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.edges .callout { margin-top: 0; max-width: none; }

/* ---------- Screenshots ---------- */
.shots { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.shots.has-desktop { grid-template-columns: 1fr; }
.shots-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.shots-phones { display: flex; flex-wrap: wrap; gap: 20px; }
@media (max-width: 720px) { .shots-split { grid-template-columns: 1fr; } }

.shot { margin: 0; }
.shot figcaption { font-size: 14px; color: var(--ink-3); margin-top: 12px; }
.frame-desktop {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.frame-bar { display: flex; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.frame-desktop .frame-view { aspect-ratio: 16 / 9; }
.frame-phone {
  width: 100%; max-width: 260px;
  border-radius: 34px; padding: 10px;
  background: var(--ink); box-shadow: var(--shadow-lg);
}
.frame-phone .frame-view { aspect-ratio: 9 / 19; border-radius: 26px; overflow: hidden; background: var(--surface-2); }
.frame-view { position: relative; }
.frame-view img { width: 100%; height: 100%; object-fit: cover; object-position: top; cursor: zoom-in; }
/* Desktop screenshots keep their natural shape; the 16:9 box is only for empty placeholders. */
.frame-desktop .frame-view { aspect-ratio: auto; background: #f4f4f4; display: flex; justify-content: center; }
.frame-desktop .frame-view img { width: auto; height: auto; max-width: 100%; max-height: 640px; object-fit: contain; }
.shot.is-missing .frame-desktop .frame-view { aspect-ratio: 16 / 9; }

.handoff {
  display: flex; align-items: center; gap: 8px;
  margin: -4px 0 -4px 18px; padding: 6px 0 6px 18px;
  border-left: 2px dashed var(--line-strong);
  font: 500 12px var(--font-mono); color: var(--ink-3);
}
.handoff svg { width: 14px; height: 14px; color: var(--accent); transform: rotate(90deg); }

.hub-block {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 48px); align-items: center;
  padding: clamp(20px, 3vw, 32px); margin-bottom: 40px;
  border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--line);
}
.hub-block h3 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 14px; }
.hub-block .prose { font-size: 15px; }
@media (max-width: 860px) { .hub-block { grid-template-columns: 1fr; } }

.placeholder {
  display: none; position: absolute; inset: 0;
  flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  padding: 20px;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--accent) 4%, transparent) 10px 20px), var(--surface-2);
  border: 2px dashed color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--ink-2); font-size: 14px; line-height: 1.45;
}
.frame-phone .placeholder { border-radius: 26px; font-size: 13px; padding: 16px; }
.placeholder svg { width: 26px; height: 26px; color: var(--accent); }
.placeholder strong { color: var(--ink); font-size: 13px; font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.placeholder code { font: 12px var(--font-mono); color: var(--accent); background: var(--surface); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line); word-break: break-all; }
.shot.is-missing img { display: none; }
.shot.is-missing .placeholder { display: flex; }
.shot.is-missing.hide-missing { display: none; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 24px;
  background: rgba(8, 8, 10, .86); backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }

/* ---------- App explorer (clickable cover) ---------- */
.explorer-hint {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font: 500 13px var(--font-mono); color: var(--ink-2);
}
.explorer-hint svg { width: 15px; height: 15px; color: var(--accent-2); }
.explorer-view { background: #f4f4f4; display: flex; justify-content: center; }
.explorer-stage { position: relative; line-height: 0; }
.explorer-stage img { display: block; max-width: 100%; max-height: 680px; width: auto; height: auto; }
.hotspot {
  position: absolute; padding: 0; cursor: pointer;
  border: 2px solid var(--accent-2); border-radius: 10px;
  background: color-mix(in srgb, var(--sky) 18%, transparent);
  transition: background .15s, box-shadow .15s;
  animation: hotspot-pulse 2.4s ease-in-out infinite;
}
.hotspot:hover, .hotspot:focus-visible {
  background: color-mix(in srgb, var(--meadow) 30%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 30%, transparent);
  outline: none; animation: none;
}
.hotspot-pin {
  display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #204654; color: #caffa6; font: 600 12px/1 var(--font-mono);
}
.hotspot > .hotspot-pin { position: absolute; top: -11px; left: -11px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.hotspot-tag {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  white-space: nowrap; padding: 5px 10px; border-radius: 8px;
  background: #204654; color: #f7f9e1; font: 500 12px/1.2 var(--font);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.hotspot:hover .hotspot-tag, .hotspot:focus-visible .hotspot-tag { opacity: 1; }
@keyframes hotspot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 35%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-2) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .hotspot { animation: none; } }
@media (max-width: 640px) { .hotspot > .hotspot-pin { width: 18px; height: 18px; top: -9px; left: -9px; font-size: 10px; } }

.explorer-keys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.explorer-key {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 500 14px var(--font);
}
.explorer-key:hover { border-color: var(--accent-2); }

.feature-modal {
  position: fixed; inset: 0; z-index: 90;
  display: none; align-items: center; justify-content: center; padding: 16px;
  background: rgba(8, 20, 26, .6); backdrop-filter: blur(4px);
}
.feature-modal.open { display: flex; }
.feature-modal-card {
  width: min(960px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: clamp(18px, 3vw, 32px); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  outline: none;
}
.feature-modal-head { display: flex; justify-content: space-between; align-items: center; }
.fm-close { border: 0; background: none; color: var(--ink-2); cursor: pointer; padding: 6px; border-radius: 8px; }
.fm-close:hover { background: var(--surface-2); }
.fm-close svg { width: 20px; height: 20px; display: block; }
.feature-modal-card h3 { font-size: clamp(22px, 3vw, 28px); margin: 6px 0 10px; }
.feature-modal-card > p { color: var(--ink-2); margin: 0 0 20px; max-width: 68ch; }
.fm-slide { position: relative; }
.fm-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow); cursor: pointer;
}
.fm-arrow svg { width: 20px; height: 20px; }
.fm-arrow:hover:not(:disabled) { border-color: var(--accent-2); color: var(--accent-2); }
.fm-arrow:disabled { opacity: .35; cursor: default; }
.fm-prev { left: -14px; }
.fm-next { right: -14px; }
.fm-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.fm-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--line-strong); cursor: pointer; }
.fm-dot.on { background: var(--accent-2); width: 22px; border-radius: 5px; }

/* ---------- Pager ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 32px 0 0; border-top: 1px solid var(--line); margin-top: clamp(56px, 7vw, 88px); }
.pager a {
  display: block; padding: 20px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, transform .2s;
}
.pager a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pager small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); font-family: var(--font-mono); }
.pager small svg { width: 14px; height: 14px; }
.pager strong { display: block; margin-top: 6px; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.pager .next { text-align: right; }
.pager .next small { justify-content: flex-end; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } .pager .next small { justify-content: flex-start; } }

/* ---------- Projects ---------- */
.p-list { display: grid; gap: 20px; }
.p-card {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface);
  overflow: hidden; transition: transform .3s, box-shadow .3s, border-color .3s;
}
.p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.p-card-body { padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; }
.p-card-body h3 { font-size: clamp(26px, 3vw, 34px); margin: 14px 0 12px; }
.p-card-body p { color: var(--ink-2); }
.p-card-media { background: var(--surface-2); border-left: 1px solid var(--line); padding: clamp(20px, 3vw, 32px); display: flex; align-items: center; }
.p-card-media .shot { width: 100%; }
.p-card .go { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
.status.live::before { background: var(--good); }
@media (max-width: 860px) { .p-card { grid-template-columns: 1fr; } .p-card-media { border-left: 0; border-top: 1px solid var(--line); } }

.demo-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  margin-top: 28px;
}
.demo-banner p { margin: 0; color: var(--ink); font-size: 15px; display: flex; gap: 10px; align-items: center; }
.demo-banner p svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

.features { display: grid; gap: clamp(40px, 6vw, 72px); }
.feature { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.feature:nth-child(even) .feature-text { order: 2; }
.feature-text h3 { font-size: 22px; margin: 10px 0 10px; }
.feature-text p { color: var(--ink-2); margin: 0; }
.feature-n { font: 500 13px var(--font-mono); color: var(--accent); }
.feature.no-image { grid-template-columns: 1fr; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature:nth-child(even) .feature-text { order: 0; } }

.arch { display: grid; gap: 0; max-width: 720px; }
.arch-layer {
  display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center;
  padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
}
.arch-layer + .arch-layer { margin-top: 26px; position: relative; }
.arch-layer + .arch-layer::before {
  content: ""; position: absolute; left: 50%; top: -26px; height: 26px; width: 2px;
  background-image: linear-gradient(180deg, var(--line-strong) 50%, transparent 0); background-size: 2px 6px;
}
.arch-name { font: 500 13px var(--font-mono); color: var(--accent); }
@media (max-width: 560px) { .arch-layer { grid-template-columns: 1fr; gap: 8px; } }

.stack { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-groups { display: grid; gap: 10px; }
.stack-group { display: grid; grid-template-columns: 136px minmax(0, 1fr); align-items: start; gap: 6px 12px; }
.stack-label { font: 600 11.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); line-height: 28px; }
.stack-group .chip:not(.chip-lang) { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.p-card .stack-group { grid-template-columns: 1fr; }
.p-card .stack-label { line-height: 1.4; }
.p-card .stack-groups { gap: 14px; }
.chip-lang { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
@media (max-width: 560px) { .stack-group { grid-template-columns: 1fr; } }

/* ---------- Showcase layout (Kite) ---------- */
.sc-intro { font-size: 16px; color: var(--ink-2); max-width: 720px; margin-bottom: 26px; }
.sc-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; }
.sc-section { scroll-margin-top: 72px; }
.sc-section .section-head { max-width: 760px; margin-bottom: clamp(24px, 3.5vw, 36px); }

.tour { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: start; }
/* Module list: its own panel, matching the screenshot panel beside it. */
.tour-nav {
  position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px; padding: 14px;
  border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.tour-group {
  font: 600 12.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2);
  margin: 14px 0 4px; padding: 14px 12px 0; border-top: 1px solid var(--line);
}
.tour-group:first-child { margin-top: 0; padding-top: 4px; border-top: 0; }
.tour-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: none;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.tour-tab:hover { background: var(--surface-2); }
.tour-tab[aria-selected="true"] { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-sm); }
.tour-tab[aria-selected="true"] .tour-tab-users { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.tour-tab-title { font-weight: 600; font-size: 16.5px; line-height: 1.3; }
.tour-tab-users { font-size: 13.5px; color: var(--ink-2); }

.tour-stage {
  min-width: 0; padding: clamp(18px, 2.6vw, 28px);
  border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.tour [hidden] { display: none !important; }
.tour-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 28px; margin-bottom: 20px; }
.tour-copy h3 { font-size: clamp(22px, 2.4vw, 28px); margin: 8px 0 8px; }
.tour-copy p { color: var(--ink-2); margin: 0; }
.tour-users { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--font-mono); letter-spacing: .04em; color: var(--accent-2); }
.tour-users svg { width: 14px; height: 14px; }
.tour-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: center; font-size: 14.5px; }
.tour-points li { position: relative; padding-left: 22px; line-height: 1.45; }
.tour-points li::before {
  content: ""; position: absolute; left: 2px; top: .35em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg) scale(.8);
}
.tour-media .frame-desktop .frame-view img { max-height: 580px; }
.tour-media .frame-desktop .frame-view img[src$=".svg"] { width: 100%; background: #fff; }
.tour-media .shot figcaption { text-align: center; }
.tour-thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 2px; }
.tour-media .tour-thumbs { justify-content: center; }
.tour-thumb {
  flex: 0 0 auto; width: 132px; padding: 0; border-radius: 9px; overflow: hidden; position: relative;
  border: 2px solid var(--line); background: #f4f4f4; cursor: pointer; opacity: .6; transition: opacity .15s, border-color .15s;
}
.tour-thumb img { width: 100%; height: 70px; object-fit: cover; object-position: top left; }
.tour-thumb span { position: absolute; right: 5px; bottom: 4px; font: 500 10.5px var(--font-mono); padding: 1px 5px; border-radius: 5px; background: rgba(0,0,0,.6); color: #fff; }
.tour-thumb:hover { opacity: 1; }
.tour-thumb[aria-pressed="true"] { opacity: 1; border-color: var(--accent-2); }

@media (max-width: 960px) {
  .tour { grid-template-columns: 1fr; }
  .tour-nav { position: static; max-height: none; flex-direction: row; overflow-x: auto; gap: 6px; padding: 8px; border-radius: var(--radius); scrollbar-width: thin; }
  .tour-group { display: none; }
  .tour-tab { width: auto; flex: 0 0 auto; border-color: var(--line); }
  .tour-tab-users { display: none; }
  .tour-tab-title { font-size: 15px; white-space: nowrap; }
}
@media (max-width: 680px) { .tour-copy { grid-template-columns: 1fr; } }

.ppi { display: grid; gap: 16px; }
.ppi-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ppi-step {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; font-size: 14.5px; font-weight: 500; line-height: 1.4;
  border-radius: var(--radius); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.ppi-step span { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--font-mono); background: var(--ink); color: var(--bg); }
.ppi-table { border-radius: var(--radius-lg); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow); overflow: hidden; }
.ppi-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 13px clamp(16px, 2.4vw, 24px); }
.ppi-row + .ppi-row { border-top: 1px solid var(--line); }
.ppi-headrow { font: 500 11.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-top: 12px; padding-bottom: 10px; }
.ppi-name { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.ppi-name .dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.ppi-formula { font: 13px var(--font-mono); color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 4px 8px; justify-self: start; }
.ppi-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.ppi-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ppi-track span { display: block; height: 100%; border-radius: 4px; background: var(--c); }
.ppi-bar strong { font: 600 15px var(--font-display); text-align: right; }
.ppi-bar small { grid-column: 1 / -1; font: 12px var(--font-mono); color: var(--ink-3); margin-top: 3px; }
@media (max-width: 760px) {
  .ppi-steps { grid-template-columns: 1fr; }
  .ppi-headrow { display: none; }
  .ppi-row { grid-template-columns: 1fr; gap: 8px; }
}

.sc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sc-card { padding: clamp(20px, 2.6vw, 28px); border-radius: var(--radius-lg); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); }
.sc-card h3 { font-size: 20px; margin: 8px 0 10px; }
.sc-card p { color: var(--ink-2); font-size: 15px; margin: 0; }
.sc-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); margin-bottom: clamp(40px, 6vw, 64px); }
.sc-split .arch-layer { grid-template-columns: 110px minmax(0, 1fr); }
.sc-split .chip { white-space: normal; height: auto; min-height: 28px; padding-top: 3px; padding-bottom: 3px; }
@media (max-width: 760px) { .sc-cards, .sc-split { grid-template-columns: 1fr; } }
.sec-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .sec-cards { grid-template-columns: 1fr; } }
.sec-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--accent-2); }
.sec-ic svg { width: 20px; height: 20px; }
.sec-cards .sc-card { display: flex; flex-direction: column; }
.sec-ctrl { margin-top: auto; padding-top: 14px; font: 500 12px var(--font-mono); letter-spacing: .02em; color: var(--accent-2); }

/* Before/after bars inside a tour module */
.tour-compare { grid-column: 1 / -1; display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.tc-head { margin: 0 0 2px; font-size: 14.5px; color: var(--ink-2); }
.tc-head strong { font-size: 20px; color: var(--ink); margin-right: 4px; }
.tc-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px; align-items: center; gap: 14px; font-size: 14px; }
.tc-label { color: var(--ink-2); }
.tc-track { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.tc-track span { display: block; height: 100%; border-radius: inherit; background: var(--ink-2); }
.tc-after .tc-track span { background: var(--accent-2); }
.tc-value { font: 600 13.5px var(--font-mono); text-align: right; color: var(--ink); }
@media (max-width: 560px) { .tc-row { grid-template-columns: 1fr auto; } .tc-track { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Toolkit ---------- */
.toolkit { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tool-col { padding: clamp(24px, 3vw, 32px); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.tool-col h3 { font-size: 20px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.tool-col h3 svg { width: 20px; height: 20px; color: var(--accent); }
@media (max-width: 760px) { .toolkit { grid-template-columns: 1fr; } }

/* ---------- About / contact ---------- */
.about { display: grid; grid-template-columns: 280px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about .shot { max-width: 280px; }
.about .frame-view { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; }
.about .frame-plain { border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); }
.about .placeholder { border-radius: var(--radius-lg); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about .shot { max-width: 200px; } }

.cta {
  text-align: center; padding: clamp(48px, 8vw, 96px) var(--gutter);
  border-radius: var(--radius-lg);
  background: var(--teal); color: var(--mist);
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(500px 240px at 20% 0%, color-mix(in srgb, var(--sky) 40%, transparent), transparent 70%),
    radial-gradient(400px 220px at 90% 100%, color-mix(in srgb, var(--meadow) 30%, transparent), transparent 70%);
  opacity: .5;
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -.035em; margin: 0 auto 16px; max-width: 760px; }
.cta p { color: color-mix(in srgb, var(--mist) 75%, transparent); font-size: 18px; max-width: 520px; margin: 0 auto 32px; }
.cta .btn-primary { background: var(--meadow); color: var(--teal); }
.cta .btn-ghost { background: transparent; color: var(--mist); border-color: color-mix(in srgb, var(--mist) 35%, transparent); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; margin-top: clamp(64px, 8vw, 112px); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Empty / 404 ---------- */
.empty { text-align: center; padding: 120px 0; }
.empty h1 { font-size: 40px; margin-bottom: 14px; }

/* ---------- Reveal on scroll ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .toc, .pager, .lightbox { display: none !important; }
  body { background: #fff; }
}

/* ---------- Gradient page tweaks ---------- */
.band-sky .m-card { border-color: color-mix(in srgb, var(--teal) 12%, transparent); }
.site-footer { border-top-color: color-mix(in srgb, var(--teal) 10%, transparent); }
.m-card, .branch-card, .tool-col, .a-list, .modules, .pager a, .callout { background: color-mix(in srgb, var(--surface) 82%, transparent); }

/* ---------- Suite page: phone screens and before/after ---------- */
.tour-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14.5px; font-weight: 500; color: var(--accent); }
.tour-more svg { width: 15px; height: 15px; }
.wa-stepper { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: clamp(20px, 3vw, 40px); align-items: start; margin-top: 4px; }
.wa-steps-col { display: flex; flex-direction: column; gap: 14px; }
.wa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wa-step { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15.5px; font-weight: 500; text-align: left; line-height: 1.4; cursor: pointer; transition: background .15s, border-color .15s; }
.wa-step:hover { border-color: var(--line-strong); }
.wa-step[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.wa-step[aria-pressed="true"] .a-demo-n { background: var(--bg); color: var(--ink); }
.wa-step .a-demo-n { flex-shrink: 0; }
.wa-next { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.wa-next svg { width: 15px; height: 15px; }
.wa-screen { padding: 7px; border-radius: 26px; background: #111; border-color: #111; }
.wa-screen img { border-radius: 19px; max-height: 660px; object-fit: cover; object-position: top; }
.wa-screen.is-small { background: #efeae2; border-color: #d9d3c9; padding: 36px 20px; min-height: 300px; align-items: center; }
.wa-screen.is-small img { width: auto; max-width: 100%; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
@media (max-width: 760px) { .wa-stepper { grid-template-columns: 1fr; } .wa-screens { max-width: 380px; width: 100%; margin-inline: auto; } }
.wa-ba .a-demo-frame { padding: 0; overflow: hidden; }
.wa-ba .a-demo-panel { flex-basis: 440px; }
.wa-ba .a-demo-arrow { margin-top: 220px; }
.m-thumb-photo { padding: 0; overflow: hidden; }
.m-thumb-photo img { width: 100%; height: 100%; max-height: none; object-fit: cover; }

/* "How it's built": expandable engineering detail inside a tour part */
.tour-build { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tour-build > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; }
.tour-build > summary::-webkit-details-marker { display: none; }
.tour-build > summary > svg { width: 20px; height: 20px; color: var(--accent-2); flex-shrink: 0; }
.tour-build > summary strong { display: block; font-size: 16px; }
.tour-build > summary small { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.tour-build-chev { margin-left: auto; display: inline-flex; transform: rotate(90deg); transition: transform .2s; color: var(--ink-2); }
.tour-build-chev svg { width: 18px; height: 18px; }
.tour-build[open] .tour-build-chev { transform: rotate(-90deg); }
.tour-build-body { padding: 4px 18px 20px; border-top: 1px solid var(--line); }
.tour-build-body .sub-label { margin: 18px 0 8px; }
.tour-build-why { margin: 0; color: var(--ink-2); max-width: 720px; }
.tour-build-body .a-steps { margin-top: 0; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.tour-build-body .edges { margin-top: 14px; }
.tour-build-scen { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
