/*
  Tokens. Direction A, Calm green (DECISIONS.md 2026-11-14, "Reskin palette").
  --danger and --focus are the emergency notice's own values (DENY 6) and are
  read by nothing else: destructive actions use ink, and keyboard focus
  everywhere else uses --focus-ring. --muted is the base `p` colour exactly as
  at HEAD, because the notice's paragraphs take it through that rule; every reskinned surface
  uses --text-muted instead (see "Reading text" below).
*/
:root {
  --ink: #10211d;
  --muted: #5a6d67;
  --text-muted: #3d4f49;
  --line: #6f817b;
  --bg: #f4f8f6;
  --panel: #ffffff;
  --soft: #e3f1eb;
  --soft-hover: color-mix(in srgb, var(--accent) 10%, var(--soft));
  --accent: #00604a;
  --accent-deep: #00604a;
  --accent-pressed: #00563f;
  --on-accent: #ffffff;
  --shadow-soft: color-mix(in srgb, var(--accent) 8%, transparent);
  --shadow-mic: color-mix(in srgb, var(--accent) 18%, transparent);
  --warm: #86612f;
  --warm-soft: #f4ead8;
  --focus-ring: #10211d;
  --focus-gap: #ffffff;
  --space-forest: #00604a;
  --space-teal: #129390;
  --space-ochre: #a17833;
  --space-heather: #503975;
  --space-tint: 14%;
  --space-tint-strong: 18%;
  --text-base: 18px;
  --text-small: 16px;
  --line-height-base: 1.5;
  --target-min: 48px;
  --target-main: 56px;
  --gap-tight: 4px;
  --gap-compact: 8px;
  --gap-section: 16px;
  --radius-panel: 12px;
  --measure-panel: 640px;
  --scrim: color-mix(in srgb, var(--ink) 55%, transparent);
  --shadow-panel: 0 10px 30px color-mix(in srgb, var(--ink) 25%, transparent);
  /* Overlays stay below the emergency notice's own z-index (40), which is
     frozen (DENY 6): nothing may ever paint over the notice. */
  --layer-dialog: 30;
  --pad-panel: 20px;
  --text-panel-heading: 26px;
  --text-glyph: 24px;
  --danger: #a33434;
  --focus: #bcebd9;
  --active-profile-color: var(--space-forest);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  font-size: var(--text-base);
  line-height: var(--line-height-base);
}
/*
  Reading text. The app shell keeps the type the browser gave it before the
  reskin (medium, normal), so anything that inherits straight from the shell,
  the INVARIANTS 4 notice included, computes exactly as it did at HEAD. Every
  content container inside the shell takes the 18px, 1.5 reading size and the
  darker muted ink. :where() adds no specificity, so any component rule below
  still sets its own size or colour.
*/
.app-shell { font-size: medium; line-height: normal; }
:where(.login-view, .topbar, .status-line, .consent-view, .onboarding-panel, .tabs, .quick-create, .view-switch, .workflow-panel, .view-section) {
  font-size: var(--text-base);
  line-height: var(--line-height-base);
}
button, input, textarea, select { font: inherit; }
button {
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  min-height: var(--target-min);
  padding: 0 16px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}
