/* Offers dashboard — dark theme, matches the sidebar layout. */

.offers-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem;
    color: #f0f6fc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.offers-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.offers-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: #f0f6fc;
}

.offers-subtitle {
    font-size: 1rem;
    color: #8b949e;
    margin: 0.4rem 0 0 0;
}

.offers-create-btn {
    background: #238636;
    color: white;
    padding: 0.7rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.offers-create-btn:hover {
    background: #2ea043;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.3);
    color: white;
    text-decoration: none;
}

/* Hero tile row (list page) — Figma "Campaign Dashboard" two-tile hero. */
.hero-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 720px) {
    .hero-tiles { grid-template-columns: 1fr; }
}

.hero-tile {
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.15rem 1.35rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    position: relative;
}

/* Preview / not-yet-available overlay — diagonal hatch across a whole section. */
.is-preview {
    position: relative;
    overflow: hidden;
}

.is-preview > *:not(.preview-badge) {
    opacity: 0.55;
    filter: saturate(0.7);
}

.is-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.045) 0 8px,
        rgba(255, 255, 255, 0) 8px 16px
    );
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

.preview-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 2;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(240, 185, 11, 0.14);
    color: #f0b90b;
    border: 1px solid rgba(240, 185, 11, 0.35);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
}

.hero-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.hero-tile-icon.tone-credits {
    background: rgba(240, 185, 11, 0.12);
    color: #f0b90b;
}

.hero-tile-icon.tone-portfolio {
    background: rgba(74, 158, 255, 0.14);
    color: #4a9eff;
}

.hero-tile-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.hero-tile-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8b949e;
}

.hero-tile-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-tile-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hero-tile-stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: #f0f6fc;
    line-height: 1.1;
}

.hero-tile-stat-label {
    font-size: 0.75rem;
    color: #8b949e;
}

.hero-tile-footer {
    font-size: 0.75rem;
    color: #6b7480;
    margin-top: 0.2rem;
}

.hero-tile-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.1rem;
}

.hero-tile-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.hero-tile-chip .n {
    font-weight: 700;
}

.hero-tile-chip.tone-live {
    background: rgba(35, 134, 54, 0.15);
    color: #4ac26b;
    border-color: rgba(35, 134, 54, 0.35);
}

.hero-tile-chip.tone-pending {
    background: rgba(240, 185, 11, 0.12);
    color: #f0b90b;
    border-color: rgba(240, 185, 11, 0.3);
}

.hero-tile-chip.tone-paused {
    background: rgba(74, 158, 255, 0.12);
    color: #7cb4ff;
    border-color: rgba(74, 158, 255, 0.3);
}

.hero-tile-chip.tone-draft {
    background: rgba(139, 148, 158, 0.12);
    color: #b0b6be;
    border-color: rgba(139, 148, 158, 0.3);
}

.hero-tile-chip.tone-disapproved {
    background: rgba(248, 81, 73, 0.12);
    color: #ff7b72;
    border-color: rgba(248, 81, 73, 0.3);
}

/* Error banner */
.offers-error-banner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #ff7b72;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.offers-error-banner > i {
    font-size: 1.2rem;
    margin-top: 0.15rem;
    color: #ff7b72;
    flex-shrink: 0;
}

.offers-error-title {
    font-weight: 700;
    color: #ff7b72;
    margin-bottom: 0.25rem;
}

.offers-error-body {
    color: #d9a5a2;
    font-size: 0.85rem;
    line-height: 1.4;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Empty state */
.offers-empty {
    background: #161b22;
    border: 1px dashed #30363d;
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
}

.offers-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(74, 158, 255, 0.12);
    color: #4a9eff;
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.offers-empty-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #f0f6fc;
}

.offers-empty-body {
    color: #8b949e;
    max-width: 460px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.55;
}

/* List rows */
.offers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Column header + the STATUS / OFFER DNA / BEST AUDIENCE FIT cells (WEB_APP_RESTRUCTURE.md §3.9 (3)).
   The head's tail spacer matches the analytics link + ⋯ toggle on the rows. */
.offers-list-head {
    display: flex;
    align-items: center;
    padding: 0 0 0 1.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8b949e;
}
.offers-list-head-offer { flex: 1; }
.offers-list-head-tail { flex: 0 0 104px; }
.offer-row-status { flex: 0 0 150px; }
.offer-row-dna { flex: 0 0 140px; }
.offer-row-fit { flex: 0 0 170px; }
.offer-row-cell {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.85rem;
    color: #8b949e;
}
.offer-dna-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #8b949e;
}
.offer-dna-tag.is-analyzed { color: #5BC1EA; font-weight: 600; }
@media (max-width: 900px) {
    .offers-list-head .offer-row-dna,
    .offers-list-head .offer-row-fit,
    .offer-row-cell.offer-row-dna,
    .offer-row-cell.offer-row-fit { display: none; }
}

/* No overflow:hidden here — the row's ⋯ menu drops below the row and must not be clipped. */
.offer-row {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.15s ease;
}

/* Hover transform gives each row its own stacking context; lift the row whose menu is open
   so the next row can't paint over the dropdown. */
.offer-row.is-menu-open {
    z-index: 5;
}

.offer-row:hover {
    background: #1c232c;
    border-color: #444c56;
    transform: translateY(-1px);
}

.offer-row-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.offer-row-main:hover {
    text-decoration: none;
    color: inherit;
}

/* Locked row — pending/approved offers can't be edited from the list. */
.offer-row-main.is-locked {
    cursor: not-allowed;
    opacity: 0.7;
}

.offer-row-lock {
    color: #8b949e;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.offer-row-analytics {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.15rem;
    border-left: 1px solid #30363d;
    color: #8b949e;
    text-decoration: none;
    transition: all 0.15s ease;
}

.offer-row-analytics:hover {
    background: rgba(74, 158, 255, 0.08);
    color: #4a9eff;
    text-decoration: none;
}

/* Row actions (⋯) — menu styling reuses .wiz-overflow-menu / .wiz-overflow-item */
.offer-row-actions {
    position: relative;
    display: flex;
}

.offer-row-actions-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.15rem;
    background: transparent;
    border: none;
    border-left: 1px solid #30363d;
    /* Last cell in the row — round the right edge so the hover tint stays inside the border. */
    border-radius: 0 11px 11px 0;
    color: #8b949e;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.offer-row-actions-toggle:hover,
.offer-row-actions-toggle[aria-expanded="true"] {
    background: rgba(74, 158, 255, 0.08);
    color: #4a9eff;
}

.offer-row-menu {
    top: calc(100% + 4px);
    right: 4px;
}

/* Fixed icon column so labels line up across eye / pause / play / trash glyphs. */
.offer-row-menu .wiz-overflow-item i {
    width: 1rem;
    text-align: center;
}

.offers-error-banner[hidden] { display: none; }

/* Preview modal — laid out like the wizard's Step 5: summary left, traveler preview right. */
.offers-preview-dialog {
    width: 100%;
    max-width: 1120px;
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 14px;
    overflow: hidden;
    color: #f0f6fc;
}

.offers-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #30363d;
}

.offers-preview-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f0f6fc;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offers-preview-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 1.25rem;
    align-items: start;
    padding: 1.25rem;
    overflow-y: auto;
}

/* Size the phone frame so the whole preview column fits the dialog without scrolling: ~30rem is
   everything above and around the frame (dialog margin, header, pv2 tabs + explainer). Height
   drives width via the frame's 9/17 aspect ratio. */
.offers-preview-phone .pv2-phone-inner {
    width: auto;
    height: clamp(320px, calc(100vh - 30rem), 520px);
}

@media (max-width: 1000px) {
    .offers-preview-body { grid-template-columns: minmax(0, 1fr); }
    /* Stacked: the traveler preview leads, the summary follows. The body scrolls here anyway,
       so the frame gets a fixed comfortable height instead of the fit-to-viewport one. */
    .offers-preview-phone {
        order: -1;
        width: 100%;
        max-width: 380px;
        justify-self: center;
    }
    .offers-preview-phone .pv2-phone-inner { height: 480px; }
}

.offers-confirm-modal .ai-modal { max-width: 440px; }
.offers-confirm-modal strong { color: #f0f6fc; }

.offer-row-image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #0d1117;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-row-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-row-image-placeholder {
    color: #444c56;
    font-size: 1.5rem;
}

.offer-row-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.offer-row-titleline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.offer-row-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f0f6fc;
}

.offer-row-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #8b949e;
    flex-wrap: wrap;
}

.offer-row-score {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #a5d6ff;
}

