/* ===========================
   TOVUTI.ONLINE - STYLE.CSS
   Money Persona Quiz. Four layers, in order:
   1. Colour tokens: Pochi teal + orange, light and dark (follows the system theme).
   2. Base: shell, buttons, fields, alerts, modal.
   3. Design layer: Inter + Poppins type scale, 4px spacing grid, 4px radius.
   4. Site: quiz-specific components (pochi-*).
   Colours come from tokens only.
   =========================== */

/* ─────────── 1. Colour tokens ─────────── */
/* Pochi Buddy palette (teal + orange from site/style.css) on the JA token names.
   Generated from JA colour + base tokens, bundled so the skill works outside the JobApplier repo.
   Source of truth: frontend/src/styles/theme-tokens.css (whole file) and the first
   :root block of frontend/src/styles.css. Inside the JA repo the audit warns when
   this copy has drifted from those files; refresh it with
   `python3 scripts/sync_tokens.py`. To use another palette in another project,
   pass `--tokens your-tokens.css` to inline_styles.py (same token names). */

/* Semantic tokens — Arsha-inspired cyan + navy (light default), dark via [data-theme="dark"] */

:root {
  color-scheme: light;

  /* Responsive contract */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;

  /* Arsha brand */
  --heading-color: #10201d;
  --arsha-navy: #134e4a;
  --arsha-navy-deep: #115e59;
  --arsha-accent: #14b8a6;
  --arsha-light-bg: #f7fbfa;
  --contrast-color: #ffffff;

  --bg-primary: #f7fbfa;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.98);
  --bg-card-solid: #ffffff;
  --bg-card-hover: #eef7f5;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-panel: rgba(15, 118, 110, 0.06);
  --bg-modal-overlay: rgba(16, 32, 29, 0.5);
  --bg-hero: #0f766e;
  --bg-hero-soft: #115e59;

  /* Borders recede. Every card, input and secondary button used to be outlined
     in brand cyan at 35%, which read as decoration competing with content.
     Structure is a neutral hairline now; cyan is reserved for focus, where a
     visible ring is the whole point. */
  --border-primary: rgba(16, 32, 29, 0.14);
  --border-hover: rgba(16, 32, 29, 0.24);
  --border-focus: rgba(20, 184, 166, 0.75);
  --border-subtle: rgba(16, 32, 29, 0.09);

  --text-primary: #10201d;
  --text-secondary: #4d605c;
  --text-muted: #60726f;
  /* #2f9bc8 scored 3.16:1 on white — below the 4.5:1 floor for body text. Same
     hue (199deg) and saturation, darker: 5.41:1. */
  --text-accent: #0f766e;
  --text-on-hero: #ffffff;
  --text-heading: #10201d;

  /* Primary actions carry white text, so the fill has to earn it. #47b2e4
     scored 2.40:1 — barely legible, and the most-tapped control in the app.
     #17719c is the same brand hue, darkened to 5.41:1. --arsha-accent keeps the
     original cyan for tints, glows and focus rings, so the brand is intact. */
  --accent-primary: #0f766e;
  --accent-hover: #115e59;
  --accent-secondary: #134e4a;
  --accent-on-primary: #ffffff;
  --accent-gradient: linear-gradient(135deg, #14b8a6, #0f766e);

  --shadow-sm: 0 1px 2px rgba(16, 32, 29, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 32, 29, 0.1);
  --shadow-lg: 0 8px 24px rgba(16, 32, 29, 0.14);
  --shadow-glow: 0 0 20px rgba(20, 184, 166, 0.15);

  --color-eyebrow: #c2410c;
  --color-fit-high: #15803d;
  --bg-fit-high: #dcfce7;
  --border-fit-high: rgba(34, 197, 94, 0.3);
  --color-fit-medium: #b45309;
  --bg-fit-medium: #fef3c7;
  --border-fit-medium: rgba(245, 158, 11, 0.3);
  --color-fit-low: #b91c1c;
  --bg-fit-low: #fee2e2;
  --border-fit-low: rgba(239, 68, 68, 0.3);
  --color-lead-signal: #1d4ed8;
  --bg-lead-signal: #dbeafe;
  --border-lead-signal: rgba(59, 130, 246, 0.2);
  --color-keyword: #c2410c;
  --bg-keyword: rgba(249, 115, 22, 0.1);
}

[data-theme="light"] {
  color-scheme: light;
  --heading-color: #10201d;
  --arsha-navy: #134e4a;
  --arsha-navy-deep: #115e59;
  --arsha-accent: #14b8a6;
  --arsha-light-bg: #f7fbfa;
  --contrast-color: #ffffff;
  --bg-primary: #f7fbfa;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.98);
  --bg-card-solid: #ffffff;
  --bg-card-hover: #eef7f5;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-panel: rgba(15, 118, 110, 0.06);
  --bg-modal-overlay: rgba(16, 32, 29, 0.5);
  --bg-hero: #0f766e;
  --bg-hero-soft: #115e59;
  --border-primary: rgba(16, 32, 29, 0.14);
  --border-hover: rgba(16, 32, 29, 0.24);
  --border-focus: rgba(20, 184, 166, 0.75);
  --border-subtle: rgba(16, 32, 29, 0.09);
  --text-primary: #10201d;
  --text-secondary: #4d605c;
  --text-muted: #60726f;
  --text-accent: #0f766e;
  --text-on-hero: #ffffff;
  --text-heading: #10201d;
  --accent-primary: #0f766e;
  --accent-hover: #115e59;
  --accent-on-primary: #ffffff;
  --accent-secondary: #134e4a;
  --accent-gradient: linear-gradient(135deg, #14b8a6, #0f766e);
  --shadow-sm: 0 1px 2px rgba(16, 32, 29, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 32, 29, 0.1);
  --shadow-lg: 0 8px 24px rgba(16, 32, 29, 0.14);
  --shadow-glow: 0 0 20px rgba(20, 184, 166, 0.15);
  --color-eyebrow: #c2410c;
  --color-fit-high: #15803d;
  --bg-fit-high: #dcfce7;
  --border-fit-high: rgba(34, 197, 94, 0.3);
  --color-fit-medium: #b45309;
  --bg-fit-medium: #fef3c7;
  --border-fit-medium: rgba(245, 158, 11, 0.3);
  --color-fit-low: #b91c1c;
  --bg-fit-low: #fee2e2;
  --border-fit-low: rgba(239, 68, 68, 0.3);
  --color-lead-signal: #1d4ed8;
  --bg-lead-signal: #dbeafe;
  --border-lead-signal: rgba(59, 130, 246, 0.2);
  --color-keyword: #c2410c;
  --bg-keyword: rgba(249, 115, 22, 0.1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --heading-color: #eef7f5;
  --arsha-navy: #134e4a;
  --arsha-navy-deep: #0f2e2a;
  --arsha-accent: #2dd4bf;
  --arsha-light-bg: #0b1614;
  --contrast-color: #ffffff;
  --bg-primary: #0b1614;
  --bg-secondary: #11211e;
  --bg-card: rgba(17, 33, 30, 0.92);
  --bg-card-solid: #11211e;
  --bg-card-hover: rgba(24, 48, 43, 0.95);
  --bg-elevated: #183029;
  --bg-input: #0b1614;
  --bg-sidebar: #0e1b19;
  --bg-panel: rgba(45, 212, 191, 0.07);
  --bg-modal-overlay: rgba(3, 8, 7, 0.8);
  --bg-hero: #134e4a;
  --bg-hero-soft: #115e59;
  --border-primary: rgba(148, 184, 176, 0.2);
  --border-hover: rgba(148, 184, 176, 0.32);
  --border-focus: rgba(45, 212, 191, 0.7);
  --border-subtle: rgba(148, 184, 176, 0.11);
  --text-primary: #e2efec;
  --text-secondary: #a3b8b3;
  --text-muted: #7a8f8a;
  --text-accent: #5eead4;
  --text-on-hero: #ffffff;
  --text-heading: #eef7f5;
  /* On dark the accent is light, so white text on it scored 2.06:1 — worse than
     light mode. The fill stays bright and the label goes dark: 9.23:1. */
  --accent-primary: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-secondary: #99d6cc;
  --accent-on-primary: #06201c;
  --accent-gradient: linear-gradient(135deg, #2dd4bf, #0f766e);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(45, 212, 191, 0.12);
  --color-eyebrow: #fdba74;
  --color-fit-high: #9ff0b7;
  --bg-fit-high: rgba(34, 197, 94, 0.14);
  --border-fit-high: rgba(34, 197, 94, 0.28);
  --color-fit-medium: #ffd58a;
  --bg-fit-medium: rgba(245, 158, 11, 0.14);
  --border-fit-medium: rgba(245, 158, 11, 0.28);
  --color-fit-low: #f5a3a3;
  --bg-fit-low: rgba(239, 68, 68, 0.14);
  --border-fit-low: rgba(239, 68, 68, 0.28);
  --color-lead-signal: #a9d0ff;
  --bg-lead-signal: rgba(59, 130, 246, 0.1);
  --border-lead-signal: rgba(59, 130, 246, 0.15);
  --color-keyword: #fdba74;
  --bg-keyword: rgba(249, 115, 22, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --heading-color: #eef7f5;
    --arsha-navy: #134e4a;
    --arsha-navy-deep: #0f2e2a;
    --arsha-accent: #2dd4bf;
    --arsha-light-bg: #0b1614;
    --contrast-color: #ffffff;
    --bg-primary: #0b1614;
    --bg-secondary: #11211e;
    --bg-card: rgba(17, 33, 30, 0.92);
    --bg-card-solid: #11211e;
    --bg-card-hover: rgba(24, 48, 43, 0.95);
    --bg-elevated: #183029;
    --bg-input: #0b1614;
    --bg-sidebar: #0e1b19;
    --bg-panel: rgba(45, 212, 191, 0.07);
    --bg-modal-overlay: rgba(3, 8, 7, 0.8);
    --bg-hero: #134e4a;
    --bg-hero-soft: #115e59;
    --border-primary: rgba(148, 184, 176, 0.2);
    --border-hover: rgba(148, 184, 176, 0.32);
    --border-focus: rgba(45, 212, 191, 0.7);
    --border-subtle: rgba(148, 184, 176, 0.11);
    --text-primary: #e2efec;
    --text-secondary: #a3b8b3;
    --text-muted: #7a8f8a;
    --text-accent: #5eead4;
    --text-on-hero: #ffffff;
    --text-heading: #eef7f5;
    --accent-primary: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-on-primary: #06201c;
    --accent-secondary: #99d6cc;
    --accent-gradient: linear-gradient(135deg, #2dd4bf, #0f766e);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(45, 212, 191, 0.12);
    --color-eyebrow: #fdba74;
    --color-fit-high: #9ff0b7;
    --bg-fit-high: rgba(34, 197, 94, 0.14);
    --border-fit-high: rgba(34, 197, 94, 0.28);
    --color-fit-medium: #ffd58a;
    --bg-fit-medium: rgba(245, 158, 11, 0.14);
    --border-fit-medium: rgba(245, 158, 11, 0.28);
    --color-fit-low: #f5a3a3;
    --bg-fit-low: rgba(239, 68, 68, 0.14);
    --border-fit-low: rgba(239, 68, 68, 0.28);
    --color-lead-signal: #a9d0ff;
    --bg-lead-signal: rgba(59, 130, 246, 0.1);
    --border-lead-signal: rgba(59, 130, 246, 0.15);
    --color-keyword: #fdba74;
    --bg-keyword: rgba(249, 115, 22, 0.16);
  }
}

/* ── from frontend/src/styles.css ── */
:root {
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --status-saved: #64748b;
  --status-applied: #3b82f6;
  --status-screening: #a855f7;
  --status-interview: #f59e0b;
  --status-offer: #22c55e;
  --status-accepted: #10b981;
  --status-rejected: #ef4444;
  --status-withdrawn: #6b7280;

  --priority-low: #64748b;
  --priority-medium: #f59e0b;
  --priority-high: #ef4444;

  --automation-idle: #64748b;
  --automation-queued: #3b82f6;
  --automation-preparing: #8b5cf6;
  --automation-running: #f59e0b;
  --automation-waiting_otp: #ec4899;
  --automation-submitted: #22c55e;
  --automation-manual_required: #f59e0b;
  --automation-failed: #ef4444;
  --automation-cancelled: #6b7280;

  --font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Jost", "Open Sans", system-ui, sans-serif;
  --font-nav: "Poppins", "Open Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-size-caption: 0.75rem;
  --font-size-label: 0.78rem;
  --font-size-small: 0.8125rem;
  --font-size-ui: 0.875rem;
  --font-size-body: 0.9375rem;
  --font-size-title: 1rem;
  --font-size-section-title: 1.25rem;
  --font-size-page-title: 1.75rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-full: 9999px;
  --radius-pill: 50px;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --sidebar-width: 260px;
  --touch-min: 44px;
  --page-pad: 1rem;
  --content-max: 1200px;
}


/* ─────────── 2. Base ─────────── */
/* ═══════════════════════════════════════════════════════════════════════════
   Standalone base — the minimum the JA product CSS normally provides, for
   projects that are not the JobApplier repo. Loaded after ja-tokens.css and
   before ja-moyo.css (which supplies Moyo type, spacing, radius and component
   anatomy). Class names match the JA product so one vocabulary works in both
   modes. Colour: tokens only.
   ═══════════════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
/* The hidden attribute must win over any display rule below (empty states,
   alerts and modals all set display). */
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Icons ─────────────────────────────────────────────────────────────── */
.icon,
.nav-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}
.icon--sm {
  width: 16px;
  height: 16px;
}

/* ── App shell: phone header + bottom nav; sidebar from 1024px ─────────── */
.layout {
  min-height: 100vh;
}
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: calc(60px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-header-logo,
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mobile-header-logo {
  flex: 1;
}
.mobile-header-logo h2,
.sidebar-logo h2 {
  font-size: 18px;
  color: var(--text-heading);
  white-space: nowrap;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: var(--contrast-color);
  font: 700 13px/1 var(--font-heading);
}
.sidebar-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: var(--contrast-color);
  font-weight: 700;
}
.mobile-user-trigger {
  border: none;
  background: none;
  cursor: pointer;
}
.sidebar {
  display: none;
}
.main {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  padding: calc(60px + env(safe-area-inset-top) + 16px) var(--page-pad)
    calc(76px + env(safe-area-inset-bottom));
}
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-around;
  min-height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-subtle);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 64px;
  min-height: var(--touch-min);
  font-size: 12px;
  color: var(--text-muted);
}
.bottom-nav-item.active {
  color: var(--text-accent);
}
@media (min-width: 1024px) {
  .mobile-header,
  .bottom-nav {
    display: none;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: var(--sidebar-width);
    padding: 24px 16px;
    overflow-y: auto;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
  }
  .sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--touch-min);
    padding: 0 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
  }
  .sidebar nav a:hover {
    background: var(--bg-panel);
  }
  .sidebar nav a.active {
    background: var(--bg-panel);
    color: var(--text-accent);
    font-weight: 600;
  }
  .main {
    margin-left: var(--sidebar-width);
    width: auto;
    max-width: calc(var(--content-max) + var(--sidebar-width));
    padding: 32px var(--page-pad);
  }
}

