/*
 * ScoutBadger Onboarding — premium split-screen design
 * Tokens copied from the 2026 "forest camp" design playground.
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=Bricolage+Grotesque:opsz,wght@12..48,400;12..48,500;12..48,600;12..48,700&display=swap');

:root {
    --forest: #1a3a2a;
    --forest-light: #2d5a3f;
    --forest-muted: #3d6b50;
    --moss: #5a8f6a;
    --sage: #8bb89a;
    --sage-light: #b5d4bf;
    --meadow: #d4e8d9;
    --cream: #f5f1ea;
    --warm-white: #faf8f4;
    --sand: #e8dfd3;
    --bark: #6b5b4a;
    --bark-light: #9a8a78;
    --campfire: #e87c3e;
    --campfire-glow: #f4a261;
    --campfire-dim: #c96a30;
    --ember: #d4533b;
    --sky: #5b9bd5;
    --fg-1: #1a2b1f;
    --fg-2: #5a6b5e;
    --fg-3: #8a9b8e;
    --border-default: #dde5df;
    --border-subtle: #eef2ef;
    --border-strong: #c8d2cb;

    /* Display is now a warm, handcrafted sans (no serifs) — tweak here to restyle every heading. */
    --font-display: 'Bricolage Grotesque', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset for the onboarding shell ──────────────────────────────────── */

body.ob-body {
    margin: 0;
    padding: 0;
    background: var(--warm-white);
    color: var(--fg-1);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    line-height: 1.5;
}

.ob-body *, .ob-body *::before, .ob-body *::after { box-sizing: border-box; }

.ob-body input, .ob-body select, .ob-body textarea, .ob-body button { font-family: inherit; }
.ob-body input, .ob-body select, .ob-body textarea { color: var(--fg-1); }
.ob-body input::placeholder, .ob-body textarea::placeholder { color: var(--bark-light); }
.ob-body ::selection { background: rgba(232,124,62,.25); }

/* Hide the default identity-server container chrome */
.ob-body > .container.body-container { max-width: none; padding: 0; margin: 0; }

/* ── Animations ─────────────────────────────────────────────────────── */

@keyframes ob-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes ob-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ob-slide-in {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes ob-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(20px, -15px) scale(1.05); }
}
@keyframes ob-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(232,124,62,.35); }
    70%  { box-shadow: 0 0 0 12px rgba(232,124,62, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232,124,62, 0); }
}
@keyframes ob-celebrate {
    0%   { opacity: 0; transform: scale(.6) rotate(-30deg); }
    60%  { transform: scale(1.08) rotate(8deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes ob-float-badge {
    0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
    50%      { transform: translateY(-8px) rotate(calc(var(--rot, 0deg) + 6deg)); }
}
@keyframes ob-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .ob-body *, .ob-body *::before, .ob-body *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ── Layout shell ───────────────────────────────────────────────────── */

.ob-shell {
    min-height: 100vh;
    width: 100%;
    display: flex;
    background: var(--warm-white);
    position: relative;
}

.ob-shell::before {
    content: "";
    position: fixed; inset: 0; z-index: 0;
    background-image: url('/img/onboarding-bg.svg');
    background-repeat: repeat;
    background-size: 160px 160px;
    opacity: .04;
    pointer-events: none;
}

/* ── Brand panel (left) ─────────────────────────────────────────────── */

.ob-brand {
    position: relative;
    flex: 0 0 480px;
    max-width: 480px;
    min-height: 100vh;
    background: linear-gradient(160deg, #143020 0%, #1a3a2a 45%, #224d35 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 40px 44px 36px;
    overflow: hidden;
}

.ob-brand__wallpaper {
    position: absolute; inset: 0;
    background-image: url('/img/onboarding-bg.svg');
    background-repeat: repeat;
    background-size: 120px 120px;
    opacity: .05;
    pointer-events: none;
}

.ob-brand__glow--campfire {
    position: absolute; left: -120px; bottom: -120px; width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(232,124,62,.32) 0%, rgba(232,124,62,0) 60%);
    pointer-events: none;
    animation: ob-drift 25s ease-in-out infinite;
}

.ob-brand__glow--sage {
    position: absolute; right: -100px; top: -80px; width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(139,184,154,.16) 0%, rgba(139,184,154,0) 65%);
    pointer-events: none;
    animation: ob-drift 30s ease-in-out infinite reverse;
}

.ob-brand__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ob-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-size: 19px; font-weight: 600;
    color: #fff;
    letter-spacing: -.02em;
}

.ob-logo__mark {
    display: block;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 7px rgba(0,0,0,.28));
}

.ob-brand__middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    padding-top: 24px;
}

.ob-brand__story-eyebrow {
    font-size: 11px; font-weight: 600;
    color: var(--campfire-glow);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.ob-brand__story-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 34px; font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.1;
    color: #fff;
    text-wrap: pretty;
}

.ob-brand__story-body {
    margin: 16px 0 0;
    font-size: 15.5px;
    line-height: 1.55;
    color: rgba(255,255,255,.72);
    max-width: 340px;
    text-wrap: pretty;
}

.ob-brand__story,
.ob-brand__hero { animation: ob-fade-up 500ms var(--ease-spring) both; }
.ob-brand__story { animation-delay: 100ms; }

/* Decorative badge stack */
.ob-badge-stack {
    position: relative;
    width: 280px; height: 220px;
    margin: 0 auto;
}
.ob-badge-stack--done {
    width: 320px; height: 280px;
}

.ob-badge {
    position: absolute;
    border-radius: 14px;
    display: grid; place-items: center;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -.03em;
    box-shadow: 0 8px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.15);
    animation: ob-float-badge 6s ease-in-out infinite;
}

.ob-badge--celebrate { animation: ob-celebrate 700ms var(--ease-bounce) both, ob-float-badge 6s ease-in-out infinite 700ms; }

.ob-celebration__halo {
    position: absolute;
    left: 110px; top: 60px;
    width: 140px; height: 140px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(244,162,97,.45) 0%, rgba(232,124,62,0) 65%);
    filter: blur(8px);
    animation: ob-fade-in 600ms 300ms both, ob-drift 8s ease-in-out infinite;
}

/* ── Scouting brand textures: trail-map contours + night-sky stars ──── */
.ob-brand__topo {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: .06;
    pointer-events: none;
}
.ob-brand__stars {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 260px;
    opacity: .55;
    pointer-events: none;
}
.ob-brand__forest {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    width: 100%; height: 190px;
    opacity: .58;
    pointer-events: none;
}

