/* AgenticOS phone page. Tokens follow the Cool indigo preset (apps/shared/tokens.json).
   Light is the default; dark follows the system unless the page's theme toggle sets data-theme. */
/* Colors, radii, spacing, type and motion come from tokens.css (generated from apps/shared/tokens.json by
   scripts/build-tokens.py; link it before this file). The "phone" token group holds the glass surfaces, the glow and
   the hero art colors. Only the page's own aliases and color-scheme live here. */
:root {
  color-scheme: light;
  --radius: 22px;
  --radius-sm: 14px;
  --pill: 999px;
  --card-shadow: 0 1px 2px var(--shadow), 0 10px 30px -12px var(--shadow);
  --dock-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}

:root[data-theme="dark"] { color-scheme: dark; }

/* Round 8: wrapping phone sheets and compact icon-led rows, including 390px. */
.parity8-panel, .parity8-stack { display: grid; gap: var(--space-md); min-width: 0; max-width: 100%; }
.parity8-panel .card { margin: 0; min-width: 0; }
.parity8-panel .actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.parity8-panel .btn, .parity8-link, .parity8-icon {
  min-height: 44px; min-width: 44px; max-width: 100%;
  border-radius: var(--radius-sm); white-space: normal; overflow-wrap: anywhere;
}
.parity8-link { width: 100%; text-align: left; justify-content: flex-start; }
.parity8-panel .parity-row__text, .parity8-panel .item__title, .parity8-panel .item__meta,
.parity8-copy, .home-wearable, .hero__title, .hero__lede { min-width: 0; overflow-wrap: anywhere; }
.parity8-copy { white-space: pre-wrap; }
.parity8-panel .item__title { white-space: normal; overflow: visible; text-overflow: clip; }
.parity8-panel .btn svg, .parity8-link svg, .parity8-icon svg { width: 20px; height: 20px; }
.btn.parity8-icon { font-size: 0; padding: var(--space-sm); flex: none; }
.parity8-icon > span { display: none; }
.goal-row .goal-text { flex: 1; }
.home-wearable { color: var(--mute); margin: var(--space-sm) 0; }
.hero__lede { margin-top: var(--space-md); color: var(--mute); }
.allowance-meter { display: grid; gap: var(--space-xs); min-width: 0; }
.allowance-meter__track { height: 6px; background: var(--soft); border-radius: var(--radius-fixed-sm); overflow: hidden; }
.allowance-meter__fill { height: 100%; background: var(--accent); }
.allowance-meter__fill[data-tone="problem"] { background: var(--problem); }
.allowance-meter__fill[data-tone="attention"] { background: var(--attention); }

/* Round 9 keeps source values below their labels at phone widths. */
.parity9-summary, .parity9-panel { min-width: 0; max-width: 100%; }
.parity9-group { display: grid; gap: var(--space-sm); min-width: 0; }
.parity9-group + .parity9-group { padding-top: var(--space-md); border-top: 1px solid var(--line); }
.parity9-summary h2, .parity9-panel h2 { margin: 0; }
.parity9-summary .item__title, .parity9-panel .item__title { white-space: normal; overflow-wrap: anywhere; }
.parity9-metric { align-items: flex-start; min-height: 44px; }
.parity9-value { font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.parity9-input { width: 100%; min-height: 44px; min-width: 0; padding: var(--space-sm) var(--space-md); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); color: var(--ink); font: inherit; }
.parity9-help > summary, .parity9-view > summary { min-height: var(--tap); cursor: pointer; border-radius: var(--radius-sm); }
.parity9-view > .parity8-stack { padding-top: var(--space-md); }
.parity9-view > summary > .item__title { flex: 1; min-width: 0; }
.parity9-view .chip { border-radius: var(--radius-fixed-sm); }
.parity9-spend-meter { display: block; width: 100%; height: 6px; }
.parity9-spend-track { fill: var(--soft); }
.parity9-spend-fill { fill: var(--accent); }
.parity9-spend-meter[data-tone="problem"] .parity9-spend-fill { fill: var(--problem); }
.parity9-spend-meter[data-tone="attention"] .parity9-spend-fill { fill: var(--attention); }
.parity9-group[data-tone="problem"] > .empty { color: var(--problem); }

