/* Rev 8: the routed Waive site. One Pearl-type orb on every screen size; a rail in the
   frame on desktop and tablet, a translucent floating orb with a caption strip and a
   pull-up sheet on a phone. Loaded after styles.css and overrides its layout rules. */

:root {
  --orb-ring: rgba(29, 29, 31, 0.28);
  --orb-core: #f5d547;
  --orb-core-deep: #e1bd20;
  --orb-glow: rgba(245, 213, 71, 0.55);
  --orb-listen: rgba(29, 29, 31, 0.5);
  --rail-width: 380px;
  --rail-strip: 72px;
}

.progress-shell, .journey-nav { display: none !important; }

.workspace {
  align-items: stretch;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: calc(100vh - 120px);
}

.advisor-panel { position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); overflow-y: auto; }
.canvas-toolbar > div:first-child { flex: 1 1 100%; }
.canvas-toolbar h2:empty { display: none; }
.canvas-content a.button, .hero-actions a.button { text-decoration: none; }

.canvas-toolbar { align-items: flex-end; flex-wrap: wrap; gap: 12px 18px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a { border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; padding: 7px 11px; text-decoration: none; }
.site-nav a:hover { background: var(--soft); color: var(--ink); }
.site-nav a.active { background: var(--ink); color: white; }

/* The orb ------------------------------------------------------------------------ */
.waverley-orb { position: relative; width: 154px; height: 154px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--orb-ring); border-radius: 50%; box-shadow: 0 0 0 20px rgba(29, 29, 31, 0.035), 0 0 0 40px rgba(29, 29, 31, 0.018); transition: box-shadow 260ms ease, border-color 260ms ease; }
.waverley-orb .orb-core { width: 72px; height: 72px; border: 2px solid var(--orb-core-deep); border-radius: 50%; background: radial-gradient(circle, var(--orb-core), rgba(245, 213, 71, 0.22) 48%, transparent 50%); transition: transform 200ms ease, box-shadow 200ms ease; }
.waverley-orb .orb-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--orb-core-deep); }
.waverley-orb .orb-dot-a { top: 19px; right: 28px; }
.waverley-orb .orb-dot-b { left: 21px; bottom: 36px; }
.waverley-orb.voice-connecting .orb-core, .waverley-orb.voice-syncing .orb-core { animation: orb-breathe 1.3s ease-in-out infinite; }
.waverley-orb.voice-listening .orb-core { animation: orb-listen 1.5s ease-in-out infinite; }
.waverley-orb.voice-speaking { border-color: var(--orb-core-deep); box-shadow: 0 0 0 20px rgba(245, 213, 71, 0.14), 0 0 45px var(--orb-glow); }
.waverley-orb.voice-speaking .orb-core { box-shadow: 0 0 28px var(--orb-glow); }
.waverley-orb.voice-paused { opacity: 0.55; }
.waverley-orb.voice-error { border-color: var(--danger); }
@keyframes orb-listen { 50% { transform: scale(1.09); box-shadow: 0 0 30px rgba(29, 29, 31, 0.28); } }
@keyframes orb-breathe { 50% { transform: scale(0.94); opacity: 0.6; } }

.voice-experience { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 18px 8px; text-align: center; }
.on-screen-line { color: var(--muted); font-size: 12px; margin: 0; min-height: 16px; }
.on-screen-line strong { color: var(--ink); }
.voice-caption { display: none; }
.rail-toggle { display: none; }

/* Page components (Rev 8, written fresh) --------------------------------------------- */
.canvas-content { padding: 26px 30px 40px; }
.page-lead { font-size: 17px; line-height: 1.55; margin: 0 0 22px; max-width: 720px; }
.page-note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.page-next { margin-top: 22px; }
.review-badge { display: inline-block; background: var(--warning-soft); color: var(--warning); border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; margin: 0 0 14px; padding: 5px 10px; text-transform: uppercase; }
.page-section { position: relative; border-top: 1px solid var(--soft-line); padding: 20px 0 10px; scroll-margin-top: 12px; }
.page-section h3 { font-size: 19px; margin: 0 0 8px; }
.page-section p, .page-section li { font-size: 15px; line-height: 1.6; max-width: 720px; }
.page-section p { margin: 0 0 10px; }
.section-number { position: absolute; right: 0; top: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.page-section.section-highlight { animation: section-flash 2.4s ease-out; }
@keyframes section-flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.section-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.section-links a { background: var(--soft); border-radius: 999px; color: var(--ink); font-size: 12px; font-weight: 700; padding: 6px 11px; text-decoration: none; }
.canvas-content a:not(.button):not([data-nav-page]):not(.path-card):not(.section-links a) { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent-dark); text-underline-offset: 2px; }
.steps { padding-left: 22px; margin: 0 0 12px; }
.steps li { margin-bottom: 8px; }
.steps-big li { font-size: 16px; margin-bottom: 12px; }
.notice-box { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 10px; font-size: 14px; line-height: 1.55; margin: 20px 0; max-width: 720px; padding: 12px 14px; }
.told-us { background: var(--soft); border-radius: 12px; margin-top: 20px; max-width: 720px; padding: 14px 16px; }
.told-us ul { margin: 6px 0 0; padding-left: 20px; }
.app-header .header-actions .button { white-space: nowrap; }