/* ── Insigne cluster (real hex merit-badge patches) ─────────────────── */
.ob-insigne-cluster {
    position: relative;
    width: 300px; height: 220px;
    margin: 0 auto;
}
.ob-insigne-cluster--done {
    width: 320px; height: 260px;
}
.ob-insigne {
    position: absolute;
    height: auto;
    display: block;
    transform: rotate(var(--rot, 0deg));
    filter: drop-shadow(0 12px 22px rgba(0,0,0,.30));
    animation: ob-float-badge 6s ease-in-out infinite;
}
.ob-insigne--hero {
    filter: drop-shadow(0 16px 32px rgba(0,0,0,.34)) drop-shadow(0 0 26px rgba(232,124,62,.30));
}
.ob-insigne--hero-done {
    filter: drop-shadow(0 18px 40px rgba(232,124,62,.45));
}
@keyframes ob-insigne-pop {
    0%   { opacity: 0; transform: scale(.6) rotate(calc(var(--rot, 0deg) - 12deg)); }
    60%  { transform: scale(1.06) rotate(var(--rot, 0deg)); }
    100% { opacity: 1; transform: scale(1) rotate(var(--rot, 0deg)); }
}
.ob-insigne--celebrate {
    animation: ob-insigne-pop 700ms var(--ease-bounce) both;
}

/* ── Trail rail: planted pennant flags along a dashed path ──────────── */
.ob-rail--trail .ob-rail__flag {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: 999px;
}
.ob-rail--trail .ob-rail__step--active .ob-rail__flag {
    animation: ob-pulse-ring 2s infinite;
}
.ob-rail--trail .ob-rail__connector {
    position: absolute;
    top: 27px;
    left: 8px;
    width: 0; height: 22px;
    background: none;
    border-left: 2px dashed rgba(255,255,255,.24);
    transition: border-color 350ms var(--ease-default);
}
.ob-rail--trail .ob-rail__connector--done {
    border-color: var(--campfire);
}

/* Step rail (left brand panel bottom) */
.ob-rail {
    display: flex; flex-direction: column; gap: 2px;
    list-style: none;
    margin: 0; padding: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ob-rail__step {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 0;
}

.ob-rail__node {
    position: relative;
    width: 28px;
    display: grid; place-items: center;
}

.ob-rail__connector {
    position: absolute;
    top: 28px;
    left: 50%;
    width: 1.5px;
    height: 28px;
    background: rgba(255,255,255,.18);
    transition: background 350ms var(--ease-default);
}

.ob-rail__step--done .ob-rail__connector { background: var(--campfire); }

.ob-rail__bullet {
    width: 28px; height: 28px;
    border-radius: 999px;
    display: grid; place-items: center;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.18);
    color: rgba(255,255,255,.45);
    font-size: 12px; font-weight: 700;
    font-family: var(--font-body);
    transition: all 250ms var(--ease-default);
}

.ob-rail__step--active .ob-rail__bullet {
    background: rgba(232,124,62,.18);
    border-color: var(--campfire);
    color: var(--campfire-glow);
    animation: ob-pulse-ring 2s infinite;
}

.ob-rail__step--done .ob-rail__bullet {
    background: var(--campfire);
    border-color: var(--campfire);
    color: #fff;
}

.ob-rail__label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.45);
    letter-spacing: .01em;
    transition: color 250ms;
}

.ob-rail__step--active .ob-rail__label { font-weight: 600; color: #fff; }
.ob-rail__step--done .ob-rail__label { color: rgba(255,255,255,.65); }

/* Mobile-only step counter shown above the compact horizontal stepper.
   On desktop the same text lives in the brand story eyebrow, so hide it here. */
.ob-rail__eyebrow {
    display: none;
    font-size: 11px; font-weight: 600;
    color: var(--campfire-glow);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ob-brand__footer-tagline {
    position: relative;
    z-index: 1;
    display: flex; align-items: center; gap: 10px;
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255,255,255,.55);
    letter-spacing: .01em;
}
.ob-brand__dot {
    width: 6px; height: 6px;
    border-radius: 999px;
    background: var(--campfire);
    box-shadow: 0 0 12px var(--campfire);
}

/* ── Form panel (right) ─────────────────────────────────────────────── */

.ob-form-panel {
    flex: 1;
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.ob-form-panel__inner {
    max-width: 620px;
    margin: 0 auto;
    padding: 36px 56px 64px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ob-utility {
    display: flex; justify-content: flex-end; align-items: center;
    gap: 16px; margin-bottom: 48px;
    font-size: 13px; color: var(--fg-2);
}

.ob-utility a {
    color: var(--forest);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1.5px solid var(--border-default);
    background: #fff;
    transition: border-color 150ms, background 150ms;
}
.ob-utility a:hover {
    border-color: var(--sage-light);
    background: var(--warm-white);
}

.ob-heading { margin-bottom: 28px; animation: ob-slide-in 450ms var(--ease-spring) both; }

.ob-heading__kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11.5px; font-weight: 700;
    color: var(--campfire-dim);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.ob-heading__kicker::before {
    content: "";
    width: 6px; height: 6px; border-radius: 999px;
    background: var(--campfire);
}

.ob-heading__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 38px; font-weight: 500;
    color: var(--forest);
    letter-spacing: -.025em;
    line-height: 1.1;
    text-wrap: pretty;
}

.ob-heading__subtitle {
    margin: 12px 0 0;
    font-size: 15.5px; line-height: 1.55;
    color: var(--fg-2);
    max-width: 480px;
    text-wrap: pretty;
}

.ob-content {
    flex: 1;
    animation: ob-slide-in 500ms 80ms var(--ease-spring) both;
}

.ob-footer {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1.5px solid var(--border-subtle);
    font-size: 12.5px;
    color: var(--fg-3);
}
.ob-footer a { color: var(--fg-3); text-decoration: none; }
.ob-footer a:hover { color: var(--fg-2); }
.ob-footer__links { display: flex; gap: 18px; }

/* ── Form primitives ────────────────────────────────────────────────── */

.ob-form { display: flex; flex-direction: column; gap: 22px; }

.ob-fields { display: flex; flex-direction: column; gap: 14px; }
.ob-fields--two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.ob-field { display: flex; flex-direction: column; gap: 6px; }

.ob-field__control {
    position: relative;
}

.ob-field input,
.ob-field select,
.ob-field textarea {
    width: 100%;
    height: 56px;
    padding: 20px 16px 8px;
    background: #fff;
    border: 1.5px solid var(--border-strong);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--fg-1);
    outline: none;
    transition: border-color 150ms var(--ease-default), box-shadow 150ms var(--ease-default);
}

.ob-field textarea {
    height: auto;
    padding: 24px 16px 12px;
    line-height: 1.5;
    resize: vertical;
    min-height: 88px;
}

.ob-field--mono input,
.ob-field--mono textarea { font-family: var(--font-mono); }

.ob-field input:focus,
.ob-field select:focus,
.ob-field textarea:focus {
    border-color: var(--forest);
    box-shadow: 0 0 0 4px rgba(26,58,42,.08);
}

.ob-field--error input,
.ob-field--error select,
.ob-field--error textarea { border-color: var(--ember); }

.ob-field input::placeholder,
.ob-field textarea::placeholder { color: transparent; }

.ob-field__label {
    position: absolute;
    left: 16px;
    top: 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--bark-light);
    pointer-events: none;
    transition: all 150ms var(--ease-default);
    background: transparent;
}