.offer-row-arrow {
    color: #8b949e;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* Status chips */
.offer-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.offer-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.offer-status-chip.chip-draft {
    background: rgba(139, 148, 158, 0.15);
    color: #b0b6be;
    border-color: rgba(139, 148, 158, 0.3);
}

.offer-status-chip.chip-pending {
    background: rgba(240, 185, 11, 0.12);
    color: #f0b90b;
    border-color: rgba(240, 185, 11, 0.3);
}

.offer-status-chip.chip-live {
    background: rgba(35, 134, 54, 0.15);
    color: #4ac26b;
    border-color: rgba(35, 134, 54, 0.35);
}

.offer-status-chip.chip-paused {
    background: rgba(74, 158, 255, 0.12);
    color: #7cb4ff;
    border-color: rgba(74, 158, 255, 0.3);
}

.offer-status-chip.chip-disapproved {
    background: rgba(248, 81, 73, 0.12);
    color: #ff7b72;
    border-color: rgba(248, 81, 73, 0.3);
}

@media (max-width: 640px) {
    .offers-header {
        flex-direction: column;
        align-items: stretch;
    }
    .credits-banner-stats {
        gap: 1.25rem;
    }
    .offer-row-image {
        width: 56px;
        height: 56px;
    }
}

/* Editor page */
.offer-editor {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    color: #f0f6fc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.offer-editor-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.editor-topbar-left {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    min-width: 0;
}

.editor-back-link {
    color: #c9d1d9;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.editor-back-link i {
    font-size: 0.8rem;
    color: #8b949e;
    transition: color 0.15s ease, transform 0.15s ease;
}

.editor-back-link:hover {
    color: #f0f6fc;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}
.editor-back-link:hover i {
    color: #f0f6fc;
    transform: translateX(-2px);
}
.editor-back-link:focus-visible {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

.editor-topbar-sep {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.editor-topbar-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.editor-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Dirty indicator on the Save button — subtle amber dot, avoids a separate hint element. */
.editor-action-btn.is-dirty::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f0b90b;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.18);
    flex-shrink: 0;
}

.editor-action-btn {
    background: #1f6feb;
    color: white;
    border: none;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.editor-action-btn.primary { background: #238636; }
.editor-action-btn.primary:hover:not(:disabled) { background: #2ea043; }

.editor-action-btn.ghost {
    background: transparent;
    color: #8b949e;
    border: 1px solid #30363d;
    padding: 0.5rem 0.7rem;
    text-decoration: none;
}
.editor-action-btn.ghost:hover:not(:disabled) {
    color: #f0f6fc;
    border-color: #4a9eff;
    text-decoration: none;
}

.editor-action-btn.danger {
    background: transparent;
    color: #ff7b72;
    border: 1px solid rgba(248, 81, 73, 0.35);
    padding: 0.5rem 0.7rem;
}

.editor-action-btn.danger:hover:not(:disabled) {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.6);
}

.editor-action-btn:disabled {
    background: #30363d !important;
    color: #8b949e;
    cursor: not-allowed;
    border-color: transparent;
}

/* Warning + error banners */
.editor-warning-banner,
.editor-error-banner,
.editor-disapproved-banner {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.9rem 1.15rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.editor-disapproved-banner {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.45);
    color: #ff7b72;
}

.editor-disapproved-banner i {
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.editor-disapproved-title {
    font-weight: 700;
    color: #ff7b72;
    margin-bottom: 0.25rem;
}

.editor-disapproved-body {
    color: #f0d0cd;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 0.4rem;
}

.editor-disapproved-hint {
    color: #d9a5a2;
    font-size: 0.8rem;
}

.editor-warning-banner {
    background: rgba(240, 185, 11, 0.08);
    border: 1px solid rgba(240, 185, 11, 0.35);
    color: #f0b90b;
}

.editor-error-banner {
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.35);
    color: #ff7b72;
}

.editor-warning-banner i,
.editor-error-banner i {
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.editor-warning-title {
    font-weight: 700;
    color: #f0b90b;
    margin-bottom: 0.15rem;
}

.editor-warning-body {
    color: #e0c76c;
    font-size: 0.85rem;
}

.editor-error-body {
    color: #d9a5a2;
    font-size: 0.85rem;
    word-break: break-word;
    white-space: pre-wrap;
}

.editor-save-status {
    font-size: 0.82rem;
    color: #8b949e;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s ease;
}

.editor-save-status:empty { display: none; }

.editor-save-status.saving { color: #f0b90b; }
.editor-save-status.saved { color: #4ac26b; }
.editor-save-status.failed { color: #ff7b72; }

.offer-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1120px) {
    .offer-editor-grid {
        grid-template-columns: 1fr;
    }
    .editor-rail-sticky {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

.editor-main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.editor-targeting-card {
    scroll-margin-top: 1.5rem;
}

/* Preview */
.editor-preview-card {
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
}

/* Preview card header — pill tabs + contextual caption. */
.editor-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: #0f151c;
    flex-wrap: wrap;
}

.editor-preview-tabs {
    display: inline-flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 0.2rem;
}

.editor-tab {
    background: transparent;
    border: none;
    color: #8b949e;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.15s ease;
}

.editor-tab:hover {
    color: #c9d1d9;
}

.editor-tab.active {
    background: #4a9eff;
    color: #ffffff;
}

.editor-preview-caption {
    font-size: 0.78rem;
    color: #8b949e;
    letter-spacing: 0.01em;
}

.editor-preview-frame {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    background: #0d1117;
}

/* Phone frame — subtle bezel + notch, matches the Figma preview device. */
.mobile-frame {
    width: 320px;
    background: #0b1017;
    border-radius: 34px;
    padding: 10px 10px 14px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    position: relative;
}

.mobile-frame-notch {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 20px;
    background: #05080c;
    border-radius: 0 0 12px 12px;
    z-index: 1;
}

.mobile-frame-inner {
    background: #0d1117;
    border-radius: 26px;
    overflow: hidden;
    padding: 30px 10px 12px 10px;
    min-height: 480px;
}

.preview-variant {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.preview-variant[hidden] { display: none; }

/* Highlight variant — matches iOS 03.png (home-feed card). */
.preview-section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #f0f6fc;
    padding: 0 0.35rem;
}

.preview-section-label i {
    color: #f0b90b;
    font-size: 0.75rem;
}

.preview-card {
    background: #161b22;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.preview-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #12181f;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-image-placeholder {
    color: #444c56;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
}

.preview-image-placeholder i { font-size: 1.4rem; }

.preview-match-badge {
    position: absolute;
    right: 8px;
    top: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #4ac26b;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(74, 194, 107, 0.4);
}

.preview-match-badge .n {
    color: #ffffff;
    font-weight: 800;
    margin-right: 2px;
}

.preview-card-body {
    padding: 0.65rem 0.85rem 0.85rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.preview-label {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8b949e;
    font-weight: 600;
}

.preview-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f0f6fc;
    line-height: 1.3;
}

.preview-explore-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #a5d6ff;
    font-weight: 600;
    margin-top: 0.15rem;
}

/* Peer card — dimmed preview of a neighboring organic card. */
.preview-peer {
    display: flex;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.5rem 0.65rem;
    opacity: 0.55;
    align-items: center;
}

.preview-peer-image {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: #12181f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444c56;
    font-size: 1rem;
    flex-shrink: 0;
}

.preview-peer-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.preview-peer-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #c9d1d9;
    line-height: 1.2;
}

.preview-peer-body {
    font-size: 0.7rem;
    color: #8b949e;
    line-height: 1.3;
}

/* Detail variant — matches iOS 07.png + Figma-2 detail view. */
.preview-image.detail-image {
    aspect-ratio: 16 / 11;
    border-radius: 14px 14px 0 0;
    margin: -30px -10px 0 -10px;
}

.preview-detail-body {
    padding: 0.9rem 0.35rem 0 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.preview-detail-section-heading {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8b949e;
    margin-top: 0.3rem;
}

.preview-description {
    font-size: 0.82rem;
    color: #b0b6be;
    line-height: 1.5;
    white-space: pre-wrap;
}

.preview-cta-btn-detail {
    background: linear-gradient(180deg, #f5a623 0%, #e8890f 100%);
    color: #1a1006;
    border: none;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: not-allowed;
    width: 100%;
    box-shadow: 0 4px 14px rgba(245, 166, 35, 0.3);
    margin-top: 0.2rem;
}

.preview-detail-location {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    color: #c9d1d9;
    font-size: 0.8rem;
    font-weight: 600;
}

.preview-detail-location i { color: #ff7b72; }

.preview-cta-hint {
    margin-top: 0.2rem;
    font-size: 0.65rem;
    color: #6b7480;
    text-align: center;
    line-height: 1.3;
}

/* Editor form */
.editor-form-card {
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.editor-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f0f6fc;
    margin: 0 0 0.25rem 0;
}

.editor-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    flex: 1;
}

.editor-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c9d1d9;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.editor-field-hint {
    font-size: 0.7rem;
    font-weight: 400;
    color: #8b949e;
}

.editor-field input[type="text"],
.editor-field textarea {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #f0f6fc;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

.editor-field input[type="text"]:focus,
.editor-field textarea:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}

.editor-field input.is-invalid,
.editor-field textarea.is-invalid {
    border-color: rgba(248, 81, 73, 0.55);
}

.editor-field input.is-invalid:focus,
.editor-field textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
}

/* Image dropzone */
.image-dropzone {
    border: 2px dashed #30363d;
    border-radius: 12px;
    background: #0d1117;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-dropzone:hover,
.image-dropzone:focus-visible {
    border-color: #4a9eff;
    background: #12181f;
    outline: none;
}

.image-dropzone.is-dragging {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.08);
}

.image-dropzone-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #8b949e;
}

.image-dropzone-idle i {
    font-size: 1.8rem;
    color: #4a9eff;
    opacity: 0.85;
}

.image-dropzone-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #c9d1d9;
}

.image-dropzone-hint {
    font-size: 0.8rem;
    color: #8b949e;
}

.image-dropzone-preview {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.image-dropzone-preview img {
    max-height: 140px;
    max-width: 60%;
    border-radius: 8px;
    background: #161b22;
    object-fit: cover;
}

.image-dropzone-preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.image-dropzone-aspect-badge {
    background: rgba(35, 134, 54, 0.15);
    color: #4ac26b;
    border: 1px solid rgba(35, 134, 54, 0.35);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.image-dropzone-remove {
    background: transparent;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.image-dropzone-remove:hover {
    border-color: #4a9eff;
    color: #f0f6fc;
}

.image-dropzone-uploading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f0b90b;
    font-weight: 500;
}

.image-dropzone-uploading i {
    font-size: 1.1rem;
}

.image-dropzone-error {
    margin-top: 0.5rem;
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #ff7b72;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Non-blocking "will crop on mobile" note — amber not red. */
.image-dropzone-error.image-dropzone-warning {
    background: rgba(240, 185, 11, 0.08);
    border-color: rgba(240, 185, 11, 0.35);
    color: #e0c76c;
}

.image-url-fallback {
    margin-top: 0.75rem;
    color: #8b949e;
    font-size: 0.85rem;
}

.image-url-fallback summary {
    cursor: pointer;
    padding: 0.4rem 0;
    color: #8b949e;
    user-select: none;
}

.image-url-fallback summary:hover {
    color: #c9d1d9;
}

.image-url-fallback input[type="text"] {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #f0f6fc;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.editor-field-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.editor-radio {
    color: #c9d1d9;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}


/* Right rail — Preview (sticky) + AI Assistant stacked, both always visible. */
.editor-rail {
    min-width: 0;
}

.editor-rail-sticky {
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
}

.editor-ai-card {
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.25rem;
}

/* Targeting panel — card-per-section layout. Each section is a self-contained dark card so
   the four groups (Region, EI, Axes, Phenomena) read as one visual system. */
.targeting-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.targeting-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.15rem 1.15rem 1.25rem;
}

.targeting-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.targeting-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0f6fc;
    margin: 0;
    letter-spacing: 0.005em;
}

.targeting-card-hint {
    font-size: 0.78rem;
    color: #8b949e;
    margin: 0;
    line-height: 1.45;
}

.targeting-empty {
    color: #6b7480;
    font-size: 0.78rem;
    font-style: italic;
}

/* Chips — removable, used for selected regions and selected phenomena */
.targeting-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(74, 158, 255, 0.12);
    border: 1px solid rgba(74, 158, 255, 0.35);
    color: #a5d6ff;
    padding: 0.25rem 0.5rem 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
}

.targeting-chip.via-continent {
    background: rgba(139, 148, 158, 0.12);
    border-color: rgba(139, 148, 158, 0.3);
    color: #b0b6be;
}

.targeting-chip button {
    background: none;
    border: none;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.15rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.12s ease;
}

.targeting-chip button:hover { opacity: 1; }

/* Region section */
.targeting-region-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 1.5rem;
}

.targeting-region-search {
    position: relative;
}

.targeting-region-search i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7480;
    font-size: 0.85rem;
    pointer-events: none;
}

.targeting-region-search input {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 0.55rem 0.75rem 0.55rem 2.15rem;
    color: #f0f6fc;
    font-family: inherit;
    font-size: 0.83rem;
    transition: border-color 0.15s ease;
}

.targeting-region-search input:focus {
    outline: none;
    border-color: #4a9eff;
}

.targeting-region-suggestions {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0.3rem 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 10px;
    z-index: 10;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.targeting-region-suggestions li {
    padding: 0.45rem 0.75rem;
    font-size: 0.83rem;
    color: #c9d1d9;
    cursor: pointer;
}

.targeting-region-suggestions li:hover {
    background: #1c232c;
    color: #f0f6fc;
}

.targeting-region-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.6rem;
}

.targeting-region-controls .targeting-region-search {
    flex: 1 1 240px;
    min-width: 200px;
}

.targeting-continents {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.targeting-continent-btn {
    background: transparent;
    border: 1px solid #30363d;
    color: #b0b6be;
    padding: 0.52rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.targeting-continent-btn:hover {
    border-color: #4a9eff;
    color: #f0f6fc;
}

.targeting-continent-btn.active {
    background: rgba(74, 158, 255, 0.15);
    border-color: #4a9eff;
    color: #f0f6fc;
}

.targeting-region-map {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 2 / 1;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.targeting-region-map svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Display-only map — each country is a single <path data-iso>; selection state is
   reflected via `.is-selected`. `pointer-events: none` disables all mouse interaction
   since users add/remove regions via the search box and chip strip, not the map. */
.targeting-region-map svg [data-iso] {
    fill: rgba(139, 148, 158, 0.25);
    stroke: rgba(0, 0, 0, 0.35);
    stroke-width: 0.4;
    transition: fill 120ms ease;
    pointer-events: none;
}

.targeting-region-map svg [data-iso].is-selected {
    fill: #4a9eff;
}

.targeting-region-map.is-unavailable::before {
    content: 'Map unavailable';
    color: #6b7480;
    font-size: 0.85rem;
}

.targeting-region-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.targeting-region-footer .targeting-region-chips {
    flex: 1 1 auto;
    min-height: unset;
}

.targeting-region-add {
    background: none;
    border: none;
    color: #4a9eff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.15rem 0;
    transition: color 0.12s ease;
}

.targeting-region-add:hover {
    color: #7cb4ff;
    text-decoration: underline;
}

/* Emotional Intent — numbered category rows that expand to reveal per-intent checkboxes.
   `counter-reset` on the container + `counter-increment` on each group renders the numeric
   prefix without hard-coding indexes in JS. */
.targeting-ei-groups {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    counter-reset: ei-index;
}

/* Selected intents as removable chips above the groups, styled like the Phenomena chips. */
.targeting-ei-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 1.5rem;
    margin-bottom: 0.75rem;
}

.targeting-ei-group {
    counter-increment: ei-index;
    border: 1px solid #30363d;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.015);
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.targeting-ei-group:hover {
    border-color: #444c56;
}

.targeting-ei-group.selected {
    border-color: rgba(74, 158, 255, 0.5);
    background: rgba(74, 158, 255, 0.06);
}

.targeting-ei-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.targeting-ei-row.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4a9eff;
}

.targeting-ei-row input[type="checkbox"] {
    accent-color: #4a9eff;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.targeting-ei-title {
    font-size: 0.85rem;
    color: #c9d1d9;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex: 1;
}

.targeting-ei-title::before {
    content: counter(ei-index) '.';
    color: #6b7480;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    min-width: 1.4rem;
}

.targeting-ei-row.selected .targeting-ei-title {
    color: #f0f6fc;
    font-weight: 500;
}

.targeting-ei-row.selected .targeting-ei-title::before {
    color: #4a9eff;
}

.targeting-ei-chevron {
    color: #6b7480;
    font-size: 0.75rem;
    transition: transform 0.18s ease, color 0.15s ease;
    flex-shrink: 0;
}

.targeting-ei-chevron.expanded {
    transform: rotate(180deg);
}

.targeting-ei-row.selected .targeting-ei-chevron {
    color: #4a9eff;
}

.targeting-ei-children {
    display: flex;
    flex-direction: column;
    padding: 0.2rem 0.75rem 0.75rem 2.55rem;
    gap: 0.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.targeting-ei-child {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #b0b6be;
    transition: background 0.12s ease, color 0.12s ease;
}

.targeting-ei-child:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #f0f6fc;
}

.targeting-ei-child input[type="checkbox"] {
    accent-color: #4a9eff;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Axes — one axis per row: label + horizontal pill group. Rows share a subtle divider so
   scanning 12 axes stays readable. */
.targeting-axes {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.targeting-axis {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.targeting-axis-title {
    font-size: 0.78rem;
    color: #b0b6be;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.targeting-axis-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.targeting-axis-chip {
    background: transparent;
    border: 1px solid #30363d;
    color: #b0b6be;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.targeting-axis-chip:hover {
    border-color: #4a9eff;
    color: #f0f6fc;
}

.targeting-axis-chip.active {
    background: rgba(74, 158, 255, 0.15);
    border-color: #4a9eff;
    color: #f0f6fc;
    font-weight: 600;
}

/* Phenomena — search-first pattern: input, selected chips, "+ Add" link. Search-dropdown
   suggestions reuse the region-suggestion styles (see below). */
.targeting-phenomena {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.targeting-phenomena-search {
    position: relative;
}

.targeting-phenomena-search i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7480;
    font-size: 0.85rem;
    pointer-events: none;
}

.targeting-phenomena-search input {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 0.55rem 0.75rem 0.55rem 2.15rem;
    color: #f0f6fc;
    font-family: inherit;
    font-size: 0.83rem;
    transition: border-color 0.15s ease;
}

.targeting-phenomena-search input:focus {
    outline: none;
    border-color: #4a9eff;
}

.targeting-phenomena-suggestions {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0.3rem 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 10px;
    z-index: 10;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.targeting-phenomena-suggestions li {
    padding: 0.45rem 0.75rem;
    font-size: 0.83rem;
    color: #c9d1d9;
    cursor: pointer;
}

.targeting-phenomena-suggestions li:hover {
    background: #1c232c;
    color: #f0f6fc;
}

.targeting-phenomena-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 1.5rem;
}

.targeting-phenomena-add {
    background: none;
    border: none;
    color: #4a9eff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.15rem 0;
    align-self: flex-start;
    transition: color 0.12s ease;
}

.targeting-phenomena-add:hover {
    color: #7cb4ff;
    text-decoration: underline;
}

/* Analytics page */
.analytics-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem;
    color: #f0f6fc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.analytics-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.analytics-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f0f6fc;
    margin: 0.75rem 0 0.5rem 0;
}

.analytics-subtitle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #8b949e;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.analytics-updated { color: #8b949e; }

.analytics-edit-btn {
    background: transparent;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    align-self: center;
}

.analytics-edit-btn:hover {
    border-color: #4a9eff;
    color: #f0f6fc;
    text-decoration: none;
}

.analytics-empty-banner {
    display: flex;
    gap: 1rem;
    background: rgba(74, 158, 255, 0.08);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.analytics-empty-banner i {
    color: #4a9eff;
    font-size: 1.25rem;
    margin-top: 0.15rem;
}

.analytics-empty-title {
    font-weight: 700;
    color: #a5d6ff;
    margin-bottom: 0.15rem;
}

.analytics-empty-body {
    color: #8b949e;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* KPI grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.kpi-label {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8b949e;
    font-weight: 600;
}

.kpi-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #f0f6fc;
    line-height: 1.1;
}

.kpi-hint {
    font-size: 0.75rem;
    color: #6b7480;
    margin-top: auto;
}

/* Panels */
.analytics-panels {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

@media (max-width: 860px) {
    .analytics-panels { grid-template-columns: 1fr; }
}

.analytics-panel {
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
}

.analytics-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f0f6fc;
    margin: 0 0 0.75rem 0;
}

.analytics-chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 0;
    color: #6b7480;
    background: repeating-linear-gradient(
        45deg,
        #0d1117,
        #0d1117 8px,
        #12181f 8px,
        #12181f 16px
    );
    border-radius: 10px;
    font-size: 0.85rem;
}

.analytics-chart-placeholder i {
    font-size: 1.8rem;
    color: #444c56;
}

.analytics-breakdown {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.analytics-breakdown li {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #c9d1d9;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

.analytics-breakdown-label { font-weight: 500; }
.analytics-breakdown-value { color: #8b949e; }

.analytics-inline-empty {
    color: #6b7480;
    font-size: 0.85rem;
    font-style: italic;
    padding: 0.5rem 0;
}

/* AI Assistant panel */
.ai-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Experience Score — horizontal bar (Figma). */
.ai-score-block {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.ai-score-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.ai-score-label {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8b949e;
    font-weight: 700;
}

.ai-score-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #f0f6fc;
    line-height: 1;
    letter-spacing: -0.02em;
}

.ai-score-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.ai-score-bar-fill {
    height: 100%;
    width: 0%;
    background: #30363d;
    border-radius: 999px;
    transition: width 0.35s ease, background 0.2s ease;
}

.ai-score-reason {
    font-size: 0.78rem;
    color: #b0b6be;
    line-height: 1.45;
}

.ai-suggestions-header {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8b949e;
    font-weight: 700;
}

.ai-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

/* Suggestion card — left icon + title/body. */
.ai-suggestion-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.ai-suggestion-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.ai-suggestion-card.kind-positive .ai-suggestion-icon {
    background: rgba(74, 194, 107, 0.15);
    color: #4ac26b;
}

.ai-suggestion-card.kind-warning .ai-suggestion-icon {
    background: rgba(240, 185, 11, 0.15);
    color: #f0b90b;
}

.ai-suggestion-card.kind-suggestion .ai-suggestion-icon,
.ai-suggestion-card:not(.kind-positive):not(.kind-warning) .ai-suggestion-icon {
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
}

.ai-suggestion-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.ai-suggestion-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f0f6fc;
    line-height: 1.3;
}

.ai-suggestion-body {
    font-size: 0.78rem;
    color: #b0b6be;
    line-height: 1.45;
}

/* Bottom actions — one prominent primary, one text-link secondary. */
.ai-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
    align-items: center;
}

.ai-action-btn {
    background: #4a9eff;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    box-shadow: 0 4px 14px rgba(74, 158, 255, 0.25);
}

.ai-action-btn.primary {
    background: #4a9eff;
}

.ai-action-btn:hover {
    background: #2b7bf5;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(74, 158, 255, 0.35);
}

.ai-action-link {
    background: transparent;
    color: #a5d6ff;
    border: none;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.ai-action-link:hover {
    color: #ffffff;
    background: rgba(74, 158, 255, 0.1);
}

.ai-status {
    color: #ff7b72;
    font-size: 0.8rem;
    text-align: center;
}

.ai-status.failed { color: #ff7b72; }

/* AI Assistant — DNA analyzer (Text / URL / File tabs → backend LLM). */
.ai-dna-chat {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: rgba(74, 158, 255, 0.05);
    border: 1px solid rgba(74, 158, 255, 0.18);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.ai-dna-chat-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #a5d6ff;
    font-weight: 700;
}

/* Tab switcher — segment-style toggle over the input area. */
.ai-dna-tabs {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
    align-self: flex-start;
}

.ai-dna-tab {
    background: transparent;
    border: none;
    color: #8b949e;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.ai-dna-tab:hover { color: #f0f6fc; }

.ai-dna-tab.active {
    background: #4a9eff;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.3);
}

.ai-dna-input {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ai-dna-chat textarea,
.ai-dna-chat input[type="url"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    color: #f0f6fc;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    font-size: 0.85rem;
    font-family: inherit;
    line-height: 1.5;
}

.ai-dna-chat textarea {
    resize: vertical;
    min-height: 128px;
}

.ai-dna-chat input[type="url"] {
    height: 40px;
}

.ai-dna-chat textarea:focus,
.ai-dna-chat input[type="url"]:focus {
    outline: none;
    border-color: rgba(74, 158, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}

.ai-dna-input-hint {
    font-size: 0.72rem;
    color: #8b949e;
    padding: 0 0.15rem;
}

/* File dropzone — slim variant of the image dropzone below. */
.ai-dna-file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(74, 158, 255, 0.35);
    border-radius: 10px;
    color: #a5d6ff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    text-align: center;
}

.ai-dna-file-drop:hover,
.ai-dna-file-drop:focus,
.ai-dna-file-drop.is-dragover {
    background: rgba(74, 158, 255, 0.08);
    border-color: rgba(74, 158, 255, 0.6);
    outline: none;
}

.ai-dna-file-drop i {
    font-size: 1.4rem;
    color: #4a9eff;
}

.ai-dna-file-title {
    font-size: 0.82rem;
    color: #f0f6fc;
    font-weight: 500;
}

.ai-dna-file-name {
    font-size: 0.78rem;
    color: #a5d6ff;
    font-weight: 600;
    word-break: break-all;
}

.ai-dna-file-error {
    font-size: 0.78rem;
    color: #ff7b72;
    padding: 0 0.15rem;
}

.ai-dna-file-drop.compact {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 0.55rem;
    padding: 0.5rem 0.75rem;
}

.ai-dna-file-drop.compact i {
    font-size: 1rem;
}

.ai-dna-file-drop.compact .ai-dna-file-title {
    font-size: 0.78rem;
    font-weight: 500;
}

.ai-dna-file-drop.compact .ai-dna-file-name {
    font-size: 0.78rem;
    margin-left: auto;
}

.ai-dna-file-remove {
    background: transparent;
    border: 0;
    color: #8b949e;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 4px;
}
.ai-dna-file-remove:hover { color: #ff7b72; }

.ai-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(20, 24, 32, 0.95);
    color: #f0f6fc;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(74, 158, 255, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    font-size: 0.88rem;
    z-index: 9999;
}
.ai-toast.success { border-color: rgba(74, 194, 107, 0.5); }
.ai-toast.failed  { border-color: rgba(255, 123, 114, 0.5); }

.ai-action-btn.is-loading {
    opacity: 0.85;
    cursor: default;
    transform: none;
}

/* Detected Offer DNA — preview card rendered after Analyze (before Apply). */
.ai-dna-summary {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1rem;
}

.ai-dna-summary-head {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-dna-summary-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8b949e;
    font-weight: 700;
}

.ai-dna-summary-title i { color: #4a9eff; }

.ai-dna-summary-hint {
    font-size: 0.78rem;
    color: #b0b6be;
    line-height: 1.4;
}

.ai-dna-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ai-dna-section-head {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8b949e;
    font-weight: 700;
}

/* Ranked rows for intents & axes. Layout: label · (bar OR value chip) · confidence.
   Bar variant is used for EIs; chip variant carries the axis stop label. Both sections are
   sorted by confidence desc. Compact — no dividers between rows. */
.ai-dna-row {
    display: grid;
    grid-template-columns: 1fr auto 2.2rem;
    align-items: center;
    gap: 0.9rem;
    padding: 0.3rem 0.1rem;
    font-size: 0.88rem;
    color: #d0d7de;
}

.ai-dna-row-label {
    color: #f0f6fc;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.ai-dna-row-bar {
    display: inline-block;
    width: 110px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ai-dna-row-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #4a9eff, #7ac2ff);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.ai-dna-row-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: flex-end;
}

.ai-dna-row-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(74, 158, 255, 0.14);
    color: #a5d6ff;
    font-size: 0.78rem;
    font-weight: 600;
}

.ai-dna-row-conf {
    color: #8b949e;
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    text-align: right;
}

/* Phenomena chip strip — confidence-sorted, small confidence badge on each chip. */
.ai-dna-chip-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ai-dna-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d0d7de;
    font-size: 0.78rem;
    font-weight: 500;
}

.ai-dna-chip-conf {
    background: rgba(74, 158, 255, 0.15);
    color: #a5d6ff;
    font-variant-numeric: tabular-nums;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
}

/* Footer — Apply (primary) + Dismiss (ghost). */
.ai-dna-summary-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-dna-apply {
    width: auto;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
}

.ai-dna-apply:disabled {
    background: rgba(74, 194, 107, 0.85);
    box-shadow: none;
    cursor: default;
    transform: none;
}

.ai-dna-dismiss {
    background: transparent;
    border: none;
    color: #8b949e;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.ai-dna-dismiss:hover {
    color: #f0f6fc;
    background: rgba(255, 255, 255, 0.05);
}

/* Modals */
.ai-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.ai-modal-backdrop[hidden] { display: none; }

.wiz-extracted-modal .ai-modal { max-width: 760px; }
.wiz-review-help { margin: 0; color: #b0b6be; line-height: 1.5; }
/* The body scrolls instead: a tall notice must not squeeze the text the member edits. */
.wiz-extracted-modal .ai-modal-body > * { flex-shrink: 0; }
.wiz-review-notice p { margin: 0; line-height: 1.45; }
.wiz-review-notice .wiz-review-notice-label { margin-top: 0.5rem; font-weight: 600; }
.wiz-review-notice ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.wiz-review-label { color: #f0f6fc; font-size: 0.85rem; font-weight: 600; }
.wiz-review-text {
    width: 100%; box-sizing: border-box; resize: vertical; padding: 0.8rem;
    border: 1px solid #30363d; border-radius: 9px; background: #0d1117;
    color: #f0f6fc; font: inherit; line-height: 1.45;
}
.wiz-review-overrides { min-height: 88px; }
.wiz-extracted-modal .wiz-ai-optional { font-weight: 400; color: rgba(255, 255, 255, 0.5); }

/* "Here's what we found": the extracted Markdown, formatted, faded when long, expandable in place. */
.wiz-found {
    border: 1px solid var(--tn-line);
    border-radius: var(--tn-r-md);
    background: var(--tn-card);
}
.wiz-found__head { padding: 1.1rem 1.25rem 1rem; border-bottom: 1px solid var(--tn-line); }
.wiz-found__title-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.wiz-found__title {
    display: flex; align-items: center; gap: 0.6rem;
    margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--tn-fg-1);
}
.wiz-found__title i { color: var(--tn-leaf); }
.wiz-found__source {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding: 0.3rem 0.75rem; border: 1px solid var(--tn-line-strong); border-radius: var(--tn-r-pill);
    background: rgba(255, 255, 255, 0.04); color: var(--tn-fg-2); font-size: 0.78rem;
}
.wiz-found__help { margin: 0.55rem 0 0; color: var(--tn-fg-2); font-size: 0.88rem; line-height: 1.5; }
.wiz-found__body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.wiz-found__edit-label { color: var(--tn-fg-2); font-size: 0.8rem; font-weight: 500; }
.wiz-found__extra { display: flex; flex-direction: column; gap: 0.5rem; }
.wiz-found__extra[hidden] { display: none; }

.wiz-found__content { position: relative; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; line-height: 1.55; overflow-wrap: anywhere; }
.wiz-found__content.is-collapsed { max-height: 300px; overflow: hidden; }
.wiz-found__content.has-more::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 96px; pointer-events: none;
    background: linear-gradient(to bottom, rgba(16, 28, 37, 0), var(--tn-card));
}
.wiz-found__content > :first-child { margin-top: 0; }
.wiz-found__content > :last-child { margin-bottom: 0; }
.wiz-found__content h1 { margin: 1.1rem 0 0.4rem; color: var(--tn-fg-1); font-size: 1.45rem; font-weight: 600; line-height: 1.25; }
.wiz-found__content h2, .wiz-found__content h3, .wiz-found__content h4, .wiz-found__content h5, .wiz-found__content h6 {
    margin: 1.1rem 0 0.35rem; color: var(--tn-sky); font-size: 0.98rem; font-weight: 600; line-height: 1.3;
}
.wiz-found__content p { margin: 0 0 0.75rem; }
.wiz-found__content strong { color: var(--tn-fg-1); font-weight: 600; }
.wiz-found__content em { color: var(--tn-fg-2); }
.wiz-found__content ul, .wiz-found__content ol { margin: 0 0 0.75rem; padding-left: 1.25rem; }
.wiz-found__content li { margin: 0.2rem 0; }
.wiz-found__content li > ul, .wiz-found__content li > ol { margin: 0.2rem 0 0; }
.wiz-found__content li::marker { color: var(--tn-sky); }
.wiz-found__content blockquote { margin: 0 0 0.75rem; padding-left: 0.9rem; border-left: 2px solid var(--tn-line-strong); color: var(--tn-fg-2); }
.wiz-found__content hr { border: 0; border-top: 1px solid var(--tn-line); margin: 1rem 0; }
.wiz-found__content code { padding: 0.1rem 0.3rem; border-radius: 4px; background: rgba(255, 255, 255, 0.06); font-size: 0.88em; }
.wiz-found__content pre { margin: 0 0 0.75rem; padding: 0.75rem; border-radius: 8px; background: rgba(255, 255, 255, 0.04); overflow-x: auto; }
.wiz-found__content pre code { padding: 0; background: none; }
.wiz-found__content .md-table { margin: 0 0 0.75rem; overflow-x: auto; }
.wiz-found__content table { border-collapse: collapse; font-size: 0.88rem; }
.wiz-found__content th, .wiz-found__content td { padding: 0.35rem 0.6rem; border: 1px solid var(--tn-line); text-align: left; vertical-align: top; }
.wiz-found__content th { color: var(--tn-fg-1); font-weight: 600; }

.wiz-found__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.wiz-found__btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 1.05rem; border-radius: var(--tn-r-pill);
    border: 1px solid var(--tn-line-strong); background: rgba(255, 255, 255, 0.04);
    color: var(--tn-fg-1); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.wiz-found__btn:hover { background: rgba(255, 255, 255, 0.08); }
.wiz-found__btn:focus-visible { outline: 2px solid var(--tn-sky); outline-offset: 2px; }
.wiz-found__btn[hidden] { display: none; }
.wiz-found__btn--edit { border-color: rgba(91, 193, 234, 0.5); background: rgba(91, 193, 234, 0.06); color: var(--tn-sky); }
.wiz-found__btn--edit:hover { background: rgba(91, 193, 234, 0.12); }
.wiz-review-actions {
    display: flex; justify-content: flex-end; gap: 0.75rem; padding: 1rem 1.25rem;
    border-top: 1px solid #30363d;
}

.ai-modal {
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f0f6fc;
}

.ai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #30363d;
}

.ai-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f0f6fc;
}

.ai-modal-close {
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.ai-modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f0f6fc;
}

.ai-modal-body {
    padding: 1.15rem 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ai-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.5rem 0;
    color: #8b949e;
}

.ai-modal-loading i { color: #4a9eff; font-size: 1.1rem; }

.ai-modal-error {
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #ff7b72;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
}

.ai-variant-card {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-variant-index {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8b949e;
    font-weight: 700;
}

.ai-variant-title-preview {
    font-size: 1rem;
    font-weight: 700;
    color: #f0f6fc;
    line-height: 1.3;
}

.ai-variant-body {
    font-size: 0.9rem;
    color: #c9d1d9;
    line-height: 1.5;
    white-space: pre-wrap;
}

.ai-variant-rationale {
    background: rgba(240, 185, 11, 0.06);
    border-left: 3px solid rgba(240, 185, 11, 0.5);
    color: #e0c76c;
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

.ai-variant-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.ai-variant-apply {
    background: #238636;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ai-variant-apply:hover {
    background: #2ea043;
    transform: translateY(-1px);
}

/* Editor top-bar: DNA badge — sits next to the status chip. */
.editor-dna-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.editor-dna-badge i {
    font-size: 0.75rem;
}

.editor-dna-badge.is-ready {
    background: rgba(124, 77, 255, 0.12);
    color: #b199ff;
    border-color: rgba(124, 77, 255, 0.3);
}

.editor-dna-badge.is-missing {
    background: rgba(139, 148, 158, 0.1);
    color: #8b949e;
    border-color: rgba(139, 148, 158, 0.25);
}

/* Editor top-bar: overflow (⋯) menu with Delete inside. */
.editor-overflow {
    position: relative;
    display: inline-flex;
}

.editor-overflow-toggle {
    /* Inherits .editor-action-btn.ghost styling for the round dot icon. */
}

.editor-overflow-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    min-width: 190px;
    padding: 0.35rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.editor-overflow-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: transparent;
    border: none;
    color: #c9d1d9;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.12s ease, color 0.12s ease;
}

.editor-overflow-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f0f6fc;
}

.editor-overflow-item.danger {
    color: #ff7b72;
}

.editor-overflow-item.danger:hover {
    background: rgba(248, 81, 73, 0.1);
    color: #ff7b72;
}

/* ============================================================
   Offer Budget hero (editor top row) — matches the Figma:
   left card = per-offer budget slider; right column = business-
   wide recurring credits + credits-remaining progress card.
   ============================================================ */

.offer-budget-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 960px) {
    .offer-budget-hero {
        grid-template-columns: 1fr;
    }
}

.offer-budget-card {
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.offer-budget-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.offer-budget-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0f6fc;
}

.offer-budget-uncapped {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #8b949e;
    cursor: pointer;
    user-select: none;
}

.offer-budget-uncapped input {
    accent-color: #58a6ff;
}

.offer-budget-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.offer-budget-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f0f6fc;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.offer-budget-unit {
    font-size: 0.9rem;
    color: #8b949e;
}

/* Slider — blue fill on the left of the thumb; grey track behind. Uses a CSS
   variable set from JS (--budget-fill: 0..100%) so we can style the pre-thumb
   half without needing the non-standard ::-webkit-slider-runnable-track split. */
.offer-budget-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        #58a6ff 0%,
        #58a6ff var(--budget-fill, 0%),
        #30363d var(--budget-fill, 0%),
        #30363d 100%
    );
    outline: none;
    cursor: pointer;
    margin: 0.3rem 0 0.1rem 0;
}

.offer-budget-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.offer-budget-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.offer-budget-slider:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.offer-budget-slider[aria-disabled="true"] {
    opacity: 0.4;
    pointer-events: none;
}

.offer-budget-slider-bounds {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6e7681;
    font-variant-numeric: tabular-nums;
}

/* Right column: two stacked cards */
.offer-budget-credits-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.credits-card {
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.credits-card-label {
    font-size: 0.85rem;
    color: #8b949e;
    flex: 1 1 auto;
    min-width: 0;
}

.credits-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.credits-recurring .credits-card-value {
    color: #f0b90b;
}

.credits-remaining .credits-card-value {
    color: #ff7b53;
}

/* Full-width elements inside credits-remaining stack below the label+value row */
.credits-remaining .credits-progress,
.credits-remaining .credits-renew-caption {
    flex: 1 0 100%;
}

.credits-progress {
    height: 8px;
    border-radius: 999px;
    background: #30363d;
    overflow: hidden;
    margin-top: 0.25rem;
}

.credits-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff7b53, #f0b90b);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.credits-renew-caption {
    font-size: 0.75rem;
    color: #6e7681;
    text-align: right;
    margin-top: 0.25rem;
}

/* =========================================================================
   NEW OFFER WIZARD — .wiz-*
   ========================================================================= */

.wiz {
    max-width: 1360px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 2rem;
    color: #f0f6fc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ----- Topbar ----- */
.wiz-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0 1rem;
}
.wiz-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}
.wiz-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #8b949e;
    text-decoration: none;
    font-weight: 500;
}
.wiz-back-link:hover { color: #f0f6fc; text-decoration: none; }
.wiz-topbar-sep {
    width: 1px;
    height: 18px;
    background: #30363d;
}
.wiz-dna-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #21262d;
    color: #8b949e;
    border: 1px solid #30363d;
}
.wiz-dna-badge.is-ready { color: #4ac26b; border-color: rgba(74, 194, 107, 0.4); }
.wiz-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.wiz-save-status {
    font-size: 0.8rem;
    color: #8b949e;
    min-width: 60px;
    text-align: right;
}
.wiz-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    background: #21262d;
    border: 1px solid #30363d;
    color: #f0f6fc;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}
.wiz-action-btn:hover:not(:disabled) { background: #30363d; }
.wiz-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Overflow (⋯) menu — Delete offer lives here */
.wiz-overflow { position: relative; }
.wiz-overflow-toggle {
    padding: 0.4rem 0.6rem;
}
.wiz-overflow-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 0.35rem;
    z-index: 20;
}
.wiz-overflow-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: #f0f6fc;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease;
}
.wiz-overflow-item:hover { background: #21262d; }
.wiz-overflow-item.danger { color: #ff7b72; }
.wiz-overflow-item.danger:hover { background: rgba(255, 123, 114, 0.1); }
.wiz-overflow-item:disabled { opacity: 0.5; cursor: not-allowed; }

/* ----- Stepper header ----- */
.wiz-stepper {
    margin: 0.5rem 0 1.5rem;
    width: 100%;
}
.wiz-stepper-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}
/* Every pill claims an equal share of the row. min-width: 0 lets long labels
   ellipsize/wrap gracefully rather than pushing siblings out of alignment. */
.wiz-step-pill {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
}
.wiz-step-pill-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: #21262d;
    border: 1px solid #30363d;
    color: #6e7681;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wiz-step-pill-btn:disabled { cursor: not-allowed; opacity: 0.75; }
.wiz-step-pill-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #30363d;
    color: #f0f6fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.wiz-step-pill-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wiz-step-pill.is-current .wiz-step-pill-btn {
    background: rgba(74, 158, 255, 0.15);
    border-color: rgba(74, 158, 255, 0.5);
    color: #f0f6fc;
}
.wiz-step-pill.is-current .wiz-step-pill-num {
    background: #4a9eff;
    color: #0d1117;
}
.wiz-step-pill.is-completed .wiz-step-pill-btn {
    background: rgba(74, 194, 107, 0.15);
    border-color: rgba(74, 194, 107, 0.5);
    color: #4ac26b;
}
.wiz-step-pill.is-completed .wiz-step-pill-num {
    background: #4ac26b;
    color: #0d1117;
}
/* Connector lines are their own row items so the gap on either side is symmetric,
   giving equal spacing between every pill. */
.wiz-step-line {
    flex: 0 0 40px;
    height: 2px;
    background: #30363d;
    border-radius: 2px;
}
.wiz-step-pill.is-completed + .wiz-step-line { background: #4ac26b; }

/* ----- Error banner ----- */
.wiz-error-banner {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(255, 123, 114, 0.1);
    border: 1px solid rgba(255, 123, 114, 0.35);
    color: #ff9c95;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.wiz-error-body { flex: 1; }

/* ----- Challenge bridge card (shown after a successful analysis, WEB_APP_RESTRUCTURE.md §3.9) ----- */
.wiz-challenge-bridge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
    border-color: rgba(91, 193, 234, 0.35);
}
.wiz-challenge-bridge[hidden] { display: none; }
.wiz-challenge-bridge__lead { margin: 0; font-size: 0.95rem; color: var(--tn-fg-2); }
.wiz-challenge-bridge__title { margin: 0 0 0.25rem; font-size: 1.35rem; line-height: 1.3; font-weight: 700; color: var(--tn-fg-1); }
.wiz-challenge-bridge .tn-btn { margin-top: 0.5rem; }

/* ----- Body layout: main + rail ----- */
.wiz-body {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 1100px) {
    .wiz-body { grid-template-columns: 1fr; }
}
.wiz-main { min-width: 0; }
.wiz-rail {
    position: sticky;
    top: 1rem;
}

/* ----- Step panels ----- */
.wiz-step-inner {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 14px;
    padding: 1.75rem;
}
.wiz-step-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    color: #f0f6fc;
}

.wiz-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    background: #21262d;
    border: 1px solid #30363d;
    color: #f0f6fc;
    font-size: 0.85rem;
    cursor: pointer;
}
.wiz-inline-btn:hover { background: #30363d; }

/* ----- Common actions row ----- */
.wiz-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.wiz-actions-split { justify-content: space-between; }
.wiz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.wiz-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.wiz-btn-primary {
    background: #238636;
    color: white;
}
.wiz-btn-primary:hover:not(:disabled) { background: #2ea043; }
.wiz-btn-ghost {
    background: transparent;
    color: #8b949e;
    border-color: #30363d;
}
.wiz-btn-ghost:hover:not(:disabled) { background: #21262d; color: #f0f6fc; }
.wiz-btn-submit {
    background: #f0b90b;
    color: #0d1117;
    padding: 0.85rem 2rem;
    font-size: 1rem;
}
.wiz-btn-submit:hover:not(:disabled) { background: #f6c631; }
.wiz-btn-danger {
    background: #da3633;
    color: white;
}
.wiz-btn-danger:hover:not(:disabled) { background: #f85149; }

/* =========================================================================
   STEP 1 — AI Assistant: input → "Reading your offer" → review
   Prototype look (tn tokens, Montserrat via .tn). The review is the owner's
   "Northern Lights Offer Comparison Dashboard" design (2026-10-13).
   ========================================================================= */
.wiz-body.is-step-1 { grid-template-columns: 1fr; }
.wiz-body.is-step-1 .wiz-rail { display: none; }

.wiz-ai [hidden] { display: none !important; }
.wiz-ai .wiz-step-inner {
    background: var(--tn-card);
    border: 1px solid var(--tn-line-soft);
    border-radius: var(--tn-r-card);
    padding: 40px;
}

/* ----- Input ----- */
.wiz-ai-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1000px) {
    .wiz-ai-input { grid-template-columns: 1fr; }
}
.wiz-step-ai { text-align: left; }
.wiz-ai-badge {
    display: table;
    margin: 0 auto 20px;
    padding: 6px 14px;
    border-radius: var(--tn-r-pill);
    border: 1px solid rgba(91, 193, 234, 0.5);
    background: rgba(91, 193, 234, 0.08);
    color: var(--tn-sky);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
}
.wiz-ai-title {
    margin: 0 0 12px;
    text-align: center;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--tn-fg-1);
}
.wiz-ai-subtitle {
    max-width: 520px;
    margin: 0 auto 32px;
    text-align: center;
    color: var(--tn-fg-2);
    font-size: 15px;
    line-height: 1.5;
}
.wiz-ai-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 156px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1.5px dashed rgba(91, 193, 234, 0.45);
    border-radius: var(--tn-r-sm);
    background: rgba(91, 193, 234, 0.02);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.wiz-ai-dropzone:hover, .wiz-ai-dropzone.is-dragover {
    border-color: var(--tn-sky);
    background: rgba(91, 193, 234, 0.06);
}
.wiz-ai-dropzone.has-file {
    border-color: rgba(60, 163, 60, 0.6);
    background: rgba(60, 163, 60, 0.07);
}
.wiz-ai-dropzone-empty, .wiz-ai-dropzone-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.wiz-ai-dropzone-icon { color: var(--tn-fg-2); font-size: 18px; }
.wiz-ai-dropzone-title { font-size: 16px; font-weight: 600; color: var(--tn-fg-1); }
.wiz-ai-dropzone-hint { font-size: 13px; color: var(--tn-fg-2); line-height: 1.4; }
.wiz-ai-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 14px;
    border-radius: var(--tn-r-sm);
    border: 1px solid var(--tn-line-strong);
    background: var(--tn-card-inset);
    cursor: default;
}
.wiz-ai-file-type {
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--tn-coral);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.wiz-ai-file-name { font-size: 15px; font-weight: 600; color: var(--tn-fg-1); word-break: break-all; }
.wiz-ai-file-size { font-size: 13px; color: var(--tn-fg-3); white-space: nowrap; }
.wiz-ai-file-remove {
    border: none;
    background: none;
    color: var(--tn-fg-3);
    padding: 2px 4px;
    cursor: pointer;
}
.wiz-ai-file-remove:hover { color: var(--tn-fg-1); }
.wiz-ai-label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}
.wiz-ai-url, .wiz-ai-text {
    display: block;
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 24px;
    background: var(--tn-page);
    border: 1px solid var(--tn-line);
    border-radius: var(--tn-r-sm);
    color: var(--tn-fg-1);
    font-family: inherit;
    font-size: 14px;
}
.wiz-ai-text { min-height: 112px; resize: vertical; line-height: 1.45; }
.wiz-ai-url::placeholder, .wiz-ai-text::placeholder { color: var(--tn-fg-3); }
.wiz-ai .wiz-ai-url:focus, .wiz-ai .wiz-ai-text:focus {
    outline: none;
    border-color: var(--tn-sky);
    box-shadow: 0 0 0 3px rgba(91, 193, 234, 0.15);
}
.wiz-ai-status { font-size: 13px; color: var(--tn-fg-2); }
.wiz-ai-status:empty { display: none; }
.wiz-ai-error { margin-top: 12px; font-size: 13px; color: var(--tn-coral); }
.wiz-ai .wiz-actions { margin-top: 8px; align-items: center; }
.wiz-ai .wiz-btn { font-family: inherit; border-radius: var(--tn-r-sm); }
.wiz-ai .wiz-btn-primary { background: var(--tn-leaf); padding: 13px 24px; }
.wiz-ai .wiz-btn-primary:hover:not(:disabled) { background: var(--tn-leaf); filter: brightness(1.08); }
.wiz-ai .wiz-btn-primary:disabled {
    opacity: 1;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
}
.wiz-btn-link {
    background: none;
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
    color: var(--tn-fg-2);
    font-weight: 500;
}
.wiz-btn-link:hover:not(:disabled) { color: var(--tn-fg-1); }

.wiz-ai-getback { padding: 22px 22px 20px; }
.wiz-ai-getback__title { margin: 0 0 16px; font-size: 16px; font-weight: 600; color: var(--tn-fg-1); }
.wiz-ai-getback__list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: getback;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.wiz-ai-getback__list li {
    counter-increment: getback;
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--tn-fg-2);
}
.wiz-ai-getback__list li::before {
    content: counter(getback);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--tn-sky);
    font-weight: 600;
}
.wiz-ai-getback__list strong { color: var(--tn-fg-1); font-weight: 600; }
.wiz-ai-getback__note {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--tn-line);
    font-size: 13px;
    line-height: 1.45;
    color: var(--tn-fg-3);
}

/* ----- Reading ----- */
.wiz-ai .wiz-ai-reading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 96px 40px;
    text-align: center;
}
.wiz-ai-spinner {
    width: 54px;
    height: 54px;
    margin-bottom: 28px;
    border-radius: 50%;
    border: 3px solid rgba(91, 193, 234, 0.15);
    border-bottom-color: var(--tn-sky);
    animation: wiz-ai-spin 0.9s linear infinite;
}
@keyframes wiz-ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wiz-ai-spinner { animation-duration: 3s; } }
.wiz-ai-reading__title { margin: 0 0 12px; font-size: 26px; font-weight: 600; color: var(--tn-fg-1); }
.wiz-ai-reading__text { margin: 0; font-size: 16px; color: var(--tn-fg-2); }