/* ── Page header ───────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.eyebrow {
  display: block;
  color: var(--color-eyebrow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Buttons (Moyo anatomy comes from ja-moyo.css) ─────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent-primary);
  color: var(--accent-on-primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.btn-danger {
  background: var(--bg-fit-low);
  color: var(--color-fit-low);
  border-color: var(--border-fit-low);
}

/* ── Surfaces ──────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card-solid);
  min-width: 0;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.badge {
  background: var(--bg-panel);
  color: var(--text-secondary);
}
.tabs {
  display: flex;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border: none;
  background: none;
  cursor: pointer;
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.form-row {
  display: grid;
  gap: 16px;
}
@media (min-width: 768px) {
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.input,
.select,
textarea {
  width: 100%;
  min-width: 0;
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--touch-min);
}

/* ── Feedback ──────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  font-size: 14px;
}
.alert-success {
  background: var(--bg-fit-high);
  border-color: var(--border-fit-high);
  color: var(--color-fit-high);
}
.alert-warning {
  background: var(--bg-fit-medium);
  border-color: var(--border-fit-medium);
  color: var(--color-fit-medium);
}
.alert-error {
  background: var(--bg-fit-low);
  border-color: var(--border-fit-low);
  color: var(--color-fit-low);
}
.alert-info {
  background: var(--bg-lead-signal);
  border-color: var(--border-lead-signal);
  color: var(--color-lead-signal);
}
.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 16px;
  text-align: center;
  color: var(--text-secondary);
}
.empty-state-icon {
  color: var(--text-muted);
}
.empty-state-text {
  font-weight: 600;
  color: var(--text-primary);
}
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-primary);
  border-top-color: var(--accent-primary);
  border-radius: var(--radius-full);
  animation: ja-spin 0.8s linear infinite;
}
@keyframes ja-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Modal: bottom sheet on a phone, centred dialog from 640px ─────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--bg-modal-overlay);
}
.modal-overlay[hidden] {
  display: none;
}
.modal {
  width: 100%;
  max-height: calc(100dvh - 12px);
  overflow-y: auto;
  padding: 16px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--bg-card-solid);
  box-shadow: var(--shadow-lg);
}
.modal-title {
  margin-bottom: 16px;
}
@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
  .modal {
    width: min(100%, 560px);
    padding: 24px;
    border-radius: var(--radius-lg);
  }
}


/* ─────────── 3. Design layer ─────────── */
/* ═══════════════════════════════════════════════════════════════════════════
   JA × Moyo design layer — loaded AFTER the product CSS by inline_styles.py.

   What it adopts from Moyo: typography (Inter + Poppins, the Moyo text-style
   scale), the 4px spacing grid, the radius scale, and component anatomy
   (buttons, fields, status labels, tabs, content box, key-value, metric card,
   button toggle, snackbar, tooltip, sticky footer, table, list).

   What it does NOT adopt: Moyo colour. Every colour here is a JA token from
   styles/theme-tokens.css (or color-mix over one), so light, dark and
   system themes keep working and the brand stays JA's. No hex, no rgb().

   Mobile first: base rules are the phone; min-width queries add desktop.
   Touch targets stay >= --touch-min (44px) even where Moyo desktop is smaller.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Type (Moyo named text styles) ─────────────────────────────────────── */
  --font-family:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Poppins", "Inter", system-ui, sans-serif;
  --font-nav: "Inter", system-ui, sans-serif;

  --type-title-1: 600 24px/32px var(--font-heading); /* page title */
  --type-title-2: 600 20px/28px var(--font-heading); /* section title */
  --type-title-3: 600 18px/26px var(--font-heading); /* sub-section title */
  --type-subtitle-1: 700 16px/24px var(--font-family); /* emphasised label */
  --type-subtitle-2: 700 14px/22px var(--font-family); /* field label, table head */
  --type-body-1: 400 16px/24px var(--font-family); /* main text */
  --type-body-2: 400 14px/22px var(--font-family); /* secondary text */
  --type-body-3: 400 12px/18px var(--font-family); /* captions, meta */
  --type-label: 600 14px/22px var(--font-family); /* form label */
  --type-button: 600 16px/24px var(--font-family); /* buttons, tabs */
  --type-status: 600 12px/16px var(--font-family); /* status label, uppercase */

  /* The product's own size tokens, re-pointed at the Moyo scale so every
     component that reads them follows without a per-rule override. */
  --font-size-caption: 12px;
  --font-size-label: 12px;
  --font-size-small: 12px;
  --font-size-ui: 14px;
  --font-size-body: 16px;
  --font-size-title: 16px;
  --font-size-section-title: 20px;
  --font-size-page-title: 24px;

  /* ── Spacing (Moyo 3. Spacing, names kept) ─────────────────────────────── */
  --spacing-0125: 2px;
  --spacing-025: 4px;
  --spacing-0375: 6px;
  --spacing-05: 8px;
  --spacing-075: 12px;
  --spacing-1: 16px;
  --spacing-125: 20px;
  --spacing-15: 24px;
  --spacing-2: 32px;
  --spacing-25: 40px;
  --spacing-3: 48px;
  --spacing-4: 64px;

  /* ── Radius (Moyo 4. Radius) — product radius tokens re-pointed ─────────── */
  --radius-025: 4px;
  --radius-05: 8px;
  --radius-sm: 4px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 8px;

  /* ── Elevation: Moyo elev1/elev2 roles on JA's themed shadows ──────────── */
  --elev-1: var(--shadow-sm);
  --elev-2: var(--shadow-md);

  /* Tint used by Moyo for hover / selected (primary100 role). */
  --accent-tint: color-mix(in srgb, var(--accent-primary) 10%, transparent);

  --page-pad: 16px;
}