/* float the label when the input has content or is focused */
.ob-field input:focus + .ob-field__label,
.ob-field input:not(:placeholder-shown) + .ob-field__label,
.ob-field textarea:focus + .ob-field__label,
.ob-field textarea:not(:placeholder-shown) + .ob-field__label,
.ob-field--has-value .ob-field__label,
.ob-field select:focus + .ob-field__label,
.ob-field select:valid + .ob-field__label {
    top: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--forest-muted);
}

.ob-field--error .ob-field__label { color: var(--ember); }

.ob-field__hint,
.ob-field__error {
    font-size: 12px;
    padding-left: 4px;
    line-height: 1.4;
    display: flex; align-items: center; gap: 6px;
}

.ob-field__hint { color: var(--fg-3); }
.ob-field__error { color: var(--ember); }

/* Native validation styling (server-rendered <span asp-validation-for>) */
.ob-form .text-danger {
    color: var(--ember) !important;
    font-size: 12px;
    padding-left: 4px;
    display: inline-block;
    margin-top: 2px;
}

/* Validation summary */
.ob-form .validation-summary-errors,
.ob-form .alert-danger {
    background: rgba(212,83,59,.08);
    border: 1.5px solid rgba(212,83,59,.32);
    color: var(--ember);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
}
.ob-form .alert-danger strong { display: block; margin-bottom: 4px; color: var(--ember); }
.ob-form .validation-summary-errors ul,
.ob-form .alert-danger ul { margin: 0; padding-left: 20px; }
.ob-form .validation-summary-valid { display: none; }

/* Checkbox — the native <input> stretches over the visible square with
   opacity:0 so it remains the click target (keyboard, mouse, AT, Playwright).
   The decorative .ob-checkbox__box is presentational only and never
   intercepts clicks. The label still wraps both so clicking the text also
   toggles. */
.ob-checkbox {
    position: relative;
    display: flex; align-items: flex-start; gap: 12px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 150ms;
    margin-left: -12px;
}
.ob-checkbox:hover { background: rgba(26,58,42,.03); }
.ob-checkbox input {
    /* Sized + positioned to cover the visible square; opacity:0 keeps it
       invisible while remaining a real, focusable, clickable checkbox. */
    position: absolute;
    left: 12px;
    top: 11px;
    width: 20px;
    height: 20px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.ob-checkbox__box {
    width: 20px; height: 20px;
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 1px;
    background: #fff;
    border: 1.5px solid var(--border-strong);
    display: grid; place-items: center;
    transition: all 150ms var(--ease-default);
    color: transparent;
    pointer-events: none; /* decorative — never intercept clicks */
}
.ob-checkbox__box svg { pointer-events: none; }
.ob-checkbox input:checked ~ .ob-checkbox__box {
    background: var(--forest);
    border-color: var(--forest);
    color: #fff;
}
.ob-checkbox input:focus-visible ~ .ob-checkbox__box {
    outline: 3px solid rgba(232,124,62,.55);
    outline-offset: 2px;
}
.ob-checkbox__label {
    font-size: 14px;
    line-height: 1.45;
    color: var(--fg-1);
    font-weight: 500;
}
.ob-checkbox__label a { color: var(--forest); font-weight: 600; }
.ob-checkbox__required { color: var(--campfire); margin-left: 4px; }

/* Info callout */
.ob-callout {
    display: flex; gap: 12px;
    padding: 14px 16px;
    background: rgba(139,184,154,.12);
    border: 1.5px solid rgba(139,184,154,.4);
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--fg-1);
}
.ob-callout__icon {
    flex-shrink: 0;
    color: var(--moss);
    margin-top: 1px;
}
.ob-callout strong { color: var(--forest); }

/* Buttons */
.ob-actions {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px;
    gap: 16px;
}
.ob-actions--end { justify-content: flex-end; }

.ob-btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px;
    padding: 0 24px;
    min-width: 160px;
    background: var(--forest);
    color: #fff;
    font-size: 15px; font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(26,58,42,.18);
    transition: all 150ms var(--ease-default);
    text-decoration: none;
}
.ob-btn-primary:hover {
    background: #0f2a1d;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,58,42,.24);
    color: #fff;
}
.ob-btn-primary:disabled,
.ob-btn-primary[aria-disabled="true"] {
    background: var(--forest-muted);
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
.ob-btn-primary--wide { min-width: 220px; padding: 0 32px; }

.ob-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    height: 52px;
    padding: 0 16px;
    background: transparent;
    color: var(--forest-muted);
    font-size: 14px; font-weight: 600;
    font-family: inherit;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background 150ms, color 150ms;
    text-decoration: none;
}
.ob-btn-ghost:hover {
    background: rgba(26,58,42,.06);
    color: var(--forest);
}

/* Choice cards (speltak picker) */
.ob-section-label {
    font-size: 13px; font-weight: 600;
    color: var(--fg-2);
    letter-spacing: .02em;
    margin-bottom: 10px;
}

.ob-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ob-choice {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 16px 16px 18px;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all 200ms var(--ease-default);
    overflow: hidden;
    color: inherit;
}
.ob-choice:hover { border-color: var(--sage-light); }

/* Real radio overlays the entire card so the whole card is the click target. */
.ob-choice input[type="radio"] {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.ob-choice input[type="radio"]:focus-visible ~ .ob-choice__mark {
    outline: 3px solid rgba(232,124,62,.55);
    outline-offset: 3px;
}

.ob-choice__mark {
    position: absolute;
    top: 12px; right: 12px;
    width: 20px; height: 20px;
    border-radius: 999px;
    background: transparent;
    border: 1.5px solid var(--border-strong);
    display: grid; place-items: center;
    color: transparent;
    transition: all 200ms;
}

.ob-choice__glyph {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: grid; place-items: center;
    margin-bottom: 4px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -.02em;
    background: rgba(232,124,62,.1);
    color: var(--campfire);
}

.ob-choice__title {
    font-family: var(--font-display);
    font-size: 18px; font-weight: 500;
    color: var(--forest);
    letter-spacing: -.02em;
    line-height: 1.1;
}

.ob-choice__ages {
    font-size: 12px; font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--campfire);
}