/* ----- Review: Original vs TravelNet's suggestion ----- */
.orv { display: flex; flex-direction: column; gap: 16px; }
.orv-image-picker {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--tn-line);
    border-radius: var(--tn-r-md);
    background: var(--tn-card);
}
.orv-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
@media (max-width: 1100px) {
    .orv-cards { grid-template-columns: 1fr; }
}
.orv-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 22px;
    border-radius: var(--tn-r-md);
    border: 1px solid var(--tn-line);
    background: linear-gradient(180deg, #0f2330 0%, var(--tn-card) 100%);
}
.orv-card--suggested {
    border-color: rgba(91, 193, 234, 0.55);
    box-shadow: 0 0 24px rgba(91, 193, 234, 0.12);
}
.orv-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.orv-card__eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tn-fg-1);
}
.orv-card--suggested .orv-card__eyebrow { color: var(--tn-sky); }
.orv-strength { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.orv-strength__value { font-size: 40px; line-height: 1; font-weight: 700; color: var(--tn-fg-1); }
.orv-strength__value small { font-size: 18px; font-weight: 600; margin-left: 2px; }
.orv-strength.is-good .orv-strength__value { color: #35d05c; }
.orv-strength.is-weak .orv-strength__value { color: var(--tn-amber-strong); }
.orv-strength__label { font-size: 13px; color: var(--tn-fg-2); }

.orv-card__body {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: start;
}
@media (max-width: 640px) {
    .orv-card__body { grid-template-columns: 1fr; }
    .orv-hero { aspect-ratio: 16 / 10; }
}
.orv-hero {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 4;
    border-radius: var(--tn-r-sm);
    overflow: hidden;
    border: 1px solid var(--tn-line);
    background: linear-gradient(160deg, #1d4a5e 0%, #12303f 45%, var(--tn-page) 100%);
}
.orv-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.orv-hero__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px 14px 14px;
    background: linear-gradient(180deg, rgba(5, 10, 14, 0) 0%, rgba(5, 10, 14, 0.85) 60%);
}
.orv-hero__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    overflow-wrap: anywhere;
}
.orv-hero__location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.orv-scores { padding-top: 22px; border-top: 1px solid var(--tn-line); }
.orv-scores__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}
.orv-dims { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 24px; }
.orv-dim {
    display: grid;
    grid-template-columns: 92px minmax(40px, 1fr) max-content;
    gap: 12px;
    align-items: center;
}
.orv-dim__name { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tn-fg-1); }
.orv-dim__bar { height: 8px; border-radius: var(--tn-r-pill); background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.orv-dim__fill { display: block; height: 100%; border-radius: inherit; transition: width 0.4s ease; }
.orv-dim__fill.is-good { background: #35d05c; }
.orv-dim__fill.is-fair { background: var(--tn-sky-strong); }
.orv-dim__fill.is-weak { background: var(--tn-amber-strong); }
.orv-dim__value { min-width: 96px; font-size: 14px; white-space: nowrap; }
.orv-dim__value b { font-weight: 600; color: var(--tn-fg-1); }
.orv-dim__value .is-good { color: #35d05c; }
.orv-dim__value .is-fair { color: var(--tn-sky); }
.orv-dim__value .is-weak { color: var(--tn-amber-strong); }

.orv-desc { max-width: 560px; }
.orv-desc__label { margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--tn-fg-1); }
.orv-desc__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.orv-desc__text.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.orv-desc__more {
    margin-top: 4px;
    padding: 0;
    border: none;
    background: none;
    color: var(--tn-sky);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.orv-desc__count { margin-top: 8px; font-size: 13px; color: var(--tn-fg-3); }

.orv-card__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: auto; }
.orv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 156px;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, background 0.15s ease;
}
.orv-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.orv-btn--outline { background: transparent; border-color: var(--tn-sky); color: var(--tn-sky); }
.orv-btn--outline:hover:not(:disabled) { background: rgba(91, 193, 234, 0.08); }
/* One primary colour across the portal: green (UI review X5, 2026-10-19). */
.orv-btn--primary { min-width: 236px; background: var(--tn-leaf, #3CA33C); color: #fff; }
.orv-btn--primary:hover:not(:disabled) { filter: brightness(1.08); }

.orv-why {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 22px 28px;
    border-radius: var(--tn-r-md);
    border: 1px solid var(--tn-line);
    background: var(--tn-card);
}
.orv-why__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(91, 193, 234, 0.1);
    color: #fff;
    font-size: 34px;
}
.orv-why__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tn-sky);
}
.orv-why__text { margin: 0; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, 0.78); }
@media (max-width: 640px) {
    .wiz-ai .wiz-step-inner { padding: 24px 18px; }
    .orv-why { grid-template-columns: 1fr; }
    .orv-why__icon { width: 56px; height: 56px; font-size: 24px; }
}
.orv-footer { display: flex; }

