  :root {
    --bg: #12151c;
    --surface: #1a1f2b;
    --surface2: #232a38;
    --border: #252d3d;
    --border-bright: #3a4560;
    --accent: #00d4ff;
    --accent-dim: rgba(0,212,255,0.12);
    --accent-glow: rgba(0,212,255,0.04);
    --warn: #ff6b35;
    --warn-dim: rgba(255,107,53,0.12);
    --success: #00e5a0;
    --success-dim: rgba(0,229,160,0.1);
    --text-primary: #f0f4fc;
    --text-secondary: #8fa3c0;
    --text-muted: #526080;
    --mono: 'IBM Plex Mono', monospace;
    --sans: 'IBM Plex Sans', sans-serif;
  }

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

  body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
  }

  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,0.03) 2px,rgba(0,0,0,0.03) 4px);
    pointer-events: none;
    z-index: 1000;
  }

  .doc-type-picker {
    display: flex;
    gap: 10px;
    margin-top: 6px;
  }
  .doc-type-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface2);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
    text-align: center;
  }
  .doc-type-card input[type="radio"] { display: none; }
  .doc-type-card-icon { color: var(--text-muted); }
  .doc-type-card-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
  .doc-type-card-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
  .doc-type-card:has(input:checked) {
    border-color: var(--accent);
    background: rgba(137,180,250,0.08);
  }
  .doc-type-card:has(input:checked) .doc-type-card-icon { color: var(--accent); }
  .doc-type-card:has(input:checked) .doc-type-card-title { color: var(--accent); }

  /* ── TOPBAR ── */
  .topbar {
    width: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
  }
  .topbar-main {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 28px;
    height: 52px;
    flex-shrink: 0;
  }
  .topbar-step-center {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    margin: 0 18px;
    height: 100%;
  }
  .topbar-step-center .step-track {
    margin-bottom: 0;
    width: auto;
  }
  /* Compact step nodes when in topbar */
  .topbar-step-center .step-circle {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }
  .topbar-step-center .step-node { gap: 3px; }
  .topbar-step-center .step-node-label {
    font-size: 7px;
    letter-spacing: 0.07em;
  }
  .topbar-step-center .step-line {
    flex: 0 0 auto;
    width: 20px;
    margin: 0 3px;
    margin-bottom: 12px;
  }
  .topbar-step-bar {
    display: none !important;
  }
  .topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .topbar-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
  }
  .topbar-logo img { height: 28px; width: auto; object-fit: contain; }
  .topbar-name {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.04em;
  }
  .topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .clock {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
  }
  .topbar-badge {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(0,212,255,0.2);
    padding: 3px 10px;
    border-radius: 2px;
  }

  /* ── MAIN ── */
  .main {
    width: 100%;
    max-width: 540px;
    padding: 40px 20px 100px;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* ── PAGE HEADER ── */
  .step-label {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .step-label::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 1px;
    background: var(--accent);
  }
  .page-title {
    font-family: var(--sans);
    font-size: 26px;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 28px;
  }
  .page-title strong { font-weight: 600; }

  /* ── STEP INDICATOR ── */
  .step-track {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
  }
  .step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: default;
  }
  .step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--border-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    transition: all 0.3s;
    position: relative;
  }
  .step-circle.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 10px rgba(0,212,255,0.2);
  }
  .step-circle.done {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-dim);
  }
  .step-circle.locked {
    opacity: 0.35;
  }
  .step-node-label {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color 0.3s;
  }
  .step-node-label.active { color: var(--accent); }
  .step-node-label.done { color: var(--success); }
  .step-line {
    flex: 1;
    height: 1px;
    background: var(--border);
    margin: 0 6px;
    margin-bottom: 14px;
    transition: background 0.3s;
  }
  .step-line.done { background: var(--success); }

  /* ── CARDS ── */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
  }
  .card.locked-card {
    opacity: 1;
    pointer-events: none;
    user-select: none;
  }
  .locked-card .card-body {
    display: none;
  }
  .card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .card-title {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .card-step-badge {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
  }
  .card-body { padding: 18px 20px; }

  /* ── FORM FIELDS ── */
  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }
  .field-row.single { grid-template-columns: 1fr; }
  .field-row.triple { grid-template-columns: 1fr 1fr 1fr; }
  .field-row.triple .field input,
  .field-row.triple .field select { min-width: 0; width: 100%; }
  .field {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .field label {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .field label .opt-tag {
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.6;
    margin-left: 4px;
    text-transform: none;
    letter-spacing: 0;
  }
  .field input, .field select, .field textarea {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 9px 12px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    width: 100%;
  }
  .field textarea {
    resize: vertical;
    min-height: 64px;
    line-height: 1.5;
  }
  .field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
  .field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
  }
  .field input.prefilled { border-color: var(--success) !important; }
  .field select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7a96' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
  }
  .ssn-hint {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 2px;
    font-style: italic;
  }
  .ssn-hint a { color: var(--text-secondary); text-decoration: underline; }

  /* ── CLASSIFIED SUB-SECTION ── */
  .classified-subsection {
    border: 1px solid rgba(255,107,53,0.35);
    border-radius: 3px;
    background: rgba(255,107,53,0.04);
    padding: 16px;
    margin-top: 16px;
  }
  .classified-subsection-header {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--warn);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .classified-info-banner {
    background: rgba(255,107,53,0.08);
    border: 1px solid rgba(255,107,53,0.25);
    border-radius: 3px;
    padding: 9px 12px;
    font-size: 11px;
    color: var(--warn);
    line-height: 1.55;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
  }
  /* ── CHAR COUNTER ── */
  .char-counter {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-align: right;
    margin-top: 3px;
    transition: color 0.2s;
  }
  .char-counter.warn { color: var(--warn); }
  /* ── DATA RETENTION NOTICE ── */
  .data-retention-notice {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    padding: 6px 0 2px;
    line-height: 1.5;
    max-width: 540px;
    margin: 0 auto;
  }
  /* ── SESSION TIMER BADGE ── */
  .topbar-badge-session {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--warn);
    background: var(--warn-dim);
    border: 1px solid rgba(255,107,53,0.2);
    padding: 3px 10px;
    border-radius: 2px;
  }

  /* ── CHECKBOXES ── */
  .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 3px;
    border: 1px solid var(--border);
    background: var(--surface2);
    transition: border-color 0.2s, background 0.2s;
  }
  .checkbox-item:hover { border-color: var(--border-bright); }
  .checkbox-item.checked {
    border-color: rgba(0,212,255,0.3);
    background: rgba(0,212,255,0.04);
  }
  .checkbox-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    margin-top: 1px;
    flex-shrink: 0;
    cursor: pointer;
  }
  .checkbox-item-text { display: flex; flex-direction: column; gap: 3px; }
  .checkbox-item-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
  }
  .checkbox-item-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.55;
  }
  .ack-gate-notice {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--warn);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.3s;
  }
  .ack-gate-notice.hidden { opacity: 0; pointer-events: none; }

  /* ── DIVIDER ── */
  .section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
  }
  .section-divider::before, .section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }
  .section-divider span {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  /* ── mDL SECTION ── */
  .mdl-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
  }
  .mdl-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 36px; height: 36px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
    opacity: 0.4;
  }
  .mdl-section::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 36px; height: 36px;
    border-bottom: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    opacity: 0.4;
  }
  .mdl-section-inner {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
  }
  .mdl-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1.5px solid rgba(0,212,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    position: relative;
  }
  .mdl-icon-wrap svg { width: 26px; height: 26px; color: var(--accent); }
  .mdl-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(0,212,255,0.2);
    animation: spin-slow 12s linear infinite;
  }
  @keyframes spin-slow { to { transform: rotate(360deg); } }
  .mdl-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    letter-spacing: -0.01em;
  }
  .mdl-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 320px;
    margin-bottom: 18px;
    font-weight: 300;
  }
  .data-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-bottom: 22px;
    max-width: 400px;
  }
  .data-chip {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(0,212,255,0.15);
    padding: 3px 7px;
    border-radius: 2px;
  }

  /* ── VERIFY BUTTON ── */
  .btn-present-mdl {
    background: #fff;
    border: none;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
    width: 100%;
    max-width: 310px;
    overflow: hidden;
    transition: all 0.15s ease;
    outline: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  }
  .btn-present-mdl:hover { transform: scale(1.01); box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
  .btn-present-mdl:active { transform: scale(0.99); }
  .btn-present-mdl-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    background: #fff;
  }
  .btn-wallet-icon { width: 28px; height: 28px; flex-shrink: 0; }
  .btn-present-text { display: flex; flex-direction: column; align-items: flex-start; }
  .btn-present-main {
    font-size: 15px;
    font-weight: 600;
    color: #1c1c1e;
    letter-spacing: -0.01em;
    font-family: -apple-system,'SF Pro Display','Helvetica Neue',sans-serif;
  }
  .btn-present-sub {
    font-size: 11px;
    color: #8e8e93;
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-weight: 400;
  }

  /* status / note / manual link */
  .mdl-status {
    margin-top: 14px;
    width: 100%;
    max-width: 310px;
    padding: 9px 13px;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    display: none;
    align-items: center;
    gap: 8px;
  }
  .mdl-status.show { display: flex; }
  .mdl-status.pending { background: rgba(0,212,255,0.06); border: 1px solid rgba(0,212,255,0.2); color: var(--accent); }
  .mdl-status.success { background: var(--success-dim); border: 1px solid rgba(0,229,160,0.2); color: var(--success); }
  .status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: currentColor; }
  .status-dot.blink { animation: blink 1s ease-in-out infinite; }
  @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.2 } }

  .mdl-note {
    margin-top: 14px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    text-align: left;
    max-width: 310px;
    width: 100%;
  }
  .mdl-note-icon { color: var(--text-muted); flex-shrink: 0; margin-top: 1px; }
  .mdl-note p { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
  .mdl-note a { color: var(--text-secondary); text-decoration: underline; }
  .manual-link { text-align: center; margin-top: 10px; font-size: 11px; color: var(--text-muted); }
  .manual-link button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-family: var(--sans);
    transition: color 0.2s;
  }
  .manual-link button:hover { color: var(--text-primary); }

  /* ── VERIFIED PANEL ── */
  .verified-panel {
    display: none;
    background: var(--surface);
    border: 1px solid rgba(0,229,160,0.2);
    border-radius: 4px;
    padding: 10px 12px;
    margin-top: 12px;
    width: 100%;
    max-width: 460px;
  }
  .verified-panel.show { display: block; }
  .verified-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
  .verified-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--success-dim);
    border: 1px solid rgba(0,229,160,0.25);
    padding: 2px 7px 2px 5px;
    border-radius: 2px;
  }
  .verified-badge svg { color: var(--success); width: 11px; height: 11px; }
  .verified-badge-text {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--success);
  }
  .verified-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px 8px;
  }
  .verified-field { display: flex; flex-direction: column; gap: 1px; }
  .verified-field.full { grid-column: 1/-1; }
  .verified-field-label {
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .verified-field-value {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 500;
  }
  .verified-field-value.success { color: var(--success); }
  .redacted {
    background: var(--border-bright);
    color: transparent;
    border-radius: 2px;
    user-select: none;
    letter-spacing: -0.5em;
  }

  /* ── SUBMIT FOOTER ── */
  .form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    gap: 12px;
    padding: 4px 0;
  }
  .form-footer-note {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .btn-submit {
    padding: 12px 28px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
  }
  .btn-submit:hover { background: #33ddff; box-shadow: 0 4px 20px rgba(0,212,255,0.25); }
  .btn-submit:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    box-shadow: none;
    background: var(--accent);
  }

  /* ── BOTTOM BANNER ── */
  .compliance-strip {
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 13px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    position: fixed;
    bottom: 0;
    background: var(--surface);
    z-index: 50;
  }
  .compliance-item {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .compliance-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
  }

  /* ── CONFIRMATION PAGE ── */
  #confirmationPage {
    display: none;
    width: 100%;
    max-width: 540px;
    padding: 60px 20px 100px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
  }
  #confirmationPage.show { display: flex; }
  .confirm-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--success-dim);
    border: 2px solid rgba(0,229,160,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: confirm-pop 0.5s cubic-bezier(0.34,1.56,0.64,1);
  }
  @keyframes confirm-pop { from { transform:scale(0.5); opacity:0 } to { transform:scale(1); opacity:1 } }
  .confirm-icon svg { width: 32px; height: 32px; color: var(--success); }
  .confirm-title {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
  }
  .confirm-title strong { font-weight: 600; }
  .confirm-sub {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 360px;
    margin-bottom: 32px;
  }
  .confirm-ref {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(0,212,255,0.2);
    padding: 8px 20px;
    border-radius: 3px;
    margin-bottom: 32px;
  }
  .confirm-details-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 18px;
    margin-bottom: 28px;
  }
  .confirm-detail { display: flex; flex-direction: column; gap: 3px; }
  .confirm-detail.full { grid-column: 1/-1; }
  .confirm-detail-label {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .confirm-detail-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
  }
  .confirm-next-steps {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 18px 20px;
    text-align: left;
    margin-bottom: 8px;
  }
  .confirm-next-title {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
  }
  .confirm-next-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
  }
  .confirm-next-item:last-child { margin-bottom: 0; }
  .confirm-next-num {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(0,212,255,0.2);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
  }

  /* ── iOS OVERLAYS ── */
  .ios-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 900;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: ios-fade-in 0.25s ease;
  }
  .ios-backdrop.show { display: block; }
  @keyframes ios-fade-in { from { opacity:0 } to { opacity:1 } }

  .ios-sheet {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1000;
    background: #1c1c1e;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    animation: ios-slide-up 0.35s cubic-bezier(0.32,0.72,0,1);
    max-width: 430px;
    margin: 0 auto;
  }
  .ios-sheet.show { display: block; }
  @keyframes ios-slide-up { from { transform:translateY(100%) } to { transform:translateY(0) } }
  .ios-sheet-handle {
    width: 36px; height: 4px;
    background: #48484a;
    border-radius: 2px;
    margin: 10px auto 0;
  }

  .ios-app-selector { padding: 0 0 34px; }
  .ios-app-selector-title {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 13px;
    color: #8e8e93;
    text-align: center;
    padding: 14px 24px 8px;
  }
  .ios-app-list { padding: 4px 16px 0; display: flex; flex-direction: column; }
  .ios-app-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.1s;
    -webkit-tap-highlight-color: transparent;
  }
  .ios-app-row:active, .ios-app-row.pressed { background: rgba(255,255,255,0.08); }
  .ios-app-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .ios-app-icon.wallet { background: #000000; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
  .ios-app-info { flex: 1; min-width: 0; }
  .ios-app-name {
    font-family: -apple-system,'SF Pro Display','Helvetica Neue',sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 1px;
  }
  .ios-app-detail {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 13px;
    color: #8e8e93;
  }
  .ios-chevron { color: #48484a; flex-shrink: 0; }
  .ios-separator { height: 1px; background: rgba(255,255,255,0.08); margin: 0 14px; }
  .ios-cancel-btn {
    margin: 10px 16px 0;
    width: calc(100% - 32px);
    padding: 16px;
    background: #2c2c2e;
    border: none;
    border-radius: 13px;
    font-family: -apple-system,'SF Pro Display','Helvetica Neue',sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #0a84ff;
    cursor: pointer;
  }
  .ios-cancel-btn:active { background: #3a3a3c; }

  /* ─────────────────────────────────────────────────────────────────────
     APPLE WALLET — "Verify with Wallet" consent sheet
     Authentic light-mode UI matching iOS 16 / 17 system sheet
  ───────────────────────────────────────────────────────────────────── */

  /* Override base sheet background for consent only */
  #iosConsentSheet {
    background: #ffffff;
  }
  #iosConsentSheet .ios-sheet-handle { display: none; } /* no drag handle in real Wallet sheet */

  /* ── Wallet header row: [icon] Wallet  ×  ── */
  .apw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 0.5px solid rgba(60,60,67,0.18);
  }
  .apw-header-brand {
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .apw-header-name {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.4px;
  }
  .apw-close-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #e5e5ea;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #636366;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
  }
  .apw-close-btn:active { background: #d1d1d6; }

  /* ── Scrollable body ── */
  .apw-body {
    max-height: 62vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Requester block ── */
  .apw-requester {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 16px 14px;
  }
  .apw-app-icon {
    width: 80px; height: 80px;
    border-radius: 18px;
    background: var(--ios-surface, #f2f2f7);
    box-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 0 0 0.5px rgba(0,0,0,0.07);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    flex-shrink: 0;
  }
  .apw-requester-name {
    font-family: -apple-system,'SF Pro Display','Helvetica Neue',sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.5px;
    text-align: center;
  }

  /* ── Credential card ── */
  .apw-credential-row {
    margin: 0 16px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0.5px solid rgba(60,60,67,0.18);
    border-radius: 12px;
    padding: 11px 13px;
    background: #fff;
  }
  .apw-credential-thumb {
    width: 50px; height: 32px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg,#1a3a5c 0%,#2a5298 50%,#1565c0 100%);
    display: flex; align-items: center; justify-content: center;
  }
  .apw-credential-name {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #000;
    letter-spacing: -0.24px;
  }
  .apw-credential-type {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 13px;
    color: #8e8e93;
    letter-spacing: -0.08px;
    margin-top: 1px;
  }

  /* ── Fields section ── */
  .apw-fields-section { padding: 0 16px 12px; }
  .apw-preamble {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #000;
    line-height: 1.45;
    letter-spacing: -0.24px;
    margin-bottom: 14px;
  }
  /* 2-column field grid — matches Apple's exact layout */
  .apw-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 10px;
    column-gap: 0;
  }
  .apw-field-item {
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .apw-field-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    color: #3c3c43;
  }
  .apw-field-label {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 14px;
    color: #3c3c43;
    letter-spacing: -0.1px;
  }
  .apw-divider {
    height: 0.5px;
    background: rgba(60,60,67,0.18);
    margin: 14px 0;
  }
  .apw-disclaimer {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 13px;
    color: #8e8e93;
    line-height: 1.45;
    letter-spacing: -0.08px;
  }

  /* ── Face ID action at bottom — NOT a button, matches real Wallet UX ── */
  .apw-faceid-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 16px 20px;
    cursor: pointer;
    border-top: 0.5px solid rgba(60,60,67,0.18);
    -webkit-tap-highlight-color: transparent;
    background: #fff;
  }
  .apw-faceid-action:active { opacity: 0.55; }
  .apw-faceid-svg { color: #007AFF; }
  .apw-faceid-label {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #000;
    letter-spacing: -0.24px;
  }

  /* ─────────────────────────────────────────────────────────────────────
     GOOGLE WALLET — identity consent sheet
     Authentic light-mode Material You UI matching Chrome/Android flow
  ───────────────────────────────────────────────────────────────────── */

  /* ── Google Wallet sheet base (positioning) ── */
  .gw-sheet {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1000;
    background: #ffffff;
    border-radius: 28px 28px 0 0;
    overflow: hidden;
    animation: ios-slide-up 0.3s cubic-bezier(0.2,0,0,1);
    max-width: 430px;
    margin: 0 auto;
  }
  .gw-sheet.show { display: block; }
  .gw-handle {
    width: 32px; height: 4px;
    background: rgba(0,0,0,0.16);
    border-radius: 2px;
    margin: 12px auto 0;
  }

    /* Override base gw-sheet */
  #gwConsentSheet {
    background: #ffffff;
    border-radius: 28px 28px 0 0;
  }
  #gwConsentSheet .gw-handle { background: rgba(0,0,0,0.16); }

  /* ── Transfer header: [Wallet icon] → [Requester icon] ── */
  .gwl-transfer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 24px 14px;
  }
  .gwl-transfer-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.14), 0 0 0 0.5px rgba(0,0,0,0.06);
    flex-shrink: 0;
  }
  .gwl-transfer-icon.brand-dark {
    background: var(--surface2, #181825);
    box-shadow: 0 1px 4px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08);
  }
  .gwl-transfer-arrow {
    font-size: 18px;
    color: #49454f;
    font-family: sans-serif;
    flex-shrink: 0;
  }

  /* ── Title ── */
  .gwl-title {
    font-family: 'Google Sans','Roboto',sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1c1b1f;
    text-align: center;
    padding: 0 24px 16px;
    letter-spacing: -0.2px;
    line-height: 1.3;
  }

  /* ── Credential card ── */
  .gwl-credential-card {
    margin: 0 16px 16px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 13px;
    background: #fff;
  }
  .gwl-credential-thumb {
    width: 48px; height: 31px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg,#1a3a5c 0%,#2a5298 50%,#1565c0 100%);
    display: flex; align-items: center; justify-content: center;
  }
  .gwl-credential-name {
    font-family: 'Google Sans Text','Roboto',sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #1c1b1f;
    letter-spacing: 0.1px;
  }
  .gwl-credential-sub {
    font-family: 'Google Sans Text','Roboto',sans-serif;
    font-size: 12px;
    color: #49454f;
    margin-top: 1px;
    letter-spacing: 0.1px;
  }

  /* ── Scrollable fields area ── */
  .gwl-fields-body {
    max-height: 38vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .gwl-section-header {
    font-family: 'Google Sans Text','Roboto',sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1c1b1f;
    padding: 4px 16px 3px;
    letter-spacing: 0.1px;
  }
  .gwl-section-sub {
    font-family: 'Google Sans Text','Roboto',sans-serif;
    font-size: 14px;
    color: #49454f;
    padding: 0 16px 10px;
    letter-spacing: 0.1px;
  }
  .gwl-field-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px;
    min-height: 40px;
  }
  .gwl-field-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    color: #49454f;
  }
  .gwl-field-name {
    font-family: 'Google Sans Text','Roboto',sans-serif;
    font-size: 14px;
    color: #49454f;
    letter-spacing: 0.1px;
  }
  .gwl-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 4px 24px 8px;
  }
  .gwl-field-bullet {
    font-family: 'Google Sans','Roboto',sans-serif;
    font-size: 14px;
    color: #1c1b1f;
    padding: 5px 0 5px 14px;
    position: relative;
  }
  .gwl-field-bullet::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: #49454f;
  }
  .gwl-divider { height: 1px; background: rgba(0,0,0,0.1); margin: 8px 16px; }
  .gwl-privacy {
    font-family: 'Google Sans Text','Roboto',sans-serif;
    font-size: 12px;
    color: #49454f;
    line-height: 1.55;
    padding: 10px 16px 12px;
    letter-spacing: 0.1px;
  }
  .gwl-privacy a { color: #1a73e8; text-decoration: none; }

  /* ── Bottom actions: Back | Continue ── */
  .gwl-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px 24px;
    border-top: 1px solid rgba(0,0,0,0.08);
    background: #fff;
  }
  .gwl-back-btn {
    font-family: 'Google Sans','Roboto',sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1a73e8;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
    letter-spacing: 0.1px;
    -webkit-tap-highlight-color: transparent;
  }
  .gwl-back-btn:active { opacity: 0.6; }
  .gwl-continue-btn {
    font-family: 'Google Sans','Roboto',sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background: #1a73e8;
    border: none;
    border-radius: 20px;
    padding: 10px 28px;
    cursor: pointer;
    letter-spacing: 0.1px;
    box-shadow: 0 1px 3px rgba(26,115,232,0.4);
  }
  .gwl-continue-btn:active { background: #1557b0; }

  /* ─────────────────────────────────────────────────────────────────────
     APPLE FACE ID full-screen overlay (unchanged — dark, correct)
  ───────────────────────────────────────────────────────────────────── */
  .ios-faceid-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    animation: ios-fade-in 0.2s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .ios-faceid-overlay.show { display: flex; }
  .ios-faceid-icon { width: 82px; height: 82px; position: relative; flex-shrink: 0; }
  .ios-faceid-icon svg { width: 82px; height: 82px; }
  @keyframes faceid-scan {
    0%   { transform: translateY(-24px); opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateY(24px);  opacity: 0; }
  }
  .faceid-scan-line { animation: faceid-scan 1.6s cubic-bezier(0.4,0,0.6,1) infinite; }
  @keyframes faceid-bracket-pulse {
    0%, 100% { opacity: 0.9; }
    50%       { opacity: 0.4; }
  }
  .faceid-brackets { animation: faceid-bracket-pulse 1.6s ease-in-out infinite; }
  .ios-faceid-label {
    font-family: -apple-system,'SF Pro Display','Helvetica Neue',sans-serif;
    font-size: 17px; font-weight: 600; color: #fff; letter-spacing: -0.4px;
  }
  .ios-faceid-sub {
    font-family: -apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
    font-size: 13px; color: rgba(235,235,245,0.6); letter-spacing: -0.08px;
  }

  /* ─────────────────────────────────────────────────────────────────────
     ANDROID FINGERPRINT bottom sheet (Material You light)
  ───────────────────────────────────────────────────────────────────── */
  .android-fp-sheet {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1100;
    background: #fffbfe;
    border-radius: 28px 28px 0 0;
    overflow: hidden;
    animation: ios-slide-up 0.28s cubic-bezier(0.2,0,0,1);
    max-width: 430px;
    margin: 0 auto;
  }
  .android-fp-sheet.show { display: block; }
  .android-fp-handle {
    width: 32px; height: 4px;
    background: rgba(0,0,0,0.16);
    border-radius: 2px;
    margin: 12px auto 0;
  }
  .android-fp-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 24px 28px;
    gap: 10px;
  }
  .android-fp-icon-wrap {
    width: 56px; height: 56px;
    position: relative;
    margin-bottom: 4px;
  }
  @keyframes fp-ripple {
    0%   { transform: scale(1);   opacity: 0.5; }
    80%  { transform: scale(1.7); opacity: 0; }
    100% { transform: scale(1.7); opacity: 0; }
  }
  .android-fp-ripple {
    position: absolute; inset: -10px;
    border-radius: 50%;
    border: 2px solid #1a73e8;
    animation: fp-ripple 1.4s ease-out infinite;
  }
  .android-fp-title {
    font-family: 'Google Sans','Roboto',sans-serif;
    font-size: 20px; font-weight: 500;
    color: #1c1b1f; text-align: center;
    letter-spacing: -0.15px;
  }
  .android-fp-sub {
    font-family: 'Google Sans Text','Roboto',sans-serif;
    font-size: 14px; color: #49454f;
    text-align: center; line-height: 1.43;
  }
  .android-fp-cancel-btn {
    margin-top: 6px;
    padding: 10px 24px;
    background: transparent;
    border: none;
    font-family: 'Google Sans','Roboto',sans-serif;
    font-size: 16px; font-weight: 500;
    color: #1a73e8;
    cursor: pointer; letter-spacing: 0.1px;
  }

  /* ── Verify Digital ID button ── */
  .btn-verify-id {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; background: var(--surface2); color: var(--text-primary);
    border: 1px solid var(--border-bright); border-radius: 10px;
    padding: 16px 28px; cursor: pointer; width: 100%; max-width: 340px; margin: 0 auto;
    font-family: var(--sans); transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
  }
  .btn-verify-id:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0,212,255,0.12);
  }
  .btn-verify-id:active { opacity: 0.8; }
  .btn-verify-id .btn-verify-main {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 600; letter-spacing: -0.2px;
    color: var(--text-primary);
  }
  .btn-verify-id .btn-verify-sub {
    font-size: 11px; color: var(--text-muted); font-weight: 400;
  }
  .btn-verify-providers {
    display: flex; align-items: center; gap: 8px; margin-top: 10px;
  }
  .btn-provider-badge {
    display: flex; align-items: center; gap: 5px;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 6px; padding: 4px 8px;
    font-size: 10px; font-family: var(--mono); letter-spacing: 0.05em;
    color: var(--text-muted);
  }
  .btn-provider-badge svg { flex-shrink: 0; }

  /* ── Citizenship tag input ── */
  .citizenship-tag-wrap {
    border: 1px solid var(--border); border-radius: 3px; padding: 6px 8px;
    background: var(--surface2); display: flex; flex-wrap: wrap;
    gap: 6px; align-items: center; min-height: 42px; cursor: text;
    transition: border-color 0.2s;
  }
  .citizenship-tag-wrap:focus-within { border-color: var(--accent); }
  .citizenship-tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.28);
    border-radius: 2px; padding: 3px 8px 3px 10px; font-size: 11px; color: var(--text-primary);
  }
  .citizenship-tag-remove {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 16px; padding: 0; line-height: 1; display: flex; align-items: center;
    transition: color 0.15s;
  }
  .citizenship-tag-remove:hover { color: var(--warn); }
  .citizenship-add-row {
    display: flex; align-items: center; gap: 6px; flex: 1; min-width: 120px;
  }
  .citizenship-add-row input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-primary); font-size: 13px; font-family: var(--sans);
    padding: 2px 0; min-width: 80px;
  }
  .citizenship-add-row input::placeholder { color: var(--text-muted); }
  .citizenship-add-btn {
    font-size: 11px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 2px; color: var(--text-secondary); cursor: pointer;
    padding: 3px 10px; font-family: var(--sans); white-space: nowrap; transition: border-color 0.15s, color 0.15s;
  }
  .citizenship-add-btn:hover { border-color: var(--accent); color: var(--accent); }

  /* ── Required mark ── */
  .req-mark {
    color: var(--warn);
    font-size: 10px;
    margin-left: 2px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: super;
  }
  .required-footnote {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 12px;
    padding-right: 2px;
    font-style: italic;
  }

  /* ── Purpose of Visit checkboxes ── */
  .purpose-grid {
    display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px;
  }
  .purpose-option {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    padding: 7px 14px; border: 1px solid var(--border); border-radius: 100px;
    background: var(--surface2); font-size: 12px; color: var(--text-secondary);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, color 0.15s;
    user-select: none; white-space: nowrap;
  }
  .purpose-option:hover {
    border-color: rgba(0,212,255,0.4);
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(0,212,255,0.08);
  }
  .purpose-option input[type="checkbox"] {
    display: none; /* hide native checkbox — selection shown via bubble styling */
  }
  .purpose-option .purpose-check-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
  }
  .purpose-option.checked {
    border-color: var(--accent);
    background: rgba(0,212,255,0.08);
    color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,212,255,0.18), 0 0 14px rgba(0,212,255,0.12);
  }
  .purpose-option.checked .purpose-check-dot { opacity: 1; }

  /* ── Classified subsection (neutralized) ── */
  .classified-subsection {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin-top: 14px;
  }

  /* ── Feedback round: field hints, measure inputs, timer states, EMD ── */
  .field-hint {
    font-size: 11.5px;
    margin-top: 5px;
    min-height: 14px;
    color: var(--text-muted);
    font-family: var(--mono);
    letter-spacing: .2px;
  }
  .field-hint.ok  { color: var(--success); }
  .field-hint.err { color: #ff6b6b; }

  .input-error {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 2px rgba(255,107,107,.18) !important;
  }

  /* Height (ft/in) + Weight (lbs) numeric rows */
  .measure-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .measure-row input[type="number"] {
    width: 70px;
    flex: 0 0 auto;
    -moz-appearance: textfield;
  }
  .measure-row input[type="number"]::-webkit-outer-spin-button,
  .measure-row input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .measure-unit {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--mono);
    user-select: none;
  }

  /* Session timer warning / expired states */
  .topbar-badge-session.warn {
    color: var(--warn);
    border-color: var(--warn);
    animation: sessionPulse 1s ease-in-out infinite;
  }
  .topbar-badge-session.expired {
    color: #ff6b6b;
    border-color: #ff6b6b;
    background: rgba(255,107,107,.10);
  }
  @keyframes sessionPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

  /* Electronic Medical Device warning on the confirmation page */
  .confirm-emd-warning {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 4px;
    border: 1px solid var(--warn);
    border-left: 4px solid var(--warn);
    border-radius: 10px;
    background: var(--warn-dim, rgba(240,180,40,.10));
  }
  .confirm-emd-warning-icon {
    font-size: 20px;
    line-height: 1.2;
    color: var(--warn);
    flex: 0 0 auto;
  }
  .confirm-emd-warning-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 3px;
  }
  .confirm-emd-warning-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-secondary);
  }

  /* ── EMD declaration — visually offset from green/cyan affirmations so the
        respondent registers that ticking it is a DECLARATION, not a routine
        certification, and reads it carefully. ── */
  .checkbox-item.emd-declaration {
    border: 1px solid var(--warn);
    border-left: 4px solid var(--warn);
    background: var(--warn-dim, rgba(240,180,40,.08));
    margin-left: 2px;
  }
  .checkbox-item.emd-declaration:hover { border-color: var(--warn); }
  /* Override the cyan "checked" look — stays amber when ticked. */
  .checkbox-item.emd-declaration.checked {
    border-color: var(--warn);
    background: var(--warn-dim, rgba(240,180,40,.14));
  }
  .checkbox-item.emd-declaration input[type="checkbox"] { accent-color: var(--warn); }
  .emd-declaration-tag {
    display: block;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--warn);
    margin-bottom: 4px;
    line-height: 1.4;
  }
  .emd-declaration-tag u { text-underline-offset: 2px; }

  /* Plain inline checkbox (No middle name / Multi-day visit) — a normal
     checkbox + label, no card/highlight. Selector is specific enough to beat
     the uppercase/mono `.field label` rule. */
  label.plain-check,
  .field label.plain-check {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: var(--text-secondary);
  }
  .plain-check span {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: var(--text-secondary);
    line-height: 1.3;
    white-space: nowrap;
  }
  .plain-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
  }
