/* ---------- visual identity  ·  60 / 30 / 10
   60 % dark navy  #0E1218   (dark: backgrounds · light: text)
   30 % grey       #8A93A1   (surfaces, borders, secondary text)
   10 % phosphor green #3DFF8B  RGB 61 255 139  (buttons, highlights, active states - always with navy text on it)
   Every colour of the site comes from these tokens. */
:root {
  color-scheme: light;
  --brand-navy: #0e1218;
  --brand-grey: #8a93a1;
  --brand-green: #3dff8b;
  --bg: #ffffff;
  --bg-2: #f3f5f8;
  --surface: #f7f8fa;
  --surface-2: #ffffff;
  --canvas: #fafbfc;          /* drawing / preview panes */
  --paper: #ffffff;
  --ink: #0e1218;             /* navy = text in light mode */
  --ink-2: #464f5d;           /* 9.0 : 1 on white */
  --ink-3: #6b7486;           /* 4.7 : 1 on white */
  --on-ink: #ffffff;
  --line: #e3e7ed;
  --line-2: #cbd2dc;
  --hover: rgba(14, 18, 24, .045);
  --accent: #0a7f40;          /* green text / lines on white, 5.1 : 1 */
  --accent-ink: #086a35;
  --accent-2: #3dff8b;        /* brand green for fills, badges, focus */
  --on-accent: #0e1218;       /* navy on green, 14 : 1 */
  --accent-bg: #e9fff2;
  --accent-line: #9ff0c0;
  --danger: #c8102e; --danger-bg: #fff2f4; --danger-ink: #8d0c22;
  --warn: #b0560d; --warn-bg: #fdf6e9; --warn-ink: #7a5208;
  --ok: #0a7f40;
  --vp-1: #f7f8fa; --vp-2: #e6eaf0;
  --cta-bg: #0e1218; --cta-ink: #f2f5f8;
  --shadow-in: inset 0 0 0 1px var(--line);
  --shadow-out: 0 1px 2px rgba(14,18,24,.04), 0 18px 40px -22px rgba(14,18,24,.2);
  --radius: 14px;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Archivo', 'Inter', system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1218;              /* 60 % navy */
  --bg-2: #121720;
  --surface: #151b25;
  --surface-2: #1a212c;
  --canvas: #f4f6f8;          /* drawings stay on light paper for legibility */
  --paper: #0e1218;
  --ink: #f2f5f8;
  --ink-2: #b9c0cb;           /* 30 % grey family */
  --ink-3: #8a93a1;           /* brand grey, 6.0 : 1 on navy */
  --on-ink: #0e1218;
  --line: #252d3a;
  --line-2: #364152;
  --hover: rgba(242, 245, 248, .06);
  --accent: #3dff8b;          /* 10 % phosphor green */
  --accent-ink: #7dffb0;
  --accent-2: #3dff8b;
  --on-accent: #0e1218;
  --accent-bg: rgba(61, 255, 139, .1);
  --accent-line: rgba(61, 255, 139, .36);
  --danger: #ff5c70; --danger-bg: rgba(255, 92, 112, .1); --danger-ink: #ff8f9c;
  --warn: #f0a849; --warn-bg: rgba(240, 168, 73, .1); --warn-ink: #f6c27e;
  --ok: #3dff8b;
  --vp-1: #1d2531; --vp-2: #0e1218;
  --cta-bg: #151b25; --cta-ink: #f2f5f8;
  --shadow-in: inset 0 0 0 1px var(--line);
  --shadow-out: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(0,0,0,.6);
}
/* drawing panes keep dark ink on light paper in both modes */
.pv-area, .pv-svg, .sheet-prev, .tpl-mini, .drawing2d { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-2); color: var(--on-accent); }
code { font-family: var(--mono); font-size: 12px; background: var(--bg-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 28px; padding: 0 clamp(16px, 4vw, 48px); height: 64px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { font-weight: 600; letter-spacing: -.02em; font-size: 17px; text-decoration: none; white-space: nowrap; }
.deg { font-weight: 400; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 14px; }
.nav a:hover, .nav a.active { color: var(--ink); }
body.in-tool .topbar { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; text-decoration: none; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.btn:hover { background: var(--ink); color: var(--on-ink); }
.btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-dark:hover { background: color-mix(in srgb, var(--ink) 84%, var(--bg)); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-ghost { border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .5; cursor: progress; }

/* ---------- landing */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.hero { min-height: calc(100vh - 64px); display: grid; place-items: center; position: relative; overflow: hidden; padding: 40px 0 80px; }
.ring { width: min(620px, 86vw); aspect-ratio: 1; border-radius: 50%; background: var(--bg); box-shadow: var(--shadow-out); display: grid; place-items: center; position: relative; }
.ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); pointer-events: none; }
.ring-inner { width: 46%; aspect-ratio: 1; border-radius: 50%; box-shadow: var(--shadow-in); background: var(--bg-2); }
.hero-text { position: absolute; left: 50%; top: 50%; transform: translate(0, -50%); max-width: 520px; }
.hero-text h1 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; margin: 0; }
.hero-text p { margin: 6px 0 0; font-size: clamp(17px, 2vw, 24px); color: var(--ink-3); letter-spacing: -.01em; line-height: 1.25; }
.hero-cta { position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; }
.side-label { position: absolute; right: clamp(16px, 4vw, 48px); top: 50%; transform: translateY(-50%) rotate(-90deg); font-size: 12px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }

.section { padding: 110px 0; border-top: 1px solid var(--line); }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 18px; height: 10px; background: var(--ink); display: inline-block; }
.h2 { font-size: clamp(30px, 4.4vw, 54px); font-weight: 600; letter-spacing: -.035em; line-height: 1.02; margin: 0 0 18px; max-width: 16ch; }
.lead { color: var(--ink-2); font-size: 17px; max-width: 60ch; margin: 0; }
.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; transition: transform .2s, border-color .2s, background .2s; min-height: 230px; position: relative; }
a.card:hover { transform: translateY(-3px); border-color: var(--ink); background: var(--surface-2); }
.card h3 { margin: 6px 0 0; font-size: 19px; letter-spacing: -.02em; font-weight: 600; }
.card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.card .meta { margin-top: auto; font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.card .pill { border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 9px; }
.card .icon { width: 40px; height: 40px; }
.card .icon svg { width: 40px; height: 40px; stroke: var(--ink); fill: none; stroke-width: 1.3; }
.card.soon { opacity: .62; }
.card .tag { position: absolute; top: 22px; right: 22px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; }
.step .n { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.step h4 { margin: 10px 0 8px; font-size: 18px; letter-spacing: -.02em; font-weight: 600; }
.step p { margin: 0; color: var(--ink-2); font-size: 14px; }
.exports { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 56px; }
.exports div { background: var(--surface); padding: 22px; }
.exports b { display: block; font-family: var(--mono); font-weight: 500; font-size: 15px; }
.exports span { font-size: 13px; color: var(--ink-3); }
.arch { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 56px; }
.arch .card { min-height: 0; }
.footer { padding: 40px 0 60px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- dashboard */
.dash-head { padding: 64px 0 10px; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.cat { margin-top: 48px; }
.cat-title { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.cat-title h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; font-weight: 600; }
.cat-title span { color: var(--ink-3); font-size: 13px; }
.cat .grid-cards { margin-top: 18px; }
.search { height: 42px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 18px; min-width: 260px; outline: none; }
.search:focus { border-color: var(--ink); }

/* ---------- tool workspace */
.tool { display: grid; grid-template-columns: 340px 1fr; grid-template-rows: 56px 1fr; height: 100vh; }
.tool-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tool-bar .crumb { font-size: 13px; color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.tool-bar .crumb:hover { color: var(--ink); }
.tool-bar h1 { font-size: 15px; margin: 0; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-bar .spacer { flex: 1; }
.status { font-size: 12px; color: var(--ink-3); font-family: var(--mono); white-space: nowrap; }
.panel { overflow-y: auto; border-right: 1px solid var(--line); background: var(--surface); padding: 6px 0 40px; }
.pgroup { border-bottom: 1px solid var(--line); }
.pgroup > summary { list-style: none; cursor: pointer; padding: 14px 18px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); display: flex; justify-content: space-between; }
.pgroup > summary::-webkit-details-marker { display: none; }
.pgroup > summary::after { content: '+'; font-family: var(--mono); }
.pgroup[open] > summary::after { content: '–'; }
.pgroup .body { padding: 0 18px 16px; display: grid; gap: 14px; }
.field label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field label .unit { color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.help { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.4; }
.num { display: grid; grid-template-columns: 1fr 86px; gap: 10px; align-items: center; }
.num input[type=number], .field input[type=text], .field input[type=number], .field select, .field textarea { width: 100%; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); padding: 0 10px; font-family: var(--mono); font-size: 13px; outline: none; }
.field textarea { height: auto; min-height: 92px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: var(--line-2); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); cursor: pointer; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--ink); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); cursor: pointer; border: 2px solid var(--surface); }
.toggle { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.toggle input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; flex-shrink: 0; }
.toggle input::after { content: ''; position: absolute; width: 14px; height: 14px; top: 3px; left: 3px; border-radius: 50%; background: var(--surface-2); transition: left .15s; }
.toggle input:checked { background: var(--ink); }
.toggle input:checked::after { left: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; user-select: none; }
.chips input { display: none; }
.chips label:has(input:checked) { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg label { flex: 1; text-align: center; font-size: 12px; padding: 7px 4px; cursor: pointer; border-right: 1px solid var(--line-2); margin: 0; justify-content: center; }
.seg label:last-child { border-right: 0; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--ink); color: var(--on-ink); }
.prof-row { display: flex; gap: 6px; align-items: center; }
.prof-row select { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); padding: 0 8px; font-family: var(--mono); font-size: 12px; }
.prof-row .btn { flex-shrink: 0; }
.prof-empty { font-size: 12px; color: var(--ink-3); }
.prof-prev { display: block; width: 100%; height: 96px; margin-top: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.prof-prev polygon { fill: color-mix(in srgb, var(--ink) 7%, transparent); stroke: var(--ink); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.prof-prev polyline { fill: none; stroke: var(--ink); stroke-width: 1px; vector-effect: non-scaling-stroke; }

.stage { display: grid; grid-template-rows: 1fr auto; min-width: 0; min-height: 0; position: relative; }
.viewport { position: relative; min-height: 0; background: radial-gradient(ellipse at 50% 30%, var(--vp-1) 0%, var(--vp-2) 70%); overflow: hidden; }
.viewport canvas { display: block; width: 100%; height: 100%; }
.drawing2d { position: absolute; inset: 0; background: var(--canvas); display: none; }
.drawing2d svg { width: 100%; height: 100%; display: block; cursor: grab; }
.viewport.mode-2d .drawing2d { display: block; }
.viewport.mode-sheet .drawing2d { background: #dcdcd8; }
.viewport.mode-2d .layers, .viewport.mode-2d .inspect, .viewport.mode-2d [data-v] { display: none; }
.vp-tools { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 3; }
.vp-tools button, .vp-tools .sep { height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface-2) 88%, transparent); font-size: 12px; cursor: pointer; }
.vp-tools button:hover { border-color: var(--ink); }
.vp-tools button.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.vp-tools button:disabled { opacity: .45; cursor: not-allowed; }
.vp-tools .sep { width: 1px; padding: 0; border: 0; background: var(--line-2); }
.layers { position: absolute; top: 14px; right: 14px; background: color-mix(in srgb, var(--surface-2) 92%, transparent); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; display: grid; gap: 5px; z-index: 3; max-height: 60%; overflow: auto; min-width: 170px; }
.lh { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 2px; }
.layers label { display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.layers .sw { width: 10px; height: 10px; border-radius: 3px; border: 1px solid rgba(0,0,0,.2); }
.layers input { margin: 0; accent-color: var(--accent-2); }
.inspect { position: absolute; left: 14px; bottom: 14px; background: rgba(20,20,20,.9); color: var(--on-ink); font-family: var(--mono); font-size: 12px; padding: 9px 12px; border-radius: 8px; max-width: min(520px, 80%); z-index: 3; display: none; white-space: pre-wrap; }
.dock { border-top: 1px solid var(--line); background: var(--surface); height: 260px; display: grid; grid-template-rows: 40px 1fr; min-height: 0; }
.dock.collapsed { height: 40px; }
.tabs { display: flex; align-items: center; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { height: 40px; border: 0; background: none; padding: 0 12px; font-size: 13px; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .badge { font-family: var(--mono); font-size: 11px; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; margin-left: 5px; }
.tabs .badge.warn { background: var(--warn-bg); color: var(--warn); }
.tabs .spacer { flex: 1; }
.dock-body { overflow: auto; min-height: 0; }
table.data { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.data th { position: sticky; top: 0; background: var(--surface); text-align: left; font-weight: 500; color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px; border-bottom: 1px solid var(--line); }
table.data td { padding: 6px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); white-space: nowrap; }
table.data td.t { font-family: var(--sans); }
table.data tr:hover td { background: var(--surface-2); }
.list { margin: 0; padding: 10px 16px 16px 34px; font-size: 13px; }
.list li { padding: 3px 0; }
.list.warn li { color: var(--warn); }
.empty { padding: 18px; color: var(--ink-3); font-size: 13px; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 10px; padding: 14px; }
.export-grid button { text-align: left; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); padding: 12px 14px; cursor: pointer; display: grid; gap: 2px; }
.export-grid button:hover { border-color: var(--ink); }
.export-grid button b { font-family: var(--mono); font-weight: 500; font-size: 13px; }
.export-grid button span { font-size: 12px; color: var(--ink-3); }
.export-grid button:disabled { opacity: .45; cursor: not-allowed; }
.stats { display: flex; gap: 22px; padding: 12px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.stats div { font-size: 12px; color: var(--ink-3); }
.stats b { display: block; font-family: var(--mono); font-weight: 500; font-size: 15px; color: var(--ink); }
.tpl-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; flex-wrap: wrap; }
.tpl-bar label { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.tpl-bar select { height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); padding: 0 8px; font-size: 13px; }
.tpl-bar .spacer { flex: 1; }
.pkg-list { margin: 10px 14px 0; padding: 10px 12px; background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 10px; font-size: 12.5px; line-height: 1.9; }
.pkg-list.err { background: var(--danger-bg); border-color: var(--danger); }
.rh-block { padding: 6px 16px 0; }
.rh-block .list { padding-top: 4px; font-family: var(--mono); font-size: 12px; }
.rh-pre { font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.mobile-toggle { display: none; }

/* ---------- pill navigation (top bar) */
.pillnav { margin-left: auto; display: flex; gap: 2px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.pillnav a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; text-decoration: none; font-size: 13.5px; color: var(--ink-2); transition: background .18s, color .18s; }
.pillnav a svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.pillnav a:hover { background: var(--bg); color: var(--ink); }
.pillnav a.active { background: var(--ink); color: var(--on-ink); }
.pillnav .cnt { font-family: var(--mono); font-size: 11px; background: var(--bg-2); color: var(--ink-2); border-radius: 6px; padding: 0 6px; line-height: 18px; }
.pillnav a.active .cnt { background: rgba(255,255,255,.18); color: var(--on-ink); }
.dot-s { width: 7px; height: 7px; border-radius: 50%; background: #c9c9c4; }
.dot-s.ok { background: var(--accent-2); }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font-size: 13.5px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .15s, transform .15s, background .15s; }
.pill-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.pill-btn.dark { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pill-btn.light { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
kbd { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.pill-btn.dark kbd { background: rgba(255,255,255,.12); border-color: transparent; color: #ddd; }

/* ---------- studio home (bento) */
.studio { max-width: 1320px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-left, 0px)) 40px max(16px, env(safe-area-inset-right, 0px)); }
.st-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.st-title { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.st-sub { margin: 8px 0 0; color: var(--ink-3); font-size: 14px; }
.st-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.tile { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 22px; padding: 20px; overflow: hidden; min-width: 0; isolation: isolate; }
.tile::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(0,0,0,.05), transparent 60%); }
.tile:hover::before { opacity: 1; }
.tile.dark { background: #121212; color: var(--canvas); border-color: #121212; }
.tile.dark::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.10), transparent 60%); }
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.tile-head h2, .tile h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.muted { color: var(--ink-3); font-size: 12.5px; }
.link-pill { font-size: 12.5px; text-decoration: none; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; transition: border-color .15s; }
.link-pill:hover { border-color: var(--ink); color: var(--ink); }
.kpi { grid-column: span 3; display: flex; flex-direction: column; gap: 6px; min-height: 150px; }
.k-label { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.tile.dark .k-label { color: #9a9a95; }
.k-num { font-size: 48px; font-weight: 600; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; margin-top: auto; }
.k-num.small { font-size: 30px; }
.k-foot { font-size: 12.5px; color: var(--ink-3); }
.tile.dark .k-foot { color: #a9a9a4; }
#kpiBridge.ok .k-num { color: var(--ok); }
.tools-tile { grid-column: span 8; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tool-card { position: relative; display: grid; grid-template-rows: 120px auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; overflow: hidden; transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .25s; }
.tool-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 14px 30px -18px rgba(0,0,0,.35); }
.tc-thumb { background: var(--canvas); border-bottom: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.tc-thumb svg { width: 100%; height: 100%; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.tool-card:hover .tc-thumb svg { transform: scale(1.08); }
.tc-loading { width: 40%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--bg-2), var(--line), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.tc-meta { padding: 10px 12px 12px; display: grid; gap: 2px; }
.tc-meta b { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.tc-meta span { font-size: 11.5px; color: var(--ink-3); }
.tc-go { position: absolute; top: 10px; right: 10px; font-size: 11.5px; background: var(--ink); color: var(--on-ink); border-radius: 999px; padding: 3px 9px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
.tool-card:hover .tc-go, .tool-card:focus-visible .tc-go { opacity: 1; transform: none; }
.next-tile { grid-column: span 4; display: flex; flex-direction: column; gap: 8px; }
.next-title { font-size: 24px !important; letter-spacing: -.03em !important; line-height: 1.15; margin-top: 4px !important; }
.next-sub { margin: 0; color: #a9a9a4; font-size: 13px; }
.next-tile .pill-btn { align-self: flex-start; margin: 6px 0 10px; }
.timeline { display: grid; gap: 2px; border-top: 1px solid #2a2a2a; padding-top: 10px; margin-top: auto; }
.tl-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 7px 6px; border-radius: 10px; text-decoration: none; color: inherit; font-size: 12.5px; transition: background .15s; }
.tl-row:hover { background: #1e1e1e; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: #777; }
.tl-dot.export, .tl-dot.package { background: #e0a030; }
.tl-dot.rhino { background: #6fb6dd; }
.tl-dot.open { background: #cfcfca; }
.tl-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #d8d8d4; }
.tl-time { color: #8a8a86; font-family: var(--mono); font-size: 11px; }
.tl-empty { color: #8a8a86; font-size: 12.5px; margin: 4px 6px; }
.lib-tile { grid-column: span 8; }
.sec-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.sec { flex: 0 0 66px; scroll-snap-align: start; display: grid; grid-template-rows: 150px auto auto; gap: 2px; justify-items: center; border: 1px solid transparent; border-radius: 12px; background: none; padding: 6px 4px; cursor: pointer; transition: background .15s, border-color .15s, transform .2s; }
.sec:hover, .sec:focus-visible { background: var(--surface); border-color: var(--line-2); transform: translateY(-2px); }
.sec-svg { width: 100%; height: 150px; }
.sec-svg svg { width: 100%; height: 100%; }
.sec-svg polygon { fill: color-mix(in srgb, var(--ink) 7%, transparent); stroke: var(--ink); stroke-width: .7px; vector-effect: non-scaling-stroke; }
.sec:hover polygon { fill: color-mix(in srgb, var(--accent-2) 25%, transparent); }
.sec b { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.sec span { font-family: var(--mono); font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.sec-info { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); min-height: 18px; }
.tpl-tile { grid-column: span 4; display: flex; flex-direction: column; gap: 8px; }
.tpl-name { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.tpl-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-facts span { font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--ink-2); }
.tpl-mini { margin-top: auto; background: #dcdcd8; border-radius: 12px; padding: 8px; aspect-ratio: 1.414; }
.tpl-mini svg { width: 100%; height: 100%; display: block; }
.st-foot { margin-top: 26px; color: var(--ink-3); font-size: 12.5px; text-align: center; }
.reveal { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
/* motion only (no fade): content stays readable even when animations are paused (hidden tab, thumbnails) */
@keyframes rise { from { transform: translateY(16px) scale(.985); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } .tool-card, .tc-thumb svg, .sec { transition: none; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

/* ---------- command palette */
.cmdk { position: fixed; inset: 0; z-index: 100; background: rgba(20,20,20,.28); backdrop-filter: blur(3px); display: grid; place-items: start center; padding: 12vh 16px 16px; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } }
.cmdk-box { width: min(620px, 100%); background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.45); overflow: hidden; animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.cmdk-box input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font-size: 16px; outline: none; background: transparent; }
.cmdk-list { max-height: 52vh; overflow: auto; padding: 6px; }
.cmdk-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); padding: 10px 12px 4px; }
.cmdk-item { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 14px; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: 13.5px; }
.cmdk-item span { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item.on, .cmdk-item:hover { background: var(--bg); }
.cmdk-item.on { box-shadow: inset 2px 0 0 var(--ink); }
.cmdk-empty { padding: 18px; color: var(--ink-3); font-size: 13px; }
.cmdk-foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); }

@media (max-width: 1100px) {
  .kpi { grid-column: span 6; }
  .tools-tile, .next-tile, .lib-tile, .tpl-tile { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .pillnav a span.cnt { display: none; }
  .pillnav { overflow-x: auto; max-width: 100%; }
  .topbar [data-cmdk], .topbar .pill-btn.dark { display: none; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .kpi { grid-column: 1 / -1; } .tool-grid { grid-template-columns: 1fr; } }

/* ---------- rhino page */
.rh-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; margin-top: 36px; align-items: start; }
.rh-grid .card { min-height: 0; }
.rh-row { display: grid; grid-template-columns: 14px 130px 1fr; gap: 8px; align-items: center; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rh-row span { color: var(--ink-2); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #c9c9c4; display: inline-block; }
.dot.ok { background: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-bg); }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- templates page */
.tpl-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; margin-top: 36px; align-items: start; }
.tpl-list { display: grid; gap: 8px; position: sticky; top: 84px; }
.tpl-item { text-align: left; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 11px 13px; cursor: pointer; display: grid; gap: 2px; }
.tpl-item b { font-weight: 600; font-size: 14px; }
.tpl-item span { font-size: 12px; color: var(--ink-3); }
.tpl-item em { font-style: normal; color: var(--ok); }
.tpl-item.on { border-color: var(--ink); background: var(--surface-2); }
.tpl-edit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.tpl-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tpl-form { display: grid; gap: 16px; }
.tpl-form fieldset { border: 0; border-top: 1px solid var(--line); padding: 14px 0 0; margin: 0; display: grid; gap: 12px; min-width: 0; }
.tpl-form legend { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); padding-right: 10px; }
.tpl-form input:disabled, .tpl-form textarea:disabled { opacity: .7; }
.quad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quad input { width: 100%; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); padding: 0 8px; font-family: var(--mono); font-size: 13px; }
.banner { background: var(--warn-bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.linkbtn { border: 0; background: none; padding: 0; text-decoration: underline; cursor: pointer; font: inherit; }
.tpl-preview { position: sticky; top: 84px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.tpl-preview .prof-row { justify-content: space-between; flex-wrap: wrap; }
.sheet-prev { background: #dcdcd8; border-radius: var(--radius); padding: 14px; aspect-ratio: 1.414; }
.sheet-prev svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 14px rgba(0,0,0,.12)); }

@media (max-width: 1100px) { .tpl-grid { grid-template-columns: minmax(0, 1fr); } .tpl-list, .tpl-preview { position: static; } }
@media (max-width: 980px) {
  .grid-cards { grid-template-columns: 1fr 1fr; }
  .exports { grid-template-columns: 1fr 1fr; }
  .steps, .arch, .rh-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-text { left: 50%; transform: translate(-50%, -50%); text-align: center; width: 80%; }
  .tool { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px auto 1fr; height: auto; min-height: 100vh; }
  .tool-bar { overflow: hidden; gap: 8px; }
  .tool-bar #project { display: none; }
  .panel { border-right: 0; border-bottom: 1px solid var(--line); max-height: 46vh; }
  .panel.hide { display: none; }
  .stage { height: 82vh; }
  .mobile-toggle { display: inline-flex; }
  .vp-tools { right: 14px; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .grid-cards, .exports { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; width: calc(100% - 32px); }
  .side-label { display: none; }
  .search { min-width: 0; width: 100%; }
  .tool-bar .status, .tool-bar [data-act="reset"], .tool-bar [data-act="rhino"] { display: none; }
  .tool-bar h1 { font-size: 13px; }
  .layers { display: none; }
}

/* =====================================================================  PLATFORM (public pages)  */
body { background: var(--paper); }
.topbar { background: color-mix(in srgb, var(--bg) 90%, transparent); gap: 20px; }
.mainnav { display: flex; gap: 2px; margin-left: 18px; }
.mainnav a { text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.mainnav a:hover { color: var(--ink); background: var(--hover); }
.mainnav a.active { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.top-actions .pill-btn.active { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.icon-btn:hover { border-color: var(--ink); }
.burger { display: none; }
.arr { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; flex-shrink: 0; transition: transform .2s; }
a:hover > .arr, a:hover .tcard-go .arr, .trow:hover .arr { transform: translateX(3px); }
.btn-light { background: #fff; color: #0c0f0d; border-color: #fff; }
.btn-light:hover { background: var(--accent-2); color: var(--on-accent); border-color: var(--accent-2); }
.btn-outline-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline-light:hover { background: #fff; color: #0c0f0d; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.site { min-height: calc(100vh - 64px); display: flex; flex-direction: column; }
.site > .wrap:first-child { flex: 1; width: 100%; }
.kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.kicker::before { content: ''; width: 14px; height: 2px; background: var(--accent); }
.display { font-family: var(--display); font-stretch: 72%; font-weight: 650; font-size: clamp(44px, 7vw, 96px); line-height: .94; letter-spacing: -.02em; margin: 0 0 22px; max-width: 12ch; }
.ptitle { font-family: var(--display); font-stretch: 75%; font-weight: 650; font-size: clamp(36px, 5vw, 64px); line-height: .98; letter-spacing: -.015em; margin: 0 0 14px; max-width: 18ch; }
.h2b { font-family: var(--display); font-stretch: 75%; font-weight: 650; font-size: clamp(28px, 3.6vw, 44px); line-height: 1; letter-spacing: -.01em; margin: 0; max-width: 20ch; }
.plead { font-size: 17px; color: var(--ink-2); max-width: 62ch; margin: 0 0 24px; }
.lnk { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.lnk:hover { color: var(--accent); }
.muted { color: var(--ink-3); }
.lh { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 14px 0 6px; }

/* illustrations */
.ill { width: 100%; height: 100%; display: block; color: var(--ink); }
.ill path { stroke-width: 1; }

/* status badges */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; text-transform: none; }
.st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-available { color: var(--accent); border-color: var(--accent-line); background: var(--accent-bg); }
.st-beta { color: #3b82f6; border-color: color-mix(in srgb, #3b82f6 40%, transparent); background: color-mix(in srgb, #3b82f6 10%, transparent); }
.st-development { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-bg); }
.st-soon { color: var(--ink-3); background: transparent; }
.st-pro { color: var(--accent); border-color: var(--accent-line); }

/* home hero */
.hero2 { border-bottom: 1px solid var(--line); }
.hero2-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: clamp(32px, 6vw, 80px); padding-bottom: 40px; }
.hero2-art { position: relative; aspect-ratio: 1.1; border-left: 1px solid var(--line); padding: 0 0 0 30px; }
.hero2-art .ill { color: var(--ink); }
.hero2-tag { position: absolute; left: 30px; bottom: 0; font-size: 12.5px; color: var(--ink-2); background: var(--paper); padding: 6px 0; }
.hero2-tag b { font-family: var(--mono); font-weight: 500; color: var(--accent); }
.hero-search { display: flex; gap: 8px; margin-top: 28px; max-width: 520px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 5px 5px 18px; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 14px; }
.hero-search:focus-within { border-color: var(--ink); }
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.numbers div { padding: 22px 0 26px; border-right: 1px solid var(--line); padding-left: 22px; }
.numbers div:first-child { padding-left: 0; }
.numbers div:last-child { border-right: 0; }
.numbers b { display: block; font-family: var(--display); font-stretch: 75%; font-size: clamp(30px, 4vw, 48px); font-weight: 600; line-height: 1; color: var(--accent); }
.numbers span { font-size: 12.5px; color: var(--ink-3); }

.band { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1px solid var(--line); }
.band.alt { background: var(--surface-2); }
.band-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }

/* family cards */
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fcard { background: var(--surface-2); text-decoration: none; display: grid; grid-template-rows: 190px auto; transition: background .2s; min-width: 0; }
.fcard:hover { background: var(--canvas); }
.fcard-art { padding: 22px 30px 8px; border-bottom: 1px solid var(--line); overflow: hidden; }
.fcard-art img, .scard-art img, .tcard-pic img, .phead-art img, .pcard-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fcard:hover .ill { color: var(--accent-ink); }
.fcard .ill, .scard .ill { transition: color .25s, transform .4s cubic-bezier(.2,.8,.2,1); }
.fcard:hover .ill, .scard:hover .ill { transform: scale(1.04); }
.fcard-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; }
.fcard h3, .scard h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.fcard p, .scard p { margin: 0; font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fcode { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border: 1px solid var(--ink); font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--ink); letter-spacing: 0; margin-right: 6px; }
.fcard-body .fcode { align-self: flex-start; }
.fmeta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: auto; padding-top: 6px; }
.fmeta .on { color: var(--accent); }

/* tool cards / rows */
.tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tcard { position: relative; display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; min-width: 0; }
.band.alt .tcard { background: var(--paper); }
.tcard:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(0,0,0,.4); }
.tcard-pic { height: 170px; border-bottom: 1px solid var(--line); background: var(--canvas); overflow: hidden; }
.pv { width: 100%; height: 100%; display: grid; place-items: center; }
.pv svg { width: 100%; height: 100%; display: block; }
.pv.big { min-height: 320px; background: var(--canvas); border: 1px solid var(--line); }
.tcard-body { padding: 16px 18px 52px; display: flex; flex-direction: column; gap: 8px; }
.tcard-top { display: flex; gap: 6px; }
.tcard h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.tcard p { margin: 0; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span, .tag { font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); padding: 1px 7px; border-radius: 4px; }
.tcard-go { position: absolute; left: 18px; bottom: 16px; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 500; }
.tcard.open .tcard-go { color: var(--accent); }
.trows { display: grid; border-top: 1px solid var(--line); margin-top: 8px; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 14px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .15s, padding .2s; }
.trow:hover { background: var(--surface-2); padding-left: 10px; }
.trow-t { font-size: 14.5px; font-weight: 500; min-width: 0; }
.trow-t em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow-go { color: var(--ink-3); display: grid; }
.tgrid + .trows { margin-top: 22px; }

/* workflow + capabilities */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.flow li { padding: 20px 22px 8px 0; border-right: 1px solid var(--line); margin-right: 22px; }
.flow li:last-child { border-right: 0; }
.flow span { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.flow b { display: block; font-family: var(--display); font-stretch: 75%; font-size: 26px; font-weight: 600; margin: 6px 0; }
.flow p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 44px; }
.caps div { background: var(--paper); padding: 14px 16px; font-size: 13.5px; }

/* projects */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pcard { text-decoration: none; display: flex; flex-direction: column; min-width: 0; }
.pcard-pic { aspect-ratio: 4 / 3; background: var(--canvas); border: 1px solid var(--line); overflow: hidden; }
.pcard-pic .ill { padding: 24px; }
.pcard:hover .pcard-pic { border-color: var(--ink); }
.pcard-pic > * { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.pcard:hover .pcard-pic > * { transform: scale(1.035); }
.pcard-body { padding: 14px 0 0; display: grid; gap: 4px; }
.pmeta { font-size: 12px; color: var(--ink-3); }
.pcard h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.pcard:hover h3 { color: var(--accent); }
.plabel { justify-self: start; font-size: 11px; color: var(--ink-3); border: 1px dashed var(--line-2); padding: 1px 7px; }
.proj-hero { border: 1px solid var(--line); background: var(--canvas); height: min(60vh, 560px); overflow: hidden; }
.proj-hero img { width: 100%; height: 100%; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; border: 1px solid var(--line); }
.proj-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; margin: 36px 0 20px; }
.doc p, .doc li { font-size: 15.5px; color: var(--ink-2); max-width: 70ch; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
table.spec { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.spec th { text-align: left; font-weight: 400; color: var(--ink-3); padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); width: 38%; vertical-align: top; }
table.spec td { padding: 9px 0; border-bottom: 1px solid var(--line); }

/* page header + sections */
.phead { padding: 30px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.phead-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-top: 26px; }
.phead-grid > div:only-child { grid-column: 1 / -1; }
.phead-art { height: 240px; color: var(--ink); }
.phead-art .pv.big { min-height: 0; height: 100%; }
.phead .plead { margin-bottom: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--accent); }
.crumbs b { font-weight: 500; color: var(--ink); }
.tool-cta { margin-top: 22px; }
.sgroup { margin: 0 0 48px; }
.sg-title { display: flex; align-items: baseline; gap: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.sg-title small { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0; font-weight: 400; }
.sg-sub { margin: -6px 0 10px; color: var(--ink-3); font-size: 13.5px; }
.sysgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.scard { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 16px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s; min-width: 0; }
.scard:hover { border-color: var(--ink); }
.scard:hover h3 { color: var(--accent); }
.scard-art { height: 96px; }
.scard-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.scard h3 { font-size: 16.5px; }
.cgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ccard { background: var(--surface-2); padding: 16px 16px 14px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; min-height: 104px; transition: background .15s; }
.ccard:hover { background: var(--canvas); }
.ccard:hover b { color: var(--accent); }
.ccard b { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.ccard span { font-size: 12.5px; color: var(--ink-2); }
.ccard em { margin-top: auto; font-style: normal; font-size: 12px; color: var(--ink-3); }
.ccard em i { font-style: normal; color: var(--accent); }
.soon-panel { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px; align-items: start; padding: 26px; margin: 0 0 40px; border: 1px dashed var(--line-2); background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--hover) 10px 20px); }
.soon-mark { height: 100px; color: var(--ink-3); }
.soon-panel h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.soon-panel p { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; max-width: 64ch; }
.soon-sub { margin-top: 10px !important; font-weight: 500; color: var(--ink) !important; }
.io { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-bottom: 44px; }
.io ul { list-style: none; margin: 0; padding: 0; }
.io li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.io li code { background: none; color: var(--ink-3); padding: 0; flex-shrink: 0; }
.io-g .lh { margin-top: 18px; }
.io-g:first-child .lh { margin-top: 0; }

/* filters */
.filterbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 0 0 30px; }
.filterbar .search { flex: 1; min-width: 240px; max-width: 520px; background: var(--surface-2); }
.seg-f { display: flex; flex-wrap: wrap; gap: 4px; }
.seg-f button { height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 13px; cursor: pointer; }
.seg-f button:hover { border-color: var(--ink); }
.seg-f button.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.empty a { color: var(--accent); }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; margin-bottom: 56px; }
.big-p { font-family: var(--display); font-stretch: 85%; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.caplist { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.caplist li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 380px)); gap: 20px; }
.member { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.avatar { width: 112px; height: 112px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.avatar span { font-family: var(--display); font-stretch: 75%; font-size: 40px; font-weight: 600; }
.member h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.member .role { color: var(--accent); font-size: 13px; margin-top: 2px; }
.member p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; margin-bottom: 60px; }
.cform { display: grid; gap: 16px; }
.cform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cform label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.cform input, .cform textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; padding: 10px 0; font-size: 15px; outline: none; border-radius: 0; resize: vertical; }
.cform input:focus, .cform textarea:focus { border-bottom-color: var(--ink); }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-note { font-size: 13px; color: var(--ink-3); }
.form-note.ok { color: var(--accent); }
.form-note.err { color: var(--danger); }
.cinfo { display: grid; gap: 6px; align-content: start; border-left: 1px solid var(--line); padding-left: 32px; }
.cinfo a { text-decoration: none; font-size: 16px; }
.cinfo a:hover { color: var(--accent); }
.cinfo p { margin: 0; }
.socials { display: flex; gap: 14px; flex-wrap: wrap; }

/* CTA + footer */
.cta { background: var(--cta-bg); color: var(--cta-ink); padding: clamp(56px, 8vw, 96px) 0; }
.cta-grid { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; }
.cta h2 { font-family: var(--display); font-stretch: 72%; font-weight: 600; font-size: clamp(34px, 5vw, 64px); line-height: .98; margin: 0; max-width: 14ch; }
.sfoot { border-top: 1px solid var(--line); background: var(--surface-2); padding: 48px 0 0; margin-top: auto; }
.sfoot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 30px; }
.sfoot-grid > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sfoot-grid a { text-decoration: none; font-size: 13.5px; color: var(--ink-2); }
.sfoot-grid a:hover { color: var(--accent); }
.sfoot-grid .brand { font-size: 18px; color: var(--ink); }
.sfoot-grid p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-3); max-width: 34ch; }
.sfoot-grid .lh { margin-top: 0; }
.sfoot-base { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 26px 0 30px; margin-top: 36px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }

@media (max-width: 1100px) {
  .tgrid, .sysgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .caps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mainnav { display: none; position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px clamp(16px, 4vw, 48px) 14px; box-shadow: 0 20px 30px -20px rgba(0,0,0,.25); }
  body.nav-open .mainnav { display: flex; }
  .mainnav a { padding: 12px 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; }
  .mainnav a.active { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
  .burger { display: inline-flex; }
  .icon-btn kbd { display: none; }
  .hero2-grid, .phead-grid, .proj-grid, .about-grid, .contact-grid, .io { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero2-art { border-left: 0; padding: 0; aspect-ratio: 1.4; }
  .hero2-tag { left: 0; }
  .phead-art { height: 200px; }
  .fgrid, .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li:nth-child(2) { border-right: 0; }
  .sfoot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cinfo { border-left: 0; padding-left: 0; }
}
@media (max-width: 600px) {
  .topbar { gap: 10px; }
  .top-actions .pill-btn { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .icon-btn { padding: 0 10px; }
  .brand { font-size: 15.5px; }
  .fgrid, .pgrid, .tgrid, .sysgrid, .cgrid, .caps { grid-template-columns: minmax(0, 1fr); }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers div:nth-child(2) { border-right: 0; }
  .numbers div:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); }
  .numbers div:nth-child(4) { border-top: 1px solid var(--line); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); }
  .scard { grid-template-columns: 80px minmax(0, 1fr); }
  .scard-art { height: 72px; }
  .soon-panel { grid-template-columns: minmax(0, 1fr); }
  .soon-mark { display: none; }
  .cform .two { grid-template-columns: minmax(0, 1fr); }
  .caplist { columns: 1; }
  .member { grid-template-columns: 80px minmax(0, 1fr); }
  .avatar { width: 80px; height: 80px; }
  .sfoot-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-search { flex-wrap: nowrap; }
}

/* =====================================================================  ADMIN  */
.adm-gate { padding: clamp(40px, 8vw, 90px) 0; max-width: 620px; }
.adm-gate-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adm-gate-form input { height: 42px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 14px; font-size: 15px; min-width: 220px; outline: none; }
.adm-gate-form input:focus { border-color: var(--ink); }
.adm { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.adm-side { border-right: 1px solid var(--line); background: var(--surface-2); padding: 24px 14px; position: sticky; top: 64px; height: calc(100vh - 64px); display: flex; flex-direction: column; }
.adm-side nav { display: grid; gap: 2px; }
.adm-side nav button { text-align: left; border: 0; background: none; padding: 9px 12px; font-size: 14px; cursor: pointer; border-radius: 6px; color: var(--ink-2); }
.adm-side nav button:hover { background: var(--bg); color: var(--ink); }
.adm-side nav button.on { background: var(--ink); color: var(--on-ink); }
#msgCount:not(:empty) { font-family: var(--mono); font-size: 11px; background: var(--accent); color: var(--on-ink); border-radius: 8px; padding: 0 6px; margin-left: 4px; }
.adm-side-foot { margin-top: auto; display: grid; gap: 10px; padding: 0 12px; font-size: 13.5px; }
.adm-main { min-width: 0; padding: 0 clamp(16px, 3vw, 36px) 60px; }
.adm-bar { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 0; background: var(--paper); border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.adm-bar h1 { margin: 0 auto 0 0; font-family: var(--display); font-stretch: 75%; font-size: 30px; font-weight: 650; }
.adm-dirty { font-size: 12.5px; color: var(--ink-3); }
.adm-dirty.on { color: var(--accent); }
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 16px; }
.adm-kpis div { background: var(--surface-2); padding: 16px; display: grid; gap: 6px; justify-items: start; }
.adm-kpis b { font-family: var(--display); font-stretch: 75%; font-size: 34px; font-weight: 600; line-height: 1; }
.adm-kpis span { font-size: 12.5px; color: var(--ink-3); }
.adm-help { background: var(--surface-2); border: 1px solid var(--line); padding: 18px 20px; font-size: 14px; color: var(--ink-2); }
.adm-help h3 { margin: 0 0 8px; color: var(--ink); font-size: 16px; }
.adm-split { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 22px; align-items: start; }
.adm-split.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.adm-tree { background: var(--surface-2); border: 1px solid var(--line); padding: 12px; max-height: calc(100vh - 200px); overflow: auto; position: sticky; top: 140px; display: grid; gap: 2px; align-content: start; }
.adm-tree > .row-btns { margin-bottom: 8px; }
.tn { display: flex; align-items: center; gap: 6px; padding: 6px 6px; font-size: 13.5px; cursor: pointer; border-radius: 4px; }
.tn > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn:hover { background: var(--bg); }
.tn.on { background: var(--ink); color: var(--on-ink); }
.tn.hid > span:first-of-type { text-decoration: line-through; opacity: .6; }
.tn-act { display: none; gap: 2px; }
.tn:hover .tn-act, .tn.on .tn-act { display: flex; }
.tn-act button, .tw { width: 22px; height: 22px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: 12px; line-height: 1; padding: 0; border-radius: 4px; flex-shrink: 0; }
.tchildren { margin-left: 16px; border-left: 1px solid var(--line); padding-left: 6px; display: grid; gap: 1px; }
.tadd { justify-self: start; border: 0; background: none; color: var(--accent); font-size: 12.5px; cursor: pointer; padding: 4px 6px; }
.adm-edit { background: var(--surface-2); border: 1px solid var(--line); padding: 20px; min-width: 0; }
.ed-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ed-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.ed-head .kicker { margin-bottom: 6px; }
.ed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-bottom: 14px; }
.af { display: grid; gap: 5px; font-size: 12.5px; color: var(--ink-2); align-content: start; min-width: 0; }
.af-wide, .af-img, .ill-prev, .member-ed > .af-wide { grid-column: 1 / -1; }
.af input, .af select, .af textarea, .adm-sel { width: 100%; height: 36px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 10px; font-size: 14px; outline: none; border-radius: 0; }
.af textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.45; font-family: var(--sans); }
.af input:focus, .af select:focus, .af textarea:focus { border-color: var(--ink); }
.af input[readonly] { background: var(--bg); color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; }
.af small { color: var(--ink-3); font-size: 11.5px; }
.af-bool { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.af-bool input { width: 16px; height: 16px; accent-color: var(--ink); }
.adm-sel { width: auto; min-width: 160px; background: var(--surface-2); }
.ill-prev { height: 120px; border: 1px solid var(--line); background: var(--canvas); padding: 10px; }
.img-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.img-row img, .img-ph { width: 96px; height: 72px; object-fit: cover; border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; color: var(--ink-3); background: var(--bg); }
.place { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; margin-bottom: 6px; }
.place select { height: 34px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 13px; min-width: 0; }
.adm-table { background: var(--surface-2); border: 1px solid var(--line); max-height: calc(100vh - 220px); overflow: auto; }
.adm-table tr { cursor: pointer; }
.adm-table tr.on td { background: var(--accent-bg); }
.adm-table td small { color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.adm-table td { white-space: normal; vertical-align: top; }
.adm-table select { height: 28px; font-size: 12px; border: 1px solid var(--line-2); background: var(--surface-2); }
.danger { color: var(--danger) !important; }
.danger:hover { border-color: var(--danger) !important; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; border: 1px solid var(--line-2); padding: 4px 9px; cursor: pointer; }
.checks label:has(input:checked) { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.checks input { display: none; }
.gal-ed { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 8px; }
.gal-ed > div { display: grid; gap: 4px; }
.gal-ed img { width: 140px; height: 100px; object-fit: cover; border: 1px solid var(--line); }
.adm-pages { display: grid; gap: 18px; max-width: 980px; }
.adm-pages section { background: var(--surface-2); border: 1px solid var(--line); padding: 18px 20px; }
.adm-pages h3 { margin: 0 0 14px; font-size: 16px; }
.member-ed { border-top: 1px solid var(--line); padding-top: 14px; }
.member-ed > button { justify-self: start; }
.msgs { display: grid; gap: 12px; max-width: 900px; }
.msg { background: var(--surface-2); border: 1px solid var(--line); padding: 16px 18px; }
.msg.new { border-left: 3px solid var(--accent); }
.msg header { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13.5px; align-items: baseline; }
.msg header span { margin-left: auto; color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.msg h4 { margin: 8px 0 0; font-size: 15px; }
.msg p { font-size: 14px; color: var(--ink-2); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; background: var(--ink); color: var(--on-ink); padding: 11px 18px; font-size: 13.5px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.5); animation: rise .25s cubic-bezier(.2,.8,.2,1); max-width: calc(100vw - 32px); }
.toast.err { background: var(--danger); color: #fff; }
@media (max-width: 1000px) {
  .adm { grid-template-columns: minmax(0, 1fr); }
  .adm-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .adm-side nav { display: flex; flex-wrap: wrap; }
  .adm-side-foot { flex-direction: row; display: flex; gap: 16px; padding: 10px 12px 0; }
  .adm-bar { top: 64px; }
  .adm-split, .adm-split.wide { grid-template-columns: minmax(0, 1fr); }
  .adm-tree { position: static; max-height: 50vh; }
}
@media (max-width: 600px) { .ed-grid { grid-template-columns: minmax(0, 1fr); } .place { grid-template-columns: minmax(0, 1fr); } }
.adm-side-foot .linkbtn { justify-self: start; text-align: left; font-size: 13.5px; }
.top-actions [data-cmdk] { display: inline-flex !important; }
@media (max-width: 1400px) { .adm-table .c-eng { display: none; } }
.adm-table select { max-width: 130px; }

/* =====================================================================  FABRICATION  */
.fab-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fab-card { position: relative; background: var(--surface-2); text-decoration: none; display: flex; flex-direction: column; min-width: 0; transition: background .2s; }
.fab-card:hover { background: var(--canvas); }
.fab-card:hover h2 { color: var(--accent); }
.fab-card.wait { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); }
.fab-no { position: absolute; top: 14px; left: 16px; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.fab-art { height: 200px; padding: 34px 30px 10px; border-bottom: 1px solid var(--line); }
.fab-body { padding: 18px 20px 56px; display: flex; flex-direction: column; gap: 8px; }
.fab-body h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.fab-body p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.fab-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.fab-go { position: absolute; left: 20px; bottom: 18px; display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 500; color: var(--accent); }
.fab-flow { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 28px 0 60px; }
.fab-flow li { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line-2); padding: 6px 12px; }
.fab-flow span, .stepper span { font-family: var(--mono); font-size: 11px; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; }
.fab { min-height: calc(100vh - 64px); display: flex; flex-direction: column; }
.fab-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.fab-top .crumb { font-size: 13px; color: var(--ink-3); text-decoration: none; }
.fab-top .crumb:hover { color: var(--accent); }
.fab-top h1 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.fab-top h1 span { font-weight: 400; color: var(--ink-3); }
.stepper { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 0 auto; flex-wrap: wrap; }
.stepper li { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); padding: 5px 10px; border-radius: 999px; }
.stepper li.done { color: var(--ink-2); }
.stepper li.done span { background: var(--ink-2); color: var(--on-ink); border-color: var(--ink-2); }
.stepper li.on { color: var(--ink); background: var(--accent-bg); box-shadow: inset 0 0 0 1px var(--accent-line); }
.stepper li.on span { border-color: var(--surface-2); }
.fab-pad { padding-top: 28px; padding-bottom: 60px; }
.fab-note { margin-top: 18px; font-size: 12.5px; }
.mcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.mcard { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 0 0 18px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font: inherit; transition: border-color .2s, transform .2s; position: relative; }
.mcard:hover, .mcard.on { border-color: var(--ink); transform: translateY(-2px); }
.mcard-art { height: 160px; padding: 22px; border-bottom: 1px solid var(--line); background: var(--canvas); }
.mcard b { font-size: 17px; padding: 0 18px; letter-spacing: -.01em; }
.mcard > span:not(.mbadge) { font-size: 13px; color: var(--ink-2); padding: 0 18px; }
.mbadge { position: absolute; top: 12px; right: 12px; font-size: 11px; background: var(--ink); color: var(--on-ink); padding: 2px 8px; }
.fab-split { flex: 1; display: grid; grid-template-columns: minmax(330px, 430px) minmax(0, 1fr); min-height: 0; }
.fab-form { border-right: 1px solid var(--line); background: var(--surface-2); padding: 18px 20px 40px; overflow-y: auto; max-height: calc(100vh - 120px); position: sticky; top: 64px; }
.fab-back { font-size: 12.5px; color: var(--accent); margin: -6px 0 12px; display: block; }
.fgroup { border-top: 1px solid var(--line); }
.fgroup > summary { list-style: none; cursor: pointer; padding: 12px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); display: flex; justify-content: space-between; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after { content: '+'; font-family: var(--mono); }
.fgroup[open] > summary::after { content: '–'; }
.ffields { display: grid; gap: 12px; padding-bottom: 14px; }
.ff { display: grid; gap: 5px; min-width: 0; }
.ff > label { display: flex; gap: 6px; align-items: baseline; font-size: 13px; color: var(--ink-2); }
.ff .unit { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.req { color: var(--danger); font-style: normal; font-weight: 600; }
.opt { font-style: normal; font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.ff input[type=text], .ff input[type=number], .ff select, .ff textarea { width: 100%; height: 36px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 10px; font-family: var(--mono); font-size: 13px; outline: none; }
.ff textarea { height: auto; padding: 8px 10px; resize: vertical; }
.ff input:focus, .ff select:focus, .ff textarea:focus { border-color: var(--ink); }
.ff.bad input, .ff.bad select, .ff.bad textarea { border-color: var(--danger); background: var(--danger-bg); }
.ff small { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.ff-bool { display: flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.ff-bool input { width: 16px; height: 16px; accent-color: var(--ink); }
.legend { font-size: 12px; margin-top: 12px; }
.fdrop { display: flex; gap: 12px; align-items: center; justify-content: space-between; border: 1px dashed var(--line-2); padding: 14px; margin-bottom: 14px; background: var(--surface-2); }
.fdrop.has { border-style: solid; border-color: var(--accent-line); background: var(--accent-bg); }
.fdrop b { display: block; font-size: 14px; }
.fdrop small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.fname { font-family: var(--mono); font-size: 12px; margin-top: 6px; color: var(--accent); }
.chips label small { color: inherit; opacity: .7; }
.ftable { margin-bottom: 14px; }
.ft-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.ft-head span { font-size: 12px; }
.ftable table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ftable th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 11px; padding: 4px 3px; border-bottom: 1px solid var(--line); }
.ftable td { padding: 3px; border-bottom: 1px solid var(--line); }
.ftable td:first-child { color: var(--ink-3); font-family: var(--mono); font-size: 11px; width: 20px; }
.ftable input { width: 100%; min-width: 0; height: 30px; border: 1px solid var(--line-2); padding: 0 6px; font-family: var(--mono); font-size: 12px; background: var(--surface-2); }
.ftable tr.sel td { background: var(--accent-bg); }
.ftable tr[data-row] { cursor: pointer; }
.nsides { white-space: nowrap; }
.nsides label { display: inline-grid; place-items: center; width: 22px; height: 26px; border: 1px solid var(--line-2); font-size: 11px; font-family: var(--mono); cursor: pointer; margin-right: 1px; }
.nsides label:has(input:checked) { background: var(--accent); color: var(--on-ink); border-color: var(--accent); }
.nsides input { display: none; }
.xbtn { border: 0; background: none; font-size: 18px; color: var(--ink-3); cursor: pointer; line-height: 1; }
.xbtn:hover { color: var(--accent); }
.fab-prev { display: grid; grid-template-rows: auto minmax(360px, 1fr) auto auto; min-width: 0; }
.pv-tabs { display: flex; gap: 4px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.pv-tabs button { height: 30px; padding: 0 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 12.5px; cursor: pointer; }
.pv-tabs button.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pv-tabs .spacer { flex: 1; }
.pv-status { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.pv-area { position: relative; height: 64vh; min-height: 360px; background: var(--canvas); overflow: auto; }
.pv-area:has(.notch-info) { height: auto; }
.pv-svg { height: 62vh; min-height: 360px; }
.pv-svg svg { width: 100%; height: 100%; display: block; cursor: grab; }
.pv3d { position: absolute; inset: 0; overflow: hidden; }
.pv-empty { display: grid; place-items: center; height: 360px; color: var(--ink-3); font-size: 14px; }
.notch-info { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.ni-head { font-size: 13px; margin-bottom: 8px; }
.notch-info p { font-size: 12.5px; margin: 8px 0 0; }
.vbox { padding: 12px 16px; border-top: 1px solid var(--line); }
.vbox ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.vbox li { font-size: 13px; padding: 6px 10px; border-left: 3px solid; }
.vbox li.error { border-color: var(--danger); background: var(--danger-bg); color: var(--danger-ink); }
.vbox li.warn { border-color: #d99a1e; background: var(--warn-bg); color: var(--warn-ink); }
.vbox .vok { margin: 0; color: var(--accent); font-size: 13.5px; }
.vbox.big { border: 1px solid var(--line); background: var(--surface-2); }
.fab-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.fab-actions .muted { margin-right: auto; font-size: 13px; }
.fab-actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.rev-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; }
.rev-table { margin-top: 14px; max-height: 50vh; overflow: auto; }
.rev-grid .fab-actions { margin-top: 16px; border: 1px solid var(--line); }
.tool-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ill-thumb { padding: 14px; }
@media (max-width: 1100px) { .fab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tool-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .fab-split, .rev-grid { grid-template-columns: minmax(0, 1fr); }
  .fab-form { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .stepper { margin-left: 0; }
  .stepper li { padding: 4px 6px; font-size: 0; gap: 0; }
  .stepper li span { font-size: 11px; }
  .stepper li.on { font-size: 12px; gap: 6px; }
}
@media (max-width: 600px) { .fab-grid { grid-template-columns: minmax(0, 1fr); } .pv-svg { height: 52vh; } }
.ftable { overflow-x: auto; }
.ftable table { min-width: 340px; }
.pv3d canvas { display: block; width: 100%; height: 100%; }

/* ================================================================== identity v2: white / black + green */
body { transition: background-color .2s, color .2s; }
.brand .deg { color: var(--accent-2); font-weight: 700; }
.btn-dark { background: var(--accent-2); color: var(--on-accent); border-color: var(--accent-2); }
.btn-dark:hover { background: color-mix(in srgb, var(--accent-2) 86%, var(--ink)); color: var(--on-accent); border-color: transparent; }
.btn:focus-visible, .icon-btn:focus-visible, .mainnav a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.mainnav a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent-2); }
@media (max-width: 900px) { .mainnav a.active { box-shadow: inset 3px 0 0 var(--accent-2); padding-left: 12px; } }
.kicker::before { background: var(--accent-2); }
input, select, textarea { background-color: var(--surface-2); color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--accent-2) !important; outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.stepper li.on span, .stepper li.done span { background: var(--accent-2); color: var(--on-accent); border-color: var(--accent-2); }
.seg label:has(input:checked), .chips label:has(input:checked) { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pv-tabs button.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pv-tabs button, .ftable input { background: var(--surface-2); color: var(--ink); }
.mbadge { background: var(--accent-2); color: var(--on-accent); font-weight: 600; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
:root[data-theme="dark"] .topbar { background: color-mix(in srgb, var(--bg) 82%, transparent); }
:root[data-theme="dark"] .mcard-art, :root[data-theme="dark"] .fab-art, :root[data-theme="dark"] .tcard-pic, :root[data-theme="dark"] .fcard .ill { background: var(--bg-2); }
:root[data-theme="dark"] .ill, :root[data-theme="dark"] .mcard-art svg, :root[data-theme="dark"] .fab-art svg { color: var(--ink-2); }

/* typography: one scale for both modes */
h1, h2, h3, .ptitle, .h2, .h2b { color: var(--ink); text-wrap: balance; }
.plead, .lead, p { text-wrap: pretty; }
.ptitle, .hero2 h1, .h2b { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; }
.numbers b, .fab-no, .pv-status, td, .dnode { font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] body { font-weight: 380; }                 /* light-on-dark reads heavier: compensate */
:root[data-theme="dark"] b, :root[data-theme="dark"] strong, :root[data-theme="dark"] h1, :root[data-theme="dark"] h2, :root[data-theme="dark"] h3 { font-weight: 650; }
:root[data-theme="dark"] .ptitle, :root[data-theme="dark"] .hero2 h1 { font-weight: 700; }
.numbers b { color: var(--accent); }

/* type step (flashing / glass) */
.typecards .mcard-art { display: grid; place-items: center; }
.tsketch { width: 100%; height: 100%; max-height: 120px; fill: none; stroke: currentColor; stroke-width: 1.6; color: var(--ink); }
.tsketch text { fill: currentColor; stroke: none; font-family: var(--mono); }
.tsketch .acc, .tsketch circle { stroke: var(--accent-2); }
.tsketch circle + text { fill: var(--accent); }

/* Schüco system picker */
.sch { gap: 8px; }
.sch-systems { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sch-sys { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); cursor: pointer; border-radius: 10px; }
.sch-sys small { color: var(--ink-3); font-size: 11.5px; }
.sch-sys.on { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); background: var(--accent-bg); }
.sch-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-top: 10px; font-size: 13px; }
.sch-head span { color: var(--ink-3); font-size: 11.5px; text-align: right; }
.sch-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; max-height: 236px; overflow-y: auto; padding: 2px; }
.sch-sec { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; border-radius: 8px; font-size: 11px; }
.sch-sec svg { width: 52px; height: 52px; fill: color-mix(in srgb, var(--ink) 10%, transparent); stroke: var(--ink); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.sch-sec svg polygon { vector-effect: non-scaling-stroke; }
.sch-sec span { color: var(--ink-3); font-size: 10.5px; }
.sch-sec:hover { border-color: var(--ink-3); }
.sch-sec.on { border-color: var(--accent-2); background: var(--accent-bg); }
.sch-sec.on svg { stroke: var(--accent); fill: color-mix(in srgb, var(--accent-2) 22%, transparent); }
.ftable td.derived { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

/* linked drawing set */
.pv-area:has(.dset) { height: auto; overflow: visible; }
.dset { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 62vh; }
.dset-tree { border-right: 1px solid var(--line); background: var(--surface); padding: 12px 10px; overflow-y: auto; max-height: 78vh; color: var(--ink); }
.dset-count { font-size: 11.5px; color: var(--ink-3); margin: 0 4px 10px; }
.dset-tree ul { list-style: none; margin: 0; padding: 0; }
.dset-tree ul ul { margin-left: 12px; border-left: 1px solid var(--line); padding-left: 6px; }
.dnode { width: 100%; display: flex; justify-content: space-between; gap: 6px; align-items: baseline; text-align: left; border: 0; background: none; color: var(--ink); padding: 5px 8px; border-radius: 6px; cursor: pointer; font-family: var(--mono); font-size: 12px; }
.dnode small { color: var(--ink-3); font-family: var(--sans); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dnode:hover { background: var(--hover); }
.dnode.on { background: var(--accent-2); color: var(--on-accent); }
.dnode.on small { color: var(--on-accent); }
.dnode.lv-ga b::before, .dnode.lv-as b::before, .dnode.lv-pt b::before { display: inline-block; width: 22px; font-size: 9.5px; opacity: .65; }
.dnode.lv-ga b::before { content: 'GA'; } .dnode.lv-as b::before { content: 'AS'; } .dnode.lv-pt b::before { content: 'PT'; }
.dset-main { min-width: 0; display: flex; flex-direction: column; background: var(--canvas); }
.dset-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 13px; }
.dset-head b { font-family: var(--mono); }
.dlevel { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.drel { color: var(--ink-3); font-size: 12px; }
.dlink { font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--accent-line); background: var(--accent-bg); color: var(--accent); padding: 1px 7px; border-radius: 999px; cursor: pointer; margin: 1px 2px 1px 0; }
.dlink:hover, .dlink.on { background: var(--accent-2); color: var(--on-accent); border-color: var(--accent-2); }
.dset .pv-svg { height: 52vh; background: var(--canvas); }
.dset-table { overflow-x: auto; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--ink); max-height: 30vh; }
@media (max-width: 760px) { .dset { grid-template-columns: minmax(0, 1fr); } .dset-tree { border-right: 0; border-bottom: 1px solid var(--line); max-height: 200px; } }

/* tools hub */
.hub-sec { margin: 0 0 56px; }
.hub-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hub-head h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.02em; }
.hub-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 620px; }
.hub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.hub-item { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; border-radius: 12px; transition: border-color .15s, transform .15s; }
.hub-item:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.hub-item b { font-size: 15px; }
.hub-item span { color: var(--ink-2); font-size: 13px; }
.hub-item .hub-meta { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--ink-3); }
.hub-fams { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-fams a { text-decoration: none; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; color: var(--ink-2); }
.hub-fams a:hover { border-color: var(--accent-2); color: var(--ink); background: var(--accent-bg); }
.hub-search { width: min(360px, 100%); height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; }

/* ---------- unified parameter control: slider + number (js/controls.js), used by every tool */
.numctl { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: center; }
.numctl input[type=range] { height: 4px; border-radius: 4px; background: var(--line-2); accent-color: var(--accent); cursor: pointer; touch-action: pan-y; }
.numctl input[type=range]::-webkit-slider-thumb { width: 16px; height: 16px; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); transition: transform .12s; }
.numctl input[type=range]:active::-webkit-slider-thumb { transform: scale(1.18); }
.numctl input[type=range]::-moz-range-thumb { width: 12px; height: 12px; background: var(--accent); border: 2px solid var(--surface); }
.numctl input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
.ff-num.out .numctl input[type=range] { opacity: .45; }
.ff-num.out .numctl input[type=number] { border-color: var(--warn, #b7791f); }
@media (max-width: 520px) { .numctl { grid-template-columns: minmax(0, 1fr) 84px; } .numctl input[type=range]::-webkit-slider-thumb { width: 20px; height: 20px; } }

/* ---------- Tools section: the released fabrication tools */
.fab-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fab-card.big .fab-art { height: 260px; padding: 40px 48px 14px; }
.fab-card.big .fab-body { padding: 22px 26px 64px; }
.fab-card.big .fab-body h2 { font-size: 26px; }
.fab-types { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fab-types li { font-size: 12.5px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); }
.hub-note { margin: 22px 0 60px; font-size: 13.5px; color: var(--ink-3); }
.hub-note a { color: var(--ink); }
@media (max-width: 760px) { .fab-grid.two { grid-template-columns: 1fr; } .fab-card.big .fab-art { height: 200px; padding: 28px; } }

/* ---------- engineering calculators (js/calculators.js) */
.fab-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .fab-grid.three { grid-template-columns: 1fr; } }
.calc-group { margin-bottom: 40px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.calc-grid.compact { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.calc-card { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); text-decoration: none; transition: border-color .15s, background .15s; }
.calc-card:hover { border-color: var(--accent); background: var(--accent-bg); }
.calc-card b { font-size: 15.5px; color: var(--ink); } .calc-card span { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.calc-card em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 4px; }
.calc { padding-bottom: 70px; } .calc .crumb { display: inline-block; margin-top: 26px; }
.calc-split { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
.calc-in { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.calc-field { position: relative; }
.calc-field .calc-unit { position: absolute; right: 0; top: -2px; z-index: 1; }
.calc-unit { height: 26px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font: 12px var(--mono); }
.calc-in .ff select, .calc-in .ff input[type=text] { height: 36px; }
.calc-table table { width: 100%; } .calc-table input { width: 100%; min-width: 60px; }
.calc-out { position: sticky; top: 84px; display: grid; gap: 14px; }
.calc-res { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.calc-r { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.calc-r:last-child { border-bottom: 0; }
.calc-r span { font-size: 13.5px; color: var(--ink-2); }
.calc-r b { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.calc-r i { font-style: normal; font-size: 12px; color: var(--ink-3); min-width: 40px; }
.calc-r small { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-3); margin-top: -6px; }
.calc-r.main { background: var(--accent-bg); } .calc-r.main b { font-size: 19px; color: var(--ink); } .calc-r.main span { color: var(--ink); font-weight: 600; }
.calc-r.warn b, .calc-r.warn span { color: var(--danger); }
.calc-plan { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; } .calc-plan ol { margin: 6px 0 0; padding-left: 20px; font-family: var(--mono); line-height: 1.7; max-height: 240px; overflow: auto; }
.calc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.calc-method { border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; background: var(--surface); }
.calc-method summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.calc-method ol, .calc-method ul { margin: 8px 0 2px; padding-left: 20px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
@media (max-width: 900px) { .calc-split { grid-template-columns: 1fr; } .calc-out { position: static; } }

/* ---------- accounts (js/account.js): header button, sign-in forms, customer dashboard */
.acct-btn { text-decoration: none; white-space: nowrap; font-size: 13.5px; font-weight: 600; color: var(--on-accent, #0e1218); background: var(--accent-2); border-color: var(--accent-2); }
.acct-btn:hover { border-color: var(--ink); }
.acct-btn.active { box-shadow: 0 0 0 2px var(--accent-bg); }
.auth-wrap { max-width: 620px; }
.auth-form { max-width: 560px; margin-bottom: 80px; }
.auth-form small, .auth-form .opt { font-size: 12px; color: var(--ink-3); font-style: normal; font-weight: 400; }
.auth-form input:not([type=checkbox]), .auth-form select { display: block; width: 100%; height: 44px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 15px; font-family: inherit; }
.auth-form input:not([type=checkbox]):focus, .auth-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.auth-form input:disabled { opacity: .7; }
.auth-form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.auth-alt { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.auth-done h2 { margin: 0 0 8px; }
.form-note.ok { color: var(--accent); }
.form-note.err, .err { color: var(--danger); }
.linkbtn.danger { color: var(--danger); }
.dash { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; padding-top: 36px; padding-bottom: 80px; align-items: start; }
.dash-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.dash-who { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dash-who b { font-size: 15px; } .dash-who span { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.dash-nav nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14px; }
.dash-nav nav a:hover { background: var(--surface-2); color: var(--ink); }
.dash-nav nav a.on { background: var(--accent-bg); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.dash-main { min-width: 0; }
.dash-title { font-family: var(--display); font-stretch: 80%; font-weight: 650; font-size: clamp(28px, 3vw, 38px); margin: 0 0 18px; letter-spacing: -.01em; }
.dash-h { font-size: 17px; margin: 30px 0 12px; }
.dash-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.dcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 8px; }
.dcard { background: var(--surface); padding: 16px 18px; display: grid; gap: 4px; }
.dcard span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.dcard b { font-family: var(--mono); font-size: 24px; font-variant-numeric: tabular-nums; }
.dcard small { font-size: 12px; color: var(--ink-3); }
.dash-main table.data { width: 100%; font-size: 13px; }
.dash-main td.pos { color: var(--accent); font-weight: 600; } .dash-main td.neg { color: var(--ink-2); }
.dfiles { margin-top: 16px; border: 1px solid var(--line); display: grid; }
.dfiles .lh { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dfiles a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 13.5px; }
.dfiles a:hover { background: var(--accent-bg); } .dfiles a span { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.dtools, .dplans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.dtool, .dplan { border: 1px solid var(--line-2); border-radius: 12px; padding: 18px; display: grid; gap: 6px; text-decoration: none; background: var(--surface); }
.dtool:hover { border-color: var(--accent); } .dtool.off { opacity: .6; }
.dtool span, .dplan span { font-size: 13px; color: var(--ink-2); } .dtool em, .dplan em { font-style: normal; font-size: 13px; color: var(--accent); font-weight: 600; }
.dplan.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.acct-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 4px; padding: 12px 14px; border: 1px solid var(--accent-line, var(--line-2)); background: var(--accent-bg); border-radius: 10px; font-size: 13.5px; }
.acct-bar > span:first-child { flex: 1 1 260px; }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; gap: 18px; }
  .dash-nav { position: static; }
  .dash-nav nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .dash-nav nav a { white-space: nowrap; }
  .dash-main { overflow-x: auto; }
}

/* ---------- admin panel (js/console.js) */
.dash-nav nav a.dash-admin { margin-top: 8px; border: 1px solid var(--accent); color: var(--ink); font-weight: 600; }
.cs .dash-who span { font-family: inherit; }
.cs-id { font-family: var(--mono); font-size: 14px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.cs-range { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 18px; }
.cs-range button { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.cs-range button.on { border-color: var(--accent); background: var(--accent-bg); color: var(--ink); font-weight: 600; }
.cs-range input { height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); color: var(--ink); }
.cs .dcards { margin-bottom: 12px; }
.cs .dcard b { font-size: 21px; }
.cs-chart { width: 100%; height: auto; display: block; margin: 6px 0 4px; }
.cs-chart .cs-grid { stroke: var(--line); stroke-width: 1; }
.cs-chart .cs-tick { fill: var(--ink-3); font-size: 10.5px; font-family: var(--mono); }
.cs-chart .cs-fill { fill: var(--accent); }
.cs-chart .cs-hit { fill: transparent; }
.cs-chart .cs-bar:hover .cs-hit { fill: var(--accent-bg); }
.cs-hbars { display: grid; gap: 8px; margin: 6px 0 14px; }
.cs-hb { display: grid; grid-template-columns: 170px minmax(0, 1fr) 60px; gap: 10px; align-items: center; font-size: 13px; }
.cs-hb i { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--accent); width: var(--w); min-width: 2px; }
.cs-hb b { font-family: var(--mono); text-align: right; }
.cs-table { margin: 6px 0 18px; } .cs-table summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.cs-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.cs-filters input, .cs-filters select, .cs-form input:not([type=checkbox]), .cs-form select, .cs-form textarea, .cs-plans input:not([type=checkbox]) { height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13.5px; }
.cs-filters input[type=search] { flex: 1 1 260px; }
.cs-form textarea { height: auto; padding: 8px 10px; width: 100%; resize: vertical; }
.cs-scroll { overflow-x: auto; margin-bottom: 8px; }
.cs-list tbody tr { cursor: pointer; } .cs-list tbody tr:hover td { background: var(--accent-bg); }
.cs-bulk { position: sticky; bottom: 12px; margin-top: 10px; padding: 10px 14px; border: 1px solid var(--accent); background: var(--surface); border-radius: 10px; font-size: 13.5px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.cs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.cs-actions { display: grid; gap: 14px; }
.cs-form { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; background: var(--surface); margin-bottom: 14px; }
.cs-form h3 { margin: 0; font-size: 15px; }
.cs-form > input, .cs-form > select { width: 100%; }
.cs-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-row > input:not([type=checkbox]) { flex: 1 1 110px; min-width: 0; }
.cs-note { border-top: 1px solid var(--line); padding-top: 8px; } .cs-note p { margin: 0 0 2px; font-size: 13.5px; white-space: pre-wrap; } .cs-note small { color: var(--ink-3); font-size: 11.5px; }
.cs-json { font-family: var(--mono); font-size: 11.5px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-chk { display: inline-flex; gap: 4px; align-items: center; margin-right: 8px; font-size: 12.5px; white-space: nowrap; }
.cs-plans input:not([type=checkbox]) { width: 100%; min-width: 70px; height: 32px; }
.danger-btn { border-color: var(--danger) !important; color: var(--danger) !important; }
@media (max-width: 900px) { .cs-grid { grid-template-columns: 1fr; } .cs-hb { grid-template-columns: 110px minmax(0, 1fr) 48px; } }

/* ---------- Home showcase: four live tool demos (js/showcase.js) */
.show { padding: 64px 0 72px; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.show-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.show-nav { display: flex; gap: 8px; }
.show-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.show-arrow:hover { border-color: var(--accent); color: var(--accent); }
.show-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-bottom: 0; }
.show-tabs button { display: flex; gap: 10px; align-items: baseline; padding: 14px 16px; background: var(--surface-2); border: 0; border-right: 1px solid var(--line); font: 600 14.5px var(--sans, inherit); color: var(--ink-2); cursor: pointer; text-align: left; position: relative; }
.show-tabs button:last-child { border-right: 0; }
.show-tabs button span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); font-weight: 500; }
.show-tabs button[aria-selected=true] { background: var(--surface); color: var(--ink); }
.show-tabs button[aria-selected=true]::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.show-body { display: grid; grid-template-columns: 360px minmax(0, 1fr); border: 1px solid var(--line); background: var(--surface); min-height: 600px; }
.show-ctl { padding: 22px 22px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; max-height: 680px; overflow: auto; }
.show-ctl h3 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.show-ctl > p { margin: 2px 0 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.show-ctl .ffields { gap: 11px; padding: 0; }
.show-cta { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.show-cta .muted { font-size: 12px; }
.show-stage { position: relative; display: flex; flex-direction: column; min-width: 0; }
.show-views { display: flex; gap: 4px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.show-views button { padding: 6px 12px; border: 1px solid transparent; border-radius: 999px; background: none; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.show-views button.on { border-color: var(--line-2); background: var(--surface-2); color: var(--ink); }
.show-tip { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.show-3d, .show-2d { flex: 1; min-height: 440px; position: relative; background: var(--canvas); }
.show-3d canvas { display: block; width: 100% !important; height: 100% !important; position: absolute; inset: 0; }
.show-2d { padding: 18px; display: flex; }
.show-2d[hidden], .show-3d[hidden] { display: none; }
.show-2d svg { width: 100%; height: 100%; max-height: 520px; }
.show-load { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: #6b7486; }
.show-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-top: 1px solid var(--line); }
.show-facts div { padding: 12px 16px; border-right: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.show-facts span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.show-facts b { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-facts .warn b { color: var(--warn, #b7791f); font-family: inherit; font-size: 12px; white-space: normal; }
@media (max-width: 980px) {
  .show-body { grid-template-columns: minmax(0, 1fr); }
  .show-ctl { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; order: 2; }
  .show-stage { order: 1; }
  .show-3d, .show-2d { min-height: 340px; }
}
@media (max-width: 640px) {
  .show { padding: 44px 0 52px; }
  .show-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .show-tabs button { border-bottom: 1px solid var(--line); font-size: 13.5px; }
  .show-nav, .show-tip { display: none; }
  .show-3d, .show-2d { min-height: 300px; }
}

/* ---------- Phones and small tablets ---------- */
html, body { overflow-x: clip; }               /* safety net: no sideways page scroll on phones */
.nav-theme { display: none; }
@media (max-width: 600px) {
  /* top bar: square 36px icon buttons; the theme switch moves into the menu */
  .topbar { padding: 0 14px; gap: 8px; height: 58px; }
  .mainnav { top: 58px; padding: 6px 14px 12px; }
  .brand { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .top-actions { gap: 5px; flex-shrink: 0; }
  .top-actions .icon-btn { height: 36px; }
  .top-actions [data-cmdk], .top-actions .burger { width: 36px; padding: 0; justify-content: center; }
  .top-actions .theme-btn { display: none; }
  .top-actions .acct-btn { padding: 0 13px; font-size: 13px; }
  .nav-theme { display: block; text-align: left; padding: 12px 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink-2); cursor: pointer; }

  /* sections: tighter rhythm */
  .band { padding: 44px 0; }
  .band-head { margin-bottom: 22px; }
  .cta { padding: 44px 0; }
  .hero2-grid { gap: 20px; padding-bottom: 28px; }

  /* family cards: compact rows (picture left, text right) instead of tall tiles */
  .fcard { grid-template-rows: none; grid-template-columns: 96px minmax(0, 1fr); }
  .fcard-art { padding: 12px 8px; border-bottom: 0; border-right: 1px solid var(--line); display: flex; align-items: center; }
  .fcard-body { padding: 14px 16px; gap: 5px; }
  .fcard h3 { font-size: 16px; }
  .fcard p { font-size: 13px; -webkit-line-clamp: 2; }

  /* tool cards: shorter picture */
  .tgrid { gap: 12px; }
  .tcard-pic { height: 132px; }
  .tcard-body { padding: 14px 16px 46px; }
  .tcard-go { left: 16px; bottom: 14px; }

  /* project cards: wider, shorter picture */
  .pgrid { gap: 18px; }
  .pcard-pic { aspect-ratio: 16 / 9; }

  /* hero buttons: two per row, same height */
  .hero2 .row-btns .btn { flex: 1 1 auto; justify-content: center; }

  /* wide data tables scroll inside their card instead of pushing the page sideways */
  .card table.data { display: block; max-width: 100%; overflow-x: auto; }
}
@media (max-width: 380px) {
  .brand { font-size: 14px; }
  .top-actions .acct-btn { padding: 0 11px; }
}
