/* ZEROPH-023 guided demo — mobile first, light/dark. */
:root {
  --bg: #f6f7f9; --surface: #fff; --surface-2: #eef1f5; --text: #16202c; --muted: #5b6776; --line: #d9dee5;
  --brand: #1f5fbf; --brand-soft: #e3ecfa; --on-brand: #fff;
  --real: #1d7f4e; --real-soft: #e1f3e9; --sim: #a15c00; --sim-soft: #fbefdc;
  --part: #6b4bb3; --part-soft: #ece6f8; --pend: #8a3a3a; --pend-soft: #f7e4e4; --info: #3d5a80; --info-soft: #e4ebf3;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  --radius: 14px; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141a; --surface: #161d26; --surface-2: #1d2631; --text: #e6ebf1; --muted: #9aa7b6; --line: #2a3542;
    --brand: #6ea3f5; --brand-soft: #1a2a42; --on-brand: #0b1220;
    --real: #5fcf93; --real-soft: #14301f; --sim: #f0b35a; --sim-soft: #352612;
    --part: #b39af0; --part-soft: #2a2240; --pend: #ef9a9a; --pend-soft: #3a1f1f; --info: #9db8da; --info-soft: #1d2a3a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141a; --surface: #161d26; --surface-2: #1d2631; --text: #e6ebf1; --muted: #9aa7b6; --line: #2a3542;
  --brand: #6ea3f5; --brand-soft: #1a2a42; --on-brand: #0b1220;
  --real: #5fcf93; --real-soft: #14301f; --sim: #f0b35a; --sim-soft: #352612;
  --part: #b39af0; --part-soft: #2a2240; --pend: #ef9a9a; --pend-soft: #3a1f1f; --info: #9db8da; --info-soft: #1d2a3a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* the pager and panels set display: flex/grid */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; padding-bottom: 84px; }
a { color: var(--brand); }
button { font: inherit; color: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 10px 14px; min-height: 44px; }
button.primary, a.primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); font-weight: 600; }
button.ghost { background: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 600; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: var(--on-brand); font-weight: 800; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lang button { border: 0; border-radius: 0; min-width: 44px; padding: 8px 10px; background: transparent; }
.lang button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }

.index-panel { position: sticky; top: 61px; z-index: 4; max-height: calc(100vh - 140px); overflow: auto; margin: 0 16px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.index-panel ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.index-panel a { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--text); }
.index-panel a:hover, .index-panel a[aria-current="page"] { background: var(--brand-soft); }
.index-panel .letter { font-weight: 700; width: 24px; text-align: center; color: var(--brand); }

.banner { margin: 12px 16px 0; padding: 10px 14px; border-radius: 10px; background: var(--sim-soft); color: var(--text); border: 1px solid var(--line); font-size: 14px; }
.banner.ok { background: var(--real-soft); }