.ob-choice__sub {
    font-size: 12.5px;
    color: var(--fg-2);
    line-height: 1.45;
}

.ob-choice:has(input:checked) {
    transform: translateY(-1px);
}
.ob-choice:has(input:checked) .ob-choice__mark {
    background: var(--campfire);
    border-color: var(--campfire);
    color: #fff;
}

/* per-color tinting (the design used individual colors but for the razor
   port we keep one accent — campfire — to stay theme-coherent). */

/* ── Done screen (summary + next steps) ─────────────────────────────── */

.ob-pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 14px 8px 8px;
    background: rgba(90,143,106,.10);
    border: 1.5px solid rgba(90,143,106,.32);
    border-radius: 999px;
    align-self: flex-start;
    animation: ob-fade-up 500ms 200ms var(--ease-spring) both;
}
.ob-pill__check {
    width: 22px; height: 22px; border-radius: 999px;
    background: var(--moss);
    display: grid; place-items: center;
    color: #fff;
    animation: ob-celebrate 600ms 300ms var(--ease-bounce) both;
}
.ob-pill__text {
    font-size: 13px; font-weight: 600;
    color: var(--forest);
}

.ob-summary,
.ob-nextsteps {
    display: flex; flex-direction: column; gap: 8px;
}
.ob-summary { animation: ob-fade-up 500ms 350ms var(--ease-spring) both; }
.ob-nextsteps { animation: ob-fade-up 500ms 500ms var(--ease-spring) both; }

.ob-overline {
    font-size: 11.5px; font-weight: 600;
    color: var(--fg-3);
    letter-spacing: .08em;
    text-transform: uppercase;
    padding-left: 4px;
    margin-bottom: 4px;
}

.ob-summary__row,
.ob-next {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 12px;
    text-align: left;
    font-family: inherit;
    color: inherit;
    text-decoration: none;
}

.ob-next {
    align-items: flex-start;
    cursor: pointer;
    transition: all 200ms var(--ease-default);
    width: 100%;
    position: relative;
    border-style: solid;
}
.ob-next:hover {
    border-color: var(--sage-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,58,42,.08);
}

.ob-summary__glyph {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(90,143,106,.1);
    color: var(--moss);
    display: grid; place-items: center;
    flex-shrink: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -.02em;
}

.ob-summary__glyph--accent { background: rgba(232,124,62,.1); color: var(--campfire); }
.ob-summary__glyph--bark { background: rgba(107,91,74,.1); color: var(--bark); }
.ob-summary__glyph--sky { background: rgba(91,155,213,.12); color: var(--sky); }

.ob-summary__body { flex: 1; min-width: 0; }
.ob-summary__label {
    font-size: 11.5px; font-weight: 600;
    color: var(--fg-3);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.ob-summary__value {
    font-size: 15px; font-weight: 600;
    color: var(--forest);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ob-summary__badge {
    font-size: 11px; font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(90,143,106,.12);
    color: var(--moss);
    letter-spacing: .02em;
    white-space: nowrap;
}

.ob-next__icon {
    width: 36px; height: 36px; border-radius: 10px;
    flex-shrink: 0;
    background: rgba(232,124,62,.10);
    color: var(--campfire-dim);
    display: grid; place-items: center;
}
.ob-next__body { flex: 1; min-width: 0; }
.ob-next__title {
    font-size: 14.5px; font-weight: 600;
    color: var(--forest);
    margin-bottom: 2px;
}
.ob-next__sub {
    font-size: 13px; color: var(--fg-2); line-height: 1.45;
}
.ob-next__chev {
    color: var(--fg-3);
    margin-top: 8px;
}
.ob-next__star {
    position: absolute;
    top: -6px; right: 10px;
    font-size: 10px; font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--campfire);
    color: #fff;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ── Password strength meter ────────────────────────────────────────── */

.ob-pwmeter {
    display: flex; align-items: center; gap: 10px;
    padding-left: 4px;
    margin-top: -2px;
    min-height: 18px;
    font-size: 11px; font-weight: 600;
    color: var(--fg-3);
    transition: opacity 150ms ease;
}
.ob-pwmeter[data-empty="true"] { opacity: 0; }

.ob-pwmeter__bars {
    display: flex; gap: 4px;
    flex: 1;
    max-width: 240px;
}
.ob-pwmeter__bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border-subtle);
    transition: background 250ms var(--ease-default);
}

/* Strength tiers: too-short, weak, ok, strong, excellent */
.ob-pwmeter[data-score="1"] .ob-pwmeter__bar:nth-child(-n+1) { background: var(--ember); }
.ob-pwmeter[data-score="2"] .ob-pwmeter__bar:nth-child(-n+2) { background: var(--campfire); }
.ob-pwmeter[data-score="3"] .ob-pwmeter__bar:nth-child(-n+3) { background: var(--moss); }
.ob-pwmeter[data-score="4"] .ob-pwmeter__bar:nth-child(-n+4) { background: var(--forest); }

.ob-pwmeter[data-score="1"] .ob-pwmeter__label { color: var(--ember); }
.ob-pwmeter[data-score="2"] .ob-pwmeter__label { color: var(--campfire-dim); }
.ob-pwmeter[data-score="3"] .ob-pwmeter__label { color: var(--moss); }
.ob-pwmeter[data-score="4"] .ob-pwmeter__label { color: var(--forest); }

.ob-pwmeter__label {
    min-width: 80px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ── Auxiliary primitives reused on account/auth pages ─────────────── */

.ob-alert {
    display: flex; gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--fg-1);
    margin-bottom: 16px;
}
.ob-alert__icon { flex-shrink: 0; margin-top: 1px; }
.ob-alert--info    { background: rgba(91,155,213,.08);  border-color: rgba(91,155,213,.32);  }
.ob-alert--info    .ob-alert__icon { color: var(--sky); }
.ob-alert--success { background: rgba(90,143,106,.10);  border-color: rgba(90,143,106,.32);  }
.ob-alert--success .ob-alert__icon { color: var(--moss); }
.ob-alert--warning { background: rgba(232,124,62,.10);  border-color: rgba(232,124,62,.32);  }
.ob-alert--warning .ob-alert__icon { color: var(--campfire-dim); }
.ob-alert--danger  { background: rgba(212,83,59,.08);   border-color: rgba(212,83,59,.32);   color: var(--ember); }
.ob-alert--danger  .ob-alert__icon { color: var(--ember); }
.ob-alert strong { color: inherit; }
.ob-alert a { color: var(--forest); font-weight: 600; }
.ob-alert--danger a { color: var(--ember); }