button:active:not(:disabled) { background: var(--accent-pressed); }
button.secondary { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
button.secondary:active:not(:disabled) { background: var(--soft-hover); }
/* Destructive actions are not red: red belongs to the emergency notice alone.
   Ink text and a 2px ink border on the plain surface; the label says what happens. */
button.secondary.danger-action { background: var(--panel); color: var(--ink); border: 2px solid var(--ink); }
button.text-button { background: transparent; color: var(--accent-deep); min-height: var(--target-min); padding: 4px 0; }
button.icon-button { width: var(--target-min); padding: 0; border-radius: 50%; }
button:disabled { opacity: .55; cursor: not-allowed; }
/* Main actions: one per screen, a little taller than the 48px floor. */
#loginSubmitBtn, #saveUpdateBtn, #createSummaryBtn, #messageForm button[type="submit"], #createProfileForm button[type="submit"], #alphaSubmitBtn, #alphaReviewSaveBtn { min-height: var(--target-main); }
input, textarea, select {
  width: 100%;
  min-height: var(--target-min);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: var(--panel);
  color: var(--ink);
}
/*
  Keyboard focus: a 3px ink outline 2px outside the control, so the light
  surface behind it shows as a gap ring. Ink measures 15.6:1 on the page, and
  the gap (page or panel, 7.07:1 or 7.58:1 against a primary button) separates
  the ring from green fills. No blue anywhere. Outline and offset only, at the
  lowest specificity: any component focus rule declared below wins whole.
*/
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
textarea { resize: vertical; }
label { display: grid; gap: 7px; font-weight: 700; color: var(--text-muted); }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; }
/* Sign-in spacing is tighter than the rest of the app so that, at 18px text
   and 56px buttons, the form and its main button fit a 360x640 phone without
   scrolling (measured: button bottom 631px with the code field shown). */
.login-view {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: var(--gap-section);
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 24px;
}
.login-view .brand-block { gap: var(--gap-compact); }
.login-view .stack-form { gap: var(--gap-compact); }
.login-view label { gap: var(--gap-tight); }
.brand-block { display: grid; gap: 14px; }
.login-brand { justify-items: start; }
.brand-wordmark { width: min(430px, 100%); height: auto; display: block; }
.brand-wordmark { background: transparent; }
/* The icon PNG is transparent; no fill behind it, so it sits on the page
   without a white square. */
.brand-icon { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: transparent; }
.app-brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; }
h2 { font-size: 24px; line-height: 1.15; }
h3 { font-size: 20px; }
p { color: var(--muted); line-height: 1.45; }
:where(.login-view, .topbar, .consent-view, .onboarding-panel, .tabs, .quick-create, .view-switch, .workflow-panel, .view-section, .alpha-admin-shell) p { color: var(--text-muted); line-height: var(--line-height-base); }
.stack-form { display: grid; gap: 14px; }
/*
  INVARIANTS 10, the synthetic-data marker (#syntheticDataMarkerLogin and
  #syntheticDataMarkerApp). `color` is declared on the class because the
  `p { color: var(--text-muted) }` rule just above is the rule behind F-37 and would
  paint this at 4.4:1; --ink on --warm-soft measures 14.0:1. Warm is the
  documented tone for a caution that is not an error, so danger red stays
  reserved for the emergency notice. Static position, normal wrapping: 200%
  zoom and a 320px viewport reflow it instead of scrolling sideways. Kept here,
  away from the INVARIANTS 4 notice rules, which no marker change may touch.
*/
.synthetic-data-marker { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--warm); border-radius: 8px; background: var(--warm-soft); color: var(--ink); font-size: 18px; line-height: 1.5; min-width: 0; overflow-wrap: break-word; position: static; }
.synthetic-data-marker strong { color: var(--ink); font-weight: 700; }
.login-view .synthetic-data-marker { margin-bottom: 0; }
.main-view { max-width: 1180px; margin: 0 auto; padding: 18px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.eyebrow { color: var(--accent-deep); font-size: var(--text-small); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.mode-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  color: var(--accent-deep);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: var(--text-small);
  font-weight: 800;
}
.mode-badge.community {
  color: var(--on-accent);
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; }
.tab {
  flex: 0 0 auto;
  min-height: var(--target-min);
  background: color-mix(in srgb, var(--profile-color, var(--accent-deep)) 10%, var(--panel));
  color: var(--ink);
  display: grid;
  align-content: center;
  gap: 2px;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--accent-deep)) 35%, var(--line));
  border-left: 7px solid var(--profile-color, var(--accent-deep));
}
/* Space colours never carry white text (teal and ochre measure under 4.5:1
   with it), so the active space is a stronger tint with ink text, outlined in
   the space colour. */
