/* trig8n - UI in the Imforx Labs signature
   Grey scale only: ink #2B2B2B > steel #565656 > stone #848484 > pewter #B3B3B3 > line #E0E0E0 > ground #F4F4F4.
   Display: Inter Tight 300, text: Inter. Pills, 22px cards, hairline dividers, dark bands. */
:root {
  --ink: #2B2B2B; --ink-2: #3D3D3D; --steel: #565656; --stone: #848484; --pewter: #B3B3B3; --line: #E0E0E0;
  --ground: #F4F4F4; --paper: #FBFBFB; --dark: #2B2B2B; --dark-2: #353535; --dark-3: #424242;
  --dark-line: rgba(179, 179, 179, .2); --on-dark: #F4F4F4; --on-dark-2: #B3B3B3;

  --bg: var(--ground); --surface: var(--paper); --surface-2: #EEEEEE; --border: var(--line); --border-strong: #CCCCCC;
  --text: var(--ink); --text-2: #474747; --muted: #6B6B6B;
  --accent: var(--ink); --accent-2: var(--steel); --accent-soft: rgba(43, 43, 43, .07); --accent-text: var(--ink);
  --ok: #3E6650; --ok-soft: #E5ECE7; --warn: #74561C; --warn-soft: #F0EBE0; --err: #973A2D; --err-soft: #F3E5E2;
  --side: var(--dark); --side-2: var(--ink-2); --side-text: var(--on-dark-2); --side-muted: #9A9A9A;
  --k-trigger: #2B2B2B; --k-ai: #565656; --k-helper: #B3B3B3; --k-app: #848484; --k-logic: #CFCFCF;
  --heat-1: #E9E9E9; --heat-2: #D6D6D6; --heat-3: #A8A8A8; --heat-4: #6E6E6E; --heat-5: #2B2B2B;

  --radius: 22px; --radius-sm: 14px; --shadow: none; --lift: 0 30px 60px -40px rgba(47, 47, 47, .45);
  --display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.65, 0, .35, 1);
  --gut: clamp(20px, 4vw, 64px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1F1F1F; --surface: #272727; --surface-2: #2F2F2F; --border: rgba(179, 179, 179, .16); --border-strong: rgba(179, 179, 179, .3);
  --text: #F4F4F4; --text-2: #C8C8C8; --muted: #A3A3A3;
  --accent: #F4F4F4; --accent-2: #D9D9D9; --accent-soft: rgba(244, 244, 244, .08); --accent-text: #F4F4F4;
  --ok: #9CC3AB; --ok-soft: rgba(156, 195, 171, .12); --warn: #D9BE86; --warn-soft: rgba(217, 190, 134, .12); --err: #E4A196; --err-soft: rgba(228, 161, 150, .12);
  --side: #161616; --side-2: #2A2A2A;
  --k-trigger: #F4F4F4; --k-ai: #B3B3B3; --k-helper: #6E6E6E; --k-app: #8F8F8F; --k-logic: #4A4A4A;
  --heat-1: #2C2C2C; --heat-2: #3A3A3A; --heat-3: #5C5C5C; --heat-4: #8F8F8F; --heat-5: #E0E0E0;
  --lift: 0 30px 60px -40px rgba(0, 0, 0, .8); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { font: 15px/1.65 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--ink-2); color: #fff; }
a { color: var(--text); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 300; letter-spacing: -.02em; line-height: 1.1; }
h1 { font-size: clamp(36px, 4.4vw, 58px); letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: 22px; font-weight: 400; letter-spacing: -.015em; }
h3 { font-size: 18px; font-weight: 400; letter-spacing: -.01em; line-height: 1.3; }
h4 { font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.tone { color: #6B6B6B; }
:root[data-theme="dark"] .tone, .dark-band .tone, .login-side .tone { color: var(--stone); }
code, pre { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--surface-2); padding: 2px 7px; border-radius: 7px; }
pre { background: var(--dark); color: #E6E6E6; padding: 16px 18px; border-radius: var(--radius-sm); overflow-x: auto; margin: 10px 0 16px; }
pre code { background: none; padding: 0; color: inherit; }
pre.wrap { white-space: pre-wrap; }
.i { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 24px 18px 18px; position: sticky; top: 0; height: 100vh; gap: 18px; z-index: 30; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--on-dark); text-decoration: none !important; padding: 0 8px; }
.brand .globe { flex: none; }
.brand b { display: block; font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; }
.brand small { display: block; color: var(--side-muted); font-size: 11.5px; letter-spacing: .02em; margin-top: 1px; }
.side-search { position: relative; display: flex; align-items: center; gap: 9px; background: transparent; border: 1px solid var(--dark-line); border-radius: 999px; padding: 0 14px; color: var(--side-muted); transition: border-color .4s var(--ease); }
.side-search:focus-within { border-color: rgba(244, 244, 244, .5); }
.side-search input { background: none; border: 0; color: var(--on-dark); padding: 0; min-height: 40px; width: 100%; outline: none; font: 14px var(--font); }
.side-search input::placeholder { color: var(--side-muted); }
.live-results { position: absolute; top: calc(100% + 8px); left: 0; width: 440px; max-width: 80vw; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35); z-index: 50; overflow: hidden; }
.live-results a { display: block; padding: 11px 16px; color: var(--text); border-bottom: 1px solid var(--border); text-decoration: none; }
.live-results a:hover, .live-results a.sel { background: var(--accent-soft); }
.live-results a b { display: block; font-size: 14px; font-weight: 500; }
.live-results a span { font-size: 12.5px; color: var(--muted); }
.live-results .all { font-weight: 500; font-size: 13px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label { padding: 0 12px 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); }
.side nav { display: flex; flex-direction: column; gap: 16px; }
.side nav a, .side-foot > a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 0 12px; border-radius: 12px; color: var(--side-text); text-decoration: none !important; font-size: 14px; transition: background .4s var(--ease), color .4s var(--ease); }
.side nav a .pip, .side-foot > a .pip { flex: none; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--stone); transition: background .4s var(--ease), border-color .4s var(--ease), transform .5s var(--ease); }
.side nav a:hover, .side-foot > a:hover { color: var(--on-dark); background: rgba(244, 244, 244, .04); }
.side nav a:hover .pip { border-color: var(--on-dark); transform: scale(1.3); }
.side nav a.active, .side-foot > a.active { background: var(--ink-2); color: var(--on-dark); }
.side nav a.active .pip, .side-foot > a.active .pip { background: var(--on-dark); border-color: var(--on-dark); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 1px; border-top: 1px solid var(--dark-line); padding-top: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; }
.me .who { flex: 1; min-width: 0; }
.me b { display: block; font-size: 13.5px; font-weight: 500; color: var(--on-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--side-muted); font-size: 12px; text-transform: capitalize; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--steel); display: grid; place-items: center; font-weight: 500; font-size: 13px; color: #fff; flex: none; }
.side .icon-btn { color: var(--side-muted); }
.side .icon-btn:hover { color: var(--on-dark); background: rgba(244, 244, 244, .06); }
.main { padding: 40px var(--gut) 80px; min-width: 0; max-width: 1520px; width: 100%; }
.menu-btn.icon-btn { display: none; }