.ob-btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px;
    padding: 0 22px;
    background: #fff;
    color: var(--forest);
    font-size: 14.5px; font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    border: 1.5px solid var(--border-default);
    cursor: pointer;
    transition: all 150ms var(--ease-default);
    text-decoration: none;
}
.ob-btn-secondary:hover {
    border-color: var(--sage-light);
    background: var(--warm-white);
    color: var(--forest);
}

.ob-btn-link {
    background: transparent;
    border: none;
    color: var(--forest);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 150ms;
}
.ob-btn-link:hover { background: rgba(26,58,42,.04); }

.ob-link {
    color: var(--forest);
    font-weight: 600;
    text-decoration: none;
}
.ob-link:hover { color: var(--forest-light); text-decoration: underline; }

.ob-divider {
    display: flex; align-items: center; gap: 14px;
    font-size: 11px; font-weight: 600;
    color: var(--fg-3);
    letter-spacing: .12em;
    text-transform: uppercase;
}
.ob-divider::before,
.ob-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

.ob-aside {
    font-size: 13.5px;
    color: var(--fg-2);
    line-height: 1.5;
}
.ob-aside p { margin: 0 0 8px; }
.ob-aside p:last-child { margin-bottom: 0; }

.ob-prose { font-size: 14.5px; line-height: 1.55; color: var(--fg-1); }
.ob-prose p { margin: 0 0 12px; }
.ob-prose p:last-child { margin-bottom: 0; }
.ob-prose strong { color: var(--forest); }

.ob-meta-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--forest-muted);
    text-decoration: none;
    font-weight: 500;
    padding-left: 4px;
}
.ob-meta-link:hover { color: var(--forest); text-decoration: underline; }

.ob-actions--center { justify-content: center; }
.ob-actions--start { justify-content: flex-start; }
.ob-actions--stack { flex-direction: column; align-items: stretch; gap: 10px; }
.ob-actions--stack .ob-btn-primary,
.ob-actions--stack .ob-btn-secondary { width: 100%; }

.ob-stack { display: flex; flex-direction: column; gap: 16px; }
.ob-stack--tight { gap: 8px; }
.ob-stack--loose { gap: 24px; }

.ob-mt-2 { margin-top: 8px; }
.ob-mt-3 { margin-top: 16px; }
.ob-mt-4 { margin-top: 24px; }

/* SSO / provider button row */
.ob-provider-list {
    display: flex; flex-direction: column; gap: 10px;
}
.ob-provider {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 48px; padding: 0 16px;
    background: #fff;
    color: var(--fg-1);
    font-size: 14px; font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    border: 1.5px solid var(--border-default);
    cursor: pointer;
    transition: all 150ms;
    text-decoration: none;
}
.ob-provider:hover {
    border-color: var(--sage-light);
    background: var(--warm-white);
    color: var(--fg-1);
}
.ob-provider__mark {
    width: 22px; height: 22px;
    display: grid; place-items: center;
    color: var(--campfire);
}

/* ── App layout: branded header + content ───────────────────────────── */

body.ob-body--app {
    min-height: 100vh;
    background: var(--warm-white);
}

body.ob-body--app > .container.body-container,
body.ob-body--app > .container { display: contents; }

.ob-appbar {
    position: relative;
    background: linear-gradient(135deg, #143020 0%, #1a3a2a 55%, #224d35 100%);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(26,58,42,.14);
}

.ob-appbar__wallpaper {
    position: absolute; inset: 0;
    background-image: url('/img/onboarding-bg.svg');
    background-repeat: repeat;
    background-size: 140px 140px;
    opacity: .045;
    pointer-events: none;
}

.ob-appbar__glow {
    position: absolute;
    right: -120px; top: -160px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(232,124,62,.28) 0%, rgba(232,124,62,0) 60%);
    pointer-events: none;
    animation: ob-drift 28s ease-in-out infinite;
}

.ob-appbar__inner {
    position: relative; z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.ob-appbar .ob-logo { color: #fff; text-decoration: none; }

.ob-appbar__env {
    margin-left: 4px;
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.7);
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(232,124,62,.22);
}

.ob-appbar__user {
    display: flex; align-items: center; gap: 12px;
}

.ob-appbar__avatar {
    width: 36px; height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--campfire), var(--campfire-dim));
    display: grid; place-items: center;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -.02em;
    box-shadow: 0 4px 12px rgba(232,124,62,.32), inset 0 1px 0 rgba(255,255,255,.2);
}

.ob-appbar__user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.ob-appbar__user-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.ob-appbar__user-action {
    font-size: 12px;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    margin-top: 2px;
    font-weight: 500;
}
.ob-appbar__user-action:hover { color: var(--campfire-glow); text-decoration: underline; }

.ob-app {
    width: 100%;
    min-height: calc(100vh - 78px);
    position: relative;
}

.ob-app::before {
    content: "";
    position: fixed; inset: 0;
    background-image: url('/img/onboarding-bg.svg');
    background-repeat: repeat;
    background-size: 180px 180px;
    opacity: .035;
    pointer-events: none;
    z-index: 0;
}

.ob-app__inner {
    position: relative;
    z-index: 1;
    max-width: 920px;
    margin: 0 auto;
    padding: 56px 40px 64px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 78px);
}

.ob-app__inner--narrow { max-width: 640px; }
.ob-app__inner--wide   { max-width: 1180px; }

.ob-heading--app { margin-bottom: 32px; animation: ob-fade-up 500ms var(--ease-spring) both; }

.ob-footer--app { margin-top: auto; padding-top: 32px; }

/* ── Card / panel surfaces ──────────────────────────────────────────── */

.ob-card {
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 18px;
    padding: 28px 32px;
    box-shadow: 0 2px 8px rgba(26,58,42,.04);
}

.ob-card--inset { padding: 22px 26px; border-radius: 14px; }

.ob-card__header {
    display: flex; align-items: center; gap: 14px;
    margin: -6px 0 18px;
}

.ob-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 22px; font-weight: 500;
    color: var(--forest);
    letter-spacing: -.02em;
    line-height: 1.2;
}