.tab.active {
  background: color-mix(in srgb, var(--profile-color, var(--accent-deep)) var(--space-tint-strong), var(--panel));
  color: var(--ink);
  border-color: var(--profile-color, var(--accent-deep));
  box-shadow: inset 0 0 0 1px var(--profile-color, var(--accent-deep));
}
.tab small {
  color: inherit;
  font-size: var(--text-small);
  font-weight: 800;
}
.quick-create, .capture-band, .panel, .thread-sidebar, .thread-panel, .onboarding-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.quick-create, .onboarding-panel { padding: 12px; margin-bottom: 12px; }
.setup-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.setup-choice {
  min-height: 112px;
  height: auto;
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
}
.setup-choice strong { color: var(--accent-deep); font-size: var(--text-base); }
.setup-choice span { color: var(--text-muted); font-size: var(--text-small); line-height: 1.4; }
.mode-picker {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.mode-picker legend {
  color: var(--text-muted);
  font-weight: 800;
  margin-bottom: 7px;
}
.mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}
.mode-option input {
  width: auto;
  margin-top: 3px;
}
.mode-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--soft);
  box-shadow: 0 0 0 2px var(--accent);
}
.mode-option span { display: grid; gap: 3px; }
/* Person or pet (DECISION 2026-11-14 item 11): one-word choices, 48px rows. */
.kind-picker .mode-option { min-height: var(--target-min); align-items: center; }
.kind-picker .mode-option input { margin-top: 0; }
.mode-option small {
  color: var(--text-muted);
  font-size: var(--text-small);
  font-weight: 650;
  line-height: 1.4;
}
.mode-help {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  font-size: var(--text-small);
  font-weight: 700;
}
.view-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
/* Alpha Test is shown only on a synthetic deployment; elsewhere three buttons share the row. */
.view-switch:has(> .view-button.hidden) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.view-button {
  min-height: 64px;
  font-size: var(--text-base);
  background: var(--panel);
  color: var(--accent-deep);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px var(--shadow-soft);
}
/* White text needs forest under it; a space colour may be teal or ochre. */
.view-button.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}
.workflow-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.workflow-step {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--text-muted);
  background: var(--panel);
  font-size: var(--text-small);
  font-weight: 800;
  text-align: center;
}
.workflow-step.active {
  color: var(--on-accent);
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.workflow-message {
  color: var(--ink);
  font-weight: 700;
}
.workflow-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.workflow-actions button {
  min-height: var(--target-min);
}
.capture-band { padding: 16px; margin-bottom: 14px; display: grid; gap: 10px; border-top: 5px solid var(--active-profile-color); }
.chat-workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}
.thread-sidebar, .thread-panel { padding: 14px; min-height: 320px; }
.thread-sidebar { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; }
.thread-list { display: grid; gap: 6px; align-content: start; overflow: auto; }
.thread-tab {
  min-height: var(--target-min);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  text-align: left;
  font-weight: 750;
}
.thread-tab.active { background: var(--soft); border-color: var(--line); color: var(--accent-deep); }
.thread-tab small { color: var(--text-muted); font-size: var(--text-small); font-weight: 700; }
.thread-form { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; }
.thread-panel { display: grid; grid-template-rows: auto minmax(220px, 1fr) auto; gap: 10px; }
.message-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}
.chat-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
}
.message-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--profile-color, var(--accent-deep)) var(--space-tint-strong), var(--panel));
  border: 2px solid var(--profile-color, var(--accent-deep));
  color: var(--ink);
  font-weight: 850;
}
.message-bubble {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--accent-deep)) 28%, var(--line));
  border-left: 7px solid var(--profile-color, var(--accent-deep));
  border-radius: 8px;
  background: color-mix(in srgb, var(--profile-color, var(--accent-deep)) 8%, var(--panel));
}
.chat-message p { color: var(--ink); }
.reply-list {
  display: grid;
  gap: 6px;
  margin: 4px 0 0 18px;
  padding-left: 12px;
  border-left: 2px solid color-mix(in srgb, var(--profile-color, var(--accent-deep)) 40%, var(--line));
}
.reply-message {
  display: grid;
  gap: 3px;
  padding: 6px 0;
}
.reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 8px;
  margin-top: 6px;
}
.reply-form input { min-height: var(--target-min); padding: 9px 10px; }
.reply-form button { min-height: var(--target-min); }
.message-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-muted); font-size: var(--text-small); }
.message-meta strong { color: var(--ink); font-size: var(--text-small); }
.invite-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(170px, 1.35fr) 136px 86px;
  gap: 8px;
  align-items: end;
  margin-bottom: 4px;
}
.message-form { display: grid; gap: 8px; }
.message-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.message-send-actions { display: flex; align-items: center; gap: 8px; }
.inline-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: var(--target-min);
  color: var(--ink);
  font-weight: 700;
}
.inline-check input { width: 24px; height: 24px; min-height: 0; }
.capture-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.mic-button {
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--accent-deep);
  box-shadow: 0 8px 20px var(--shadow-mic);
}
.mic-button svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.small-mic {
  width: var(--target-min);
  height: var(--target-min);
  min-height: var(--target-min);
}
.small-mic svg { width: 21px; height: 21px; }
/* Recording is ink, not red; the status line says it is recording, so the
   pulse carries no meaning and stops under reduced motion. */
