/* =============================================================================
   AiTenderBid marketing site. Shared stylesheet.
   Design language inherited from aiserva.com (light theme, ONE accent, DM Sans
   display + Inter body + JetBrains Mono figures, radius scale 12/16/24, soft
   tinted shadows, motion via transitions + IntersectionObserver only).
   AiTenderBid identity: burnt "site-safety" orange accent on steel-navy ink.
   No sticky or fixed chrome anywhere (owner rule): the header scrolls away.
   ============================================================================= */
:root {
  color-scheme: light;
  --accent: #c2410c;        /* text-safe orange (AA on white) */
  --accent-fill: #ea580c;   /* fills, bars, icons */
  --accent-deep: #9a3412;
  --accent-tint: #fff4ec;
  --ink: #0f1b2d;           /* steel navy */
  --ink-2: #1e2b40;
  --muted: #4e5a6b;
  --line: #e3e7ee;
  --canvas: #f6f8fb;
  --panel: #eef2f7;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
  --r-chip: 12px; --r-card: 16px; --r-panel: 24px;
  --shadow-soft: 0 1px 2px rgba(15,27,45,.05), 0 8px 24px -12px rgba(15,27,45,.14);
  --shadow-lift: 0 4px 10px rgba(15,27,45,.06), 0 28px 56px -24px rgba(15,27,45,.24);
  --ease: cubic-bezier(.16,1,.3,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.6 'Inter', ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: 'DM Sans', 'Inter', sans-serif; margin: 0; color: var(--ink); font-weight: 800; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); letter-spacing: -.035em; line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: -.028em; line-height: 1.08; }