@media (min-width: 1024px) {
  :root {
    --page-pad: 40px; /* Moyo desktop page gutter */
  }
}

body {
  font: var(--type-body-1);
}

h1,
.page-header h1,
.search-page-heading h1,
.detail-header-left h1 {
  font: var(--type-title-1);
  letter-spacing: 0;
}
h2 {
  font: var(--type-title-2);
}
h3 {
  font: var(--type-title-3);
}
.page-subtitle {
  font: var(--type-body-2);
  color: var(--text-secondary);
}

/* ═══ Buttons — Moyo Basic button (Primary / Secondary / Tertiary) ═════════ */

.btn {
  height: auto;
  min-height: 48px; /* 1px border + 11px + 24px line + 11px + 1px border */
  padding: 11px 24px;
  gap: 12px;
  border-radius: var(--radius-025);
  font: var(--type-button);
  letter-spacing: 0;
}
.btn-primary {
  box-shadow: var(--elev-1);
  font-family: var(--font-family);
}
.btn-secondary {
  background: var(--bg-card-solid);
  color: var(--text-accent);
  border: 2px solid var(--accent-primary);
  box-shadow: var(--elev-1);
  padding: 10px 22px; /* 2px border keeps the 48px box */
}
.btn-secondary:hover {
  background: var(--accent-tint);
  color: var(--text-accent);
  border-color: var(--accent-primary);
  transform: none;
}
/* Tertiary: Moyo's low-emphasis text button. .btn-ghost is its JA name. */
.btn-ghost,
.btn-tertiary {
  background: transparent;
  color: var(--text-accent);
  border: 1px solid transparent;
  box-shadow: none;
}
.btn-ghost:hover,
.btn-tertiary:hover {
  background: var(--accent-tint);
  color: var(--text-accent);
  border-color: transparent;
}
/* Small: Moyo desktop has none; on a phone it still meets --touch-min. */
.btn-sm {
  min-height: var(--touch-min);
  height: auto;
  padding: 8px 16px;
  font: 600 14px/22px var(--font-family);
  border-radius: var(--radius-025);
}
.btn-secondary.btn-sm {
  padding: 6px 14px;
}
/* Product pills that Moyo squares off (and lifts to the touch floor). */
.search-lead-footer .btn {
  border-radius: var(--radius-025);
  min-height: var(--touch-min);
}
.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
/* Full-width primary on a phone: the thumb's target. */
.btn-block {
  width: 100%;
}
@media (min-width: 768px) {
  .btn-block {
    width: auto;
  }
}