.ob-card__icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(232,124,62,.10);
    color: var(--campfire-dim);
    flex-shrink: 0;
}

/* ── Client / app identity card (Consent, Device, Ciba) ─────────────── */

.ob-app-card {
    display: flex; align-items: center; gap: 18px;
    padding: 20px 24px;
    background: linear-gradient(180deg, #ffffff 0%, var(--cream) 100%);
    border: 1.5px solid var(--border-default);
    border-radius: 16px;
    margin-bottom: 24px;
}

.ob-app-card__logo {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--forest);
    color: #fff;
    display: grid; place-items: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 22px;
    letter-spacing: -.02em;
}
.ob-app-card__logo img { width: 100%; height: 100%; object-fit: cover; }

.ob-app-card__body { flex: 1; min-width: 0; }
.ob-app-card__label {
    font-size: 11px; font-weight: 600;
    color: var(--fg-3);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 3px;
}
.ob-app-card__name {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 500;
    color: var(--forest);
    letter-spacing: -.02em;
    line-height: 1.15;
}
.ob-app-card__sub {
    margin-top: 4px;
    font-size: 13.5px;
    color: var(--fg-2);
}

.ob-app-card__visit {
    flex-shrink: 0;
    align-self: stretch;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 10px;
    font-size: 12.5px; font-weight: 600;
    color: var(--forest);
    text-decoration: none;
    height: 36px;
    align-self: center;
}
.ob-app-card__visit:hover {
    border-color: var(--sage-light);
    background: var(--warm-white);
    color: var(--forest);
}

/* ── Scope cards (Consent / Device / Ciba) ──────────────────────────── */

.ob-scope-section { margin-bottom: 20px; }

.ob-scope-section__title {
    display: flex; align-items: center; gap: 10px;
    font-size: 11.5px; font-weight: 600;
    color: var(--fg-3);
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 0 4px;
    margin: 0 0 10px;
}

.ob-scope-section__icon {
    width: 22px; height: 22px;
    border-radius: 6px;
    background: rgba(26,58,42,.06);
    color: var(--forest-muted);
    display: grid; place-items: center;
}

.ob-scope-list {
    display: flex; flex-direction: column;
    gap: 8px;
    padding: 0;
    list-style: none;
    margin: 0;
}

.ob-scope {
    position: relative;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 14px;
    padding: 14px 18px 14px 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: border-color 150ms ease, background 150ms ease;
}

.ob-scope:hover { border-color: var(--sage-light); }

.ob-scope:has(input:checked) {
    background: linear-gradient(180deg, #ffffff 0%, rgba(212,232,217,.18) 100%);
    border-color: rgba(90,143,106,.45);
}

.ob-scope--required {
    background: rgba(232,124,62,.05);
    border-color: rgba(232,124,62,.32);
}

.ob-scope__check {
    width: 22px; height: 22px;
    border-radius: 7px;
    background: #fff;
    border: 1.5px solid var(--border-strong);
    display: grid; place-items: center;
    flex-shrink: 0;
    margin-top: 2px;
    color: transparent;
    transition: all 150ms var(--ease-default);
    pointer-events: none; /* decorative — input below is the real target */
}
.ob-scope__check svg { pointer-events: none; }
/* Native input is a direct child of .ob-scope (not nested in a label) so it
   sits in the flex flow alongside the decorative check, sized 0×0 visually
   but Playwright/keyboard/AT can still target it. The visible square has
   pointer-events:none so clicks on it bubble through to the input (label[for=]
   inside the body handles toggling for keyboard users). */
.ob-scope > input[type="checkbox"] {
    position: absolute;
    left: 16px; top: 14px;
    width: 22px; height: 22px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.ob-scope > input[type="checkbox"]:focus-visible ~ .ob-scope__check {
    outline: 3px solid rgba(232,124,62,.55);
    outline-offset: 2px;
}
.ob-scope input:checked + .ob-scope__check {
    background: var(--moss);
    border-color: var(--moss);
    color: #fff;
}
.ob-scope--required .ob-scope__check {
    background: var(--campfire);
    border-color: var(--campfire);
    color: #fff;
}
.ob-scope:not(.ob-scope--required) { cursor: pointer; }
.ob-scope label { cursor: inherit; }

.ob-scope__body { flex: 1; min-width: 0; }

.ob-scope__header {
    display: flex; align-items: center; gap: 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--forest);
    letter-spacing: -.005em;
}

.ob-scope__pill {
    font-size: 10.5px; font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(232,124,62,.12);
    color: var(--campfire-dim);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ob-scope__pill--emphasize {
    background: rgba(212,83,59,.12);
    color: var(--ember);
}

.ob-scope__desc {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--fg-2);
    line-height: 1.5;
}

.ob-scope__resources {
    margin: 10px 0 0;
    padding: 10px 12px;
    background: rgba(26,58,42,.03);
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--fg-2);
}
.ob-scope__resources strong { color: var(--forest); font-weight: 600; }
.ob-scope__resources ul { margin: 4px 0 0; padding-left: 18px; }

/* ── Device code input (big-character segmented input) ──────────────── */

.ob-code-input {
    display: block;
    width: 100%;
    height: 76px;
    padding: 0 24px;
    background: #fff;
    border: 1.5px solid var(--border-strong);
    border-radius: 16px;
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: .35em;
    text-align: center;
    text-transform: uppercase;
    color: var(--forest);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ob-code-input:focus,
.ob-code-input:focus-visible {
    border-color: var(--forest);
    box-shadow: 0 0 0 4px rgba(26,58,42,.10);
}

.ob-code-input::placeholder {
    color: var(--bark-light);
    letter-spacing: .25em;
    font-weight: 500;
}

/* ── Data list (Diagnostics, Grants details) ────────────────────────── */

.ob-data {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px 24px;
    font-size: 14px;
}
.ob-data dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fg-3);
    padding-top: 2px;
}
.ob-data dd {
    margin: 0;
    color: var(--fg-1);
    word-break: break-word;
}
.ob-data dd code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    background: var(--cream);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 1px 5px;
    color: var(--fg-1);
}

/* ── Data table (themed) ────────────────────────────────────────────── */

.ob-table {
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 14px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font-size: 14px;
}
.ob-table thead th {
    background: var(--cream);
    color: var(--forest);
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1.5px solid var(--border-default);
    white-space: nowrap;
}
.ob-table tbody td {
    padding: 14px 16px;
    border-top: 1px solid var(--border-subtle);
    vertical-align: middle;
    color: var(--fg-1);
}
.ob-table tbody tr:first-child td { border-top: none; }
.ob-table tbody tr:hover td { background: rgba(245,241,234,.4); }
.ob-table .ob-table__id {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--fg-2);
}
.ob-table .ob-table__actions {
    text-align: right;
    white-space: nowrap;
}

