/* vx-brief.css — Project brief for a phone (N-34).
   Built like a phone app (owner, 2026-11-04: "real phone app kind feel not
   stacked cards"):
   - no cards: the hero sits on the page;
   - lists run edge to edge with hairline separators;
   - a bottom sheet for choices;
   - a tab bar at the foot.
   Platform tokens only, so light and dark themes both hold. */

#page-brief { padding: 0; }
.vxb { max-width: 520px; margin: 0 auto; padding-bottom: 24px; color: var(--text);
       font-variant-numeric: tabular-nums; }

/* ── large title ─────────────────────────────────────────────────────────── */
.vxb-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
           padding: 8px 16px 4px; }
.vxb-title { min-width: 0; }
.vxb-title h1 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 750;
                letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; }
.vxb-title small { display: block; margin-top: 2px; font-size: var(--fs-2); color: var(--text2); }
.vxb-proj { display: flex; align-items: center; gap: 4px; max-width: 100%; padding: 0; border: 0;
            background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vxb-proj h1 { white-space: nowrap; }
.vxb-chev { flex: none; width: 22px; height: 22px; color: var(--text2); margin-top: 4px; }
.vxb-iconbtn { flex: none; width: 40px; height: 40px; display: grid; place-items: center;
               border: 0; border-radius: 50%; background: var(--surface2); color: var(--text); cursor: pointer; }
.vxb-iconbtn.spin svg { animation: vxb-spin .9s linear infinite; }
.vxb-i { width: 20px; height: 20px; flex: none; }

/* ── hero: the gauge is the one bold thing on the screen ──────────────────── */
.vxb-hero { padding: 8px 16px 18px; text-align: center; }
.vxb-dial { position: relative; width: min(280px, 78vw); margin: 0 auto; }
.vxb-gauge { display: block; width: 100%; height: auto; overflow: visible; }
.vxb-track, .vxb-fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.vxb-track { stroke: var(--surface2); }
.vxb-plan { stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.vxb-read { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column;
            align-items: center; line-height: 1; }
.vxb-read b { font-size: 46px; font-weight: 750; letter-spacing: -0.03em; }
.vxb-read span { margin-top: 4px; font-size: var(--fs-3); color: var(--text2); }
.vxb-state { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap;
             margin: 14px 0 0; }
.vxb-pill { padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: var(--fs-3);
            color: #fff; background: var(--accent); }
.vxb-hero.tone-good .vxb-pill { background: var(--green); }
.vxb-hero.tone-warn .vxb-pill { background: var(--amber); }
.vxb-hero.tone-bad  .vxb-pill { background: var(--red); }
.vxb-plantext { font-size: var(--fs-3); color: var(--text2); display: inline-flex; align-items: center; gap: 6px; }
.vxb-plantext::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--text); }
.vxb-why { margin: 10px auto 0; max-width: 34ch; font-size: var(--fs-4); line-height: 1.45; color: var(--text2); }
.vxb-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 0;
             border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.vxb-strip > div { padding: 12px 6px; }
.vxb-strip > div + div { border-left: 1px solid var(--border); }
.vxb-strip dt { font-size: var(--fs-1); color: var(--text2); }
.vxb-strip dd { margin: 4px 0 0; font-size: var(--fs-6); font-weight: 700; }
.vxb-strip dd.up { color: var(--green); }
.vxb-strip dd.down { color: var(--red); }
.vxb-note { margin: 10px 0 0; font-size: var(--fs-2); color: var(--text2); }

/* ── lists, edge to edge ─────────────────────────────────────────────────── */
.vxb-h { margin: 18px 16px 8px; font-size: var(--fs-6); font-weight: 700; letter-spacing: -0.01em; }
.vxb-group { list-style: none; margin: 0; padding: 0; background: var(--surface);
             border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.vxb-group > li + li .vxb-row::before { content: ""; position: absolute; top: 0; right: 0; left: 44px;
                                        border-top: 1px solid var(--border); }
.vxb-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
           min-height: 56px; padding: 12px 16px; border: 0; background: none; color: inherit;
           font: inherit; text-align: left; cursor: pointer; }
.vxb-row.is-static { cursor: default; }
button.vxb-row:active { background: var(--surface2); }
.vxb-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vxb-rt b { font-size: var(--fs-4); font-weight: 600; line-height: 1.3; }
.vxb-rt small { font-size: var(--fs-2); color: var(--text2); line-height: 1.35; }
.vxb-rt small.vxb-with, .vxb-sub.vxb-with { color: var(--accent); }
.vxb-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); margin: 0 4px; }
.vxb-dot.tone-bad { background: var(--red); }
.vxb-dot.tone-good { background: var(--green); }
.vxb-act { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-3);
           font-weight: 600; color: var(--accent); }
.vxb-act .vxb-i { width: 18px; height: 18px; }
.vxb-badge-i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
               background: var(--green); color: #fff; }
.vxb-badge-i .vxb-i { width: 16px; height: 16px; }
.vxb-num { flex: none; text-align: right; font-size: var(--fs-6); font-weight: 750; color: var(--green);
           display: flex; flex-direction: column; line-height: 1.1; }
.vxb-num small { font-size: var(--fs-1); font-weight: 400; color: var(--text2); }
.vxb-empty { padding: 16px; font-size: var(--fs-3); color: var(--text2); display: flex; gap: 8px; align-items: center; }
.vxb-foot-note { margin: 8px 16px 0; font-size: var(--fs-2); color: var(--text2); }
.vxb-tail { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 18px; }
.vxb-link { border: 0; background: none; color: var(--accent); font: inherit; font-size: var(--fs-3);
            padding: 10px; cursor: pointer; }