/* ---------- buttons ---------- */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text); font: 500 14px var(--font); letter-spacing: .01em; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: color .5s var(--ease), border-color .5s var(--ease); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--text); transform: translateY(101%); transition: transform .6s var(--ease); }
.btn:hover { color: var(--bg); border-color: var(--text); }
.btn:hover::before { transform: none; }
.btn .i { transition: transform .5s var(--ease); }
.btn:hover .i.arrowish, .btn:hover .arr { transform: translateX(4px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); height: 48px; padding: 0 26px; }
.btn.primary::before { background: var(--steel); }
:root[data-theme="dark"] .btn.primary::before { background: #CFCFCF; }
.btn.primary:hover { color: var(--bg); border-color: var(--steel); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { border-color: var(--text); }
.btn.danger { color: var(--err); }
.btn.danger::before { background: var(--err); }
.btn.danger:hover { color: #fff; border-color: var(--err); }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; gap: 6px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; }
.icon-btn { background: none; border: 0; color: var(--muted); width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); }
.icon-btn:hover { background: var(--accent-soft); color: var(--text); }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; color: var(--text); border-bottom: 1px solid currentColor; padding-bottom: 3px; text-decoration: none !important; }
.link-arrow svg { transition: transform .5s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- forms ---------- */
input, select, textarea { font: 15px var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 16px; min-height: 46px; transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
select { padding-right: 36px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%23848484' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
textarea { resize: vertical; line-height: 1.6; padding: 14px 16px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 16px; height: 16px; padding: 0; accent-color: var(--ink); }
:root[data-theme="dark"] input[type="checkbox"], :root[data-theme="dark"] input[type="radio"] { accent-color: #F4F4F4; }
label { display: flex; flex-direction: column; gap: 8px; font-weight: 500; font-size: 13px; color: var(--text-2); }
label.toggle { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 14px; }
.row > label { flex: 1; min-width: 160px; }
.row > input { flex: 1; min-width: 160px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- chips, flashes, tables ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; border-radius: 999px; background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 500; border: 1px solid var(--border-strong); text-decoration: none !important; white-space: nowrap; transition: border-color .3s var(--ease), background .3s var(--ease); }
a.chip:hover { border-color: var(--text); color: var(--text); }
.chip.ghost { border-color: var(--border); }
.chip.trig { background: var(--surface-2); border-color: transparent; color: var(--text-2); }
.chip.removable { background: var(--accent); color: var(--bg); border-color: var(--accent); padding-right: 8px; }
.chip.removable .i { opacity: .7; }
.chip.eng { background: var(--surface-2); color: var(--text); border-color: transparent; }
.chip.eng::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
[class*="eng-"] { background-color: var(--steel); }
.chip.eng[class*="eng-"] { background: var(--surface-2) !important; }
.dot, .tile .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: var(--steel) !important; }
.dot.eng-claude, .dot.eng-openai, .dot.eng-gemini { background: var(--text) !important; }
.flash { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 14px; border: 1px solid transparent; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--err-soft); color: var(--err); }
.flash-warn { background: var(--warn-soft); color: var(--warn); }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 24px); background: var(--dark); color: var(--on-dark); padding: 12px 20px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease), transform .6s var(--ease); z-index: 100; max-width: 90vw; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: var(--on-dark); text-decoration: underline; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.table th { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; border-bottom-color: var(--text); }
.table tbody tr { transition: background .3s var(--ease); }
.table tbody tr:hover { background: var(--accent-soft); }
.table tr.off td { opacity: .5; }
.table form.inline { display: flex; gap: 6px; align-items: center; }
.table form.inline input { min-width: 0; width: 160px; min-height: 36px; padding: 6px 12px; font-size: 13px; }
.table form.inline select { min-height: 36px; padding: 6px 32px 6px 12px; font-size: 13px; }
.table.small td { font-size: 13px; padding: 9px 12px; }

/* ---------- page layout ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 44px; flex-wrap: wrap; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 18px; max-width: 920px; }
.eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--steel); }
:root[data-theme="dark"] .eyebrow { color: var(--on-dark-2); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .8; flex: none; }
.lead { color: var(--text-2); margin: 0; font-size: 17px; line-height: 1.65; max-width: 680px; }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: inherit; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 32px; margin-bottom: 24px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.panel-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.panel-head > a { font-size: 14px; font-weight: 500; }
.panel-head p { margin: 0; flex-basis: 100%; font-size: 14px; }
.section { margin: 0 0 64px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head > div { display: flex; flex-direction: column; gap: 14px; }
.section-head h2 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 300; letter-spacing: -.03em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.two-col.wide-left { grid-template-columns: 1.7fr 1fr; }
.two-col > .panel { margin-bottom: 24px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 64px; border-top: 1px solid var(--border); }
.stat { padding: 28px 24px 0; border-left: 1px solid var(--border); background: none; }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat b { display: block; font-family: var(--display); font-size: clamp(40px, 4vw, 56px); font-weight: 300; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 220px; }
.empty { text-align: center; padding: 80px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty h3 { font-size: 26px; color: var(--text); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.list li a { display: flex; gap: 10px; align-items: center; font-weight: 500; }

/* dark band (Idea Studio, workflow hero, login) */
.dark-band { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--dark); color: var(--on-dark); padding: clamp(28px, 4vw, 52px); margin-bottom: 64px; }
.dark-band::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(ellipse 40% 45% at 70% 30%, rgba(255, 255, 255, .09), transparent 70%); animation: drift 22s var(--ease-io) infinite alternate; pointer-events: none; }
.dark-band > * { position: relative; }
.dark-band .eyebrow { color: var(--on-dark-2); }
.dark-band .lead, .dark-band p { color: var(--on-dark-2); }
.dark-band h1, .dark-band h2, .dark-band h3 { color: var(--on-dark); }
.dark-band textarea, .dark-band input, .dark-band select { background: var(--dark-2); color: var(--on-dark); border-color: var(--dark-line); }
.dark-band textarea:focus, .dark-band input:focus, .dark-band select:focus { border-color: rgba(244, 244, 244, .6); box-shadow: 0 0 0 4px rgba(244, 244, 244, .06); }
.dark-band label { color: var(--on-dark-2); }
.dark-band .btn { color: var(--on-dark); border-color: rgba(244, 244, 244, .35); }
.dark-band .btn::before { background: var(--on-dark); }
.dark-band .btn:hover { color: var(--dark); border-color: var(--on-dark); }
.dark-band .btn.primary { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }
.dark-band .btn.primary::before { background: #CFCFCF; }
.dark-band .chip { color: var(--on-dark-2); border-color: var(--dark-line); }
.dark-band a { color: var(--on-dark); }
.dark-band code { background: var(--dark-2); color: var(--on-dark); }
@keyframes drift { from { transform: translate(-6%, -4%); } to { transform: translate(8%, 6%); } }
.idea-band { display: flex; flex-wrap: wrap; gap: 48px; }
.idea-band > div { flex: 1 1 340px; display: flex; flex-direction: column; gap: 20px; }
.idea-band form { flex: 1.4 1 440px; display: flex; flex-direction: column; gap: 16px; }
.idea-band h2 { font-size: clamp(32px, 3.2vw, 46px); font-weight: 300; letter-spacing: -.03em; line-height: 1.04; }
.idea-band .row { margin-top: 0; align-items: center; }
.idea-band select { min-height: 40px; height: 40px; padding: 0 34px 0 16px; border-radius: 999px; font-size: 13.5px; }

/* stages strip */
.stage-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.stage-strip a { display: flex; flex-direction: column; gap: 6px; padding: 22px 18px; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; transition: background .4s var(--ease); }
.stage-strip a:nth-child(5n+1) { border-left: 0; padding-left: 0; }
.stage-strip a:hover { background: var(--accent-soft); }
.stage-strip span { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.stage-strip b { font-family: var(--display); font-weight: 300; font-size: 21px; }
.stage-strip em { font-style: normal; font-size: 13px; color: var(--muted); }

/* matrix */
.matrix-wrap { overflow-x: auto; }
.matrix { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 13px; }
.matrix th { font-weight: 400; color: var(--text-2); text-align: left; white-space: nowrap; }
.matrix thead th { text-align: center; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; }
.matrix tbody th a { color: var(--text); display: flex; gap: 8px; align-items: center; padding-right: 12px; }
.matrix td { text-align: center; border-radius: 8px; height: 34px; min-width: 46px; background: var(--surface-2); transition: transform .4s var(--ease); }
.matrix td a { display: block; line-height: 34px; color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; }
.matrix td.lv1 { background: var(--heat-1); } .matrix td.lv2 { background: var(--heat-2); } .matrix td.lv3 { background: var(--heat-3); color: #fff; }
.matrix td.lv4 { background: var(--heat-4); color: #fff; } .matrix td.lv5 { background: var(--heat-5); color: var(--bg); }
.matrix td:hover { transform: scale(1.08); }
.matrix .tot { background: none; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tiles.dense { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tile { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none !important; background: var(--surface); transition: border-color .4s var(--ease), transform .5s var(--ease); }
.tile:hover { border-color: var(--text); transform: translateY(-2px); }
.tile span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.tile b { color: var(--muted); font-weight: 400; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.cards.cols-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cards.cols-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 14px; transition: transform .7s var(--ease), box-shadow .7s var(--ease), border-color .5s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--lift); border-color: var(--border-strong); }
.card h3 { font-size: 21px; line-height: 1.25; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card .save, .card .badges, .card .wf-meta a { position: relative; z-index: 1; }
.card p { margin: 0; color: var(--text-2); font-size: 14px; flex: 1; line-height: 1.6; }
.wf-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 26px; }
.fn-tag { display: inline-flex; gap: 7px; align-items: center; font-size: 11.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.save { background: none; border: 0; color: var(--border-strong); cursor: pointer; padding: 4px; border-radius: 50%; transition: color .3s var(--ease), transform .4s var(--ease); }
.save:hover { color: var(--text); transform: scale(1.12); }
.save.on { color: var(--text); }
.save.on svg { fill: currentColor; }
.btn.save { color: var(--text); }
.btn.save.on { border-color: var(--text); }
.stack > .btn.small { align-self: flex-start; }
.wf-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 16px; border-top: 1px solid var(--border); }
.wf-meta.big { margin-top: 4px; padding-top: 0; border-top: 0; }
.steps { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.progress { height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--text); border-radius: 4px; transition: width 1.2s var(--ease); }
.progress.big { height: 6px; flex: 1; }

/* ---------- browse ---------- */
.browse { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.facets { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.facet-tools { display: flex; flex-direction: column; gap: 12px; padding: 0 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.facet { border-bottom: 1px solid var(--border); padding: 14px 0; }
.facet summary { cursor: pointer; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); padding: 2px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
:root[data-theme="dark"] .facet summary { color: var(--on-dark-2); }
.facet summary::-webkit-details-marker { display: none; }
.facet summary::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); transition: transform .4s var(--ease); }
.facet[open] summary::after { transform: rotate(225deg); }
.count-pill { background: var(--accent); color: var(--bg); border-radius: 10px; font-size: 10.5px; padding: 0 7px; letter-spacing: 0; }
.facet-filter { width: 100%; margin: 10px 0 4px; min-height: 36px; padding: 6px 14px; font-size: 13px; border-radius: 999px; }
.facet-list { max-height: 300px; overflow-y: auto; margin-top: 8px; }
.opt { flex-direction: row; align-items: center; gap: 10px; padding: 5px 4px; font-weight: 400; color: var(--text); cursor: pointer; border-radius: 8px; transition: background .3s var(--ease); }
.opt:hover { background: var(--accent-soft); }
.opt span { flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt em { font-style: normal; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.toolbar select { border-radius: 999px; min-height: 48px; }
.searchbox { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; padding: 0 20px; min-width: 240px; color: var(--muted); transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.searchbox:focus-within { border-color: var(--text); box-shadow: 0 0 0 4px var(--accent-soft); }
.searchbox input { border: 0; outline: none; flex: 1; padding: 0; min-height: 48px; background: none; box-shadow: none !important; }
.show-facets { display: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.active-filters .chip.removable { height: 32px; padding: 0 12px 0 14px; }
.active-filters .clear { font-size: 13px; margin-left: 6px; color: var(--muted); }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text); text-decoration: none; font-size: 14px; display: inline-grid; place-items: center; transition: background .4s var(--ease), color .4s var(--ease); }
.pager a:hover { border-color: var(--text); }
.pager a.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.pager span { border-color: transparent; }

/* ---------- workflow detail ---------- */
.wf-hero { margin: -40px calc(-1 * var(--gut)) 56px; border-radius: 0; padding: 32px var(--gut) 56px; }
.wf-hero .crumbs { color: var(--on-dark-2); }
.wf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.wf-head > div:first-child { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; max-width: 880px; }
.wf-head h1 { font-size: clamp(36px, 4.2vw, 60px); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.wf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.wf-side .panel { padding: 26px; }
.wf-side h3 { margin-bottom: 14px; font-family: var(--font); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.need { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.need li { display: flex; gap: 10px; align-items: center; color: var(--text); padding: 11px 0; border-top: 1px solid var(--border); font-size: 14px; }
.need .i { color: var(--text); }
.kv { display: grid; grid-template-columns: 74px minmax(0, 1fr); margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; padding: 12px 0; border-top: 1px solid var(--border); }
.kv dd { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 0; border-top: 1px solid var(--border); }
.story { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; counter-reset: s; }
.story li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; color: var(--text-2); padding: 14px 0; border-top: 1px solid var(--border); font-size: 15px; }
.story li::before { content: counter(s, decimal-leading-zero); font-size: 12px; letter-spacing: .08em; color: var(--muted); padding-top: 3px; }
.prose { font-size: 16px; }
.prose p { margin: 0 0 14px; color: var(--text-2); line-height: 1.75; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; color: var(--text-2); line-height: 1.75; }
.prose details { border-top: 1px solid var(--border); padding: 12px 0; }
.prose summary { cursor: pointer; font-weight: 500; }
.prose h3, .prose h4 { margin: 20px 0 10px; }

/* simulation (dark screen) */
.sim { background: var(--dark); color: var(--on-dark); border-color: var(--dark-line); --k-trigger: #F4F4F4; --k-ai: #CFCFCF; --k-helper: #9A9A9A; --k-app: #8F8F8F; --k-logic: #A8A8A8; }
.sim-explain .kind { color: #1F1F1F !important; }
.sim .panel-head h2 { color: var(--on-dark); }
.sim .muted { color: var(--on-dark-2); }
.sim .btn { color: var(--on-dark); border-color: rgba(244, 244, 244, .3); }
.sim .btn::before { background: var(--on-dark); }
.sim .btn:hover { color: var(--dark); }
.sim .btn.primary { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }
.sim .btn.primary::before { background: #CFCFCF; }
.sim-controls { display: flex; gap: 8px; }
.sim-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 14px; }
.sim-explain { min-height: 150px; }
.sim-canvas { position: relative; background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius-sm); min-height: 300px; overflow: auto; background-image: radial-gradient(rgba(179, 179, 179, .14) 1px, transparent 1px); background-size: 20px 20px; }
.sim-canvas svg { display: block; }
.sim-node rect { fill: #3A3A3A; stroke: rgba(179, 179, 179, .35); stroke-width: 1; transition: all .5s var(--ease); }
.sim-node .bar { stroke: none; }
.sim-node text { font: 500 11.5px var(--font); fill: #F4F4F4; pointer-events: none; }
.sim-node text.app { font-size: 10px; fill: #B3B3B3; font-weight: 400; }
.sim-node { cursor: pointer; }
.sim-node.k-helper rect.box { stroke-dasharray: 4 3; }
.sim-node.done rect.box { stroke: #B3B3B3; fill: #424242; }
.sim-node.active rect.box { stroke: #F4F4F4; stroke-width: 2; fill: #4A4A4A; filter: drop-shadow(0 0 10px rgba(244, 244, 244, .3)); }
.sim-node.dim { opacity: .4; }
.sim-edge { fill: none; stroke: rgba(179, 179, 179, .35); stroke-width: 1.3; }
.sim-edge.ai { stroke-dasharray: 3 4; }
.sim-edge.lit { stroke: #F4F4F4; stroke-width: 2; }
.sim-dot { fill: #F4F4F4; }
.sim-explain { background: var(--dark-2); border-radius: var(--radius-sm); padding: 18px; font-size: 14px; border: 1px solid var(--dark-line); max-height: 440px; overflow-y: auto; color: var(--on-dark-2); }
.sim-explain .stepno { font-size: 11px; font-weight: 500; color: var(--on-dark-2); text-transform: uppercase; letter-spacing: .14em; }
.sim-explain h4 { margin: 6px 0 8px; font-family: var(--display); font-size: 20px; font-weight: 300; letter-spacing: -.01em; text-transform: none; color: var(--on-dark); }
.sim-explain .kind { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px; color: var(--dark); margin-bottom: 10px; }
.sim-explain .kind.k-trigger { background: #F4F4F4; } .sim-explain .kind.k-logic { background: #6E6E6E; color: #F4F4F4; } .sim-explain .kind.k-ai { background: #CFCFCF; }
.sim-explain ul { padding-left: 18px; margin: 10px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 12.5px; color: var(--on-dark-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.sim .k-trigger, .legend .k-trigger { background: #F4F4F4; } .sim .k-ai, .legend .k-ai { background: #CFCFCF; } .legend .k-helper { background: transparent; border: 1px dashed #B3B3B3; }
.legend .k-app { background: #8F8F8F; } .legend .k-logic { background: #5A5A5A; }
.k-trigger { background: var(--k-trigger); } .k-ai { background: var(--k-ai); } .k-helper { background: var(--k-helper); } .k-app { background: var(--k-app); } .k-logic { background: var(--k-logic); }

/* ---------- idea studio / project ---------- */
.steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; counter-reset: st; color: var(--text-2); }
.steps-list li { counter-increment: st; display: grid; grid-template-columns: 40px minmax(0, 1fr); padding: 14px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.steps-list li::before { content: counter(st, decimal-leading-zero); font-size: 12px; letter-spacing: .08em; color: var(--muted); padding-top: 2px; }
.card.project h3 { margin-top: 2px; }
.inline-rename input { font: 300 clamp(34px, 4vw, 56px)/1.05 var(--display); letter-spacing: -.035em; border: 1px solid transparent; background: none; padding: 0 6px; margin-left: -7px; width: 100%; min-width: 300px; min-height: 0; }
.inline-rename input:hover { border-color: var(--border); }
.progress-band { display: flex; align-items: center; gap: 16px; margin: -16px 0 32px; font-size: 14px; color: var(--text-2); }
.brief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.brief-grid h4 { margin-top: 0; }
.brief-grid p, .brief-grid ul { margin: 0; color: var(--text-2); }
.idea-text summary { cursor: pointer; font-weight: 500; }
.idea-text p { color: var(--text-2); margin: 12px 0 0; }
.pipeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 16px; align-items: start; scrollbar-width: thin; }
.stage-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.stage-col header { padding: 4px 4px 8px; }
.stage-col header h3 { font-size: 19px; }
.stage-col header p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.stage-col.has-gap header h3::after { content: " \00B7  gap"; color: var(--warn); font-family: var(--font); font-size: 12px; font-weight: 500; }
.tasks summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); }
.tasks ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 6px; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.item:hover { transform: translateY(-2px); box-shadow: var(--lift); }
.item.status-doing { border-color: var(--text); }
.item.status-done { background: var(--surface-2); }
.item.status-done .item-title { text-decoration: line-through; color: var(--muted); }
.item.status-skipped { opacity: .5; }
.item-title { font-weight: 500; color: var(--text); font-size: 14px; }
.item p { margin: 0; font-size: 13px; color: var(--text-2); }
.why { color: var(--muted); font-size: 12px; }
.item-foot { display: flex; align-items: center; gap: 2px; margin-top: 4px; }
.item-foot select { min-height: 32px; padding: 2px 30px 2px 12px; font-size: 12.5px; margin-right: auto; border-radius: 999px; background-position: right 10px center; }
.gap-note { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; }
.add-more { font-size: 13px; display: flex; gap: 6px; align-items: center; }

/* ---------- settings / agent ---------- */
.ok-line { color: var(--ok); display: flex; gap: 8px; align-items: center; font-weight: 500; }
.token-new { background: var(--surface-2); border: 1px solid var(--text); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 18px; }
.token-new p { margin: 0 0 10px; }
.copyline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copyline code { font-size: 12.5px; padding: 8px 12px; word-break: break-all; }
.tool-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; color: var(--text-2); font-size: 14px; }
.tool-list li { padding: 12px 0; border-top: 1px solid var(--border); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--ground); }
.login-side { position: relative; overflow: hidden; flex: 999 1 560px; min-width: 0; min-height: 100vh; padding: 48px var(--gut); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; background: var(--dark); color: var(--on-dark); }
.login-side::before { content: ""; position: absolute; inset: -30%; background: radial-gradient(ellipse 38% 42% at 72% 26%, rgba(255, 255, 255, .11), transparent 70%); animation: drift 24s var(--ease-io) infinite alternate; pointer-events: none; }
.login-side > * { position: relative; }
.login-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.login-top .brand { padding: 0; }
.login-top small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-2); }
.login-hero { display: flex; flex-direction: column; gap: 28px; max-width: 760px; }
.login-hero .eyebrow { color: var(--on-dark-2); }
.login-hero h1 { font-size: clamp(48px, 6.2vw, 92px); line-height: .98; color: var(--on-dark); }
.login-hero p { margin: 0; max-width: 500px; font-size: 17px; line-height: 1.65; color: var(--on-dark-2); }
.login-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--dark-line); }
.login-stats div { padding: 24px 20px 0; border-left: 1px solid var(--dark-line); }
.login-stats div:first-child { padding-left: 0; border-left: 0; }
.login-stats b { display: block; font-family: var(--display); font-weight: 300; font-size: clamp(32px, 3.2vw, 46px); letter-spacing: -.03em; line-height: 1.05; }
.login-stats span { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.login-card { flex: 1 1 440px; min-width: 0; padding: 48px var(--gut); display: flex; flex-direction: column; justify-content: center; background: var(--ground); }
.login-card form, .login-card .login-inner { width: 100%; max-width: 380px; margin: 0 auto; }
.login-inner { display: flex; flex-direction: column; gap: 22px; }
.login-inner h2 { font-size: 42px; font-weight: 300; letter-spacing: -.03em; line-height: 1.05; }
.login-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.brand.big { color: var(--text); margin-bottom: 20px; }

/* installer */
.install { max-width: 720px; margin: 40px auto; padding: 0 16px; }

/* ---------- skills / MCP finder ---------- */
.skills-toggle { padding: 0 18px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; height: 48px; white-space: nowrap; transition: background .4s var(--ease), color .4s var(--ease); }
.skills-toggle:has(input:checked) { border-color: var(--text); background: var(--text); color: var(--bg); }
.skills-panel { margin-bottom: 24px; }
.source-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.skills-form .toolbar { margin-bottom: 14px; }
.source-status { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--err-soft); color: var(--err); border-color: transparent; }
.chip.ok::before, .chip.bad::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.src-github, .chip.src-clawhub, .chip.src-skillsmp, .chip.src-smithery, .chip.src-registry { background: var(--surface-2); color: var(--text-2); border-color: transparent; }
.skill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--text); }
.skill { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--border); transition: background .5s var(--ease); }
.skill:hover { background: linear-gradient(90deg, transparent, var(--accent-soft) 20%, transparent); }
.skill.warned { border-bottom-color: var(--err); }
.skill .rank, .skill .rank.medal { width: auto; height: auto; border-radius: 0; background: none !important; color: var(--text); font-family: var(--display); font-weight: 300; font-size: 44px; line-height: 1; letter-spacing: -.03em; display: block; font-variant-numeric: tabular-nums; }
.skill .rank:not(.medal) { color: #8A8A8A; }
.skill-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.skill-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.skill-name { font-family: var(--display); font-weight: 400; font-size: 23px; letter-spacing: -.015em; color: var(--text); }
.skill-main p { margin: 0; color: var(--text-2); font-size: 15px; max-width: 760px; }
.skill-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.warn-line { color: var(--err) !important; display: flex; gap: 6px; align-items: center; }
.skill-mini { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 28px; }
.skill-mini li { font-size: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.skill-mini li p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcp-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.mcp-cat { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text); font-size: 13.5px; text-decoration: none !important; transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease); }
.mcp-cat:hover { border-color: var(--text); }
.mcp-cat.active, .mcp-cat.pick.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.mcp-cat .i { opacity: .7; }
.mcp-mode { font-family: var(--display); font-weight: 400; font-size: 18px; margin-right: 6px; }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.rating b { font-weight: 500; color: var(--text); }
.rating-stars { position: relative; display: inline-block; color: var(--border-strong); letter-spacing: 1px; font-size: 13px; line-height: 1; }
.rating-stars::before { content: "\2605\2605\2605\2605\2605"; position: absolute; left: 0; top: 0; width: calc(var(--r) / 5 * 100%); overflow: hidden; white-space: nowrap; color: var(--text); }
.chip.remote { background: transparent; color: var(--text); border-color: var(--text); }
.chip.cat { background: transparent; }
.copyline .muted.small { flex: none; min-width: 96px; }
.mcp-project { margin-bottom: 20px; }

/* ---------- badges ---------- */
.badges { display: inline-flex; gap: 5px; margin-left: auto; margin-right: 4px; }
.badge-top, .badge-mcp, .badge-pop, .badge-pick { display: inline-flex; align-items: center; gap: 4px; height: 24px; font-size: 11.5px; font-weight: 500; padding: 0 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; cursor: help; }
.badge-top { background: var(--text); color: var(--bg); }
.badge-pick { background: var(--ink-2); color: #F4F4F4; }
:root[data-theme="dark"] .badge-pick { background: #D9D9D9; color: #1F1F1F; }
.badge-mcp { border: 1px solid var(--text); color: var(--text); }
.badge-pop { border: 1px solid var(--border-strong); color: var(--text-2); }
.dark-band .badge-top { background: var(--on-dark); color: var(--dark); }
.dark-band .badge-mcp, .dark-band .badge-pop { border-color: rgba(244, 244, 244, .35); color: var(--on-dark-2); }
.info { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--muted); font: 500 10.5px var(--font); cursor: help; vertical-align: 2px; margin-left: 4px; }
.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.top-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; transition: transform .7s var(--ease), box-shadow .7s var(--ease); }
.top-col:hover { transform: translateY(-4px); box-shadow: var(--lift); }
.top-col h3 { font-size: 20px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.top-col h3 a { color: var(--text); display: flex; gap: 8px; align-items: center; text-decoration: none; }
.top-col h3 small { font-family: var(--font); font-size: 12px; letter-spacing: .08em; color: var(--muted); font-weight: 400; }
.top-col ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.top-col li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; padding: 13px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.top-col li a { color: var(--text); font-weight: 500; line-height: 1.45; }
.top-col li .sub { grid-column: 2; font-size: 12.5px; color: var(--muted); margin-top: -8px; }
.top-col li .badges { display: none; }
.medal { flex: none; font-family: var(--display); font-weight: 300; font-size: 22px; line-height: 1.1; color: #8A8A8A; background: none; width: auto; height: auto; display: block; }
.medal.m1 { color: var(--text); }

/* ---------- language switcher ---------- */
.lang-switch { display: flex; gap: 2px; border: 1px solid var(--dark-line); border-radius: 999px; padding: 3px; }
.lang-switch a { flex: 1; text-align: center; font-size: 11.5px; font-weight: 500; letter-spacing: .08em; padding: 5px 0; border-radius: 999px; color: var(--side-muted); text-decoration: none !important; transition: background .4s var(--ease), color .4s var(--ease); }
.lang-switch a:hover { color: var(--on-dark); }
.lang-switch a.on { background: var(--on-dark); color: var(--dark); }
.side-lang { margin: 10px 4px 0; }
.login-lang { border: 0; padding: 0; gap: 10px; }
.login-lang a { flex: none; padding: 0; color: var(--muted); }
.login-lang a:hover { color: var(--text); }
.login-lang a.on { background: none; color: var(--text); }

/* ---------- user manual ---------- */
.manual { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.manual-toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 0; font-size: 14px; max-height: calc(100vh - 48px); overflow-y: auto; border-top: 1px solid var(--text); }
.manual-toc b { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 14px 0 8px; }
.manual-toc a { color: var(--text-2); padding: 9px 0; border-bottom: 1px solid var(--border); text-decoration: none; transition: color .3s var(--ease), padding .4s var(--ease); }
.manual-toc a:hover { color: var(--text); padding-left: 6px; }
.manual-body { max-width: 860px; }
.manual-body section { padding: 0 0 48px; margin-bottom: 48px; border-bottom: 1px solid var(--border); scroll-margin-top: 24px; }
.manual-body h2 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 300; letter-spacing: -.03em; margin-bottom: 18px; }
.manual-body h3 { font-size: 21px; margin: 26px 0 10px; }
.manual-body h4 { margin: 0 0 8px; }
.manual-body p, .manual-body li, .manual-body dd { color: var(--text-2); font-size: 15.5px; line-height: 1.75; }
.manual-body .lead-p { font-size: 18px; color: var(--text); }
.manual-body kbd { font: 12px var(--mono); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--surface); }
.m-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0; }
.m-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; position: relative; }
.m-card p { margin: 0; font-size: 14px; }
.m-num { display: block; font-family: var(--display); font-weight: 300; font-size: 26px; color: var(--muted); margin-bottom: 6px; }
.m-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; }
.m-flow span { border: 1px solid var(--border-strong); padding: 7px 14px; border-radius: 999px; font-size: 13.5px; }
.m-flow i { color: var(--muted); font-style: normal; }
.m-steps { padding-left: 0; list-style: none; counter-reset: ms; display: flex; flex-direction: column; }
.m-steps li { counter-increment: ms; position: relative; padding: 12px 0 12px 48px; border-top: 1px solid var(--border); }
.m-steps li::before { content: counter(ms, decimal-leading-zero); position: absolute; left: 0; top: 14px; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.m-table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 14px; }
.m-table th, .m-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.m-table th { color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; border-bottom-color: var(--text); }
.m-table td:first-child { font-weight: 500; color: var(--text); white-space: nowrap; }
.m-map { display: grid; grid-template-columns: 140px repeat(3, 1fr); gap: 4px; max-width: 520px; margin: 14px 0 6px; font-size: 13px; }
.m-map div { padding: 8px; border-radius: 8px; text-align: center; }
.m-map .h { color: var(--muted); font-size: 12px; }
.m-map .r { text-align: left; color: var(--text-2); }
.m-map .c1 { background: var(--heat-1); } .m-map .c2 { background: var(--heat-2); } .m-map .c3 { background: var(--heat-3); color: #fff; } .m-map .c4 { background: var(--heat-5); color: var(--bg); }
.m-cap { font-size: 13px !important; color: var(--muted) !important; }
.m-anatomy { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 24px; margin: 14px 0; }
.m-anatomy div { border-top: 1px solid var(--border); padding: 12px 0; }
.m-anatomy b { display: block; font-size: 14px; font-weight: 500; }
.m-anatomy span { font-size: 13px; color: var(--text-2); }
.m-legend { list-style: none; padding: 0; }
.m-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.m-tip, .m-warn, .m-example { border-radius: var(--radius-sm); padding: 16px 18px; font-size: 14.5px; margin: 16px 0; }
.m-tip { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.m-warn { background: var(--warn-soft); color: var(--warn); }
.m-example { background: var(--surface-2); color: var(--text-2); font-style: italic; }
.m-gap { background: var(--warn-soft); color: var(--warn); padding: 0 7px; border-radius: 6px; font-weight: 500; }
.manual-body details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.manual-body summary { cursor: pointer; font-weight: 500; color: var(--text); }
.m-gloss { display: grid; grid-template-columns: 180px 1fr; gap: 0 18px; margin: 0; }
.m-gloss dt, .m-gloss dd { padding: 12px 0; border-top: 1px solid var(--border); margin: 0; }
.m-gloss dt { font-weight: 500; }

/* ---------- translation status ---------- */
.tr-status { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 12px 16px; border-radius: 999px; font-size: 13.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.tr-status.done { color: var(--muted); }
.tr-status.err { color: var(--err); background: var(--err-soft); border-color: transparent; }
.tr-status .spinner { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes trspin { to { transform: rotate(360deg); } }

/* ---------- access center ---------- */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--on-dark); color: var(--dark); font-size: 11px; font-weight: 500; display: inline-grid; place-items: center; animation: pulse 2.4s var(--ease-io) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(244, 244, 244, .45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(244, 244, 244, 0); } }
.access-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); margin-bottom: 48px; }
.access-steps > div { display: flex; flex-direction: column; gap: 8px; padding: 24px 24px 0; border-left: 1px solid var(--border); font-size: 14.5px; color: var(--text-2); }
.access-steps > div:first-child { padding-left: 0; border-left: 0; }
.access-steps b { font-family: var(--display); font-weight: 300; font-size: 36px; color: var(--text); line-height: 1; }
.req-list { display: grid; gap: 14px; }
.req { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; background: var(--surface); transition: box-shadow .6s var(--ease); }
.req.req-pending { border-color: var(--text); }
.req:hover { box-shadow: var(--lift); }
.req h3 { margin: 10px 0 6px; font-size: 21px; }
.req p { margin: 4px 0; color: var(--text-2); }
.req-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.req-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.req-actions input { flex: 1; min-width: 200px; border-radius: 999px; }
.req-todo { margin-top: 12px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.req-history { margin-top: 20px; }
.req-history summary { cursor: pointer; color: var(--text-2); font-size: 14px; }
.st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-2); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-done, .st-approved { background: var(--ok-soft); color: var(--ok); }
.st-pending { background: var(--warn-soft); color: var(--warn); }
.st-rejected, .st-cancelled { background: var(--err-soft); color: var(--err); }
.table-wrap { overflow-x: auto; }
.access-table td { vertical-align: top; }
.perm-cell { display: flex; flex-wrap: wrap; gap: 5px; max-width: 440px; }
.perm { display: inline-flex; align-items: center; gap: 4px; height: 24px; font-size: 12px; padding: 0 9px; border-radius: 999px; white-space: nowrap; }
.perm.yes { background: var(--text); color: var(--bg); }
.perm.no { border: 1px solid var(--border); color: var(--muted); text-decoration: line-through; }
.perm.ask { border: 1px dashed var(--text); color: var(--text); }
.note-box { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; margin-bottom: 20px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); font-size: 14px; }
.note-box svg { flex: none; margin-top: 2px; }
.perm-grid { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 20px 12px; margin: 0; }
.perm-grid legend { font-weight: 500; font-size: 14px; padding: 0 8px; }
.perm-row { display: flex; align-items: center; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.perm-row:last-child { border-bottom: 0; }
.perm-row > span:first-child { flex: 1; }
.perm-row label.yn { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; margin: 0; font-weight: 500; flex: none; cursor: pointer; }
.perm-row label.yn input { width: 16px; margin: 0; min-height: 0; padding: 0; }
.perm-row.locked { color: var(--text-2); }
td.nowrap { white-space: nowrap; }
.pick-toggle { font-weight: 500; }
.pick-note a { margin-right: 8px; }

/* ---------- page transition, reveals ---------- */
.veil { position: fixed; inset: 0; z-index: 200; background: var(--dark); pointer-events: none; transform: scaleY(1); transform-origin: top; animation: veilOut .8s 1.6s var(--ease-io) forwards; } /* the delayed run is a safety net if scripts fail */
body.ready .veil { animation: veilOut .8s .05s var(--ease-io) forwards; }
body.leaving .veil { transform-origin: bottom; animation: veilIn .45s var(--ease-io) forwards; }
@keyframes veilOut { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes veilIn { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.js .stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(2) { transition-delay: .06s; } .stagger.in > *:nth-child(3) { transition-delay: .12s; } .stagger.in > *:nth-child(4) { transition-delay: .18s; }
.stagger.in > *:nth-child(5) { transition-delay: .24s; } .stagger.in > *:nth-child(6) { transition-delay: .3s; } .stagger.in > *:nth-child(7) { transition-delay: .36s; } .stagger.in > *:nth-child(8) { transition-delay: .42s; }
.stagger.in > *:nth-child(n+9) { transition-delay: .48s; }
.split .ln { display: block; overflow: hidden; padding: .14em 0 .1em; margin: -.14em 0 -.1em; }
.js .split .ln > span { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); }
.js .split.in .ln > span { transform: none; }
.split .ln:nth-child(2) > span { transition-delay: .08s; } .split .ln:nth-child(3) > span { transition-delay: .16s; }
.js [data-rule] { transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); }
.js [data-rule].in { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .veil { display: none; }
  .js [data-reveal], .js .stagger > *, .js .split .ln > span, .js [data-rule] { opacity: 1 !important; transform: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .wf-grid { grid-template-columns: 1fr; }
  .sim-stage { grid-template-columns: 1fr; }
  .two-col, .two-col.wide-left { grid-template-columns: 1fr; }
  .stats, .login-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .login-stats div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 1000px) { .manual { grid-template-columns: 1fr; } .manual-toc { position: static; max-height: none; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: -280px; width: 270px; transition: left .5s var(--ease); }
  .side.open { left: 0; box-shadow: 0 0 60px rgba(0, 0, 0, .45); }
  .menu-btn.icon-btn { display: inline-grid; margin-bottom: 14px; border: 1px solid var(--border-strong); width: 42px; height: 42px; }
  .main { padding: 18px 16px 60px; }
  .wf-hero { margin: -18px -16px 40px; padding: 24px 16px 40px; }
  .browse { grid-template-columns: 1fr; }
  .facets { display: none; position: static; max-height: none; }
  .facets.open { display: block; }
  .show-facets { display: inline-flex; }
  .login-side { min-height: auto; padding: 28px 20px 36px; gap: 32px; }
  .login-stats { display: none; }
  .login-card { padding: 40px 20px; }
  .stage-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-strip a:nth-child(5n+1) { border-left: 1px solid var(--border); padding-left: 18px; }
  .stage-strip a:nth-child(2n+1) { border-left: 0; padding-left: 0; }
  .access-steps { grid-template-columns: 1fr; }
  .access-steps > div { padding-left: 0; border-left: 0; }
  .perm-row { flex-wrap: wrap; gap: 10px; }
  .skill { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .skill .rank, .skill .rank.medal { font-size: 32px; }
  .inline-rename input { min-width: 0; }
  .live-results { width: 100%; }
  .panel { padding: 22px 20px; }
}
@media print {
  .side, .menu-btn, .manual-toc, .page-head .btn, .toast, .veil, .noprint, .free-bar, .flash { display: none !important; }
  .ho-doc { border: 0 !important; padding: 0 !important; max-width: none !important; }
  .ho-item { break-inside: avoid-page; }
  .shell { display: block; background: #fff; }
  .main { padding: 0; max-width: none; }
  .manual { display: block; }
  .manual-body section { break-inside: avoid-page; border: 0; padding: 0 0 16px; }
  .js [data-reveal], .js .stagger > *, .js .split .ln > span { opacity: 1 !important; transform: none !important; }
}

/* ---------- trig8n logo ---------- */
.logo-lockup { display: inline-flex; align-items: center; gap: 11px; }
.logo-lockup .mark { flex: none; display: block; }
.wordmark { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.03em; line-height: 1; text-transform: none; }
.brand { flex-wrap: wrap; row-gap: 6px; }
.brand > span:last-child small { margin-top: 0; }
.side .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.login-top .wordmark { font-size: 28px; }
.side .mark rect, .login-side .mark rect, .dark-band .mark rect { fill: #8C8C8C; }

/* ---------- membership: pricing, sign-up, subscription ---------- */
.flash-info { background: var(--accent-soft); color: var(--text); border-color: var(--border); }
.flash a { text-decoration: underline; margin-left: 6px; }
.pub-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px var(--gut); border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.pub-top .brand { padding: 0; color: var(--text); }
.pub-top nav { display: flex; align-items: center; gap: 10px; }
.pub-wrap { max-width: 1180px; margin: 0 auto; padding: 64px var(--gut) 96px; }
.plans-form { margin-bottom: 32px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plan { display: flex; flex-direction: column; gap: 14px; padding: 30px 30px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.plan:hover { transform: translateY(-4px); box-shadow: var(--lift); }
.plan.picked { border-color: var(--text); }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 30px; }
.plan-head h2 { font-size: 20px; }
.plan-tag { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.plan-price { margin: 10px 0 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-price b { font-family: var(--display); font-weight: 300; font-size: clamp(46px, 5vw, 64px); letter-spacing: -.045em; line-height: 1; }
.plan-price span { color: var(--muted); font-size: 14px; }
.plan-note { margin: 0 0 12px; color: var(--text-2); font-size: 14px; min-height: 44px; }
.plan .btn { margin-top: auto; }
.plan-hi { background: var(--dark); color: var(--on-dark); border-color: var(--dark); position: relative; overflow: hidden; }
.plan-hi::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(ellipse 40% 40% at 75% 20%, rgba(255, 255, 255, .1), transparent 70%); animation: drift 24s var(--ease-io) infinite alternate; pointer-events: none; }
.plan-hi > * { position: relative; }
.plan-hi .plan-price span, .plan-hi .plan-note { color: var(--on-dark-2); }
.plan-hi .plan-tag { background: rgba(156, 195, 171, .16); color: #B9D6C3; }
.plan-hi .btn.primary { background: var(--on-dark); border-color: var(--on-dark); color: var(--ink); }
.plan-hi .btn.primary::before { background: #fff; }
.plan-hi .btn.primary:hover { color: var(--ink); }
.plan .btn[aria-disabled] { pointer-events: none; opacity: .6; }
.waiver { margin-top: 22px; max-width: 760px; align-items: flex-start; font-weight: 400; color: var(--text-2); line-height: 1.5; }
.waiver input { margin-top: 3px; flex: none; }
.ticks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li svg { flex: none; margin-top: 4px; }
.stat b.stat-word { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.02em; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.login-foot a { text-decoration: underline; }
.login-card .toggle { font-weight: 400; align-items: flex-start; line-height: 1.5; }
.login-card .toggle input { margin-top: 3px; flex: none; }
.login-card label small { font-weight: 400; }
@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; }
  .ticks { grid-template-columns: 1fr; }
  .pub-wrap { padding-top: 40px; }
  .pub-top .login-lang { display: none; }
}

/* free account: remaining uses */
.free-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px 12px 20px; margin-bottom: 28px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 14px; color: var(--text-2); }
.free-bar > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.free-bar b { color: var(--text); font-weight: 600; }
.free-bar em { font-style: normal; font-variant-numeric: tabular-nums; }
.free-bar em + em::before { content: "·"; margin-right: 14px; color: var(--pewter); }
.free-bar em.out { color: var(--muted); text-decoration: line-through; }
.free-bar small { color: var(--muted); font-size: 14px; }
.free-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.free-grid > div { padding: 22px 20px 4px; border-left: 1px solid var(--border); }
.free-grid > div:first-child { padding-left: 0; border-left: 0; }
.free-grid b { display: block; font-family: var(--display); font-weight: 300; font-size: 40px; letter-spacing: -.03em; line-height: 1; }
.free-grid span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.plan-free .panel-head h2 .tone { margin-left: 6px; }
@media (max-width: 900px) {
  .free-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .free-grid > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .free-bar { border-radius: var(--radius); }
}

/* ---------- sales page (pricing) ---------- */
.pub-link { font-size: 14px; color: var(--text-2); padding: 0 6px; }
.pub-link:hover { color: var(--text); }
.sales-hero { display: flex; flex-direction: column; gap: 56px; padding: clamp(36px, 6vw, 80px); }
.sales-hero-in { display: flex; flex-direction: column; gap: 26px; max-width: 820px; }
.sales-hero h1 { font-size: clamp(44px, 6vw, 88px); line-height: .98; letter-spacing: -.045em; }
.sales-hero .lead { font-size: 18px; max-width: 620px; }
.sales-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--dark-line); }
.sales-stats div { padding: 24px 20px 0; border-left: 1px solid var(--dark-line); }
.sales-stats div:first-child { padding-left: 0; border-left: 0; }
.sales-stats b { display: block; font-family: var(--display); font-weight: 300; font-size: clamp(32px, 3.4vw, 50px); letter-spacing: -.035em; line-height: 1.05; }
.sales-stats span { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.how article { padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.how span { font-family: var(--display); font-weight: 300; font-size: 44px; letter-spacing: -.04em; color: var(--pewter); line-height: 1; }
.how h3 { font-size: 21px; }
.how p, .feat p { margin: 0; color: var(--text-2); font-size: 15px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.feat { padding: 30px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; transition: background .5s var(--ease); }
.feat:hover { background: var(--accent-soft); }
.feat-n { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.feat h3 { font-size: 21px; }
.feat em { margin-top: auto; padding-top: 8px; font-style: normal; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.show-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.show-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none !important; transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .6s var(--ease); }
.show-card:hover { transform: translateY(-4px); box-shadow: var(--lift); border-color: var(--border-strong); }
.show-card small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.show-card b { font-weight: 500; font-size: 16px; line-height: 1.4; color: var(--text); }
.show-card span { margin-top: auto; font-size: 13px; color: var(--muted); }
.book-steps { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; padding: 0; margin: 0 0 28px; }
.book-steps li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; color: var(--muted); }
.book-steps li span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.book-steps li.now { color: var(--text); border-color: var(--text); }
.book-steps li.now span { background: var(--text); color: var(--bg); }
.book-steps li.done { color: var(--ok); }
.book-steps li.done span { background: var(--ok-soft); color: var(--ok); }
.small-steps { margin: 0; gap: 6px; }
.small-steps li { padding: 5px 12px 5px 5px; font-size: 12px; gap: 7px; }
.small-steps li span { width: 20px; height: 20px; font-size: 11px; }
.chosen-plan { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: 14px; }
.chosen-plan span { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.chosen-plan em { font-style: normal; color: var(--text-2); }
.chosen-plan a { margin-left: auto; text-decoration: underline; font-size: 13px; }
.pay-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.pay-note span { color: var(--pewter); }
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq summary { display: flex; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; font-family: var(--display); font-size: 19px; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { font-family: var(--font); font-size: 20px; color: var(--muted); transition: transform .4s var(--ease); }
.faq details[open] summary span { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; color: var(--text-2); font-size: 15px; max-width: 560px; }
.sales-final { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.sales-final h2 { font-size: clamp(30px, 3.4vw, 46px); font-weight: 300; letter-spacing: -.035em; line-height: 1.05; }
.sales-final p { margin: 12px 0 0; }
.pub-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px 0 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.pub-foot .brand { padding: 0; color: var(--text); }
/* login: plan teaser */
.login-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 640px; }
.login-plans a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--dark-line); color: var(--on-dark); text-decoration: none !important; transition: border-color .5s var(--ease), background .5s var(--ease); }
.login-plans a:hover { border-color: rgba(244, 244, 244, .55); background: rgba(255, 255, 255, .04); }
.login-plans a.hi { background: rgba(255, 255, 255, .07); border-color: rgba(244, 244, 244, .35); }
.login-plans small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.login-plans b { font-family: var(--display); font-weight: 300; font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.login-plans span { font-size: 12px; color: var(--on-dark-2); }
.login-plans a.all { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font-size: 14px; color: var(--on-dark); }
.login-plans a.all:hover { background: none; text-decoration: underline !important; }
.login-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
@media (max-width: 900px) {
  .how, .feat-grid, .show-grid, .faq { grid-template-columns: 1fr; }
  .sales-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .pub-link { display: none; }
  .login-plans { grid-template-columns: 1fr 1fr; }
  .login-plans a:first-child { grid-column: 1 / -1; }
}

/* sidebar: a clearly visible "you are here" */
.side nav a.active, .side-foot > a.active { background: rgba(244, 244, 244, .12); color: #fff; font-weight: 500; box-shadow: inset 3px 0 0 var(--on-dark); }
.side nav a.active .pip, .side-foot > a.active .pip { background: #fff; border-color: #fff; transform: scale(1.25); }

/* save-to popover */
.save-pop { position: fixed; z-index: 200; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 10px; animation: popin .35s var(--ease); }
@keyframes popin { from { opacity: 0; transform: translateY(-6px); } }
.sp-head { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 2px; }
.sp-head b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.sp-head .icon-btn { font-size: 20px; line-height: 1; }
.sp-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px 0; }
.sp-row { flex-direction: row; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; cursor: pointer; font-weight: 400; font-size: 14px; color: var(--text); }
.sp-row:hover { background: var(--accent-soft); }
.sp-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row small { color: var(--muted); font-size: 12px; }
.sp-fav span { font-weight: 500; }
.sp-empty { margin: 6px; font-size: 13px; color: var(--muted); }
.sp-new { display: flex; gap: 8px; }
.sp-new input { flex: 1; min-width: 0; min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 999px; }
.sp-new .btn { height: 36px; }
.sp-all { font-size: 13px; color: var(--muted); padding: 0 4px; }
/* saved page: projects */
.new-project { display: flex; gap: 8px; flex-wrap: wrap; }
.new-project input { min-width: 220px; min-height: 40px; border-radius: 999px; }
.panel-head .new-project input { min-height: 34px; padding: 4px 14px; font-size: 14px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.proj-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none !important; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.proj-card:hover { transform: translateY(-3px); box-shadow: var(--lift); }
.proj-card small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.proj-card b { font-weight: 500; font-size: 16px; color: var(--text); }
.proj-card span { font-size: 13px; color: var(--muted); }
.saved-projects { margin-bottom: 48px; }
.empty-collection { display: flex; flex-direction: column; gap: 10px; }
.empty-collection h2 { font-size: 22px; }
.access-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
.access-card small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.access-card b { display: block; font-family: var(--display); font-weight: 300; font-size: 32px; letter-spacing: -.03em; margin: 8px 0; }
.access-card span { color: var(--text-2); }
.access-card .ticks { grid-template-columns: 1fr; margin: 0; }
@media (max-width: 900px) { .access-card { grid-template-columns: 1fr; } }
.plans-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plans-4 .plan { padding: 26px 24px 24px; }
.plans-4 .plan-price b { font-size: clamp(40px, 3.6vw, 54px); }
.plan-free-card { background: transparent; border-style: dashed; border-color: var(--border-strong); }
.plan-free-card.current { border-style: solid; border-color: var(--text); }
.plan-tag.plain { background: var(--accent-soft); color: var(--text); }
@media (max-width: 1200px) { .plans-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .plans-4 { grid-template-columns: 1fr; } }

/* ---------- calmer type scale (owner feedback 2026-11-04: fonts were too big) ---------- */
body { font-size: 14px; }
h1 { font-size: clamp(30px, 3.2vw, 44px); }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.lead { font-size: 15px; }
.page-head { margin-bottom: 34px; }
.section-head h2, .manual-body h2 { font-size: clamp(22px, 2vw, 30px); }
.stat b { font-size: clamp(28px, 2.8vw, 40px); }
.stat b.stat-word { font-size: clamp(18px, 1.8vw, 24px); }
.idea-band h2 { font-size: clamp(24px, 2.4vw, 34px); }
.wf-head h1 { font-size: clamp(28px, 3vw, 42px); }
.login-hero h1 { font-size: clamp(36px, 4.4vw, 64px); }
.login-hero p { font-size: 15px; }
.login-stats b { font-size: clamp(26px, 2.4vw, 34px); }
.login-inner h2 { font-size: 32px; }
.access-steps b { font-size: 28px; }
.plan-price b, .plans-4 .plan-price b { font-size: clamp(32px, 2.8vw, 42px); }
.plan-head h2 { font-size: 17px; }
.plan-note { font-size: 13px; }
.free-grid b { font-size: 30px; }
.sales-hero { gap: 44px; padding: clamp(28px, 4.5vw, 60px); }
.sales-hero h1 { font-size: clamp(34px, 4.4vw, 62px); }
.sales-hero .lead { font-size: 16px; }
.sales-stats b { font-size: clamp(26px, 2.6vw, 38px); }
.how span { font-size: 32px; }
.how h3, .feat h3 { font-size: 17px; }
.how p, .feat p, .faq p { font-size: 14px; }
.faq summary { font-size: 16px; }
.sales-final h2 { font-size: clamp(24px, 2.6vw, 34px); }
.login-plans b { font-size: 24px; }
.access-card b { font-size: 26px; }
.show-card b { font-size: 15px; }
.free-bar { font-size: 13px; }
/* the Save button in headers was dark on dark */
.btn.save { border: 1px solid var(--border-strong); padding: 0 22px; border-radius: 999px; }
.btn.save:hover { transform: none; }
.wf-hero .btn.save, .dark-band .btn.save { color: var(--on-dark); border-color: rgba(244, 244, 244, .35); }
.wf-hero .btn.save:hover, .dark-band .btn.save:hover { color: var(--dark); }
.wf-hero .btn.save.on, .dark-band .btn.save.on { border-color: var(--on-dark); }
/* consent before checkout: above the plans, impossible to miss */
.waiver-box { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; margin: 0 0 18px; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); font-weight: 400; font-size: 13.5px; line-height: 1.5; color: var(--text-2); cursor: pointer; transition: border-color .4s var(--ease), background .4s var(--ease); }
.waiver-box input { margin-top: 2px; width: 18px; height: 18px; flex: none; }
.waiver-box b { color: var(--text); font-weight: 600; }
.waiver-box.ok { border-color: var(--ok); background: var(--ok-soft); }
.waiver-box.need { border-color: var(--err); background: var(--err-soft); animation: nudge .5s var(--ease); }
@keyframes nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.btn.busy { opacity: .7; pointer-events: none; }
.plans-4 .btn { white-space: normal; height: auto; min-height: 44px; padding: 10px 16px; text-align: center; line-height: 1.3; }

/* save popover: clearer states */
.sp-status { margin: -4px 2px 0; font-size: 12.5px; color: var(--muted); }
.sp-status.on { color: var(--ok); font-weight: 500; }
.sp-row.is-on span { font-weight: 500; }
.sp-row.is-on small { color: var(--ok); }
.sp-add { align-self: flex-start; background: none; border: 0; padding: 2px 4px; font: 500 13px var(--font); color: var(--text); cursor: pointer; border-radius: 8px; }
.sp-add:hover { text-decoration: underline; }
.sp-new .btn:disabled { opacity: .35; cursor: default; }
.sp-new .btn:disabled:hover { color: var(--bg); }
.sp-new .btn:disabled::before { display: none; }
.sp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 2px; }
.sp-foot .btn { height: 32px; }
[hidden] { display: none !important; }

/* translated finder descriptions */
[data-tr].tr-wait { opacity: .55; transition: opacity .4s var(--ease); }
[data-tr].tr-done { opacity: 1; }

/* saved MCP servers & skills */
.res-save { flex: none; margin-left: auto; }
.skill-top .res-save { margin-left: auto; }
.res-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.res-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--border); }
.res-kind { flex: none; width: 90px; padding-top: 3px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.res-main { flex: 1; min-width: 0; }
.res-main b { font-weight: 500; }
.res-main p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.res-main .copyline { margin-top: 8px; }
.proj-tools { margin-bottom: 24px; }
@media (max-width: 700px) { .res-kind { width: auto; } .res-item { flex-wrap: wrap; } }

/* ---------- login v2: animated showcase + social sign-in (trig8n grey signature) ---------- */
.login-wrap.v2 .login-side { justify-content: flex-start; gap: 22px; padding: 28px clamp(20px, 3vw, 40px); }
.login-wrap.v2 .login-side::before { display: none; }
.showcase { flex: 1; min-height: 0; display: flex; }
.sc-stage { position: relative; flex: 1; min-height: 520px; border-radius: 26px; overflow: hidden; background: radial-gradient(120% 90% at 78% 8%, #4A4A4A 0%, #333 38%, #262626 70%, #1F1F1F 100%); border: 1px solid rgba(244, 244, 244, .08); }
.sc-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 20, 20, 0) 40%, rgba(20, 20, 20, .78) 82%, rgba(20, 20, 20, .92)); pointer-events: none; }
.sc-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s .9s; }
.sc-slide.on { opacity: 1; visibility: visible; transition: opacity .9s var(--ease); }
.sc-visual { position: absolute; inset: 7% 7% 34%; display: flex; align-items: center; justify-content: center; }
.sc-copy { position: absolute; left: clamp(22px, 3vw, 36px); right: clamp(22px, 3vw, 36px); bottom: 92px; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.sc-chip { align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: rgba(244, 244, 244, .1); border: 1px solid rgba(244, 244, 244, .16); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.sc-copy h1 { font-family: var(--display); font-weight: 300; font-size: clamp(28px, 3vw, 44px); letter-spacing: -.035em; line-height: 1.04; color: var(--on-dark); max-width: 560px; }
.sc-copy p { margin: 0; font-size: 14px; color: var(--on-dark-2); max-width: 460px; }
.sc-slide.on .sc-copy > * { animation: scUp .9s var(--ease) both; }
.sc-slide.on .sc-copy h1 { animation-delay: .08s; }
.sc-slide.on .sc-copy p { animation-delay: .16s; }
@keyframes scUp { from { opacity: 0; transform: translateY(14px); } }
.sc-tabs { position: absolute; left: clamp(22px, 3vw, 36px); right: clamp(22px, 3vw, 36px); bottom: 26px; z-index: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sc-tabs button { display: flex; flex-direction: column; gap: 10px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--on-dark-2); font: 500 12.5px var(--font); }
.sc-tabs button.on, .sc-tabs button:hover { color: var(--on-dark); }
.sc-prog { height: 3px; border-radius: 3px; background: rgba(244, 244, 244, .16); overflow: hidden; }
.sc-prog i { display: block; height: 100%; width: 0; background: var(--on-dark); border-radius: 3px; }
.sc-tabs button.done .sc-prog i { width: 100%; opacity: .55; }
.sc-tabs button.on .sc-prog i { animation: scProg var(--sc-dur, 6s) linear forwards; }
.showcase.paused .sc-tabs button.on .sc-prog i { animation-play-state: paused; }
@keyframes scProg { to { width: 100%; } }

/* slide 1: workflow cards */
.v-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(560px, 100%); }
.v-card { padding: 14px; border-radius: 16px; background: rgba(244, 244, 244, .055); border: 1px solid rgba(244, 244, 244, .1); display: flex; flex-direction: column; gap: 10px; }
.sc-slide.on .v-card { animation: vCard 1s var(--ease) both, vFloat 7s ease-in-out infinite alternate; animation-delay: var(--d), calc(var(--d) + 1s); }
@keyframes vCard { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes vFloat { to { transform: translateY(-6px); } }
.v-dots { display: flex; gap: 4px; }
.v-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(244, 244, 244, .25); }
.v-flow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.v-flow b { padding: 4px 7px; border-radius: 7px; background: rgba(244, 244, 244, .1); font-size: 10.5px; font-weight: 500; color: var(--on-dark); white-space: nowrap; }
.v-flow em { width: 10px; height: 1px; background: rgba(244, 244, 244, .35); }
.v-line { height: 5px; border-radius: 3px; background: rgba(244, 244, 244, .1); }
.v-line.short { width: 60%; }
/* slide 2: idea -> stages */
.v-idea { width: min(560px, 100%); display: flex; flex-direction: column; gap: 16px; }
.v-prompt { padding: 14px 16px; border-radius: 16px; background: rgba(244, 244, 244, .07); border: 1px solid rgba(244, 244, 244, .14); color: var(--on-dark); font-size: 13.5px; line-height: 1.5; display: flex; align-items: center; gap: 2px; }
.v-prompt span { overflow: hidden; white-space: nowrap; display: inline-block; max-width: 0; }
.sc-slide.on .v-prompt span { animation: vType 1.4s steps(60, end) .2s forwards; }
@keyframes vType { to { max-width: 100%; } }
.v-caret { width: 2px; height: 16px; background: var(--on-dark); flex: none; animation: vBlink 1s steps(1) infinite; }
@keyframes vBlink { 50% { opacity: 0; } }
.v-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.v-stage { padding: 10px; border-radius: 12px; background: rgba(244, 244, 244, .05); border: 1px solid rgba(244, 244, 244, .08); display: flex; flex-direction: column; gap: 4px; }
.v-stage small { font-size: 10px; color: var(--on-dark-2); }
.v-stage b { font-size: 11.5px; font-weight: 500; color: var(--on-dark); }
.v-stage span { height: 4px; border-radius: 2px; background: rgba(244, 244, 244, .1); overflow: hidden; margin-top: 4px; }
.v-stage span i { display: block; height: 100%; width: 0; background: var(--on-dark); }
.sc-slide.on .v-stage { animation: vCard .7s var(--ease) both; animation-delay: calc(var(--d) - .3s); }
.sc-slide.on .v-stage span i { animation: vFill .9s var(--ease) forwards; animation-delay: var(--d); }
@keyframes vFill { to { width: 100%; } }
/* slide 3: ranking */
.v-rank { width: min(540px, 100%); display: flex; flex-direction: column; gap: 8px; }
.v-row { display: grid; grid-template-columns: 26px 1fr auto 34px 70px; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(244, 244, 244, .055); border: 1px solid rgba(244, 244, 244, .09); }
.v-row:first-child { background: rgba(244, 244, 244, .1); border-color: rgba(244, 244, 244, .2); }
.v-n { font-family: var(--display); font-weight: 300; font-size: 20px; color: var(--on-dark-2); }
.v-row b { font-size: 13px; font-weight: 500; color: var(--on-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-stars { font-size: 10px; letter-spacing: 1px; color: var(--on-dark-2); }
.v-row em { font-style: normal; font-size: 12.5px; color: var(--on-dark); text-align: right; }
.v-bar { height: 4px; border-radius: 2px; background: rgba(244, 244, 244, .1); overflow: hidden; }
.v-bar i { display: block; height: 100%; background: var(--on-dark); transform-origin: left; transform: scaleX(0); }
.sc-slide.on .v-row { animation: vSlide .8s var(--ease) both; animation-delay: var(--d); }
.sc-slide.on .v-bar i { animation: vScale 1s var(--ease) forwards; animation-delay: calc(var(--d) + .3s); }
@keyframes vSlide { from { opacity: 0; transform: translateX(-24px); } }
@keyframes vScale { to { transform: scaleX(1); } }
/* slide 4: terminal */
.v-term { width: min(540px, 100%); padding: 16px 20px 20px; border-radius: 18px; background: #1A1A1A; border: 1px solid rgba(244, 244, 244, .12); font-family: var(--mono); font-size: 12.5px; color: #CFCFCF; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
.v-term-top { display: flex; gap: 6px; margin-bottom: 14px; }
.v-term-top i { width: 10px; height: 10px; border-radius: 50%; background: #4A4A4A; }
.v-term p { margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-term p span { color: #7A7A7A; margin-right: 6px; }
.v-term p.ok { color: #A8C9B3; }
.v-term p.dim { color: #8A8A8A; }
.sc-slide.on .v-term { animation: vCard .8s var(--ease) both; }
.sc-slide.on .v-term p { animation: vLine .5s var(--ease) both; animation-delay: var(--d); }
@keyframes vLine { from { opacity: 0; transform: translateX(-8px); } }
/* right card */
.login-wrap.v2 .login-inner { max-width: 400px; gap: 16px; }
.login-mark { display: inline-flex; color: var(--text); }
.login-mark .mark rect { fill: #8C8C8C; }
.login-wrap.v2 .login-inner h2 { font-size: 30px; }
.login-sub { margin: -6px 0 4px; color: var(--muted); font-size: 14px; }
.oauth-btns { display: flex; flex-direction: column; gap: 10px; }
.btn.oauth { height: 48px; justify-content: center; gap: 12px; background: var(--surface); border-color: var(--border-strong); font-weight: 500; }
.btn.oauth svg { flex: none; }
.btn.oauth:hover svg path[fill="currentColor"] { fill: currentColor; }
.login-legal { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.login-plans.compact { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.login-plans.compact a { padding: 12px 16px; }
.login-plans.compact b { font-size: 20px; }
@media (max-width: 1100px) { .sc-stage { min-height: 460px; } .v-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .v-grid .v-card:nth-child(n+5) { display: none; } }
@media (max-width: 900px) {
  .login-wrap.v2 .login-side { min-height: auto; }
  .sc-stage { min-height: 380px; border-radius: 20px; }
  .sc-visual { inset: 6% 5% 42%; transform: scale(.82); }
  .sc-copy { bottom: 74px; }
  .sc-copy h1 { font-size: 24px; }
  .sc-tabs b { font-size: 11px; }
  .v-stages { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .login-plans.compact { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-slide, .sc-slide * { animation: none !important; transition: none !important; }
  .v-prompt span { max-width: 100%; }
  .v-stage span i { width: 100%; }
  .v-bar i { transform: none; }
}
.sc-visual { inset: 6% 6% 40%; }
@media (max-width: 900px) {
  .sc-stage { min-height: 440px; }
  .sc-visual { inset: 5% 4% 50%; transform: scale(.78); transform-origin: center top; }
  .v-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-grid .v-card:nth-child(n+3) { display: none; }
  .v-stages { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .v-stage:nth-child(n+6) { display: none; }
  .v-rank .v-row:nth-child(n+4) { display: none; }
  .v-row { grid-template-columns: 22px 1fr 34px; }
  .v-row .v-stars, .v-row .v-bar { display: none; }
  .v-term p:nth-child(n+5) { display: none; }
}
/* trig8n logo inside the showcase */
.sc-brand { position: absolute; top: 18px; left: 20px; z-index: 3; display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); border-radius: 999px; color: #fff; backdrop-filter: blur(6px); }
.sc-brand .logo-lockup { gap: 7px; }
.sc-brand .wordmark { font-size: 14px; color: #fff; }
.sc-watermark { position: absolute; right: -40px; bottom: 110px; z-index: 0; color: #fff; opacity: .045; pointer-events: none; }
.sc-watermark .mark rect { fill: #fff; }
.sc-slide { z-index: 1; }
@media (max-width: 900px) { .sc-brand { top: 12px; left: 12px; padding: 5px 10px; } .sc-watermark { display: none; } }
/* glass look for the login showcase */
.login-wrap.v2 .sc-stage { background: radial-gradient(120% 90% at 85% 10%, rgba(255,255,255,.10), transparent 55%), radial-gradient(90% 70% at 10% 95%, rgba(255,255,255,.06), transparent 60%), linear-gradient(160deg, #3a3a3a, #1c1c1c); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 30px 80px -30px rgba(0,0,0,.6); }
.login-wrap.v2 .sc-stage::before { content: ""; position: absolute; width: 340px; height: 340px; right: 8%; top: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); filter: blur(30px); animation: scGlow 12s ease-in-out infinite alternate; pointer-events: none; z-index: 0; }
@keyframes scGlow { from { transform: translate(0,0); } to { transform: translate(-120px, 60px); } }
.login-wrap.v2 .v-card, .login-wrap.v2 .v-row, .login-wrap.v2 .v-term, .login-wrap.v2 .v-prompt, .login-wrap.v2 .v-stage, .login-wrap.v2 .sc-chip, .login-wrap.v2 .login-plans a:not(.all) {
  background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 30px -12px rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.login-wrap.v2 .login-plans a.hi { background: linear-gradient(145deg, rgba(255,255,255,.20), rgba(255,255,255,.06)); border-color: rgba(255,255,255,.28); }
.login-wrap.v2 .sc-brand { background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
@media (prefers-reduced-motion: reduce) { .login-wrap.v2 .sc-stage::before { animation: none; } }

/* ---------- login v2: theme-aware card + exact full-screen fit ---------- */
.login-wrap.v2 .login-card { background: var(--bg); color: var(--text); }
.login-wrap.v2 .login-card h2 { color: var(--text); }
.login-wrap.v2 .login-card .tone { color: var(--muted); }
:root[data-theme="dark"] .login-wrap.v2 .login-card { background: #1C1C1C; border-left: 1px solid var(--border); }
.oa-short { display: none; }
.login-wrap.v2.signup .login-sub { margin: -4px 0 2px; font-size: 13px; line-height: 1.55; }
.login-wrap.v2 .chosen-plan { margin: 0; }
@media (min-width: 901px) {
  .login-wrap.v2 { height: 100vh; height: 100dvh; min-height: 0; flex-wrap: nowrap; overflow: hidden; }
  .login-wrap.v2 .login-side { flex: 1 1 auto; height: 100%; min-height: 0; padding: clamp(16px, 2.8vh, 28px) clamp(20px, 2.6vw, 40px); gap: clamp(12px, 2.2vh, 22px); }
  .login-wrap.v2 .sc-stage { min-height: 0; }
  .login-wrap.v2 .login-card { flex: 0 0 clamp(400px, 34vw, 540px); height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: clamp(18px, 4vh, 48px) clamp(28px, 3.4vw, 60px); justify-content: safe center; }
  .login-wrap.v2 .login-card .login-inner { margin: auto; }
}
/* shorter screens: tighten everything so the whole page stays on one screen */
@media (min-width: 901px) and (max-height: 940px) {
  .login-wrap.v2 .login-inner { gap: 12px; }
  .login-wrap.v2 .login-inner h2 { font-size: 26px; }
  .login-wrap.v2 .login-card input:not([type="checkbox"]) { min-height: 42px; padding: 8px 14px; }
  .login-wrap.v2 .login-card label { gap: 6px; }
  .login-wrap.v2 .login-card .btn { height: 42px; }
  .login-wrap.v2 .login-card .stack { gap: 12px; }
  .login-wrap.v2 .login-foot { padding-top: 12px; }
  .oauth-btns { flex-direction: row; gap: 8px; }
  .btn.oauth { flex: 1 1 0; height: 42px; padding: 0 10px; gap: 8px; }
  .oa-full { display: none; } .oa-short { display: inline; }
  .login-plans.compact a { padding: 9px 14px; gap: 2px; }
  .login-plans.compact b { font-size: 18px; }
  .login-plans.compact a.all { padding: 0; }
  .sc-visual { transform: scale(.88); }
  .sc-copy { bottom: 78px; gap: 8px; }
  .sc-copy h1 { font-size: clamp(26px, 2.6vw, 38px); }
  .sc-tabs { bottom: 20px; }
}
@media (min-width: 901px) and (max-height: 740px) {
  .login-mark { display: none; }
  .login-top .wordmark { font-size: 22px; }
  .login-wrap.v2 .small-steps { display: none; }
  .login-wrap.v2.signup .login-sub { display: none; }
  .login-plans.compact { display: none; }
  .sc-visual { inset: 4% 5% 40%; transform: scale(.76); }
  .sc-copy p { display: none; }
}
/* mobile / tablet: the form comes first, the showcase follows */
@media (max-width: 900px) {
  .login-wrap.v2 { flex-direction: column; flex-wrap: nowrap; min-height: 100dvh; }
  .login-wrap.v2 .login-card { order: -1; flex: none; padding: 28px 20px 32px; }
  .login-wrap.v2 .login-card .login-inner { max-width: 440px; }
  .login-wrap.v2 .login-side { flex: none; padding: 20px 16px 28px; }
  .login-wrap.v2 .login-top { display: none; }
  .login-wrap.v2 .sc-stage { min-height: 400px; }
  .login-wrap.v2 .login-inner h2 { font-size: 28px; }
}
@media (max-width: 420px) {
  .oauth-btns { flex-direction: column; }
}

/* ---------- email code step ---------- */
.verify-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--border); color: var(--text); }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { min-height: 0; height: 54px; padding: 0; text-align: center; font: 300 24px var(--display); letter-spacing: 0; border-radius: 14px; caret-color: var(--text); }
.otp input.filled { border-color: var(--text); }
.otp input:nth-child(3) { margin-right: 6px; }
.otp.done input { border-color: var(--ok); }
.otp.shake { animation: otpShake .45s var(--ease); }
@keyframes otpShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.verify-resend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; font-size: 13px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
@media (min-width: 901px) and (max-height: 940px) { .otp input { height: 48px; font-size: 22px; } .verify-icon { width: 38px; height: 38px; } }

/* ---------- smaller type, second pass (owner feedback: still too big) ---------- */
body { font-size: 13.5px; }
h1 { font-size: clamp(26px, 2.7vw, 38px); }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 11px; }
.lead { font-size: 14px; }
.btn { height: 40px; padding: 0 18px; font-size: 13px; }
input, select, textarea { font-size: 14px; min-height: 42px; padding: 8px 14px; }
label { font-size: 12.5px; }
label.toggle { font-size: 13px; }
.eyebrow { font-size: 11px; }
.section-head h2, .manual-body h2 { font-size: clamp(20px, 1.7vw, 26px); }
.stat b { font-size: clamp(24px, 2.3vw, 34px); }
.idea-band h2 { font-size: clamp(22px, 2vw, 28px); }
.wf-head h1 { font-size: clamp(24px, 2.5vw, 34px); }
.plan-price b, .plans-4 .plan-price b { font-size: clamp(28px, 2.3vw, 36px); }
.sales-hero h1 { font-size: clamp(30px, 3.6vw, 50px); }
.sales-hero .lead { font-size: 15px; }
.sales-stats b { font-size: clamp(22px, 2.2vw, 32px); }
.sales-final h2 { font-size: clamp(22px, 2.2vw, 30px); }
.how span { font-size: 26px; }
.how h3, .feat h3 { font-size: 15px; }
.how p, .feat p, .faq p { font-size: 13.5px; }
.faq summary { font-size: 15px; }
.side nav a, .nav-group a { font-size: 13px; }
/* login / sign-up / code */
.login-wrap.v2 .login-inner h2 { font-size: 24px; }
.login-sub { font-size: 13px; }
.login-top .wordmark { font-size: 22px; }
.sc-copy h1 { font-size: clamp(22px, 2.2vw, 32px); }
.sc-copy p { font-size: 13px; }
.sc-tabs button { font-size: 12px; }
.btn.oauth { height: 42px; font-size: 13px; }
.login-plans.compact b { font-size: 17px; }
.login-foot, .login-legal { font-size: 12px; }
@media (min-width: 901px) and (max-height: 940px) {
  .login-wrap.v2 .login-inner h2 { font-size: 22px; }
  .btn, .login-wrap.v2 .login-card .btn, .btn.oauth { height: 40px; }
  .login-wrap.v2 .login-card input:not([type="checkbox"]) { min-height: 40px; }
  .otp input { min-height: 0; }
}
.otp input { padding: 0 !important; }
.login-wrap.v2 .login-card form { max-width: none; margin: 0; }

/* ---------- terms / privacy ---------- */
.legal-page { min-height: 100vh; background: var(--bg); padding: 24px var(--gut) 64px; }
.legal-page.in-app { min-height: 0; padding: 0 0 40px; }
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 760px; margin: 0 auto 40px; }
.legal-page.in-app .legal-top .brand { display: none; }
.legal-top .wordmark { font-size: 20px; }
.legal-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.legal-tabs a { padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); text-decoration: none !important; }
.legal-tabs a.on { background: var(--text); color: var(--bg); }
.legal-doc { max-width: 760px; margin: 0 auto; }
.legal-doc h1 { font-size: clamp(26px, 2.6vw, 34px); margin: 8px 0 14px; }
.legal-intro { font-size: 15px; color: var(--text-2); margin: 0 0 28px; line-height: 1.65; }
.legal-doc section { padding: 16px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
.legal-doc section h2 { font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1.5; }
.legal-doc section p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--text-2); }
.legal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; }
@media (max-width: 700px) { .legal-doc section { grid-template-columns: 1fr; gap: 6px; } .legal-top { margin-bottom: 28px; } }
.legal-links { display: inline-flex; gap: 10px; }
.legal-links a { color: var(--muted); }
.legal-top .brand, .legal-top .wordmark { color: var(--text); }
.legal-top .mark rect { fill: #8C8C8C; }
.login-card .toggle a { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }
.veil { display: none !important; }

/* ---------- admin: library updates ---------- */
.lib-panel { margin-bottom: 22px; }
.lib-panel .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.lib-list { display: flex; flex-direction: column; }
.lib-item { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
.lib-item:first-child { border-top: 0; }
.lib-main { min-width: 0; }
.lib-main b { font-weight: 500; }
.lib-main p { margin: 3px 0 4px; font-size: 13px; color: var(--text-2); }
.lib-act { display: flex; gap: 6px; flex: none; }
.btn.small { height: 32px; padding: 0 14px; font-size: 12.5px; }
.lib-warn { color: var(--warn); }
.lib-src { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lib-src select { min-height: 32px; padding: 4px 30px 4px 10px; font-size: 12.5px; }
.lib-add { display: flex; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; }
.lib-add input { flex: 1 1 220px; }
.lib-code { white-space: pre-wrap; word-break: break-all; font: 12px/1.6 var(--mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 6px 0 10px; }
.lib-run summary { cursor: pointer; padding: 8px 0; font-size: 13px; border-top: 1px solid var(--border); }
@media (max-width: 700px) { .lib-item { flex-direction: column; align-items: flex-start; } }
/* workflow page: health box */
.health { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); }
.health h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.health .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.health.warn .dot { background: var(--warn); }
.health.broken .dot { background: var(--err); }
.health ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.health li { margin: 3px 0; }
.health p { margin: 0; font-size: 13px; color: var(--text-2); }
.badge-new { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.btn.is-running { opacity: 1; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy-note { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--text-2); }
.busy-note .bar { flex: 1; height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; position: relative; }
.busy-note .bar::after { content: ""; position: absolute; inset: 0; width: 30%; background: var(--text); border-radius: 3px; animation: busyBar 1.4s ease-in-out infinite; }
@keyframes busyBar { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.lib-saved { font-size: 12.5px; color: var(--muted); min-width: 70px; }
.lib-saved.ok { color: var(--ok); }
.lib-saved.err { color: var(--err); }
.lib-item.done { opacity: .55; transition: opacity .4s; }
.lib-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 8px; margin-left: 6px; border-radius: 999px; background: var(--accent-soft); font: 500 12px var(--font); vertical-align: middle; }
.lib-code, pre.lib-code { color: var(--text); background: var(--surface-2); text-shadow: none; }
.lib-code::selection { background: var(--text); color: var(--bg); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label-row a { font-weight: 400; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.label-row a:hover { color: var(--text); }

/* ---------- project: deploy to n8n ---------- */
.deploy-panel { margin-bottom: 22px; }
.deploy-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.deploy-head h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.deploy-head p { margin: 0; }
.deploy-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
label.toggle.small { font-size: 12.5px; font-weight: 400; }
.deploy-progress { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--text-2); }
.deploy-progress .progress { flex: 1; }
.deploy-log { list-style: none; margin: 10px 0 0; padding: 10px 14px; max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12.5px; }
.deploy-log li { padding: 3px 0; }
.deploy-log li.ok { color: var(--text); }
.deploy-log li.err { color: var(--err); }
.deploy-creds { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.deploy-creds h4 { margin-top: 0; }
.cred-list { list-style: none; padding: 0; margin: 10px 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.cred-list label { display: flex; align-items: center; gap: 8px; flex-direction: row; font-weight: 400; font-size: 13px; color: var(--text); cursor: pointer; }
.cred-list b { font-weight: 500; }
.cred-list code { font-size: 11px; color: var(--muted); }
.cred-list .muted { font-size: 11.5px; margin-left: auto; }
.cred-list input:checked ~ b { text-decoration: line-through; color: var(--muted); }
.in-n8n { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 2px 0 4px; padding: 1px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 500; text-decoration: none !important; }

/* email settings / cancel feedback page */
.mail-pref .mp-card{max-width:560px}
.mail-pref .mp-card .btn{margin-top:8px}
.mail-pref .mp-card form{margin:0}

/* admin: system monitor */
.mon-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.mon-actions form{margin:0}
.mon-table td{vertical-align:top}
.mon-msg{display:block;max-width:560px;white-space:pre-wrap;word-break:break-word;font-size:11.5px;line-height:1.5;background:none;padding:0;color:var(--text)}
.mon-lv{display:inline-block;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;padding:3px 8px;border-radius:999px;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.mon-table .lv-fatal .mon-lv{background:#FBEDEC;color:#B3261E}
.mon-table .lv-warning .mon-lv{background:#FFF4E0;color:#8A5A00}
[data-theme="dark"] .mon-table .lv-fatal .mon-lv{background:rgba(179,38,30,.25);color:#F2B8B5}
[data-theme="dark"] .mon-table .lv-warning .mon-lv{background:rgba(138,90,0,.3);color:#F5D48A}
.mon-table td:last-child{white-space:nowrap}

/* admin: n8n member flow */
.flow-state{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 14px;font-size:13.5px}
.flow-dot{width:8px;height:8px;border-radius:50%;background:var(--pewter)}
.flow-dot.on{background:#2E9E5B;box-shadow:0 0 0 3px rgba(46,158,91,.18)}
.flow-form{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;gap:12px;align-items:end;margin-top:6px}
.flow-form label{margin:0}
@media (max-width:720px){.flow-form{grid-template-columns:1fr}}
.mon-actions .btn[disabled]{opacity:.5;cursor:not-allowed}

/* login setup wizard */
.lg-summary{margin:0 0 18px}
.lg-meter{height:6px;border-radius:999px;background:var(--surface-2);overflow:hidden;margin:0 0 10px}
.lg-meter span{display:block;height:100%;background:var(--text);border-radius:inherit;transition:width .4s}
.lg-list{display:grid;gap:14px;margin:0 0 22px}
.lg-card{border:1px solid var(--border);border-radius:18px;background:var(--surface);padding:18px 20px}
.lg-card.is-ready{border-color:rgba(46,158,91,.45)}
.lg-card header{display:flex;gap:12px;align-items:flex-start}
.lg-card header>div{flex:1;min-width:0}
.lg-card h3{margin:0;font-size:15px;font-weight:600}
.lg-card h3 code{font-size:11px;color:var(--muted);font-weight:400;margin-left:4px}
.lg-card header p{margin:3px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lg-state{flex:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);color:var(--muted)}
.lg-card.is-ready .lg-state{background:rgba(46,158,91,.14);color:#2E9E5B}
.lg-badge{flex:none;font-size:11px;letter-spacing:.04em;padding:4px 10px;border-radius:999px;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.lg-card.is-ready .lg-badge{background:rgba(46,158,91,.14);color:#2E9E5B}
.lg-body{margin:12px 0 0 42px}
.lg-steps{margin:0 0 12px;padding-left:18px;font-size:13.5px;line-height:1.6}
.lg-steps a{word-break:break-all}
.lg-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px 14px;margin:0 0 12px}
.lg-fields label{margin:0;font-size:12.5px}
.lg-fields .req{color:#B3261E}
.lg-own{margin-top:10px;font-size:13px}
.lg-own summary{cursor:pointer;color:var(--muted)}
.lg-use{display:flex;gap:8px;margin-top:8px}
.lg-use input{flex:1;min-width:0}
.lg-actions{display:flex;flex-wrap:wrap;gap:8px}
.lg-msg{margin:10px 0 0;color:#2E9E5B}
.lg-msg.bad,.lg-fields .bad{color:#B3261E}
.btn.ghost{background:none;border-color:transparent;color:var(--muted)}
@media (max-width:640px){.lg-body{margin-left:0}.lg-card header{flex-wrap:wrap}.lg-badge{order:3}}
.deploy-cred-actions{display:flex;flex-wrap:wrap;gap:8px}
.lg-fields label[hidden]{display:none}.lg-fields .lg-bool{align-self:end;padding-bottom:8px}

/* make it mine */
.adapt-panel textarea{width:100%;resize:vertical;min-height:64px}
.adapt-ideas{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.adapt-ideas .chip{cursor:pointer;border:1px solid var(--border);background:var(--surface);font:inherit;font-size:12px}
.adapt-ideas .chip:hover{border-color:var(--border-strong)}
.adapt-go{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.adapt-go .bad,[data-adapt-sent].bad{color:#B3261E}
.adapt-changes{list-style:none;padding:0;margin:0 0 12px;display:grid;gap:6px;font-size:14px}
.adapt-changes .i{color:#2E9E5B;vertical-align:-2px}
.adapt-diff p{margin:4px 0;font-size:13.5px}
.adapt-diff .d-add{color:#2E9E5B}.adapt-diff .d-del{color:#B3261E}.adapt-diff .d-mod{color:#8A5A00}
.adapt-warn{margin-top:12px;padding:10px 14px;border-radius:12px;background:var(--surface-2);font-size:13px}
.adapt-warn p{margin:4px 0}
.adapt-history{list-style:none;padding:0;margin:0;font-size:13px;display:grid;gap:4px}
.adapt-history li.on a{font-weight:600}
.btn.wide{width:100%;justify-content:center}

/* project starter kit */
.kit-head{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.kit-head h2{margin:0 0 4px;display:flex;align-items:center;gap:8px}
.kit-head p{max-width:720px;margin:0}
.kit-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto;gap:12px;align-items:end;margin-top:14px}
.kit-form label{margin:0}
.kit-progress{display:flex;align-items:center;gap:12px;margin-top:14px}
.kit-progress .progress{flex:1}
.kit-progress .bad{color:#B3261E}
.kit-files{columns:2;margin:10px 0 0;padding-left:18px}
@media (max-width:720px){.kit-form{grid-template-columns:1fr}.kit-files{columns:1}}
.kit-resume{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0 0}

/* ---------- Builder ---------- */
.main.main-wide { max-width: none; padding-top: 24px; padding-bottom: 24px; }
.build-list { list-style: none; margin: 0; padding: 0; }
.build-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.build-list li > a { flex: 0 1 auto; }
.build-list li > span { flex: 1; }
.build-proj { list-style: none; margin: 0 0 8px; padding: 0; }
.build-proj li { padding: 4px 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--text); font: inherit; cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: 6px; }
.linklike:hover { text-decoration: underline; }
.linklike:disabled { cursor: default; text-decoration: none; opacity: .7; }
.bld-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.bld-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
.bld-title h1 { font-size: 28px; overflow-wrap: anywhere; }
.bld-grid { display: grid; grid-template-columns: clamp(190px, 16vw, 250px) minmax(0, 1fr) clamp(320px, 26vw, 420px); gap: 12px; height: calc(100vh - 130px); min-height: 520px; }
.bld-files, .bld-editor, .bld-chat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.bld-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); min-height: 46px; }
.bld-tools { display: flex; align-items: center; gap: 6px; }
.bld-tools .btn.small, .bld-chat .btn.small { height: 32px; padding: 0 14px; font-size: 13px; }
.bld-path { font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bld-filter { margin: 8px 10px; height: 34px; font-size: 13px; }
.bld-tree { list-style: none; margin: 0; padding: 0 4px 12px; overflow: auto; flex: 1; font-size: 13px; }
.bld-tree li button { width: 100%; text-align: left; background: none; border: 0; color: var(--text-2); font: 13px/1.35 var(--font); padding: 4px 8px 4px calc(10px + var(--d, 0) * 14px); border-radius: 8px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bld-tree li button:hover { background: var(--accent-soft); color: var(--text); }
.bld-tree .bt-dir button { color: var(--muted); font-weight: 500; }
.bld-tree .bt-dir button::before { content: "▾ "; font-size: 10px; }
.bld-tree .bt-dir.closed button::before { content: "▸ "; }
.bld-tree .bt-file.on button { background: var(--surface-2); color: var(--text); font-weight: 500; }
.bld-code { flex: 1; display: flex; min-height: 0; background: var(--bg); }
.bld-code[hidden] { display: none; }
.bld-gutter { margin: 0; padding: 14px 8px 14px 12px; min-width: 48px; text-align: right; color: var(--muted); background: transparent; border-radius: 0; overflow: hidden; font: 12.5px/1.6 var(--mono); user-select: none; opacity: .7; }
.bld-code textarea { flex: 1; border: 0; border-radius: 0; resize: none; padding: 14px 16px 14px 8px; font: 12.5px/1.6 var(--mono); background: transparent; color: var(--text); white-space: pre; overflow: auto; tab-size: 2; outline: none; box-shadow: none; min-height: 0; height: auto; }
.bld-diff { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.bld-diff[hidden] { display: none; }
.bld-diff pre { flex: 1; margin: 0; border-radius: 0; overflow: auto; font: 12.5px/1.55 var(--mono); padding: 12px 0; background: var(--bg); color: var(--text); }
.bld-diff pre span { display: block; padding: 0 16px; white-space: pre; }
.bld-diff .d-add, .bm-changes .d-add { color: var(--ok); }
.bld-diff .d-del, .bm-changes .d-del { color: var(--err); }
.bld-diff span.d-add { background: var(--ok-soft); }
.bld-diff span.d-del { background: var(--err-soft); }
.bld-diff .d-skip { color: var(--muted); font-style: italic; padding: 4px 16px; }
.bld-msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.bm { border-radius: 14px; padding: 10px 14px; line-height: 1.55; overflow-wrap: anywhere; }
.bm-user { background: var(--surface-2); align-self: flex-end; max-width: 92%; }
.bm-ai { border: 1px solid var(--border); }
.bm pre { font-size: 12px; padding: 10px 12px; margin: 8px 0; white-space: pre; }
.bm-wait { display: flex; align-items: center; gap: 8px; margin: 0; }
.bm-changes { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bm-changes li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.bm-changes li .linklike { font-family: var(--mono); font-size: 12.5px; }
.bm-changes li em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.bm-changes li small { flex-basis: 100%; color: var(--err); padding-left: 22px; }
.bm-changes li.done .linklike { color: var(--muted); }
.ok-dot { color: var(--ok); width: 14px; text-align: center; }
.bad-dot { color: var(--err); width: 14px; text-align: center; font-weight: 600; }
.bm-do { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.bm-empty { margin: auto; text-align: center; max-width: 280px; }
.bld-ask { border-top: 1px solid var(--border); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.bld-ask textarea { min-height: 70px; font-size: 14px; resize: vertical; }
.bld-ask-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bld-ask p { margin: 0; }
p.bad, .bm .bad { color: var(--err); }
@media (max-width: 1180px) { .bld-grid { grid-template-columns: 210px minmax(0, 1fr); height: auto; } .bld-chat { grid-column: 1 / -1; height: 560px; } .bld-editor { height: 70vh; } }
@media (max-width: 720px) { .bld-grid { grid-template-columns: 1fr; } .bld-files { max-height: 260px; } }
.kit-btns{display:flex;gap:10px;flex-wrap:wrap}
.create-panel textarea{width:100%;resize:vertical;min-height:120px}
.create-panel .adapt-go{margin-top:10px}
.create-panel [data-create-status].bad{color:var(--err)}
.create-examples{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.create-examples .linklike{font-size:13.5px;color:var(--text-2);line-height:1.5;display:block}
.doc-list{list-style:none;margin:0;padding:0}
.doc-item{border-bottom:1px solid var(--border);padding:14px 0}
.doc-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.doc-what{display:flex;flex-direction:column;gap:2px;min-width:0}
.doc-card{margin-top:12px;padding:16px 18px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg)}
.doc-card p{margin:0 0 8px}
.doc-err{font-size:13px;color:var(--text-2);overflow-wrap:anywhere}
.doc-err code{font-size:12px}
.doc-steps{margin:6px 0 12px;padding-left:20px}
.doc-steps li{margin:3px 0}
.doc-result .bad{color:var(--err)}
.ait-clients{display:flex;flex-wrap:wrap;gap:8px}
.ait-client{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--border-strong);border-radius:999px;cursor:pointer;font-size:14px}
.ait-client.on{border-color:var(--text);background:var(--accent-soft)}
.ait-client input{margin:0}
.ait-proj{display:block;margin-top:18px}
.ait-tools{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:6px;max-height:340px;overflow:auto}
.ait-tools label{display:flex;align-items:center;gap:8px;font-size:14px;cursor:pointer}
.ait-code{position:relative}
.ait-code pre{max-height:360px;padding-right:90px}
.ait-code .btn{position:absolute;top:10px;right:10px;color:var(--on-dark);border-color:rgba(244,244,244,.3)}
.ait-paths{margin:6px 0 10px;padding-left:18px}
.ait-paths li{margin:4px 0}
.ait-manual{margin:6px 0;padding-left:18px}
label.ait-client, .ait-tools label { flex-direction: row; align-items: center; }
.ait-tools label { justify-content: flex-start; font-size: 14px; color: var(--text); }
.ait-proj select { max-width: 360px; }
.ho-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.ho-tools .row{display:flex;gap:8px;flex-wrap:wrap}
.ho-doc{max-width:900px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:44px 52px;line-height:1.65}
.ho-doc header{margin-bottom:28px}
.ho-doc h1{font-size:40px;margin:10px 0 8px}
.ho-doc h2{font-size:24px;margin:34px 0 12px}
.ho-doc h3{font-size:15px;font-family:var(--font);font-weight:600;margin:16px 0 6px}
.ho-doc ol,.ho-doc ul{padding-left:22px}
.ho-table{width:100%;border-collapse:collapse;font-size:14px;margin:12px 0}
.ho-table th,.ho-table td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--border);vertical-align:top}
.ho-table th{font-weight:600;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.ho-facts{display:grid;grid-template-columns:180px 1fr;gap:6px 18px;margin:12px 0 0}
.ho-facts dt{font-weight:600;font-size:13.5px}
.ho-facts dd{margin:0;overflow-wrap:anywhere}
.ho-logins li{margin:8px 0;overflow-wrap:anywhere}
.ho-tools [data-handover-status].bad{color:var(--err)}
@media (max-width:720px){.ho-doc{padding:24px 20px}.ho-facts{grid-template-columns:1fr}.ho-table{font-size:12.5px}}
.watch-panel{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.watch-panel h2{display:flex;align-items:center;gap:10px;font-size:22px;margin:0 0 6px}
.watch-panel p{margin:0;max-width:720px}
.cost-table{width:100%;border-collapse:collapse;font-size:14px}
.cost-table th,.cost-table td{text-align:left;padding:8px;border-bottom:1px solid var(--border);vertical-align:middle}
.cost-table th{font-size:11.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:600}
.cost-table input{width:90px;min-height:36px;padding:6px 10px}
.cost-table td[data-out-exec],.cost-table td[data-out-ai]{font-variant-numeric:tabular-nums;white-space:nowrap}
.cost-sum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.cost-sum > div{display:flex;flex-direction:column;gap:4px}
.cost-sum b{font-family:var(--display);font-weight:300;font-size:30px;font-variant-numeric:tabular-nums}
@media (max-width:900px){.cost-sum{grid-template-columns:repeat(2,minmax(0,1fr))}.cost-table{display:block;overflow-x:auto}}
.lg-fields{display:block}
.lg-req{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px 14px;margin:0 0 10px}
.lg-more{margin:0 0 12px}
.lg-more summary{cursor:pointer;margin-bottom:8px}
.lg-found{border:1px solid var(--ok);background:var(--ok-soft);border-radius:var(--radius-sm);padding:12px 14px;margin:0 0 14px}
.lg-found p{margin:0 0 8px}
