/* =========================================================================
   ANLAIZ — main stylesheet
   Principle: copper marks what is live, flowing or selected. Everything
   static is graphite (dark) or paper (light).
   ========================================================================= */

:root {
  /* Runtime (dark) palette */
  --bg: #131416;
  --bg-deep: #0F1011;
  --surface: #18191C;
  --surface-2: #1E2023;
  --surface-3: #272A2E;
  --rule: rgba(236, 234, 229, 0.08);
  --rule-2: rgba(236, 234, 229, 0.14);
  --rule-3: rgba(236, 234, 229, 0.24);
  --text: #ECEAE5;
  --text-2: #A8A59F;
  --text-3: #8A8782;
  --copper: #C27C4A;
  --copper-text: #DB9C6C;
  --copper-soft: rgba(194, 124, 74, 0.14);
  --copper-line: rgba(194, 124, 74, 0.55);
  --on-copper: #1A0F07;
  --steel: #4F8CC9;
  --ok: #72B78F;
  --ok-soft: rgba(114, 183, 143, 0.12);
  --warn: #DDAA4E;
  --warn-soft: rgba(221, 170, 78, 0.12);
  --bad: #E2766A;
  --paper-doc: #F2F1ED;

  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 64px;

  /* Radius by hierarchy, not one radius everywhere */
  --r-window: 14px;
  --r-panel: 10px;
  --r-control: 8px;
  --r-tight: 6px;

  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --shadow-window: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 12px 24px -12px rgba(0, 0, 0, 0.5);
}

/* Reading (paper) palette — documentation mode */
.theme-paper {
  --bg: #E7E6E2;
  --bg-deep: #DEDDD8;
  --surface: #F3F2EF;
  --surface-2: #FBFAF8;
  --surface-3: #E4E3DF;
  --rule: rgba(22, 23, 26, 0.10);
  --rule-2: rgba(22, 23, 26, 0.16);
  --rule-3: rgba(22, 23, 26, 0.28);
  --text: #16171A;
  --text-2: #4A4B4F;
  --text-3: #6B6B6E;
  --copper: #A45F2E;
  --copper-text: #8C4C1F;
  --copper-soft: rgba(164, 95, 46, 0.10);
  --copper-line: rgba(164, 95, 46, 0.5);
  --on-copper: #FFF8F2;
  --steel: #2F6A9E;
  --ok: #2E7A51;
  --ok-soft: rgba(46, 122, 81, 0.10);
  --warn: #93640E;
  --warn-soft: rgba(147, 100, 14, 0.10);
  --bad: #B0443A;
  --shadow-window: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 24px 60px -24px rgba(30, 28, 24, 0.28), 0 6px 14px -8px rgba(30, 28, 24, 0.18);
  color: var(--text);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-stretch: 100%;
  font-weight: 400;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--copper); color: var(--on-copper); }

:focus-visible { outline: 2px solid var(--copper-text); outline-offset: 2px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wordmark { color: var(--text); }
.wordmark-node { fill: var(--copper); }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 14px; border-radius: var(--r-control);
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px;
  transform: translateY(-160%); transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(96px, 12vw, 168px); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head h2 {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.02;
  font-weight: 500;
  font-stretch: 108%;
  letter-spacing: -0.038em;
  text-wrap: balance;
}
.section-head p { color: var(--text-2); font-size: 17px; max-width: 46ch; text-wrap: pretty; }

/* --------------------------------------------------------------- buttons */
.btn {
  --btn-h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--btn-h); padding: 0 20px;
  border-radius: var(--r-control);
  font-size: 15px; font-weight: 550; letter-spacing: -0.005em; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { --btn-h: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border-color: var(--rule-3); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-2); background: rgba(236, 234, 229, 0.04); }
.btn-copper { background: var(--copper); color: var(--on-copper); }
.btn-copper:hover { background: var(--copper-text); box-shadow: 0 0 0 4px var(--copper-soft); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { background: #000; }
.btn-quiet { color: var(--text-2); }
.btn-quiet:hover { color: var(--text); background: var(--surface-3); }

.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: var(--r-tight); color: var(--text-2);
  transition: background-color 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.link-btn { color: inherit; font-size: inherit; }
.link-btn:hover { color: var(--text); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--copper-text); font-weight: 550; font-size: 15px;
  text-decoration: underline; text-decoration-color: var(--copper-line); text-underline-offset: 5px; text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s;
}
.text-link:hover { text-decoration-color: currentColor; }

.chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border: 1px solid var(--rule-2); border-radius: 999px;
  font-size: 13.5px; color: var(--text-2);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.chip:hover { border-color: var(--copper-line); color: var(--text); background: var(--copper-soft); }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border: 1px solid var(--rule-2); border-radius: 5px;
  font-size: 11.5px; color: var(--text-3); white-space: nowrap;
}

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 2px; flex: none; }
.status-dev::before { background: var(--copper); }
.status-planned::before { border: 1.5px solid var(--text-3); }
.status-live::before { background: var(--ok); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
}
/* The glass lives on a pseudo-element: a backdrop-filter on the header itself would
   become the containing block for the fixed mobile menu and collapse it. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  transition: background-color 0.3s var(--ease);
}
.site-header.is-scrolled, .site-header.is-menu-open { border-bottom-color: var(--rule); }
.site-header.is-scrolled::before, .site-header.is-menu-open::before {
  background: rgba(19, 20, 22, 0.78);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
}
.site-header.theme-paper.is-scrolled::before, .site-header.theme-paper.is-menu-open::before { background: rgba(231, 230, 226, 0.84); }
.site-header .nav-toggle-bars i { background: var(--text); }
.header-inner {
  max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter);
  height: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.brand { justify-self: start; display: inline-flex; padding: 6px 0; }
.brand .wordmark { height: 17px; width: auto; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }

.primary-nav { position: relative; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-trigger, .nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  height: 36px; padding: 0 12px; border-radius: var(--r-control);
  font-size: 14px; color: var(--text-2); font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}
.nav-trigger:hover, .nav-link:hover, .nav-trigger[aria-expanded="true"] { color: var(--text); background: var(--surface-3); }
.site-header, .site-header .wordmark, .nav-trigger, .nav-link { transition: color 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease); }
.ico-chev { width: 14px; height: 14px; opacity: 0.7; transition: transform 0.3s var(--ease); }
.nav-trigger[aria-expanded="true"] .ico-chev { transform: rotate(180deg); }

/* Mega menu: one panel that morphs between menus */
.mega { position: absolute; top: calc(100% + 14px); left: 0; width: 0; height: 0; }
.mega-panel {
  position: absolute; top: 0; left: 0;
  width: 400px; height: 200px;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-window);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(0.985);
  transform-origin: 50% 0;
  transition: opacity 0.22s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.mega.is-open .mega-panel {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.22s var(--ease), transform 0.3s var(--ease), width 0.38s var(--ease), height 0.38s var(--ease), left 0.38s var(--ease), visibility 0s;
}
.mega-section {
  position: absolute; top: 0; left: 0;
  padding: 10px;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.mega-section.is-active { opacity: 1; pointer-events: auto; visibility: visible; transform: none; transition: opacity 0.28s var(--ease) 0.06s, transform 0.38s var(--ease), visibility 0s; }
.mega-section.from-left { transform: translateX(-28px); }
.mega-section.from-right { transform: translateX(28px); }
.mega-cols { display: grid; grid-template-columns: repeat(2, 260px); gap: 2px; }
.mega-item { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r-panel); transition: background-color 0.2s; }
.mega-item:hover, .mega-item:focus-visible { background: var(--surface-2); }
.mega-title { font-size: 14.5px; font-weight: 550; color: var(--text); }
.mega-desc { font-size: 13px; line-height: 1.45; color: var(--text-2); }
.mega-index { display: grid; grid-template-columns: repeat(2, 200px); gap: 2px; }
.mega-index a { display: block; padding: 10px 14px; border-radius: var(--r-control); font-size: 14px; color: var(--text-2); transition: background-color 0.2s, color 0.2s; }
.mega-index a:hover { background: var(--surface-2); color: var(--text); }
.mega-products { display: grid; width: 340px; gap: 2px; }
.mega-products a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border-radius: var(--r-control); transition: background-color 0.2s; }
.mega-products a:hover { background: var(--surface-2); }
.mega-foot { display: block; margin: 6px 4px 2px; padding: 12px 10px 6px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--copper-text); font-weight: 550; }
.mega-foot:hover { color: var(--text); }