h3 { font-size: 1.2rem; letter-spacing: -.015em; line-height: 1.25; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.em { color: var(--accent); }
.muted { color: var(--muted); }
.lede { font-size: 1.125rem; color: var(--muted); line-height: 1.65; max-width: 62ch; }
.small { font-size: .875rem; }
.eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 999px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
section { padding: 88px 0; }
@media (max-width: 768px) { section { padding: 60px 0; } }
.sec-tint { background: var(--canvas); }
.sec-head { max-width: 760px; margin-bottom: 44px; }
.sec-head p { margin-top: 14px; }
.stack > * + * { margin-top: 12px; }

/* Grid helpers (collapse to one column under 768px unless stated) */
.g { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 960px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } .split { grid-template-columns: 1fr; gap: 36px; } .split.rev > :first-child { order: 0; } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* Buttons: full-pill, one primary style, one ghost style */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(194,65,12,.55); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #c9d1dd; transform: translateY(-1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { color: var(--accent); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.mi { font-family: 'Material Icons Outlined'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; display: inline-block; text-transform: none; letter-spacing: normal; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; }

/* Header: normal flow, scrolls away with the page */
.site-head { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 5; }
.site-head > .wrap { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: 'DM Sans', sans-serif; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(160deg, #f97316, #9a3412); display: grid; place-items: center; color: #fff; }
.brand-mark .mi { font-size: 20px; }
.brand b { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 2px; font-size: .92rem; font-weight: 600; color: var(--muted); }
.nav > .dd > button, .nav > a { background: none; border: 0; font: inherit; color: inherit; padding: 9px 13px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.nav > .dd > button:hover, .nav > a:hover, .nav > .dd.open > button { background: var(--panel); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.dd { position: relative; }
.dd-panel { position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%) translateY(6px); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .25s var(--ease); background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-lift); padding: 8px; display: grid; grid-template-columns: repeat(2, 270px); gap: 2px; }
.dd-panel.one { grid-template-columns: 290px; }
.dd.open .dd-panel { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.dd-panel a { display: flex; gap: 12px; padding: 11px; border-radius: var(--r-chip); text-decoration: none; }
.dd-panel a:hover { background: var(--canvas); }
.dd-panel strong { display: block; font-size: .9rem; color: var(--ink); }
.dd-panel span.d { display: block; font-size: .78rem; color: var(--muted); font-weight: 500; margin-top: 2px; line-height: 1.4; }
.ichip { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); }
.ichip.lg { width: 48px; height: 48px; flex-basis: 48px; border-radius: 14px; }
.ichip.lg .mi { font-size: 26px; }
.head-cta { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; }
@media (max-width: 1100px) {
  .nav, .head-cta .btn-ghost { display: none; }
  .menu-btn { display: inline-flex; width: 46px; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: #fff; align-items: center; justify-content: center; cursor: pointer; }
}
@media (max-width: 420px) { .head-cta .btn-primary { display: none; } }
.mnav { display: none; border-bottom: 1px solid var(--line); background: #fff; padding: 8px 0 24px; }
.mnav.open { display: block; }
.mnav h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 6px; }
.mnav a { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 600; }
.mnav .btn-row { margin-top: 18px; }

/* Breadcrumb */
.crumbs { font-size: .8rem; color: var(--muted); padding-top: 22px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: #9aa4b2; }

/* Hero */
.hero { padding: 56px 0 72px; position: relative; overflow: hidden; }
@media (min-width: 961px) { .hero .split { grid-template-columns: 1fr 1.08fr; } }
.hero .lede { margin: 20px 0 30px; }
.bg-grid::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgba(15,27,45,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(15,27,45,.05) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(70% 60% at 30% 0%, #000 25%, transparent 100%); mask-image: radial-gradient(70% 60% at 30% 0%, #000 25%, transparent 100%); }
.hero-media { position: relative; }
.photo { border-radius: var(--r-panel); overflow: hidden; box-shadow: var(--shadow-lift); border: 1px solid var(--line); background: var(--panel); }
.photo img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.photo.tall img { aspect-ratio: 4/5; }
.float-card { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-lift); padding: 14px 16px; font-size: .82rem; min-width: 210px; }
.float-card .k { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.35rem; color: var(--ink); }
.float-card.a { right: -14px; bottom: 22px; }
.float-card.b { left: -22px; top: 26px; }
@media (max-width: 960px) { .float-card.a { right: 10px; } .float-card.b { left: 10px; } }
@media (max-width: 520px) { .float-card { display: none; } }
.page-hero { padding: 40px 0 64px; }
.page-hero h1 { max-width: 20ch; }

/* Stat band */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid var(--line); border-radius: var(--r-panel); background: #fff; }
.stats > div { padding: 26px 24px; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats .n { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 2rem; letter-spacing: -.03em; color: var(--ink); }
.stats .n small { font-size: 1rem; color: var(--accent); }
.stats p { margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } .stats > div:nth-child(3) { border-left: 0; } .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px; box-shadow: var(--shadow-soft); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; }
a.card { text-decoration: none; display: block; }
a.card:hover, .card.hov:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #d3dae5; }
.card h3 { margin: 16px 0 8px; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.card .more { margin-top: 16px; }
.card-img { padding: 0; overflow: hidden; }
.card-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-img .in { padding: 22px 24px 26px; }
.card-img .in h3 { margin-top: 0; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 20px; }
.bento > * { grid-column: span 2; }
.bento .w3 { grid-column: span 3; } .bento .w4 { grid-column: span 4; } .bento .w6 { grid-column: span 6; }
.bento .ink { background: var(--ink); color: #dfe6f0; border-color: var(--ink); }
.bento .ink h3 { color: #fff; } .bento .ink p { color: #b8c3d3; }
.bento .ink .ichip { background: rgba(234,88,12,.18); color: #fdba74; }
.bento .tint { background: var(--accent-tint); border-color: #fde0cc; }
.bento .photo-cell { padding: 0; overflow: hidden; position: relative; min-height: 260px; }
.bento .photo-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .bento { grid-template-columns: 1fr 1fr; } .bento > *, .bento .w3, .bento .w4, .bento .w6 { grid-column: span 1; } .bento .w4, .bento .w6 { grid-column: span 2; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .bento > *, .bento .w4, .bento .w6 { grid-column: span 1; } }

/* Feature list with checks */
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li::before { content: 'check_circle'; font-family: 'Material Icons Outlined'; font-size: 20px; color: var(--accent-fill); line-height: 1.3; -webkit-font-smoothing: antialiased; }
.checks.two { grid-template-columns: 1fr 1fr; column-gap: 28px; }
@media (max-width: 640px) { .checks.two { grid-template-columns: 1fr; } }

/* Pipeline steps (horizontal scroll-snap on small screens) */
.flow { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0,1fr)); gap: 14px; counter-reset: f; }
.flow > div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; position: relative; }
.flow .ichip { margin-bottom: 12px; }
.flow h4 { font-size: .95rem; }
.flow p { font-size: .84rem; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 1000px) { .flow { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding-bottom: 8px; } .flow > div { scroll-snap-align: start; } }

/* Tables (semantic, LLM-readable) */
.tbl-wrap { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 13px 16px; vertical-align: top; }
thead th { background: var(--canvas); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); }
tbody tr + tr td { border-top: 1px solid var(--line); }
td.num, th.num { text-align: right; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
caption { caption-side: bottom; text-align: left; padding: 12px 16px; font-size: .8rem; color: var(--muted); }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--panel); color: var(--ink-2); }
.pill.o { background: var(--accent-tint); color: var(--accent-deep); }
.pill.g { background: #e9f7ef; color: var(--ok); }
.pill.r { background: #fdecec; color: var(--bad); }
.pill.y { background: #fef6e3; color: var(--warn); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; padding: 0 22px; }
.faq details + details { margin-top: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: 'add'; font-family: 'Material Icons Outlined'; font-size: 22px; color: var(--accent); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 20px; color: var(--muted); }

/* CTA band */
.cta-band { border-radius: var(--r-panel); background: var(--ink); color: #dfe6f0; padding: 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #b8c3d3; margin-top: 12px; }
.cta-band::after { content: ''; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(234,88,12,.35), transparent 65%); pointer-events: none; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; padding: 36px 24px; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--canvas); padding: 64px 0 48px; margin-top: 40px; font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 28px; }
.site-foot h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-foot a { text-decoration: none; color: var(--ink-2); } .site-foot a:hover { color: var(--accent); }
.foot-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .82rem; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: span 2; } }

/* ===== Software UI frame (real product screen, rebuilt in HTML for the walkthrough) ===== */
.app { border: 1px solid #d6dce6; border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-lift); overflow: hidden; font-size: 13px; }
.app-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--canvas); border-bottom: 1px solid var(--line); }
.app-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d4dae3; }
.app-bar .t { margin-left: 10px; font-weight: 600; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-body { display: grid; grid-template-columns: 170px 1fr; min-height: 400px; }
.app-side { border-right: 1px solid var(--line); padding: 12px 8px; background: #fbfcfd; }
.app-side div { padding: 7px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 8px; transition: background .3s, color .3s; }
.app-side div .mi { font-size: 16px; }
.app-side div.on { background: var(--accent-tint); color: var(--accent-deep); }
.app-main { padding: 16px 18px; position: relative; min-width: 0; }
@media (max-width: 640px) { .app-body { grid-template-columns: 1fr; } .app-side { display: flex; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); gap: 4px; } .app-side div { white-space: nowrap; } }

/* Walkthrough player */
.wt { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.wt-steps { display: grid; gap: 6px; }
.wt-steps button { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--r-chip); padding: 12px 14px; font: inherit; cursor: pointer; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; transition: border-color .2s, background .2s, transform .2s var(--ease); position: relative; overflow: hidden; }
.wt-steps button:hover { border-color: #cdd5e1; }
.wt-steps button[aria-selected="true"] { border-color: var(--accent-fill); background: var(--accent-tint); }
.wt-steps .no { width: 28px; height: 28px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 800; font-size: .8rem; font-family: 'JetBrains Mono', monospace; }
.wt-steps button[aria-selected="true"] .no { background: var(--accent); color: #fff; }
.wt-steps strong { font-size: .9rem; display: block; }
.wt-steps span.d { font-size: .78rem; color: var(--muted); display: block; line-height: 1.35; }
.wt-steps .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent-fill); width: 0; }
.wt-steps button[aria-selected="true"] .bar { animation: wtbar var(--dur, 7s) linear forwards; }
.wt.paused .wt-steps .bar { animation-play-state: paused; }
@keyframes wtbar { to { width: 100%; } }
.wt-ctrl { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.wt-ctrl button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.wt-screen { min-width: 0; }
.wt-cap { margin-top: 14px; color: var(--muted); font-size: .92rem; min-height: 3em; }
.js .scr:not(.on) { pointer-events: none; }
.js .scr.on { animation: scrIn .55s var(--ease); }
@keyframes scrIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.js .scr .rv { opacity: 0; transform: translateY(6px); }
.scr.on .rv { animation: rv .5s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 140ms + 200ms); }
@keyframes rv { to { opacity: 1; transform: none; } }
@media (max-width: 960px) { .wt { grid-template-columns: 1fr; } .wt-steps { grid-auto-flow: column; grid-auto-columns: 220px; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; } }

/* Mini UI atoms used inside .app */
.ui-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ui-h b { font-size: 14px; font-family: 'DM Sans', sans-serif; }
.ui-row { display: grid; grid-template-columns: var(--cols, 1fr auto); gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; align-items: center; background: #fff; }
.ui-row + .ui-row { margin-top: 6px; }
.ui-row .s { color: var(--muted); font-size: 11.5px; }
.ui-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.ui-kpis div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ui-kpis b { display: block; font-family: 'JetBrains Mono', monospace; font-size: 16px; }
.ui-kpis span { font-size: 11px; color: var(--muted); }
@media (max-width: 640px) { .ui-kpis { grid-template-columns: 1fr 1fr; } }
.ui-bar { height: 8px; border-radius: 99px; background: var(--accent-fill); transform-origin: left; }
.scr.on .ui-bar { animation: grow 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 120ms + 300ms); }
@keyframes grow { from { transform: scaleX(0); } }
.ui-ai { border: 1px dashed #f3b48c; background: var(--accent-tint); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; display: flex; gap: 8px; }
.ui-ai .mi { color: var(--accent); font-size: 18px; }
.typing::after { content: ''; display: inline-block; width: 7px; height: 13px; background: var(--accent-fill); margin-left: 2px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.kanban > div { background: var(--canvas); border-radius: 10px; padding: 8px; min-height: 180px; }
.kanban h5 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 11.5px; margin-bottom: 6px; }
.kcard b { display: block; font-size: 12px; }
@media (max-width: 640px) { .kanban { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; overflow-y: hidden; } }
.gantt { display: grid; gap: 6px; }
.gantt .r { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: center; font-size: 11.5px; }
.gantt .t { position: relative; height: 16px; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--line) calc(10% - 1px) 10%); border-radius: 4px; }
.gantt .t span { position: absolute; top: 2px; height: 12px; border-radius: 4px; background: #94a3b8; }
.gantt .t span.c { background: var(--accent-fill); }
.scr.on .gantt .t span { animation: grow .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 300ms); }

/* Interactive calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.calc label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.calc .field + .field { margin-top: 20px; }
.calc input[type=range] { width: 100%; accent-color: var(--accent-fill); }
.calc output { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--accent); }
.calc .res { background: var(--ink); color: #dfe6f0; border-radius: var(--r-panel); padding: 28px; }
.calc .res .big { font-family: 'JetBrains Mono', monospace; font-size: 2.6rem; font-weight: 700; color: #fff; letter-spacing: -.03em; }
.calc .res dl { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; margin: 22px 0 0; font-size: .92rem; }
.calc .res dd { margin: 0; font-family: 'JetBrains Mono', monospace; color: #fff; text-align: right; }
.calc .res dt { color: #b8c3d3; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }

/* Tabs (horizontal strip: overflow-y hidden stated explicitly) */
.tabs { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; margin-bottom: 22px; }
.tabs button { flex: 0 0 auto; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabpanel[hidden] { display: none; }

/* Glossary */
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.gloss dt { font-weight: 800; font-family: 'DM Sans', sans-serif; }
.gloss > div { border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; background: #fff; }
.gloss dd { margin: 6px 0 0; color: var(--muted); font-size: .93rem; }
@media (max-width: 760px) { .gloss { grid-template-columns: 1fr; } }

/* Contact form */
.form { display: grid; gap: 18px; }
.form label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9d1dd; border-radius: var(--r-chip); padding: 12px 14px; min-height: 48px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid rgba(234,88,12,.25); border-color: var(--accent-fill); }
.form .help { font-size: .82rem; color: var(--muted); margin-top: 6px; }

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .scr .rv { opacity: 1; transform: none; }
}
.mt0 { margin-top: 0; } .mt1 { margin-top: 12px; } .mt2 { margin-top: 24px; } .mt3 { margin-top: 40px; }
.center { text-align: center; }
.note { font-size: .82rem; color: var(--muted); }
.app td:first-child, .app th:first-child { white-space: nowrap; }
.wt.compact { grid-template-columns: 1fr; gap: 16px; }
.wt.compact .wt-steps { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow-x: auto; overflow-y: hidden; }
.wt.compact .wt-ctrl { display: none; }
.wt.compact .app-body { grid-template-columns: 1fr; }
.wt.compact .app-side { display: none; }
/* Grid children may shrink below their content (stops wide strips forcing page overflow) */
.wt > *, .split > *, .g > *, .bento > *, .calc > *, .cta-band > * { min-width: 0; }
.vlist { display: grid; gap: 10px; }
.vlist > div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; }
.vlist h4 { font-size: .95rem; } .vlist p { font-size: .88rem; color: var(--muted); margin: 4px 0 0; }
.role-row { gap: 28px; align-items: start; } @media (min-width: 961px) { .role-row { grid-template-columns: .8fr 1.2fr; } }
/* Walkthrough v2: AI status line, typed search, source grid, stacked value bar */
.app-bar .t { flex: 0 1 auto; }
.ai-status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 60%; font-size: 11.5px; font-weight: 600; color: var(--accent-deep); background: var(--accent-tint); border: 1px solid #fde0cc; border-radius: 999px; padding: 4px 10px; }
.ai-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spin { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; border: 2px solid #fdba74; border-top-color: var(--accent-fill); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wt.paused .spin { animation-play-state: paused; }
@media (max-width: 640px) { .ai-status { max-width: 100%; } .app-bar { flex-wrap: wrap; } .app-bar .t { display: none; } }
.ui-search { display: flex; align-items: center; gap: 8px; border: 1px solid #c9d1dd; border-radius: 999px; padding: 8px 14px; margin-bottom: 10px; min-height: 38px; font-size: 12.5px; }
.ui-search .mi { color: var(--accent); font-size: 18px; }
.typing-q::after { content: ''; display: inline-block; width: 6px; height: 13px; background: var(--accent-fill); margin-left: 2px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.src-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.src { display: flex; align-items: center; gap: 6px; font-size: 11.5px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fbfcfd; }
.src .mi { font-size: 15px; color: var(--ok); }
.src b { margin-left: auto; font-family: 'JetBrains Mono', monospace; }
@media (max-width: 640px) { .src-grid { grid-template-columns: 1fr; } }
.stack-bar { display: flex; gap: 3px; height: 14px; }
.stack-bar .ui-bar { height: 14px; border-radius: 4px; }
/* Long step lists scroll inside their own column on desktop (the active step is followed by JS) */
@media (min-width: 961px) { .wt:not(.compact) .wt-steps { max-height: 600px; overflow-y: auto; overflow-x: hidden; padding-right: 4px; overscroll-behavior: contain; } }
/* Nav stays on one line: labels never wrap; switch to the menu button before space runs out */
.nav > .dd > button, .nav > a { white-space: nowrap; padding: 9px 11px; }
@media (max-width: 1240px) {
  .nav, .head-cta .btn-ghost { display: none; }
  .menu-btn { display: inline-flex; width: 46px; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: #fff; align-items: center; justify-content: center; cursor: pointer; }
}

/* Walkthrough: every screen shares one grid cell, so the window keeps the height of the tallest screen (no jump) */
.wt-screen .app-main { display: grid; align-content: start; }
.wt-screen .scr { display: block; grid-area: 1 / 1; }
.js .wt-screen .scr { visibility: hidden; }
.js .wt-screen .scr.on { visibility: visible; }
/* Compact players keep a Pause/Play control (WCAG 2.2.2); only prev/next are hidden */
.wt.compact .wt-ctrl { display: flex; margin-top: 0; }
.wt.compact .wt-ctrl [data-act="prev"], .wt.compact .wt-ctrl [data-act="next"] { display: none; }
/* Steps inside a card read as a vertical list */
.card .flow { grid-template-columns: 1fr; grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; gap: 10px; }
.card .flow > div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 14px; }
.card .flow > div .ichip { margin-bottom: 0; grid-row: span 2; }
.form select { min-height: 52px; }
/* Hero stats sit BELOW the photo, never over it */
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.hero-stats .float-card { position: static; min-width: 0; box-shadow: var(--shadow-soft); }
@media (max-width: 520px) { .hero-stats .float-card { display: block; } }

.mnav .wrap { display: block; height: auto; }
/* Step caption keeps its space so the page below never shifts between steps */
.wt .wt-cap { min-height: calc(3 * 1.6em); }

/* Without JavaScript every walkthrough screen is shown as a readable stacked list */
html:not(.js) .wt-screen .app-main { display: block; }
html:not(.js) .wt-screen .scr + .scr { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
html:not(.js) .wt-ctrl, html:not(.js) .ai-status { display: none; }
/* Heading levels: footer and menu group labels are h2, step titles are h3, styled as before */
.foot-h, .mnav-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.mnav-h { margin: 18px 0 6px; }
.h4, h3.h4, h2.h4 { font-size: 1rem; font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.flow h3.h4 { font-size: .95rem; } .vlist h3.h4 { font-size: .95rem; }
/* Pill text contrast >= 4.5:1 (WCAG AA) */
.pill { color: #3f4856; }
.pill.o { color: #9a3412; }
.pill.g { color: #166534; }
.pill.y { color: #92400e; }
.pill.r { color: #991b1b; }
/* Keyboard-scrollable regions show focus */
.tbl-wrap:focus-visible, .flow:focus-visible, .wt-steps:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 2px; }
