/* =================================================================
 * UI.Runner.Components — shared Runner component styles
 *
 * Served at /_content/UI.Runner.Components/runner.css
 * Both UI.Portal and UI.Runner link this file.
 *
 * All colors / borders / radii reference --theme-* variables that
 * the host supplies. This file MUST NOT hard-code any palette values
 * so the same components render correctly under every host's theme.
 * ================================================================= */


/* ── Step capture chrome ─────────────────────────────────────────── */

.wf-step-capture {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wf-step-iteration {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--theme-primary-soft, #dbeafe);
    color: var(--theme-primary, #2563eb);
    border-radius: 999px;
    align-self: flex-start;
}

.wf-step-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-text-emphasis, var(--theme-text));
    line-height: 1.35;
}

.wf-step-title {
    font-size: 0.9rem;
    color: var(--theme-text-muted, #6b7280);
    line-height: 1.5;
    margin-top: -0.25rem;
}


/* ── Capture inputs ──────────────────────────────────────────────── */

.wf-capture-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wf-text-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--theme-background-raised, #fff);
    border: 1px solid var(--theme-border, #d0d4da);
    border-radius: var(--theme-radius-button, 6px);
    color: var(--theme-text, #222);
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}

.wf-text-input:focus {
    border-color: var(--theme-primary, #2563eb);
}

.wf-text-input.wf-input-invalid {
    border-color: var(--theme-danger, #dc3545);
}

.wf-capture-error {
    font-size: 0.85rem;
    color: var(--theme-danger, #dc3545);
    padding: 0 0.25rem;
}

.wf-capture-unsupported {
    padding: 0.75rem 1rem;
    background: var(--theme-warning-muted, #fef9c3);
    border-radius: 6px;
    color: var(--theme-warning, #b45309);
    font-size: 0.875rem;
}


/* ── Info step ───────────────────────────────────────────────────── */

.wf-info-step {
    padding: 1rem;
    background: var(--theme-background-subtle, #f8f9fa);
    border-radius: 6px;
    color: var(--theme-text, #222);
    font-size: 0.95rem;
    line-height: 1.6;
    border-left: 3px solid var(--theme-primary, #2563eb);
}

.wf-info-body {
    line-height: 1.6;
}

.wf-info-default {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--theme-border-light, #e5e7eb);
    font-size: 0.875rem;
}

.wf-info-default-label {
    color: var(--theme-text-muted, #6b7280);
    font-weight: 500;
}

.wf-info-default-value {
    font-family: var(--theme-font-mono, ui-monospace, "Cascadia Code", "Consolas", monospace);
    color: var(--theme-text, #222);
    background: var(--theme-surface, #fff);
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    border: 1px solid var(--theme-border-light, #e5e7eb);
}


/* ── Options list (Choice, Loop) ─────────────────────────────────── */

.wf-options-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* wf-option-row is used by CaptureChoice on <li> elements;
   the combined selector keeps Choice and Loop visually identical. */
.wf-options-list li,
.wf-option-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6875rem 1rem;
    background: var(--theme-background-raised, #fff);
    border: 1px solid var(--theme-border, #d0d4da);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--theme-text, #222);
    transition: background 100ms ease, border-color 100ms ease;
    user-select: none;
}

.wf-options-list li:hover:not(.wf-option-disabled),
.wf-option-row:hover:not(.wf-option-disabled) {
    background: var(--theme-background-hover, #f3f4f6);
    border-color: var(--theme-border-subtle, #b0b7bf);
}

.wf-options-list li.wf-option-selected,
.wf-option-row.wf-option-selected {
    background: var(--theme-primary-soft, #dbeafe);
    border-color: var(--theme-primary, #2563eb);
    color: var(--theme-primary, #2563eb);
    font-weight: 500;
}

.wf-option-indicator {
    flex-shrink: 0;
    width: 1.1rem;
    text-align: center;
    font-size: 0.8rem;
}

.wf-option-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.wf-option-required {
    color: var(--theme-danger, #b91c1c);
    margin-left: 0.15rem;
}

.wf-option-status-complete {
    color: var(--theme-success, #16a34a);
    font-weight: 700;
}

.wf-option-status-started {
    color: var(--theme-warning, #b45309);
}

/* Loop leg accent */
.wf-options-list.wf-loop li.wf-option-selected {
    background: var(--theme-primary-muted, rgba(37, 99, 235, 0.1));
    border-color: var(--theme-primary, #2563eb);
    color: var(--theme-primary, #2563eb);
}


/* ── Options list with alphabet jump rail ────────────────────────── */

.wf-options-with-rail {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    position: relative;
}

.wf-options-with-rail .wf-options-list {
    flex: 1 1 auto;
    min-width: 0;
}

.wf-options-list li.wf-options-section {
    display: block;
    padding: 0.5rem 0 0.25rem 0.25rem;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--theme-text-muted, #6b7280);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: default;
    user-select: none;
    scroll-margin-top: 0.5rem;
}

.wf-options-list li.wf-options-section:hover {
    background: transparent;
    border-color: transparent;
}

.wf-options-rail {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    padding: 0.25rem 0.125rem;
    position: sticky;
    top: 0.5rem;
    align-self: flex-start;
    max-height: calc(100vh - 8rem);
    overflow: hidden;
}

.wf-rail-letter {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 1rem;
    height: 0.875rem;
    line-height: 0.875rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--theme-primary, #2563eb);
    cursor: pointer;
    user-select: none;
    text-align: center;
    border-radius: 2px;
}

.wf-rail-letter:hover:not(.wf-rail-inactive) {
    background: var(--theme-primary-soft, #dbeafe);
}

.wf-rail-letter.wf-rail-inactive {
    color: var(--theme-text-muted, #9ca3af);
    opacity: 0.4;
    cursor: default;
}


/* ── Split options ───────────────────────────────────────────────── */

.wf-split-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0.25rem 0;
}

.wf-split-option {
    width: 100%;
    padding: 0.7rem 1.25rem;
    border: 1.5px solid var(--theme-border, #d0d4da);
    border-radius: 1.5rem;
    background: var(--theme-background-raised, #fff);
    color: var(--theme-text, #222);
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.wf-split-option:hover {
    background: var(--theme-background-hover, #f3f4f6);
    border-color: var(--theme-border-subtle, #b0b7bf);
}

.wf-split-option:active {
    background: var(--theme-background-active, #e5e7eb);
}

.wf-split-option-selected {
    background: var(--theme-primary-muted, rgba(37, 99, 235, 0.1));
    border-color: var(--theme-primary, #2563eb);
    color: var(--theme-primary, #2563eb);
    box-shadow: 0 0 0 1px var(--theme-primary, #2563eb),
                0 0 14px rgba(var(--theme-primary-rgb, 37 99 235), 0.22);
}

.wf-split-option-selected:hover {
    background: var(--theme-primary-muted, rgba(37, 99, 235, 0.1));
    border-color: var(--theme-primary, #2563eb);
}


/* ── Choice options ────────────────────────────────────────────── */

.wf-choice-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0.25rem 0;
}

.wf-choice-option {
    width: 100%;
    padding: 0.7rem 1.25rem;
    border: 1.5px solid var(--theme-border, #d0d4da);
    border-radius: 1.5rem;
    background: var(--theme-background-raised, #fff);
    color: var(--theme-text, #222);
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: left;
}

.wf-choice-option-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    font-size: 1.25rem;
    line-height: 1;
}

.wf-choice-option-label {
    flex: 1 1 auto;
}

.wf-choice-option-proceed {
    border-color: color-mix(in srgb, var(--theme-success, #198754) 35%, var(--theme-border, #d0d4da));
}

.wf-choice-option-proceed .wf-choice-option-badge {
    color: var(--theme-success, #198754);
}

.wf-choice-option-proceed:hover {
    background: color-mix(in srgb, var(--theme-success, #198754) 6%, var(--theme-background-raised, #fff));
    border-color: var(--theme-success, #198754);
}

.wf-choice-option-blocked {
    border-color: color-mix(in srgb, var(--theme-danger, #dc3545) 25%, var(--theme-border, #d0d4da));
    cursor: not-allowed;
    opacity: 0.85;
}

.wf-choice-option-blocked .wf-choice-option-badge {
    color: var(--theme-danger, #dc3545);
}

.wf-choice-option-blocked:hover {
    background: var(--theme-background-raised, #fff);
}

.wf-choice-option-exit {
    border-color: color-mix(in srgb, var(--theme-warning, #fd7e14) 35%, var(--theme-border, #d0d4da));
}

.wf-choice-option-exit .wf-choice-option-badge {
    color: var(--theme-warning, #fd7e14);
}

.wf-choice-option-exit:hover {
    background: color-mix(in srgb, var(--theme-warning, #fd7e14) 6%, var(--theme-background-raised, #fff));
    border-color: var(--theme-warning, #fd7e14);
}

.wf-choice-option-exit-selected {
    background: color-mix(in srgb, var(--theme-warning, #fd7e14) 10%, var(--theme-background-raised, #fff));
    border-color: var(--theme-warning, #fd7e14);
    box-shadow: 0 0 0 1px var(--theme-warning, #fd7e14);
}

.wf-choice-option-selected {
    background: color-mix(in srgb, var(--theme-success, #198754) 10%, var(--theme-background-raised, #fff));
    border-color: var(--theme-success, #198754);
    box-shadow: 0 0 0 1px var(--theme-success, #198754);
}


/* ── MultiSplit checkboxes ───────────────────────────────────────── */

.wf-multisplit-check-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.25rem 0;
}

.wf-multisplit-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--theme-border, #d0d4da);
    border-radius: 4px;
    cursor: pointer;
    background: var(--theme-surface, #fff);
}

.wf-multisplit-check:hover {
    background: var(--theme-surface-hover, #f3f4f6);
}

.wf-multisplit-check.wf-option-selected {
    background: var(--theme-primary-soft, #dbeafe);
    border-color: var(--theme-primary, #2563eb);
}

.wf-multisplit-check-label {
    flex: 1;
}


/* ── Loop iteration badge ────────────────────────────────────────── */

.wf-loop-iteration {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--theme-primary, #2563eb);
    background: var(--theme-primary-soft, #dbeafe);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    margin-bottom: 0.5rem;
}


/* ── Entity summary (CaptureEntitySummary + PickerItemReview) ────── */

.wf-entity-summary {
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
}

.wf-entity-summary-header {
    margin-bottom: 0.5rem;
}

.wf-entity-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--theme-text, #222);
}

.wf-entity-summary-empty {
    color: var(--theme-text-muted, #6b7280);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.wf-property-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
}

.wf-property-row + .wf-property-row {
    border-top: 1px solid var(--theme-border, #d0d4da);
}

.wf-property-label {
    flex: 0 0 auto;
    min-width: 9rem;
    color: var(--theme-text-muted, #6b7280);
    font-weight: 500;
    font-size: 0.875rem;
}

.wf-property-value {
    flex: 1;
    font-weight: 500;
    color: var(--theme-text, #222);
    font-size: 0.875rem;
    font-family: var(--theme-font-mono, ui-monospace, "Cascadia Code", "Consolas", monospace);
}

.wf-entity-summary-edit {
    flex: 0 0 auto;
    margin-left: auto;
    background: transparent;
    border: none;
    padding: 0.25rem 0.375rem;
    color: var(--theme-text-muted, #6b7280);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: color 120ms ease, background 120ms ease;
    -webkit-tap-highlight-color: transparent;
}

.wf-entity-summary-edit:hover {
    color: var(--theme-primary, #2563eb);
    background: var(--theme-background-hover, #f3f4f6);
}


/* ── Property list (PickerItemForm review table) ─────────────────── */

.wf-property-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
    margin: 0.25rem 0;
}

.wf-property-list dt {
    font-weight: 500;
    color: var(--theme-text-muted, #6b7280);
}

.wf-property-list dd {
    margin: 0;
    font-family: var(--theme-font-mono, ui-monospace, "Cascadia Code", "Consolas", monospace);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wf-value-text {
    font-weight: 500;
}


/* ── Picker intermediate review ──────────────────────────────────── */

.wf-picker-review-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-text, #222);
    margin-bottom: 0.75rem;
}

.wf-picker-empty,
.wf-picker-no-results {
    padding: 0.75rem 0;
    color: var(--theme-text-muted, #6b7280);
    font-size: 0.95rem;
    text-align: center;
}


/* ── Picker record list ──────────────────────────────────────────── */

.wf-picker-search {
    margin-bottom: 0.6rem;
}

.wf-picker-search-input {
    width: 100%;
    padding: 0.5rem 0.85rem;
    border: 1.5px solid var(--theme-border, #d0d4da);
    border-radius: 0.5rem;
    background: var(--theme-background-raised, #fff);
    color: var(--theme-text, #222);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 150ms ease;
}

.wf-picker-search-input:focus {
    border-color: var(--theme-primary, #2563eb);
}

.wf-picker-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.25rem 0;
}

.wf-picker-record {
    border: 1.5px solid var(--theme-border, #d0d4da);
    border-radius: 0.75rem;
    background: var(--theme-background-raised, #fff);
    overflow: hidden;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.wf-picker-record-selected {
    border-color: var(--theme-primary, #2563eb);
    box-shadow: 0 0 0 1px var(--theme-primary, #2563eb),
                0 0 14px rgba(var(--theme-primary-rgb, 37 99 235), 0.18);
}

.wf-picker-item {
    display: flex;
    align-items: stretch;
}

.wf-picker-item-label {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    background: transparent;
    color: var(--theme-text, #222);
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.wf-picker-record-selected .wf-picker-item-label {
    color: var(--theme-primary, #2563eb);
    background: var(--theme-primary-muted, rgba(37, 99, 235, 0.07));
}

.wf-picker-item-label:hover {
    background: var(--theme-background-hover, #f3f4f6);
}

.wf-picker-item-edit {
    padding: 0 0.85rem;
    border: none;
    border-left: 1px solid var(--theme-border, #d0d4da);
    background: transparent;
    color: var(--theme-text-muted, #6b7280);
    font-size: 1rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 150ms ease, color 150ms ease;
}

.wf-picker-item-edit:hover {
    background: var(--theme-background-hover, #f3f4f6);
    color: var(--theme-text, #222);
}

.wf-picker-item-details {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--theme-border, #d0d4da);
    background: var(--theme-primary-muted, rgba(37, 99, 235, 0.04));
}

.wf-picker-add-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    border: 1.5px dashed var(--theme-border, #d0d4da);
    border-radius: 1.5rem;
    background: transparent;
    color: var(--theme-text-muted, #6b7280);
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.wf-picker-add-btn:hover {
    border-color: var(--theme-primary, #2563eb);
    color: var(--theme-primary, #2563eb);
    background: var(--theme-primary-muted, rgba(37, 99, 235, 0.06));
}


/* ── Picker step-by-step form header + navigation ────────────────── */

.wf-picker-form-tabs {
    display: flex;
    margin-bottom: 1rem;
    border: 1.5px solid var(--theme-border, #d0d4da);
    border-radius: 1.5rem;
    overflow: hidden;
}

.wf-picker-form-tab {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--theme-text-muted, #6b7280);
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.wf-picker-form-tab:hover:not(.wf-picker-form-tab-active) {
    background: var(--theme-surface-hover, #f3f4f6);
}

.wf-picker-form-tab-active {
    background: var(--theme-primary, #2563eb);
    color: #fff;
}

.wf-picker-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.wf-picker-form-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-text, #222);
}

.wf-picker-form-cancel-x {
    padding: 0.2rem 0.55rem;
    border: none;
    background: transparent;
    color: var(--theme-text-muted, #6b7280);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: background 150ms ease, color 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.wf-picker-form-cancel-x:hover {
    background: var(--theme-surface-hover, #f3f4f6);
    color: var(--theme-text, #222);
}

.wf-picker-form-step-count {
    font-size: 0.8rem;
    color: var(--theme-text-muted, #6b7280);
    margin-bottom: 0.5rem;
}

.wf-picker-step-footer {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

.wf-picker-step-footer .wf-nav-back {
    padding: 0.6rem 1rem;
    border: 1.5px solid var(--theme-border, #d0d4da);
    border-radius: 1.5rem;
    background: transparent;
    color: var(--theme-text-muted, #6b7280);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.wf-picker-step-footer .wf-nav-back:hover:not(:disabled) {
    border-color: var(--theme-text-muted, #6b7280);
    color: var(--theme-text, #222);
}

.wf-picker-step-footer .wf-nav-back:disabled {
    opacity: 0.4;
    cursor: default;
}

.wf-picker-step-footer .wf-nav-next {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 1.5rem;
    background: var(--theme-primary, #2563eb);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.wf-picker-step-footer .wf-nav-next:hover {
    background: var(--theme-primary-dark, #1d4ed8);
}


/* ── Picker add / edit form ──────────────────────────────────────── */

.wf-picker-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.25rem 0;
}

.wf-picker-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.wf-picker-form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-text, #222);
}

.wf-picker-form-required {
    margin-left: 0.2rem;
    color: var(--theme-danger, #dc2626);
}

.wf-picker-form-actions {
    display: flex;
    gap: 0.6rem;
    padding-top: 0.25rem;
}

.wf-picker-form-save {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 1.5rem;
    background: var(--theme-primary, #2563eb);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.wf-picker-form-save:hover {
    background: var(--theme-primary-dark, #1d4ed8);
}

.wf-picker-form-cancel {
    padding: 0.65rem 1.25rem;
    border: 1.5px solid var(--theme-border, #d0d4da);
    border-radius: 1.5rem;
    background: transparent;
    color: var(--theme-text-muted, #6b7280);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.wf-picker-form-cancel:hover {
    border-color: var(--theme-text-muted, #6b7280);
    color: var(--theme-text, #222);
}


/* ── Date / time numpad ──────────────────────────────────────────── */

.wf-date-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--theme-background-raised, #fff);
    border: 1px solid var(--theme-border, #d0d4da);
    border-radius: 6px;
    font-size: 1.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: var(--theme-text, #222);
}

.wf-date-segment {
    color: var(--theme-text-muted, #6b7280);
    transition: color 120ms ease;
}

.wf-date-segment-active {
    color: var(--theme-primary, #2563eb);
}

.wf-date-sep {
    color: var(--theme-border, #d0d4da);
    font-weight: 400;
}

.wf-date-sep-dash {
    margin: 0 0.25rem;
    color: var(--theme-text-muted, #6b7280);
    font-weight: 400;
}

.wf-date-display-datetime {
    font-size: 1.3rem;
    gap: 0.2rem;
}

.wf-ampm-indicator {
    margin-left: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--theme-text-muted, #6b7280);
    align-self: flex-end;
    padding-bottom: 0.1rem;
}

.wf-numpad {
    display: grid;
    grid-template-areas:
        "n7 n8 n9 ca"
        "n4 n5 n6 ca"
        "n1 n2 n3 cc"
        "n0 n0 sl cc";
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 3.25rem);
    gap: 0.5rem;
}

.wf-numpad-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 500;
    background: var(--theme-background-raised, #fff);
    border: 1px solid var(--theme-border, #d0d4da);
    border-radius: 6px;
    color: var(--theme-text, #222);
    cursor: pointer;
    transition: background 100ms ease, border-color 100ms ease, opacity 100ms ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.wf-numpad-btn:hover:not(:disabled) {
    background: var(--theme-background-hover, #f3f4f6);
    border-color: var(--theme-border-subtle, #b0b7bf);
}

.wf-numpad-btn:active:not(:disabled) {
    background: var(--theme-background-active, #e5e7eb);
}

.wf-numpad-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wf-numpad-action {
    background: var(--theme-background-subtle, #f8f9fa);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.wf-numpad-action:hover:not(:disabled) {
    background: var(--theme-background-active, #e5e7eb);
}

.wf-numpad-sep {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--theme-text-muted, #6b7280);
}

.wf-numpad.wf-numpad-num {
    grid-template-areas:
        "n7 n8 n9 ca"
        "n4 n5 n6 ca"
        "n1 n2 n3 cc"
        "dp n0 n0 cc";
}

.wf-numpad.wf-numpad-time {
    grid-template-areas:
        "n7 n8 n9 am"
        "n4 n5 n6 pm"
        "n1 n2 n3 md"
        "n0 n0 sl cc";
}

.wf-numpad-btn.wf-ampm-active {
    background: var(--theme-primary, #2563eb);
    color: #fff;
    border-color: var(--theme-primary, #2563eb);
}

.wf-numpad-btn.wf-ampm-active:hover {
    background: var(--theme-primary-hover, #1d4ed8);
    border-color: var(--theme-primary-hover, #1d4ed8);
}

.wf-num-display {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: var(--theme-background-raised, #fff);
    border: 1px solid var(--theme-border, #d0d4da);
    border-radius: 6px;
    font-size: 1.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: var(--theme-text, #222);
    min-height: 3.25rem;
    word-break: break-all;
}

.wf-num-display-empty {
    color: var(--theme-text-muted, #6b7280);
}

.wf-shortcut-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.625rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--theme-border, #d0d4da);
    border-radius: 6px;
    background: var(--theme-background-raised, #fff);
    color: var(--theme-text-muted, #6b7280);
    cursor: pointer;
    transition: background 100ms ease, color 100ms ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.wf-shortcut-btn:hover {
    background: var(--theme-background-hover, #f3f4f6);
    color: var(--theme-text, #222);
}

.wf-shortcut-btn:active {
    background: var(--theme-background-active, #e5e7eb);
}


/* ── Nav buttons (also used by wf-picker-step-footer above) ──────── */

.wf-nav-back,
.wf-nav-next {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    font-family: inherit;
    font-size: var(--theme-font-size-base, 1rem);
    font-weight: 500;
    border-radius: var(--theme-radius-button, 6px);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 120ms ease;
    user-select: none;
}

.wf-nav-back {
    background: var(--theme-background-active);
    border-color: var(--theme-border-subtle, var(--theme-border));
    color: var(--theme-text);
}

.wf-nav-back:hover:not(:disabled) {
    background: var(--theme-background-hover);
    border-color: var(--theme-text-muted);
}

.wf-nav-next {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: var(--theme-text-on-primary, #fff);
}

.wf-nav-next:hover:not(:disabled) {
    background: var(--theme-primary-hover, var(--theme-primary));
    border-color: var(--theme-primary-hover, var(--theme-primary));
}

.wf-nav-back:disabled,
.wf-nav-next:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* ── Review — step header layout ────────────────────────────────── */

.wf-step-header-left {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}

/* ── Review — Info step acknowledgement ─────────────────────────── */

.wf-info-acknowledged {
    font-size: 0.85rem;
    color: var(--theme-text-muted, #6b7280);
    font-style: italic;
}

/* ── Review — split / choice readonly radio group ───────────────── */

.wf-split-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.wf-split-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--theme-text-muted, #6b7280);
    cursor: default;
}

.wf-split-radio.wf-option-selected {
    color: var(--theme-text, #222);
    font-weight: 500;
}

.wf-split-radio input[type="radio"] {
    accent-color: var(--theme-primary, #2563eb);
    cursor: default;
}

.wf-split-radio-label {
    flex: 1;
}


/* ── Mobile adjustments ─────────────────────────────────────────── */

@media (max-width: 480px) {
    .wf-nav-back,
    .wf-nav-next {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}
