/* Muse on AIPI — shared styles.
   Layout: one centered column (max 1200px) with a 16–48px side gutter; pages stack
   full-width bands; the setup tools use a step rail + work panel that stacks on phones. */

/* Self-hosted fonts (latin subset, woff2). The stacks below keep the system fallbacks. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-display: swap; src: url("../fonts/BricolageGrotesque.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/IBMPlexSans.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/IBMPlexMono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/IBMPlexMono-500.woff2") format("woff2"); }

:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --tint: #F1F4FA;
  --ink: #14161B;
  --ink-2: #3A3F4A;
  --muted: #4A505C;
  --line: #E2E5EA;
  --line-2: #C9CED6;
  --accent: #2456E8;
  --accent-ink: #163BA8;
  --accent-soft: #E8EEFF;
  --on-accent: #FFFFFF;
  --ok: #16794A;
  --ok-ink: #0F5A36;
  --ok-soft: #F0F8F3;
  --warn: #E8740C;
  --warn-ink: #5C3600;
  --warn-soft: #FFF6E6;
  --bad: #B42318;
  --bad-soft: #FDF0EF;
  --band: #14161B;
  --band-2: #22252C;
  --band-ink: #FFFFFF;
  --band-muted: #C5CAD3;
  --band-line: #3A3F4A;
  --mock: #FAFBFC;
  --mock-field: #EEF0F3;
  --shadow: 0 12px 32px -16px rgba(20, 22, 27, 0.28);
  --img-blend: multiply;
  --img-bg: transparent;

  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --gutter: clamp(16px, 4vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1115; --surface: #171A20; --tint: #1B2130; --ink: #EEF0F4; --ink-2: #C9CED6; --muted: #A9AFBA;
    --line: #2A2F38; --line-2: #3D434F; --accent: #7D9FFF; --accent-ink: #A9C0FF; --accent-soft: #1C2647; --on-accent: #0B1020;
    --ok: #47C887; --ok-ink: #9BE6BE; --ok-soft: #10261A; --warn: #F39A4A; --warn-ink: #F6D29B; --warn-soft: #2A2114;
    --bad: #FF8C80; --bad-soft: #2C1513; --band: #0A0C10; --band-2: #161A21; --band-ink: #FFFFFF; --band-muted: #B8BEC9;
    --band-line: #2E333C; --mock: #14171C; --mock-field: #222731; --shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.7); --img-blend: normal; --img-bg: #FFFFFF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1115; --surface: #171A20; --tint: #1B2130; --ink: #EEF0F4; --ink-2: #C9CED6; --muted: #A9AFBA;
  --line: #2A2F38; --line-2: #3D434F; --accent: #7D9FFF; --accent-ink: #A9C0FF; --accent-soft: #1C2647; --on-accent: #0B1020;
  --ok: #47C887; --ok-ink: #9BE6BE; --ok-soft: #10261A; --warn: #F39A4A; --warn-ink: #F6D29B; --warn-soft: #2A2114;
  --bad: #FF8C80; --bad-soft: #2C1513; --band: #0A0C10; --band-2: #161A21; --band-ink: #FFFFFF; --band-muted: #B8BEC9;
  --band-line: #2E333C; --mock: #14171C; --mock-field: #222731; --shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.7); --img-blend: normal; --img-bg: #FFFFFF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
code, .mono { font-family: var(--f-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.colors-img { flex: 0 1 300px; width: 300px; height: auto; border-radius: 24px; mix-blend-mode: var(--img-blend); background: var(--img-bg); }
b, strong { font-weight: 600; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 920px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- header / footer ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; padding-block: 12px; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.brand-sub { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; }
.brand-sub::before { content: ""; width: 1px; height: 22px; background: var(--line-2); }
.site-nav { display: flex; gap: 6px 20px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--ink-2); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.spacer { flex: 1; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 14px; }
.site-footer .wrap { padding-block: 36px 48px; display: flex; flex-direction: column; gap: 16px; }
.site-footer p { margin: 0; max-width: 860px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- type ---------- */
.eyebrow { margin: 0; font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eyebrow.accent { color: var(--accent); text-transform: none; letter-spacing: 0; }
.display { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(42px, 6vw, 76px); line-height: 1.0; letter-spacing: -0.035em; }
.h2 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 4vw, 46px); line-height: 1.06; letter-spacing: -0.03em; }
.h3 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.3; }
.lead { margin: 0; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 17px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { color: var(--bg); opacity: .9; }
.btn-link { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--accent); text-decoration: underline; font-weight: 600; }
.btn-quiet { background: none; border: 0; min-height: 44px; padding: 0 8px; color: var(--muted); text-decoration: underline; font-weight: 400; font-size: 14px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--line); color: var(--muted); border-color: transparent; cursor: not-allowed; }
.btn svg { flex: 0 0 auto; }