.wiz-step[data-step="1"] .wiz-challenge-bridge { margin: 16px 0 0; }

/* =========================================================================
   STEP 2 — Offer form
   ========================================================================= */
.wiz-field { margin-bottom: 1rem; }
.wiz-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 0.4rem;
}
.wiz-field input[type="text"],
.wiz-field input[type="date"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #f0f6fc;
    font-size: 0.9rem;
    font-family: inherit;
    color-scheme: dark;
}
.wiz-field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #f0f6fc;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}
.wiz-field input:focus,
.wiz-field textarea:focus,
.wiz-ai-text:focus,
.wiz-ai-url:focus,
[data-experience-block] textarea:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}
.wiz-field input::placeholder,
.wiz-field textarea::placeholder,
[data-experience-block] textarea::placeholder {
    color: #6e7681;
    font-style: italic;
    font-weight: 400;
    opacity: 1;
}
.wiz-field input:focus::placeholder,
.wiz-field textarea:focus::placeholder,
[data-experience-block] textarea:focus::placeholder {
    color: #484f58;
}
.wiz-field-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.wiz-check-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0;
    margin-bottom: 1rem;
    cursor: pointer;
    color: #f0f6fc;
    font-size: 0.9rem;
    font-weight: 500;
    user-select: none;
}
.wiz-check-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #4a9eff;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