/* Mobile nav */
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: var(--r-control); place-items: center; }
.nav-toggle:hover { background: var(--surface-3); }
.nav-toggle-bars { position: relative; width: 18px; height: 10px; }
.nav-toggle-bars i { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), top 0.3s var(--ease); }
.nav-toggle-bars i:first-child { top: 0; }
.nav-toggle-bars i:last-child { top: 8.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child { top: 4.25px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child { top: 4.25px; transform: rotate(-45deg); }

.mobile-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: var(--bg);
  padding: 12px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  overflow-y: auto;
  animation: mnav-in 0.35s var(--ease);
}
@keyframes mnav-in { from { opacity: 0; transform: translateY(-8px); } }
.m-group { border-bottom: 1px solid var(--rule); }
.m-group summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; font-size: 22px; font-weight: 500; font-stretch: 106%; letter-spacing: -0.02em; cursor: pointer;
}
.m-group summary::-webkit-details-marker { display: none; }
.m-group summary .ico { transition: transform 0.3s var(--ease); color: var(--text-3); }
.m-group[open] summary .ico { transform: rotate(180deg); }
.m-group ul { padding: 0 0 14px; display: grid; gap: 2px; }
.m-group ul a { display: block; padding: 9px 0; color: var(--text-2); font-size: 16px; }
.m-link { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 22px; font-weight: 500; font-stretch: 106%; letter-spacing: -0.02em; }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(56px, 9vw, 120px));
  padding-bottom: clamp(24px, 3vw, 40px);
  isolation: isolate;
}
.hero::before {
  /* blueprint grid, faded toward the edges */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(236, 234, 229, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(236, 234, 229, 0.045) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 20%, transparent 75%);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 32px 64px; align-items: end;
}
.hero-title {
  font-size: clamp(54px, 8.6vw, 128px);
  line-height: 0.92;
  font-weight: 500;
  font-stretch: 104%;
  letter-spacing: -0.052em;
  margin-left: -0.05em;
}
.hero-side { padding-bottom: 0.6em; }
.lede { font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 40ch; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ----------------------------------------------------- window primitives */
.win-bar {
  display: flex; align-items: center; gap: 14px;
  height: 46px; padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--rule-2); }
.win-title { font-weight: 550; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-sub { margin-left: 10px; color: var(--text-3); font-weight: 400; font-family: var(--mono); font-size: 12px; }
.win-tools { display: flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------- hero: console */
.console {
  position: relative;
  margin-top: clamp(48px, 6vw, 80px);
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-window);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  --mx: 50%; --my: 0%;
}
.console::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(236, 234, 229, 0.045), transparent 70%);
  opacity: 0; transition: opacity 0.4s;
}
.console:hover::after { opacity: 1; }
.console-body { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 470px; }
.console-hint { margin-top: 14px; font-size: 13.5px; color: var(--text-3); }

.queue { border-right: 1px solid var(--rule); display: flex; flex-direction: column; background: var(--bg-deep); }
.queue-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.queue-count { font-family: var(--mono); font-size: 11.5px; padding: 1px 7px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); }
.queue-list { flex: 1; padding: 0 8px; display: grid; align-content: start; gap: 2px; }
.q-item {
  width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 10px 8px; border-radius: var(--r-control); text-align: left;
  border: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s;
}
.q-item:hover { background: var(--surface-2); }
.q-item.is-current { background: var(--surface-2); border-color: var(--rule-2); }
.q-ico { width: 28px; height: 28px; border-radius: var(--r-tight); display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.q-item.is-current .q-ico { color: var(--copper-text); background: var(--copper-soft); }
.q-title { display: block; font-size: 13px; font-weight: 550; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.q-state { font-family: var(--mono); font-size: 11px; }
.q-state.is-ok { color: var(--ok); }
.q-state.is-warn { color: var(--warn); }
.q-state.is-run { color: var(--copper-text); }
.queue-foot { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--text-3); }
.queue-foot strong { font-family: var(--mono); font-weight: 500; color: var(--text); font-size: 13px; }

.console-main { padding: 22px 22px 16px; display: flex; flex-direction: column; min-width: 0; }

.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px; }
.pipe-step { position: relative; min-width: 0; }
.stage {
  width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px;
  align-items: center; text-align: left;
  padding: 11px 12px; border-radius: var(--r-panel);
  background: var(--surface-2); border: 1px solid var(--rule);
  transition: border-color 0.35s var(--ease), background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.25s var(--ease);
}
.stage:hover { border-color: var(--rule-3); }
.stage-ico {
  grid-row: span 2; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--r-tight); border: 1px solid var(--rule-2); color: var(--text-3);
  transition: color 0.35s, border-color 0.35s, background-color 0.35s;
}
.stage-name { font-size: 13px; font-weight: 550; color: var(--text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-status { font-family: var(--mono); font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.stage.is-active { border-color: var(--copper-line); box-shadow: 0 0 0 4px var(--copper-soft); }
.stage.is-active .stage-ico { color: var(--copper-text); border-color: var(--copper-line); background: var(--copper-soft); }
.stage.is-active .stage-status { color: var(--copper-text); }
.stage.is-done .stage-ico { color: var(--text); border-color: var(--rule-3); }
.stage.is-done .stage-status { color: var(--text-2); }
.stage.is-flag .stage-ico { color: var(--warn); border-color: rgba(221, 170, 78, 0.5); background: var(--warn-soft); }
.stage.is-flag .stage-status { color: var(--warn); }
.stage[aria-pressed="true"] { background: var(--surface-3); border-color: var(--text-3); }

.trace { position: absolute; top: 50%; left: 100%; width: 26px; height: 2px; margin-top: -1px; background: var(--rule-2); overflow: hidden; }
.trace i { position: absolute; inset: 0; background: var(--copper); transform: scaleX(0); transform-origin: left; }
.trace.is-flowing i { animation: trace-flow 0.6s var(--ease-io) forwards; }
.trace.is-done i { transform: scaleX(1); opacity: 0.55; }
@keyframes trace-flow { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }

.inspector {
  position: relative; flex: 1;
  margin-top: 18px; border: 1px solid var(--rule); border-radius: var(--r-panel);
  background: var(--bg-deep);
  display: flex; flex-direction: column; min-height: 262px; overflow: hidden;
}
.insp-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); font-size: 13px; }
.insp-stage { font-weight: 600; }
.insp-file { color: var(--text-3); font-family: var(--mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.insp-follow { font-size: 12px; color: var(--copper-text); padding: 3px 8px; border-radius: 5px; }
.insp-follow:hover { background: var(--copper-soft); }
.insp-body { padding: 16px; flex: 1; }
.insp-body.is-enter { animation: insp-in 0.45s var(--ease); }
@keyframes insp-in { from { opacity: 0; transform: translateY(6px); } }
.insp-working { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; font-family: var(--mono); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 550; white-space: nowrap;
  border: 1px solid var(--rule-2); color: var(--text-2);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.is-run { color: var(--copper-text); border-color: var(--copper-line); background: var(--copper-soft); }
.pill.is-run::before { animation: blink 1.1s steps(2, start) infinite; }
.pill.is-ok { color: var(--ok); border-color: rgba(114, 183, 143, 0.4); background: var(--ok-soft); }
.pill.is-warn { color: var(--warn); border-color: rgba(221, 170, 78, 0.45); background: var(--warn-soft); }
.pill.is-idle { color: var(--text-3); }
.theme-paper .pill.is-ok { border-color: rgba(46, 122, 81, 0.35); }
.theme-paper .pill.is-warn { border-color: rgba(147, 100, 14, 0.35); }
@keyframes blink { to { opacity: 0.25; } }

.spin { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--rule-3); border-top-color: var(--copper); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* key/value + field tables used across demos */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 28px; font-size: 13px; }
.kv dt, .kv dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.kv dt { color: var(--text-3); }
.kv dd { font-family: var(--mono); font-size: 12.5px; color: var(--text); min-width: 0; overflow-wrap: anywhere; }

.fields { display: grid; }
.f-row {
  display: grid; grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.4fr) 96px; gap: 16px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 13px;
}
.f-row.is-enter { animation: row-in 0.4s var(--ease) both; }
@keyframes row-in { from { opacity: 0; transform: translateX(-6px); } }
.f-label { color: var(--text-3); }
.f-value { color: var(--text); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conf { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-2); }
.conf-bar { height: 3px; border-radius: 2px; background: var(--rule-2); overflow: hidden; }
.conf-bar i { display: block; height: 100%; background: var(--text-2); border-radius: 2px; transform-origin: left; animation: grow 0.6s var(--ease) both; }
.conf.is-low { color: var(--warn); }
.conf.is-low .conf-bar i { background: var(--warn); }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
.s-row.is-enter, .act.is-enter { animation: row-in 0.4s var(--ease) both; }
.console.is-paused *, .console.is-paused *::before, .console.is-paused *::after { animation-play-state: paused !important; }

.steps-list { display: grid; gap: 2px; }
.s-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; font-size: 13.5px; color: var(--text-2); border-bottom: 1px solid var(--rule); }
.s-row .ico { margin-top: 3px; color: var(--ok); }
.s-row.is-warn .ico { color: var(--warn); }
.s-row.is-warn { color: var(--text); }
.s-row.is-pending { color: var(--text-3); }
.s-row.is-pending .ico { color: var(--text-3); }

.out-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.record {
  font-family: var(--mono); font-size: 12px; line-height: 1.75;
  padding: 12px 14px; border-radius: var(--r-control); border: 1px solid var(--rule); background: var(--surface);
  color: var(--text-2); overflow: hidden;
}
.record b { font-weight: 400; color: var(--text-3); }
.record em { font-style: normal; color: var(--text); }
.record-head { display: block; color: var(--copper-text); margin-bottom: 4px; }
.acts { display: grid; gap: 8px; align-content: start; }
.act { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-control); background: var(--surface); border: 1px solid var(--rule); font-size: 13px; }
.act .ico { color: var(--ok); }
.act.is-warn .ico { color: var(--warn); }

