/* VIOLET COMPANION - app styles.
   ONE BRAND, ONE LOOK: this mirrors the MASTER's elevated language (apps/web/styles.css) -
   flat near-black surfaces, one signature accent used sparingly, the geodesic orb, a mono
   UPPERCASE .eyebrow over a sentence-case sans heading, and mono-for-data .vstrip cells. It
   references the master tokens (tokens.css) and invents NO new colors. Copy voice stays plain,
   honest, sentence-case (see index.html). */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 500; letter-spacing: -0.01em; }
button { font-family: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: var(--r-sm); }

/* Depth vignette behind the orb: the same soft radial darkening the master uses to settle the
   scene and let the orb read as ambient light from the centre. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 38%, transparent 52%, rgba(0, 0, 0, 0.30) 100%);
}
[data-theme="light"] body::before {
  background: radial-gradient(120% 90% at 50% 38%, transparent 56%, rgba(40, 30, 70, 0.10) 100%);
}

/* ── The Violet orb (geodesic mark), sat behind the scene as ambient light ─────────────
   Same mark as the master app. A large, soft, centered presence on the onboarding + home
   scenes; a small lockup mark in the top bar. */
.orb-scene {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: grid; place-items: center;
}
.orb-scene img {
  width: min(52vmin, 460px); height: auto; opacity: 0.9;
  filter: drop-shadow(0 0 60px color-mix(in srgb, var(--accent) 22%, transparent));
}

/* ── The Violet Mark - the small living light in the top bar (one-glow law) ──────────── */
.mark { position: relative; width: 26px; height: 26px; display: inline-grid; place-items: center; }
.mark-core {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, var(--accent-press), var(--accent) 60%, transparent 72%);
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: breathe 5.5s ease-in-out infinite;
}
.mark[data-state="thinking"] .mark-core { animation-duration: 1.6s; }
.mark[data-state="streaming"] .mark-core { animation-duration: 0.9s; }
@keyframes breathe {
  0%, 100% { transform: scale(0.9); opacity: 0.78; }
  50% { transform: scale(1.12); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .mark-core { animation: none; } }

/* ── App shell: a real app frame, not a long web page. #app fills the viewport as a column so
   the top bar and the bottom tab bar STAY PUT while only the active scene scrolls between them.
   That pinned chrome is what makes the installed / native build read as an app. dvh (with a vh
   fallback) avoids the mobile-browser URL-bar height jump; the safe-area insets below keep the
   chrome clear of the notch and the home indicator in standalone mode. ─────────────────────── */
#app {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
}