/* Icon button — Moyo Icon button, Tertiary. 44px on phone (Moyo Large is 40). */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:hover,
.icon-btn:focus-visible {
  background: var(--accent-tint);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.icon-btn .icon {
  width: 24px;
  height: 24px;
}

/* Button toggle — Moyo segmented control. Phone: full width, equal segments. */
.btn-toggle {
  display: flex;
  width: 100%;
  border: 1px solid var(--text-secondary);
  border-radius: var(--radius-025);
  overflow: hidden;
}
.btn-toggle button {
  flex: 1 1 0;
  min-height: var(--touch-min);
  padding: 10px 16px;
  border: none;
  border-right: 1px solid var(--text-secondary);
  background: transparent;
  color: var(--text-primary);
  font: var(--type-button);
  font-size: 14px;
  cursor: pointer;
}
.btn-toggle button:last-child {
  border-right: none;
}
.btn-toggle button.is-active,
.btn-toggle button[aria-pressed="true"] {
  background: var(--arsha-navy); /* Moyo nav-navy role → JA navy */
  color: var(--contrast-color);
}
.btn-toggle button:hover:not(.is-active):not([aria-pressed="true"]) {
  background: var(--bg-panel);
}
@media (min-width: 768px) {
  .btn-toggle {
    display: inline-flex;
    width: auto;
  }
  .btn-toggle button {
    flex: 0 0 auto;
    padding: 12px 24px;
    font-size: 16px;
  }
}

/* ═══ Fields — native inputs restyled + Moyo material floating label ═══════ */

.input,
.select,
textarea {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--text-secondary);
  border-radius: var(--radius-025);
  font: var(--type-body-1); /* 16px: iOS does not zoom a 16px field */
}
.input:focus,
.select:focus,
textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary); /* reads as Moyo's 2px focus */
}
.form-label {
  font: var(--type-label);
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
}
.form-hint,
.field-helper {
  font: var(--type-body-3);
  color: var(--text-secondary);
  margin-top: 4px;
}
.form-error {
  font: var(--type-body-3);
  color: var(--color-fit-low);
}