/* Sections in Step 2 are flat — no card backgrounds. Just heading + hint + fields,
   with vertical rhythm between them. */
.wiz-section {
    margin-bottom: 1.75rem;
    transition: opacity 0.15s ease;
}
.wiz-section:last-of-type { margin-bottom: 1rem; }
.wiz-section.is-disabled,
.wiz-section [data-experience-block] .wiz-section-heading + .wiz-section-hint + textarea:disabled {
    /* placeholder — real dimming comes from the class below */
}
.wiz-section-heading {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 0.25rem;
}
/* Image and title sections have no hint line — give the control below some room. */
.wiz-section-heading:not(:has(+ .wiz-section-hint)) { margin-bottom: 0.6rem; }
.wiz-section-hint {
    font-size: 0.82rem;
    color: #6e7681;
    margin-bottom: 0.85rem;
    line-height: 1.4;
}

/* Section-1 image picker: upload button, then (after a URL extraction) the web page's images
   as a single scrolling strip on the next line, one hint line underneath. */
.wiz-image-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
}
.wiz-image-picker > .wiz-inline-btn { flex-shrink: 0; }
/* The wrapper's children join the picker: strip and foot each take a full line. */
.wiz-image-suggestions { display: contents; }
.wiz-image-suggestions[hidden] { display: none; }
/* A picked web-page image that couldn't be copied: why, plus an upload button. */
.wiz-image-error {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    background: rgba(255, 123, 114, 0.1);
    border: 1px solid rgba(255, 123, 114, 0.35);
    color: #ff9c95;
    font-size: 0.85rem;
    line-height: 1.4;
}
.wiz-image-error[hidden] { display: none; }
.wiz-image-error > i { margin-top: 0.15rem; }
.wiz-image-error-body { flex: 1; min-width: 0; }
.wiz-image-error-body p { margin: 0 0 0.6rem; }
.wiz-image-suggestions-strip {
    flex-basis: 100%;
    min-width: 0;
    display: flex;
    gap: 0.5rem;
    padding: 2px 2px 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #30363d transparent;
}
.wiz-image-suggestions-strip:empty { display: none; }
.wiz-image-suggestions-foot {
    flex-basis: 100%;
    font-size: 0.72rem;
    color: #6e7681;
    line-height: 1.35;
}
.wiz-image-suggestions-decline {
    background: transparent;
    border: none;
    padding: 0;
    margin-left: 0.4rem;
    color: #8b949e;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.wiz-image-suggestions-decline:hover { color: #f0f6fc; }
.wiz-image-suggestion {
    position: relative;
    flex: 0 0 auto;
    width: 120px;
    height: 80px;
    padding: 0;
    background: #0d1117;
    border: 2px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color 0.15s ease;
}
.wiz-image-suggestion img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wiz-image-suggestion:hover:not(:disabled) { border-color: #484f58; }
.wiz-image-suggestion:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.35);
}
.wiz-image-suggestion.is-selected { border-color: #4a9eff; }
/* Placeholder tile while the image loads. */
.wiz-image-suggestion.is-loading {
    cursor: default;
    background: linear-gradient(90deg, #161b22 0%, #21262d 50%, #161b22 100%) 0 0 / 200% 100%;
    animation: wiz-image-shimmer 1.2s linear infinite;
}
.wiz-image-suggestion.is-loading img { visibility: hidden; }
@keyframes wiz-image-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
    .wiz-image-suggestion.is-loading { animation: none; }
}
.wiz-image-suggestion-check {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a9eff;
    color: #0d1117;
    font-size: 0.65rem;
    display: none;
    align-items: center;
    justify-content: center;
}
.wiz-image-suggestion.is-selected .wiz-image-suggestion-check { display: inline-flex; }
/* When "no experience side" is checked, dim the section-1 header, hint, and textarea. */
[data-experience-block] textarea:disabled,
[data-experience-block] textarea[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    background: #0d1117;
}
[data-experience-block]:has(input[data-toggle-experience]:checked) .wiz-section-heading,
[data-experience-block]:has(input[data-toggle-experience]:checked) .wiz-section-hint {
    opacity: 0.4;
}

/* Section-1 experience textarea sits directly on the flat background */
[data-experience-block] textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #f0f6fc;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}
.wiz-optional {
    font-weight: 400;
    color: #8b949e;
    font-size: 0.8rem;
    margin-left: 0.35rem;
}
.wiz-reward-hint {
    font-size: 0.78rem;
    color: #8b949e;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}
.wiz-reward-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.wiz-chip-radio {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 999px;
    font-size: 0.82rem;
    cursor: pointer;
    color: #b8c1cc;
    user-select: none;
    transition: all 0.15s ease;
}
.wiz-chip-radio input {
    /* Radio input hidden — the chip itself is the visual affordance. */
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}
.wiz-chip-radio:hover {
    border-color: #484f58;
    color: #f0f6fc;
}
.wiz-chip-radio:has(input:checked) {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.15);
    color: #f0f6fc;
    font-weight: 600;
}
.wiz-field-hint {
    font-size: 0.72rem;
    color: #6e7681;
    margin-top: 0.3rem;
    line-height: 1.35;
}
/* Inline field errors — set by wizard.js (Link URL format check, server field errors). */
.wiz-field-error {
    font-size: 0.75rem;
    color: #ff9c95;
    margin-top: 0.3rem;
    line-height: 1.35;
}
.wiz-field input.is-invalid,
.wiz-field textarea.is-invalid,
[data-experience-block] textarea.is-invalid {
    border-color: rgba(248, 81, 73, 0.55);
}
.wiz-field input.is-invalid:focus,
.wiz-field textarea.is-invalid:focus,
[data-experience-block] textarea.is-invalid:focus {
    border-color: rgba(248, 81, 73, 0.55);
    box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
}

/* Section-3 "Offer availability" — two date pickers side by side */
.wiz-availability {
    margin-top: 1rem;
}
.wiz-availability-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 0.5rem;
}
.wiz-availability-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.wiz-date-wrap {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
}
.wiz-date-wrap input[type="date"] {
    flex: 1;
    min-width: 0;
    width: auto;
}
/* Safari renders empty date inputs with today's date shown in its accent
   color, which reads like a real value. Style those segments as a clearly
   muted italic hint so users don't confuse it with actual data.
   `-webkit-text-fill-color` is required because Safari applies it directly on
   the datetime-edit pseudo-elements and it overrides plain `color`. */