/* ── Top bar (the master trustbar language) ───────────────────────────────────────── */
.topbar {
  position: relative; z-index: 20; flex: 0 0 auto;
  display: flex; align-items: center; gap: 16px;
  height: calc(56px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 18px 0;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark { font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; font-size: 13px; color: var(--text); }
.topbar-spacer { flex: 1; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.pill.privacy { color: var(--muted); }

/* ── Buttons (master language) ────────────────────────────────────────────────────── */
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 11px; font-size: 13px; transition: var(--t); }
button.ghost:hover { color: var(--text); border-color: var(--line-strong); }
button.ghost:disabled { opacity: 0.4; cursor: default; }
button.primary { background: var(--accent); color: #fff; border: none; border-radius: var(--r-sm); padding: 8px 16px; font-size: 14px; font-weight: 500; transition: var(--t); }
button.primary:hover { background: var(--accent-press); }
button.primary:disabled { opacity: 0.5; cursor: default; }
/* Visible keyboard focus, matching the master (accessibility). */
button.primary:focus-visible, button.ghost:focus-visible, #brandHome:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--accent-press); outline-offset: 2px;
}

/* ── Scene shell ──────────────────────────────────────────────────────────────────── */
/* #main is the scroll area between the pinned top bar and tab bar. flex:1 fills the gap; the
   active scene simply shows inside it. min-height:0 lets it shrink so content scrolls rather than
   pushing the tab bar off-screen. */
#main { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.scene { position: relative; z-index: 1; display: none; }
.scene.active { display: block; }
.wrap { max-width: 860px; margin: 0 auto; padding: 22px 28px; }

/* ── view-head + eyebrow (mono UPPERCASE over sentence-case sans h1) ───────────────── */
.eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); display: block; margin: 0 0 3px; }
.view-head { margin-bottom: 18px; }
.view-head h1 { font-size: 22px; margin: 0 0 4px; }
.view-head p { color: var(--muted); margin: 0; font-size: 14px; max-width: 60ch; }
.view-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view-head-row .view-head-main { min-width: 0; }
.home-now { flex: 0 0 auto; text-align: right; margin-left: auto; }
.home-now[hidden] { display: none; }
.home-now .home-now-time { display: block; font-family: var(--mono); font-size: 22px; font-weight: 600; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.home-now .home-now-date { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }

/* section header (master .sub): refined sentence-case with a hairline rule, not a shouty eyebrow */
.sub {
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em; text-transform: none;
  color: var(--text); margin: 28px 0 12px; padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 8px;
}

/* ── SUMMARY-FIRST status strip (master .vstrip: dot + mono tabular value + sentence label) ── */
.vstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.vstrip-cell { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); min-width: 0; }
.vstrip-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); align-self: center; }
.vstrip-dot[data-st="ok"] { background: var(--ok); box-shadow: 0 0 7px 0 color-mix(in srgb, var(--ok) 55%, transparent); }
.vstrip-dot[data-st="warn"] { background: var(--warn); box-shadow: 0 0 7px 0 color-mix(in srgb, var(--warn) 55%, transparent); }
.vstrip-dot[data-st="danger"] { background: var(--danger); box-shadow: 0 0 7px 0 color-mix(in srgb, var(--danger) 55%, transparent); }
.vstrip-dot[data-st="accent"] { background: var(--accent); box-shadow: 0 0 7px 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.vstrip-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vstrip-v { font-family: var(--mono); font-size: 22px; font-weight: 600; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.vstrip-cell[data-st="ok"] .vstrip-v { color: var(--ok); }
.vstrip-cell[data-st="warn"] .vstrip-v { color: var(--warn); }
.vstrip-cell[data-st="danger"] .vstrip-v { color: var(--danger); }
.vstrip-cell[data-st="accent"] .vstrip-v { color: var(--accent); }
.vstrip-lbl { font-family: var(--sans); font-size: 12px; color: var(--muted); line-height: 1.25; }
.vstrip-sub { font-family: var(--mono); font-size: 10px; color: var(--faint); }

/* ── Cards (master .card + daily grid) ────────────────────────────────────────────── */
.daily-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (max-width: 620px) { .daily-grid { grid-template-columns: minmax(0, 1fr); } }
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px 16px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.card > .eyebrow { margin-bottom: 10px; }
.card-list { display: flex; flex-direction: column; gap: 8px; }
.card-row { display: flex; align-items: baseline; gap: 10px; }
.card-row .cr-when { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.card-row .cr-title { font-size: 14px; color: var(--text); line-height: 1.3; overflow-wrap: anywhere; }
.card-row .cr-title.done { color: var(--faint); text-decoration: line-through; }
.card-row .cr-loc { color: var(--faint); font-size: 12.5px; }
.card-row .cr-temp { font-family: var(--mono); font-size: 24px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r-sm); padding: 16px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.empty .empty-hint { display: block; margin-top: 6px; color: var(--faint); font-size: 12.5px; }

/* ── Welcome back (one honest line after a real 3+ day gap, painted by app.js) ─────── */
/* Rest-visible motion law: the element rests at opacity 1; the entrance lives on the
   transient .hr-enter class app.js removes on animationend. */
.home-return { display: flex; align-items: baseline; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 13px 16px; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 14px; opacity: 1; }
.home-return p { flex: 1 1 auto; margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text); min-width: 0; }
.home-return .hr-x { flex: 0 0 auto; background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--faint); font: inherit; font-size: 16px; line-height: 1; padding: 4px 8px; cursor: pointer; transition: var(--t); }
.home-return .hr-x:hover { color: var(--text); background: var(--surface-2); }
.home-return .hr-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-return.hr-enter { animation: hr-in 0.4s ease; }
@keyframes hr-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .home-return.hr-enter { animation: none; } }