/* Home */
.hero { padding: 6px 0 26px; }
.hero-title { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.1; margin: 4px 0 14px; max-width: 760px; }
.hero-copy { font-size: 17px; line-height: 1.55; margin: 0 0 20px; max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.steps-row { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--soft-line); padding: 22px 0; }
.steps-row article span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: white; font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.steps-row h3 { font-size: 16px; margin: 0 0 4px; }
.steps-row p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }
.paths { border-top: 1px solid var(--soft-line); padding-top: 22px; }
.paths h2 { font-size: 22px; margin: 0 0 14px; }
.paths-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.path-card { display: flex; flex-direction: column; gap: 6px; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--ink); text-decoration: none; transition: border-color 160ms ease, transform 160ms ease; }
.path-card:hover { border-color: var(--accent-dark); transform: translateY(-2px); }
.path-kind { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.path-card strong { font-size: 19px; }
.path-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; flex: 1; }
.path-link { font-weight: 800; font-size: 13px; text-decoration: underline; text-decoration-color: var(--accent-dark); text-underline-offset: 2px; }

/* Form */
.form-progress { display: inline-block; background: var(--soft); border-radius: 999px; font-size: 12px; font-weight: 800; padding: 6px 12px; margin-bottom: 18px; }
.form-block { border-top: 1px solid var(--soft-line); padding: 20px 0 8px; }
.form-block h3 { font-size: 19px; margin: 0 0 12px; }
.form-block-note { color: var(--muted); font-size: 14px; margin: -6px 0 14px; max-width: 680px; }
.form-grid { display: grid; gap: 12px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.form-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-label { font-size: 12px; font-weight: 800; }
.form-note { color: var(--muted); font-size: 12px; }
.form-field input, .form-field select, .question select { background: white; border: 1px solid #cfd5df; border-radius: 10px; font: inherit; font-size: 15px; min-width: 0; padding: 11px 12px; width: 100%; }
.form-field input:focus, .form-field select:focus, .question select:focus { border-color: var(--accent-dark); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.member-row { display: grid; gap: 10px 12px; grid-template-columns: 1.2fr 1fr 1fr auto; align-items: end; margin-bottom: 10px; max-width: 760px; }
.member-remove { align-self: end; margin-bottom: 10px; }
.question-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.question { background: var(--soft); border-radius: 12px; padding: 14px 16px; }
.question-text { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; margin: 0 0 10px; }
.question-number { flex: 0 0 auto; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: white; font-size: 12px; font-weight: 800; }
.question select { max-width: 280px; }
.question-detail { margin: -4px 0 10px 34px; font-size: 13px; }
.question-detail summary { cursor: pointer; font-weight: 700; }
.question-detail ul { columns: 2; margin: 6px 0 0; padding-left: 18px; }
.form-done { background: var(--accent-soft); border-radius: 12px; margin-top: 18px; padding: 16px; max-width: 760px; font-size: 15px; }
.form-done div { margin-top: 10px; }
.trainer-tools { margin-top: 24px; color: var(--muted); font-size: 13px; }
.trainer-tools summary { cursor: pointer; font-weight: 800; }
.trainer-tools div { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }

/* Topic → steps */
.stepper { max-width: 820px; }
.step-rail { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.canvas-content .step-rail a, .step-rail a { display: inline-flex; align-items: center; gap: 7px; background: var(--soft); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; padding: 6px 11px 6px 6px; text-decoration: none !important; }
.step-rail a span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: white; color: var(--ink); font-size: 11px; font-weight: 800; }
.canvas-content .step-rail .is-done a { color: var(--ink); }
.step-rail .is-done a span { background: var(--accent-soft); }
.canvas-content .step-rail .is-current a, .step-rail .is-current a { background: var(--accent); color: var(--ink); font-weight: 700; }
.step-rail .is-current a span { background: white; color: var(--ink); }
.step-body { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; min-height: 220px; }
.step-count { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.05em; margin: 0 0 4px; text-transform: uppercase; }
.step-body h3 { font-size: 22px; margin: 0 0 12px; }
.step-body h4 { font-size: 15px; margin: 0 0 6px; }
.step-body p, .step-body li, .step-body dd { font-size: 15px; line-height: 1.6; }
.step-body p { margin: 0 0 10px; }
.step-body ul { margin: 0; padding-left: 20px; }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.two-col { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 10px; }
.fit-list, .glossary { display: grid; gap: 10px; margin: 0; }
.fit-list div, .glossary div { border-top: 1px solid var(--soft-line); padding-top: 10px; }
.fit-list dt, .glossary dt { font-weight: 800; margin-bottom: 2px; }
.fit-list dd, .glossary dd { margin: 0; }

/* Options table */
.options-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.options-row { display: grid; grid-template-columns: 1fr 1.1fr 1.1fr 1.1fr; }
.options-row > div { border-bottom: 1px solid var(--soft-line); border-left: 1px solid var(--soft-line); font-size: 14px; line-height: 1.5; padding: 12px 14px; }
.options-row > div:first-child { border-left: 0; color: var(--muted); font-weight: 800; }
.options-row:last-child > div { border-bottom: 0; }
.options-head > div { background: var(--soft); font-weight: 800; font-size: 15px; }
.options-head span { color: var(--muted); display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* Plans */
.plan-grid { display: grid; gap: 14px; margin: 6px 0 18px; }
.plan-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan-grid-1 { grid-template-columns: minmax(0, 1fr); }
.plan-card { background: white; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px; }
.plan-card h3 { font-size: 18px; margin: 0; }
.plan-card-highlight { border-color: var(--accent-dark); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-card { position: relative; }
.plan-card-highlight { padding-top: 26px; }
.plan-card-flag { position: absolute; top: -11px; left: 14px; background: var(--accent); color: var(--ink); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; margin: 0; padding: 4px 9px; text-transform: uppercase; }
.plan-grid-3 .plan-card { padding-top: 26px; }
.plan-price { margin: 0; min-height: 34px; }
.plan-price strong { font-size: 30px; letter-spacing: -0.01em; }
.plan-price span { color: var(--muted); font-size: 13px; }
.plan-price-pending { color: var(--muted); font-size: 13px; }
.plan-fit { font-size: 14px; line-height: 1.45; margin: 0; }
.plan-facts { display: grid; gap: 4px; margin: 2px 0; }
.plan-facts div { display: grid; gap: 8px; grid-template-columns: auto 1fr; font-size: 13px; }
.plan-facts dt { color: var(--muted); }
.plan-facts dd { margin: 0; text-align: right; }
.plan-worst { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0; min-height: 18px; }
.plan-card .button { margin-top: auto; text-align: center; }
.plan-table-wrap { overflow-x: auto; margin: 8px 0 12px; }
.plan-table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 14px; }
.plan-table tbody th { min-width: 200px; }
.plan-table th, .plan-table td { border-bottom: 1px solid var(--soft-line); padding: 12px 10px; text-align: left; vertical-align: top; }
.plan-table thead th { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.plan-table tbody th { font-weight: 800; }
.plan-table tbody th span { color: var(--muted); display: block; font-size: 12px; font-weight: 500; margin-top: 2px; max-width: 260px; }
.plan-table tr.is-highlight { background: var(--accent-soft); }
.compare-table td { font-size: 15px; }
.compare-table td .button { display: block; text-align: center; white-space: normal; line-height: 1.3; }
.plan-table td a:not(.button) { white-space: nowrap; }
.compare-table thead th { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.compare-picker { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; margin-bottom: 18px; max-width: 760px; }
.compare-picker label { display: grid; gap: 5px; font-size: 12px; font-weight: 800; }
.compare-picker select { border: 1px solid #cfd5df; border-radius: 10px; font: inherit; font-size: 15px; padding: 11px 12px; width: 100%; }
.qa { border-top: 1px solid var(--soft-line); padding: 12px 0; scroll-margin-top: 12px; max-width: 760px; }
.qa summary { cursor: pointer; font-size: 17px; font-weight: 800; }
.qa p { font-size: 15px; line-height: 1.6; margin: 10px 0 0; }

/* Tablet: the rail narrows to a strip inside the frame and widens in place ------- */
@media (max-width: 1023px) and (min-width: 768px) {
  .app-header .header-actions .button { font-size: 11px; padding: 7px 9px; min-height: 34px; }
  .test-versions { font-size: 11px; }
  .workspace { grid-template-columns: var(--rail-strip) minmax(0, 1fr); transition: grid-template-columns 200ms ease; }
  body.rail-expanded .workspace { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
  .advisor-panel { overflow: hidden; min-height: 0; }
  body:not(.rail-expanded) .advisor-panel > :not([id="voice-panel"]), body:not(.rail-expanded) .voice-experience > :not(.waverley-orb):not(.rail-toggle):not(.voice-actions) { display: none; }
  body:not(.rail-expanded) .voice-experience { padding: 10px 4px; gap: 8px; }
  body:not(.rail-expanded) .waverley-orb { width: 62px; height: 62px; box-shadow: none; }
  body:not(.rail-expanded) .waverley-orb .orb-core { width: 30px; height: 30px; }
  body:not(.rail-expanded) .waverley-orb .orb-dot { width: 4px; height: 4px; }
  body:not(.rail-expanded) .waverley-orb .orb-dot-a { top: 8px; right: 12px; }
  body:not(.rail-expanded) .waverley-orb .orb-dot-b { left: 9px; bottom: 15px; }
  body:not(.rail-expanded) .voice-actions { flex-direction: column; gap: 6px; }
  body:not(.rail-expanded) .voice-actions .button { font-size: 10px; min-height: 30px; padding: 5px 4px; }
  body:not(.rail-expanded) #start-voice, body:not(.rail-expanded) #voice-fallback, body:not(.rail-expanded) #pause-voice { display: none; }
  .rail-toggle { display: block; background: transparent; border: 0; color: var(--muted); font-size: 11px; font-weight: 800; padding: 4px; }
}

/* Phone: full-screen page, translucent floating orb, caption strip, pull-up sheet - */
@media (max-width: 767px) {
  .workspace { display: block; padding: 0 14px; min-height: 0; }
  .advisor-panel { position: fixed; right: 14px; bottom: 14px; left: auto; top: auto; z-index: 60; width: 64px; height: 64px; min-height: 0; max-height: none; border: 0; border-radius: 50%; background: transparent; box-shadow: none; overflow: visible; }
  .advisor-panel > [id="voice-panel"], .advisor-panel > [id="voice-panel"] > .voice-experience { min-height: 0; height: 64px; }
  .advisor-panel > :not([id="voice-panel"]) { display: none; }
  .voice-experience { padding: 0; gap: 0; align-items: flex-end; }
  .voice-experience > :not(.waverley-orb):not(.rail-toggle):not(.voice-caption) { display: none; }
  .waverley-orb { width: 58px; height: 58px; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); box-shadow: 0 6px 18px rgba(29, 29, 31, 0.14); border-color: rgba(29, 29, 31, 0.24); }
  .waverley-orb .orb-core { opacity: 0.85; }
  .waverley-orb .orb-core { width: 30px; height: 30px; opacity: 0.92; }
  .waverley-orb .orb-dot { width: 4px; height: 4px; }
  .waverley-orb .orb-dot-a { top: 9px; right: 13px; }
  .waverley-orb .orb-dot-b { left: 10px; bottom: 16px; }
  .rail-toggle { display: block; position: absolute; inset: 0; width: 64px; height: 64px; border: 0; border-radius: 50%; background: transparent; color: transparent; font-size: 0; }
  .voice-caption { display: block; position: fixed; right: 88px; bottom: 22px; left: 14px; z-index: 59; margin: 0; background: rgba(29, 29, 31, 0.86); color: white; border-radius: 12px; font-size: 13px; line-height: 1.35; padding: 9px 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .voice-caption:empty { display: none; }
  body.rail-expanded .advisor-panel { top: auto; right: 0; bottom: 0; left: 0; width: auto; height: 46vh; min-height: 0; border-radius: 18px 18px 0 0; background: var(--paper); box-shadow: 0 -12px 40px rgba(29, 29, 31, 0.22); display: flex; flex-direction: column; overflow: hidden; }
  body.rail-expanded.rail-tall .advisor-panel { height: 92vh; }
  body.rail-expanded .advisor-panel > .advisor-heading, body.rail-expanded .advisor-panel > .advisor-tabs, body.rail-expanded .advisor-panel > [id="chat-panel"]:not([hidden]) { display: flex; }
  body.rail-expanded .advisor-panel > .advisor-tabs { display: flex; }
  body.rail-expanded [id="voice-panel"], body.rail-expanded [id="voice-panel"] > .voice-experience { height: auto; min-height: 0; }
  body.rail-expanded [id="voice-panel"] { overflow-y: auto; }
  body.rail-expanded .voice-experience { padding: 12px 16px; gap: 10px; align-items: center; }
  body.rail-expanded .voice-experience > * { display: revert; }
  body.rail-expanded .waverley-orb { width: 96px; height: 96px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  body.rail-expanded .waverley-orb .orb-core { width: 44px; height: 44px; }
  body.rail-expanded .rail-toggle { position: static; width: auto; height: auto; color: var(--muted); font-size: 12px; font-weight: 800; padding: 6px 12px; }
  body.rail-expanded .voice-caption { display: none; }
  body.rail-expanded .voice-transcript { max-height: 30vh; overflow-y: auto; }
  .canvas-panel { padding-bottom: 96px; }
  .canvas-toolbar { padding: 16px; }
  .site-nav { flex-wrap: wrap; gap: 4px 2px; }
  .site-nav a { white-space: nowrap; font-size: 12px; padding: 6px 9px; }
  .canvas-content { padding-bottom: 110px; }
  .plan-grid-3, .plan-grid-2 { grid-template-columns: 1fr; }
  .steps-row, .paths-grid, .form-grid, .member-row, .two-col { grid-template-columns: 1fr; }
  .step-body { padding: 16px; }
  .step-nav .button { font-size: 13px; padding: 9px 12px; }
  .compare-picker { grid-template-columns: 1fr; }
  .question-detail ul { columns: 1; }
  .canvas-content { padding: 18px 16px 120px; }
  .compare-table { min-width: 0; font-size: 13px; }
  .compare-table th, .compare-table td { padding: 10px 6px; }
  .plan-table tbody th { min-width: 0; }
  .section-number { display: none; }
  .options-row { grid-template-columns: 1fr; }
  .options-row > div { border-left: 0; }
  .options-head { display: none; }
  .options-row:not(.options-head) > div:not(:first-child)::before { content: attr(data-col); color: var(--muted); display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; }
  .compare-order { columns: 1; }
  .app-header { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .waverley-orb .orb-core, .waverley-orb { animation: none !important; transition: none !important; }
}

/* ---- Enrollment application (Rev 8.11) ------------------------------------------------ */
.stepper[data-enroll] h4 { margin: 1.25rem 0 0.5rem; font-size: 1rem; }
.choice-row { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.choice-row .choice { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.75rem 0.9rem; border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 10px; cursor: pointer; background: #fff; }
.choice-row .choice.is-on { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.choice-row .choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-row .choice span { font-weight: 600; }
.choice-row .choice small { opacity: 0.7; }
.check-row { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.6rem 0; line-height: 1.4; cursor: pointer; }
.check-row input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; flex: none; }
.field-error { display: block; margin-top: 0.3rem; font-size: 0.85rem; color: #b42318; }
.form-field.has-error input, .form-field.has-error select { border-color: #b42318; }
.choice-row.has-error, .check-row.has-error { outline: 1px solid #b42318; outline-offset: 4px; border-radius: 10px; }
.enroll-member { margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px dashed rgba(0, 0, 0, 0.15); }
.enroll-summary dl { display: grid; gap: 0.35rem 1rem; grid-template-columns: 1fr; margin: 0; }
.enroll-summary dl > div { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 0.5rem; }
.enroll-summary dt { opacity: 0.7; }
.enroll-summary dd { margin: 0; }
.enroll-summary .edit-link { font-size: 0.85rem; font-weight: 500; margin-left: 0.5rem; }
.enroll-confirmation { font-size: 1.1rem; margin: 0.5rem 0 1rem; }
.enroll-confirmation strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.05em; }
@media (max-width: 640px) { .choice-row { grid-template-columns: 1fr; } .enroll-summary dl > div { grid-template-columns: 1fr; gap: 0.1rem; } }
.yes-no { display: flex; gap: 0.5rem; margin: 0.4rem 0 0.2rem; }
.yes-no .choice { display: inline-flex; align-items: center; padding: 0.45rem 1.1rem; border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 999px; cursor: pointer; background: #fff; }
.yes-no .choice.is-on { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.yes-no .choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.yes-no.has-error { outline: 1px solid #b42318; outline-offset: 4px; border-radius: 999px; }
.condition-list { display: grid; gap: 0.1rem; margin: 0.4rem 0 0.5rem; }
.condition-list .check-row { margin: 0.2rem 0; font-size: 0.95rem; }
.condition-list.has-error { outline: 1px solid #b42318; outline-offset: 4px; border-radius: 10px; }
.member-primary { margin: 0.5rem 0 0.75rem; }
.doctor-lookup { margin: 0.75rem 0 1rem; }