.mic-button.recording { background: var(--ink); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
  .mic-button.recording { animation: none; }
}
.status-line { min-height: 20px; color: var(--accent-deep); }

/*
  INVARIANTS 4, the emergency notice.

  Nothing in this file may hide #emergencyNotice. There is no display rule, no
  max-height, no opacity, no transform and no animation on it, and there must
  never be one: the app removes the `hidden` class to show it and no code path
  puts it back, so a stylesheet rule is the only remaining way it could be made
  to disappear. Danger red is used here for its documented purpose, an error or
  urgent state, never decoratively. #ffffff on --danger measures 6.7:1, above
  the 4.5:1 body-text floor. It sticks to the top of the shell so scrolling
  cannot leave it behind, and it wraps normally, so 200% zoom reflows it rather
  than forcing a horizontal scroll.
*/
.emergency-notice {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 0 16px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(16, 33, 29, .22);
}
.emergency-notice:focus,
.emergency-notice:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.emergency-notice-body { display: grid; gap: 10px; }
.emergency-notice-lead { font-size: 21px; font-weight: 800; line-height: 1.3; }
.emergency-notice-line { font-size: 16px; font-weight: 500; line-height: 1.5; }
.emergency-notice-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.emergency-notice-list li { font-size: 16px; font-weight: 600; line-height: 1.5; }
/* Founder DECISION 2026-11-14, "Emergency notice text made readable (DENY 6)":
   the base `p` rule painted the notice's paragraphs #5a6d67 on red (1.23:1).
   Every line is now #ffffff on --danger, as the comment above intended. This
   colour is the only change; nothing else about the notice moves. */