.console-log {
  margin-top: 12px; height: 54px; overflow: hidden;
  font-family: var(--mono); font-size: 11.5px; line-height: 18px; color: var(--text-3);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.console-log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: log-in 0.3s var(--ease); }
.console-log div:last-child { color: var(--text-2); }
.console-log span { color: var(--copper-text); }
@keyframes log-in { from { opacity: 0; transform: translateY(4px); } }

/* --------------------------------------------------------- capabilities */
.cap-tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule-2);
}
.cap-tab {
  position: relative; display: grid; gap: 6px; align-content: start;
  padding: 22px 24px 22px 0; text-align: left;
}
.cap-tab::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 24px; height: 2px;
  background: var(--copper); transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.cap-tab[aria-selected="true"]::before { transform: scaleX(1); }
.cap-tab-name { font-size: 18px; font-weight: 550; letter-spacing: -0.015em; color: var(--text-3); transition: color 0.25s; }
.cap-tab-line { font-size: 14px; line-height: 1.45; color: var(--text-3); transition: color 0.25s; max-width: 30ch; }
.cap-tab:hover .cap-tab-name { color: var(--text-2); }
.cap-tab[aria-selected="true"] .cap-tab-name { color: var(--text); }
.cap-tab[aria-selected="true"] .cap-tab-line { color: var(--text-2); }