/* ── bottom sheet ────────────────────────────────────────────────────────── */
.vxb-scrim { position: fixed; inset: 0; z-index: 1500; background: rgba(0,0,0,.45); }
.vxb-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1501; max-width: 560px; margin: 0 auto;
             max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
             background: var(--bg, var(--surface)); color: var(--text);
             border-radius: 18px 18px 0 0; padding: 8px 0 calc(16px + env(safe-area-inset-bottom));
             box-shadow: 0 -8px 30px rgba(0,0,0,.25); animation: vxb-up .22s ease-out; }
.vxb-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 6px; }
.vxb-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; color: var(--accent);
             font: inherit; font-weight: 600; padding: 6px; cursor: pointer; }
.vxb-sheet h3 { margin: 8px 72px 4px 16px; font-size: var(--fs-6); line-height: 1.3; }
.vxb-sheet h4 { margin: 18px 16px 8px; font-size: var(--fs-3); color: var(--text2); font-weight: 600; }
.vxb-sub { margin: 0 16px; font-size: var(--fs-3); color: var(--text2); }
.vxb-sheet .vxb-group > li + li .vxb-row::before { left: 60px; }
.vxb-pick .vxb-row::before { left: 16px; }
.vxb-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
          background: var(--surface2); color: var(--text2); font-weight: 700; }
.vxb-on { color: var(--accent); width: 22px; height: 22px; }
.vxb-notef { display: flex; flex-direction: column; gap: 6px; margin: 16px 16px 0; font-size: var(--fs-3); color: var(--text2); }
.vxb-notef textarea { font-family: var(--font-body); font-size: var(--fs-4); color: var(--text); background: var(--surface);
                      border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.vxb-cta { display: block; width: calc(100% - 32px); margin: 16px 16px 0; min-height: 50px; border: 0; border-radius: 12px;
           background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: var(--fs-4);
           cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 12px; }
.vxb-cta:disabled { opacity: .45; cursor: default; }
.vxb-errt { margin: 10px 16px 0; color: var(--red); font-size: var(--fs-3); }
.vxb-fine { margin: 10px 16px 0; font-size: var(--fs-2); color: var(--text2); text-align: center; }

.vxb-toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 1600;
             transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
             padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--surface);
             font-size: var(--fs-3); font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* ── states ──────────────────────────────────────────────────────────────── */
.vxb-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 16px; color: var(--text2); }
.vxb-err b { color: var(--red); }
.vxb-run { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border);
           border-top-color: var(--accent); animation: vxb-spin .8s linear infinite; }
.vxb :focus-visible, .vxb-sheet :focus-visible, .vxb-tabs :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes vxb-spin { to { transform: rotate(360deg); } }
@keyframes vxb-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .vxb-run, .vxb-iconbtn.spin svg { animation: none; }
  .vxb-sheet { animation: none; }
}

/* ── phone shell: the brief and the Inbox only, a tab bar at the foot ─────── */
.vxb-tabs { display: none; }
html.vx-phone .vxb-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); }
html.vx-phone .vxb-tabs button { position: relative; flex: 1; min-height: 52px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font: inherit; font-size: var(--fs-1); font-weight: 600;
  background: transparent; color: var(--text2); border: 0; cursor: pointer; }
html.vx-phone .vxb-tabs button .vxb-i { width: 24px; height: 24px; }
html.vx-phone .vxb-tabs button.active { color: var(--accent); }
.vxb-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
             border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
html.vx-phone .vx-bar-toggle, html.vx-phone .vx-bar-mask, html.vx-phone .vx-panel,
html.vx-phone .vx-rail, html.vx-phone #vx2-switch, html.vx-phone #vx2-where,
html.vx-phone #vx2-strip { display: none !important; }
html.vx-phone .vx2-project { flex: 1 1 auto; min-width: 0; max-width: none; }
html.vx-phone #vx2-project-select { width: 100%; min-width: 0; }
html.vx-phone .main { padding-bottom: 84px !important; }
/* The brief runs edge to edge on a phone: undo the shell's side padding. */
html.vx-phone #page-brief { margin: -12px -12px 0; }
.vxb-notef, .vxb-notef span { text-transform: none; letter-spacing: normal; font-family: var(--font-body); }

/* ── phone app frame (owner, 2026-11-04: "the header currently appears ...
   all required ones as tabs at the bottom ... current page floats") ───────
   - No top bar on a phone: the project is switched from the brief's title.
   - Inbox, Account (light / dark, help, sign out) and Brief are tabs.
   - The frame is fixed; only the content scrolls. Nothing rubber-bands the
     whole page, and nothing slides sideways.
   - Safe areas keep clear of the notch and the home bar when it runs from
     the home screen. */
html.vx-phone #vx2-topbar { display: none !important; }
html.vx-phone, html.vx-phone body { position: fixed; inset: 0; overflow: hidden;
  overscroll-behavior: none; touch-action: pan-y; }
html.vx-phone .vx-page-area { padding-top: 0 !important; margin-left: 0 !important;
  height: 100%; min-height: 0 !important; display: flex; flex-direction: column; }
html.vx-phone .main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-top: calc(12px + env(safe-area-inset-top)) !important; }
html.vx-phone .app-footer { display: none; }
html.vx-phone #page-brief { margin-top: calc(-12px - env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
.vxb-out { background: var(--red); }