/* Material text field / text area. Markup: wrapper > input[placeholder=" "] + label
   (label AFTER the control — the ~ selector only matches forward). */
.field-input {
  position: relative;
  width: 100%;
}
.field-input > input,
.field-input > textarea,
.field-input > select {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--text-secondary);
  border-radius: var(--radius-025);
  background: var(--bg-input);
  color: var(--text-primary);
  font: var(--type-body-1);
  outline: none;
}
.field-input > textarea {
  min-height: 120px;
  resize: vertical;
  cursor: text;
}
.field-input > input:focus,
.field-input > textarea:focus,
.field-input > select:focus {
  border-color: var(--accent-primary);
  border-width: 2px;
  padding: 11px 15px;
}
.field-input > label {
  position: absolute;
  left: 12px;
  top: 25px;
  transform: translateY(-50%);
  padding: 0 4px;
  background: var(--bg-input);
  color: var(--text-secondary);
  font: var(--type-body-1);
  pointer-events: none;
  transition:
    top 120ms ease,
    font-size 120ms ease,
    line-height 120ms ease,
    color 120ms ease;
}
.field-input > :focus ~ label,
.field-input > input:not(:placeholder-shown) ~ label,
.field-input > textarea:not(:placeholder-shown) ~ label,
.field-input > select ~ label {
  top: 0;
  font-size: 12px;
  line-height: 16px;
}
.field-input > :focus ~ label {
  color: var(--text-accent);
}
.field-input.has-error > input,
.field-input.has-error > textarea {
  border-color: var(--color-fit-low);
}
.field-input.has-error > label {
  color: var(--color-fit-low);
}