.cap-panels { margin-top: 32px; }
.cap-panel { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.cap-panel.is-entering .cap-demo { animation: panel-in 0.55s var(--ease) both; }
.cap-panel.is-entering .cap-copy { animation: panel-in 0.55s var(--ease) 0.08s both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }
.cap-copy { padding-top: 8px; }
.cap-copy h3 { font-size: 28px; line-height: 1.15; font-weight: 550; font-stretch: 106%; letter-spacing: -0.025em; }
.cap-copy > p { margin-top: 14px; color: var(--text-2); font-size: 16px; }
.offer-list { margin: 28px 0 28px; border-top: 1px solid var(--rule); }
.offer-list li { position: relative; padding: 10px 0 10px 18px; border-bottom: 1px solid var(--rule); font-size: 14.5px; color: var(--text); }
.offer-list li::before { content: ""; position: absolute; left: 0; top: 18px; width: 6px; height: 6px; border: 1px solid var(--text-3); border-radius: 1px; }

/* demo app shell */
.app {
  position: relative; background: var(--surface); border: 1px solid var(--rule-2);
  border-radius: var(--r-window); box-shadow: var(--shadow-window); overflow: hidden;
}
.app-bar { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.app-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-right: auto; }
.app-title .ico { color: var(--text-3); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-control); background: var(--bg-deep); border: 1px solid var(--rule); }
.seg button { height: 28px; padding: 0 11px; border-radius: 6px; font-size: 12.5px; color: var(--text-3); font-weight: 500; white-space: nowrap; transition: background-color 0.2s, color 0.2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
.theme-paper .seg button[aria-pressed="true"], .theme-paper .seg button[aria-selected="true"] { background: var(--surface-2); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

.mini-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: var(--r-tight); border: 1px solid var(--rule-2); font-size: 12.5px; font-weight: 550; color: var(--text);
  transition: background-color 0.2s, border-color 0.2s;
}
.mini-btn:hover { background: var(--surface-3); border-color: var(--rule-3); }
.mini-btn.is-primary { background: var(--text); color: var(--bg); border-color: transparent; }
.mini-btn.is-primary:hover { background: #fff; }
.mini-btn.is-copper { background: var(--copper); color: var(--on-copper); border-color: transparent; }
.mini-btn:disabled { opacity: 0.45; cursor: default; }

/* --- AI demo --- */
.ai-body { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); height: 624px; }
.ai-doc-pane { display: flex; flex-direction: column; gap: 18px; }
.doc-meta { margin-top: auto; }
.doc-meta .kv { font-size: 12px; }
.doc-meta .kv dt, .doc-meta .kv dd { padding: 6px 0; }
.ai-doc-pane { padding: 22px; background: var(--bg-deep); border-right: 1px solid var(--rule); position: relative; overflow: hidden; }
.doc-paper {
  background: var(--paper-doc); color: #2A2B2E; border-radius: 4px;
  padding: 22px 22px 26px; font-size: 12px; line-height: 1.7;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  transform-origin: 50% 0;
}
.doc-paper.is-enter { animation: doc-in 0.6s var(--ease) both; }
@keyframes doc-in { from { opacity: 0; transform: translateY(14px) rotate(-0.6deg); } }
.doc-paper h5 { margin: 0 0 4px; font-size: 11px; font-weight: 700; font-stretch: 112%; letter-spacing: 0.04em; color: #111; }
.doc-paper .doc-sub { font-family: var(--mono); font-size: 10px; color: #77787B; margin-bottom: 14px; }
.doc-paper p { margin: 0 0 9px; }
.doc-paper mark { background: transparent; color: inherit; border-radius: 3px; padding: 0 2px; margin: 0 -2px; box-shadow: inset 0 0 0 0 transparent; transition: background-color 0.3s, box-shadow 0.3s; }
.doc-paper mark.is-found { background: rgba(194, 124, 74, 0.16); box-shadow: inset 0 0 0 1px rgba(164, 95, 46, 0.55); }
.doc-paper mark.is-low { background: rgba(221, 170, 78, 0.22); box-shadow: inset 0 0 0 1px rgba(147, 100, 14, 0.6); }
.doc-paper mark.is-hot { background: rgba(194, 124, 74, 0.34); }
.doc-scan { position: absolute; left: 22px; right: 22px; height: 40px; top: 22px; pointer-events: none; background: linear-gradient(to bottom, transparent, rgba(194, 124, 74, 0.16) 70%, rgba(194, 124, 74, 0.7) 98%, transparent); opacity: 0; }
.doc-scan.is-on { animation: scan 1.5s var(--ease-io) both; }
@keyframes scan { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(300px); } }

.ai-side { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; overflow: hidden; }
.ai-review > span:first-child { display: flex; gap: 8px; align-items: flex-start; }
.ai-review > span:first-child .ico { margin-top: 2px; color: var(--warn); }
.phases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.phase { display: grid; gap: 6px; font-size: 11.5px; color: var(--text-3); }
.phase i { height: 2px; border-radius: 2px; background: var(--rule-2); position: relative; overflow: hidden; }
.phase i::after { content: ""; position: absolute; inset: 0; background: var(--copper); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
.phase.is-active { color: var(--copper-text); }
.phase.is-active i::after { transform: scaleX(0.55); }
.phase.is-done { color: var(--text-2); }
.phase.is-done i::after { transform: scaleX(1); opacity: 0.6; }
.ai-fields .f-row { grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.3fr) 82px; cursor: default; padding: 6px 0; }
.ai-fields .f-row:hover .f-value { color: var(--copper-text); }
.f-key { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--copper-text); opacity: 0; transform: translateY(-2px); transition: opacity 0.35s, transform 0.35s; height: 0; }
.ai-fields.is-organized .f-key { opacity: 0.85; transform: none; height: auto; }
.f-row.is-low .f-value { color: var(--warn); }
.ai-note { font-size: 13px; color: var(--text-2); padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-control); background: var(--bg-deep); animation: row-in 0.4s var(--ease) both; }
.ai-note strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 3px; font-size: 12.5px; }
.ai-review { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r-control); border: 1px solid rgba(221, 170, 78, 0.4); background: var(--warn-soft); animation: row-in 0.4s var(--ease) both; font-size: 13px; }
.ai-review-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.auto-bar { flex: 1; min-width: 60px; height: 2px; background: var(--rule-2); border-radius: 2px; overflow: hidden; }
.auto-bar i { display: block; height: 100%; background: var(--warn); transform-origin: left; transform: scaleX(0); }
.auto-bar.is-run i { animation: auto-fill 6s linear forwards; }
.auto-bar.is-paused i { animation-play-state: paused; }
@keyframes auto-fill { to { transform: scaleX(1); } }
.ai-out { animation: row-in 0.45s var(--ease) both; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ai-out .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-out .record { line-height: 1.65; }
.ai-out .record { background: var(--bg-deep); }

/* --- Automation demo --- */
.flow-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 540px; }
.flow-side { border-right: 1px solid var(--rule); padding: 14px 10px; background: var(--bg-deep); display: grid; align-content: start; gap: 2px; }
.flow-side-label { padding: 4px 8px 10px; font-size: 12px; color: var(--text-3); }
.flow-pick { display: grid; gap: 2px; padding: 10px; border-radius: var(--r-control); text-align: left; border: 1px solid transparent; transition: background-color 0.2s; }
.flow-pick:hover { background: var(--surface-2); }
.flow-pick[aria-pressed="true"] { background: var(--surface-2); border-color: var(--rule-2); }
.flow-pick b { font-size: 13px; font-weight: 550; }
.flow-pick span { font-size: 11.5px; color: var(--text-3); }
.flow-main { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.flow-trigger { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-3); }
.flow-trigger b { color: var(--text); font-weight: 550; }
.flow-steps { position: relative; display: grid; gap: 8px; }
.flow-steps::before { content: ""; position: absolute; left: 15px; top: 20px; bottom: 20px; width: 1px; background: var(--rule-2); }
.flow-progress { position: absolute; left: 15px; top: 20px; width: 1px; height: 0; background: var(--copper); transition: height 0.6s var(--ease); }
.f-step { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.f-node { width: 32px; height: 32px; border-radius: var(--r-control); background: var(--surface-2); border: 1px solid var(--rule-2); display: grid; place-items: center; color: var(--text-3); position: relative; z-index: 1; transition: all 0.3s var(--ease); }
.f-step.is-run .f-node { border-color: var(--copper-line); color: var(--copper-text); background: var(--surface-3); box-shadow: 0 0 0 4px var(--copper-soft); }
.f-step.is-done .f-node { color: var(--text); border-color: var(--rule-3); }
.f-step.is-wait .f-node { border-color: rgba(221, 170, 78, 0.55); color: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.f-step.is-skip { opacity: 0.45; }
.f-card { min-width: 0; padding: 8px 12px; border-radius: var(--r-control); border: 1px solid var(--rule); background: var(--surface); display: grid; gap: 1px; transition: border-color 0.3s; }
.f-step.is-run .f-card { border-color: var(--rule-3); }
.f-app { font-size: 10.5px; color: var(--text-3); font-family: var(--mono); font-weight: 400; padding: 0 6px; border: 1px solid var(--rule-2); border-radius: 4px; line-height: 17px; }
.f-title { font-size: 13.5px; font-weight: 550; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.f-detail { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.5em; }
.f-right { display: grid; justify-items: end; gap: 3px; min-width: 92px; }
.f-time { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.approval {
  margin: 2px 0 2px 44px; padding: 12px 14px; border-radius: var(--r-control); border: 1px solid var(--rule-2); background: var(--surface-2);
  display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px 12px; animation: row-in 0.35s var(--ease) both;
}
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.approval-msg { font-size: 13px; color: var(--text-2); }
.approval-msg b { color: var(--text); font-weight: 600; }
.approval-actions { grid-column: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.run-summary { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-control); border: 1px solid var(--rule-2); background: var(--bg-deep); font-size: 13px; animation: row-in 0.4s var(--ease) both; }
.run-summary .ico { width: 18px; height: 18px; color: var(--ok); }
.run-summary.is-warn .ico { color: var(--warn); }
.run-summary span { flex: 1; color: var(--text-2); min-width: 0; }
.run-summary b { color: var(--text); font-weight: 600; }

/* --- Data demo --- */
.data-body { padding: 16px 18px 18px; min-height: 552px; display: flex; flex-direction: column; gap: 14px; }
.d-pipe { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.d-pipe span { display: inline-flex; align-items: center; gap: 6px; }
.d-pipe span::before { content: ""; width: 7px; height: 7px; border-radius: 2px; border: 1px solid var(--rule-3); }
.d-pipe span.is-done { color: var(--text-2); }
.d-pipe span.is-done::before { background: var(--text-2); border-color: var(--text-2); }
.d-pipe span.is-active { color: var(--copper-text); }
.d-pipe span.is-active::before { background: var(--copper); border-color: var(--copper); }
.d-pipe em { width: 18px; height: 1px; background: var(--rule-2); }
.d-status { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-left: auto; }
.raw-wrap { border: 1px solid var(--rule); border-radius: var(--r-control); overflow: auto; background: var(--bg-deep); }
.raw { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.raw th { text-align: left; font-weight: 500; color: var(--text-3); padding: 9px 12px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.raw th em { display: inline-block; margin-left: 6px; font-style: normal; font-size: 10px; color: var(--copper-text); padding: 0 5px; border-radius: 4px; background: var(--copper-soft); opacity: 0; transition: opacity 0.3s; }
.raw.is-typed th em { opacity: 1; }
.raw td { padding: 7px 12px; border-bottom: 1px solid var(--rule); color: var(--text-2); white-space: nowrap; transition: color 0.3s, background-color 0.5s; }
.raw td.is-dirty { color: var(--warn); }
.raw td.is-fixed { color: var(--text); background: var(--copper-soft); }
.raw td.is-settled { background: transparent; color: var(--text); }
.raw tr.is-dupe td { text-decoration: line-through; color: var(--text-3); opacity: 0.6; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; animation: panel-in 0.5s var(--ease) both; }
.dash-top .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-control); background: var(--bg-deep); }
.kpi span { display: block; font-size: 12px; color: var(--text-3); }
.kpi b { display: block; margin-top: 2px; font-size: 22px; font-weight: 550; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 11.5px; color: var(--text-3); }
.chart-card { border: 1px solid var(--rule); border-radius: var(--r-control); background: var(--bg-deep); padding: 12px 14px 8px; position: relative; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.lg-actual { background: var(--steel); }
.lg-forecast { background: transparent; border: 1.5px dashed var(--copper); }
.legend i.lg-ref { width: 14px; height: 0; border-radius: 0; border-top: 1.5px dashed var(--text-3); }
.nw { white-space: nowrap; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--mono); font-size: 10px; fill: var(--text-3); }
.chart .grid line { stroke: var(--rule); }
.chart .bar-actual { fill: var(--steel); }
.chart .bar-forecast { fill: var(--copper-soft); stroke: var(--copper); stroke-width: 1.5; stroke-dasharray: 3 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .is-dim { opacity: 0.4; }
.chart .line-actual { fill: none; stroke: var(--steel); stroke-width: 2; }
.chart .line-forecast { fill: none; stroke: var(--copper); stroke-width: 2; stroke-dasharray: 5 4; }
.chart .band { fill: var(--copper-soft); }
.chart .ref { stroke: var(--text-3); stroke-dasharray: 3 3; }
.tip {
  position: absolute; pointer-events: none; z-index: 5;
  padding: 7px 10px; border-radius: var(--r-tight); background: var(--surface-3); border: 1px solid var(--rule-2);
  font-size: 12px; color: var(--text); white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translate(-50%, calc(-100% - 8px)); transition: opacity 0.15s;
}
.tip.is-on { opacity: 1; }
.tip span { color: var(--text-3); margin-right: 6px; }
.theme-paper .tip { background: var(--text); color: var(--bg); border-color: transparent; }
.theme-paper .tip span { color: #A5A39E; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 12px; color: var(--text-2); }
.hbar i { height: 8px; border-radius: 0 4px 4px 0; background: var(--steel); transform-origin: left; animation: grow 0.6s var(--ease) both; display: block; }
.hbar b { font-family: var(--mono); font-weight: 400; text-align: right; color: var(--text); font-size: 11.5px; }

/* --- Software demo --- */
.sw { display: grid; grid-template-columns: 184px minmax(0, 1fr); min-height: 520px; position: relative; overflow: hidden; }
.sw-side { border-right: 1px solid var(--rule); background: var(--bg-deep); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.sw-org { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-size: 13px; font-weight: 600; }
.sw-org i { width: 22px; height: 22px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--rule-2); display: grid; place-items: center; font-style: normal; font-size: 10px; color: var(--copper-text); }
.sw-nav { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r-tight); font-size: 13px; color: var(--text-2); text-align: left; transition: background-color 0.2s, color 0.2s; }
.sw-nav:hover { background: var(--surface-2); color: var(--text); }
.sw-nav[aria-current="page"] { background: var(--surface-3); color: var(--text); }
.sw-nav[aria-current="page"] .ico { color: var(--copper-text); }
.sw-nav .n { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.sw-main { display: flex; flex-direction: column; min-width: 0; }
.sw-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.sw-top h4 { font-size: 15px; font-weight: 600; margin-right: auto; }
.sw-search { position: relative; display: flex; align-items: center; }
.sw-search .ico { position: absolute; left: 9px; color: var(--text-3); width: 14px; height: 14px; }
.sw-search input { width: 190px; height: 32px; padding: 0 10px 0 30px; border-radius: var(--r-tight); border: 1px solid var(--rule-2); background: var(--bg-deep); font-size: 12.5px; outline: none; transition: border-color 0.2s; }
.sw-search input:focus { border-color: var(--copper-line); }
.sw-view { padding: 14px 16px; flex: 1; overflow: auto; }
.sw-view.is-enter { animation: view-in 0.4s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateX(8px); } }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 11.5px; padding: 0 10px 8px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.tbl td { padding: 0 10px; height: 40px; border-bottom: 1px solid var(--rule); white-space: nowrap; color: var(--text-2); }
.tbl .mini-btn { height: 26px; padding: 0 10px; font-size: 12px; }
.tbl td:first-child { color: var(--text); font-weight: 500; }
.tbl tbody tr { cursor: pointer; transition: background-color 0.15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr.is-selected { background: var(--surface-3); box-shadow: inset 2px 0 0 var(--copper); }
.tbl .num { text-align: right; font-family: var(--mono); font-size: 12px; }
.tbl .mono { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.tbl-empty { padding: 28px 10px; text-align: center; color: var(--text-3); font-size: 13px; }
.stage-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; }
.stage-chip::before { content: ""; width: 6px; height: 6px; border-radius: 1.5px; background: var(--text-3); }
.stage-chip[data-s="Construction"]::before, .stage-chip[data-s="Procurement"]::before { background: var(--copper); }
.stage-chip[data-s="Handover"]::before { background: var(--ok); }
.meter { display: inline-grid; grid-template-columns: 54px auto; gap: 8px; align-items: center; font-family: var(--mono); font-size: 11px; }
.meter i { height: 4px; border-radius: 2px; background: var(--rule-2); overflow: hidden; display: block; }
.meter i b { display: block; height: 100%; background: var(--text-2); }
.meter.is-high i b { background: var(--warn); }
.inv-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.inv-status .ico { width: 13px; height: 13px; }
.inv-status.is-paid { color: var(--ok); }
.inv-status.is-overdue { color: var(--warn); }
.inv-status.is-due { color: var(--text-2); }
.ov-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ov-card { padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-control); background: var(--bg-deep); }
.ov-card span { font-size: 12px; color: var(--text-3); display: block; }
.ov-card b { font-size: 22px; font-weight: 550; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ov-h { font-size: 12.5px; color: var(--text-3); margin: 4px 0 10px; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(300px, 86%);
  background: var(--surface-2); border-left: 1px solid var(--rule-2);
  box-shadow: -24px 0 48px -24px rgba(0, 0, 0, 0.6);
  transform: translateX(104%); transition: transform 0.4s var(--ease);
  display: flex; flex-direction: column; z-index: 3;
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--rule); }
.drawer-head div { flex: 1; min-width: 0; }
.drawer-head small { display: block; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.drawer-head b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-body { padding: 14px 16px; display: grid; gap: 14px; align-content: start; overflow: auto; }
.drawer-body label { display: grid; gap: 6px; font-size: 12px; color: var(--text-3); }
.drawer-body select { height: 34px; padding: 0 10px; border-radius: var(--r-tight); border: 1px solid var(--rule-2); background: var(--bg-deep); font-size: 13px; }
.activity { display: grid; gap: 8px; font-size: 12px; color: var(--text-2); }
.activity div { display: grid; grid-template-columns: 8px 1fr; gap: 10px; align-items: baseline; }
.activity div::before { content: ""; width: 6px; height: 6px; border-radius: 1.5px; background: var(--rule-3); transform: translateY(-1px); }
.activity div.is-new::before { background: var(--copper); }
.activity time { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }

.console, .demo, .ind-visual, .product-demo { overflow-anchor: none; }

/* ----------------------------------------------------------- paper sheet */
.sheet {
  position: relative;
  background: var(--bg);
  --inset: 0px;
  --sheet-r: 28px;
  clip-path: inset(0 var(--inset) round var(--sheet-r));
  will-change: clip-path;
}
.sheet .section:first-child { padding-top: clamp(96px, 11vw, 150px); }

/* ------------------------------------------------------------ industries */
.explorer { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: clamp(32px, 4vw, 52px); align-items: start; }
.ind-index { position: sticky; top: calc(var(--header-h) + 32px); }
.ind-list { display: grid; border-top: 1px solid var(--rule-2); }
.ind-tab {
  position: relative; text-align: left; padding: 15px 0 15px 22px;
  border-bottom: 1px solid var(--rule);
  font-size: 18px; font-weight: 500; font-stretch: 104%; letter-spacing: -0.015em; line-height: 1.3;
  color: var(--text-3); transition: color 0.25s, padding-left 0.35s var(--ease);
}
.ind-tab::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border: 1px solid var(--rule-3); border-radius: 1.5px; transition: background-color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.ind-tab:hover { color: var(--text-2); }
.ind-tab[aria-selected="true"] { color: var(--text); }
.ind-tab[aria-selected="true"]::before { background: var(--copper); border-color: var(--copper); transform: scale(1.15); }
.ind-tab.is-more { display: none; }
.explorer.is-all .ind-tab.is-more { display: block; animation: row-in 0.35s var(--ease) both; }
.ind-more { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; color: var(--copper-text); padding: 6px 0; }
.ind-more .ico { transition: transform 0.3s var(--ease); }
.ind-more[aria-expanded="true"] .ico { transform: rotate(45deg); }
.ind-more:hover { color: var(--text); }

.ind-panel { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: 28px 36px; align-items: start; }
.ind-panel.is-entering > * { animation: panel-in 0.5s var(--ease) both; }
.ind-panel.is-entering > .ind-visual { animation-delay: 0.06s; }
.ind-panel.is-entering > .ind-foot { animation-delay: 0.1s; }
.ind-text h3 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 550; font-stretch: 106%; letter-spacing: -0.03em; line-height: 1.1; }
.ind-cols { display: grid; gap: 24px; margin-top: 24px; }
.ind-cols h4 { font-size: 13px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; }
.ind-cols li { position: relative; padding: 7px 0 7px 18px; font-size: 15px; line-height: 1.45; border-bottom: 1px solid var(--rule); }
.ind-cols li::before { content: ""; position: absolute; left: 0; top: 15px; width: 6px; height: 6px; border: 1px solid var(--text-3); border-radius: 1px; }
.ind-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 24px; border-top: 1px solid var(--rule-2); }
.ind-related { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ind-related > span, .ind-project > span:first-child { font-size: 13px; color: var(--text-3); margin-right: 6px; }
.ind-project { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ind-project a { font-size: 14.5px; font-weight: 550; text-decoration: underline; text-decoration-color: var(--rule-3); text-underline-offset: 4px; }
.ind-project a:hover { text-decoration-color: var(--text); }
.ind-foot .btn { margin-left: auto; }

.ind-visual { min-width: 0; }
.vis { background: var(--surface-2); border: 1px solid var(--rule-2); border-radius: var(--r-window); box-shadow: var(--shadow-window); overflow: hidden; position: relative; }
.vis-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--rule); font-size: 12.5px; font-weight: 600; flex-wrap: wrap; }
.vis-bar small { font-weight: 400; color: var(--text-3); font-size: 12px; }
.vis-body { padding: 14px; position: relative; }
.vis-foot { padding: 10px 14px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--text-2); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vis-foot b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.sens { width: 100%; border-collapse: separate; border-spacing: 2px; font-family: var(--mono); font-size: 11.5px; }
.sens th { font-weight: 400; color: var(--text-3); padding: 6px 4px; text-align: center; }
.sens td { text-align: center; padding: 8px 4px; border-radius: 4px; color: var(--text); transition: outline-color 0.15s; outline: 1.5px solid transparent; outline-offset: -1.5px; cursor: crosshair; font-variant-numeric: tabular-nums; }
.sens td.is-base { outline-color: var(--text); }
.sens td.is-hot { outline-color: var(--copper); }
.sens th.is-hot { color: var(--copper-text); }
.sens .corner { text-align: left; }

.boq td.delta-up { color: var(--copper-text); }
.boq td.delta-new { color: var(--copper-text); }
.boq tr.is-changed td:first-child { box-shadow: inset 2px 0 0 var(--copper); }
.boq tfoot td { font-weight: 600; color: var(--text); border-bottom: 0; border-top: 1px solid var(--rule-3); }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.k-col { background: var(--bg-deep); border-radius: var(--r-control); padding: 8px; min-height: 210px; display: flex; flex-direction: column; gap: 6px; }
.k-col h5 { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; color: var(--text-2); display: flex; justify-content: space-between; }
.k-col h5 span { font-family: var(--mono); font-weight: 400; color: var(--text-3); }
.k-card { text-align: left; padding: 8px 9px; border-radius: var(--r-tight); background: var(--surface-2); border: 1px solid var(--rule); font-size: 11.5px; line-height: 1.35; display: grid; gap: 3px; transition: border-color 0.2s, transform 0.2s; }
.k-card:hover { border-color: var(--copper-line); }
.k-card b { font-weight: 600; font-size: 12px; }
.k-card small { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.k-card.is-moved { animation: k-in 0.45s var(--ease) both; }
.k-card .sla { color: var(--warn); }
@keyframes k-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.slider { display: grid; gap: 4px; margin-bottom: 12px; }
.slider label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); }
.slider label b { font-family: var(--mono); font-weight: 500; color: var(--text); font-size: 12px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--copper) var(--fill, 50%), var(--rule-2) var(--fill, 50%)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--rule-2); }
input[type="range"]::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--copper); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6.5px; border-radius: 4px; background: var(--surface-2); border: 1.5px solid var(--copper); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 4px; background: var(--surface-2); border: 1.5px solid var(--copper); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--copper-soft); }
.calc-out { display: grid; gap: 8px; align-content: start; }
.calc-out div { padding: 9px 12px; border-radius: var(--r-control); background: var(--bg-deep); display: grid; gap: 1px; font-size: 12px; color: var(--text-2); }
.calc-out b { font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.calc-verdict { font-size: 12.5px; color: var(--text-2); line-height: 1.5; padding: 2px 2px 0; }
.calc-verdict strong { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------- approach */
.approach { padding-top: 0; }
.steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px; --progress: 0; }
.steps::before, .steps::after { content: ""; position: absolute; top: 15px; left: 15px; right: 0; height: 1px; background: var(--rule-2); }
.steps::after { background: var(--copper); transform-origin: left; transform: scaleX(var(--progress)); }
.step { position: relative; display: grid; align-content: start; gap: 10px; }
.step-n {
  position: relative; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--rule-3); background: var(--bg);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-3);
  transition: border-color 0.4s, color 0.4s, background-color 0.4s; margin-bottom: 12px;
}
.step.is-reached .step-n { border-color: var(--copper); color: var(--on-copper); background: var(--copper); }
.step h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.step p { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.step .step-out { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--text); font-size: 14px; }