/* Round 10 keeps People and Jobs controls and long values usable at 390px. */
.parity10-search { display: flex; gap: var(--space-sm); min-width: 0; max-width: 100%; }
.parity10-search input { flex: 1; min-width: 0; }
.parity10-search .btn { flex: none; }
.seg.parity10-filters { border-radius: var(--radius-sm); max-width: 100%; }
.seg.parity10-filters button { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); min-height: 44px; border-radius: var(--radius-sm); }
.parity10-filters svg { width: 20px; height: 20px; }
.parity10-panel, .parity10-list { min-width: 0; max-width: 100%; }
.parity10-list .item__title, .parity10-list .item__meta, .parity10-panel .empty,
.parity10-panel .item__title, .parity10-panel .item__meta { white-space: normal; overflow-wrap: anywhere; }
.parity10-list .parity-row, .parity10-panel .btn, .parity10-panel input { min-height: 44px; border-radius: var(--radius-sm); }
.parity10-list .actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* Round 12 keeps complete proposals, metadata and controls within 390px cards. */
.parity12-card, .parity12-panel, .parity12-group { min-width: 0; max-width: 100%; }
.parity12-card .parity-row { align-items: flex-start; flex-wrap: wrap; }
.parity12-card .parity-row__text { flex: 1 1 120px; }
.parity12-card .item__title, .parity12-card .item__meta, .parity12-panel .item__title,
.parity12-change { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.parity12-card h2 { margin: 0; text-transform: none; letter-spacing: normal; }
.parity12-card .btn, .parity12-panel .btn, .parity12-input { min-height: 44px; min-width: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; border-radius: var(--r-control); }
.parity12-group + .parity12-group { padding-top: var(--space-md); border-top: 1px solid var(--line); }
.parity12-input { width: 100%; padding: var(--space-sm) var(--space-md); border: 1px solid var(--line); background: var(--soft); color: var(--ink); font: inherit; resize: vertical; }
.parity12-group[data-tone="attention"] > .parity-row > svg { color: var(--attention); }
.parity12-meter { display: block; width: 100%; height: 6px; }
.parity12-meter-track { fill: var(--soft); }
.parity12-meter-fill { fill: var(--accent); }

/* Round 11 status pages keep visual rows and touch targets within phone cards. */
.parity11-card, .parity11-panel, .parity11-group { min-width: 0; max-width: 100%; }
.parity11-card .parity-row, .parity11-panel .parity-row { align-items: flex-start; flex-wrap: wrap; }
.parity11-card .parity-row__text { flex: 1 1 120px; }
.parity11-card .item__title, .parity11-card .item__meta, .parity11-panel .item__title { white-space: normal; overflow-wrap: anywhere; }
.parity11-card h2 { margin: 0; text-transform: none; letter-spacing: normal; }
.parity11-card .btn, .parity11-panel .btn { min-height: 44px; min-width: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; border-radius: var(--r-control); }
.parity11-card .actions, .parity11-panel .actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.parity11-group + .parity11-group { padding-top: var(--space-md); border-top: 1px solid var(--line); }
.parity11-group[data-tone="problem"] > .parity-row > svg { color: var(--problem); }
.parity11-group[data-tone="attention"] > .parity-row > svg { color: var(--attention); }
.parity11-bars { display: block; width: 100%; height: 40px; max-width: 100%; }
.parity11-bar { fill: var(--accent); }
.parity11-bar-empty { fill: var(--soft); }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--canvas-top); }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--canvas-top), var(--canvas-bottom));
  color: var(--ink);
  font: var(--text-base)/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* The page's light: two soft auras that stay put while the content scrolls. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 60% at 100% 0%, var(--aura-cool), transparent 60%),
    radial-gradient(90% 50% at 0% 45%, var(--aura-warm), transparent 65%),
    linear-gradient(180deg, var(--canvas-top), var(--canvas-bottom));
}

h1, h2, p, ul, li { margin: 0; }
ul { padding: 0; list-style: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { flex: none; }

/* Top bar: a quiet glass strip over the page. */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: calc(env(safe-area-inset-top) + 8px) calc(var(--gutter) + env(safe-area-inset-right)) 8px calc(var(--gutter) + env(safe-area-inset-left));
  background: var(--glass-bar);
  border-bottom: 1px solid var(--glass-line);
  -webkit-backdrop-filter: saturate(160%) blur(var(--blur));
  backdrop-filter: saturate(160%) blur(var(--blur));
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { width: 26px; height: 26px; flex: none; color: var(--accent); filter: drop-shadow(0 2px 8px var(--glow)); }
.top h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.top__actions { display: flex; gap: 6px; flex: none; }
.icon-btn {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--glass-line);
  border-radius: var(--pill);
  background: var(--glass);
  box-shadow: inset 0 1px 0 var(--glass-edge);
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), transform var(--dur-snap) var(--ease-out);
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active, .btn:active { transform: scale(0.97); }
.icon-btn.btn--rect { border-radius: var(--radius-sm); }
@media (max-width: 360px) {
  .top { flex-wrap: wrap; }
  .top__actions { margin-left: auto; }
}

/* Content */
.view {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding: 16px calc(var(--gutter) + env(safe-area-inset-right)) calc(var(--dock-h) + 40px + env(safe-area-inset-bottom)) calc(var(--gutter) + env(safe-area-inset-left));
}
.view > * { min-width: 0; }
/* Opened on a wide screen, keep one readable column instead of cards and buttons spanning the window (owner 2026-10-27). */
@media (min-width: 800px) { .view { box-sizing: border-box; width: 100%; max-width: 760px; margin-inline: auto; } }
.stamp, .empty, .item__meta { font-size: 14px; color: var(--mute); overflow-wrap: anywhere; }