main { max-width: 860px; margin: 0 auto; padding: 16px; outline: none; }
h1 { font-size: 26px; line-height: 1.2; margin: 8px 0 6px; }
h2 { font-size: 22px; line-height: 1.25; margin: 4px 0 10px; }
h3 { font-size: 16px; margin: 16px 0 6px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; }
.modes { display: grid; gap: 12px; }
.mode-btn { text-align: left; display: grid; gap: 4px; padding: 16px; width: 100%; }
.mode-btn strong { font-size: 18px; }
.mode-btn span { color: inherit; opacity: .85; font-size: 14px; font-weight: 400; }
.grid-sections { display: grid; gap: 8px; grid-template-columns: 1fr; }
.sec-link { display: flex; gap: 12px; align-items: center; padding: 12px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.sec-link .ic { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.sec-link .chips { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.people { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; font-size: 14px; }
.people li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; }
.people code { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.links a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.chip.real { background: var(--real-soft); color: var(--real); }
.chip.sim { background: var(--sim-soft); color: var(--sim); }
.chip.part { background: var(--part-soft); color: var(--part); }
.chip.pend { background: var(--pend-soft); color: var(--pend); }
.chip.info { background: var(--info-soft); color: var(--info); }
.statuses { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.statuses li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: 15px; }
.statuses .ref { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.honest { border-left: 4px solid var(--sim); background: var(--sim-soft); padding: 10px 12px; border-radius: 8px; font-size: 15px; }
.sec-head { display: flex; align-items: center; gap: 12px; }
.sec-head .ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 18px; flex: none; }
.kicker { color: var(--muted); font-size: 14px; }
.try { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; background: var(--surface-2); }
.try-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between; }
.try-head b { font-size: 15px; }
.try .who { font-size: 13px; color: var(--muted); }
.try ol, .try ul { margin: 6px 0 0; padding-left: 20px; font-size: 15px; }
.try .cols { display: grid; gap: 8px; margin-top: 6px; }
.try .cols h4 { margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.try .missing { color: var(--pend); font-size: 14px; margin-top: 6px; }
.btn-try { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 10px; background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none; border: 1px solid var(--brand); }
.btn-try[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.legend { font-size: 13px; color: var(--muted); }

.pager { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.pager .progress { font-size: 14px; color: var(--muted); text-align: center; flex: 1; }
.pager button { min-width: 110px; }

/* Contingency mode */
.shots { display: grid; gap: 12px; grid-template-columns: 1fr; }
.shot { margin: 0; padding: 10px; }
.shot img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; background: var(--surface-2); border-radius: 8px; border: 1px solid var(--line); }
.shot figcaption { font-size: 14px; margin-top: 8px; line-height: 1.6; word-break: break-word; }

@media (min-width: 720px) {
  .shots { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 34px; }
  .modes { grid-template-columns: 1fr 1fr; }
  .grid-sections { grid-template-columns: 1fr 1fr; }
  .try .cols { grid-template-columns: 1fr 1fr; }
}

/* ZEROPH-026: persistent navigation, commercial home, experience pages. */
.top { flex-wrap: wrap; }
.demo-nav { --zd-bg: var(--surface); --zd-fg: var(--text); --zd-line: var(--line); flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
@media (max-width: 640px) { .demo-nav { order: 3; flex-basis: 100%; justify-content: flex-start; } }
.hero { background: linear-gradient(135deg, var(--brand-soft), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 8px 0 16px; }
.hero h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 18px; }
.exp { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 14px 56px; min-height: 92px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.exp:hover, .exp:focus-visible { border-color: var(--brand); }
.exp b { font-size: 16px; } .exp small { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.exp-ic { position: absolute; left: 12px; top: 14px; font-size: 26px; }
.exp-n { position: absolute; right: 10px; top: 8px; font-size: 12px; color: var(--muted); }
.exp-main { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.exp-main small, .exp-main .exp-n { color: var(--on-brand); opacity: .9; }
details.tech { margin: 8px 0 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--surface); }
details.tech summary { cursor: pointer; list-style: none; }
details.tech summary h3 { display: inline; margin: 0; } details.tech summary span { display: block; color: var(--muted); font-size: 14px; }
details.tech[open] summary { margin-bottom: 10px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 12px 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.tabs button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.split { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.frame { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.pill.real { background: var(--real-soft); color: var(--real); } .pill.sim { background: var(--sim-soft); color: var(--sim); }
.pill.part { background: var(--part-soft); color: var(--part); } .pill.pend { background: var(--pend-soft); color: var(--pend); }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 6px 0 10px 16px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.timeline li.warn::before { background: var(--sim); } .timeline li.bad::before { background: var(--pend); } .timeline li.ok::before { background: var(--real); }
.timeline time { color: var(--muted); font-size: 12.5px; margin-right: 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
table.ctl { width: 100%; border-collapse: collapse; font-size: 14px; } table.ctl td, table.ctl th { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
pre.code { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 10px; overflow: auto; font: 13px/1.45 var(--mono); white-space: pre-wrap; word-break: break-all; }

/* ZEROPH-026-C: three big entries on the demo home */
.big3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0 24px; }
@media (max-width: 860px) { .big3 { grid-template-columns: 1fr; } }
.big { position: relative; display: grid; gap: 10px; align-content: start; padding: 26px 22px 22px; border-radius: 22px; text-decoration: none; color: #fff; min-height: 260px; box-shadow: 0 12px 40px rgba(15, 23, 42, .18); transition: transform .15s; }
.big:hover { transform: translateY(-3px); }
.big[data-big="phone"] { background: linear-gradient(140deg, #2563eb, #1e3a8a); }
.big[data-big="desktop"] { background: linear-gradient(140deg, #7c3aed, #4c1d95); }
.big[data-big="plugin"] { background: linear-gradient(140deg, #059669, #064e3b); }
.big-n { position: absolute; top: 16px; right: 18px; font-weight: 800; opacity: .5; font-size: 22px; }
.big-ic { font-size: 54px; line-height: 1; }
.big b { font-size: 21px; letter-spacing: .02em; line-height: 1.2; }
.big small { font-size: 14.5px; opacity: .92; line-height: 1.45; }
.big-go { margin-top: auto; justify-self: start; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 8px 16px; font-weight: 700; }
details.more > section.hero { margin-top: 10px; }
.tours3 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 6px 0 18px; }
.tour-card { display: grid; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 14px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.tour-card .tl-badge { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: #0f766e; }
.tour-card small { color: var(--muted); }
.tour-card .go { color: #1f5fbf; font-weight: 650; }
/* ZEROPH-026C (owner 17-nov): demo tours visible under the three big entries */
.tours-h { margin: 26px 0 8px; font-size: 20px; }
.tour-card[data-testid="tour-business"] .tl-badge { background: #6b4bb3; }
.tour-card[data-testid="tour-parking"] .tl-badge { background: #be123c; }
.tour-card[data-testid="tour-personal"] .tl-badge { background: #2563eb; }

/* ZEROPH-026C: keep scrolled-to content (e.g. the opened widget inside the shop frame) clear of the sticky demo bar */
html { scroll-padding-top: 104px; }

/* ZEROPH-033: widget options (position, colour, language, open) — one per row with the control below its name; on a
   phone they ran together on one line ("Position [select] Colour [select] Language…"). */
.m-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; margin: 8px 0 12px; align-items: end; }
.m-form > label { display: grid; gap: 6px; font-weight: 600; }
.m-form > label select { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); padding: 6px 10px; font: inherit; font-weight: 400; background: var(--surface); color: var(--text); max-width: 100%; }
.m-form > label.chk { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.m-form > label.chk input { width: 20px; height: 20px; }

/* ZEROPH-034 — access page of the published demo. */
.access-page { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 16px; }
.access-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 12px; }
.access-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.access-card h1 { margin: 4px 0 0; font-size: 22px; }
.access-card p { margin: 0; }
.access-card form { display: grid; gap: 10px; }
.access-card input { font: inherit; color: inherit; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; font-size: 16px; }
.access-card a.primary { display: inline-block; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.access-msg { color: var(--pend); min-height: 1.5em; }
.access-note { color: var(--muted); font-size: 14px; }
.access-card .lang { justify-self: start; }