/* ── Status pills ───────────────────────────────────────────────────── */

.ob-status {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: .03em;
}
.ob-status::before {
    content: ""; width: 6px; height: 6px; border-radius: 999px;
    background: currentColor;
}
.ob-status--pending  { background: rgba(232,124,62,.14); color: var(--campfire-dim); }
.ob-status--success  { background: rgba(90,143,106,.14); color: var(--moss); }
.ob-status--rejected { background: rgba(212,83,59,.12);  color: var(--ember); }
.ob-status--info     { background: rgba(91,155,213,.14); color: var(--sky); }
.ob-status--neutral  { background: rgba(107,91,74,.12);  color: var(--bark); }
.ob-status--idle     { background: rgba(26,58,42,.06);   color: var(--fg-2); }

/* ── Chips / tag pills ──────────────────────────────────────────────── */

.ob-chip-row {
    display: flex; flex-wrap: wrap;
    gap: 6px;
}
.ob-chip {
    font-size: 12px; font-weight: 500;
    color: var(--forest);
    background: rgba(26,58,42,.05);
    border: 1px solid rgba(26,58,42,.08);
    border-radius: 999px;
    padding: 4px 10px;
    letter-spacing: .01em;
}
.ob-chip--accent {
    background: rgba(232,124,62,.10);
    color: var(--campfire-dim);
    border-color: rgba(232,124,62,.18);
}

/* ── Nav list (Admin) ───────────────────────────────────────────────── */

.ob-navlist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.ob-navlist__item {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 14px;
    text-decoration: none;
    color: var(--forest);
    transition: all 200ms var(--ease-default);
}
.ob-navlist__item:hover {
    border-color: var(--sage-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26,58,42,.06);
    color: var(--forest);
}

.ob-navlist__glyph {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(232,124,62,.10);
    color: var(--campfire-dim);
    flex-shrink: 0;
}

.ob-navlist__title {
    font-family: var(--font-display);
    font-size: 17px; font-weight: 500;
    color: var(--forest);
    letter-spacing: -.01em;
    line-height: 1.2;
}
.ob-navlist__sub {
    font-size: 13px;
    color: var(--fg-2);
    margin-top: 2px;
}
.ob-navlist__chev {
    margin-left: auto;
    color: var(--fg-3);
}

/* ── Provisioning step list ─────────────────────────────────────────── */

