/* Business onboarding (/business/get-started) */

.ob-page { background: var(--paper); }
.ob { padding-top: calc(var(--nav-h) + clamp(32px, 5vw, 64px)); padding-bottom: clamp(64px, 8vw, 112px); min-height: 100vh; }
.ob-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ob-main { max-width: 660px; width: 100%; }

.ob-head { display: grid; gap: 14px; margin-bottom: 28px; }
.ob-back { justify-self: start; display: inline-flex; gap: 8px; align-items: center; color: var(--ink-3); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.ob-back:hover { color: var(--ink); }
.ob-title { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.3rem); letter-spacing: -0.05em; line-height: 1; }
.ob-sub { color: var(--ink-2); max-width: 50ch; }

/* Progress */
.ob-progress { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 36px; }
.ob-progress li { position: relative; }
.ob-progress button { all: unset; box-sizing: border-box; width: 100%; display: grid; gap: 10px; padding-top: 12px; font-size: 0.84rem; font-weight: 500; color: var(--ink-4); cursor: default; }
.ob-progress button::before { content: ""; height: 3px; border-radius: 3px; background: var(--line); transition: background-color 0.4s ease; order: -1; }
.ob-progress button span { display: none; }
.ob-progress li.done button { color: var(--ink-2); cursor: pointer; }
.ob-progress li.done button::before { background: var(--green); }
.ob-progress li.now button { color: var(--ink); }
.ob-progress li.now button::before { background: var(--forest); }
.ob-progress li.done button:hover { color: var(--ink); }
.ob-progress button:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }

.ob-restored { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 0.9rem; color: var(--ink-2); margin: -16px 0 24px; padding: 10px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.ob-restored button { border: 0; background: none; padding: 0; color: var(--green-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* Steps */
.ob-form { display: grid; gap: 0; }
.ob-step { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 26px; }
.ob-step[hidden] { display: none; }
.ob-step legend { padding: 0; margin-bottom: 26px; display: grid; gap: 8px; float: left; width: 100%; }
.ob-step legend + * { clear: both; }
.ob-n { font-size: 0.86rem; font-weight: 500; color: var(--green-ink); display: flex; gap: 10px; align-items: center; }
.ob-q { font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.2rem); font-weight: 560; letter-spacing: -0.045em; line-height: 1.06; color: var(--ink); outline: none; }
@media (prefers-reduced-motion: no-preference) {
  .ob-step.enter { animation: step-in 0.8s var(--spring-soft) both; }
  .ob-step.enter-back { animation: step-back 0.8s var(--spring-soft) both; }
  @keyframes step-in { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes step-back { from { transform: translateX(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.ob-help { color: var(--ink-3); font-size: 0.94rem; margin-top: -12px; }

/* Fields */
.field { display: grid; gap: 8px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
.field-row:has(> .field:only-child) { grid-template-columns: minmax(0, 1fr); }
.field label, .field-label { font-size: 0.94rem; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.opt { font-size: 0.8rem; font-weight: 500; color: var(--ink-4); margin-left: 4px; }
.ob-n .opt { color: var(--ink-4); margin: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea, .select select {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--white);
  font-size: 1rem; color: var(--ink); letter-spacing: -0.01em; transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none; appearance: none;
}
.field textarea { padding: 14px 16px; line-height: 1.5; resize: vertical; min-height: 168px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:hover, .field textarea:hover, .select select:hover { border-color: var(--ink-4); }
.field input:focus, .field textarea:focus, .select select:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 4px rgba(0, 170, 108, 0.16); }
.field [aria-invalid="true"], .select select[aria-invalid="true"] { border-color: var(--rose); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(184, 70, 58, 0.14); }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select { padding-right: 44px; cursor: pointer; }
.err { font-size: 0.86rem; color: var(--rose); font-weight: 500; min-height: 0; }
.err:empty { display: none; }
.note { font-size: 0.86rem; color: var(--ink-3); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.count { margin-left: auto; font-size: 0.8rem; color: var(--ink-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.count.near { color: var(--amber); }

/* Industry radio cards */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; pointer-events: none; }
.choice label { display: grid; gap: 2px; padding: 14px 16px 14px 46px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--white); cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.45s var(--spring); position: relative; font-weight: 500; font-size: 0.96rem; }
.choice label small { font-weight: 400; color: var(--ink-3); font-size: 0.82rem; }
.choice label::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid var(--line-2); background: var(--white); transition: border-color 0.2s ease, box-shadow 0.25s ease; }
.choice input:checked + label { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.choice input:checked + label::before { border-color: var(--forest); box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 10px var(--forest); }
.choice input:focus-visible + label { box-shadow: 0 0 0 4px rgba(0, 170, 108, 0.2); }
.choice label:hover { border-color: var(--ink-4); }
.choice label:active { transform: scale(0.985); }

/* Locations segmented control */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg .opt-pill { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; pointer-events: none; }
.seg label { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-weight: 500; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.45s var(--spring); font-variant-numeric: tabular-nums; }
.seg label:hover { border-color: var(--ink-4); }
.seg input:checked + label { background: var(--forest); border-color: var(--forest); color: #fff; }
.seg input:focus-visible + label { box-shadow: 0 0 0 4px rgba(0, 170, 108, 0.22); }
.seg label:active { transform: scale(0.96); }

/* Objectives checkbox cards */
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; inset: 0; margin: 0; pointer-events: none; }
.check label { display: grid; gap: 3px; min-height: 84px; padding: 15px 48px 15px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--white); cursor: pointer; position: relative; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.45s var(--spring), background-color 0.2s ease; }
.check label b { font-weight: 500; font-size: 0.98rem; letter-spacing: -0.01em; }
.check label small { color: var(--ink-3); font-size: 0.84rem; line-height: 1.4; }
.check label::after { content: ""; position: absolute; right: 16px; top: 16px; width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid var(--line-2); background: var(--white) center / 14px no-repeat; transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.45s var(--spring); }
.check input:checked + label { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); background: #FBFCF9; }
.check input:checked + label::after { background-color: var(--forest); border-color: var(--forest); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l2.8 2.8 6.2-6.4' fill='none' stroke='%23BDF53D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); transform: scale(1.06); }
.check input:focus-visible + label { box-shadow: 0 0 0 4px rgba(0, 170, 108, 0.22); }
.check label:hover { border-color: var(--ink-4); }
.check label:active { transform: scale(0.985); }

/* Prompts */
.prompts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: -8px; }
.prompts span { font-size: 0.86rem; color: var(--ink-3); margin-right: 4px; }
.prompts button { height: 34px; padding: 0 13px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; font-size: 0.84rem; color: var(--ink-2); transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.45s var(--spring); }
.prompts button:hover { border-color: var(--forest); border-style: solid; background: var(--white); }
.prompts button:active { transform: scale(0.96); }

/* Consent */
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 16px 18px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--forest); cursor: pointer; }
.consent label { font-size: 0.92rem; color: var(--ink-2); line-height: 1.5; cursor: pointer; }
.consent label a { color: var(--green-ink); }
.consent .err { grid-column: 2; }
.notice { font-size: 0.9rem; color: var(--ink-2); margin-top: -14px; }
.notice summary { cursor: pointer; color: var(--ink-3); font-weight: 500; padding: 4px 0; width: max-content; }
.notice p { margin-top: 8px; max-width: 60ch; }
.notice a { color: var(--green-ink); }

/* Honeypot */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Actions */
.ob-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.ob-actions [data-next] { margin-left: auto; min-width: 180px; }
.ob-actions .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ob-actions [data-next][aria-busy="true"] { pointer-events: none; }
.ob-actions [data-next][aria-busy="true"] .spinner { display: inline-block; }
.ob-actions [data-next][aria-busy="true"] .arrow { display: none; }

/* Alerts */
.ob-alert { padding: 14px 16px; border-radius: 14px; font-size: 0.94rem; line-height: 1.5; margin-bottom: 26px; display: grid; gap: 8px; }
.ob-alert.is-error { background: var(--rose-soft); color: #7A2A21; border: 1px solid #EFC9C2; }
.ob-alert.is-info { background: var(--white); color: var(--ink-2); border: 1px solid var(--line); }
.ob-alert a { color: inherit; font-weight: 500; }
.ob-alert button { justify-self: start; border: 0; background: none; padding: 0; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Turnstile */
.turnstile { min-height: 65px; }

/* Done */
.ob-done { display: grid; gap: 22px; outline: none; }
.ob-done[hidden] { display: none; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--lime); color: var(--forest); display: grid; place-items: center; }
.done-mark svg { width: 30px; height: 30px; }
@media (prefers-reduced-motion: no-preference) {
  .ob-done:not([hidden]) .done-mark { animation: pop 0.9s var(--spring) both; }
  .ob-done:not([hidden]) > *:not(.done-mark) { animation: rise 0.9s var(--spring-soft) both; animation-delay: calc(var(--d, 1) * 90ms); }
  @keyframes pop { from { transform: scale(0.3); } }
  @keyframes rise { from { transform: translateY(16px); opacity: 0; } }
}
.ob-done .lede { max-width: 46ch; }
.done-dup { font-size: 0.94rem; color: var(--ink-2); padding: 10px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); justify-self: start; }
.done-ref { display: inline-grid; gap: 4px; justify-self: start; padding: 16px 20px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.done-ref span { font-size: 0.8rem; color: var(--ink-3); font-weight: 500; }
.done-ref b { font-family: var(--mono); font-weight: 500; font-size: 1.3rem; letter-spacing: 0.02em; }
.done-next { list-style: none; display: grid; border-top: 1px solid var(--line); counter-reset: dn; }
.done-next li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); counter-increment: dn; }
.done-next li::before { content: counter(dn); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--forest); color: var(--lime); font-size: 0.8rem; font-weight: 600; display: grid; place-items: center; }
.done-next b { font-weight: 500; }
.done-next span { color: var(--ink-3); font-size: 0.94rem; }
.done-fine { font-size: 0.9rem; color: var(--ink-3); }

/* Preview */
.ob-preview { position: sticky; top: calc(var(--nav-h) + 24px); }
.pv { background: var(--white); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-2); }
.pv-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; background: #FAFAF7; border-bottom: 1px solid var(--line); font-size: 0.76rem; color: var(--ink-3); }
.pv-bar .dots { display: flex; gap: 6px; }
.pv-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.pv-body { padding: 20px; display: grid; gap: 18px; }
.pv-head { display: flex; gap: 12px; align-items: center; }
.pv-head .env-logo { width: 42px; height: 42px; border-radius: 12px; background: var(--forest); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 0.95rem; flex: none; transition: transform 0.5s var(--spring); }
.pv-head b { display: block; font-weight: 560; font-size: 1.08rem; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.pv-head small { display: block; color: var(--ink-3); font-size: 0.8rem; }
.pv-head small em { font-style: normal; font-weight: 600; color: var(--ink-2); }
.pv-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-chip { font-size: 0.78rem; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.pv-chip.ghost { background: transparent; border: 1px dashed var(--line-2); color: var(--ink-4); }
.pv-section { display: grid; gap: 10px; }
.pv-section > small { font-size: 0.76rem; color: var(--ink-3); font-weight: 500; }
.pv-mods { display: grid; gap: 6px; }
.pv-mod { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: var(--paper); font-size: 0.9rem; font-weight: 500; }
.pv-mod i { width: 8px; height: 8px; border-radius: 2px; background: var(--forest); flex: none; }
.pv-mod.base { color: var(--ink-3); background: transparent; border: 1px solid var(--line); }
.pv-mod.base i { background: var(--line-2); }
.pv-mod.new { animation: mod-in 0.8s var(--spring) both; }
@keyframes mod-in { from { transform: translateY(-8px) scale(0.96); box-shadow: 0 0 0 2px var(--lime); } 60% { box-shadow: 0 0 0 2px var(--lime); } to { transform: none; box-shadow: 0 0 0 0 transparent; } }
.pv-empty { font-size: 0.86rem; color: var(--ink-4); }
.pv q { quotes: "\201C" "\201D"; font-size: 0.94rem; line-height: 1.45; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.pv-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: #FBFBF8; font-size: 0.8rem; color: var(--ink-3); line-height: 1.45; }
.ob-page.is-done .ob-preview { opacity: 0.6; }

/* Minimal footer */
.ob-foot { border-top: 1px solid var(--line); padding: 22px 0 calc(22px + env(safe-area-inset-bottom, 0px)); font-size: 0.86rem; color: var(--ink-3); }
.ob-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.ob-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ob-foot a { color: var(--ink-3); text-decoration: none; }
.ob-foot a:hover { color: var(--ink); }

@media (max-width: 1020px) {
  .ob-grid { grid-template-columns: minmax(0, 1fr); }
  .ob-main { max-width: none; }
  .ob-preview { position: static; order: 2; }
}
@media (max-width: 640px) {
  .choice-grid, .check-grid, .field-row { grid-template-columns: minmax(0, 1fr); }
  .check label { min-height: 0; }
  .ob-progress { margin-bottom: 28px; }
  .ob-actions { position: sticky; bottom: 0; z-index: 5; margin-inline: calc(var(--gutter) * -1); padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--paper) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .ob-actions [data-next] { flex: 1; min-width: 0; }
  .seg label { min-width: 0; padding: 0 16px; }
}