/* Labels: small, uppercase and tracked, so the content under them leads. */
.eyebrow, .card h2, .view > section h2, .count__l {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

/* Screen titles (every screen but Home) */
.page-head { display: grid; gap: 4px; padding: 8px 2px 4px; }
.page-head__title { font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }

/* Home banner: our own procedural art, a low sun over two ridges with three glass forms. Drawn with gradients only. */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 188px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, var(--art-sky-a) 0%, var(--art-sky-b) 58%, var(--art-sky-c) 100%);
  box-shadow: var(--card-shadow), 0 18px 48px -24px var(--glow), inset 0 1px 0 var(--glass-edge);
}
.hero__art, .hero__art > span { position: absolute; pointer-events: none; }
.hero__art { inset: 0; z-index: -1; }
.hero__sun {
  right: -4%;
  bottom: 4%;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--art-sun) 0%, var(--art-sun) 18%, transparent 68%);
}
.hero__ridge { left: -5%; right: -5%; bottom: 0; }
.hero__ridge--far {
  height: 42%;
  background: linear-gradient(180deg, var(--art-ridge-far), var(--art-ridge-near));
  clip-path: polygon(0 62%, 14% 40%, 27% 52%, 42% 22%, 55% 44%, 68% 30%, 82% 50%, 100% 28%, 100% 100%, 0 100%);
  opacity: 0.85;
}
.hero__ridge--near {
  height: 26%;
  background: var(--art-ridge-near);
  clip-path: polygon(0 40%, 18% 62%, 36% 30%, 52% 58%, 70% 36%, 86% 60%, 100% 44%, 100% 100%, 0 100%);
}
.hero__crystal {
  background: linear-gradient(135deg, var(--art-crystal-a) 0%, var(--art-crystal-a) 48%, var(--art-crystal-b) 52%, transparent 100%);
}
.hero__crystal--a { right: 13%; bottom: 20%; width: 46px; height: 92px; clip-path: polygon(50% 0, 100% 34%, 72% 100%, 18% 100%, 0 30%); }
.hero__crystal--b { right: 4%; bottom: 24%; width: 34px; height: 62px; clip-path: polygon(46% 0, 100% 40%, 64% 100%, 10% 92%, 0 36%); opacity: 0.85; }
.hero__crystal--c { right: 25%; bottom: 18%; width: 24px; height: 40px; clip-path: polygon(50% 0, 100% 45%, 60% 100%, 0 70%); opacity: 0.7; }
.hero__text { position: relative; display: grid; gap: 6px; max-width: 90%; padding: 20px 20px 76px; }
.hero .eyebrow { color: var(--art-mute); }
.hero__title { font-size: 34px; line-height: 1.05; font-weight: 600; letter-spacing: -0.025em; color: var(--art-ink); }
.hero .stamp { font-size: 14px; color: var(--art-mute); }

/* Cards: translucent glass with a soft 1px border, a faint top highlight and a gentle shadow. */
.card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--card-shadow), inset 0 1px 0 var(--glass-edge);
  -webkit-backdrop-filter: saturate(150%) blur(var(--blur));
  backdrop-filter: saturate(150%) blur(var(--blur));
}
.card--lead { box-shadow: var(--card-shadow), 0 16px 40px -22px var(--glow), inset 0 1px 0 var(--glass-edge); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.card__head h2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card__head h2 span { overflow-wrap: anywhere; }
.card__head svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plain { display: grid; gap: 10px; }
.plain li { position: relative; padding-left: 16px; overflow-wrap: anywhere; }
.plain li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.7; }
.brief-card__prose { margin: 0; font-size: 18px; line-height: 1.5; letter-spacing: -0.005em; color: var(--ink); overflow-wrap: anywhere; }

/* Metric cards: one big number each, a meter, a status chip and the source under it. */
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.count {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 14px 12px 12px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  background: var(--glass);
  box-shadow: var(--card-shadow), inset 0 1px 0 var(--glass-edge);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  --tone: var(--mute);
}
.count[data-tone="good"] { --tone: var(--good); }
.count[data-tone="attention"] { --tone: var(--attention); }
.count[data-tone="problem"] { --tone: var(--problem); }
.count__l { font-size: 11px; letter-spacing: 0.1em; overflow-wrap: anywhere; min-height: 2.6em; }
.count__n { font-size: 36px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.count__src { font-size: 12px; color: var(--mute); overflow-wrap: anywhere; }
.meter { display: flex; gap: 3px; height: 4px; }
.meter > span { flex: 1; border-radius: var(--pill); background: var(--glass-field); }
.meter > span.meter__on { background: var(--tone); }
.count[data-tone="calm"] .meter__on { background: var(--mute); }
.chip {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  max-width: 100%;
  padding: 3px 9px 3px 8px;
  border-radius: var(--pill);
  background: var(--glass-field);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.chip::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 22%, transparent); }
.count[data-tone="calm"] .chip::before { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }

/* Lists and rows */
.list { display: grid; gap: 0; }
.list > .item:first-child { padding-top: 0; border-top: 0; }
.list.card { padding: 0 18px; }
.list.card > .item:first-child { padding-top: 18px; }
.list.card > .item:last-child { padding-bottom: 18px; }
.item { display: grid; gap: 6px; min-width: 0; padding: 14px 0; border-top: 1px solid var(--glass-line); }
.item__title { font-weight: 600; letter-spacing: -0.005em; overflow-wrap: anywhere; }