/* ── Proactive moments (arrival line + coming-up strip, painted by moments.js) ─────── */
.moments { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.moment-line { border: 1px solid var(--line); border-radius: var(--r); padding: 13px 16px; background: var(--surface); box-shadow: var(--shadow); }
.moment-line .eyebrow { margin-bottom: 4px; }
.moment-line p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.moment-strip { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: var(--r-sm); background: var(--surface); }
.moment-strip .moment-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.moment-strip .moment-when { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.moment-strip .moment-txt { font-size: 14px; color: var(--text); line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
.moment-strip .moment-loc { color: var(--faint); font-size: 12.5px; }

/* ── End-of-day moment (a grounded line, mono provenance tag) ──────────────────────── */
.eod { border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 20px; }
.eod .eod-line { margin: 6px 0 8px; font-size: 15px; line-height: 1.55; color: var(--text); }
.eod .eod-carry { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.eod .eod-carry b { color: var(--text); font-weight: 600; }
.eod .eod-tomorrow { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.eod .eod-reflect { display: block; width: 100%; margin: 4px 0 12px; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--accent-press); background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: background var(--t, 0.15s) ease, border-color var(--t, 0.15s) ease; }
.eod .eod-reflect:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--line-strong); }
.eod .eod-reflect:focus-visible { outline: 2px solid var(--accent-press); outline-offset: 2px; }
.eod .eod-prov { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

/* ── Conversation thread (master .thread / .msg / .prose) ─────────────────────────── */
.thread { display: flex; flex-direction: column; gap: 22px; padding-bottom: 14px; }
.msg { display: flex; gap: 12px; }
.msg.user { justify-content: flex-end; }
.msg.user .body { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 3px var(--r-lg); padding: 11px 15px; max-width: 75%; }
.msg.violet .body { max-width: 64ch; }
.msg.violet .body .prose { font-family: var(--response); font-size: 17px; line-height: 1.72; color: var(--text); white-space: pre-wrap; }
.prose.placeholder { color: var(--muted); font-style: italic; }

/* ── Greeting hero (master .greeting) ─────────────────────────────────────────────── */
.greeting { text-align: center; margin: 6vh 0 26px; transition: opacity 320ms ease; }
.greeting-title { font-family: var(--sans); font-size: clamp(26px, 3.4vw, 30px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 8px; color: var(--text); }
.greeting-sub { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0 auto; max-width: 46ch; }
.converse-active .greeting { opacity: 0; pointer-events: none; height: 0; margin: 0; overflow: hidden; }

/* ── The hands made visible ("Ask me to..." chips + the honest demo list) ─────────── */
/* Rest-visible: the block rests at opacity 1, no transient motion. Quiet by design - the chips
   use the ghost language, the demo list is mono-for-data faint, nothing shouts or urges. */
.talk-hands { margin-top: 18px; opacity: 1; }
.talk-hands .eyebrow { margin-bottom: 8px; }
.talk-hands .hands-none { margin: 0; color: var(--muted); font-size: 13.5px; }
.talk-hands .hands-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.talk-hands .hands-chip {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; font-size: 13px; line-height: 1.35; text-align: left;
  transition: var(--t); max-width: 100%; overflow-wrap: anywhere;
}
.talk-hands .hands-chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.talk-hands .hands-chip:focus-visible { outline: 2px solid var(--accent-press); outline-offset: 2px; }
.talk-hands .hands-demo { display: flex; flex-direction: column; gap: 3px; margin-top: 12px; }
.talk-hands .hands-demo-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.talk-hands .hands-demo-item { font-family: var(--mono); font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }

/* ── The confirmation gate (a real action bar under the core's own pending reply) ──── */
/* Plain words, no urgency, no dark patterns. Rests at opacity 1; the outcome line is a quiet
   system statement (the core's own error verbatim on a non-200, never a fake success). */
.action-bar { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); opacity: 1; }
.action-bar .action-hint { margin: 0 0 10px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.action-bar .action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.action-bar .action-btn { font-size: 13px; }
.action-bar.resolved .action-hint { display: none; }
.action-bar.resolved .action-row { display: none; }
.action-bar .action-outcome { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.45; }
.action-bar .action-outcome.err { color: var(--warn); }

/* ── Talk bar / command bar (master #composer .composer-row) ──────────────────────── */
.talk-view { max-width: 740px; margin: 0 auto; }
.composer { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; position: sticky; bottom: 0; padding: 12px 0; }
.composer-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 8px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.02),
    0 18px 44px rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  transition: border-color var(--t), box-shadow var(--t);
}
[data-theme="light"] .composer-row {
  border-color: rgba(20, 18, 30, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 40px rgba(40, 30, 70, 0.12);
}
.composer-row:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 3px var(--accent-soft),
    0 18px 44px rgba(0, 0, 0, 0.42);
}
.composer-row #msg { flex: 1; background: transparent; border: none; color: var(--text); padding: 9px 6px; font-size: 15px; }
.composer-row #msg::placeholder { color: var(--faint); }
.composer-row #msg:focus { outline: none; }
.composer-row .send {
  flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 16px; line-height: 1; border: none; color: #fff;
  background: radial-gradient(circle at 50% 30%, var(--accent-press), var(--accent) 78%);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 42%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform var(--t), box-shadow var(--t), background var(--t);
}
.composer-row .send:hover { transform: translateY(-1px); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.composer-row .send:active { transform: translateY(0); }
.composer-foot { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.composer-hint { color: var(--faint); font-size: 12px; text-align: center; margin: 0; }

/* ── Voice presence (voice.js): mic hold + voice-out toggle, tokens only ──────────── */
/* The mic sits beside the send orb as a quiet outline; ACTIVE (really listening) is the one
   accent state. touch-action: none keeps a mobile hold from turning into a scroll. */
.composer-row .mic {
  flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  transition: var(--t); touch-action: none; -webkit-user-select: none; user-select: none;
}
.composer-row .mic svg { width: 17px; height: 17px; display: block; }
.composer-row .mic:hover { color: var(--text); border-color: var(--line-strong); }
.composer-row .mic.active {
  color: #fff; background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Honest disabled state: still visible, plainly dimmed; pressing it explains, never pretends. */
.composer-row .mic[data-unavailable] { opacity: 0.45; }
.composer-row .mic:focus-visible { outline: 2px solid var(--accent-press); outline-offset: 2px; }

.voiceout {
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 12px; padding: 3px 10px; transition: var(--t); white-space: nowrap;
}
.voiceout:hover { color: var(--text); border-color: var(--line-strong); }
.voiceout[aria-pressed="true"] {
  color: var(--accent); background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.voiceout:focus-visible { outline: 2px solid var(--accent-press); outline-offset: 2px; }

/* ── Onboarding (the signature first moment) ──────────────────────────────────────── */
.onb { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(28px + env(safe-area-inset-top, 0px)) 28px calc(28px + env(safe-area-inset-bottom, 0px)); }
.onb-card { width: min(460px, 92vw); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.onb-card .mark { width: 40px; height: 40px; }
.onb-card .mark-core { width: 22px; height: 22px; }
.onb-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.onb-title { font-family: var(--sans); font-size: clamp(24px, 3.4vw, 28px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin: 2px 0 0; color: var(--text); }
.onb-sub { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 42ch; }
.onb-step { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.onb-trust { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 40ch; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.onb-cta { padding: 10px 22px; }
.onb-form { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 6px; }
.onb-form input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 14px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 10px 13px; transition: border-color var(--t), box-shadow var(--t);
}
.onb-form input::placeholder { color: var(--faint); }
.onb-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.onb-err { color: var(--danger); font-size: 13px; margin: 0; min-height: 1em; }
.onb-note { color: var(--faint); font-size: 12px; line-height: 1.45; margin: 4px 0 0; max-width: 40ch; }

/* ── Bottom nav (calm, glanceable) ────────────────────────────────────────────────── */
.tabbar { position: relative; z-index: 20; flex: 0 0 auto; display: flex; gap: 4px; justify-content: center; padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px)); }
.tab { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 8px 16px; font-size: 13px; font-weight: 500; border-radius: 999px; transition: var(--t); }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { color: var(--text); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── You scene (profile, read-only glance) ────────────────────────────────────────── */
.you-facts { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; margin: 0; }
.you-facts dt { color: var(--faint); font-size: 12px; }
.you-facts dd { margin: 0; color: var(--text); font-size: 14px; }

/* How I have grown with you: real rows or the one getting-started line. Mono-for-data values,
   mono provenance tag matching the eod-prov pattern. Rests fully visible, no transient motion. */
.you-growth { margin-top: 28px; }
.you-growth .yg-rows { display: grid; gap: 12px; margin-top: 12px; }
.you-growth .yg-row { display: flex; align-items: baseline; gap: 14px; }
.you-growth .yg-val { font-family: var(--mono); font-size: 18px; color: var(--text); }
/* Long values ("12 days ago on this device") must wrap on narrow phones, never clip the label. */
.you-growth .yg-row { flex-wrap: wrap; }
.you-growth .yg-lbl { display: flex; flex-direction: column; gap: 2px; color: var(--text); font-size: 14px; }
.you-growth .yg-sub { color: var(--faint); font-size: 12px; }
.you-growth .yg-prov { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.you-growth .muted { margin: 10px 0 0; }

/* ── Trust panel (trust.js): plain labels + mono facts, master mono-for-data ──────── */
.trust-lead { margin: 0 0 10px; font-size: 14px; color: var(--text); line-height: 1.45; }
.trust-note { margin: 10px 0 0; font-size: 12.5px; color: var(--faint); line-height: 1.45; }
.trust-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.trust-row .tr-lbl { font-size: 14px; color: var(--text); line-height: 1.35; min-width: 0; }
.trust-row .tr-lbl .tr-sub { display: block; color: var(--faint); font-size: 12px; }
.trust-row .tr-val { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; max-width: 55%; }
.trust-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* Sync section: a small subhead over each truth list, and the inline enable/passphrase form. */
.trust-sub-h { margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: var(--text); }
.trust-syncflow { margin-top: 10px; }
.trust-syncform { display: flex; flex-direction: column; gap: 10px; width: 100%; margin: 6px 0 0; }
.trust-syncform input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 14px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 10px 13px; transition: border-color var(--t), box-shadow var(--t);
}
.trust-syncform input::placeholder { color: var(--faint); }
.trust-syncform input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* The one destructive control: the master's danger token on the quiet ghost shape. */
button.ghost.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
button.ghost.danger:hover { color: var(--danger); border-color: var(--danger); }
/* The one-time recovery code / passphrase reveal: mono, selectable in one gesture, never truncated. */
.trust-code { font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em; color: var(--text); overflow-wrap: anywhere; user-select: all; margin: 8px 0; }
/* A quiet in-copy action ("I lost my passphrase"): reads as a link, works as a button. */
button.linklike { background: none; border: none; padding: 0; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; transition: var(--t); }
button.linklike:hover { color: var(--text); }

/* ── Toast (honest, quiet) ────────────────────────────────────────────────────────── */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 10px 16px; font-size: 13px; color: var(--text); box-shadow: var(--shadow); max-width: 90vw; }
.toast[hidden] { display: none; }