.wiz-date-wrap input[type="date"].is-empty:not(:focus)::-webkit-datetime-edit,
.wiz-date-wrap input[type="date"].is-empty:not(:focus)::-webkit-datetime-edit-fields-wrapper,
.wiz-date-wrap input[type="date"].is-empty:not(:focus)::-webkit-datetime-edit-text,
.wiz-date-wrap input[type="date"].is-empty:not(:focus)::-webkit-datetime-edit-month-field,
.wiz-date-wrap input[type="date"].is-empty:not(:focus)::-webkit-datetime-edit-day-field,
.wiz-date-wrap input[type="date"].is-empty:not(:focus)::-webkit-datetime-edit-year-field {
    color: #6e7681;
    -webkit-text-fill-color: #6e7681;
    font-style: italic;
    opacity: 0.75;
}
.wiz-date-clear {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #6e7681;
    cursor: pointer;
    padding: 0 0.7rem;
    font-size: 0.85rem;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.wiz-date-clear:hover {
    color: #f0f6fc;
    background: #21262d;
    border-color: #484f58;
}
.wiz-date-clear:focus-visible {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}

/* =========================================================================
   STEP 4 — Budget
   ========================================================================= */
.wiz-credits-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.wiz-credits-card {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}
.wiz-credits-label {
    font-size: 0.8rem;
    color: #8b949e;
    margin-bottom: 0.4rem;
}
.wiz-credits-value {
    font-size: 2rem;
    font-weight: 700;
    color: #f0f6fc;
    line-height: 1;
}
.wiz-credits-value-warn { color: #ff7b53; }
.wiz-credits-progress {
    height: 6px;
    border-radius: 999px;
    background: #30363d;
    margin-top: 0.75rem;
    overflow: hidden;
}
.wiz-credits-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff7b53, #f0b90b);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.wiz-budget-block {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.25rem;
}
.wiz-budget-header { margin-bottom: 0.75rem; }
.wiz-budget-title {
    font-size: 1rem;
    font-weight: 600;
}
.wiz-budget-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.wiz-budget-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a9eff;
    line-height: 1;
}
.wiz-budget-unit {
    color: #8b949e;
    font-size: 0.85rem;
}
.wiz-budget-slider {
    width: 100%;
    accent-color: #4a9eff;
}
.wiz-budget-bounds {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6e7681;
    margin-top: 0.25rem;
}