/* ═══ Status label — Moyo anatomy on the product's badge + fit chip ═══════ */

.badge,
.fit-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-025);
  font: var(--type-status);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.fit-chip .fit-chip-value {
  font: inherit;
}
.fit-chip .fit-chip-unit {
  font: inherit;
  opacity: 0.75;
}
/* Moyo status roles → JA semantic tokens (both themes). */
.status-chip--positive {
  background: var(--bg-fit-high);
  color: var(--color-fit-high);
}
.status-chip--warning {
  background: var(--bg-fit-medium);
  color: var(--color-fit-medium);
}
.status-chip--critical {
  background: var(--bg-fit-low);
  color: var(--color-fit-low);
}
.status-chip--task,
.status-chip--info {
  background: var(--bg-lead-signal);
  color: var(--color-lead-signal);
}
.status-chip--special {
  background: var(--bg-keyword);
  color: var(--color-keyword);
}
.status-chip--inactive {
  background: var(--bg-panel);
  color: var(--text-secondary);
}

/* ═══ Surfaces ════════════════════════════════════════════════════════════ */

/* Moyo separates cards with 1px borders, not shadow or page contrast. */
.card {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-025);
  box-shadow: none;
  padding: 16px;
}
@media (min-width: 768px) {
  .card {
    padding: 24px;
  }
}
.card-title {
  font: var(--type-subtitle-1);
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
}

/* Content box — key-value sections. Phone: one column; ≥768: columns. */
.content-box {
  position: relative;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-025);
}
.content-box__columns {
  display: flex;
  flex-direction: column;
}
.content-box__col {
  padding: 16px;
  min-width: 0;
}
.content-box__col + .content-box__col {
  border-top: 1px solid var(--border-subtle);
}
.content-box__footer {
  padding: 0 16px 16px;
  font: var(--type-body-3);
  color: var(--text-muted);
}
.content-box__action {
  position: absolute;
  top: 4px;
  right: 4px;
}
@media (min-width: 768px) {
  .content-box__columns {
    flex-direction: row;
  }
  .content-box__col {
    flex: 1;
    padding: 24px;
  }
  .content-box__col + .content-box__col {
    border-top: none;
  }
  .content-box__footer {
    padding: 0 24px 16px;
  }
}
.kv-nugget {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kv-nugget + .kv-nugget {
  margin-top: 16px;
}
@media (min-width: 768px) {
  .kv-nugget + .kv-nugget {
    margin-top: 24px;
  }
}
.kv-nugget__label {
  font: var(--type-subtitle-2);
  color: var(--text-secondary);
}
.kv-nugget__value {
  font: var(--type-body-1);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.kv-nugget__link {
  font: var(--type-body-1);
  font-weight: 500;
  color: var(--text-accent);
}
/* Key-value pair — label heavier than value, by design. */
.kv-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kv-pair__label {
  font: var(--type-subtitle-2);
  color: var(--text-primary);
}
.kv-pair__value {
  font: var(--type-body-1);
  color: var(--text-secondary);
}

/* Metric card — two per row on a phone, fluid grid above. */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 768px) {
  .metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
  }
}
.metric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-025);
  min-width: 0;
}
.metric-card__label {
  font: 600 14px/20px var(--font-family);
  color: var(--text-muted);
}
.metric-card__value {
  font: 600 24px/32px var(--font-family);
  color: var(--text-primary);
}
@media (min-width: 768px) {
  .metric-card {
    padding: 20px;
  }
  .metric-card__value {
    font: 600 30px/38px var(--font-family);
  }
}

/* ═══ Navigation within a page ════════════════════════════════════════════ */

/* Tabs — Moyo: Button-text labels, 5px underline on the active tab. */
.tabs {
  border-bottom: 1px solid var(--border-primary);
}
.tab {
  min-height: var(--touch-min);
  padding: 12px 16px;
  font: var(--type-button);
  color: var(--text-secondary);
  border-bottom: 5px solid transparent;
}
.tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}
.tab.active::after {
  content: none;
}
@media (min-width: 768px) {
  .tab {
    padding: 12px 24px;
  }
}