.ob-steplist {
    display: flex; flex-direction: column;
    gap: 8px;
}
.ob-steplist__item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 12px;
    transition: border-color 200ms, background 200ms;
}
.ob-steplist__item--active {
    background: rgba(232,124,62,.05);
    border-color: rgba(232,124,62,.32);
}
.ob-steplist__item--done {
    background: rgba(90,143,106,.06);
    border-color: rgba(90,143,106,.32);
}
.ob-steplist__item--failed {
    background: rgba(212,83,59,.06);
    border-color: rgba(212,83,59,.32);
}
.ob-steplist__icon {
    width: 28px; height: 28px;
    border-radius: 999px;
    display: grid; place-items: center;
    background: rgba(26,58,42,.06);
    color: var(--fg-3);
    flex-shrink: 0;
}
.ob-steplist__item--active .ob-steplist__icon {
    background: rgba(232,124,62,.18);
    color: var(--campfire);
    animation: ob-pulse-ring 2s infinite;
}
.ob-steplist__item--done .ob-steplist__icon { background: var(--moss); color: #fff; }
.ob-steplist__item--failed .ob-steplist__icon { background: var(--ember); color: #fff; }

.ob-steplist__title { font-size: 14.5px; font-weight: 600; color: var(--forest); }
.ob-steplist__sub   { font-size: 12.5px; color: var(--fg-2); margin-top: 2px; }
.ob-steplist__body  { flex: 1; min-width: 0; }
.ob-steplist__pill  { margin-left: auto; }

/* Form busy state — driven by form-busy.js. Dim non-button interactive
   elements so the user sees the action is in flight. */
.ob-form--busy .ob-field input,
.ob-form--busy .ob-field select,
.ob-form--busy .ob-field textarea,
.ob-form--busy .ob-choice,
.ob-form--busy .ob-checkbox {
    pointer-events: none;
    opacity: .55;
    transition: opacity 200ms ease;
}
.ob-form--busy .ob-btn-primary[aria-busy="true"] {
    cursor: progress;
    opacity: 1; /* keep the primary button fully visible during busy */
}

/* Generic spinner (used inside .ob-spinner) */
.ob-spinner {
    width: 18px; height: 18px;
    border-radius: 999px;
    border: 2.4px solid rgba(26,58,42,.18);
    border-top-color: var(--forest);
    animation: ob-spin 800ms linear infinite;
}
.ob-spinner--on-dark {
    border-color: rgba(255,255,255,.32);
    border-top-color: #fff;
}

/* Focus-visible rings — universally readable, non-intrusive */
.ob-body :focus-visible,
.ob-body button:focus-visible,
.ob-body a:focus-visible,
.ob-body input:focus-visible,
.ob-body textarea:focus-visible,
.ob-body select:focus-visible {
    outline: 3px solid rgba(232,124,62,.55);
    outline-offset: 2px;
    border-radius: 10px;
}

/* Prefilled fields — server-rendered inputs that come back with a value
   (validation re-render, hydrated drafts) still need the floating label to
   sit at the top. The default :not(:placeholder-shown) rule handles this
   only when placeholder=" "; when the asp-validation re-render skips the
   placeholder, fall back to checking value via :valid + required, or rely
   on an explicit class added by the page (.ob-field--has-value). */
.ob-field--has-value .ob-field__label,
.ob-field input[value]:not([value=""]) + .ob-field__label,
.ob-field textarea:not(:empty) + .ob-field__label {
    top: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--forest-muted);
}

/* Read-only field state */
.ob-field input[readonly] {
    background: var(--cream);
    color: var(--fg-2);
    cursor: not-allowed;
}

/* Better cross-browser scrollbar */
.ob-body * {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
.ob-body *::-webkit-scrollbar { width: 10px; height: 10px; }
.ob-body *::-webkit-scrollbar-track { background: transparent; }
.ob-body *::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
    border: 2px solid var(--warm-white);
}
.ob-body *::-webkit-scrollbar-thumb:hover { background: var(--bark-light); }

/* ── Responsive: collapse brand panel into a compact top bar ─────────────
   On phones/tablets the tall green hero is dropped entirely: it pushed the
   actual form/onboarding content far below the fold. The brand shrinks to a
   slim logo strip, and the onboarding progress rail becomes a compact
   horizontal stepper so progress stays visible without the big block. */
@media (max-width: 960px) {
    .ob-shell { flex-direction: column; }

    .ob-brand {
        flex: 0 0 auto;
        max-width: none;
        min-height: 0;
        padding: 16px 22px;
    }
    .ob-brand__inner { flex: 0 0 auto; }

    /* The hero (badge cluster + story) and tagline are desktop-only; the form
       panel already carries the heading + subtitle on mobile. */
    .ob-brand__middle,
    .ob-brand__footer-tagline { display: none; }

    /* Drifting glows would spill past the short bar — keep the strip clean. */
    .ob-brand__glow--campfire,
    .ob-brand__glow--sage { display: none; }

    .ob-form-panel { min-height: 0; }
    .ob-form-panel__inner { padding: 28px 24px 40px; min-height: 0; }
    .ob-heading__title { font-size: 30px; }
    .ob-choice-grid { grid-template-columns: repeat(2, 1fr); }

    /* Onboarding progress → compact horizontal stepper under the logo. */
    .ob-rail__eyebrow { display: block; margin-top: 12px; }
    .ob-rail--trail {
        flex-direction: row;
        gap: 0;
        margin-top: 10px;
    }
    .ob-rail--trail .ob-rail__step {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        gap: 7px;
        padding: 0;
        text-align: center;
    }
    .ob-rail--trail .ob-rail__node { width: 100%; }
    .ob-rail--trail .ob-rail__connector {
        top: 13px;
        left: 50%;
        width: 100%;
        height: 0;
        border-left: none;
        border-top: 2px dashed rgba(255,255,255,.24);
    }
    .ob-rail--trail .ob-rail__connector--done {
        border-top-color: var(--campfire);
    }
    .ob-rail--trail .ob-rail__label {
        font-size: 11px;
        line-height: 1.2;
    }

    .ob-appbar__inner { padding: 14px 20px; }
    .ob-app__inner { padding: 32px 20px 48px; }
    .ob-data { grid-template-columns: 1fr; gap: 4px; }
    .ob-data dt { margin-top: 10px; }
    .ob-app-card { flex-direction: column; align-items: flex-start; gap: 12px; }
    .ob-app-card__visit { align-self: flex-start; }
}

@media (max-width: 600px) {
    .ob-heading__title { font-size: 26px; }
    .ob-rail--trail .ob-rail__label { font-size: 10px; letter-spacing: 0; }
    .ob-card { padding: 22px 20px; border-radius: 14px; }
    .ob-code-input { font-size: 24px; letter-spacing: .25em; height: 64px; }
    .ob-table thead { display: none; }
    .ob-table tbody td { display: block; padding: 8px 14px; border: none; }
    .ob-table tbody tr {
        display: block;
        border-bottom: 1px solid var(--border-subtle);
        padding: 10px 0;
    }
}

/* ════════════════════════════════════════════════════════════════════
   Hexagon / campfire motif — auth + onboarding form side
   ────────────────────────────────────────────────────────────────────
   Carries the badge-hexagon identity (the logo mark + the hexagonal
   insigne patches in the brand aside) across into the right-hand form
   panel. Decorative glyph tiles become little merit-badge hexagons; the
   form panel echoes the aside with a faint hex watermark + campfire glow.
   Scoped under .ob-shell so it only ever touches the split auth/onboarding
   layout — the app/admin shell (.ob-body--app) is deliberately untouched.
   Interactive controls (checkboxes, radios) stay rounded: the hexagon is
   an identity/celebration cue, never an affordance.
   ════════════════════════════════════════════════════════════════════ */

:root {
    /* Flat-top hexagon matching the ScoutBadger logo-mark silhouette. */
    --ob-hex: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

/* Decorative glyph tiles → merit-badge hexagons. */
.ob-shell .ob-choice__glyph,
.ob-shell .ob-summary__glyph,
.ob-shell .ob-next__icon {
    border-radius: 0;
    clip-path: var(--ob-hex);
    filter: drop-shadow(0 2px 5px rgba(26,58,42,.14));
}

/* A flat-top regular hexagon needs height = width × √3/2 (≈0.866). We pin the
   width and let aspect-ratio derive the height, so the polygon never stretches
   no matter the container. (1 / 0.866 ≈ 1.1547) */
.ob-shell .ob-choice__glyph,
.ob-shell .ob-summary__glyph,
.ob-shell .ob-next__icon,
.ob-shell .ob-provider__mark,
.ob-shell .ob-pill__check {
    height: auto;
    aspect-ratio: 1.1547;
}
.ob-shell .ob-choice__glyph { width: 42px; }
.ob-shell .ob-summary__glyph { width: 44px; }
.ob-shell .ob-next__icon { width: 42px; }

/* Selected speltak: the hex fills campfire like a freshly-earned patch. */
.ob-shell .ob-choice:has(input:checked) .ob-choice__glyph {
    background: var(--campfire);
    color: #fff;
    filter: drop-shadow(0 4px 9px rgba(232,124,62,.38));
}

/* Login SSO mark framed inside a hex badge tile. */
.ob-shell .ob-provider__mark {
    width: 32px;
    border-radius: 0;
    clip-path: var(--ob-hex);
    background: rgba(26,58,42,.07);
    transition: background 150ms var(--ease-default);
}
.ob-shell .ob-provider:hover .ob-provider__mark { background: rgba(26,58,42,.11); }

/* "Alles is aangemaakt" — the celebration check becomes an earned hex badge. */
.ob-shell .ob-pill__check {
    border-radius: 0;
    clip-path: var(--ob-hex);
    width: 26px;
    filter: drop-shadow(0 2px 5px rgba(90,143,106,.40));
}

/* Form panel: a faint hex watermark + campfire glow echo the brand aside. */
.ob-form-panel { isolation: isolate; }
.ob-form-panel__inner { position: relative; z-index: 1; }

.ob-form-panel::before {
    content: "";
    position: absolute;
    right: -76px; bottom: 44px;
    width: 340px; height: 360px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='25,3 75,3 99,50 75,97 25,97 1,50' fill='none' stroke='%231a3a2a' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: .05;
    pointer-events: none;
    z-index: 0;
}
.ob-form-panel::after {
    content: "";
    position: absolute;
    right: -120px; top: -110px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(232,124,62,.10) 0%, rgba(232,124,62,0) 62%);
    pointer-events: none;
    z-index: 0;
}