/* ---------- surfaces ---------- */
.band { padding-block: clamp(56px, 7vw, 96px); }
.band-white { background: var(--surface); border-block: 1px solid var(--line); }
.band-dark { background: var(--band); color: var(--band-ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-plain { background: var(--line); color: var(--ink-2); }
.kbd { font-family: var(--f-mono); font-size: .92em; padding: 1px 6px; border-radius: 6px; background: var(--mock-field); border: 1px solid var(--line); }
.code-chip { font-family: var(--f-mono); padding: 3px 8px; border-radius: 8px; background: var(--ink); color: var(--bg); }

.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); font-size: 15px; line-height: 1.5; }
.note p { margin: 0; }
.note svg { flex: 0 0 auto; margin-top: 2px; }
.note-info { background: var(--tint); color: var(--ink-2); }
.note-warn { background: var(--warn-soft); color: var(--warn-ink); }
.note-ok { background: var(--ok-soft); color: var(--ok-ink); border: 1.5px solid var(--ok); }
.note-bad { background: var(--bad-soft); color: var(--bad); border: 1.5px solid var(--bad); }
.note-bad a, .note-warn a { color: inherit; }

/* ---------- hero ---------- */
.hero .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.hero-copy { flex: 1 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-art { flex: 1 1 360px; min-width: 0; display: flex; justify-content: center; }
.hero-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 28px 20px 22px; border-radius: 32px; background: var(--tint); max-width: 100%; }
.hero-caption { display: flex; align-items: center; gap: 12px; max-width: 340px; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.hero-caption p { margin: 0; }

/* ---------- numbered steps (how it works) ---------- */
.how-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.how-grid li { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.how-grid .where { font-family: var(--f-mono); font-size: 14px; color: var(--accent); }
.how-grid p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- checklist ---------- */
.checklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.check-title { display: block; font-size: 17px; font-weight: 600; }
.check-detail { display: block; font-size: 15px; color: var(--muted); }
.ready-card { display: flex; flex-direction: column; gap: 16px; padding: 26px; border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--line); }
.bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .2s ease; }
.bar-thin { height: 8px; }

/* ---------- compare table ---------- */
.table-box { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.compare { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 16px 22px; text-align: left; vertical-align: top; }
.compare thead tr { background: var(--bg); }
.compare tbody tr { border-top: 1px solid var(--line); }
.compare tbody th { font-weight: 600; width: 22%; }
.compare td:nth-child(2) { color: var(--ink-2); }
.compare thead th:last-child { color: var(--accent-ink); }

/* ---------- commitment band ---------- */
.promises { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px 40px; }
.promises li { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--band-line); }
.promises h3 { margin: 0; font-size: 19px; font-weight: 600; }
.promises p { margin: 0; color: var(--band-muted); font-size: 15px; }
.build-strip { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; padding: 16px 20px; border-radius: var(--r-md); background: var(--band-2); font-family: var(--f-mono); font-size: 14px; color: var(--band-muted); }
.build-strip b { color: var(--band-ink); font-weight: 500; }
.band-dark a { color: #A9C0FF; }

/* ---------- accordions (details) ---------- */
.accordion { border-top: 1px solid var(--line-2); }
.accordion details { border-bottom: 1px solid var(--line-2); }
.accordion summary {
  list-style: none; cursor: pointer; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 4px; font-size: 17px; font-weight: 600;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-family: var(--f-mono); font-size: 22px; color: var(--accent); flex: 0 0 auto; }
.accordion details[open] summary::after { content: "−"; }
.accordion .acc-body { padding: 0 4px 20px; color: var(--ink-2); max-width: 72ch; }
.accordion .acc-body p { margin: 0 0 8px; }
.accordion .acc-body ol, .accordion .acc-body ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- link cards ---------- */
.link-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; }
.link-card:hover { border-color: var(--line-2); color: var(--ink); }
.link-card b { font-size: 18px; }
.link-card span { color: var(--muted); font-size: 15px; }