/* --------------------------------------------------------------- products */
.product-shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.product { display: grid; gap: 28px; align-content: start; padding: clamp(20px, 2.4vw, 32px); border: 1px solid var(--rule); border-radius: 18px; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.product-feature { grid-column: 1 / -1; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.product-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.product h3 { margin-top: 14px; font-size: clamp(24px, 2.4vw, 32px); font-weight: 550; font-stretch: 106%; letter-spacing: -0.028em; line-height: 1.1; }
.product-info > p { margin-top: 12px; color: var(--text-2); font-size: 15.5px; max-width: 48ch; }
.feature-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.feature-list li { font-size: 13px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--rule-2); color: var(--text-2); }
.product-note { margin-top: 20px; font-size: 13.5px; color: var(--text-3); }
.product-demo { min-width: 0; }
.product.is-flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0%, 100% { border-color: var(--rule); } 25% { border-color: var(--copper); } }

.dcf { padding: 16px 18px 18px; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 22px; }
.dcf-result { padding: 14px; border-radius: var(--r-control); background: var(--bg-deep); border: 1px solid var(--rule); margin-bottom: 12px; }
.dcf-result span { font-size: 12px; color: var(--text-3); display: block; }
.dcf-result b { display: block; font-size: 34px; font-weight: 550; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.dcf-result p { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

.plan-wrap { padding: 18px; background: var(--bg-deep); height: 300px; display: grid; place-items: center; perspective: 1100px; overflow: hidden; position: relative; }
.plan {
  position: relative; width: 260px; height: 190px;
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease-io);
  background-image: linear-gradient(to right, var(--rule) 1px, transparent 1px), linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 13px 13px;
}
.plan.is-3d { transform: rotateX(56deg) rotateZ(-38deg) translate3d(0, 10px, 0); }
.room { position: absolute; display: grid; place-items: center; text-align: center; font-size: 10px; line-height: 1.3; color: var(--text-2); transition: background-color 0.3s; transform-style: preserve-3d; }
.room span { display: block; transition: transform 0.9s var(--ease-io); }
.plan.is-3d .room span { transform: translateZ(44px) rotateZ(38deg) rotateX(-56deg); }
.room b { display: block; font-weight: 600; color: var(--text); font-size: 10.5px; }
.room:hover, .room.is-hot { background: var(--copper-soft); }
.wall { position: absolute; background: var(--text-2); transform-style: preserve-3d; }
.wall::after { content: ""; position: absolute; background: linear-gradient(var(--surface-3), var(--surface-2)); border: 1px solid var(--rule-3); transition: transform 0.9s var(--ease-io), opacity 0.4s; opacity: 0; }
.wall.h::after { left: 0; right: 0; bottom: 0; height: 26px; transform-origin: bottom; transform: rotateX(-90deg) scaleY(0); }
.wall.v::after { top: 0; bottom: 0; left: 0; width: 26px; transform-origin: left; transform: rotateY(-90deg) scaleX(0); }
.plan.is-3d .wall::after { opacity: 0.95; }
.plan.is-3d .wall.h::after { transform: rotateX(-90deg) scaleY(1); }
.plan.is-3d .wall.v::after { transform: rotateY(-90deg) scaleX(1); }
.plan-note { position: absolute; left: 14px; bottom: 12px; font-size: 11.5px; color: var(--text-3); }

.exp { padding: 16px 18px; display: grid; gap: 14px; }
.exp-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.exp-total span { font-size: 12px; color: var(--text-3); }
.exp-total b { font-size: 26px; font-weight: 550; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.exp-list { display: grid; gap: 6px; }
.exp-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-control); background: var(--bg-deep); font-size: 12.5px; }
.exp-row .q-ico { width: 26px; height: 26px; }
.exp-row b { font-weight: 550; display: block; }
.exp-row small { color: var(--text-3); font-size: 11.5px; }
.exp-row em { font-style: normal; font-family: var(--mono); font-size: 12px; }