.emergency-notice p { color: #ffffff; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chat-grid { align-items: start; }
.panel { min-height: 180px; padding: 14px; }
.panel.wide { grid-column: 1 / -1; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.panel-note {
  font-size: var(--text-small);
  margin: -4px 0 10px;
}
.item-list { display: grid; gap: 8px; }
.item {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  padding: 10px;
  display: grid;
  gap: 6px;
  border-left: 7px solid var(--profile-color, var(--accent-deep));
}
.item.selected {
  outline: 3px solid var(--profile-color, var(--accent-deep));
  border-color: var(--profile-color, var(--accent-deep));
}
.item-title { font-weight: 750; line-height: 1.3; }
.item-meta { color: var(--text-muted); font-size: var(--text-small); display: flex; gap: 8px; flex-wrap: wrap; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.item-actions button { min-height: var(--target-min); font-size: var(--text-small); }
.badge { color: var(--accent-deep); background: var(--soft); padding: 2px 7px; border-radius: 999px; font-size: var(--text-small); font-weight: 750; }
.badge.warn { color: var(--ink); background: var(--warm-soft); }
/* Summary visibility. The two states differ by text first, then by fill weight
   (pale with dark text versus solid with light text), so the distinction never
   rests on hue alone. */
.badge.private { color: var(--ink); background: var(--soft); }
.badge.shared { color: var(--on-accent); background: var(--accent-deep); }
/* Specificity has to beat `.item-actions button` above. The share control is a
   48px touch target like every other. Focus uses the shared ink ring. */
.item-actions button.summary-share-toggle { min-height: var(--target-min); }
/* The space name chip: ink on a light tint of the space colour, edged in the
   colour itself. Never white on a space colour (teal and ochre fail 4.5:1). */
.source-pill {
  color: var(--ink);
  background: color-mix(in srgb, var(--profile-color, var(--accent-deep)) var(--space-tint), var(--panel));
  border: 1px solid var(--profile-color, var(--accent-deep));
  padding: 2px 7px;
  border-radius: 999px;
  font-size: var(--text-small);
  font-weight: 800;
}
.profile-picker-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.profile-card {
  min-height: 82px;
  height: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  color: var(--ink);
  background: color-mix(in srgb, var(--profile-color, var(--accent-deep)) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--accent-deep)) 30%, var(--line));
  border-left: 8px solid var(--profile-color, var(--accent-deep));
}
.profile-card strong { display: block; font-size: var(--text-base); }
.profile-card small { display: block; color: var(--text-muted); margin-top: 2px; font-size: var(--text-small); font-weight: 700; }
.profile-card em {
  color: var(--ink);
  font-style: normal;
  font-size: var(--text-small);
  font-weight: 850;
  white-space: nowrap;
}
.profile-symbol {
  width: 46px;
  height: 46px;
  position: relative;
  display: block;
}
.profile-symbol span {
  position: absolute;
  border: 2px solid var(--profile-color, var(--accent-deep));
  background: var(--panel);
}
.profile-symbol span::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--profile-color, var(--accent-deep));
  border-radius: 50%;
  background: var(--panel);
  left: 50%;
  top: -13px;
  transform: translateX(-50%);
}
.profile-symbol.person span:first-child {
  left: 9px;
  top: 22px;
  width: 28px;
  height: 18px;
  border-radius: 16px 16px 8px 8px;
}
.profile-symbol.person span:nth-child(2),
.profile-symbol.person span:nth-child(3) { display: none; }
.profile-symbol.group span:first-child {
  left: 13px;
  top: 20px;
  width: 22px;
  height: 17px;
  border-radius: 14px 14px 8px 8px;
  z-index: 2;
}
.profile-symbol.group span:nth-child(2) {
  left: 0;
  top: 25px;
  width: 19px;
  height: 15px;
  border-radius: 12px 12px 7px 7px;
  opacity: .8;
}
.profile-symbol.group span:nth-child(3) {
  right: 0;
  top: 25px;
  width: 19px;
  height: 15px;
  border-radius: 12px 12px 7px 7px;
  opacity: .8;
}
.profile-symbol.group span:nth-child(2)::before,
.profile-symbol.group span:nth-child(3)::before {
  width: 11px;
  height: 11px;
  top: -11px;
}
.updates-home {
  border-top: 5px solid var(--active-profile-color);
  max-height: 48vh;
  overflow: auto;
}
.updates-expanded .updates-home {
  max-height: none;
}
.empty-state {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.empty-state strong { color: var(--ink); }
.compact-form { display: grid; grid-template-columns: minmax(0, 1fr) 110px 76px; gap: 8px; margin-bottom: 10px; }
a { color: var(--accent-deep); font-weight: 750; }
.empty { color: var(--text-muted); padding: 8px 0; }
.full-input { margin-bottom: 10px; }
.summary-text {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  color: var(--ink);
  line-height: var(--line-height-base);
  max-height: 280px;
  overflow: auto;
}
.permission-review {
  color: var(--ink);
  font-weight: 700;
}
.alpha-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.alpha-intro, .alpha-work {
  min-height: auto;
}
.alpha-progress {
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 10px;
}
.alpha-scenario-list {
  display: grid;
  gap: 8px;
}
.alpha-scenario-button {
  min-height: 72px;
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 7px solid var(--line);
}
.alpha-scenario-button.active {
  border-color: var(--accent-deep);
  border-left-color: var(--accent-deep);
  background: var(--soft);
}
.alpha-scenario-button.submitted {
  border-left-color: var(--warm);
}
.alpha-scenario-button.reviewed {
  border-left-color: var(--accent-deep);
}
.alpha-scenario-button strong,
.alpha-scenario-button small {
  display: block;
}
.alpha-scenario-button small {
  color: var(--text-muted);
  margin-top: 3px;
  font-size: var(--text-small);
}
.alpha-scenario-button em {
  color: var(--accent-deep);
  font-style: normal;
  font-size: var(--text-small);
  font-weight: 850;
  white-space: nowrap;
}
.alpha-prompt {
  padding: 14px;
  margin: 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 750;
  line-height: 1.5;
}
.alpha-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.alpha-result {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.alpha-submitted {
  color: var(--ink);
  font-weight: 700;
}
.alpha-extracted-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: var(--panel);
  display: grid;
  gap: 6px;
}
.alpha-review-box {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.judgment-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.judgment-row button {
  min-height: var(--target-min);
  padding: 0 10px;
}
.judgment-row button.active {
  background: var(--accent-deep);
  color: var(--on-accent);
}
.judgment-row button.danger-action.active {
  background: var(--ink);
  color: var(--on-accent);
}
.alpha-check-grid {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.alpha-check-grid legend {
  padding: 0 6px;
  color: var(--text-muted);
  font-weight: 850;
}
.alpha-check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--target-min);
  color: var(--ink);
  font-weight: 700;
}
.alpha-check-grid input {
  width: 24px;
  height: 24px;
  min-height: 0;
}
.alpha-admin-shell {
  max-width: 1180px;
}
/*
  Renamed from `.admin-token-row` when the alpha admin page stopped collecting a
  token (DECISIONS.md 2026-09-08 item 3). The row holds two buttons and no
  input, so the one-fraction first column that used to size the token field is
  gone with it; a wrapping flex row keeps both buttons at their natural width
  and lets them fall onto two lines instead of scrolling sideways.
*/
.admin-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.secondary-link {
  min-height: var(--target-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.alpha-admin-submission p {
  color: var(--ink);
}

@media (max-width: 760px) {
  .main-view { padding: 12px; }
  .dashboard-grid, .chat-workspace, .invite-form, .workflow-steps, .setup-choice-grid, .profile-picker-list, .alpha-layout, .judgment-row, .alpha-check-grid { grid-template-columns: 1fr; }
  .view-switch,
  .view-switch:has(> .view-button.hidden) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-form { grid-template-columns: 1fr; }
  .thread-panel { grid-template-rows: auto minmax(180px, 1fr) auto; }
  .capture-actions { justify-content: stretch; }
  .capture-actions button:not(.mic-button) { flex: 1 1 160px; }
  .mic-button { flex: 0 0 56px; }
  .alpha-actions { justify-content: stretch; }
  .alpha-actions button { flex: 1 1 180px; }
  .admin-actions-row button { flex: 1 1 180px; }
}
.top-actions { display: flex; gap: 8px; align-items: center; }
.small-button { min-height: var(--target-min); padding: 0 12px; font-size: var(--text-small); }
.suggestion-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
}
.suggestion-chip {
  flex: 0 0 auto;
  min-height: var(--target-min);
  padding: 0 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-deep);
  border: 1px solid var(--line);
  font-size: var(--text-small);
  box-shadow: none;
}
.suggestion-chip:hover { background: var(--soft-hover); }

/*
  The consent screen and the withdraw control (DECISION 2026-10-22 item 1).
  Built for older adults: 18px reading text, 1.6 line height, 48px buttons
  stacked full width so each is easy to hit, and the three consent choices
  styled alike so none is pushed harder than another. Long words and names
  wrap, so 320px and 200% zoom never scroll sideways.
*/
.main-view.consent-open > :is(#onboardingPanel, #communityTabs, .quick-create, .view-switch, #workflowPanel, .view-section) { display: none !important; }
.consent-view {
  margin: 0 0 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  max-width: 720px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.consent-view h2 { margin: 6px 0 14px; font-size: 26px; line-height: 1.25; }
.consent-view h2:focus { outline: none; }
.consent-view h2:focus-visible,
#communityTitle:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-gap); }
.consent-names { margin: 0 0 16px; display: grid; gap: 10px; }
.consent-names div { min-width: 0; }
.consent-names dt { color: var(--text-muted); font-size: 16px; font-weight: 700; }
.consent-names dd { margin: 2px 0 0; color: var(--ink); font-size: 20px; font-weight: 800; }
.consent-text { color: var(--ink); font-size: 18px; line-height: 1.6; }
.consent-text p { margin: 0 0 14px; color: var(--ink); line-height: 1.6; white-space: pre-line; }
.consent-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 18px; max-width: 420px; }
button.consent-choice {
  width: 100%;
  min-height: var(--target-min);
  padding: 10px 16px;
  font-size: var(--text-base);
  line-height: 1.3;
  background: var(--soft);
  color: var(--ink);
  border: 2px solid var(--accent-deep);
  white-space: normal;
  overflow-wrap: anywhere;
}
button.consent-choice.danger-action { background: var(--panel); color: var(--ink); border-color: var(--ink); }
.consent-status { font-size: 18px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.consent-status:empty { min-height: 0; margin: 0; }
.consent-withdraw { min-height: 0; }
.consent-note { color: var(--ink); font-size: 18px; line-height: 1.5; margin: 0 0 12px; }
.consent-question { color: var(--ink); font-size: 20px; font-weight: 800; margin: 16px 0 8px; }
.consent-confirm { margin-top: 4px; }
.consent-withdraw > div > .consent-choice,
.consent-withdraw > .consent-choice { max-width: 420px; }
@media (max-width: 760px) {
  .consent-view { padding: 14px; }
  /* At 18px the brand and the account buttons no longer share one line on a
     phone; wrapping keeps the brand name whole instead of clipping it. */
  .topbar { flex-wrap: wrap; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
}
/* "Your spaces" at the top of Messages: the profile card, compact. */
.message-spaces-panel { min-height: 0; }
.message-spaces-list { gap: 8px; }
.message-spaces-list .profile-card { min-height: 56px; padding: 8px 12px; }
.message-spaces-list .profile-card strong { font-size: var(--text-base); overflow-wrap: anywhere; }
.message-spaces-list .profile-card small { overflow-wrap: anywhere; }
.message-spaces-list .profile-card em { color: var(--ink); }
.message-spaces-list .profile-card[aria-current="true"] { border-width: 2px; border-left-width: 8px; border-color: var(--profile-color, var(--accent-deep)); }

/*
  The Open Needs panel after sign-in (founder DECISION 2026-11-14). A modal
  layer over the app, below the emergency notice (--layer-dialog under the
  notice's 40), so the notice can never be covered. 18px reading text, ink on
  white (15.6:1), the note in --text-muted, Close and Go to Messages at least
  48px. The layer scrolls on its own, so a long list or 200% zoom never makes
  the page scroll sideways. No animation.
*/
.needs-layer {
  position: fixed;
  inset: 0;
  z-index: var(--layer-dialog);
  display: grid;
  justify-items: center;
  align-items: start;
  /* Side padding only: sticky parts stick to the layer's padding edge, so
     vertical padding here would let items show above Close and below Go to
     Messages. The panel's own margin gives the space instead. */
  padding: 0 var(--gap-compact);
  background: var(--scrim);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.needs-panel {
  width: min(var(--measure-panel), 100%);
  min-width: 0;
  margin: var(--gap-section) 0;
  padding: 0 var(--pad-panel);
  border-radius: var(--radius-panel);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-panel);
  font-size: var(--text-base);
  line-height: var(--line-height-base);
  overflow-wrap: anywhere;
}
/* Close and Go to Messages stay on screen while a long list scrolls inside
   the layer: the head sticks to the top, the action bar to the bottom. */
.needs-panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap-compact) var(--gap-section);
  margin-bottom: var(--gap-compact);
  padding: var(--pad-panel) 0 var(--gap-compact);
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  background: var(--panel);
}
.needs-panel h2 { font-size: var(--text-panel-heading); line-height: 1.25; color: var(--ink); }
.needs-panel h2:focus { outline: none; }
.needs-panel h2:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-gap); }
button.needs-panel-close { min-height: var(--target-min); min-width: var(--target-min); padding: 0 var(--gap-section); font-size: var(--text-base); }
.needs-panel-close span { font-size: var(--text-glyph); line-height: 1; margin-left: var(--gap-tight); }
.needs-panel p { color: var(--text-muted); line-height: var(--line-height-base); }
.needs-panel-note { font-size: var(--text-base); margin-bottom: var(--gap-section); }
.needs-panel .item-title { color: var(--ink); }
.needs-panel-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: grid;
  margin-top: var(--gap-section);
  padding: var(--gap-compact) 0 var(--pad-panel);
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.needs-panel-actions button { min-height: var(--target-main); font-size: var(--text-base); }
/* Care Communities waiting for this member's answer (DECISION 2026-11-14
   item 7): the same name-only card as Messages, listed above the needs. */
