/* We-Aware prototype v0.6
   Web apps (organisation backoffice, platform admin, sign-up): light cream and white, navy top nav, teal actions.
   Mobile app: dark "Incoming assessment" look, scoped to .phone so the two never mix.
   Layout: screens browser as home; each screen opens in a viewer with a slim prototype bar above it. */
:root {
  color-scheme: light;
  --bg: #f5f3ef;
  --surface: #ffffff;
  --surface-2: #f3f0ea;
  --ink: #0f1923;
  --ink-2: #3a4a58;
  --muted: #66727c;
  --line: #e2ddd4;
  --accent: #00c5a0;
  --accent-ink: #0f1923;
  --accent-text: #006d57;
  --accent-soft: #e8f7f3;
  --accent-line: #9fdccc;
  --navy: #0f1923;
  --navy-2: #1d2d3e;
  --cream: #f5f3ef;
  --ok: #1f8a4c;
  --ok-mark: #4ec180;
  --watch: #8a5a00;
  --watch-mark: #f2a900;
  --act: #b8352f;
  --act-mark: #e66767;
  --back: #006d57;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --serif: "Cormorant Garamond", Georgia, serif;
  --web-max: 1800px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.55; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent-text); }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
table { font-size: inherit; color: inherit; border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- shared components (light) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 6px; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--accent-line); }
.btn.pri { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: transparent; }
.linkbtn { border: 0; background: transparent; color: var(--accent-text); font-weight: 600; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; }
.label { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
.small { font-size: 12.5px; color: var(--ink-2); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.note { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 10px; padding: 11px 14px; font-size: 13px; }
.warn { background: #fff6e0; border: 1px solid #f0d58f; border-radius: 10px; padding: 11px 14px; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sp { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.grid.wide { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi .v { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 500; min-width: 0; }
.field input, .field select, .field textarea, select.inline { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 10px; color: var(--ink); font-size: 13.5px; font-weight: 400; min-width: 0; }
.field textarea { min-height: 140px; font-family: var(--mono); font-size: 12.5px; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.chip { display: inline-flex; align-items: center; font-size: 11px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 100px; padding: 1px 9px; color: var(--ink-2); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 100px; border: 1px solid var(--line); white-space: nowrap; }
.state::before { content: ""; width: 8px; height: 8px; flex: none; }
.state.ok { color: var(--ok); background: #eaf6ef; border-color: #bfe3cc; } .state.ok::before { background: var(--ok-mark); border-radius: 50%; }
.state.watch { color: var(--watch); background: #fff6e0; border-color: #f0d58f; } .state.watch::before { background: var(--watch-mark); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.state.act { color: var(--act); background: #fdeceb; border-color: #f2c2bf; } .state.act::before { background: var(--act-mark); transform: rotate(45deg); width: 7px; height: 7px; }
.state.back { color: var(--back); background: var(--accent-soft); border-color: var(--accent-line); } .state.back::before { background: var(--accent); border-radius: 50%; }
.state.plain { color: var(--ink-2); background: var(--surface-2); } .state.plain::before { display: none; }
.scroll { overflow-x: auto; }
th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.dim td { color: var(--muted); font-style: italic; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--accent-soft); }
.tablecard { padding: 0; overflow: hidden; }
.tablecard .card-head { padding: 16px 20px 0; }
.tablecard > .scroll, .tablecard > .pad { padding: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 100px; padding: 5px 12px; font-size: 12.5px; color: var(--ink-2); }
.tabs button[aria-current="true"] { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.steps span { font-size: 11.5px; padding: 3px 11px; border-radius: 100px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.steps span.done { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.steps span.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; font-size: 13px; }
.kv > span:nth-child(odd) { color: var(--ink-2); }
.hbar { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) 48px; gap: 12px; align-items: center; font-size: 13px; }
.hbar .bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hbar .bar i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.hbar b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 28px; text-align: center; color: var(--ink-2); background: var(--surface); }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); transform: translateX(-50%); background: var(--navy); color: var(--cream); padding: 10px 16px; border-radius: 8px; font-size: 13px; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* column chart */
.chart { position: relative; height: 230px; margin: 4px 0 26px 36px; }
.chart .gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.chart .gl span { position: absolute; left: -36px; top: -9px; width: 30px; text-align: right; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cols { position: absolute; inset: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.col { position: relative; display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; border: 0; background: transparent; padding: 0; height: 100%; }
.col:hover, .col:focus-visible { background: var(--accent-soft); }
.col i { display: block; width: min(24px, 58%); }
.col i.w { background: var(--watch-mark); }
.col i.a { background: var(--act-mark); border-radius: 4px 4px 0 0; }
.col em { position: absolute; bottom: -22px; font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.tip { position: absolute; z-index: 3; top: -6px; transform: translateX(-50%); background: var(--navy); color: var(--cream); border-radius: 8px; padding: 8px 10px; font-size: 12px; white-space: nowrap; pointer-events: none; }

/* ---------- prototype chrome ---------- */
.protobar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: #e9e5dd; border-bottom: 1px solid #d8d2c7; }
.protobar-in { padding: 7px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; font-size: 12.5px; }
.protobar .pill { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 100px; padding: 1px 8px; }
.protobar select { border: 1px solid #d0c9bd; background: var(--surface); border-radius: 6px; padding: 4px 8px; font-size: 12.5px; max-width: 320px; }
.protobar .btn { padding: 4px 10px; font-size: 12.5px; }
.notes-strip { background: #fbf9f5; border-bottom: 1px solid var(--line); }
.notes-strip-in { max-width: var(--web-max); margin: 0 auto; padding: 8px 24px; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 10px; align-items: baseline; }
.notes-strip b { color: var(--ink); white-space: nowrap; }

/* screens browser */
.browser { max-width: 1400px; margin: 0 auto; padding-inline: 24px; padding-block: 36px 64px; display: flex; flex-direction: column; gap: 32px; }
.browser-head { display: flex; flex-direction: column; gap: 10px; }
.browser-head h1 { font-family: var(--serif); font-size: clamp(34px, 5vw, 48px); font-weight: 600; letter-spacing: 0; }
.browser-head .logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; }
.area { display: flex; flex-direction: column; gap: 14px; }
.area-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.area-head h2 { font-size: 20px; }
.groupname { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.screencard { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.screencard:hover { border-color: var(--accent-line); box-shadow: 0 4px 16px rgba(15,25,35,.06); }
.screencard .id { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.screencard b { font-size: 14px; }
.screencard .badge { align-self: flex-start; }
.search { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 12px; width: min(420px, 100%); font-size: 14px; }

/* ---------- web app shell ---------- */
.webnav { background: var(--navy); color: var(--cream); border-bottom: 2px solid #00997d; }
.webnav-in { max-width: var(--web-max); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 20px; min-height: 56px; flex-wrap: wrap; }
.webnav .brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; white-space: nowrap; padding: 10px 0; }
.webnav .brand small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.webnav nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.webnav nav a { color: rgba(245,243,239,.78); text-decoration: none; padding: 17px 12px 15px; font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.webnav nav a:hover { color: var(--cream); }
.webnav nav a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--accent); }
.webnav .right { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: rgba(245,243,239,.78); padding: 8px 0; }
.webnav .right select { background: var(--navy-2); color: var(--cream); border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 4px 8px; }
.webnav .avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(0,197,160,.15); border: 1px solid rgba(0,197,160,.4); color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.webmain { max-width: var(--web-max); margin: 0 auto; padding-inline: 24px; padding-block: 24px 56px; display: flex; flex-direction: column; gap: 18px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pagehead .crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pagehead .crumbs a { color: var(--muted); }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.subnav a { padding: 8px 12px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; font-weight: 500; }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tree details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tree details + details { margin-top: 10px; }
.tree summary { padding: 13px 18px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tree .inner { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.subrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13px; align-items: center; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qrow:last-child { border-bottom: 0; }
.qrow input[type="text"] { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-weight: 500; }
.choice { display: flex; flex-direction: column; gap: 8px; }
.choice button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.choice button[aria-pressed="true"] { border-color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-text); }
.check { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent-text); }

/* sign-up shell */
.signup { max-width: 1100px; margin: 0 auto; padding-inline: 24px; padding-block: 32px 64px; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.signup .card { padding: 28px; gap: 18px; }

/* ---------- mobile app stage (dark, scoped) ---------- */
.appstage { max-width: 1200px; margin: 0 auto; padding-inline: 24px; padding-block: 28px 56px; display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); gap: 40px; align-items: start; }
.rail { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.rail h1 { font-family: var(--serif); font-size: 38px; font-weight: 600; letter-spacing: 0; line-height: 1.1; }
.rail > p { font-size: 15px; color: var(--ink-2); }
.phone {
  --bg: #0f1923; --surface: rgba(255,255,255,.05); --surface-2: rgba(255,255,255,.08); --ink: rgba(255,255,255,.92); --ink-2: rgba(255,255,255,.72);
  --muted: rgba(255,255,255,.56); --line: rgba(255,255,255,.1); --accent-text: #00c5a0; --accent-soft: rgba(0,197,160,.08); --accent-line: rgba(0,197,160,.3);
  --ok: #4ec180; --watch: #fab219; --act: #e66767; --back: #00c5a0;
  color-scheme: dark; background: var(--bg); color: var(--ink); border: 1px solid #0f1923; border-radius: 36px; box-shadow: 0 24px 60px rgba(15,25,35,.28); height: 760px; display: flex; flex-direction: column; overflow: hidden;
}
.phone .ph-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.phone .ph-head b { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.phone .ph-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.phone h2 { font-size: 22px; }
.phone h3 { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.phone .ph-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.phone .ph-tabs a { text-align: center; text-decoration: none; padding: 12px 4px 14px; font-weight: 500; font-size: 12.5px; color: var(--muted); border-top: 2px solid transparent; }
.phone .ph-tabs a[aria-current="page"] { color: var(--accent); border-top-color: var(--accent); }
.phone .card { background: var(--surface); border-color: var(--line); padding: 16px; }
.phone .note { background: var(--accent-soft); border-color: var(--accent-line); }
.phone .btn { background: transparent; border-color: rgba(255,255,255,.2); color: var(--ink); }
.phone .btn.pri { background: var(--accent); border-color: var(--accent); color: #0f1923; }
.phone .linkbtn { color: var(--accent); }
.phone .small { color: var(--ink-2); }
.phone .chip { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.phone .state.ok { color: var(--ok); background: rgba(78,193,128,.08); border-color: rgba(78,193,128,.35); }
.phone .state.watch { color: var(--watch); background: rgba(250,178,25,.08); border-color: rgba(250,178,25,.35); }
.phone .state.act { color: var(--act); background: rgba(230,103,103,.08); border-color: rgba(230,103,103,.4); }
.phone .state.back { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.phone .prog { height: 3px; background: var(--surface-2); border-radius: 2px; overflow: hidden; flex: none; }
.phone .prog i { display: block; height: 100%; background: var(--accent); }
.phone .opt { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 10px; padding: 13px 14px; font-weight: 500; color: var(--ink); }
.phone .opt:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.phone .chipsel { display: flex; flex-wrap: wrap; gap: 6px; }
.phone .chipsel button { border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 100px; padding: 6px 12px; font-size: 12.5px; color: var(--ink-2); }
.phone .chipsel button[aria-pressed="true"] { background: rgba(0,197,160,.15); border-color: var(--accent-line); color: var(--accent); }
.phone .help { border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 10px; padding: 11px 13px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.phone .help.urgent { border-color: rgba(230,103,103,.4); background: rgba(230,103,103,.07); }
.phone .help .contact { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--accent); user-select: all; }
.phone .who { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.phone .who div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 9px 12px; font-size: 12.5px; }
.phone .who div + div { border-top: 1px solid var(--line); }
.phone .who div:first-child { font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.phone .listbtn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 10px; padding: 11px 13px; color: var(--ink); text-decoration: none; }
.phone a.listbtn:hover, .phone button.listbtn:hover { border-color: var(--accent-line); }
.phone .moved { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.phone .moved li { border-left: 3px solid var(--watch); padding-left: 10px; }
.phone .tabs button { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.phone .tabs button[aria-current="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.phone .check { background: var(--surface); border-color: var(--line); }
.phone .check input { accent-color: var(--accent); }
.phone .legend { color: var(--ink-2); }
.phone th { background: transparent; color: var(--muted); border-color: var(--line); }
.phone td { border-color: var(--line); }
.phone .label { color: var(--muted); }

@media (max-width: 900px) {
  .appstage { grid-template-columns: minmax(0, 1fr); }
  .phone { max-width: 420px; width: 100%; margin: 0 auto; height: 700px; }
  .signup { grid-template-columns: minmax(0, 1fr); }
  .grid.wide { grid-template-columns: minmax(0, 1fr); }
  .hbar { grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 44px; }
  .qrow { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- v0.7: settings split view, inputs ---------- */
.split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidemenu { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 52px); }
.sidemenu button { border: 0; background: transparent; text-align: left; padding: 9px 12px; border-radius: 8px; font-weight: 500; color: var(--ink-2); }
.sidemenu button:hover { background: var(--surface-2); }
.sidemenu button[aria-current="true"] { background: var(--accent-soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.setrows { display: flex; flex-direction: column; }
.setrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 32px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.setrow p { margin-top: 2px; max-width: 52ch; }
.input { width: 100%; max-width: 420px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 10px; color: var(--ink); font-size: 13.5px; }
.readonly { display: inline-block; padding: 8px 0; color: var(--ink); }
.field .input { max-width: none; min-width: 260px; }
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .sidemenu { position: static; flex-direction: row; flex-wrap: wrap; }
  .setrow { grid-template-columns: minmax(0, 1fr); }
  .field .input { min-width: 0; }
}

/* ---------- v0.8: menu headings and counts, links in side menus, baseline editor ---------- */
.sidemenu a { display: block; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-weight: 500; color: var(--ink-2); }
.sidemenu a:hover { background: var(--surface-2); }
.sidemenu a[aria-current="true"] { background: var(--accent-soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.sidemenu button { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sidemenu .mh { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 4px; }
.sidemenu .count { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--surface-2); border-radius: 100px; padding: 0 8px; }
.sidemenu { max-height: calc(100vh - 140px); overflow-y: auto; }
.card-head .input { width: 280px; }
.bsection { display: flex; flex-direction: column; gap: 0; }
.bsection + .bsection { border-top: 2px solid var(--line); margin-top: 18px; padding-top: 18px; }
.bsection > .card-head { padding-bottom: 10px; }
.bq { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); align-items: start; }
.bq.linked { background: var(--surface-2); border-radius: 8px; padding: 12px; border-top: 0; margin-top: 6px; }
.bq.edit { background: #fbfaf7; }
.pulsenote { font-size: 12.5px; color: var(--ink-2); padding: 8px 0 4px; }
.input.wide { max-width: none; }
.addq { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 4px; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto; }
@media (max-width: 900px) { .bq { grid-template-columns: minmax(0, 1fr); } .addq { grid-template-columns: minmax(0, 1fr); } .card-head .input { width: 100%; } }

/* ---------- v0.9: answers as entities with weights ---------- */
.anslist { display: flex; flex-wrap: wrap; gap: 6px; }
.ans { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 100px; overflow: hidden; font-size: 12px; background: var(--surface); }
.ans > span { padding: 2px 9px; color: var(--ink-2); }
.ans .w { padding: 2px 8px; background: var(--surface-2); border-left: 1px solid var(--line); font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink); min-width: 26px; text-align: center; }
.anstable { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 10px; background: var(--surface); }
.ansrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 96px auto; gap: 10px; align-items: center; padding: 5px 0; }
.ansrow.head { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.input.wnum { max-width: 96px; font-family: var(--mono); text-align: right; }
.anstable .warn { margin-top: 8px; }
@media (max-width: 900px) { .ansrow { grid-template-columns: 24px minmax(0, 1fr) 72px; } .ansrow > span.row { grid-column: 2 / -1; } }

/* ---------- v0.12: invites ---------- */
.phone.bare { background: linear-gradient(180deg, #1d2d3e, #0f1923 70%); }
.lock { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 48px 18px 24px; gap: 4px; color: #f5f3ef; }
.lock-time { font-size: 64px; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.lock-date { font-size: 14px; opacity: .8; margin-bottom: 28px; }
.msgthread { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.msgfrom { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.phone .sms { background: rgba(245,243,239,.14); border-radius: 18px 18px 18px 4px; padding: 12px 14px; font-size: 13.5px; line-height: 1.45; }
.smslink { border: 0; background: transparent; padding: 0; color: #7fe3cf; text-decoration: underline; font: inherit; }
.browserbar { margin: 14px 14px 0; padding: 7px 12px; border-radius: 10px; background: rgba(255,255,255,.08); font-family: var(--mono); font-size: 11.5px; color: rgba(255,255,255,.75); text-align: center; }
.phone .codeinput { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 12px 14px; color: #f5f3ef; font-family: var(--mono); font-size: 24px; letter-spacing: .5em; text-align: center; width: 100%; }
.notif-demo { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; background: rgba(245,243,239,.12); border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.emailmock { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.emailhead { background: var(--surface-2); padding: 12px 18px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; border-bottom: 1px solid var(--line); }
.emailhead .muted { display: inline-block; width: 64px; }
.emailbody { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; max-width: 620px; }