/* --------------------------------------------------------------- CTA */
.cta { padding-block: clamp(80px, 10vw, 140px); border-top: 1px solid var(--rule); position: relative; overflow: hidden; }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px 64px; align-items: end; }
.cta h2 { font-size: clamp(38px, 5.4vw, 76px); line-height: 1; font-weight: 500; font-stretch: 106%; letter-spacing: -0.045em; text-wrap: balance; }
.cta-side p { color: var(--text-2); font-size: 17px; margin-bottom: 28px; max-width: 44ch; }

/* --------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--rule); padding-top: 64px; background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; }
.footer-brand .wordmark { height: 22px; width: auto; }
.footer-brand p { margin-top: 18px; color: var(--text-3); font-size: 14px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-nav h2 { font-size: 13px; font-weight: 600; color: var(--text-3); margin-bottom: 14px; }
.footer-nav li { margin-bottom: 9px; }
.footer-nav a, .footer-nav .link-btn { font-size: 14.5px; color: var(--text-2); transition: color 0.2s; }
.footer-nav a:hover, .footer-nav .link-btn:hover { color: var(--text); }
.footer-base { display: flex; gap: 24px; justify-content: space-between; padding-block: 28px 32px; margin-top: 56px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--text-3); }
.footer-base a:hover { color: var(--text); }

/* --------------------------------------------------------------- consult */
.consult {
  position: fixed; inset: 0 0 0 auto;
  width: min(560px, 100vw); height: 100dvh; max-width: 100vw; max-height: 100dvh;
  margin: 0; padding: 0; border: 0; border-left: 1px solid var(--rule-2);
  background: var(--surface); color: var(--text);
  transform: translateX(100%);
  transition: transform 0.5s var(--ease), overlay 0.5s allow-discrete, display 0.5s allow-discrete;
  box-shadow: -40px 0 80px -20px rgba(0, 0, 0, 0.6);
}
.consult.is-open { transform: none; }
.consult::backdrop { background: rgba(9, 10, 11, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.4s var(--ease); }
.consult.is-open::backdrop { opacity: 1; }
.consult-inner { height: 100%; display: flex; flex-direction: column; }
.consult-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 18px 32px; border-bottom: 1px solid var(--rule); }
.consult-head h2 { font-size: 26px; font-weight: 550; font-stretch: 108%; letter-spacing: -0.03em; }
.consult-body { flex: 1; overflow-y: auto; padding: 24px 32px 32px; overscroll-behavior: contain; }
.consult-intro { color: var(--text-2); font-size: 15px; margin-bottom: 28px; max-width: 46ch; }
.consult-form fieldset { border: 0; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; min-width: 0; }
.consult-form legend { padding: 0; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.field { display: grid; gap: 7px; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
.field label, .field .label { font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.opt { font-weight: 400; color: var(--text-3); margin-left: 4px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--bg); border: 1px solid var(--rule-2); border-radius: var(--r-control);
  font-size: 15px; color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { height: auto; min-height: 130px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.field ::placeholder { color: var(--text-3); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--rule-3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--bad); }
.field-error { font-size: 12.5px; color: var(--bad); min-height: 0; }
.field-error:empty { display: none; }
.field-meta { display: flex; justify-content: space-between; gap: 12px; }
.counter { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-left: auto; }
.select-wrap { position: relative; }
.select-wrap select { -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer; }
.select-wrap select option { background: var(--surface); color: var(--text); }
.select-wrap .ico { position: absolute; right: 14px; top: 15px; color: var(--text-3); pointer-events: none; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice-wide { grid-column: 1 / -1; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--rule-2); border-radius: var(--r-control); background: var(--bg);
  font-size: 14px; color: var(--text-2); line-height: 1.3;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.choice span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--rule-3); flex: none; transition: background-color 0.2s, border-color 0.2s; }
.choice:hover span { border-color: var(--rule-3); color: var(--text); }
.choice input:checked + span { border-color: var(--copper-line); background: var(--copper-soft); color: var(--text); }
.choice input:checked + span::before { background: var(--copper); border-color: var(--copper); }
.choice input:focus-visible + span { outline: 2px solid var(--copper-text); outline-offset: 2px; }
.field.is-invalid .choice span { border-color: rgba(226, 118, 106, 0.5); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy { font-size: 12.5px; line-height: 1.55; color: var(--text-3); margin-bottom: 18px; }
.privacy a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.form-status { padding: 12px 14px; border-radius: var(--r-control); border: 1px solid rgba(226, 118, 106, 0.45); background: rgba(226, 118, 106, 0.08); color: var(--text); font-size: 13.5px; margin-bottom: 16px; }
.btn-submit { position: relative; --btn-h: 50px; }
.btn-submit .spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(26, 15, 7, 0.3); border-top-color: var(--on-copper); animation: spin 0.7s linear infinite; }
.btn-submit.is-loading .spinner { display: block; }
.btn-submit.is-loading { pointer-events: none; opacity: 0.85; }

.consult-done { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 32px; gap: 12px; outline: none; }
.done-mark { width: 52px; height: 52px; margin-bottom: 12px; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.done-mark rect { stroke: var(--copper-line); fill: var(--copper-soft); }
.done-mark path { stroke: var(--copper-text); stroke-width: 2.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.6s var(--ease) 0.25s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.consult-done h3 { font-size: 30px; font-weight: 550; font-stretch: 108%; letter-spacing: -0.03em; }
.consult-done p { color: var(--text-2); max-width: 40ch; }
.done-ref { font-size: 14px; }
.done-ref strong { font-family: var(--mono); color: var(--text); font-weight: 500; margin-left: 6px; }
.consult-done .btn { margin-top: 16px; }

/* --------------------------------------------------------------- nudge, toast */
.nudge {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: min(340px, calc(100vw - 32px));
  padding: 18px 18px 16px; border-radius: var(--r-window);
  background: var(--surface-2); border: 1px solid var(--rule-2); box-shadow: var(--shadow-window);
  animation: nudge-in 0.6s var(--ease) both;
}
.nudge.is-leaving { animation: nudge-out 0.3s var(--ease) both; }
@keyframes nudge-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes nudge-out { to { opacity: 0; transform: translateY(12px); } }
.nudge-title { font-size: 15px; font-weight: 600; padding-right: 28px; }
.nudge-text { margin-top: 4px; font-size: 13.5px; color: var(--text-2); }
.nudge-actions { display: flex; gap: 8px; margin-top: 14px; }
.nudge-close { position: absolute; top: 10px; right: 10px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  padding: 10px 16px; border-radius: var(--r-control); background: var(--text); color: var(--bg);
  font-size: 13.5px; font-weight: 550; pointer-events: none;
  opacity: 0; transform: translate(-50%, 10px); transition: opacity 0.25s, transform 0.3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================ responsive */
@media (max-width: 1180px) {
  .cap-panel { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cap-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; }
  .cap-copy h3, .cap-copy > p { grid-column: 1; }
  .cap-copy .offer-list { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .cap-copy .text-link { grid-column: 1; align-self: start; margin-top: 20px; }
  .ind-panel { grid-template-columns: minmax(0, 1fr); }
  .ind-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1020px) {
  .primary-nav { display: none; }
  .nav-toggle { display: grid; }
  .header-inner { grid-template-columns: 1fr auto; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-side { padding-bottom: 0; }
  .console-body { grid-template-columns: minmax(0, 1fr); }
  .queue { border-right: 0; border-bottom: 1px solid var(--rule); }
  .queue-list { display: flex; overflow-x: auto; padding: 0 8px 10px; scrollbar-width: none; }
  .queue-list::-webkit-scrollbar { display: none; }
  .queue-list li { flex: 0 0 auto; width: 220px; }
  .queue-foot { display: none; }
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .ind-index { position: static; }
  .ind-list { display: flex; overflow-x: auto; border-top: 0; gap: 8px; scrollbar-width: none; padding-bottom: 2px; }
  .ind-list::-webkit-scrollbar { display: none; }
  .ind-tab, .explorer.is-all .ind-tab.is-more { flex: 0 0 auto; display: block; padding: 9px 14px 9px 30px; font-size: 14.5px; border: 1px solid var(--rule-2); border-radius: 999px; }
  .ind-tab::before { left: 13px; }
  .ind-tab.is-more { display: block; }
  .ind-more { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-left: 52px; }
  .steps::before, .steps::after { top: 0; bottom: 0; left: 15px; right: auto; width: 1px; height: auto; }
  .steps::after { transform: scaleY(var(--progress)); transform-origin: top; }
  .step-n { position: absolute; left: -52px; top: -4px; margin: 0; }
  .product-feature { grid-template-columns: minmax(0, 1fr); }
  .cta-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .hero-title { font-size: clamp(46px, 13.4vw, 78px); letter-spacing: -0.05em; }
  .lede { font-size: 17px; }
  .actions .btn { flex: 1 1 auto; }
  .win-sub, .win-dots { display: none; }
  .console-main { padding: 14px; }
  .pipeline { gap: 8px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; justify-items: center; padding: 10px 4px; gap: 6px; }
  .stage-ico { grid-row: auto; }
  .stage-name { font-size: 10.5px; }
  .stage-status { display: none; }
  .trace { width: 8px; }
  .inspector { min-height: 340px; }
  .f-row { grid-template-columns: minmax(0, 1fr) 72px; gap: 4px 12px; }
  .f-row .f-label { grid-column: 1 / -1; font-size: 12px; }
  .out-grid { grid-template-columns: minmax(0, 1fr); }
  .console-log { display: none; }
  .console-hint { font-size: 13px; }

  .cap-tabs { display: flex; overflow-x: auto; gap: 8px; border-top: 0; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .cap-tabs::-webkit-scrollbar { display: none; }
  .cap-tab { flex: 0 0 auto; padding: 10px 16px; border: 1px solid var(--rule-2); border-radius: 999px; }
  .cap-tab::before { display: none; }
  .cap-tab[aria-selected="true"] { border-color: var(--copper-line); background: var(--copper-soft); }
  .cap-tab-name { font-size: 14.5px; white-space: nowrap; }
  .cap-tab-line { display: none; }
  .cap-panels { margin-top: 20px; }
  .cap-copy { display: block; }
  .cap-copy .offer-list { margin: 22px 0; }

  .app-bar { padding: 8px 10px 8px 12px; }
  .ai-body, .flow-body, .sw { grid-template-columns: minmax(0, 1fr); }
  .ai-body { height: auto; }
  .ai-side { overflow: visible; }
  .doc-meta { display: none; }
  .ai-doc-pane { border-right: 0; border-bottom: 1px solid var(--rule); padding: 14px; max-height: 250px; }
  .doc-paper { font-size: 11px; padding: 16px; }
  .ai-side { padding: 14px; }
  .phases { gap: 4px; }
  .phase { font-size: 10px; }
  .ai-fields .f-row { grid-template-columns: minmax(0, 1fr) 70px; }
  .flow-side { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding: 8px; gap: 6px; }
  .flow-side-label { display: none; }
  .flow-pick { flex: 0 0 auto; }
  .flow-main { padding: 14px; }
  .f-step { grid-template-columns: 32px minmax(0, 1fr); }
  .f-right { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: center; gap: 10px; min-width: 0; }
  .flow-steps::before, .flow-progress { top: 16px; }
  .approval { margin-left: 0; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .dash-top .seg button { padding: 0 8px; }
  .kpi { padding: 10px; }
  .kpi b { font-size: 16px; }
  .hbar { grid-template-columns: 84px minmax(0, 1fr) 56px; }
  .sw-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding: 8px; gap: 4px; scrollbar-width: none; }
  .sw-org { display: none; }
  .sw-nav { flex: 0 0 auto; }
  .sw-top { flex-wrap: wrap; }
  .sw-search { flex: 1 1 100%; order: 3; }
  .sw-search input { width: 100%; }
  .tbl .hide-sm { display: none; }
  .ov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ov-card b { font-size: 17px; }
  .ind-cols { grid-template-columns: minmax(0, 1fr); }
  .ind-foot { flex-direction: column; align-items: flex-start; }
  .ind-foot .btn { margin-left: 0; width: 100%; }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-col { min-height: 150px; }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .product-shelf { grid-template-columns: minmax(0, 1fr); }
  .product { border-radius: 14px; }
  .dcf { grid-template-columns: minmax(0, 1fr); }
  .plan-wrap { height: 260px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-base { flex-direction: column; gap: 8px; }

  .consult { inset: auto 0 0 0; width: 100vw; height: calc(100dvh - 12px); border-left: 0; border-top: 1px solid var(--rule-2); border-radius: 16px 16px 0 0; transform: translateY(100%); }
  .consult.is-open { transform: none; }
  .consult-head { padding: 18px 16px 14px 20px; }
  .consult-body { padding: 20px 20px 28px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .choice-grid { grid-template-columns: minmax(0, 1fr); }
  .choice-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .choice span { padding: 10px; font-size: 13.5px; }
  .nudge { right: 16px; left: 16px; bottom: 16px; width: auto; }
}

@media (max-width: 420px) {
  .header-actions .btn { padding: 0 12px; }
  .kpi span { font-size: 11px; }
}

/* =========================================================== reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  .sheet { clip-path: none; }
  .doc-scan { display: none; }
}

@media (forced-colors: active) {
  .stage.is-active, .cap-tab[aria-selected="true"], .ind-tab[aria-selected="true"] { outline: 2px solid Highlight; }
  .status::before, .wordmark-node { forced-color-adjust: none; }
}
