:root {
  --bg: #f6eddd;
  --bg-deep: #efe3d1;
  --sidebar: #e9dcca;
  --card: #f9f2e5;
  --card-soft: #faf4e9f7;
  --code-bg: #f8f0e3;
  --line: #cec0ad;
  --line-soft: #e2d7c7;
  --navy: #18213d;
  --navy-2: #24304a;
  --ink: #4f535b;
  --muted: #696d74;
  --faint: #ada293;
  --teal: #1aa3a1;
  --teal-deep: #3f7f8e;
  --orange: #e07b39;
  --trace: #d3bea3;
  --track: #e3d8ca;
  --kw: #2a56a3;
  --fn: #c0652d;
  --str: #3f8a5a;
  --gutter: #aaa59d;
  --term: #161d33;
  --term-2: #1f2944;
  --sans: "Barlow", system-ui, sans-serif;
  --cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); height: 100%; margin: 0; overflow: hidden; }
body { font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
code { font-family: var(--mono); }
svg .fill { fill: currentColor; stroke: none; }

/* ---------- Logo ---------- */
.logo-pins { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.logo-body { fill: none; stroke: currentColor; stroke-width: 3.4; }
.logo-mark { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--bg); transition: opacity .5s, visibility 0s linear .5s; }
.loader::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(90deg, #cec0ad52 1px, transparent 1px), linear-gradient(#cec0ad52 1px, transparent 1px); background-size: 28px 28px; background-position: 50%; mask-image: radial-gradient(circle, #000 0, transparent 62%); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 62%); }
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
.loader-logo { width: 64px; height: 64px; color: var(--navy); }
.loader-title { font-family: var(--cond); letter-spacing: .13em; text-transform: uppercase; color: var(--navy); font-size: 28px; font-weight: 600; margin: 14px 0 18px; }
.loader-track { width: 220px; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.loader-fill { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--teal); transition: width .35s var(--ease); }
.loader-step { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); margin: 12px 0 0; }
.noscript { max-width: 420px; text-align: center; }

/* ---------- Artboard (fixed 1672 × 941, scaled to fit) ---------- */
.artboard {
  position: absolute; top: 0; left: 0; width: 1672px; height: 941px; overflow: hidden; transform-origin: 0 0;
  background: radial-gradient(ellipse 60% 55% at 38% 48%, #fbf4e7 0%, transparent 60%), var(--bg);
}
.traces { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.traces path { fill: none; stroke: var(--trace); stroke-width: 1.5; stroke-linejoin: round; }
.traces circle { fill: var(--bg); stroke: var(--trace); stroke-width: 1.5; }
.traces .pulse { stroke: var(--teal); stroke-width: 2; stroke-dasharray: 14 600; animation: pulse 7s linear infinite; opacity: .55; }
@keyframes pulse { from { stroke-dashoffset: 614; } to { stroke-dashoffset: 0; } }

/* ---------- Sidebar ---------- */
.sidebar { position: absolute; top: 0; bottom: 0; left: 0; width: 72px; z-index: 3; background: linear-gradient(90deg, #e7d9c6 0%, var(--sidebar) 70%, #eadecd 100%); box-shadow: inset -1px 0 #c4b09659; }
.side-nav { list-style: none; margin: 0; padding: 120px 0 0; display: flex; flex-direction: column; gap: 14px; }
.side-nav li { display: grid; place-items: center; width: 72px; position: relative; }
.side-nav a { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: var(--navy-2); text-decoration: none; transition: background .2s, color .2s; position: relative; }
.side-nav a svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.side-nav a:hover, .side-nav a.is-open { background: #dccdb8; }
.side-nav li.is-active a { background: var(--navy); color: #f6eddd; box-shadow: 0 6px 14px -8px #18213d; }
.side-nav li.is-active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal); }
.side-nav li.is-muted a { color: var(--muted); }
.side-label { position: absolute; left: 58px; top: 50%; transform: translate(-6px, -50%); white-space: nowrap; pointer-events: none; opacity: 0; font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--card); background: var(--navy); padding: 4px 9px; border-radius: 6px; transition: opacity .15s, transform .2s var(--ease); }
.side-nav a:hover .side-label { opacity: 1; transform: translate(0, -50%); }
.side-nav a.is-open .side-label { opacity: 0; }
.side-gh { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); border-radius: 10px; transition: color .2s, background .2s; }
.side-gh svg { width: 22px; height: 22px; }
.side-gh:hover { color: var(--navy); background: #dccdb8; }

/* ---------- Flyout ---------- */
.flyout { position: absolute; left: 84px; top: var(--top, 140px); z-index: 7; width: 340px; max-height: 640px; overflow: auto; padding: 16px 14px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbf6ecfa; box-shadow: 0 18px 40px -22px #3c2d148c; opacity: 0; pointer-events: none; transform: translateX(-10px); transition: opacity .22s, transform .3s var(--ease); }
.flyout.is-open { opacity: 1; pointer-events: auto; transform: none; }
.flyout h3 { margin: 0 4px 12px; font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.fly-group { margin: 0 0 12px; }
.fly-group > span { display: block; font-family: var(--cond); font-weight: 600; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 0 4px 6px; }
.fly-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; text-align: left; text-decoration: none; }
.fly-item:hover { background: #efe3d1; }
.fly-item.is-current { background: #e6f3f1; }
.fly-item .num { font-family: var(--mono); font-size: 11px; color: var(--faint); width: 18px; }
.fly-item b { font-weight: 600; color: var(--navy); font-size: 14.5px; }
.fly-item small { display: block; color: var(--muted); font-size: 12.5px; }
.fly-item svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--teal-deep); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.timeline li { position: relative; padding: 0 4px 14px 12px; }
.timeline li::before { content: ""; position: absolute; left: -14px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--teal); }
.timeline li.is-edu::before { border-color: var(--faint); }
.timeline time { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .03em; }
.timeline b { display: block; color: var(--navy); font-weight: 600; font-size: 15px; line-height: 1.25; margin-top: 2px; }
.timeline em { font-style: normal; color: var(--teal-deep); font-weight: 500; font-size: 13.5px; }
.timeline p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: 11.5px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--navy-2); white-space: nowrap; }
.chip.is-teal { border-color: #9fd3cd; background: #e6f3f1; color: #17605f; }

/* ---------- Brand ---------- */
.brand { position: absolute; top: 21px; left: 95px; z-index: 2; display: flex; align-items: center; }
.brand-logo { width: 54px; height: 54px; color: var(--navy); }
.brand-rule { width: 1.5px; height: 46px; background: var(--line); margin: 0 18px 0 16px; }
.brand-text h1 { margin: 0; font-family: var(--cond); font-weight: 600; font-size: 36.5px; line-height: 38px; letter-spacing: .13em; text-transform: uppercase; color: var(--navy); }
.brand-text p { margin: 2px 0 0; font-family: var(--cond); font-weight: 500; font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--teal-deep); }
.brand-text i { font-style: normal; color: var(--faint); margin: 0 .2em; }

/* ---------- Stage ---------- */
.stage { position: absolute; z-index: 1; top: 100px; left: 92px; right: 516px; bottom: 182px; }
.device-holder { position: absolute; top: 0; bottom: 44px; left: 184px; right: 0; display: grid; place-items: center; }
.device { width: 880px; height: 600px; flex: none; position: relative; transform-origin: 50% 50%; }
.demobar { position: absolute; left: 184px; right: 0; bottom: 0; height: 36px; display: flex; align-items: center; gap: 10px; }
.demo-hint { flex: 1; margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-hint b { color: var(--navy); font-weight: 500; }
.demo-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--card-soft); font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); text-decoration: none; transition: background .2s, border-color .2s; }
.demo-btn:hover { background: #fff8ec; border-color: var(--faint); }
.demo-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-btn svg.fill, .demo-btn .fill { fill: currentColor; stroke: none; }
.demo-btn.is-private { color: var(--muted); }

/* Callout tags (left column) + leader lines */
.tags { position: absolute; left: 0; top: 0; width: 168px; bottom: 44px; z-index: 2; }
.tag { position: absolute; left: 0; width: 160px; padding: 7px 10px 8px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--card-soft); opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s var(--ease), top .45s var(--ease); }
.tag.is-on { opacity: 1; transform: none; }
.tag b { display: flex; align-items: center; gap: 6px; font-family: var(--cond); font-weight: 600; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.tag b i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: #fff; background: var(--teal); border-radius: 4px; padding: 1px 4px; letter-spacing: 0; }
.tag span { display: block; font-size: 12.5px; line-height: 1.3; margin-top: 2px; color: var(--muted); }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 3; }
.leaders path { fill: none; stroke: var(--teal-deep); stroke-width: 1.3; stroke-dasharray: 3 3; opacity: .8; }
.leaders circle { fill: var(--teal); stroke: #fff; stroke-width: 1.5; }

/* ---------- Status ---------- */
.status { position: absolute; top: 17px; right: 20px; z-index: 2; width: 476px; height: 87px; border: 1.5px solid var(--line); border-radius: 11px; }
.progress-card { position: absolute; top: 9px; left: 9px; width: 270px; height: 66px; display: flex; align-items: center; gap: 18px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--card-soft); }
.progress-icon { width: 36px; height: 36px; flex: none; fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; color: var(--teal); }
.progress-icon .fill { fill: var(--teal); }
.progress-body { flex: 1; }
.progress-label { font-family: var(--cond); font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.progress-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.progress-track { flex: 1; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 3px; transition: width .6s var(--ease); }
.progress-count { font-family: var(--mono); font-size: 13px; color: var(--navy); }
.clock { position: absolute; top: 12px; left: 300px; display: flex; flex-direction: column; gap: 1px; font-family: var(--mono); font-size: 16px; line-height: 21px; letter-spacing: .05em; color: #5d6066; }
.clock-zone { font-family: var(--cond); font-weight: 600; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-deep); line-height: 14px; }

/* ---------- Info card ---------- */
.info-card { position: absolute; top: 120px; right: 20px; z-index: 2; width: 476px; height: 397px; border: 1.5px solid var(--line); border-radius: 12px; background: #f6edde99; display: flex; flex-direction: column; }
.tabs { display: flex; align-items: flex-end; gap: 26px; height: 47px; padding: 0 0 0 22px; border-bottom: 1.5px solid var(--line-soft); flex: none; }
.tabs button { position: relative; height: 47px; padding: 0; border: 0; background: none; font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); transition: color .2s; }
.tabs button:hover { color: var(--muted); }
.tabs button.is-active { color: var(--navy); }
.tabs button.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal); }
.info-body { flex: 1; min-height: 0; overflow: auto; padding: 16px 22px 18px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.info-content { animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.info-content h3 { margin: 0; font-family: var(--cond); font-weight: 600; font-size: 25px; line-height: 1.15; letter-spacing: .02em; color: var(--navy); }
.info-kicker { margin: 0 0 6px; line-height: 1.5; font-family: var(--cond); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-deep); }
.info-kicker .sep { color: var(--faint); margin: 0 .5em; }
.info-lede { margin: 8px 0 14px; font-size: 15px; line-height: 1.5; }
.info-lede code, .feature code, .steps code { font-size: .88em; background: #efe3d1; padding: 1px 5px; border-radius: 4px; color: var(--navy-2); }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.feature { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; }
.feature svg { width: 20px; height: 20px; flex: none; margin-top: 1px; fill: none; stroke: var(--teal); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.stack-group { margin: 0 0 14px; }
.stack-group > span { display: block; margin: 0 0 7px; font-family: var(--cond); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 14.5px; line-height: 1.42; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--teal-deep); border: 1.5px solid #9fd3cd; border-radius: 6px; height: 24px; display: grid; place-items: center; background: #e6f3f1; }
.links-list { display: grid; gap: 10px; }
.link-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; transition: border-color .2s, background .2s; }
a.link-row:hover { border-color: var(--teal); background: #fbf7ef; }
.link-row svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.link-row b { display: block; color: var(--navy); font-weight: 600; font-size: 14.5px; }
.link-row small { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.link-row .arrow { margin-left: auto; width: 16px; height: 16px; stroke: var(--faint); }
.note { margin: 12px 2px 0; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ---------- Code card ---------- */
.code-card { position: absolute; top: 527px; right: 20px; z-index: 2; width: 476px; height: 240px; padding: 0 10px 10px; border: 1.5px solid var(--line); border-radius: 11px; background: #f6edde99; display: flex; flex-direction: column; }
.code-card header { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 2px 0 12px; flex: none; }
.code-card h2 { margin: 0; font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.code-lang { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.code-actions { margin-left: auto; display: flex; gap: 6px; }
.btn-ghost, .btn-run { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); color: var(--navy); }
.btn-ghost svg, .btn-run svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.btn-ghost:hover { background: #fff8ec; }
.btn-ghost.is-done { color: var(--teal); border-color: var(--teal); }
.btn-run { background: var(--navy); border-color: var(--navy); color: #f6eddd; }
.btn-run:hover { background: var(--navy-2); }
.code-card[data-state="running"] .btn-run { background: var(--teal); border-color: var(--teal); }
.code-wrap { position: relative; flex: 1; min-height: 0; border: 1.5px solid var(--line-soft); border-radius: 8px; background: var(--code-bg); overflow: hidden; }
.code { margin: 0; height: 100%; overflow: auto; padding: 10px 12px; font-size: 12px; line-height: 1.62; counter-reset: ln; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.code code { display: block; color: var(--navy-2); white-space: pre; }
.code .ln { display: block; }
.code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 22px; margin-right: 12px; text-align: right; color: var(--gutter); }
.tk-kw { color: var(--kw); }
.tk-fn { color: var(--fn); }
.tk-str { color: var(--str); }
.tk-com { color: var(--faint); font-style: italic; }
.tk-num { color: #a3512b; }
.console { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--term); color: #d7dcea; transition: height .35s var(--ease); display: flex; flex-direction: column; }
.code-card[data-state="running"] .console, .code-card[data-state="done"] .console { height: 58%; }
.console-head { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; flex: none; border-bottom: 1px solid #2b3555; font-family: var(--cond); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.console-dot { width: 7px; height: 7px; border-radius: 50%; background: #5d6680; }
.code-card[data-state="running"] .console-dot { background: var(--teal); box-shadow: 0 0 0 3px #1aa3a133; animation: blink 1s infinite; }
.code-card[data-state="done"] .console-dot { background: #6ccf8e; }
@keyframes blink { 50% { opacity: .35; } }
.console-status { margin-left: auto; color: #8a93ad; }
.console-lines { flex: 1; overflow: auto; padding: 6px 10px; font-family: var(--mono); font-size: 11.5px; line-height: 1.55; white-space: pre-wrap; scrollbar-width: thin; }
.console-lines .ok { color: #6ccf8e; }
.console-lines .dim { color: #7c86a3; }
.console-lines .hl { color: #f5c46b; }

/* ---------- Projects strip ---------- */
.strip { position: absolute; left: 96px; right: 20px; bottom: 16px; z-index: 2; height: 150px; }
.strip h2 { position: absolute; top: -2px; left: 0; margin: 0; font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.strip-scroll { position: absolute; top: 22px; left: 0; right: 0; bottom: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.strip-scroll::-webkit-scrollbar { display: none; }
.project-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; height: 100%; }
.project-list li { flex: 1 0 146px; display: flex; }
.project-card { position: relative; flex: 1; min-width: 146px; height: 100%; padding: 10px 11px; border: 1.5px solid var(--line); border-radius: 11px; background: var(--card-soft); text-align: left; display: flex; flex-direction: column; transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; }
.project-card:hover { transform: translateY(-3px); border-color: var(--faint); box-shadow: 0 10px 22px -16px #3c2d148c; }
.project-card.is-active { border-color: var(--navy); background: #fffaf1; box-shadow: 0 0 0 1.5px var(--navy), 0 12px 24px -16px #18213d; }
.project-card .pc-top { display: flex; align-items: center; justify-content: space-between; }
.project-card .pc-num { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.project-card .pc-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: background .3s, border-color .3s; }
.project-card .pc-check svg { width: 11px; height: 11px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.project-card.is-done .pc-check { background: var(--teal); border-color: var(--teal); }
.project-card.is-done .pc-check svg { opacity: 1; }
.project-card.just-done .pc-check { animation: pop .5s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }
.project-card .pc-icon { flex: none; width: 28px; height: 28px; margin: 4px 0 auto; fill: none; stroke: var(--navy); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.project-card .pc-icon .acc { stroke: var(--teal); }
.project-card b { font-family: var(--cond); font-weight: 600; font-size: 15.5px; line-height: 1.12; color: var(--navy); letter-spacing: .01em; }
.project-card small { margin-top: 3px; font-family: var(--cond); font-weight: 500; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-deep); }

/* =========================================================
   Device mockups
   ========================================================= */
.win { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: #fffdf8; border: 1.5px solid #c9b9a3; box-shadow: 0 30px 60px -34px #3c2d14a6, 0 2px 0 #fff inset; animation: winIn .45s var(--ease); font-size: 14px; color: var(--ink); }
@keyframes winIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.win-bar { flex: none; height: 38px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: #efe5d6; border-bottom: 1px solid #d9cab5; }
.win-dots { display: flex; gap: 7px; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; background: #e2d4c0; border: 1px solid #cdbca4; }
.win-dots i:nth-child(1) { background: #ec8f7a; border-color: #d97a65; }
.win-dots i:nth-child(2) { background: #f1c56b; border-color: #dcae55; }
.win-dots i:nth-child(3) { background: #7fc58f; border-color: #69b07a; }
.win-title { flex: 1; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 48px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-url { flex: 1; height: 26px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 7px; background: #fbf6ee; border: 1px solid #ddd0bd; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 30px; }
.win-url svg { width: 12px; height: 12px; fill: none; stroke: var(--teal-deep); stroke-width: 2.2; }
.win-body { flex: 1; min-height: 0; position: relative; display: flex; }

/* dark terminal window */
.win.is-dark { background: var(--term); border-color: #0f1527; }
.win.is-dark .win-bar { background: #222b47; border-bottom-color: #10172b; }
.win.is-dark .win-dots i { background: #3a4466; border-color: #2c3554; }
.win.is-dark .win-dots i:nth-child(1) { background: #ec8f7a; border-color: #d97a65; }
.win.is-dark .win-dots i:nth-child(2) { background: #f1c56b; border-color: #dcae55; }
.win.is-dark .win-dots i:nth-child(3) { background: #7fc58f; border-color: #69b07a; }
.win.is-dark .win-title { color: #8e98b6; }
.term { flex: 1; overflow: auto; padding: 14px 18px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: #d7dcea; white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; scrollbar-color: #3a4466 transparent; cursor: text; }
.term .p { color: #6ccf8e; }
.term .p b { color: #7fb0ff; font-weight: 500; }
.term .dim { color: #7c86a3; }
.term .err { color: #ff8f7a; }
.term .hl { color: #f5c46b; }
.term .cy { color: #6fd6d4; }
.term .bl { color: #7fb0ff; }
.term .mg { color: #d59cf5; }
.term .ok { color: #6ccf8e; }
.term a.cmd-link { color: #6fd6d4; text-decoration: underline dotted; cursor: pointer; }
.term .input-line { display: flex; }
.term .input-line input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font: inherit; caret-color: var(--teal); padding: 0; }
.caret { display: inline-block; width: 8px; height: 1.05em; vertical-align: -2px; background: var(--teal); animation: blink 1s steps(1) infinite; }

/* generic app widgets */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 8px; border: 1.5px solid var(--line); background: #fffaf2; font-family: var(--sans); font-weight: 600; font-size: 13px; color: var(--navy); white-space: nowrap; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #f6eddd; }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.flash { animation: flash .8s var(--ease); }
@keyframes flash { 30% { background: var(--teal); color: #fff; border-color: var(--teal); } }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 600; background: #efe5d6; color: var(--muted); white-space: nowrap; }
.pill.ok { background: #dff1e4; color: #2f7a48; }
.pill.warn { background: #fbecd6; color: #a3612b; }
.pill.run { background: #dcf0ee; color: #17605f; }
.pill.bad { background: #fbe1dc; color: #b04a36; }
.pill.blue { background: #e1e9f7; color: #2a56a3; }
.panel-h { font-family: var(--cond); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.fade-in { animation: fadeUp .35s var(--ease) both; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rot .8s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.mono { font-family: var(--mono); }

/* --- StructurAI --- */
.sa-side { width: 318px; flex: none; border-right: 1px solid #e6dccd; display: flex; flex-direction: column; background: #fbf7f0; }
.sa-chat { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid #e6dccd; }
.msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.msg.user { align-self: flex-end; background: var(--navy); color: #f3ecdf; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid #e6dccd; border-bottom-left-radius: 4px; }
.sa-json { flex: 1; min-height: 0; overflow: hidden; padding: 10px 14px; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--navy-2); white-space: pre; }
.sa-checks { padding: 10px 14px 12px; border-top: 1px solid #e6dccd; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; font-size: 12.5px; }
.sa-checks div { display: flex; align-items: center; gap: 6px; color: var(--faint); transition: color .3s; }
.sa-checks div::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.sa-checks div.ok { color: #2f7a48; }
.sa-checks div.ok::before { background: #3fae6a; border-color: #3fae6a; box-shadow: inset 0 0 0 2px #fff; }
.sa-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sa-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #e6dccd; }
.sa-toolbar .sp { flex: 1; }
.sa-canvas { flex: 1; position: relative; background: #fdfbf6; background-image: linear-gradient(#efe6d8 1px, transparent 1px), linear-gradient(90deg, #efe6d8 1px, transparent 1px); background-size: 20px 20px; }
.sa-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dw { fill: none; stroke: var(--navy); stroke-width: 1.4; }
.dw.grid { stroke: #c0652d; stroke-width: .9; stroke-dasharray: 10 3 2 3; }
.dw.ftg { stroke: var(--muted); stroke-dasharray: 4 3; }
.dw.beam { stroke-width: 2.2; }
.dw.col { fill: #18213d; }
.dw.dim { stroke: var(--teal-deep); stroke-width: .9; }
.dw.hatch { fill: url(#hatch); stroke: none; }
.dwt { font-family: var(--mono); font-size: 10px; fill: var(--navy); }
.dwt.small { font-size: 8.5px; fill: var(--muted); }
.draw-in { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); animation: drawIn 1s var(--ease) forwards; }
@keyframes drawIn { to { stroke-dashoffset: 0; } }
.pop-in { opacity: 0; animation: fadeUp .4s var(--ease) forwards; }

/* --- FieldNote SEO --- */
.fn-wrap { flex: 1; display: flex; flex-direction: column; background: #fcf9f3; }
.fn-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #e6dccd; }
.fn-logo { width: 26px; height: 26px; border-radius: 7px; background: var(--navy); color: #f6eddd; display: grid; place-items: center; font-family: var(--cond); font-weight: 700; font-size: 14px; }
.fn-head b { font-family: var(--cond); font-weight: 600; font-size: 17px; color: var(--navy); letter-spacing: .03em; }
.fn-agents { display: flex; gap: 6px; padding: 10px 18px; border-bottom: 1px solid #efe6d8; flex-wrap: wrap; }
.agent { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; border: 1.5px solid var(--line); font-size: 12px; font-weight: 600; color: var(--faint); background: #fff; transition: all .3s; }
.agent i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.agent.run { color: #17605f; border-color: var(--teal); background: #e6f3f1; }
.agent.run i { animation: blink .8s infinite; }
.agent.done { color: #2f7a48; border-color: #9fd3b1; background: #eef8f0; }
.fn-feed { flex: 1; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.fn-input { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid #e6dccd; }
.fn-input input { flex: 1; height: 36px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; padding: 0 12px; font-family: var(--mono); font-size: 13px; color: var(--navy); outline: none; }
.fn-input input:focus { border-color: var(--teal); }
.fn-card { align-self: stretch; background: #fff; border: 1px solid #e6dccd; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.fn-card h4 { margin: 0 0 6px; font-family: var(--cond); font-weight: 600; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.fn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score { display: flex; align-items: center; gap: 12px; }
.score svg { width: 54px; height: 54px; }
.diff del { color: #b04a36; text-decoration: line-through; }
.diff ins { color: #2f7a48; text-decoration: none; display: block; }
.mini-code { font-family: var(--mono); font-size: 11px; line-height: 1.45; color: var(--navy-2); background: #f8f2e8; border-radius: 6px; padding: 6px 8px; white-space: pre; overflow: hidden; }

/* --- SmartPrompt --- */
.sp-page { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 340px 26px 40px; background: #fcf9f4; position: relative; }
.sp-page h3 { margin: 0 0 4px; font-family: var(--cond); font-weight: 600; font-size: 26px; color: var(--navy); }
.sp-page > p { margin: 0 0 22px; color: var(--muted); }
.sp-box { width: 100%; max-width: 520px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; padding: 12px; box-shadow: 0 10px 24px -20px #3c2d14; }
.sp-box textarea { width: 100%; height: 150px; border: 0; outline: 0; resize: none; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--navy-2); background: transparent; }
.sp-box .row { display: flex; align-items: center; gap: 8px; }
.sp-box .row .sp { flex: 1; }
.sp-fab { position: relative; }
.ext-popup { position: absolute; top: 10px; right: 14px; width: 300px; background: #fff; border-radius: 12px; border: 1.5px solid #cfc0aa; box-shadow: 0 24px 50px -24px #3c2d14b3; z-index: 4; overflow: hidden; }
.ext-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--navy); color: #f6eddd; font-family: var(--cond); font-weight: 600; letter-spacing: .06em; }
.ext-head .gem { margin-left: auto; font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: #9fb0d6; }
.ext-body { padding: 12px; font-size: 13px; }
.ext-modes { display: flex; gap: 6px; margin-bottom: 10px; }
.ext-modes span { flex: 1; text-align: center; padding: 5px 0; border-radius: 7px; border: 1.5px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.ext-modes span.on { border-color: var(--teal); color: #17605f; background: #e6f3f1; }
.ext-meter { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.ext-meter .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.ext-meter .bar span { display: block; height: 100%; width: 20%; background: #e07b39; transition: width .8s var(--ease), background .8s; }
.sp-hl { background: #e6f3f1; border-radius: 3px; }
.sp-sec { color: var(--teal-deep); font-weight: 600; }

/* --- Financial extractor --- */
.fx-doc { width: 380px; flex: none; padding: 16px; background: #ece3d4; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid #ddd0bd; }
.fx-switch { display: flex; gap: 6px; }
.fx-switch button { flex: 1; height: 28px; border-radius: 7px; border: 1.5px solid var(--line); background: #f8f2e8; font-size: 12px; font-weight: 600; color: var(--muted); }
.fx-switch button.on { background: var(--navy); border-color: var(--navy); color: #f6eddd; }
.paper { flex: 1; background: #fffef9; border-radius: 4px; box-shadow: 0 8px 20px -14px #3c2d14; padding: 18px 20px; font-size: 11.5px; line-height: 1.5; color: #333; position: relative; overflow: hidden; }
.paper.scan { filter: contrast(.92) sepia(.12); transform: rotate(-.6deg); }
.paper.scan::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 3px, #0000000a 3px 4px); pointer-events: none; }
.paper h5 { margin: 0 0 2px; font-size: 14px; color: #111; letter-spacing: .03em; }
.paper table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 11px; }
.paper td, .paper th { border-bottom: 1px solid #e3ddd0; padding: 3px 2px; text-align: left; }
.paper th { color: #666; font-weight: 600; }
.paper .r { text-align: right; }
.fld { border-radius: 3px; transition: background .3s, box-shadow .3s; }
.fld.hit { background: #c8ece8; box-shadow: 0 0 0 1.5px #1aa3a1; }
.scanline { position: absolute; left: 0; right: 0; height: 40px; background: linear-gradient(transparent, #1aa3a133, transparent); top: -40px; pointer-events: none; }
.scanline.go { animation: scan 1.6s linear; }
@keyframes scan { to { top: 100%; } }
.fx-main { flex: 1; display: flex; flex-direction: column; padding: 16px; gap: 12px; min-width: 0; background: #fcf9f3; }
.router { display: flex; align-items: center; gap: 10px; }
.router .node { flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px; background: #fff; font-size: 12.5px; transition: all .35s; }
.router .node b { display: block; font-family: var(--cond); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-size: 12.5px; color: var(--navy); }
.router .node.on { border-color: var(--teal); background: #e6f3f1; box-shadow: 0 0 0 3px #1aa3a122; }
.router .node.off { opacity: .45; }
.gauge { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #3fae6a, #f1c56b, #e07b39); position: relative; margin: 4px 0 2px; }
.gauge i { position: absolute; top: -4px; width: 4px; height: 16px; border-radius: 2px; background: var(--navy); left: 0; transition: left 1s var(--ease); }
.json { flex: 1; min-height: 0; overflow: auto; background: var(--term); border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: #d7dcea; white-space: pre; }
.json .k { color: #7fb0ff; }
.json .s { color: #a5dba0; }
.json .n { color: #f5c46b; }

/* --- tweetcraft --- */
.tc-app { flex: 1; display: flex; background: #fbf8f2; }
.tc-nav { width: 170px; flex: none; border-right: 1px solid #e6dccd; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.tc-brand { font-family: var(--cond); font-weight: 700; font-size: 19px; color: var(--navy); margin: 0 6px 14px; }
.tc-brand span { color: var(--teal); }
.tc-nav a { padding: 7px 10px; border-radius: 8px; font-size: 13.5px; text-decoration: none; color: var(--muted); font-weight: 500; }
.tc-nav a.on { background: #efe5d6; color: var(--navy); font-weight: 600; }
.tc-user { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 0 6px; }
.tc-user i { width: 26px; height: 26px; border-radius: 50%; background: var(--teal-deep); display: block; }
.tc-main { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tc-form { display: flex; gap: 8px; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; }
.tc-form .field { flex: 1; height: 34px; border-radius: 8px; background: #f8f2e8; display: flex; align-items: center; padding: 0 10px; font-family: var(--mono); font-size: 13px; color: var(--navy); }
.tc-job { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; }
.tc-job .row { display: flex; align-items: center; gap: 8px; }
.tc-job .bar { height: 7px; border-radius: 4px; background: var(--track); margin-top: 8px; overflow: hidden; }
.tc-job .bar span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .3s linear; }
.tc-list { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.tweet { display: flex; gap: 10px; background: #fff; border: 1px solid #e6dccd; border-radius: 10px; padding: 9px 11px; font-size: 13px; line-height: 1.4; }
.tweet i { width: 30px; height: 30px; border-radius: 50%; background: #c7d4e6; flex: none; }
.tweet b { color: var(--navy); font-weight: 600; }
.tweet small { color: var(--faint); margin-left: 6px; }
.tweet .meta { display: flex; gap: 14px; margin-top: 4px; font-size: 11.5px; color: var(--faint); font-family: var(--mono); }

/* --- miniRT --- */
.rt-side { width: 300px; flex: none; display: flex; flex-direction: column; border-right: 1px solid #1d2540; background: var(--term); }
.rt-side .rt-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #263055; }
.rt-side select { flex: 1; height: 28px; border-radius: 7px; border: 1px solid #36406a; background: #1f2944; color: #d7dcea; font-family: var(--mono); font-size: 12px; padding: 0 6px; }
.rt-side textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: #d7dcea; font-family: var(--mono); font-size: 12px; line-height: 1.7; padding: 12px; white-space: pre; scrollbar-width: thin; }
.rt-side .rt-foot { padding: 10px 12px; border-top: 1px solid #263055; display: flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 11px; color: #7c86a3; }
.rt-view { flex: 1; display: grid; place-items: center; background: #0d1222; position: relative; }
.rt-view canvas { width: 560px; height: 420px; image-rendering: auto; border-radius: 4px; box-shadow: 0 0 0 1px #263055; }
.rt-stat { position: absolute; left: 12px; bottom: 10px; font-family: var(--mono); font-size: 11px; color: #7c86a3; }

/* --- Security piscine --- */
.sec-app { flex: 1; display: flex; flex-direction: column; background: var(--term); }
.sec-tabs { display: flex; gap: 2px; padding: 8px 10px 0; background: #1b2340; }
.sec-tabs button { border: 0; padding: 8px 14px; border-radius: 8px 8px 0 0; background: transparent; color: #8e98b6; font-family: var(--mono); font-size: 12.5px; }
.sec-tabs button.on { background: var(--term); color: #fff; }
.sec-body { flex: 1; display: flex; min-height: 0; }
.otp-panel { width: 300px; flex: none; padding: 18px; border-left: 1px solid #263055; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #d7dcea; }
.otp-code { font-family: var(--mono); font-size: 40px; letter-spacing: .14em; color: #fff; }
.otp-ring { width: 120px; height: 120px; position: relative; }
.otp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.otp-ring .t { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 22px; color: #6fd6d4; }
.otp-panel input { width: 100%; height: 30px; border-radius: 7px; border: 1px solid #36406a; background: #1f2944; color: #d7dcea; font-family: var(--mono); font-size: 10.5px; padding: 0 8px; outline: none; }
.otp-panel small { font-size: 11px; color: #7c86a3; text-align: center; line-height: 1.4; }
.exif { margin-top: 6px; border-collapse: collapse; }
.exif td { padding: 1px 14px 1px 0; }

/* ---------- Compact (small / portrait screens) ---------- */
html.compact, html.compact body { overflow: auto; height: auto; }
html.compact .artboard { position: relative; width: 100% !important; height: auto !important; transform: none !important; overflow: visible; display: flex; flex-direction: column; gap: 14px; padding: 16px 14px 90px; }
html.compact .traces { display: none; }
html.compact body { overflow-x: hidden; }
html.compact .artboard > * { min-width: 0; }
html.compact .tabs { overflow-x: auto; gap: 20px; scrollbar-width: none; }
html.compact .tabs button { flex: none; }
html.compact .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 64px; background: var(--sidebar); box-shadow: 0 -1px #c4b09659; }
html.compact .side-nav { flex-direction: row; justify-content: space-around; padding: 8px 6px; gap: 0; }
html.compact .side-nav li { width: auto; }
html.compact .side-nav li.is-active::before { display: none; }
html.compact .side-label, html.compact .side-gh { display: none; }
html.compact .flyout { position: fixed; left: 10px !important; right: 10px; top: auto !important; bottom: 74px; width: auto; max-height: 70vh; }
html.compact .brand, html.compact .stage, html.compact .status, html.compact .info-card, html.compact .code-card, html.compact .strip { position: relative; inset: auto; top: auto; left: auto; right: auto; bottom: auto; width: auto; }
html.compact .brand-text h1 { font-size: 28px; line-height: 30px; }
html.compact .brand-logo { width: 44px; height: 44px; }
html.compact .status { order: 5; height: 87px; }
html.compact .clock { left: auto; right: 16px; }
html.compact .progress-card { width: calc(100% - 140px); }
html.compact .stage { height: auto; }
html.compact .tags, html.compact .leaders { display: none; }
html.compact .device-holder { position: relative; inset: auto; height: var(--dev-h, 420px); overflow: hidden; }
html.compact .demobar { position: relative; inset: auto; margin-top: 8px; flex-wrap: wrap; height: auto; }
html.compact .demo-hint { flex-basis: 100%; white-space: normal; }
html.compact .strip { order: 2; height: 150px; }
html.compact .info-card { order: 3; height: auto; max-height: none; }
html.compact .info-body { overflow: visible; }
html.compact .code-card { order: 4; height: 320px; }

/* ---------- Phone (< 700px): mockups at native size with their own stacked layouts ---------- */
html.phone .artboard { padding: 14px 12px 88px; gap: 14px; }

/* header */
html.phone .brand-logo { width: 38px; height: 38px; }
html.phone .brand-rule { height: 36px; margin: 0 12px 0 10px; }
html.phone .brand-text h1 { font-size: 24px; line-height: 26px; letter-spacing: .1em; }
html.phone .brand-text p { font-size: 11px; letter-spacing: .14em; margin-top: 3px; }

/* stage: real-size window, height per demo */
html.phone .device-holder { height: auto; overflow: visible; display: block; }
html.phone .device { position: relative; width: 100%; height: 560px; transform: none; }
html.phone .device[data-demo="home"] { height: 540px; }
html.phone .device[data-demo="minishell"], html.phone .device[data-demo="ai-os"] { height: 560px; }
html.phone .device[data-demo="structurai"] { height: 900px; }
html.phone .device[data-demo="fieldnote"] { height: 680px; }
html.phone .device[data-demo="smartprompt"] { height: 640px; }
html.phone .device[data-demo="fin-extractor"] { height: 860px; }
html.phone .device[data-demo="tweetcraft"] { height: 640px; }
html.phone .device[data-demo="minirt"] { height: 580px; }
html.phone .device[data-demo="security"] { height: 680px; }
html.phone .win { font-size: 13px; border-radius: 12px; }
html.phone .win-bar { height: 34px; padding: 0 12px; gap: 10px; }
html.phone .win-dots i { width: 9px; height: 9px; }
html.phone .win-title { margin-right: 0; font-size: 11px; }
html.phone .win-url { margin-right: 0; height: 24px; font-size: 11px; padding: 0 9px; }
html.phone .term { font-size: 12px; line-height: 1.55; padding: 12px 12px 14px; overflow-wrap: anywhere; }
html.phone .win-body > *, html.phone .sec-body > * { min-width: 0; }
html.phone .term .input-line input { font-size: 16px; } /* 16px stops iOS zooming on focus */
html.phone .demobar { gap: 8px; margin-top: 10px; }
html.phone .demo-hint { font-size: 12px; line-height: 1.5; }
html.phone .demo-btn { height: 36px; flex: 1; justify-content: center; }
html.phone .msg { font-size: 12.5px; padding: 8px 10px; }
html.phone .btn { height: 30px; padding: 0 11px; font-size: 12px; }

/* StructurAI: brief + model + checks on top, drawing below */
html.phone [data-demo="structurai"] .win-body { flex-direction: column; }
html.phone .sa-side { width: auto; flex: none; border-right: 0; border-bottom: 1px solid #e6dccd; }
html.phone .sa-chat { padding: 10px 12px; gap: 8px; }
html.phone .sa-json { flex: none; height: 212px; padding: 8px 12px; font-size: 10.5px; line-height: 1.45; }
html.phone .sa-checks { grid-template-columns: 1fr 1fr; padding: 8px 12px 10px; font-size: 11.5px; }
html.phone .sa-main { flex: 1; min-height: 0; }
html.phone .sa-toolbar { flex-wrap: wrap; padding: 8px 12px; gap: 6px; }
html.phone .sa-toolbar .btn { height: 26px; padding: 0 9px; }

/* FieldNote */
html.phone .fn-head { padding: 10px 12px; }
html.phone .fn-agents { padding: 8px 12px; gap: 5px; }
html.phone .agent { height: 24px; padding: 0 8px; font-size: 11px; }
html.phone .fn-feed { padding: 12px; gap: 8px; }
html.phone .fn-grid { grid-template-columns: 1fr; gap: 8px; }
html.phone .fn-card { font-size: 12.5px; }
html.phone .fn-input { padding: 10px 12px; }
html.phone .fn-input input { font-size: 16px; height: 38px; min-width: 0; }

/* SmartPrompt: extension popup sits under the chat box */
html.phone .sp-page { padding: 20px 14px; justify-content: flex-start; }
html.phone .sp-page h3 { font-size: 21px; text-align: center; }
html.phone .sp-page > p { margin-bottom: 14px; text-align: center; font-size: 12.5px; }
html.phone .sp-box textarea { height: 230px; font-size: 13.5px; }
html.phone .ext-popup { position: relative; top: auto; right: auto; width: 100%; order: 5; margin-top: 14px; }

/* Financial extractor: document on top, pipeline below */
html.phone [data-demo="fin-extractor"] .win-body { flex-direction: column; }
html.phone .fx-doc { width: auto; flex: none; padding: 12px; border-right: 0; border-bottom: 1px solid #ddd0bd; }
html.phone .paper { flex: none; padding: 14px; font-size: 11px; }
html.phone .fx-main { padding: 12px; gap: 10px; }
html.phone .router .node { padding: 8px; font-size: 11.5px; }
html.phone .json { flex: 1; min-height: 190px; font-size: 11px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* tweetcraft: drop the side nav */
html.phone .tc-nav { display: none; }
html.phone .tc-main { padding: 12px; gap: 10px; }
html.phone .tc-form { flex-wrap: wrap; padding: 8px; }
html.phone .tc-form .field:first-child { flex: 1 1 100%; }
html.phone .tc-form .field { height: 32px; font-size: 12.5px; }
html.phone .tweet { font-size: 12.5px; padding: 8px 10px; }
html.phone .tc-job .row { flex-wrap: wrap; row-gap: 4px; }
html.phone .tc-job .row > * { white-space: nowrap; }

/* miniRT: scene file on top, render below */
html.phone [data-demo="minirt"] .win-body { flex-direction: column; }
html.phone .rt-side { width: auto; height: 250px; flex: none; border-right: 0; border-bottom: 1px solid #263055; }
html.phone .rt-side textarea { font-size: 11px; line-height: 1.6; padding: 10px 12px; }
html.phone .rt-side .rt-foot { padding: 8px 12px; }
html.phone .rt-view { padding: 12px 12px 30px; align-content: start; }
html.phone .rt-view canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; }

/* Security: scrolling tab bar, OTP panel above the terminal */
html.phone .sec-tabs { overflow-x: auto; scrollbar-width: none; padding: 6px 8px 0; }
html.phone .sec-tabs::-webkit-scrollbar { display: none; }
html.phone .sec-tabs button { flex: none; padding: 8px 11px; font-size: 11.5px; }
html.phone .sec-body { flex-direction: column-reverse; }
html.phone .sec-body .term { min-height: 0; }
html.phone .otp-panel { width: auto; flex: none; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; padding: 14px 12px; border-left: 0; border-bottom: 1px solid #263055; }
html.phone .otp-ring { width: 70px; height: 70px; }
html.phone .otp-ring .t { font-size: 16px; }
html.phone .otp-code { font-size: 32px; }
html.phone .otp-panel input { flex: 1 1 100%; font-size: 10px; }
html.phone .otp-panel small { flex: 1 1 100%; }

/* status card: progress + clock side by side, no overlap */
html.phone .status { height: auto; display: flex; align-items: center; gap: 12px; padding: 8px; }
html.phone .progress-card, html.phone .clock { position: static; }
html.phone .progress-card { flex: 1; min-width: 0; width: auto; height: 58px; gap: 12px; padding: 0 12px; }
html.phone .progress-icon { width: 28px; height: 28px; }
html.phone .progress-label { font-size: 12.5px; white-space: nowrap; }
html.phone .clock { flex: none; font-size: 13px; line-height: 17px; padding-right: 6px; }

/* info + code cards */
html.phone .tabs { gap: 20px; padding-left: 16px; height: 44px; }
html.phone .tabs button { height: 44px; font-size: 14px; }
html.phone .info-body { padding: 14px 16px 18px; }
html.phone .info-content h3 { font-size: 23px; }
html.phone .info-lede { font-size: 14.5px; }
html.phone .feature, html.phone .steps li { font-size: 14px; }
html.phone .code-card { height: 330px; }
html.phone .code-card header { gap: 8px; }
html.phone .code-card h2 { font-size: 13.5px; white-space: nowrap; }
html.phone .code-lang { min-width: 0; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.phone .code { font-size: 11.5px; }

/* projects strip */
html.phone .strip { height: 140px; }
html.phone .project-list li { flex: 0 0 132px; }
html.phone .project-card { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
