/* peo.broker — modern site (v2)
   Shared stylesheet for index.html (marketing) and onboarding.html (portal). */

:root {
  color-scheme: light;
  --ink: #0e1726;
  --ink-soft: #3a4761;
  --muted: #6b7689;
  --line: #e3e7ef;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-deep: #0e1726;
  --indigo: #2f4bdc;
  --indigo-deep: #1f2f9e;
  --accent: #12b886;
  --accent-deep: #0c8f6a;
  --warning: #b9770a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -22px rgba(14, 23, 38, 0.35);
  --shadow-sm: 0 8px 20px -14px rgba(14, 23, 38, 0.4);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: min(1180px, 92vw); margin: 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.96rem;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--indigo); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--indigo-deep); }
.btn-accent { background: var(--accent); color: #04261c; }
.btn-accent:hover { background: var(--accent-deep); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-lg { padding: 16px 30px; font-size: 1.04rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--indigo), var(--accent));
  color: #fff; display: grid; place-items: center; font-size: 0.92rem; font-weight: 800;
}
.brand small { display: block; font-size: 0.66rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-weight: 500; font-size: 0.95rem; color: var(--ink-soft); }
.nav-links a:hover { color: var(--indigo); }
.nav .btn { padding: 10px 18px; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1100px 520px at 78% -8%, #eaf6f1 0%, transparent 60%), var(--bg); padding: 78px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--accent-deep); background: #e7f7f0; padding: 6px 13px; border-radius: 999px;
}
h1 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); line-height: 1.07; letter-spacing: -0.03em; margin: 18px 0 16px; }
.hero p.lead { font-size: 1.16rem; color: var(--ink-soft); max-width: 33ch; }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-trust { margin-top: 30px; display: flex; gap: 26px; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }
.hero-trust strong { color: var(--ink); font-size: 1.5rem; display: block; letter-spacing: -0.02em; }

.hero-card {
  background: var(--bg-deep); color: #eef1f8; border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.hero-card h3 { font-size: 1rem; font-weight: 600; color: #aab6d4; }
.hero-card .compare { margin-top: 16px; display: grid; gap: 12px; }
.compare-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm); }
.compare-row.bad { background: #1b2740; }
.compare-row.good { background: linear-gradient(120deg, var(--accent-deep), #15a378); }
.compare-row span { font-size: 0.9rem; }
.compare-row b { font-size: 1.35rem; letter-spacing: -0.02em; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-deep); color: #e7ebf5; }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1.15; letter-spacing: -0.025em; }
.section-head p { color: var(--ink-soft); margin-top: 12px; font-size: 1.06rem; }
.section-dark .section-head p { color: #aab6d4; }
.kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--indigo); }

/* ---------- stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.stat b { font-size: 2.2rem; letter-spacing: -0.03em; color: var(--indigo); display: block; }
.stat span { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; position: relative;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: 0.85rem; font-weight: 800; color: #fff;
  background: var(--indigo); width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 14px;
}
.step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step p { font-size: 0.94rem; color: var(--ink-soft); }

.agent-card {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.agent-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}
.agent-card-main { padding-left: 4px; }
.agent-card h3 { font-size: 1.28rem; line-height: 1.22; margin: 8px 0 8px; letter-spacing: -0.01em; }
.agent-card-main p { color: var(--ink-soft); max-width: 68ch; }
.agent-card-actions {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.agent-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.agent-point {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.25;
}
.agent-point span {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--indigo);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}
.agent-card-actions p {
  color: var(--accent-deep);
  font-size: 0.88rem;
  font-weight: 700;
}

/* ---------- service cards ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  background: var(--bg); transition: border-color .15s ease, transform .15s ease;
}
.service:hover { border-color: var(--accent); transform: translateY(-3px); }
.service .ico {
  width: 44px; height: 44px; border-radius: 12px; background: #e7f7f0;
  display: grid; place-items: center; margin-bottom: 14px; font-size: 1.3rem;
}
.service h3 { font-size: 1.06rem; }
.service p { font-size: 0.93rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- PEO partner scroller ---------- */
.peo-scroller {
  overflow: hidden; position: relative;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.peo-track {
  display: flex; align-items: stretch; gap: 14px; width: max-content;
  animation: peo-scroll 55s linear infinite;
}
.peo-scroller:hover .peo-track { animation-play-state: paused; }
@keyframes peo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 7px)); }
}
@media (prefers-reduced-motion: reduce) {
  .peo-track { animation: none; }
  .peo-scroller { overflow-x: auto; }
}
.peo-card {
  flex: 0 0 auto; width: 168px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
  min-height: 96px; display: grid; place-items: center; padding: 16px 12px; text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.peo-card:hover { border-color: var(--indigo); box-shadow: var(--shadow-sm); }
.peo-logo {
  width: 100%; height: 44px; display: grid; place-items: center;
  border-radius: 8px; background: var(--bg-soft);
  color: var(--ink); font-weight: 800; font-size: 0.9rem; letter-spacing: -0.01em;
}
.peo-logo-img { max-width: 100%; max-height: 48px; width: auto; height: auto; object-fit: contain; }
.peo-card small { color: var(--muted); font-size: 0.66rem; margin-top: 8px; display: block; text-transform: uppercase; letter-spacing: 0.05em; }
.peo-note { margin-top: 18px; font-size: 0.88rem; color: var(--muted); text-align: center; }

/* ---------- reasons / outcomes ---------- */
.reason-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.reason {
  display: flex; gap: 14px; padding: 20px; border-radius: var(--radius);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
}
.reason .num { color: var(--accent); font-weight: 800; font-size: 1.1rem; }
.reason h3 { font-size: 1.04rem; }
.reason p { font-size: 0.93rem; color: #aab6d4; margin-top: 4px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 20px; margin-bottom: 12px; background: var(--bg);
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--indigo); font-size: 1.3rem; font-weight: 700; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 0 18px; color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--indigo), var(--accent-deep));
  border-radius: var(--radius); padding: 48px; text-align: center; color: #fff;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #e3e9ff; margin: 12px 0 24px; }