/* Status: a colored dot and plain words. The color stays on the dot. */
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; --tone: var(--mute); }
.status::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 20%, transparent); }
.status[data-tone="good"] { --tone: var(--good); }
.status[data-tone="attention"] { --tone: var(--attention); }
.status[data-tone="problem"] { --tone: var(--problem); }
.status[data-tone="neutral"] { --tone: var(--accent); }

.notice {
  padding: 12px 14px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  background: var(--glass);
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}
.notice[data-tone="problem"] { background: var(--problem-tint); color: var(--problem); }
.notice[data-tone="good"] { background: var(--good-tint); color: var(--good); }

/* Controls: pill buttons, a pill segmented control and rounded fields. */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid var(--glass-line);
  border-radius: var(--pill);
  background: var(--glass-field);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), transform var(--dur-snap) var(--ease-out);
}
.btn--primary {
  border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, white), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 8px 22px -10px var(--glow), inset 0 1px 0 rgb(255 255 255 / 0.25);
}
.btn--danger { color: var(--problem); }
.btn--quiet { border-color: transparent; background: transparent; color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: var(--pill);
  background: var(--glass-field);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
.seg button {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--card) 82%, var(--ink) 18%); color: var(--ink); box-shadow: 0 1px 2px var(--shadow), 0 4px 12px -4px var(--shadow); }

.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 14px; color: var(--mute); }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  background: var(--glass-field);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* iOS does not zoom on focus at 16px */
}
input::placeholder, textarea::placeholder { color: var(--mute); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-tint); }
textarea { resize: vertical; min-height: 112px; }
.pick { display: grid; gap: 12px; }
.ask .actions { margin-top: 0; }
.answer__text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.pair { max-width: 480px; }
.pair input { font-size: 28px; letter-spacing: .3em; text-align: center; }