/* =========================================================================
   STEP 5 — Overview
   ========================================================================= */
.wiz-overview-card {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.wiz-overview-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f0f6fc;
    margin: 0 0 1rem;
}
.wiz-overview-audience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 900px) {
    .wiz-overview-audience-grid { grid-template-columns: 1fr; }
}
.wiz-overview-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.wiz-overview-sub-title {
    font-size: 0.9rem;
    color: #f0f6fc;
    font-weight: 600;
    margin-bottom: 0.6rem;
}
.wiz-overview-empty {
    color: #6e7681;
    font-size: 0.85rem;
    font-style: italic;
}

/* Chips shared by regions + phenomena — soft blue outline, same visual weight */
.wiz-overview-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
    background: rgba(74, 158, 255, 0.12);
    border: 1px solid rgba(74, 158, 255, 0.35);
    color: #a5d6ff;
}
.wiz-overview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Region — display-only map + chip strip mirroring Step 3 selection */
.wiz-overview-region {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.wiz-overview-region-map {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 2 / 1;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wiz-overview-region-map svg {
    width: 100%;
    height: 100%;
    display: block;
}
.wiz-overview-region-map svg [data-iso] {
    fill: rgba(139, 148, 158, 0.25);
    stroke: rgba(0, 0, 0, 0.35);
    stroke-width: 0.4;
    pointer-events: none;
}
.wiz-overview-region-map svg [data-iso].is-selected {
    fill: #4a9eff;
}
.wiz-overview-region-map.is-unavailable::before {
    content: 'Map unavailable';
    color: #6b7480;
    font-size: 0.85rem;
}
/* Global chip, or one group per continent: title with a count, then the countries picked
   (or, under "All except", the ones left out) so the exact selection can be checked. */
.wiz-overview-region-chips {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 1.5rem;
}
.wiz-overview-region-group-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8b949e;
    margin-bottom: 0.35rem;
}
.wiz-overview-region-note {
    align-self: center;
    font-size: 0.78rem;
    color: #b0b6be;
}
.wiz-overview-chip.is-excluded {
    background: rgba(139, 148, 158, 0.12);
    border-color: rgba(139, 148, 158, 0.3);
    color: #b0b6be;
}

/* Emotional Intent — numbered category rows with a gold check + subtle olive fill */
.wiz-overview-ei {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.wiz-overview-ei-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.10);
    border: 1px solid rgba(212, 175, 55, 0.28);
}
.wiz-overview-ei-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 4px;
    background: #d4af37;
    color: #0d1117;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.wiz-overview-ei-label {
    color: #e8d888;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Axes — icon chip + human label per axis */