/* Breadcrumbs — desktop only. A phone gets a back button in the page header. */
.breadcrumbs {
  display: none;
  align-items: center;
  gap: 12px;
  font: var(--type-body-3);
}
.breadcrumbs__link {
  color: var(--text-accent);
}
.breadcrumbs__current {
  color: var(--text-secondary);
}
.breadcrumbs__sep {
  width: 2px;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--border-hover);
}
@media (min-width: 1024px) {
  .breadcrumbs {
    display: flex;
  }
}

/* ═══ Lists and tables ════════════════════════════════════════════════════ */

/* List — Moyo mobile Lists. The phone's answer to a data table. */
.list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-subtle);
}
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card-solid);
}
.list-item__body {
  flex: 1;
  min-width: 0;
}
.list-item__title {
  font: var(--type-subtitle-1);
  color: var(--text-primary);
}
.list-item__meta {
  font: var(--type-body-2);
  color: var(--text-secondary);
}

/* Table — Moyo anatomy on the product's .table. Desktop/admin; on a phone
   prefer .list — a table that scrolls sideways fails the render check. */
.table th {
  padding: 16px;
  height: 56px;
  font: var(--type-subtitle-2);
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
  border-top: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
}
.table td {
  padding: 16px;
  height: 56px;
  font: var(--type-body-2);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

/* ═══ Feedback ════════════════════════════════════════════════════════════ */

/* Snackbar — inverted surface (text colour as fill), so it inverts per theme.
   Phone: full width above the bottom nav. ≥1024: 450px, bottom-right. */
.snackbar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-025);
  background: var(--text-primary);
  color: var(--bg-card-solid);
  box-shadow: var(--elev-2);
  font: var(--type-body-2);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.snackbar.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.snackbar__message {
  flex: 1;
  min-width: 0;
}
.snackbar__action {
  min-height: var(--touch-min);
  padding: 0 4px;
  border: none;
  background: transparent;
  color: var(--arsha-accent);
  font: var(--type-button);
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
}
.snackbar--positive .snackbar__icon {
  color: var(--success);
}
.snackbar--critical .snackbar__icon {
  color: var(--danger);
}
.snackbar--warning .snackbar__icon {
  color: var(--warning);
}
@media (min-width: 1024px) {
  .snackbar {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 450px;
    font: var(--type-body-1);
  }
}

/* Tooltip — Moyo bubble. Touch has no hover: .is-open is toggled on tap,
   so every tooltip also needs a button as its anchor. Never title="". */
.tooltip-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tooltip-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 150;
  width: max-content;
  max-width: min(240px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--radius-025);
  background: var(--text-primary);
  color: var(--bg-card-solid);
  box-shadow: var(--elev-1);
  font: var(--type-body-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.tooltip-bubble--wide {
  max-width: min(400px, calc(100vw - 32px));
}
.tooltip-anchor:hover .tooltip-bubble,
.tooltip-anchor:focus-within .tooltip-bubble,
.tooltip-anchor.is-open .tooltip-bubble {
  opacity: 1;
}

/* Sticky footer — Moyo's decision bar. Phone: sits above the bottom nav,
   primary action full width. ≥1024: spans the content column. */
.sticky-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(60px + env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card-solid);
  border-top: 1px solid var(--border-subtle);
  box-shadow: var(--elev-2);
}
.sticky-footer .btn-primary {
  width: 100%;
}
.sticky-footer__meta {
  font: var(--type-body-3);
  color: var(--text-secondary);
}
.sticky-footer-spacer {
  height: 140px; /* keeps the last content above the bar */
}
@media (min-width: 1024px) {
  .sticky-footer {
    left: var(--sidebar-width);
    bottom: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 24px 40px;
  }
  .sticky-footer .btn-primary {
    width: auto;
  }
}

/* ═══ Shell typography only — geometry stays the product's ════════════════ */

.sidebar nav a,
.bottom-nav-item {
  font-family: var(--font-nav);
}
.mobile-header-logo h2,
.sidebar-logo h2 {
  font: var(--type-title-3);
}


/* ─────────── 4. Site ─────────── */
/* ── shell: a one-column marketing flow. No bottom nav, no
   sidebar; the phone header stays at every width. ── */
.pochi-site .mobile-header {
  display: flex;
  justify-content: space-between;
}
.pochi-site .mobile-header-logo h2 {
  font: var(--type-title-3);
}
.pochi-site .main {
  margin: 0 auto;
  max-width: 640px;
  min-height: auto;
  padding: calc(60px + env(safe-area-inset-top) + var(--spacing-15)) var(--page-pad) var(--spacing-2);
}
.pochi-site .sticky-footer {
  bottom: 0;
  left: 0;
  padding-bottom: calc(var(--spacing-075) + env(safe-area-inset-bottom));
}
.pochi-site .sticky-footer-spacer {
  height: 120px;
}
@media (min-width: 1024px) {
  .pochi-site .sticky-footer {
    left: 0;
    padding-inline: max(var(--spacing-25), calc((100% - 640px) / 2));
    justify-content: flex-end;
  }
  .pochi-site .sticky-footer__meta {
    margin-right: auto;
  }
}