.sheet {
  width: min(420px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 22px;
  border: 1px solid var(--glass-line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px var(--shadow);
}
.sheet::backdrop { background: rgb(8 10 24 / 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet h2 { font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.sheet p { margin-bottom: 16px; overflow-wrap: anywhere; }
.capture-it h2 { display: flex; align-items: center; gap: 12px; }
.capture-it svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.capture-it .notice { overflow-wrap: anywhere; }
.capture-it .notice p { margin: 8px 0 0; }

/* Bottom tabs: a floating glass dock. The current tab sits on a soft accent pill. */
.tabs {
  position: fixed;
  left: calc(10px + env(safe-area-inset-left));
  right: calc(10px + env(safe-area-inset-right));
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 6;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--glass-line);
  border-radius: 26px;
  background: var(--glass-bar);
  box-shadow: 0 18px 40px -16px var(--shadow), inset 0 1px 0 var(--glass-edge);
  -webkit-backdrop-filter: saturate(170%) blur(var(--blur));
  backdrop-filter: saturate(170%) blur(var(--blur));
}
.tabs a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 52px;
  border-radius: 20px;
  color: var(--mute);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.tabs a span { max-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.tabs a[aria-current="page"] { background: var(--accent-tint); color: var(--accent); font-weight: 650; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* New task */
.notice[data-tone="attention"] { background: var(--attention-tint); color: var(--attention); }
.nt { display: grid; gap: 16px; min-width: 0; margin: 0; }
.nt__fields { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.nt__fields:disabled { opacity: .6; }
.nt__submit { width: 100%; }
.nt__cmd { display: grid; gap: 12px; min-width: 0; }
.hint { font-size: 14px; color: var(--mute); overflow-wrap: anywhere; }
.hint[data-tone="problem"] { color: var(--problem); }
.field__label { font-size: 14px; color: var(--mute); }
.choices { display: grid; grid-auto-rows: max-content; align-content: start; gap: 10px; min-width: 0; max-height: 260px; overflow-y: auto; }
.choice {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: var(--tap);
  padding: 12px 14px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  background: var(--glass-field);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); }
.choice:disabled { opacity: .5; cursor: default; }
.choice__title { font-weight: 600; overflow-wrap: anywhere; }
.choice__meta { font-size: 14px; color: var(--mute); overflow-wrap: anywhere; }
.seg button:disabled { opacity: .5; }
.more summary {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.more__body { display: grid; gap: 12px; padding-top: 12px; }
.card .result__title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin: 0; }
.facts dt { font-size: 14px; color: var(--mute); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cmd {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  background: var(--glass-field);
  color: var(--ink);
  font: var(--text-md)/1.4 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Agents screen, Recent questions, the feed notice and pull to refresh */
.agent__open {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.agent__open .item__meta { font-size: 14px; }
.agent__open .status { font-size: 14px; }
.feed { background: var(--problem-tint); }
.feed .status { --tone: var(--problem); color: var(--problem); }
.feed .actions { margin-top: 0; }
.history__run { display: grid; gap: 16px; min-width: 0; }
.pull {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 68px);
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--glass-line);
  border-radius: var(--pill);
  background: var(--glass-bar);
  color: var(--mute);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
}

/* Focus, Inbox and quick capture (Home, Inbox, Settings) */
.note__text { font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Projects (from Home, #projects): the Mac's Overview groups. Rows are buttons that open the detail. */
/* Projects buttons are rounded rectangles, not the shared capsule. */
.btn.btn--rect { border-radius: var(--radius-sm); }

/* Read-only phone views reuse the card/list surfaces and control tokens. */
.parity-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
button.parity-row { width: 100%; min-height: 44px; padding: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
button.parity-row:hover { background: var(--accent-tint); }
button.parity-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.parity-row > svg { width: 24px; height: 24px; flex: none; }
.parity-row__text { display: grid; gap: 6px; min-width: 0; flex: 1; }
.parity-row__text > .item__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parity-search { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.parity-search > svg { width: 24px; height: 24px; flex: none; }
.parity-search input { flex: 1; min-width: 0; min-height: 44px; padding: 8px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font: inherit; appearance: none; }
.parity-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.parity-search input::-webkit-search-cancel-button { display: none; }
.parity-row__text > .parity-meta-wrap { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.parity-pin { flex: none; min-width: 44px; min-height: 44px; }
.parity-pin[aria-pressed="true"] { color: var(--accent); background: var(--accent-tint); }
.chat-action { gap: 8px; min-height: 44px; max-width: 100%; white-space: normal; }
.answer .chat-source-title { white-space: normal; overflow-wrap: anywhere; }
.chat-action > svg, .chat-memory summary > svg, .chat-memory .choice > svg { width: 20px; height: 20px; flex: none; }
.chat-action > svg, .chat-memory summary > svg, .chat-memory .choice > svg, .memory-title-row .parity-pin > svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-memory, .chat-panel, .memory-title-row { min-width: 0; }
.chat-memory .actions, .chat-panel .actions, .memory-title-row .actions { flex-wrap: wrap; gap: 8px; }
.chat-memory summary { gap: 8px; overflow-wrap: anywhere; }
.chat-memory .choice { display: flex; align-items: center; gap: 8px; }
.chat-panel { display: grid; gap: 12px; }
.chat-content { display: grid; gap: 16px; min-width: 0; }
.chat-panel .btn, .chat-panel input { border-radius: var(--radius-sm); }
.chat-name { width: 100%; min-width: 0; min-height: 44px; padding: 12px; border: 1px solid var(--glass-line); background: var(--glass-field); color: var(--ink); font: inherit; }
.chat-brief-preview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.choices .btn > svg { width: 20px; height: 20px; flex: none; }
.parity-message { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.parity-message p, .parity-message div, .parity-message blockquote { margin-block: 12px; }
.parity-message pre { white-space: pre-wrap; }
.parity-message table { display: block; max-width: 100%; overflow-x: auto; }
.parity-message td, .parity-message th { padding: 8px; }
/* Goals and owner memory upkeep. Wrapping stays inside a 390px card. */
.goal-section { display: grid; gap: 8px; min-width: 0; padding-block: 12px; }
.goal-section + .goal-section { border-top: 1px solid var(--line); }
.goal-section > .parity-row .item__title { flex: 1; }
.goal-row { padding-block: 6px; align-items: flex-start; }
.goal-text, .upkeep-text { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.goal-text { flex: 1; padding-block: 10px; }
.goal-text--first { font-size: 20px; font-weight: 600; }
.goal-text--next { font-weight: 500; }
.goal-text--done { color: var(--mute); text-decoration: line-through; }
.goal-tick { flex: none; padding: 10px; }
.goal-tick > svg { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; color: transparent; }
.goal-tick[aria-pressed="true"] > svg { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); }
.goal-tick[disabled] > svg { color: var(--mute); }
.goal-add { width: 100%; justify-content: flex-start; border: 1px dashed var(--line); background: var(--accent-tint); }
.goal-add-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.goal-add-form input { flex: 1 1 140px; min-height: 44px; border-radius: var(--radius-sm); }
.goal-add-form .btn { flex: none; min-height: 44px; }
.goal-history summary { min-height: var(--tap); cursor: pointer; border-radius: var(--radius-sm); }
.goal-history-row { display: grid; gap: 8px; min-width: 0; padding-top: 16px; }
.goal-days { display: flex; gap: 3px; min-width: 0; }
.goal-day { flex: 1 1 0; max-width: 10px; height: 10px; border-radius: 2px; background: var(--line); }
.goal-day--done { background: var(--accent); }
.memory-upkeep .parity-row { align-items: flex-start; }
.upkeep-row { display: grid; gap: 12px; min-width: 0; padding-block: 16px; }
.upkeep-row .actions { flex-wrap: wrap; }
.upkeep-row .empty { margin: 0; }
.correction-parts { display: grid; gap: 6px; min-width: 0; margin: 0; }
.correction-parts dt { color: var(--mute); font-size: 14px; font-weight: 600; }
.correction-parts dd { margin: 0 0 6px; }
.project-groups { display: grid; gap: 16px; min-width: 0; }
.project__open {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.project__open .status { font-size: 14px; }
.project__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.project__line { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.project__label { color: var(--mute); }
.spark { display: flex; flex: none; align-items: flex-end; gap: 2px; width: 70px; height: 20px; margin-top: 2px; }
.spark__bar { flex: 1 1 0; min-height: 2px; border-radius: 1px; background: var(--glass-line); }
.spark__bar--on { background: var(--accent); }

/* Round 6 memory upkeep. Shared tokens and 44px controls wrap inside a 390px card. */
.upkeep-review .parity-row { align-items: flex-start; }
.upkeep-review .parity-row__text { display: grid; gap: 6px; }
.upkeep-choices, .upkeep-choice, .recall-form { display: grid; gap: 12px; min-width: 0; }
.upkeep-quote { margin: 0; padding: 12px; border-radius: var(--radius-sm); background: var(--accent-tint); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.upkeep-review .btn, .upkeep-choice .btn, .recall-form .btn { min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; border-radius: var(--radius-sm); }
.recall-form input { width: 100%; min-width: 0; min-height: 44px; border-radius: var(--radius-sm); }

/* Automation controls share the upkeep shapes and wrap at phone widths. */
.automation-row { display: grid; gap: 12px; }
.automation-row .actions { padding-left: 36px; }
.automation-row [data-tone="problem"] { color: var(--problem); }
.automation-row .btn { min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.automation-filters { display: flex; flex-wrap: wrap; border-radius: var(--radius-sm); }
.automation-filters button { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 120px; min-height: 44px; border-radius: var(--radius-sm); }
.automation-filters svg { width: 18px; height: 18px; flex: none; }
.automation-other > summary { min-height: var(--tap); cursor: pointer; }
.automation-panel { display: grid; gap: 16px; min-width: 0; }
.automation-panel .card__head h2 { font-size: 20px; text-transform: none; letter-spacing: normal; }
.automation-panel .btn { min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.schedule-choices .btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Inbox rows keep one quiet metadata line; full details and reasons wrap. */
.email-row .item__title, .email-panel .card__head, .email-panel .card__head h2,
.email-panel .card__head h2 > span, .email-panel .item__title {
  min-width: 0; white-space: normal; overflow-wrap: anywhere; text-overflow: clip;
}
.email-unread { display: inline-block; margin-right: 8px; color: var(--accent); font-size: 12px; font-weight: 600; }
.email-panel { display: grid; gap: 16px; min-width: 0; }
.email-reason summary { min-height: 44px; justify-content: flex-start; gap: 8px; border-radius: var(--radius-sm); }
.email-reason summary > svg { width: 20px; height: 20px; flex: none; }
.email-card .choices .btn { min-height: 44px; border-radius: var(--radius-sm); }
.email-card .card__head h2, .email-panel .card__head h2 { text-transform: none; letter-spacing: normal; }

/* Inbox text keeps account/reason context bounded while direction stays local. */
.email-row bdi, .email-subject { unicode-bidi: isolate; }
.email-reason-preview { display: block; color: var(--mute); font-size: var(--text-sm); min-width: 0; overflow-wrap: anywhere; }
.email-reason-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.email-read-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Inline reply under an Inbox row: rounded rectangles, icon-only 44px controls. */
.email-reply { display: grid; gap: var(--space-sm); min-width: 0; padding: 0 var(--space-md) var(--space-sm); }
.email-reply__open { justify-self: end; }
.email-reply .btn { min-width: 44px; min-height: 44px; border-radius: var(--radius-sm); }
.email-reply .btn > svg { width: 20px; height: 20px; flex: none; }
.email-reply__box { width: 100%; min-height: 88px; min-width: 0; padding: var(--space-sm) var(--space-md); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); color: var(--ink); font: inherit; resize: vertical; }
.email-reply__box:disabled { opacity: 0.6; cursor: not-allowed; }
.email-reply__actions { display: flex; justify-content: flex-end; gap: var(--space-sm); }
.email-reply__error { margin: 0; color: var(--status-danger); font-size: var(--text-sm); overflow-wrap: anywhere; }

/* Shared with team (lane 6): icon-only controls; people are rounded squares, only status dots are round. */
.team-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.team-ico--s { width: 16px; height: 16px; }
.team-mute { color: var(--mute); margin: 0; }
.team-spacer { flex: 1 1 auto; min-width: 0; }
.team-head { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); min-width: 0; }
.team-status { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-fixed-md); background: var(--soft); color: var(--ink); font-size: var(--text-lg); font-weight: 600; flex: 1 1 auto; min-width: 0; }
.team-status__dot { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.team-tone--good .team-status__dot, .team-tone--good { color: var(--good); }
.team-tone--attention { color: var(--attention); }
.team-tone--problem { color: var(--problem); }
.team-tone--mute { color: var(--mute); }
.team-status.team-tone--good, .team-status.team-tone--attention, .team-status.team-tone--mute { color: var(--ink); }
.team-status.team-tone--good .team-status__dot { background: var(--good); }
.team-status.team-tone--attention .team-status__dot { background: var(--attention); }
.team-status.team-tone--mute .team-status__dot { background: var(--mute); }
.btn.team-ib { min-width: var(--tap); min-height: var(--tap); padding: 0; border-radius: var(--r-small); color: var(--ink); flex: none; }
.btn.team-ib--wide { flex: 1 1 0; }
.btn.team-ib--line { background: transparent; border-color: var(--line); }
.btn.team-ib--accent, .btn.team-ib--on { background: var(--accent-tint); border-color: transparent; color: var(--accent); }
.btn.team-ib--warn-tint { background: var(--attention-tint); border-color: transparent; color: var(--attention); }
.btn.team-ib--warn { background: var(--attention); border-color: transparent; color: var(--on-accent); }
.btn.team-ib--danger { background: transparent; border-color: var(--line); color: var(--problem); }
.team-banner { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md); margin-bottom: var(--space-md); border-radius: var(--r-control); background: var(--attention-tint); color: var(--attention); font-weight: 600; }
.team-card { display: grid; gap: var(--space-sm); min-width: 0; }
.team-row { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; flex-wrap: wrap; }
.team-empty { padding: var(--space-md) 0; text-align: center; }
.team-item { display: grid; gap: var(--space-sm); padding: var(--space-xs) 0; border-bottom: 1px solid var(--line); min-width: 0; }
.team-item:last-child { border-bottom: 0; }
.team-item--off .team-item__name { color: var(--mute); }
.team-item__row { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.team-item__text { display: grid; gap: 4px; flex: 1 1 auto; min-width: 0; }
.team-item__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-item__meta { display: flex; align-items: center; gap: var(--space-sm); color: var(--mute); min-width: 0; }
.team-access { display: inline-flex; gap: 2px; }
.team-tile { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-small); background: var(--soft); color: var(--ink); flex: none; }
.team-tile--sm { width: 32px; height: 32px; }
.team-tile--accent, .team-kind--memory { background: var(--accent-tint); color: var(--accent); }
.team-tile--warn { background: var(--attention-tint); color: var(--attention); }
.team-kind--skills, .team-kind--compute { background: var(--good-tint); color: var(--good); }
.team-kind--connectors { background: var(--attention-tint); color: var(--attention); }
.team-kind--credentials { background: var(--problem-tint); color: var(--problem); }
.team-tile--never { background: var(--soft); color: var(--mute); }
.team-faces { display: inline-flex; }
.team-face { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: -4px; border: 2px solid var(--card); border-radius: var(--radius-fixed-sm); background: var(--accent-tint); color: var(--accent); font-size: var(--text-xs); font-weight: 700; }
.team-face:first-child { margin-left: 0; }
.team-face .team-ico { width: 13px; height: 13px; }
.team-face--team { background: var(--good-tint); color: var(--good); }
.team-badge { position: absolute; right: -5px; bottom: -5px; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 2px solid var(--card); border-radius: var(--radius-fixed-sm); }
.team-badge .team-ico { width: 10px; height: 10px; stroke-width: 2.4; }
.team-badge--external { background: var(--attention); color: var(--on-accent); }
.team-badge--check { top: -5px; bottom: auto; background: var(--accent); color: var(--on-accent); }
.team-choices { display: flex; flex-wrap: wrap; gap: var(--space-sm); padding: var(--space-sm) 0 var(--space-xs) 48px; }
.btn.team-choice { width: 48px; min-height: 48px; background: var(--soft); border-color: transparent; font-size: var(--text-base); font-weight: 700; }
.btn.team-choice--on { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); }
.btn.team-choice--add { background: transparent; border: 1.5px dashed var(--line); color: var(--mute); }
.team-choice__in { position: relative; display: inline-grid; place-items: center; }
.team-people { display: flex; flex-wrap: wrap; gap: var(--space-sm); min-width: 0; }
.btn.team-ib--avatar { background: transparent; border-color: transparent; }
.team-avatar { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: var(--r-small); background: var(--accent-tint); color: var(--accent); font-weight: 700; }
.team-avatar--sm { width: 32px; height: 32px; font-size: var(--text-sm); }
.team-avatar--md { width: 44px; height: 44px; font-size: var(--text-lg); }
.team-avatar--lg { width: 48px; height: 48px; font-size: var(--text-lg); }
.team-avatar--you { background: var(--soft); color: var(--ink); font-size: var(--text-xs); }
.team-dot { position: absolute; left: -3px; top: -3px; width: 12px; height: 12px; border: 2px solid var(--card); border-radius: var(--radius-fixed-sm); }
.team-dot--good { background: var(--good); }
.team-dot--mute { background: var(--mute); }
.team-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-control); background: var(--soft); }
.btn.team-ib.team-seg--on { background: var(--card); color: var(--accent); border-color: var(--line); }
.team-seg .btn.team-ib { background: transparent; border-color: transparent; }
.team-seg .btn.team-ib.team-seg--on { background: var(--card); border-color: var(--line); color: var(--accent); }
.team-never { display: flex; flex-wrap: wrap; gap: 6px; }
.team-dds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.team-dd-wrap { position: relative; min-width: 0; }
.btn.team-dd { width: 100%; gap: 4px; padding: 0 6px; border-radius: var(--r-small); font-size: var(--text-sm); font-weight: 600; justify-content: flex-start; }
.btn.team-dd--set { background: var(--accent-tint); color: var(--accent); border-color: transparent; }
.team-dd__label { flex: 1 1 auto; min-width: 0; white-space: nowrap; text-align: left; }
.team-menu { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: min(240px, calc(100vw - 32px)); display: grid; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--card); box-shadow: 0 12px 30px -12px var(--shadow); }
.team-dd-wrap:last-child .team-menu { left: auto; right: 0; }
.team-menu__opt { display: flex; align-items: center; gap: var(--space-sm); min-height: var(--tap); padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-fixed-md); background: transparent; color: var(--ink); font: inherit; font-size: var(--text-base); text-align: left; cursor: pointer; }
.team-menu__opt[aria-selected="true"] { background: var(--accent-tint); color: var(--accent); }
.team-menu__opt span { flex: 1 1 auto; }
.team-events { display: grid; min-width: 0; }
.team-event { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) 0; border-bottom: 1px solid var(--line); min-width: 0; }
.team-event__text { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.team-event__title { font-weight: 600; font-size: var(--text-base); overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.team-event__detail { color: var(--mute); font-size: var(--text-sm); overflow-wrap: anywhere; }
.team-event__side { display: grid; justify-items: end; gap: 2px; flex: none; color: var(--mute); font-size: var(--text-sm); }
.team-event__icons { display: inline-flex; gap: 4px; }
.team-foot { margin: var(--space-sm) 0 0; color: var(--mute); font-size: var(--text-sm); text-align: center; }
.team-sheet__head { display: flex; align-items: center; gap: var(--space-md); }
.team-sheet__head h2 { margin: 0; font-size: var(--text-lg); }
.team-sheet__item { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm); border-radius: var(--r-small); background: var(--soft); }
.team-sheet__name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.team-sheet__actions { display: flex; gap: var(--space-sm); }
.team-sheet input { min-height: var(--tap); padding: 0 var(--space-md); border: 1px solid var(--line); border-radius: var(--r-field); background: var(--glass-field); color: var(--ink); font: inherit; }
.team-code { display: block; padding: var(--space-md); border-radius: var(--r-small); background: var(--soft); font-family: var(--font-mono); font-size: var(--text-lg); overflow-wrap: anywhere; user-select: all; }

/* Agent command prompts (approvals board): the exact command, neutral facts in ink, Redirect chips. */
.command-card__command { margin: 0; padding: var(--space-sm) var(--space-md); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); color: var(--ink); font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.command-card__facts { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-md); margin: 0; padding: 0; list-style: none; color: var(--ink); }
.command-card__facts li { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.command-card__facts svg { width: 16px; height: 16px; color: var(--ink); }
.command-card__chips { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.command-card__chip { min-height: var(--tap); padding: 0 var(--space-md); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; text-align: left; }
.command-card__note { width: 100%; min-height: 96px; }
.command-card__send { width: 100%; justify-content: center; }
/* APPROVALS-REDESIGN-P4 (Owner 2026-11-21): risk line and the three expandable sections (Phone.dc.html). */
.approval-risk { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 500; color: var(--mute); }
.approval-risk[data-tone="good"] { color: var(--good); }
.approval-risk[data-tone="warn"] { color: var(--status-warn); }
.approval-risk__mark { width: 7px; height: 7px; border-radius: 2px; background: currentColor; flex: none; }
.approval-section { border-top: 1px solid var(--line); }
.approval-section__head { display: flex; align-items: center; min-height: var(--tap); cursor: pointer; font-weight: 600; color: var(--ink); }
.approval-section__body { display: grid; gap: var(--space-sm); padding-bottom: var(--space-sm); }
.approval-section__steps { margin: 0; padding-left: 20px; color: var(--ink); }
.approval-section__head::-webkit-details-marker { display: none; }
.approval-section__head::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(-45deg); }
.approval-section[open] > .approval-section__head::after { transform: rotate(45deg); }
/* Root review (Owner 2026-11-21): one left text edge on approval cards; row icons hang in the gutter. */
.approval-card { padding-left: calc(18px + 24px + 12px); }
.approval-card > .parity-row { margin-left: calc(-24px - 12px); }
.approval-rule { display: flex; align-items: center; gap: var(--space-sm); justify-content: space-between; border-top: 1px solid var(--line); padding-top: var(--space-sm); }
.approval-card .btn--danger { border-color: color-mix(in srgb, var(--problem) 45%, transparent); background: transparent; }

/* NC-07: the page a refused phone sees. Same header and card as sign-in; 16px gutters on a phone, 24px on a wide screen. */
.not-allowed { padding-bottom: calc(var(--space-xxl) + env(safe-area-inset-bottom)); }
.not-allowed-card { gap: var(--space-md); padding: var(--space-xl); }
.view.not-allowed > .not-allowed-card h2 { font-size: var(--text-lg); letter-spacing: normal; text-transform: none; color: var(--ink); }
.not-allowed-card p { color: var(--mute); line-height: 1.5; }
@media (min-width: 800px) { .not-allowed-page { --gutter: var(--space-xl); } }