.wiz-overview-axes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.wiz-overview-axis-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.wiz-overview-axis-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: rgba(74, 158, 255, 0.10);
    border: 1px solid rgba(74, 158, 255, 0.25);
    color: #a5d6ff;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.wiz-overview-axis-label {
    color: #8b949e;
    font-size: 0.85rem;
}

/* Budget hero — big number + inline unit on one line */
.wiz-overview-budget {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.wiz-overview-budget .wiz-overview-card-title {
    margin: 0;
    flex-shrink: 0;
    min-width: 8rem;
}
.wiz-overview-budget-line {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}
.wiz-overview-budget-value {
    font-size: 2.4rem;
    font-weight: 700;
    color: #4a9eff;
    line-height: 1;
}
.wiz-overview-budget-unit {
    color: #8b949e;
    font-size: 0.9rem;
}

/* =========================================================================
   RIGHT RAIL — .pv2-*  (Preview v2)
   ========================================================================= */
.pv2 {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* Header block */
.pv2-header { display: flex; flex-direction: column; gap: 0.15rem; }
.pv2-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f0f6fc;
}
.pv2-subtitle {
    font-size: 0.78rem;
    color: #8b949e;
    line-height: 1.35;
}
.pv2-coverage {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.pv2-coverage-label {
    font-size: 0.72rem;
    color: #6e7681;
    font-weight: 500;
}
.pv2-coverage-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff7b53;
    box-shadow: 0 0 0 2px rgba(255, 123, 83, 0.2);
}

/* Tabs */
.pv2-tabs {
    display: flex;
    gap: 0.35rem;
    padding: 0.3rem;
    background: #0d1117;
    border-radius: 999px;
}
.pv2-tab {
    flex: 1;
    padding: 0.45rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: #f0f6fc;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.pv2-tab:hover:not(.is-active) { background: #21262d; }
.pv2-tab.is-active {
    background: #4a9eff;
    color: #0d1117;
}

/* Explanation card — tint + border reflect the active phase (booking = green) */
.pv2-explanation {
    display: flex;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    background: rgba(74, 194, 107, 0.08);
    border: 1px solid rgba(74, 194, 107, 0.35);
    color: #f0f6fc;
}
.pv2-explanation-icon {
    color: #4ac26b;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-top: 0.05rem;
}
.pv2-explanation-body { flex: 1; }
.pv2-explanation-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 0.15rem;
}
.pv2-explanation-text {
    font-size: 0.75rem;
    color: #b8c1cc;
    line-height: 1.4;
}

.pv2-live-label {
    font-size: 0.68rem;
    color: #6e7681;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    margin-top: 0.25rem;
}

/* Mobile-phone frame around the preview card */
.pv2-phone {
    display: flex;
    justify-content: center;
    padding: 0.25rem 0 0.5rem;
}
.pv2-phone-inner {
    width: 100%;
    aspect-ratio: 9 / 17;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Card fills the phone frame */
.pv2-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #161b22;
    border-radius: 16px;
    overflow: hidden;
    min-height: 0;
}
.pv2-card-image {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #0d1117;
    overflow: hidden;
}
.pv2-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pv2-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: #6e7681;
    font-size: 0.75rem;
    text-align: center;
    background: repeating-linear-gradient(
        135deg,
        #161b22 0px, #161b22 8px,
        #1c222b 8px, #1c222b 16px
    );
}
.pv2-image-placeholder i {
    font-size: 1.6rem;
    color: #484f58;
}
.pv2-image-uploading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(13, 17, 23, 0.72);
    color: #f0f6fc;
    font-size: 0.8rem;
    z-index: 2;
}
.pv2-image-uploading i { font-size: 1.5rem; color: #58a6ff; }
.wiz-inline-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Title overlay on the bottom of the image */
.pv2-card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 0.85rem 0.85rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.45) 60%,
        transparent 100%
    );
}
.pv2-card-title {
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Body below the image */
.pv2-card-body {
    padding: 0.7rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: #161b22;
}
.pv2-card-caption {
    font-size: 0.7rem;
    color: #8b949e;
    line-height: 1.4;
    max-height: 3.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.pv2-card-caption:empty { display: none; }
.pv2-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.pv2-cta {
    padding: 0.6rem 1rem;
    background: #238636;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}
.pv2-cta:hover { background: #2ea043; }
.pv2-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: transparent;
    color: #f0f6fc;
    border: 1px solid #30363d;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}
.pv2-save:hover { background: #21262d; }

/* Empty state (Dreaming/Planning shown when Experience is blank) */
.pv2-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 2rem 1rem;
    color: #6e7681;
    text-align: center;
    background: #161b22;
    border-radius: 16px;
}
.pv2-empty i {
    font-size: 1.75rem;
    color: #484f58;
}
.pv2-empty-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #c9d1d9;
}
.pv2-empty-text {
    font-size: 0.8rem;
    line-height: 1.4;
    max-width: 240px;
}

/* Steps 3–5 without the full Offer module (ruling "Challenge access"): shown, never reachable. */
.wiz-step-pill.is-locked .wiz-step-pill-btn { opacity: 0.5; }

/* Challenge (owner 2026-10-19): the version kept on the draft reads "In use" (no Step 2 to go to). */
.orv-in-use { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #6fd16f; align-self: center; }
.orv-in-use[hidden] { display: none; }
.wiz-ai-optional { font-weight: 400; color: rgba(255, 255, 255, 0.5); }

/* "+ New Offer" greyed out before the onboarding call / after the challenge's one offer: the click explains why. */
.offers-create-btn.is-blocked,
.offers-create-btn.is-blocked:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.45);
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}