/* ── landing hero ── */
.pochi-hero h1 {
  font: var(--type-title-1);
}
.pochi-hero em {
  font-style: normal;
  color: var(--text-accent);
}
.pochi-hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-05);
  margin-top: var(--spacing-1);
}
.pochi-trust {
  display: flex;
  align-items: center;
  gap: var(--spacing-05);
  font: var(--type-body-2);
  color: var(--text-secondary);
}
.pochi-trust .icon {
  color: var(--text-accent);
}
.pochi-section {
  margin-top: var(--spacing-3);
}
.pochi-section > h2 {
  font: var(--type-title-2);
  margin-bottom: var(--spacing-1);
}
.pochi-step {
  font: var(--type-status);
  color: var(--color-eyebrow);
  min-width: 24px;
}
.pochi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-05);
}

/* ── quiz: progress + answer options ── */
.pochi-quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--touch-min);
}
.pochi-quiz-count {
  font: var(--type-body-2);
  color: var(--text-secondary);
}
.pochi-progress {
  height: 4px;
  margin: var(--spacing-05) 0 var(--spacing-15);
  border-radius: var(--radius-025);
  background: var(--bg-panel);
  overflow: hidden;
}
.pochi-progress > span {
  display: block;
  height: 100%;
  background: var(--accent-primary);
  transition: width var(--transition-normal);
}
.pochi-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-075);
}
.pochi-option {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-075);
  width: 100%;
  min-height: 56px;
  padding: var(--spacing-075) var(--spacing-1);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-025);
  background: var(--bg-card-solid);
  color: var(--text-primary);
  font: var(--type-body-1);
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast);
}
.pochi-option:hover {
  border-color: var(--border-hover);
}
.pochi-option:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.pochi-option[aria-checked="true"] {
  border-color: var(--accent-primary);
  box-shadow: inset 0 0 0 1px var(--accent-primary);
  background: var(--accent-tint);
}
.pochi-option__letter {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-025);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font: var(--type-subtitle-2);
}
.pochi-option[aria-checked="true"] .pochi-option__letter {
  background: var(--accent-primary);
  color: var(--accent-on-primary);
}

/* ── persona mark (result) ── */
.pochi-persona-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: var(--spacing-05) 0;
  border-radius: var(--radius-05);
  background: var(--accent-tint);
  font-size: 28px;
  line-height: 1;
}

/* ── +254 prefix on the WhatsApp field ── */
.pochi-phone {
  display: flex;
  align-items: stretch;
}
.pochi-phone__prefix {
  display: grid;
  place-items: center;
  padding: 0 var(--spacing-075);
  border: 1px solid var(--text-secondary);
  border-right: none;
  border-radius: var(--radius-025) 0 0 var(--radius-025);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font: var(--type-body-1);
}
.pochi-phone .field-input > input {
  border-radius: 0 var(--radius-025) var(--radius-025) 0;
}
.pochi-consent {
  align-items: flex-start;
  gap: var(--spacing-075);
  font: var(--type-body-2);
  color: var(--text-primary);
  cursor: pointer;
}
.pochi-consent input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--accent-primary);
}
.pochi-note {
  font: var(--type-body-3);
  color: var(--text-secondary);
}
.pochi-note a {
  color: var(--text-accent);
  font-weight: 600;
  text-decoration: underline;
}

/* ── thank-you mark ── */
.pochi-done-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--bg-fit-high);
  color: var(--color-fit-high);
}
.pochi-done-mark .icon {
  width: 32px;
  height: 32px;
}
.pochi-done h1 {
  font: var(--type-title-1);
}
.pochi-done p {
  font: var(--type-body-1);
  max-width: 44ch;
}

/* ── site footer ── */
.pochi-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--spacing-2) var(--page-pad) var(--spacing-4);
  border-top: 1px solid var(--border-subtle);
  font: var(--type-body-3);
  color: var(--text-secondary);
}
.pochi-footer p + p {
  margin-top: var(--spacing-05);
}
.pochi-footer strong {
  color: var(--text-primary);
}
.pochi-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-05);
}
.pochi-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  color: var(--text-accent);
}

/* ── privacy notice body ── */
.pochi-policy {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-075);
  font: var(--type-body-2);
  color: var(--text-primary);
}
.pochi-policy h3 {
  margin-top: var(--spacing-05);
  font: var(--type-subtitle-1);
  color: var(--text-primary);
}
.pochi-policy ul {
  padding-left: var(--spacing-15);
}
.pochi-policy a {
  color: var(--text-accent);
  text-decoration: underline;
}
.pochi-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--spacing-15);
}

/* ── utility & accessibility additions (CSP-safe spacing, honeypot, skip-link, motion) ── */
.mt-05 {
  margin-top: var(--spacing-05);
}
.mt-075 {
  margin-top: var(--spacing-075);
}
.mt-1 {
  margin-top: var(--spacing-1);
}
.pochi-honeypot {
  display: none;
}
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link:focus-visible {
  position: fixed;
  top: var(--spacing-05);
  left: var(--spacing-05);
  z-index: 400;
  width: auto;
  height: auto;
  min-height: var(--touch-min);
  padding: var(--spacing-05) var(--spacing-1);
  overflow: visible;
  clip: auto;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-025);
  background: var(--accent-primary);
  color: var(--accent-on-primary);
  font: var(--type-button);
  box-shadow: var(--elev-2);
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-025);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