/* ---------- footer ---------- */
.footer { background: var(--bg-deep); color: #99a4c0; padding: 46px 0 30px; font-size: 0.9rem; }
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid #1f2b46; }
.footer-cols { display: flex; gap: 54px; flex-wrap: wrap; }
.footer-cols h4 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.footer-cols a { display: block; padding: 3px 0; }
.footer-cols a:hover { color: #fff; }
.footer-brand { max-width: 280px; }
.footer-bottom { padding-top: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* =======================================================================
   ONBOARDING PORTAL
   ======================================================================= */
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-deep); color: #c7d0e6; padding: 26px 22px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { color: #fff; margin-bottom: 26px; }
.sidebar .brand small { color: #8c97b8; }
.step-nav { display: grid; gap: 4px; }
.step-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 9px; font-size: 0.92rem; color: #aab6d4; transition: background .12s ease;
}
.step-nav a:hover { background: #1b2740; }
.step-nav a.active { background: var(--indigo); color: #fff; }
.step-nav a span {
  width: 24px; height: 24px; border-radius: 7px; background: #1b2740;
  display: grid; place-items: center; font-size: 0.74rem; font-weight: 700; flex-shrink: 0;
}
.step-nav a.active span { background: rgba(255,255,255,0.22); }
.step-nav a.complete span { background: var(--accent); color: #04261c; }
.sidebar-card { margin-top: 24px; background: #1b2740; border-radius: var(--radius-sm); padding: 16px; }
.sidebar-card p { font-size: 0.78rem; color: #8c97b8; }
.sidebar-card strong { color: #fff; font-size: 1rem; display: block; margin: 4px 0 10px; }
.progress-track { height: 7px; background: #0e1726; border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }

.workspace { padding: 32px 40px 80px; max-width: 960px; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.topbar h1 { font-size: 1.8rem; margin: 6px 0 8px; }
.topbar p { color: var(--ink-soft); max-width: 56ch; }
.topbar-actions { display: flex; gap: 10px; flex-shrink: 0; }

.status-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.status-band div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.status-band span { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.status-band strong { display: block; margin-top: 4px; }

.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.panel-heading h2 { font-size: 1.25rem; }
.panel-heading .kicker { display: block; margin-bottom: 2px; }
.badge { font-size: 0.76rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-soft); white-space: nowrap; }
.badge.success { background: #e7f7f0; color: var(--accent-deep); }
.badge.warning { background: #fdf0db; color: var(--warning); }

.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
input, select, textarea {
  font: inherit; font-size: 0.94rem; font-weight: 400; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--indigo); outline-offset: -1px; }

.choice-block { margin-top: 18px; }
.choice-block h3 { font-size: 0.92rem; margin-bottom: 8px; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.segmented button {
  font: inherit; font-size: 0.88rem; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); cursor: pointer;
}
.segmented button.selected { background: var(--indigo); color: #fff; border-color: var(--indigo); }

/* ---------- PEO selection step ---------- */
.peo-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.peo-mode {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  cursor: pointer; transition: border-color .12s ease, background .12s ease;
}
.peo-mode.selected { border-color: var(--indigo); background: #f1f3ff; }
.peo-mode h3 { font-size: 1rem; display: flex; align-items: center; gap: 9px; }
.peo-mode .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; }
.peo-mode.selected .dot { border-color: var(--indigo); background: var(--indigo); box-shadow: inset 0 0 0 3px #fff; }
.peo-mode p { font-size: 0.88rem; color: var(--ink-soft); margin-top: 6px; }

.peo-pick-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.peo-pick-head h3 { font-size: 0.98rem; }
.peo-pick-head button { font: inherit; font-size: 0.84rem; font-weight: 600; color: var(--indigo); background: none; border: none; cursor: pointer; }
.peo-select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.peo-option {
  display: flex; align-items: center; gap: 11px; padding: 12px 13px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.peo-option:hover { border-color: var(--indigo); }
.peo-option.selected { border-color: var(--accent); background: #e7f7f0; }
.peo-option .check {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--muted);
  flex-shrink: 0; display: grid; place-items: center; font-size: 0.8rem; color: #fff;
}
.peo-option.selected .check { background: var(--accent); border-color: var(--accent); }
.peo-option .pl { width: 100%; font-weight: 700; font-size: 0.82rem; color: var(--ink); }
.peo-option .pl small { display: block; font-weight: 500; font-size: 0.7rem; color: var(--muted); }
.peo-select-grid.disabled { opacity: 0.45; pointer-events: none; }
.peo-count { margin-top: 14px; font-size: 0.88rem; color: var(--ink-soft); }
.peo-count b { color: var(--indigo); }

.document-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.document-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.document-card span { font-size: 0.68rem; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; }
.document-card strong { display: block; margin: 6px 0 2px; font-size: 0.95rem; }
.document-card p { font-size: 0.84rem; color: var(--muted); }
.document-card.ready { border-color: var(--accent); background: #e7f7f0; }
.document-card.missing { border-style: dashed; }

.banner-note {
  margin-top: 24px; padding: 14px 18px; border-radius: var(--radius-sm);
  background: #f1f3ff; border: 1px solid #d4dafc; font-size: 0.88rem; color: var(--ink-soft);
}

/* ---------- question flow ---------- */
.question-list { display: grid; gap: 8px; }
.question-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
  overflow: hidden; transition: opacity .24s ease, transform .24s ease, max-height .24s ease;
}
.question-item.leaving { opacity: 0; transform: translateX(14px); }
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; }
.q-text { font-size: 0.92rem; color: var(--ink); }
.q-yn { display: inline-flex; gap: 6px; flex-shrink: 0; }
.q-yn button {
  font: inherit; font-size: 0.85rem; padding: 6px 17px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); cursor: pointer;
}
.q-yn button.yes.on { background: var(--accent); color: #04261c; border-color: var(--accent); }
.q-yn button.no.on { background: var(--indigo); color: #fff; border-color: var(--indigo); }

.q-detail { padding: 0 14px 14px; display: none; }
.question-item.detail-open .q-detail { display: block; }
.q-detail label { font-size: 0.76rem; margin-bottom: 6px; }
.q-detail textarea { width: 100%; min-height: 68px; resize: vertical; }
.q-detail-actions { margin-top: 10px; display: flex; gap: 8px; }
.q-save {
  font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer;
  padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
  background: var(--indigo); color: #fff;
}
.q-save:hover { background: var(--indigo-deep); }

.question-item.done { background: var(--bg-soft); }
.question-item.done .q-text::before { content: "\2713 "; color: var(--accent-deep); font-weight: 800; }

/* completed group */
.completed-panel { margin-top: 14px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.completed-panel[hidden] { display: none; }
.completed-panel > summary {
  cursor: pointer; padding: 12px 14px; font-weight: 600; font-size: 0.88rem;
  color: var(--ink-soft); list-style: none;
}
.completed-panel > summary::-webkit-details-marker { display: none; }
.completed-panel > summary::before { content: "\25B8 "; color: var(--muted); }
.completed-panel[open] > summary::before { content: "\25BE "; }
.completed-list { display: grid; gap: 8px; padding: 0 12px 12px; }
.badge.complete { background: #e7f7f0; color: var(--accent-deep); }

/* medical detail grid */
.med-grid { margin-top: 4px; }
.med-cols, .med-row {
  display: grid; gap: 6px; align-items: center;
  grid-template-columns: 52px 70px 1.5fr 1fr 1fr 1.6fr 60px 64px 26px;
}
.med-cols { margin-bottom: 6px; }
.med-cols span { font-size: 0.66rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.med-row { margin-bottom: 6px; }
.med-row input, .med-row select { font-size: 0.82rem; padding: 7px 8px; }
.med-del {
  font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--bg);
  border-radius: 7px; color: var(--muted); height: 32px;
}
.med-del:hover { border-color: #d9534f; color: #d9534f; }
.med-add {
  font: inherit; font-weight: 600; font-size: 0.82rem; cursor: pointer; margin-top: 4px;
  padding: 7px 14px; border-radius: 8px; border: 1px dashed var(--line);
  background: var(--bg); color: var(--indigo);
}
.med-add:hover { border-color: var(--indigo); }

/* ---------- signature capture ---------- */
.signature-section {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  background: var(--bg-soft);
}
.signature-canvas-wrap {
  position: relative;
  width: 100%;
}
#signature-canvas {
  display: block;
  width: 100%;
  height: 200px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}
#signature-canvas.has-signature {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.signature-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font-size: 0.94rem;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s ease;
}
.signature-hint.hidden {
  opacity: 0;
}
.signature-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.signature-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.signature-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.2s ease;
}
.signature-status .dot.signed {
  background: var(--accent);
}
@media (max-width: 940px) {
  .med-cols { display: none; }
  .med-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 940px) {
  .hero-grid { display: flex; flex-direction: column; }
  .agent-card { grid-template-columns: 1fr; padding: 22px 22px 22px 24px; }
  .agent-points { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .stat-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .service-grid, .peo-select-grid, .form-grid, .form-grid.two { grid-template-columns: 1fr 1fr; }
  .reason-grid, .peo-modes, .status-band { grid-template-columns: 1fr; }
  .peo-card { width: 140px; }
  .nav-links { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .workspace { padding: 24px; }
  #signature-canvas { height: 160px; }
  .signature-section { padding: 14px; }
  .signature-hint { font-size: 0.86rem; }
}

/* Auto-save status indicator (onboarding topbar) */
.autosave-status {
  font-size: 0.82rem;
  color: var(--muted, #6b7280);
  align-self: center;
  white-space: nowrap;
  min-width: 116px;
  text-align: right;
  transition: color 0.2s ease;
}

/* ===================== onboarding stepper ===================== */
body.stepper .panel { display: none; }
body.stepper .panel.step-active { display: block; animation: stepIn 0.22s ease; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.step-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* Sidebar completion states */
.step-nav a.complete { color: #b9e9d6; }
.step-nav a.complete span { background: var(--accent); color: #04261c; font-weight: 800; }
.step-nav a.ready-spotlight {
  background: linear-gradient(135deg, var(--accent), #0c8f6a);
  color: #fff;
  font-weight: 700;
  animation: readyPulse 2s infinite;
}
.step-nav a.ready-spotlight span { background: rgba(255, 255, 255, 0.25); color: #fff; }
@keyframes readyPulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 184, 134, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(18, 184, 134, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 184, 134, 0); }
}

/* Document drag & drop cards */
.doc-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.doc-card {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.doc-card.has-files { border-style: solid; border-color: var(--accent); background: #f3fbf7; }
.doc-card.dragover { border-color: var(--indigo); background: #eef2ff; }
.doc-card h4 { font-size: 0.95rem; margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-card .doc-help { font-size: 0.82rem; color: var(--muted); margin: 6px 0 10px; }
.doc-card .doc-files { display: flex; flex-direction: column; gap: 4px; }
.doc-card .doc-files:not(:empty) { margin-bottom: 10px; }
.doc-card .doc-file { font-size: 0.84rem; color: var(--accent-deep); word-break: break-all; }
.doc-card .doc-drop {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  padding: 14px 10px;
  border-radius: 8px;
  background: var(--bg-soft);
  cursor: pointer;
}
.doc-card .doc-drop b { color: var(--indigo); }
.doc-card.uploading .doc-drop { opacity: 0.6; pointer-events: none; }
.doc-req { font-size: 0.66rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fdf0db; color: var(--warning); text-transform: uppercase; letter-spacing: 0.04em; }
.doc-req.optional { background: var(--bg-soft); color: var(--muted); }

/* Upload chip delete button */
.doc-card .doc-file { display: flex; align-items: center; gap: 8px; }
.doc-card .doc-file .doc-del {
  border: 0;
  background: transparent;
  color: #e03131;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 1px 6px;
  border-radius: 5px;
}
.doc-card .doc-file .doc-del:hover { background: #ffe3e3; }
.doc-card .doc-file .doc-del:disabled { opacity: 0.5; cursor: default; }

/* Sidebar lower menu (questionnaire): dashboard + sign out */
.sidebar { display: flex; flex-direction: column; }
.sidebar-bottom { margin-top: auto; padding-top: 18px; display: grid; gap: 4px; }
.sidebar-bottom a, .sidebar-bottom button {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px;
  font: inherit; font-size: 0.92rem; color: #aab6d4; background: none; border: 0;
  cursor: pointer; width: 100%; text-align: left; text-decoration: none;
  transition: background .12s ease;
}
.sidebar-bottom a:hover, .sidebar-bottom button:hover { background: #1b2740; color: #fff; }
.sidebar-bottom .icon {
  width: 24px; height: 24px; border-radius: 7px; background: #1b2740;
  display: grid; place-items: center; font-size: 0.78rem; flex-shrink: 0;
}

/* Uploaded-file chips are openable links */
.doc-file a { color: inherit; text-decoration: none; }
.doc-file a:hover { color: var(--indigo); text-decoration: underline; }