/* ---------- guide ---------- */
.guide-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.toc { flex: 1 1 220px; max-width: 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.toc a { min-height: 40px; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.toc a span { font-family: var(--f-mono); color: var(--accent); }
.guide-main { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; }
.guide-part { display: flex; flex-direction: column; gap: 18px; padding-block: 44px; border-top: 1px solid var(--line-2); scroll-margin-top: 16px; }
.guide-part:first-child { border-top: 0; padding-top: 0; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.step { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.step-n { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--bg); font-family: var(--f-mono); font-size: 14px; }
.step-n.done { background: var(--ok); color: var(--on-accent); }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.step-body h3 { margin: 0; font-size: 18px; font-weight: 600; }
.step-body p { margin: 0; color: var(--ink-2); }
.step-split { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.step-split > div:first-child { flex: 1 1 260px; min-width: 0; }
.tip { margin: 6px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; }
.mock { margin-top: 8px; display: flex; flex-direction: column; gap: 10px; max-width: 440px; padding: 16px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--mock); font-size: 13px; }
.mock-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mock-title { font-size: 15px; font-weight: 600; }
.mock-field { padding: 9px 12px; border-radius: 8px; background: var(--mock-field); color: var(--muted); }
.mock-btn { align-self: flex-start; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; }
.mock-btn.blue { background: var(--accent); color: var(--on-accent); }
.mock-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mock-list span { padding: 9px 12px; color: var(--muted); }
.mock-list span.sel { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.mock-actions { display: flex; justify-content: flex-end; gap: 8px; }
.mock-actions span { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); }
.mock-actions span.blue { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }

/* ---------- setup / restore apps ---------- */
.app-head .wrap { padding-block: 12px; }
.app-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-block: 28px 56px; }
.app-aside { flex: 1 1 250px; max-width: 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.app-panel { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: clamp(20px, 3vw, 40px); border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.app-panel h1 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.03em; }
.rail { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rail button { width: 100%; display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1.5px solid transparent; background: transparent; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.rail button:disabled { cursor: default; }
.rail button[aria-current="step"] { background: var(--surface); border-color: var(--accent); }
.rail-n { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: 14px; background: var(--line); color: var(--ink-2); }
.rail button[aria-current="step"] .rail-n { background: var(--accent); color: var(--on-accent); }
.rail button[data-done="true"] .rail-n { background: var(--ok); color: var(--on-accent); }
.rail-t { display: flex; flex-direction: column; gap: 2px; }
.rail-t b { font-size: 16px; }
.rail-t span { font-size: 13px; color: var(--muted); }
.live { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.live dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.live dt { color: var(--muted); }
.live dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; background: var(--line-2); flex: 0 0 auto; }
.dot.orange { background: var(--warn); } .dot.blue { background: var(--accent); } .dot.green { background: var(--ok); } .dot.red { background: var(--bad); }

.mini-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-width: 700px; }
.mini-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1.5px solid transparent; }
.mini-steps li[data-state="active"] { background: var(--accent-soft); border-color: var(--accent); }
.mini-steps li[data-state="done"] .mini-n { background: var(--ok); color: var(--on-accent); }
.mini-steps li[data-state="active"] .mini-n { background: var(--accent); color: var(--on-accent); }
.mini-n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--bg); font-family: var(--f-mono); font-size: 13px; }
.mini-steps.plain .mini-n { background: var(--line); color: var(--ink-2); }
.mini-t { display: flex; flex-direction: column; gap: 2px; }
.mini-t b { font-size: 15px; line-height: 1.4; }
.mini-t span { font-size: 14px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.field label { font-weight: 600; font-size: 15px; }
.input { min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-family: var(--f-mono); font-size: 15px; width: 100%; }
.input[data-state="ok"] { border-color: var(--ok); }
.input[data-state="bad"] { border-color: var(--bad); }
.hint { margin: 0; font-size: 14px; color: var(--muted); }
.hint[data-state="ok"] { color: var(--ok); }
.hint[data-state="bad"] { color: var(--bad); }

.phases { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.phase { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); }
.phase[data-state="running"] { border-color: var(--accent); background: var(--accent-soft); }
.phase-n { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: 13px; background: var(--line); color: var(--ink-2); }
.phase[data-state="running"] .phase-n { background: var(--accent); color: var(--on-accent); }
.phase[data-state="done"] .phase-n { background: var(--ok); color: var(--on-accent); }
.phase-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.phase-top { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.phase-pct { font-family: var(--f-mono); font-size: 14px; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.phase-detail { font-size: 14px; color: var(--muted); }
.phase .bar { margin-top: 6px; background: var(--surface); }

.found { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 18px; border: 1.5px solid var(--ok); background: var(--ok-soft); }
.found-title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--ok-ink); }
.found dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; font-size: 14px; }
.found dt { color: var(--muted); }
.found dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }

.pair-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.pair-device { flex: 0 1 340px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; border-radius: 22px; background: var(--tint); }
.pair-steps { flex: 999 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.status-line { align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); }
.status-line b { display: block; font-size: 15px; }
.status-line span.sub { display: block; font-size: 13px; color: var(--muted); }
.success { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; padding: 22px 24px; border-radius: 20px; background: var(--band); color: var(--band-ink); }
.success > div { flex: 1 1 300px; display: flex; flex-direction: column; gap: 6px; }
.success p { margin: 0; color: var(--band-muted); }
.success .big { font-family: var(--f-display); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; color: var(--band-ink); }
.success .btn-secondary { background: var(--band-ink); color: #14161B; border-color: var(--band-ink); }
.demo-banner { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; }
.log { max-height: 160px; overflow: auto; padding: 10px 12px; border-radius: 10px; background: var(--mock); border: 1px solid var(--line); font-family: var(--f-mono); font-size: 12px; color: var(--muted); white-space: pre-wrap; }

.option { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 auto; }

/* ---------- backup file dropzone (restore) ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 18px; border-radius: 18px; border: 1.5px dashed var(--line-2); background: var(--bg); text-align: center; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.dropzone b { font-size: 16px; }
.dropzone .small { color: var(--muted); }
.dropzone:hover, .dropzone:focus-within, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- help (phone) ---------- */
.phone-col { max-width: 480px; margin-inline: auto; padding-inline: 20px; }
.symptoms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.symptom { min-height: 64px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.symptom[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.symptom b { font-size: 15px; }
.symptom span { font-size: 12px; color: var(--muted); }

/* ---------- AIPI device illustration ---------- */
aipi-device { display: block; width: calc(300px * var(--s, 1)); height: calc(225px * var(--s, 1)); max-width: 100%; flex: 0 0 auto; }
aipi-device.hero { --s: 1.35; }
aipi-device.small { --s: 0.9; }
@media (max-width: 520px) { aipi-device.hero { --s: 1; } aipi-device { --s: 0.95; } }
.aipi-device { position: relative; width: 300px; height: 225px; transform: scale(var(--s, 1)); transform-origin: 0 0; font-family: var(--f-body); }
.aipi-device > img { position: absolute; inset: 0; width: 300px; height: 225px; display: block; max-width: none; }
.aipi-screen { position: absolute; left: 0; top: 0; width: 150px; height: 150px; transform-origin: 0 0; background: #050608; overflow: hidden; border-radius: 2px; color: #FFFFFF; }
.aipi-glare { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(140deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 32%, rgba(255,255,255,0) 50%); }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.s-dim { font-size: 11px; color: #A7ADB8; }
.s-mono { font-family: var(--f-mono); }
.s-code { font-family: var(--f-mono); font-weight: 500; font-size: 34px; line-height: 1.05; letter-spacing: .03em; }
.s-pill { margin-top: 8px; padding: 2px 9px; border-radius: 999px; background: #E8740C; font-size: 10px; font-weight: 600; }
.s-press { font-family: var(--f-display); font-weight: 800; font-size: 38px; letter-spacing: -.02em; line-height: 1; }
.s-dot { position: absolute; top: 9px; left: 9px; width: 9px; height: 9px; border-radius: 5px; }
.s-eyes { display: flex; gap: 28px; height: 32px; align-items: center; }
.s-eyes i { display: block; width: 18px; height: 30px; border-radius: 9px; background: #FFFFFF; }
.s-qr { width: 92px; height: 92px; padding: 4px; border-radius: 4px; background: #FFFFFF; }
.aipi-ring { position: absolute; left: 148px; top: 167px; width: 28px; height: 28px; border-radius: 14px; border: 3px solid #FFC93C; box-shadow: 0 0 0 5px rgba(255,201,60,.35); }
@media (prefers-reduced-motion: no-preference) {
  .aipi-ring { animation: ring 1.4s ease-in-out infinite; }
  @keyframes ring { 50% { box-shadow: 0 0 0 9px rgba(255,201,60,.15); } }
}