.needs-panel-pending { margin-bottom: var(--gap-section); }
.needs-panel-subhead { margin-bottom: var(--gap-compact); font-size: var(--text-base); line-height: var(--line-height-base); color: var(--ink); }
.needs-panel-pending-list { display: grid; gap: var(--gap-compact); }
.needs-panel-pending-list .profile-card { min-height: var(--target-main); }
.needs-panel-pending-list .profile-card strong,
.needs-panel-pending-list .profile-card small { overflow-wrap: anywhere; }
#openNeedsShowBtn { margin-bottom: var(--gap-compact); }
@media (prefers-contrast: more) {
  .needs-panel { border: 2px solid var(--ink); }
  .needs-layer { background: color-mix(in srgb, var(--ink) 80%, transparent); }
}

/*
  Your account and privacy, deleting an account, the closed-account screen and
  the Terms and Privacy Policy screen (DECISION 2026-11-15). They reuse the
  consent screen's plain page: 18px text, 48px targets, buttons stacked the
  same width. The links are 48px targets too, underlined so they never rely on
  colour. Nothing here is red: red belongs to the emergency notice alone.
*/
.legal-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}
.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  font-size: var(--text-base);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.consent-view .legal-links { margin: 4px 0; }
.standalone-view { margin: 24px auto; }
.account-panel h2, .account-flow h2 { margin: 0 0 12px; }
.account-panel h2:focus, .account-flow h2:focus { outline: none; }
.account-panel h2:focus-visible, .account-flow h2:focus-visible,
.standalone-view h2:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-gap); }
.main-view.account-flow-open > :is(#onboardingPanel, #communityTabs, .quick-create, .view-switch, #workflowPanel, .view-section, #consentView) { display: none !important; }
/* The two posts choices: one grid row height for both, so neither looks
   smaller or lesser, side by side or stacked. */
.delete-posts-choice {
  border: 0;
  padding: 0;
  margin: 18px 0 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
}
.delete-posts-choice legend { color: var(--ink); font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.delete-posts-choice .mode-option { min-height: var(--target-min); }
.delete-posts-choice .mode-option strong { font-size: var(--text-base); }
.action-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: -4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-closed-note {
  margin: 0;
  padding: 10px 12px;
  border: 2px solid var(--accent-deep);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
}
@media (max-width: 560px) {
  .delete-posts-choice { grid-template-columns: minmax(0, 1fr); }
}
