/* =============================================================
   builder-premium.css — visual skin for the resume builder (index.html)
   Loaded last. Matches the landing page: Geist type, midnight-navy
   header and actions, cool slate workspace, white cards, green for success.
   Only restyles; no layout logic or JS hooks are changed.
   Desktop chrome rules are scoped to min-width:769px so the
   existing phone layout (mobile-responsive.css) stays in charge there.
   ============================================================= */

:root {
    --bp-night: #0F1C35;
    --bp-navy-h: #1C2B47;
    --bp-navy-50: #EEF1F6;
    --bp-navy-100: #DCE2EC;
    --bp-on-dark: #FFFFFF;      /* accents on the dark sidebar and navy buttons */
    --bp-ink: #0F1C35;
    --bp-text: #18273A;
    --bp-body: #475467;
    --bp-muted: #667085;
    --bp-faint: #98A2B3;
    --bp-line: #E4E7EC;
    --bp-line-2: #D0D5DD;
    --bp-soft: #F4F6F9;
    --bp-soft-2: #E9EDF3;
    /* Actions, focus and what's selected: navy, like the rest of the site */
    --bp-accent: #0F1C35;
    --bp-accent-h: #1B2A47;
    --bp-accent-d: #0F1C35;
    --bp-accent-50: #F5F7FA;
    --bp-accent-100: #E4E7EC;
    --bp-accent-700: #0F1C35;
    /* Green only for things that are done */
    --bp-ok: #0B7A53;
    --bp-ok-50: #ECFDF3;
    --bp-ok-100: #ABEFC6;
    --bp-ok-on-dark: #6CE9A6;
    --bp-amber: #B54708;
    --bp-amber-50: #FFFAEB;
    --bp-sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ── Type: builder chrome only (resume templates keep their own fonts) ── */
html body .rd-header,
html body .rd-sidebar,
html body .rd-step-bar,
html body .rd-section-body,
html body .rd-preview-header,
html body .rd-card, html body .rd-card *,
html body .rd-input, html body .rd-textarea,
html body .rd-add-btn, html body .rd-ai-btn,
html body .guest-save-hint {
    font-family: var(--bp-sans) !important;
    -webkit-font-smoothing: antialiased;
}

/* ── Cards, fields, buttons (all widths) ── */
html body .rd-section-body { background: var(--bp-soft) !important; }
html body .rd-form-main { background: var(--bp-soft) !important; }

html body .rd-card {
    background: #fff !important;
    border: 1px solid var(--bp-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.04) !important;
}
html body .rd-card:hover { box-shadow: 0 1px 2px rgba(15,28,53,.04), 0 8px 24px -12px rgba(15,28,53,.12) !important; }
html body .rd-card-dot { display: none !important; }
html body .rd-card-title {
    font-size: 14.5px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    color: var(--bp-ink) !important;
    text-transform: lowercase !important;
}
html body .rd-card-title::first-letter { text-transform: uppercase !important; }
html body .rd-card-title .rd-required { margin-left: 1px; }
html body .rd-optional-badge { background: var(--bp-soft) !important; color: var(--bp-muted) !important; font-size: 11px !important; padding: 3px 9px !important; }

html body .rd-label { font-size: 13px !important; font-weight: 500 !important; color: var(--bp-body) !important; margin-bottom: 6px !important; }
html body .rd-required { color: #D92D20 !important; }

html body .rd-input,
html body .rd-textarea {
    border: 1px solid var(--bp-line-2) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--bp-ink) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.04) !important;
}
html body .rd-input { height: 44px !important; line-height: 44px !important; }
html body .rd-input:hover, html body .rd-textarea:hover { border-color: var(--bp-faint) !important; }
html body .rd-input:focus,
html body .rd-textarea:focus {
    border-color: var(--bp-accent) !important;
    box-shadow: 0 0 0 4px rgba(15,28,53,.08) !important;
}
html body .rd-input::placeholder,
html body .rd-textarea::placeholder { color: var(--bp-faint) !important; font-size: 14px !important; font-style: normal !important; }
html body .rd-input-icon svg { stroke: var(--bp-faint) !important; }

html body .rd-status-bar {
    border-radius: 12px !important;
    padding: 12px 16px !important;
    background: var(--bp-amber-50) !important;
    border-color: #FEDF89 !important;
}
html body .rd-status-bar.complete { background: var(--bp-ok-50) !important; border-color: var(--bp-ok-100) !important; box-shadow: none !important; }
html body .rd-status-text { font-weight: 500 !important; font-size: 13px !important; }
html body .rd-status-req { font-weight: 500 !important; }

html body .rd-ai-btn {
    background: var(--bp-night) !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.1), 0 8px 20px -10px rgba(15,28,53,.5) !important;
}
html body .rd-ai-btn:hover { background: var(--bp-navy-h) !important; transform: translateY(-1px); }
html body .rd-ai-btn svg { stroke: var(--bp-on-dark) !important; }

html body .rd-add-btn {
    border: 1px dashed var(--bp-line-2) !important;
    border-radius: 12px !important;
    color: var(--bp-accent-d) !important;
    font-weight: 600 !important;
    background: #fff !important;
}
html body .rd-add-btn:hover { border-color: var(--bp-accent) !important; border-style: solid !important; background: var(--bp-accent-50) !important; }

html body .rd-section-note { border-radius: 12px !important; background: var(--bp-accent-50) !important; border-color: var(--bp-accent-100) !important; }

/* The "2/5" badge on Continue repeated the step counter beside the title */
html body .rd-step-btn--next .rd-next-badge,
html body .rd-next-badge { display: none !important; }

/* ================================================================
   DESKTOP + TABLET CHROME
   ================================================================ */
@media (min-width: 769px) {

    /* ── Header: dark, like the landing page ── */
    html body .rd-header {
        background: linear-gradient(90deg, rgba(15,28,53,.98) 0%, rgba(15,30,54,.98) 60%, rgba(13,40,46,.98) 100%) !important;
        border-bottom: 1px solid rgba(255,255,255,.08) !important;
        box-shadow: none !important;
        height: 60px !important; min-height: 60px !important;
    }
    html body .rd-header .brand-tagline { color: #93A0B6 !important; -webkit-text-fill-color: #93A0B6 !important; }
    html body .rd-header .header-nav { gap: 6px !important; }
    html body .rd-header .nav-link {
        color: rgba(255,255,255,.66) !important;
        font-size: 14px !important;
        padding: 7px 12px !important;
        border-radius: 8px !important;
    }
    html body .rd-header .nav-link::after { display: none !important; }
    html body .rd-header .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.07) !important; }
    /* The builder is a workspace: keep only what helps while editing */
    html body .rd-header .header-nav a[href="blog.html"],
    html body .rd-header .header-nav a[href="subscription.html"] { display: none !important; }

    html body .rd-header .header-right-section { gap: 8px !important; }
    html body .rd-header .header-right-section::before { background: rgba(255,255,255,.14) !important; }
    html body .rd-header .btn-login {
        background: transparent !important;
        color: #fff !important;
        border: 1px solid rgba(255,255,255,.18) !important;
        border-radius: 9px !important;
        font-size: 14px !important; font-weight: 500 !important;
        padding: 7px 14px !important;
    }
    html body .rd-header .btn-login:hover { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.3) !important; }
    html body .rd-header .rd-btn-new {
        background: #fff !important; color: var(--bp-night) !important;
        border-radius: 9px !important;
        font-size: 14px !important; font-weight: 600 !important;
        padding: 8px 16px !important;
        box-shadow: none !important;
    }
    html body .rd-header .rd-btn-new:hover { background: #fff !important; transform: translateY(-1px) !important; box-shadow: 0 0 0 3px rgba(255,255,255,.12) !important; }

    /* "New resume" now lives in the header instead of a floating button */
    html body .rd-hdr-new {
        display: inline-flex !important; align-items: center; gap: 7px;
        height: 34px; padding: 0 12px; border-radius: 9px;
        color: rgba(255,255,255,.8) !important; text-decoration: none !important;
        font-family: var(--bp-sans); font-size: 14px; font-weight: 500;
        border: 1px solid transparent;
        transition: background .15s, color .15s;
    }
    html body .rd-hdr-new:hover { background: rgba(255,255,255,.07); color: #fff !important; }
    html body .rd-hdr-new svg { stroke: currentColor; }
    html body #fabBuildResume { display: none !important; }

    /* The logged-in avatar / dropdown trigger sits on a dark bar now */
    html body .rd-header .user-menu-trigger { color: #fff !important; }


    /* Header stays fixed above the three panes (another sheet made it sticky,
       which pushed the panes down by a full header height) */
    html body .rd-header { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; }
    /* Logo text: lighter green so it reads on the dark bar */
    html body .rd-header .logo-section a > div > span:first-child {
        background: linear-gradient(120deg, #34d399 0%, #10b981 55%, #5eead4 100%) !important;
        -webkit-background-clip: text !important; background-clip: text !important;
    }
    html body .rd-step-meta { display: block !important; white-space: nowrap !important; }
    html body .rd-step-title { white-space: nowrap !important; }
    html body .rd-step-left { min-width: 0 !important; }
    html body .rd-step-btn--next .rd-next-label { color: #fff !important; }
    html body .rd-step-btn--next .rd-next-sub { color: rgba(255,255,255,.78) !important; }
    html body .rd-step-btn--next svg { stroke: #fff !important; }
    html body .rd-preview-header .preview-header-left h3,
    html body .rd-preview-header #page-info { white-space: nowrap !important; }

    /* ── App frame ── */
    html body .rd-app-layout {
        margin-top: 60px !important;
        height: calc(100vh - 60px) !important; max-height: calc(100vh - 60px) !important;
        grid-template-columns: 232px 42fr 58fr !important;
        background: var(--bp-soft) !important;
    }

    /* ── Sidebar ── */
    html body .rd-sidebar {
        width: 232px !important; min-width: 232px !important;
        background: #fff !important;
        border-right: 1px solid var(--bp-line) !important;
        padding-top: 6px !important;
    }
    html body .rd-sidebar-top { padding: 18px 18px 16px !important; border-bottom: 1px solid var(--bp-line) !important; }
    html body .rd-progress-label {
        font-size: 13px !important; font-weight: 600 !important;
        text-transform: none !important; letter-spacing: -0.01em !important;
        color: var(--bp-ink) !important;
    }
    html body .rd-progress-pct { font-size: 13px !important; font-weight: 600 !important; color: var(--bp-accent-d) !important; font-variant-numeric: tabular-nums; }
    html body .rd-progress-track { height: 6px !important; background: var(--bp-soft-2) !important; margin-bottom: 8px !important; }
    html body .rd-progress-fill { background: var(--bp-accent) !important; }
    html body .rd-progress-hint { text-align: left !important; font-size: 12px !important; color: var(--bp-muted) !important; }

    html body .rd-sidebar-section-label {
        padding: 18px 18px 8px !important;
        font-size: 12px !important; font-weight: 500 !important;
        letter-spacing: 0 !important; text-transform: none !important;
        color: var(--bp-faint) !important;
    }
    html body .rd-nav-menu { padding: 0 10px !important; gap: 2px !important; }
    html body .rd-nav-item { padding: 9px 10px !important; border-radius: 10px !important; gap: 11px !important; }
    html body .rd-nav-item:hover { background: var(--bp-soft) !important; }
    html body .rd-nav-item.active { background: var(--bp-navy-50) !important; box-shadow: inset 0 0 0 1px var(--bp-navy-100) !important; }
    html body .rd-nav-icon-wrap { width: 32px !important; height: 32px !important; border-radius: 9px !important; background: var(--bp-soft) !important; }
    html body .rd-nav-item.active .rd-nav-icon-wrap { background: var(--bp-night) !important; }
    html body .rd-nav-item.active .rd-nav-icon-wrap svg { stroke: #fff !important; }
    html body .rd-nav-title { font-size: 14px !important; font-weight: 500 !important; color: var(--bp-text) !important; }
    html body .rd-nav-item.active .rd-nav-title { color: var(--bp-ink) !important; font-weight: 600 !important; }
    html body .rd-nav-sub { font-size: 12px !important; color: var(--bp-faint) !important; }
    html body .rd-nav-item.active .rd-nav-sub { color: var(--bp-muted) !important; }
    html body .rd-check--done { color: var(--bp-ok) !important; }

    /* One progress indicator: the sidebar "Profile Strength" duplicated "Resume Progress" */
    html body .rd-profile-strength { display: none !important; }

    /* ── Step bar: white toolbar instead of a green slab ── */
    html body .rd-step-bar {
        height: 64px !important; min-height: 64px !important; max-height: 64px !important;
        padding: 0 28px !important;
        background: rgba(255,255,255,.92) !important;
        backdrop-filter: blur(8px) !important; -webkit-backdrop-filter: blur(8px) !important;
        border-bottom: 1px solid var(--bp-line) !important;
        box-shadow: none !important;
    }
    html body .rd-step-icon { width: 34px !important; height: 34px !important; min-width: 34px !important; border-radius: 10px !important; background: var(--bp-navy-50) !important; }
    html body .rd-step-icon svg, html body .rd-step-icon svg * { stroke: var(--bp-night) !important; }
    html body .rd-step-title { font-size: 16px !important; font-weight: 600 !important; color: var(--bp-ink) !important; letter-spacing: -0.02em !important; }
    html body .rd-step-meta { font-size: 12.5px !important; color: var(--bp-muted) !important; margin-top: 2px !important; }
    html body .rd-step-right { align-items: center !important; }
    html body .rd-step-btn--prev {
        height: 38px !important; padding: 0 14px !important;
        background: #fff !important; color: var(--bp-text) !important;
        border: 1px solid var(--bp-line-2) !important; border-radius: 10px !important;
        font-size: 13.5px !important; font-weight: 500 !important;
    }
    html body .rd-step-btn--prev:hover:not(:disabled) { background: var(--bp-soft) !important; color: var(--bp-ink) !important; }
    html body .rd-step-btn--prev:disabled { opacity: .45 !important; }
    html body .rd-step-btn--next {
        min-height: 38px !important; height: 38px !important;
        padding: 0 16px !important;
        background: var(--bp-night) !important;
        border: 0 !important; border-radius: 10px !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(15,28,53,.18) !important;
    }
    html body .rd-step-btn--next:hover { background: var(--bp-navy-h) !important; transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(15,28,53,.55) !important; }
    html body .rd-next-text { flex-direction: row !important; align-items: baseline !important; gap: 6px !important; }
    html body .rd-next-label { font-size: 13.5px !important; font-weight: 600 !important; }
    html body .rd-next-sub { font-size: 12.5px !important; color: rgba(255,255,255,.75) !important; font-weight: 400 !important; }
    html body .rd-next-sub:not(:empty)::before { content: "· "; }

    /* ── Form column ── */
    html body .rd-section-body { padding: 24px 28px 110px !important; gap: 16px !important; }
    html body .rd-card { padding: 22px 22px 20px !important; }
    html body .rd-card-header { margin-bottom: 16px !important; }

    /* ── Preview column ── */
    html body .rd-preview-panel { background: var(--bp-soft-2) !important; border-left: 1px solid var(--bp-line) !important; }
    html body .rd-preview-header {
        height: 64px !important; min-height: 64px !important; max-height: 64px !important;
        justify-content: space-between !important;
        padding: 0 20px !important;
        background: rgba(255,255,255,.92) !important;
        border-bottom: 1px solid var(--bp-line) !important;
        box-shadow: none !important;
        backdrop-filter: blur(8px) !important; -webkit-backdrop-filter: blur(8px) !important;
    }
    html body .rd-preview-header .preview-header-left { position: static !important; gap: 10px !important; min-width: 0; }
    html body .rd-preview-header .preview-header-left h3 { font-size: 15px !important; font-weight: 600 !important; color: var(--bp-ink) !important; letter-spacing: -0.01em !important; display: flex; align-items: center; gap: 8px; }
    html body .rd-preview-header .preview-header-left h3::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bp-ok); box-shadow: 0 0 0 3px var(--bp-ok-50); }
    html body .rd-preview-header #page-info,
    html body .rd-preview-header .pagination-status { font-size: 12.5px !important; color: var(--bp-muted) !important; }
    html body .rd-preview-header .preview-header-right { gap: 8px !important; }

    html body .rd-preview-header .page-nav,
    html body .rd-preview-header .zoom-controls {
        height: 36px !important;
        background: var(--bp-soft) !important;
        border: 1px solid var(--bp-line) !important;
        border-radius: 10px !important;
        padding: 0 4px !important;
    }
    html body .rd-preview-header .page-nav .icon-btn,
    html body .rd-preview-header .zoom-controls .icon-btn {
        color: var(--bp-body) !important;
        width: 26px !important; height: 26px !important;
        border-radius: 7px !important;
        font-size: 15px !important;
    }
    html body .rd-preview-header .page-nav .icon-btn:hover,
    html body .rd-preview-header .zoom-controls .icon-btn:hover { background: #fff !important; color: var(--bp-ink) !important; box-shadow: 0 1px 2px rgba(15,28,53,.08) !important; }
    html body .rd-preview-header .page-counter,
    html body .rd-preview-header .page-separator,
    html body .rd-preview-header .zoom-level { color: var(--bp-text) !important; font-size: 12.5px !important; font-weight: 500 !important; font-variant-numeric: tabular-nums; }

    html body .rd-template-btn {
        height: 36px !important; padding: 0 13px !important;
        background: #fff !important; color: var(--bp-text) !important;
        border: 1px solid var(--bp-line-2) !important; border-radius: 10px !important;
        font-size: 13.5px !important; font-weight: 500 !important;
    }
    html body .rd-template-btn:hover { background: var(--bp-soft) !important; color: var(--bp-ink) !important; }
    html body .rd-template-btn svg { stroke: var(--bp-body) !important; }
    html body .rd-download-btn {
        height: 36px !important; padding: 0 15px !important;
        background: var(--bp-night) !important; color: #fff !important;
        border-radius: 10px !important;
        font-size: 13.5px !important; font-weight: 600 !important;
        box-shadow: 0 1px 2px rgba(15,28,53,.12) !important;
    }
    html body .rd-download-btn:hover { background: var(--bp-navy-h) !important; color: #fff !important; transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(15,28,53,.55) !important; }
    html body .rd-download-btn svg { stroke: var(--bp-on-dark) !important; }

    html body .rd-preview-panel .preview-content {
        background: var(--bp-soft-2) !important;
        padding: 28px !important;
    }
    html body .rd-preview-panel .resume-page {
        border-radius: 4px;
        box-shadow: 0 1px 3px rgba(15,28,53,.08), 0 24px 60px -20px rgba(15,28,53,.25) !important;
    }

    /* Thin, quiet scrollbars (the form one looked like a grey divider) */
    html body .rd-form-main { scrollbar-width: thin !important; scrollbar-color: var(--bp-line-2) transparent !important; }
    html body .rd-form-main::-webkit-scrollbar { width: 6px !important; }
    html body .rd-form-main::-webkit-scrollbar-track { background: transparent !important; }
    html body .rd-form-main::-webkit-scrollbar-thumb { background: var(--bp-line-2) !important; border-radius: 3px !important; }

    /* Guest "saving in this browser" note */
    html body .guest-save-hint { border-radius: 12px !important; }
}

/* Name and contact fields side by side once the form column is wide enough */
@media (min-width: 1280px) {
    html body .rd-name-row,
    html body .rd-two-col {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 14px !important;
    }
    html body .rd-name-row > .rd-field-group,
    html body .rd-two-col > .rd-field-group { margin-bottom: 0 !important; }
    /* A single field in a two-column row (e.g. LinkedIn) keeps the full width */
    html body .rd-two-col > .rd-field-group:only-child { grid-column: 1 / -1; }
}

/* Not enough room for the "Fills in as you type" note beside the centred controls */
@media (min-width: 769px) and (max-width: 1899px) {
    html body .rd-preview-header .pagination-status { display: none !important; }
}
/* The step subtitle ("· Summary & Skills") only fits beside the title from 1280px
   (laptops 1280–1599px are scaled to a 1600px layout, see index.html) */
@media (min-width: 769px) and (max-width: 1279px) {
    html body .rd-step-btn--next .rd-next-sub,
    html body .rd-next-sub { display: none !important; }
}

/* Tablet: the header nav overlaps the logo, so hide it there */
@media (min-width: 769px) and (max-width: 1100px) {
    html body .rd-header .header-nav { display: none !important; }
    html body .rd-hdr-new span { display: none; }
}

/* Phones: cosmetic only — layout belongs to mobile-responsive.css */
@media (max-width: 768px) {
    html body .rd-hdr-new { display: none !important; }
    html body .rd-card { border-radius: 14px !important; }
}

@media (min-width: 769px) {
    html body .rd-step-btn--next .rd-next-label { font-size: 13.5px !important; font-weight: 600 !important; }
    html body .rd-step-btn--next .rd-next-sub { font-size: 12.5px !important; font-weight: 400 !important; }
}
/* A lone field in a two-column row keeps the full width at every size */
html body .rd-two-col > .rd-field-group:only-child { grid-column: 1 / -1 !important; }

/* =============================================================
   Polish pass 2: entries, AI button, popups
   ============================================================= */

/* ── Entry cards (experience, education, certifications, custom) ── */
html body .accordion-card {
    background: #fff !important;
    border: 1px solid var(--bp-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.04) !important;
}
html body .accordion-card.expanded {
    border-color: var(--bp-line-2) !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.04), 0 12px 28px -16px rgba(15,28,53,.18) !important;
}
/* Keep the entry's title visible while it's open, so a blank bar never shows */
html body .accordion-card.expanded .accordion-header-text { opacity: 1 !important; visibility: visible !important; }
html body .accordion-title-display { font-family: var(--bp-sans) !important; }
html body .accordion-subtitle-display { font-family: var(--bp-sans) !important; }
html body .accordion-remove-btn {
    width: 30px !important; height: 30px !important;
    border-radius: 8px !important;
    border: 1px solid var(--bp-line) !important;
    background: #fff !important;
    color: var(--bp-muted) !important;
    font-size: 16px !important; line-height: 1 !important;
    transition: background .15s, color .15s, border-color .15s;
}
html body .accordion-remove-btn:hover { background: #FEF3F2 !important; border-color: #FECDCA !important; color: #B42318 !important; }

/* Field labels: sentence weight, no all-caps tracking */
html body .accordion-body label {
    font-family: var(--bp-sans) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--bp-body) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-bottom: 6px !important;
}

/* Inputs match the top-level cards */
html body .accordion-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html body .accordion-body select {
    height: 44px !important;
    padding: 0 12px !important;
    border: 1px solid var(--bp-line-2) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--bp-ink) !important;
    font-family: var(--bp-sans) !important;
    font-size: 14px !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.04) !important;
}
html body .accordion-body input:not([type="checkbox"]):not([type="radio"]):hover,
html body .accordion-body select:hover { border-color: var(--bp-faint) !important; }
html body .accordion-body input:not([type="checkbox"]):not([type="radio"]):focus,
html body .accordion-body select:focus {
    border-color: var(--bp-accent) !important;
    box-shadow: 0 0 0 4px rgba(15,28,53,.08) !important;
}
html body .accordion-body input::placeholder,
html body .accordion-body textarea::placeholder { color: var(--bp-faint) !important; font-size: 14px !important; font-style: normal !important; }

/* Free-standing textareas (e.g. education details) */
html body .accordion-body textarea:not([style*="border:none"]) {
    border: 1px solid var(--bp-line-2) !important;
    border-radius: 10px !important;
    background: #fff !important;
    font-family: var(--bp-sans) !important;
    font-size: 14px !important;
    color: var(--bp-ink) !important;
}
html body .accordion-body textarea:not([style*="border:none"]):focus {
    border-color: var(--bp-accent) !important;
    box-shadow: 0 0 0 4px rgba(15,28,53,.08) !important;
}
/* The bullet-point box draws its border on a wrapper around the textarea */
html body .accordion-body div[style*="overflow:hidden"]:has(> textarea) {
    border: 1px solid var(--bp-line-2) !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.04) !important;
}
html body .accordion-body div[style*="overflow:hidden"]:has(> textarea:focus) {
    border-color: var(--bp-accent) !important;
    box-shadow: 0 0 0 4px rgba(15,28,53,.08) !important;
}
html body .accordion-body div[style*="overflow:hidden"] > textarea { font-family: var(--bp-sans) !important; font-size: 14px !important; }

/* "Present" toggle tile lines up with the date fields */
html body .present-checkbox-wrapper {
    height: 44px !important;
    padding: 0 12px !important;
    border: 1px solid var(--bp-line-2) !important;
    border-radius: 10px !important;
}
html body .present-checkbox-wrapper:hover { border-color: var(--bp-faint) !important; }
html body .present-checkbox-wrapper span { font-family: var(--bp-sans) !important; font-size: 13.5px !important; font-weight: 500 !important; }
html body .present-checkbox-wrapper .custom-checkbox { border-radius: 5px !important; }

/* ── "Generate with AI": calm, solid button instead of five animations ── */
html body .aig-btn {
    height: 46px !important;
    border-radius: 12px !important;
    background: var(--bp-night) !important;
    border: 1px solid var(--bp-night) !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.1), 0 10px 24px -14px rgba(15,28,53,.6) !important;
    animation: none !important;
}
html body .aig-btn:hover { background: var(--bp-navy-h) !important; border-color: var(--bp-navy-h) !important; animation: none !important; transform: translateY(-1px); }
html body .aig-ring,
html body .aig-spark { display: none !important; }
html body .aig-icon svg { animation: none !important; }
html body .aig-sheen { animation-duration: 7s !important; opacity: .7; }
html body .aig-label {
    animation: none !important;
    background: none !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    font-family: var(--bp-sans) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* ── Small fixes ── */
html body .rd-preview-header .preview-header-left h3 { text-shadow: none !important; }
html body #skillsPopup .input-label,
html body #jobDescPopup .input-label,
html body #generateTab label.input-label { text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; font-weight: 500 !important; }
html body .template-modal-icon { color: #34D399 !important; }

/* Empty validation slots left a tall gap under every field (most visible on phones) */
html body .rd-validation:empty { display: none !important; }

/* Phones: the unlabeled floating "New resume" button covered form content;
   "New Resume" is already in the phone menu */
@media (max-width: 768px) {
    html body .mobile-new-fab { display: none !important; }
}

/* =============================================================
   Polish pass 3: light popups, error states, new-resume confirm
   ============================================================= */

/* ── Template picker: light ── */
html body .template-selector-overlay {
    background: rgba(15,28,53,.42) !important;
    backdrop-filter: blur(6px) !important; -webkit-backdrop-filter: blur(6px) !important;
}
html body .template-selector-modal {
    background: #fff !important;
    border: 1px solid var(--bp-line) !important;
    border-radius: 20px !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.06), 0 28px 70px -18px rgba(15,28,53,.35) !important;
    color: var(--bp-body) !important;
    font-family: var(--bp-sans) !important;
    overflow: hidden !important;
}
html body .template-modal-header { background: #fff !important; border-bottom: 1px solid var(--bp-line) !important; }
html body .template-modal-icon {
    background: var(--bp-accent-50) !important;
    border: 1px solid var(--bp-accent-100) !important;
    color: var(--bp-accent) !important;
}
html body .template-modal-title h3 { color: var(--bp-ink) !important; font-weight: 600 !important; }
html body .template-modal-subtitle { color: var(--bp-muted) !important; }
html body .template-close-btn {
    background: var(--bp-soft) !important;
    border: 1px solid var(--bp-line) !important;
    color: var(--bp-muted) !important;
    border-radius: 10px !important;
}
html body .template-close-btn:hover { background: #FEF3F2 !important; border-color: #FECDCA !important; color: #B42318 !important; }
html body .template-modal-body { background: var(--bp-soft) !important; scrollbar-color: var(--bp-line-2) transparent !important; }
html body .template-modal-body::-webkit-scrollbar-thumb { background: var(--bp-line-2) !important; }
html body .template-preview {
    opacity: 1 !important;
    border-radius: 4px !important;
    box-shadow: 0 0 0 1px var(--bp-line), 0 10px 24px -14px rgba(15,28,53,.3) !important;
}
html body .template-card:hover .template-preview { box-shadow: 0 0 0 1px var(--bp-line-2), 0 16px 32px -14px rgba(15,28,53,.35) !important; }
html body .template-card.selected .template-preview { box-shadow: 0 0 0 2px var(--bp-accent), 0 16px 32px -14px rgba(15,28,53,.35) !important; }
html body .template-name { color: var(--bp-text) !important; font-family: var(--bp-sans) !important; font-weight: 500 !important; }
html body .template-card:hover .template-name,
html body .template-card.selected .template-name { color: var(--bp-ink) !important; font-weight: 600 !important; }
html body .ats-badge { background: var(--bp-accent-50) !important; border-color: var(--bp-accent-100) !important; color: var(--bp-accent-700) !important; }
html body .template-card.selected .ats-badge { background: var(--bp-accent-100) !important; border-color: var(--bp-line-2) !important; color: var(--bp-accent-700) !important; }

/* ── Languages / custom section popups: same card + type ── */
html body #languagesPopup .skills-popup-card,
html body #customSectionPopup .skills-popup-card {
    border: 1px solid var(--bp-line) !important;
    border-radius: 18px !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.06), 0 28px 70px -18px rgba(15,28,53,.35) !important;
    font-family: var(--bp-sans) !important;
}
html body #languagesPopup .skills-popup-overlay,
html body #customSectionPopup .skills-popup-overlay { background: rgba(15,28,53,.42) !important; backdrop-filter: blur(6px) !important; }
html body #languagesPopup h3,
html body #customSectionPopup h3 { color: var(--bp-ink) !important; font-weight: 600 !important; letter-spacing: -0.02em !important; }
html body #languagesPopup label,
html body #languagesPopup h4,
html body #customSectionPopup label,
html body #customSectionPopup h4 {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--bp-body) !important;
}
html body #languagesPopup input[type="text"],
html body #customSectionPopup input[type="text"],
html body #customSectionPopup textarea {
    border: 1px solid var(--bp-line-2) !important;
    border-radius: 10px !important;
    background: #fff !important;
    font-family: var(--bp-sans) !important;
}
html body #languagesPopup input[type="text"]:focus,
html body #customSectionPopup input[type="text"]:focus,
html body #customSectionPopup textarea:focus { border-color: var(--bp-accent) !important; box-shadow: 0 0 0 4px rgba(15,28,53,.08) !important; }
html body #applyLanguagesBtn {
    background: var(--bp-night) !important; color: #fff !important;
    border-radius: 12px !important; font-weight: 600 !important; box-shadow: none !important;
}
html body #applyLanguagesBtn:hover:not(:disabled) { background: var(--bp-navy-h) !important; }
html body #applyLanguagesBtn:disabled { background: var(--bp-soft-2) !important; color: var(--bp-faint) !important; }
html body #languagesPopup .close-popup-btn,
html body #customSectionPopup .close-popup-btn { border-radius: 10px !important; background: var(--bp-soft) !important; border: 1px solid var(--bp-line) !important; }

/* ── Fields with errors: red border to match the red message ── */
html body .rd-input.invalid,
html body .rd-input.invalid:hover {
    border-color: #F04438 !important;
    box-shadow: 0 0 0 4px rgba(240,68,56,.10) !important;
}
html body .rd-input.invalid:focus {
    border-color: #F04438 !important;
    box-shadow: 0 0 0 4px rgba(240,68,56,.16) !important;
}
html body .rd-field-group:has(.rd-input.invalid) .rd-input-icon svg { stroke: #F04438 !important; }
html body .rd-validation {
    margin-top: 6px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #D92D20 !important;
    -webkit-text-fill-color: #D92D20 !important;
}

/* ── "Start a new resume?" confirmation ── */
.nr-modal {
    position: fixed; inset: 0; z-index: 10050;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(15,28,53,.42);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font-family: var(--bp-sans);
    animation: nrFade .16s ease-out;
}
.nr-card {
    width: 100%; max-width: 420px;
    background: #fff;
    border: 1px solid var(--bp-line);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15,28,53,.06), 0 28px 70px -18px rgba(15,28,53,.35);
    padding: 26px 24px 22px;
    animation: nrRise .2s cubic-bezier(.2,.7,.3,1);
}
.nr-ico {
    width: 40px; height: 40px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bp-navy-50); color: var(--bp-night); margin-bottom: 16px;
}
.nr-ico.warn { background: #FFFAEB; color: #B54708; }
.nr-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: var(--bp-ink); font-family: var(--bp-sans); }
.nr-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--bp-body); }
.nr-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.nr-btn {
    height: 42px; padding: 0 16px; border-radius: 10px;
    font-family: var(--bp-sans); font-size: 14px; font-weight: 600;
    cursor: pointer; border: 1px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}
.nr-btn-ghost { background: #fff; border-color: var(--bp-line-2); color: var(--bp-text); }
.nr-btn-ghost:hover { background: var(--bp-soft); border-color: var(--bp-faint); }
.nr-btn-go { background: var(--bp-night); color: #fff; }
.nr-btn-go:hover { background: var(--bp-navy-h); }
.nr-btn-danger { background: #D92D20; color: #fff; }
.nr-btn-danger:hover { background: #B42318; }
.nr-btn:disabled { opacity: .6; cursor: default; }
.nr-btn:focus-visible { outline: 2px solid var(--bp-accent); outline-offset: 2px; }
.nr-signup { display: inline-block; margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--bp-accent-d); text-decoration: underline; text-underline-offset: 3px; }
@keyframes nrFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nrRise { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) {
    .nr-actions { flex-direction: column; }
    .nr-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .nr-modal, .nr-card { animation: none; } }

/* AI bullets popup: the numbers choice is styled in css/bullet-popup.css */
html body #jobDescPopup .metrics-hint { color: var(--bp-muted) !important; font-size: 12.5px !important; font-weight: 400 !important; }
html body #jobDescPopup .metrics-hint strong { color: var(--bp-accent-d) !important; font-weight: 600 !important; }
html body #jobDescPopup .metrics-note { color: var(--bp-muted) !important; }
html body #jobDescPopup .job-metrics {
    background: #fff !important;
    border: 1px solid var(--bp-line-2) !important;
    border-radius: 10px !important;
    color: var(--bp-ink) !important;
}
html body #jobDescPopup .job-metrics:focus { border-color: var(--bp-accent) !important; box-shadow: 0 0 0 4px rgba(15,28,53,.08) !important; outline: none !important; }

/* Languages popup labels: beat the older uppercase rules */
html body #languagesPopup .popup-content label,
html body #languagesPopup .popup-content h4 {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--bp-body) !important;
}
html body #languagesPopup .popup-content .custom-language-section h4 { color: var(--bp-accent-d) !important; font-weight: 600 !important; }

/* =============================================================
   Navy actions everywhere, including the phone layout.
   Older sheets force emerald with IDs and !important, so these
   carry an ID or extra weight to win.
   ============================================================= */
html body .rd-step-bar #rdStepIcon,
html body #rdStepIcon { background: var(--bp-navy-50) !important; box-shadow: inset 0 0 0 1px var(--bp-navy-100) !important; }
html body .rd-step-bar #rdStepIcon svg,
html body .rd-step-bar #rdStepIcon svg *,
html body #rdStepIcon svg,
html body #rdStepIcon svg * { stroke: var(--bp-night) !important; }

@media (max-width: 768px) {
    html body .mobile-bottom-btn.next-btn { background: var(--bp-night) !important; box-shadow: 0 6px 16px -8px rgba(15,28,53,.6) !important; }
    html body .mobile-bottom-btn.next-btn:active { background: var(--bp-navy-h) !important; }
    html body .mobile-bottom-btn.next-btn .btn-icon svg { stroke: var(--bp-on-dark) !important; }
    html body .mobile-bottom-btn.preview-btn .btn-icon svg,
    html body .mobile-bottom-btn.download-btn .btn-icon svg { stroke: var(--bp-night) !important; }
    html body .mobile-bottom-btn.preview-btn .btn-label,
    html body .mobile-bottom-btn.download-btn .btn-label { color: var(--bp-night) !important; }
    html body .mobile-bottom-btn.download-btn:active .btn-icon svg,
    html body .mobile-bottom-btn.download-btn:active .btn-label { stroke: var(--bp-navy-h) !important; color: var(--bp-navy-h) !important; }

    /* Full-screen preview: navy bar, white download with a green icon */
    html body .preview-overlay .preview-header { background: var(--bp-night) !important; }
    html body .preview-overlay .download-btn { background: #fff !important; color: var(--bp-night) !important; box-shadow: none !important; }
    html body .preview-overlay .download-btn svg { stroke: var(--bp-accent) !important; }
    html body .preview-overlay .download-btn:active { background: var(--bp-navy-50) !important; }

    html body .rd-ai-btn { background: var(--bp-night) !important; }
}

/* =============================================================
   Phones: same navy frame as desktop
   Navy top bar with white controls, white workspace, navy actions.
   ============================================================= */
@media (max-width: 768px) {
    html body .rd-header {
        background: linear-gradient(90deg, #0F1C35 0%, #0F1E36 60%, #0D2830 100%) !important;
        border-bottom: 1px solid rgba(255,255,255,.08) !important;
        box-shadow: none !important;
    }
    html body #resumeHamburgerBtn .bar,
    html body #resumeHamburgerBtn .toggle .bar { background: #fff !important; background-color: #fff !important; }
    html body #resumeHamburgerBtn svg,
    html body #resumeHamburgerBtn svg * { stroke: #fff !important; }
    /* account button: white icon on the navy bar (icons are background images) */
    html body #mobileMenuBtn {
        background: rgba(255,255,255,.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center / 17px 17px no-repeat !important;
        border: 1px solid rgba(255,255,255,.16) !important;
        box-shadow: none !important;
    }
    html body #mobileMenuBtn.open,
    html body:has(.mobile-menu-panel.open) #mobileMenuBtn {
        background: rgba(255,255,255,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center / 16px 16px no-repeat !important;
    }
    html body #mobileMenuBtn svg,
    html body #mobileMenuBtn svg * { stroke: #fff !important; }
    html body .rd-header .logo-section > a {
        background: rgba(255,255,255,.06) !important;
        border-color: rgba(255,255,255,.14) !important;
        box-shadow: none !important;
    }
    html body .rd-header .logo-section > a > div > span:first-child {
        background: linear-gradient(120deg, #34d399 0%, #10b981 55%, #5eead4 100%) !important;
        -webkit-background-clip: text !important; background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }

    /* Menu: navy sign-up, quiet sign-in */
    html body .mobile-auth-signup { background: var(--bp-night) !important; border-color: var(--bp-night) !important; color: #fff !important; box-shadow: none !important; }
    html body .mobile-auth-signin { border-color: var(--bp-line-2) !important; color: var(--bp-ink) !important; box-shadow: none !important; }

    /* Full-screen preview: plain navy bar (no stripes), white close */
    html body .preview-overlay .preview-header::before { display: none !important; }
    html body .preview-overlay .preview-close { background: rgba(255,255,255,.1) !important; border: 1px solid rgba(255,255,255,.16) !important; }
    html body .preview-overlay .preview-close svg { stroke: #fff !important; }
}

/* =============================================================
   Entry cards (jobs, schools, certifications, custom sections):
   compact type, clear separation, an icon chip per kind.
   ============================================================= */
html body .accordion-card {
    margin-bottom: 10px !important;
    border: 1px solid var(--bp-line) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.04) !important;
}
html body .accordion-card:not(.expanded):hover {
    border-color: #C5CEDC !important;
    box-shadow: 0 1px 2px rgba(15,28,53,.04), 0 10px 22px -14px rgba(15,28,53,.28) !important;
}
html body .accordion-card .accordion-header { padding: 12px 12px 12px 10px !important; gap: 10px !important; height: auto !important; min-height: 62px !important; align-items: center !important; }
/* quiet hover instead of the old dark-gradient flip */
html body .accordion-card:not(.expanded) .accordion-header:hover { background: #FAFBFC !important; }
html body .accordion-card:not(.expanded) .accordion-header:hover .accordion-title-display,
html body .accordion-card.expanded .accordion-header:hover .accordion-title-display { color: var(--bp-ink) !important; }
html body .accordion-card:not(.expanded) .accordion-header:hover .accordion-subtitle-display,
html body .accordion-card.expanded .accordion-header:hover .accordion-subtitle-display { color: var(--bp-muted) !important; }
html body .accordion-card:not(.expanded) .accordion-header:hover .accordion-remove-btn,
html body .accordion-card.expanded .accordion-header:hover .accordion-remove-btn { color: var(--bp-muted) !important; border-color: var(--bp-line) !important; }
html body .accordion-grip { opacity: 1 !important; }
html body .accordion-grip circle,
html body .accordion-card .accordion-header:hover .accordion-grip circle { fill: #C3CAD5 !important; }

html body .accordion-title-display {
    font-size: 14px !important; font-weight: 600 !important;
    letter-spacing: -0.01em !important; line-height: 1.3 !important;
    color: var(--bp-ink) !important;
}
html body .accordion-subtitle-display {
    font-size: 12.5px !important; font-weight: 400 !important;
    line-height: 1.35 !important; margin-top: 2px !important;
    color: var(--bp-muted) !important;
}
html body .accordion-header-text { position: relative; padding-left: 44px; }
html body .accordion-header-text::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--bp-navy-50) center / 16px 16px no-repeat;
    box-shadow: inset 0 0 0 1px var(--bp-navy-100);
}
html body .experience-entry .accordion-header-text::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F1C35' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3C/svg%3E"); }
html body .education-entry .accordion-header-text::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F1C35' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 10 12 5 2 10l10 5 10-5z'/%3E%3Cpath d='M6 12v5c3 3 9 3 12 0v-5'/%3E%3C/svg%3E"); }
html body .cert-entry .accordion-header-text::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F1C35' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.5 13.2 17 22l-5-3-5 3 1.5-8.8'/%3E%3C/svg%3E"); }
/* other entry types: plain chip with no icon */
html body .accordion-card:not(.experience-entry):not(.education-entry):not(.cert-entry) .accordion-header-text { padding-left: 0; }
html body .accordion-card:not(.experience-entry):not(.education-entry):not(.cert-entry) .accordion-header-text::before { display: none; }

html body .accordion-chevron {
    width: 30px !important; height: 30px !important; padding: 7px; box-sizing: border-box;
    border-radius: 8px; color: var(--bp-muted) !important;
    transition: transform .25s ease, background .15s ease, color .15s ease !important;
}
html body .accordion-card:not(.expanded) .accordion-chevron,
html body .accordion-card.expanded .accordion-chevron { color: var(--bp-muted) !important; }
html body .accordion-card:not(.expanded) .accordion-header:hover .accordion-chevron,
html body .accordion-card.expanded .accordion-header:hover .accordion-chevron { background: var(--bp-soft); color: var(--bp-ink) !important; }
html body .accordion-remove-btn { width: 30px !important; height: 30px !important; flex-shrink: 0; }

/* =============================================================
   Download PDF: progress inside the button (green on navy),
   then a short "Downloaded" success beat. Classes set by app.js.
   ============================================================= */
html body .rd-download-btn.is-busy,
html body .download-btn.is-busy {
    position: relative !important; overflow: hidden !important;
    opacity: 1 !important; cursor: progress !important;
    transform: none !important;
    background: var(--bp-night) !important; color: #fff !important;
}
html body .is-busy .dl-fill {
    position: absolute; left: 0; top: 0; bottom: 0; z-index: 0;
    width: 100%;
    background: rgba(255,255,255,.16);   /* download progress inside the navy button */
    transform: scaleX(var(--dl-p, 0)); transform-origin: left center;   /* app.js eases it every frame */
    will-change: transform;
}
html body .is-busy .dl-fill::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
    transform: translateX(-100%);
    animation: dlSheen 1.3s ease-in-out infinite;
}
html body .is-busy .dl-label {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
html body .is-busy .dl-pct { opacity: .85; font-weight: 500; min-width: 3.2ch; text-align: right; }
html body .is-busy .dl-spin {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
    animation: dlSpin .7s linear infinite;
}
html body .is-done .dl-spin {
    border: 0; animation: none; width: 13px; height: 13px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px 13px no-repeat;
}
html body .is-done .dl-pct { display: none; }
html body .is-done .dl-fill::after { animation: none; }
html body .is-busy .dl-text.dl-swap { animation: dlSwap .32s cubic-bezier(.2,.7,.3,1); }
html body .is-done { animation: dlPop .42s cubic-bezier(.2,.9,.3,1.2); }
html body .is-done .dl-fill { background: rgba(18,162,109,.55); transition: background .3s ease; }
@keyframes dlSwap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes dlPop { 0% { transform: scale(1); } 40% { transform: scale(1.035); } 100% { transform: scale(1); } }
html body .mobile-bottom-btn.download-btn.is-busy { background: transparent !important; color: inherit !important; }
@keyframes dlSheen { to { transform: translateX(100%); } }
@keyframes dlSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    html body .is-busy .dl-fill::after, html body .is-busy .dl-spin,
    html body .is-busy .dl-text.dl-swap, html body .is-done { animation: none; transition: none; }
}

/* =============================================================
   Download popup (app.js dlModal)
   Navy hero with a 3D miniature of the person's own resume; two
   choice cards; one navy button. Green only for success.
   States on .dlm: is-choose / is-working / is-finished (+ is-failed)
   Tokens: navy #0F1C35 / #1A2B4C, ink #0F1C35, text #475467,
   line #E4E7EC, green #12A26D. Radius 20 card / 14 tiles / 12 button.
   Motion: 0.5s cubic-bezier(.16,1,.3,1) for entrances, 0.2s for hovers.
   ============================================================= */
html body .dlm {
    --dlm-ease: cubic-bezier(.16,1,.3,1);
    position: fixed; inset: 0; z-index: 10050;
    display: grid; place-items: center; padding: 16px;
    background: rgba(10,18,36,.55);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; transition: opacity .25s ease;
}
html body .dlm.is-in { opacity: 1; }
html body .dlm-card {
    position: relative; width: 100%; max-width: 440px; overflow: hidden;
    background: #fff; color: #475467; border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(15,28,53,.08), 0 2px 6px rgba(15,28,53,.08), 0 30px 70px -20px rgba(10,18,36,.55);
    transform: translateY(24px) scale(.97); opacity: .6;
    transition: transform .5s var(--dlm-ease), opacity .3s ease;
    font-size: 14px; line-height: 20px;
}
html body .dlm.is-in .dlm-card { transform: none; opacity: 1; }

/* ── hero: navy stage with the 3D sheet ── */
html body .dlm-hero {
    --lx: 50%;
    position: relative; height: 216px; overflow: hidden;
    display: grid; place-items: center;
    background:
        radial-gradient(70% 90% at var(--lx) 0%, rgba(120,150,210,.28), transparent 70%),
        radial-gradient(60% 50% at 50% 100%, rgba(18,162,109,.16), transparent 75%),
        #0F1C35;
    transition: background-position .3s;
}
html body .dlm-hero::before {   /* faint dot grid, like a cutting mat */
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 14px 14px;
    -webkit-mask-image: radial-gradient(70% 80% at 50% 50%, #000, transparent);
            mask-image: radial-gradient(70% 80% at 50% 50%, #000, transparent);
}
html body .dlm-hero::after {    /* shadow under the sheet */
    content: ""; position: absolute; left: 50%; bottom: 14px; width: 140px; height: 18px; margin-left: -70px;
    border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.45), transparent);
    animation: dlmShadow 5s ease-in-out infinite;
}
html body .dlm-stage {
    --tx: 0deg; --ty: 0deg;
    position: relative; z-index: 1; perspective: 700px; margin-top: 4px;
    animation: dlmFloat 5s ease-in-out infinite;
}
html body .dlm-sheet {
    --dp: 0;
    position: relative; width: 112px; height: 158px; overflow: hidden;
    background: #fff; border-radius: 3px;
    box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 0 0 1px rgba(255,255,255,.15), 0 18px 30px -10px rgba(0,0,0,.55), 0 4px 8px rgba(0,0,0,.2);
    transform: rotateX(calc(12deg + var(--tx))) rotateY(calc(-18deg + var(--ty))) rotateZ(2deg);
    transition: transform .6s var(--dlm-ease);
}
html body .dlm-sheet::after {   /* paper sheen that moves with the tilt */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.35) 48%, rgba(255,255,255,0) 62%);
    transform: translateX(calc(var(--ty) * 3)); transition: transform .6s var(--dlm-ease);
}
html body .dlm-page {
    position: absolute; left: 0; top: 0; width: 794px; height: 1123px;
    transform: scale(.1411); transform-origin: 0 0; pointer-events: none;
}
html body .dlm-page .resume-page { width: 794px !important; min-height: 1123px; margin: 0 !important; }
/* the part not "printed" yet, and the scan line at its edge */
html body .dlm-veil {
    position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--dp) * 100%);
    background: rgba(244,246,250,.92); opacity: 0; transition: opacity .3s;
}
html body .dlm-scan {
    position: absolute; left: -4px; right: -4px; height: 2px; top: calc(var(--dp) * 100%);
    background: #32D583; box-shadow: 0 0 10px 2px rgba(50,213,131,.6); opacity: 0; transition: opacity .3s;
}
html body .dlm.is-working .dlm-veil, html body .dlm.is-working .dlm-scan { opacity: 1; }
html body .dlm.is-working .dlm-stage, html body .dlm.is-finished .dlm-stage { animation: none; }
html body .dlm.is-working .dlm-sheet { transform: rotateX(4deg) rotateY(0) rotateZ(0) scale(1.04); }
html body .dlm.is-finished .dlm-sheet { transform: rotateX(0) rotateY(0) rotateZ(0) scale(1.04); }
html body .dlm.is-finished .dlm-hero::after { animation: none; }
html body .dlm-seal {
    position: absolute; z-index: 2; right: -14px; bottom: -12px;
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    background: #12A26D; color: #fff;
    box-shadow: 0 0 0 4px #0F1C35, 0 8px 18px -4px rgba(18,162,109,.7);
    transform: scale(0); opacity: 0;
}
html body .dlm.is-finished .dlm-seal { animation: dlmStamp .5s .1s cubic-bezier(.2,.9,.3,1.4) forwards; }
html body .dlm.is-empty .dlm-seal { background: #F79009; box-shadow: 0 0 0 4px #0F1C35, 0 8px 18px -4px rgba(247,144,9,.6); }
html body .dlm.is-failed .dlm-seal { background: #D92D20; box-shadow: 0 0 0 4px #0F1C35, 0 8px 18px -4px rgba(217,45,32,.6); }
html body .dlm-chip {
    position: absolute; left: 16px; bottom: 14px; z-index: 1;
    padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
    color: rgba(255,255,255,.75); background: rgba(255,255,255,.08); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset;
}
html body .dlm-x {
    position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; padding: 0;
    display: grid; place-items: center; border: 0; border-radius: 10px;
    background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); cursor: pointer;
    transition: background .2s, color .2s;
}
html body .dlm-x:hover { background: rgba(255,255,255,.16); color: #fff; }
html body .dlm.is-working .dlm-x { opacity: 0; pointer-events: none; }

/* ── body ── */
html body .dlm-body { padding: 22px 24px 24px; }
html body .dlm-title { margin: 0; font-size: 19px; line-height: 26px; font-weight: 650; letter-spacing: -.015em; color: #0F1C35; }
html body .dlm-file { margin: 3px 0 0; color: #667085; font-size: 13.5px; overflow-wrap: anywhere; }

/* two choice cards */
html body .dlm-choose { display: none; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
html body .dlm.is-choose .dlm-choose { display: grid; }
html body .dlm-opt {
    position: relative; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 14px;
    border-radius: 14px; background: #fff; cursor: pointer;
    box-shadow: 0 0 0 1px #E4E7EC, 0 1px 2px rgba(15,28,53,.05);
    transition: box-shadow .2s ease, transform .25s var(--dlm-ease), background .2s;
}
html body .dlm-opt:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #C9D1DE, 0 10px 20px -10px rgba(15,28,53,.35); }
html body .dlm-opt:has(input:checked) { background: #F7F9FC; box-shadow: 0 0 0 2px #0F1C35, 0 10px 22px -12px rgba(15,28,53,.45); }
html body .dlm-opt:has(input:focus-visible) { outline: 3px solid rgba(15,28,53,.2); outline-offset: 2px; }
html body .dlm-opt input { position: absolute; opacity: 0; pointer-events: none; }
html body .dlm-opt-ic {
    display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 10px; border-radius: 11px;
    background: #F2F4F7; color: #344054; transition: background .2s, color .2s, transform .3s var(--dlm-ease);
}
html body .dlm-opt:has(input:checked) .dlm-opt-ic { background: #0F1C35; color: #fff; }
html body .dlm-opt:hover .dlm-opt-ic { transform: translateY(-1px) rotate(-6deg); }
html body .dlm-opt strong { font-size: 14.5px; font-weight: 600; color: #0F1C35; }
html body .dlm-opt > span:not(.dlm-opt-ic) { font-size: 12.5px; line-height: 17px; color: #667085; overflow-wrap: anywhere; }
html body .dlm-opt-tick {
    position: absolute; top: 12px; right: 12px; display: grid; place-items: center;
    width: 20px; height: 20px; border-radius: 50%; background: #0F1C35; color: #fff;
    transform: scale(0); transition: transform .3s cubic-bezier(.2,.9,.3,1.4);
}
html body .dlm-opt-tick svg { width: 12px; height: 12px; }
html body .dlm-opt:has(input:checked) .dlm-opt-tick { transform: scale(1); }

/* progress */
html body .dlm-work { display: none; margin-top: 18px; }
html body .dlm.is-working .dlm-work { display: block; }
html body .dlm-row { display: flex; justify-content: space-between; font-weight: 500; color: #0F1C35; }
html body .dlm-step.dlm-swap { animation: dlmIn .35s var(--dlm-ease); }
html body .dlm-pct { color: #667085; font-weight: 400; font-variant-numeric: tabular-nums; }
html body .dlm-bar { height: 6px; margin-top: 10px; border-radius: 999px; background: #EEF1F5; overflow: hidden; }
html body .dlm-fill {
    position: relative; display: block; height: 100%; width: 100%; border-radius: inherit; overflow: hidden;
    background: #0F1C35; transform: scaleX(0); transform-origin: left center; will-change: transform;
}
html body .dlm-fill::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    transform: translateX(-100%); animation: dlSheen 1.4s ease-in-out infinite;
}

/* email line */
html body .dlm-mail {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 10px 12px;
    border-radius: 12px; background: #F2F4F7; color: #344054; font-size: 13px;
    animation: dlmIn .35s var(--dlm-ease);
}
html body .dlm-mail[hidden] { display: none; }
html body .dlm-cl {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
    color: #0F1C35; font-size: 13.5px; font-weight: 600; text-decoration: none;
}
html body .dlm-cl[hidden] { display: none; }
html body .dlm-cl:hover { text-decoration: underline; text-underline-offset: 3px; }
html body .dlm-cl svg { transition: transform .2s ease; }
html body .dlm-cl:hover svg { transform: translateX(3px); }
html body .dlm-mail svg { width: 16px; height: 16px; flex: none; }
html body .dlm-mail.is-sent { background: #ECFDF3; color: #067647; }
html body .dlm-mail.is-error { background: #FEF3F2; color: #B42318; }
html body .dlm-spin { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px solid #D0D5DD; border-top-color: #0F1C35; animation: dlSpin .7s linear infinite; }
html body .dlm-retry { border: 0; background: none; padding: 0; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* the one button */
html body .dlm-go {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 48px; margin-top: 20px; border: 0; border-radius: 12px;
    background: #0F1C35; color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
    box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 8px 18px -8px rgba(15,28,53,.6);
    transition: background .2s, transform .2s var(--dlm-ease), box-shadow .2s;
}
html body .dlm-go:hover { background: #1A2B4C; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 12px 24px -10px rgba(15,28,53,.7); }
html body .dlm-go:active { transform: none; }
html body .dlm-go svg { transition: transform .25s var(--dlm-ease); }
html body .dlm-go:hover svg { transform: translateX(3px); }
html body .dlm-go:disabled { cursor: progress; background: #344054; transform: none; box-shadow: none; }
html body .dlm-go:disabled svg, html body .dlm-go.dlm-close svg { display: none; }
html body .dlm-go:focus-visible, html body .dlm-x:focus-visible { outline: 3px solid rgba(15,28,53,.25); outline-offset: 2px; }

@keyframes dlmIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes dlmFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes dlmShadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.85); opacity: .7; } }
@keyframes dlmStamp { 0% { transform: scale(1.8) rotate(-25deg); opacity: 0; } 60% { transform: scale(.9) rotate(5deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@media (max-width: 480px) {
    html body .dlm { place-items: end center; padding: 0; }
    html body .dlm-card { max-width: none; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(40px); }
    html body .dlm-hero { height: 190px; }
    html body .dlm-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    html body .dlm, html body .dlm *, html body .dlm *::before, html body .dlm *::after { animation: none !important; transition: none !important; }
    html body .dlm-card, html body .dlm.is-in .dlm-card { transform: none; }
    html body .dlm.is-finished .dlm-seal { transform: none; opacity: 1; }
}

/* Preview toolbar: one centred group over the resume page.
   [● Live Preview]   [‹ 1/1 › | − 95% +]  [Template]  [Download PDF]   ( )
   A 1fr | auto | 1fr grid centres the group when there is room and slides it
   right (never overlapping the label) when there isn't. */
@media (min-width: 1025px) {
    html body .rd-preview-header {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center !important;
        column-gap: 16px !important;
    }
    html body .rd-preview-header .preview-header-left { grid-column: 1; min-width: max-content; justify-self: start; }
    html body .rd-preview-header .preview-header-right {
        grid-column: 2; position: static !important;
        display: flex !important; align-items: center !important; gap: 0 !important;
    }
    /* page + zoom read as one segmented pill */
    html body .rd-preview-header .page-nav { border-radius: 10px 0 0 10px !important; border-right: 0 !important; }
    html body .rd-preview-header .zoom-controls { border-radius: 0 10px 10px 0 !important; }
    html body .rd-preview-header .rd-template-btn { margin-left: 10px !important; }
    html body .rd-preview-header .rd-download-btn { margin-left: 8px !important; }
}
/* Narrow preview pane: the "Live Preview" label has no room beside the centred
   group below 1280px. "Template" keeps its word at every width. */
@media (min-width: 1025px) and (max-width: 1279px) {
    html body .rd-preview-header .preview-header-left { display: none !important; }
}

/* =============================================================
   Motion: short, calm, purposeful. Off under prefers-reduced-motion.
   Entrance animations use fill-mode "backwards" so nothing keeps a
   transform afterwards (fixed popups inside sections stay put).
   ============================================================= */

/* Smooth state changes everywhere */
html body .rd-input,
html body .rd-textarea,
html body .accordion-body input,
html body .accordion-body select,
html body .accordion-body textarea { transition: border-color .15s ease, box-shadow .15s ease !important; }
html body .rd-card,
html body .accordion-card { transition: box-shadow .2s ease, border-color .2s ease !important; }
html body .rd-nav-item { transition: background .18s ease, box-shadow .18s ease !important; }
html body .rd-nav-icon-wrap,
html body .rd-nav-icon-wrap svg { transition: background .18s ease, stroke .18s ease !important; }
html body .rd-step-btn,
html body .rd-download-btn,
html body .rd-template-btn,
html body .rd-ai-btn,
html body .aig-btn,
html body .rd-add-btn,
html body .rd-header .rd-btn-new,
html body .rd-header .btn-login,
html body #applyLanguagesBtn,
html body .nr-btn {
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s cubic-bezier(.2,.7,.3,1) !important;
}
html body .rd-step-btn:active:not(:disabled),
html body .rd-download-btn:active,
html body .rd-template-btn:active,
html body .rd-ai-btn:active,
html body .aig-btn:active,
html body .rd-add-btn:active,
html body .nr-btn:active { transform: translateY(0) scale(.985) !important; }
html body .rd-template-btn:hover,
html body .rd-step-btn--prev:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--bp-ink) !important; }
html body .rd-add-btn:hover { transform: translateY(-1px); }
html body .rd-step-btn--next svg { stroke: var(--bp-on-dark) !important; transition: transform .18s cubic-bezier(.2,.7,.3,1); }
html body .rd-step-btn--next:hover svg { transform: translateX(2px); }
html body .rd-nav-item:hover .rd-nav-icon-wrap { background: var(--bp-soft-2) !important; }
html body .rd-nav-item.active:hover .rd-nav-icon-wrap { background: var(--bp-night) !important; }
html body .rd-progress-fill { transition: width .6s cubic-bezier(.2,.7,.3,1) !important; }
html body .nr-btn-go:hover,
html body .nr-btn-ghost:hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: no-preference) {
    @keyframes bpRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
    @keyframes bpFade { from { opacity: 0; } to { opacity: 1; } }

    /* Workspace settles in on load */
    html body .rd-sidebar { animation: bpFade .45s ease-out backwards; }
    html body .rd-step-bar,
    html body .rd-preview-header { animation: bpFade .45s ease-out .05s backwards; }
    html body .rd-preview-panel .preview-content { animation: bpRise .6s cubic-bezier(.2,.7,.3,1) .12s backwards; }

    /* Each step's cards rise in, one after another, when you switch steps */
    html body .form-section.active > * { animation: bpRise .45s cubic-bezier(.2,.7,.3,1) backwards; }
    html body .form-section.active > *:nth-child(2) { animation-delay: .05s; }
    html body .form-section.active > *:nth-child(3) { animation-delay: .1s; }
    html body .form-section.active > *:nth-child(4) { animation-delay: .15s; }
    html body .form-section.active > *:nth-child(5) { animation-delay: .2s; }
    html body .form-section.active > *:nth-child(n+6) { animation-delay: .25s; }

    /* Opening an entry (job, school, certification) */
    html body .accordion-card.expanded .accordion-body { animation: bpRise .3s cubic-bezier(.2,.7,.3,1) backwards; }
}
@media (prefers-reduced-motion: reduce) {
    html body .rd-step-btn, html body .rd-download-btn, html body .rd-template-btn,
    html body .rd-ai-btn, html body .aig-btn, html body .rd-add-btn, html body .nr-btn { transition: none !important; transform: none !important; }
}

/* =============================================================
   Polish pass 4: pro app frame (desktop and tablet)
   The navy header continues down the left as a navy rail, so a dark
   frame holds a bright workspace. Mint marks where you are.
   ============================================================= */
.rd-sidebar-foot { display: none; }

/* The navy rail is for the full desktop layout only: at 1024px and below the
   builder switches to its own light tablet layout (tabs, icon-only sidebar). */
@media (min-width: 1025px) {
    /* ── Navy rail ── */
    html body .rd-sidebar {
        background: linear-gradient(180deg, #0F1C35 0%, #0F1E36 60%, #0D2531 100%) !important;
        border-right: 1px solid rgba(255,255,255,.06) !important;
        scrollbar-width: none;
    }
    html body .rd-sidebar::-webkit-scrollbar { display: none; }
    html body .rd-sidebar-top { border-bottom: 1px solid rgba(255,255,255,.07) !important; padding: 20px 18px 18px !important; }
    html body .rd-progress-label { color: #fff !important; }
    html body .rd-progress-pct { color: var(--bp-on-dark) !important; }
    html body .rd-progress-track { background: rgba(255,255,255,.09) !important; border-radius: 999px !important; overflow: hidden; }
    html body .rd-progress-fill { background: var(--bp-on-dark) !important; border-radius: 999px !important; }
    html body .rd-progress-hint { color: rgba(255,255,255,.5) !important; }
    html body .rd-sidebar-section-label {
        font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace !important;
        font-size: 11px !important; font-weight: 500 !important;
        letter-spacing: .08em !important; text-transform: uppercase !important;
        color: rgba(255,255,255,.38) !important;
        padding: 20px 20px 10px !important;
    }

    html body .rd-nav-item { position: relative; }
    html body .rd-nav-item:hover { background: rgba(255,255,255,.05) !important; }
    html body .rd-nav-icon-wrap { background: rgba(255,255,255,.06) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08) !important; color: rgba(255,255,255,.72) !important; }
    html body .rd-nav-icon-wrap svg { stroke: rgba(255,255,255,.72) !important; }
    html body .rd-nav-item:hover .rd-nav-icon-wrap { background: rgba(255,255,255,.1) !important; }
    html body .rd-nav-title { color: rgba(255,255,255,.84) !important; }
    /* Hover on the dark rail: brighter, never the old light-sidebar slate (section-ditto-override.css) */
    html body .rd-nav-item:hover .rd-nav-title { color: #fff !important; }
    html body .rd-nav-item:hover .rd-nav-sub { color: rgba(255,255,255,.6) !important; }
    html body .rd-nav-item:hover .rd-nav-icon-wrap svg { stroke: #fff !important; }
    html body .rd-nav-sub { color: rgba(255,255,255,.42) !important; }
    html body .rd-nav-item.active { background: rgba(255,255,255,.08) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.09) !important; }
    html body .rd-nav-item.active::before {
        content: ""; position: absolute; left: -10px; top: 11px; bottom: 11px; width: 3px;
        border-radius: 0 3px 3px 0; background: var(--bp-on-dark);
    }
    html body .rd-nav-item.active .rd-nav-icon-wrap,
    html body .rd-nav-item.active:hover .rd-nav-icon-wrap { background: var(--bp-on-dark) !important; box-shadow: none !important; }
    html body .rd-nav-item.active .rd-nav-icon-wrap svg { stroke: var(--bp-night) !important; }
    html body .rd-nav-item.active .rd-nav-title { color: #fff !important; }
    html body .rd-nav-item.active .rd-nav-sub { color: rgba(255,255,255,.55) !important; }
    html body .rd-check--done { color: var(--bp-ok-on-dark) !important; }

    /* Trust note pinned to the bottom of the rail */
    html body .rd-sidebar-foot {
        display: flex; gap: 10px; align-items: flex-start;
        margin: auto 12px 14px; padding: 12px;
        border-radius: 12px;
        background: rgba(255,255,255,.04);
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
        font-family: var(--bp-sans); font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.55);
    }
    html body .rd-sf-ico { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.10); color: var(--bp-on-dark); }
    html body .rd-sf-text b { display: block; font-size: 12.5px; font-weight: 600; color: #fff; margin-bottom: 1px; }
}

@media (min-width: 769px) {

    /* ── Step toolbar: a progress line fills as you move through the 5 steps ── */
    html body .rd-step-bar::after {
        content: ""; position: absolute; left: 0; bottom: -1px; height: 2px;
        width: var(--bp-step, 20%);
        background: var(--bp-night);
        border-radius: 0 2px 2px 0;
        transition: width .6s cubic-bezier(.2,.7,.3,1);
    }
    html body .rd-form-main:has(#section-personal.active) .rd-step-bar { --bp-step: 20%; }
    html body .rd-form-main:has(#section-experience.active) .rd-step-bar { --bp-step: 40%; }
    html body .rd-form-main:has(#section-education.active) .rd-step-bar { --bp-step: 60%; }
    html body .rd-form-main:has(#section-additional-info.active) .rd-step-bar { --bp-step: 80%; }
    html body .rd-form-main:has(#section-summary-skills.active) .rd-step-bar { --bp-step: 100%; }

    /* ── The card you're working in lifts a little ── */
    html body .rd-card:focus-within,
    html body .accordion-card:focus-within {
        border-color: #C5CEDC !important;
        box-shadow: 0 0 0 4px rgba(15,28,53,.035), 0 16px 32px -18px rgba(15,28,53,.28) !important;
    }

    /* ── Preview: one seamless canvas, floating controls ── */
    html body .rd-preview-panel { background: #E8ECF2 !important; border-left: 0 !important; }
    html body .rd-preview-panel .preview-content { background: #E8ECF2 !important; }
    /* Preview toolbar: white bar with a hairline, same as the step bar on the left */
    html body .rd-preview-header {
        position: relative !important;
        background: rgba(255,255,255,.94) !important;
        border-bottom: 1px solid var(--bp-line) !important;
    }
    html body .rd-preview-header .page-nav,
    html body .rd-preview-header .zoom-controls {
        background: var(--bp-soft) !important;
        border: 1px solid var(--bp-line) !important;
        box-shadow: none !important;
    }
    html body .rd-template-btn { border-color: #DCE1E9 !important; box-shadow: 0 1px 2px rgba(15,28,53,.06) !important; }
    html body .rd-preview-panel .resume-page {
        border-radius: 3px;
        box-shadow: 0 0 0 1px rgba(15,28,53,.05), 0 2px 4px rgba(15,28,53,.05), 0 30px 60px -24px rgba(15,28,53,.3) !important;
    }
}

/* Live indicator breathes slowly beside "Live Preview" */
@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
    @keyframes bpLive {
        0% { box-shadow: 0 0 0 0 rgba(18,162,109,.45); }
        70% { box-shadow: 0 0 0 7px rgba(18,162,109,0); }
        100% { box-shadow: 0 0 0 0 rgba(18,162,109,0); }
    }
    html body .rd-preview-header .preview-header-left h3::before { box-shadow: none; animation: bpLive 2.6s ease-out infinite; }
}

/* =============================================================
   Leftover greens from older sheets (section-ditto-override.css,
   mobile-responsive.css, styles.css). Navy for where you are;
   green only for a finished section.
   ============================================================= */
html body .rd-header .nav-link::after { background: #fff !important; }
html body .entry-toast { border-left-color: var(--bp-accent) !important; }
html body .entry-toast::before { display: none !important; }

/* Phone: the "Resume sections" menu. The icons are real SVGs in the markup now;
   the old per-position mask icons were in the wrong order. */
html body .resume-section-icon { font-size: 0 !important; color: var(--bp-body) !important; background: var(--bp-soft) !important; }
html body .resume-section-icon::before { display: none !important; }
html body .resume-section-icon svg { width: 20px !important; height: 20px !important; }
html body .resume-section-item.active { background: var(--bp-accent-50) !important; border-left-color: var(--bp-accent) !important; color: var(--bp-ink) !important; }
html body .resume-section-item.active .resume-section-content,
html body .resume-section-item.active .resume-section-title { color: var(--bp-ink) !important; }
html body .resume-section-item.active .resume-section-icon { background: var(--bp-navy-50) !important; color: var(--bp-ink) !important; }
html body .resume-section-check { color: var(--bp-ok) !important; }
html body .mps-score, html body #rdMobilePct { color: var(--bp-ink) !important; }
@media (max-width: 768px) { html body .rd-step-bar #rdStepIcon { background: var(--bp-soft) !important; } }

/* Edit / Preview tabs (narrow windows) */
html body .rd-tab-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important; }
html body .rd-tab-btn.active { color: var(--bp-ink) !important; border-bottom-color: var(--bp-ink) !important; }
html body .rd-section-note p, html body .rd-section-note p strong { color: var(--bp-body) !important; }
html body .rd-section-note p strong { color: var(--bp-ink) !important; }
html body .rd-section-note svg { stroke: var(--bp-body) !important; }
html body .aig-icon-wrap { background: rgba(255,255,255,.12) !important; box-shadow: none !important; }
html body .aig-icon, html body .aig-icon svg { color: #fff !important; stroke: #fff !important; }
html body .aig-icon { background: rgba(255,255,255,.14) !important; box-shadow: none !important; }

/* =============================================================
   One voice in the form (see the builder critique)
   ============================================================= */
/* Example text inside the boxes: readable (#667085 is 4.8:1 on white; #98A2B3 was 2.6:1) */
html body .rd-input::placeholder, html body .rd-textarea::placeholder,
html body .accordion-body input::placeholder, html body .accordion-body textarea::placeholder { color: #667085 !important; }
/* Labels in sentence case, the same red * everywhere */
html body .accordion-body label { text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; font-weight: 500 !important; color: var(--bp-body) !important; }
html body .rd-sidebar-section-label, html body .mps-label, html body .rd-mp-row > span:first-child { text-transform: none !important; letter-spacing: 0 !important; }

/* Write with AI: a clear second choice, so Continue stays the main action */
html body .aig-btn { background: #fff !important; border: 1px solid var(--bp-ink) !important; box-shadow: none !important; }
html body .aig-btn:hover { background: var(--bp-soft) !important; border-color: var(--bp-ink) !important; }
html body .aig-btn .aig-label { color: var(--bp-ink) !important; -webkit-text-fill-color: var(--bp-ink) !important; background: none !important; }
html body .aig-sheen, html body .aig-ring { display: none !important; }
html body .aig-icon { background: var(--bp-navy-50) !important; }
html body .aig-icon svg, html body .aig-icon svg path { color: var(--bp-ink) !important; stroke: none !important; fill: var(--bp-ink) !important; }

html body .accordion-body label .rd-required { margin-left: 3px; color: #D92D20 !important; -webkit-text-fill-color: #D92D20 !important; }
/* Phone bottom bar: every working button in navy; only a disabled Previous is faded */
html body .mobile-bottom-btn.template-btn, html body .mobile-bottom-btn.template-btn .btn-label, html body .mobile-bottom-btn.template-btn .btn-icon,
html body .mobile-bottom-btn.prev-btn, html body .mobile-bottom-btn.prev-btn .btn-label, html body .mobile-bottom-btn.prev-btn .btn-icon { color: var(--bp-ink) !important; }
html body .mobile-bottom-btn.prev-btn:disabled { opacity: .4 !important; }

/* Guest saving note lives in the sidebar card on desktop, not floating over the preview
   (where some zoom level always put it on top of the page). Phones keep the floating hint. */
html body .rd-sf-guest { display: none; }
html body.auth-known:not(.logged-in) .rd-sf-guest { display: block; }
html body.auth-known:not(.logged-in) .rd-sf-member { display: none; }
html body .rd-sf-guest a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
html body .rd-sf-guest a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 2px; }
@media (min-width: 769px) { html body .guest-save-hint { display: none !important; } }

/* =============================================================
   Laptop widths (1025–1439px, e.g. 1280px or a 1536px screen at 125%).
   The 232px rail + 42/58 split left the form ~400px wide and the step
   title ran under Back. Here the form and preview share the space evenly
   and the rail is a little slimmer.
   ============================================================= */
@media (min-width: 1025px) and (max-width: 1439px) {
    html body .rd-app-layout { grid-template-columns: 208px minmax(0, 1fr) minmax(0, 1fr) !important; }
    html body .rd-sidebar { width: 208px !important; min-width: 208px !important; }
    html body .rd-step-bar { padding: 0 20px !important; }
    html body .rd-step-btn--prev { padding: 0 12px !important; }
}
/* The step title shortens ("Personal Informa…") instead of running under Back / Continue */
@media (min-width: 769px) {
    html body .rd-step-bar { gap: 12px; }
    html body .rd-step-left { flex: 1 1 auto; min-width: 0 !important; overflow: hidden; }
    html body .rd-step-left > div { min-width: 0; }
    html body .rd-step-title, html body .rd-step-meta { overflow: hidden !important; text-overflow: ellipsis !important; }
    html body .rd-step-right { flex: none; }
}
/* From 1440px the form keeps at least the width it had at 1439px, so widening
   the window never makes it narrower; wide screens keep the 42/58 split. */
@media (min-width: 1440px) {
    html body .rd-app-layout { grid-template-columns: 232px minmax(620px, 42fr) minmax(0, 58fr) !important; }
}
/* Narrowest laptop widths: "Download PDF" becomes "PDF" with the icon (the
   accessible name stays "Download PDF"); while it works it shows only the % */
@media (min-width: 1025px) and (max-width: 1099px) {
    html body .rd-preview-header .rd-download-btn .dl-word,
    html body .rd-preview-header .rd-download-btn .dl-text { display: none !important; }
}

/* =============================================================
   Laptops, scaled (html.is-scaled, set by the script at the top of
   index.html). The page is zoomed to fit a 1600px layout, but vh and vw
   still measure the real window, so the frame is sized in zoomed pixels:
   100vh / zoom fills the window top to bottom, and 100% (not 100vw) fills
   it side to side.
   ============================================================= */
@media screen {
    html.is-scaled, html.is-scaled body {
        height: calc(100vh / var(--vz)) !important; max-height: calc(100vh / var(--vz)) !important;
    }
    html.is-scaled body .rd-app-layout {
        width: 100% !important; max-width: none !important;
        height: calc(100vh / var(--vz) - 60px) !important; max-height: calc(100vh / var(--vz) - 60px) !important;
    }
    /* Zoomed, there's room for the full-width section rail (labels no longer cut off) */
    html.is-scaled body .rd-app-layout { grid-template-columns: 232px minmax(0, 1fr) minmax(0, 1fr) !important; }
    html.is-scaled body .rd-sidebar { width: 232px !important; min-width: 232px !important; }
    /* From about 1152px the zoomed page is at least 1440px wide: the 1440px layout */
    html.is-scaled-wide body .rd-app-layout { grid-template-columns: 232px minmax(620px, 42fr) minmax(0, 58fr) !important; }
    html.is-scaled-wide body .rd-step-bar { padding: 0 28px !important; }
    html.is-scaled-wide body .rd-step-btn--prev { padding: 0 14px !important; }
    html.is-scaled-wide body .rd-name-row,
    html.is-scaled-wide body .rd-two-col {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 14px !important;
    }
    html.is-scaled-wide body .rd-name-row > .rd-field-group,
    html.is-scaled-wide body .rd-two-col > .rd-field-group { margin-bottom: 0 !important; }
    html.is-scaled-wide body .rd-two-col > .rd-field-group:only-child { grid-column: 1 / -1; }
    /* Zoomed, even the narrowest laptop has room for "Download PDF" and the header links */
    html.is-scaled body .rd-preview-header .rd-download-btn .dl-word { display: inline !important; }
    html.is-scaled body .rd-header .header-nav { display: flex !important; }
    html.is-scaled body .rd-hdr-new span { display: inline; }
}
/* Ctrl+P prints at full size (Download PDF is made on the server and never zoomed) */
@media print { html.is-scaled { zoom: 1 !important; } }

/* Back matches Continue: an older sheet capped both step buttons at 28px
   (Continue escaped through its min-height, Back stayed short) */
@media (min-width: 769px) {
    html body .rd-step-btn--prev { height: 38px !important; min-height: 38px !important; max-height: none !important; }
    html body .rd-step-btn--next { max-height: none !important; }
    /* "Present" is as tall as the date field beside it (an older sheet set 48px) */
    html body .present-checkbox-wrapper { height: 44px !important; min-height: 44px !important; }
}
/* With the next step's name showing, the arrow goes after it:
   "Continue · Work Experience ›", not "Continue › · Work Experience" */
@media (min-width: 1280px) {
    html body .rd-next-text:has(.rd-next-sub:not(:empty)) .rd-next-label::after { display: none !important; }
    html body .rd-step-btn--next .rd-next-text { gap: 6px !important; }   /* an older sheet set 0 */
    html body .rd-next-sub:not(:empty)::after {
        content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 6px; vertical-align: -1px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center/contain no-repeat;
    }
}

/* Header: Help (opens in a new tab) and, for signed-in people without a plan,
   "Try Pro free" / "Upgrade" (js/index.js, updateHeaderPlanButton). Outlined,
   so Download PDF stays the strongest button on the screen. */
html body .rd-header .header-nav a.nav-help { display: inline-flex; align-items: center; gap: 5px; }
html body .rd-header .header-nav a.nav-help svg { opacity: .7; }
html body .rd-hdr-upgrade {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; margin-right: 10px;
    border: 1px solid rgba(255,255,255,.28); border-radius: 9px; background: transparent;
    color: #fff !important; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
html body .rd-hdr-upgrade:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.45); }
html body .rd-hdr-upgrade:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html body .rd-hdr-upgrade svg { stroke: #6ee7b7; }
/* Tablets and phones have a compact header; the plans page is in the account menu there */
@media (max-width: 1024px) { html body .rd-hdr-upgrade { display: none !important; } }

/* ATS checks under Resume progress (js/ats-live.js): one status panel for
   "how far along" and "how ready for an ATS". The side menu is dark. */
html body .rd-ats { margin: 12px 0 10px; }
html body .rd-ats-btn {
    display: flex; align-items: center; gap: 8px; width: calc(100% + 12px); margin: 0 -6px; padding: 2px 6px;
    border: 0; border-radius: 8px; background: none; font: inherit; text-align: left; color: #98A2B3; cursor: pointer;
}
html body .rd-ats-btn:hover { background: rgba(255,255,255,.06); }
html body .rd-ats-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
html body .rd-ats-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .rd-ats-l { font-size: 13px; font-weight: 600; color: #fff; letter-spacing: -.01em; }
html body .rd-ats-s { font-size: 12px; font-weight: 500; color: #FDB022; }
html body .rd-ats-s.is-ok { color: #6EE7B7; }
html body .rd-ats-n { font-size: 13px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
html body .rd-ats-bar { display: flex; gap: 2px; margin-top: 7px; }
html body .rd-ats-bar i { flex: 1; height: 6px; border-radius: 2px; background: rgba(255,255,255,.16); }
html body .rd-ats-bar i.on { background: #34D399; }
html body .rd-ats-pop {
    position: fixed; z-index: 60; width: 330px; padding: 0; overflow: hidden; background: #fff; color: #344054;
    border: 1px solid #E4E7EC; border-radius: 14px; box-shadow: 0 16px 40px -10px rgba(15,28,53,.28); outline: none;
}
/* Tinted header: the score and its bar, like the side menu's, on a soft navy-to-green wash */
html body .rd-ats-head {
    padding: 14px 16px 12px; border-bottom: 1px solid #E4E7EC;
    background: radial-gradient(120% 140% at 100% 0%, rgba(52,211,153,.16) 0%, rgba(52,211,153,0) 55%), linear-gradient(180deg, #F3F6FB 0%, #F8FAFC 100%);
}
html body .rd-ats-head.is-ok { background: radial-gradient(120% 140% at 100% 0%, rgba(52,211,153,.28) 0%, rgba(52,211,153,0) 60%), linear-gradient(180deg, #ECFDF3 0%, #F6FEF9 100%); }
html body .rd-ats-headrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
html body .rd-ats-pop h4 { margin: 0; font-size: 14px; font-weight: 600; color: #0F1C35; }
html body .rd-ats-score { font-size: 13px; font-weight: 500; color: #667085; font-variant-numeric: tabular-nums; white-space: nowrap; }
html body .rd-ats-score b { font-size: 20px; font-weight: 600; color: #0F1C35; letter-spacing: -.02em; }
html body .rd-ats-meter { display: flex; gap: 2px; margin: 8px 0 8px; }
html body .rd-ats-meter i { flex: 1; height: 6px; border-radius: 2px; background: #E4E7EC; }
html body .rd-ats-meter i.on { background: #17B26A; }
html body .rd-ats-pop .rd-ats-sub { margin: 0; font-size: 12.5px; line-height: 18px; color: #475467; }
html body .rd-ats-pop ul { list-style: none; margin: 0; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
html body .rd-ats-pop li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 18px; }
html body .rd-ats-pop li.ok { color: #667085; }
html body .rd-ats-pop li svg { flex-shrink: 0; margin-top: 1px; }
html body .rd-ats-pop li.ok svg { color: #17B26A; }
html body .rd-ats-pop li.todo svg { color: #DC6803; }
html body .rd-ats-pop li span { flex: 1; }
html body .rd-ats-pop li em { font-style: normal; color: #98A2B3; }
html body .rd-ats-fix { flex-shrink: 0; padding: 0 6px; margin: -1px -6px 0 0; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 12.5px; font-weight: 600; line-height: 20px; color: #067647; cursor: pointer; }
html body .rd-ats-fix:hover { background: #ECFDF3; }
/* Resume checks: three results at the top, then each group's list */
html body .rd-sum { padding: 14px 16px 12px; border-bottom: 1px solid #E4E7EC; background: radial-gradient(120% 140% at 100% 0%, rgba(52,211,153,.16) 0%, rgba(52,211,153,0) 55%), linear-gradient(180deg, #F3F6FB 0%, #F8FAFC 100%); }
html body .rd-sum h4 { margin: 0 0 10px; }
html body .rd-sum-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1px 12px; padding: 8px 10px; border: 1px solid #E4E7EC; border-radius: 8px; background: #fff; }
html body .rd-sum-row + .rd-sum-row { margin-top: 6px; }
html body .rd-sum-row b { font-size: 13px; font-weight: 600; color: #0F1C35; }
html body .rd-sum-row span { grid-column: 1; font-size: 12px; line-height: 16px; color: #667085; }
html body .rd-sum-row em, html body .rd-sum-row a { grid-row: 1 / span 2; grid-column: 2; }
html body .rd-sum-row em { font-style: normal; font-size: 13px; font-weight: 600; color: #475467; font-variant-numeric: tabular-nums; white-space: nowrap; }
html body .rd-sum-row em.ok { color: #067647; }
html body .rd-sum-row em.todo { color: #B54708; }
html body .rd-sum-row a { font-size: 12.5px; font-weight: 600; color: #0F1C35; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #98A2B3; white-space: nowrap; }
html body .rd-sum-note { margin: 10px 0 0; font-size: 12.5px; line-height: 18px; color: #475467; }
html body .rd-grp { padding: 12px 16px 14px; border-top: 1px solid #EAECF0; }
html body .rd-sum + .rd-grp { border-top: 0; }
html body .rd-grp-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
html body .rd-grp-h b { font-size: 13px; font-weight: 600; color: #0F1C35; }
html body .rd-grp-h small { font-size: 12px; color: #667085; }
html body .rd-ats-pop .rd-grp ul { padding: 0; gap: 7px; }
html body .rd-ats-pop li.unk { color: #475467; }
html body .rd-ats-pop li.unk svg { color: #98A2B3; }
html body .rd-target { display: flex; gap: 6px; margin-top: 6px; }
html body .rd-target input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid #D0D5DD; border-radius: 7px; font: inherit; font-size: 12.5px; color: #101828; background: #fff; }
html body .rd-target input:focus { outline: 2px solid #0F1C35; outline-offset: -1px; border-color: #0F1C35; }
html body .rd-target button { flex-shrink: 0; height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: #0F1C35; color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
html body .rd-jm { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px dashed #D0D5DD; border-radius: 8px; font-size: 12.5px; line-height: 17px; color: #475467; }
html body .rd-jm button { flex-shrink: 0; height: 30px; padding: 0 12px; border: 1px solid #0F1C35; border-radius: 8px; background: #fff; color: #0F1C35; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
html body .rd-jm button:hover { background: #F9FAFB; }

/* Tips: simple mistakes outside the checks */
html body .rd-tips { padding: 12px 16px 14px; border-top: 1px solid #EAECF0; }
html body .rd-tips .rd-tips-h { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #475467; }
html body .rd-ats-pop .rd-tips ul { padding: 0; }
html body .rd-ats-pop li.tip { color: #344054; }
html body .rd-ats-pop li.tip svg { color: #DC6803; }

/* Recruiter review (AI), under the checks */
html body .rd-ats-pop { overflow-y: auto; overscroll-behavior: contain; }
html body .rd-ats-pop.has-review { width: 400px; }
html body .rd-rev { padding: 14px 16px 16px; border-top: 1px solid #E4E7EC; background: #FCFCFD; }
html body .rd-rev-intro b { display: block; font-size: 14px; font-weight: 600; color: #0F1C35; }
html body .rd-rev-intro span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 18px; color: #475467; }
html body .rd-rev-run { display: flex; align-items: center; justify-content: center; width: 100%; height: 36px; margin-top: 12px; border: 1px solid #0F1C35; border-radius: 8px; background: #0F1C35; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
html body .rd-rev-run:hover { background: #1B2B4D; }
html body .rd-rev-again { flex-shrink: 0; white-space: nowrap; width: auto; height: 30px; margin: 0; padding: 0 12px; background: #fff; color: #0F1C35; border-color: #D0D5DD; }
html body .rd-rev-again:hover { background: #F9FAFB; border-color: #0F1C35; }
html body .rd-rev-err { margin: 10px 0 0; font-size: 12.5px; line-height: 18px; color: #B54708; }
html body .rd-rev-busy { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 18px; color: #344054; }
html body .rd-rev-spin { flex-shrink: 0; width: 16px; height: 16px; border: 2px solid #E4E7EC; border-top-color: #0F1C35; border-radius: 50%; animation: rdRevSpin .8s linear infinite; }
@keyframes rdRevSpin { to { transform: rotate(360deg); } }
html body .rd-rev-none { margin: 10px 0 0; font-size: 13px; color: #067647; }
html body .rd-rev-ready { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #ECFDF3; font-size: 13px; line-height: 19px; color: #067647; }
html body .rd-rev-ready b { font-weight: 600; }
html body .rd-rev-small { margin: 12px 0 0; }
html body .rd-rev-small > summary { cursor: pointer; font-size: 13px; font-weight: 500; color: #475467; }
html body .rd-rev-small[open] > summary { margin-bottom: 2px; }
html body .rd-rev-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
html body .rd-ats-pop li.rd-rev-item { display: block; }
html body .rd-rev-item { position: relative; padding: 10px 12px; border: 1px solid #E4E7EC; border-left-width: 3px; border-radius: 8px; background: #fff; }
html body .rd-rev-item.sev-high { border-left-color: #DC6803; }
html body .rd-rev-item.sev-medium { border-left-color: #FDB022; }
html body .rd-rev-item.sev-low { border-left-color: #98A2B3; }
html body .rd-rev-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding-right: 64px; }
html body .rd-rev-sev { flex-shrink: 0; font-size: 11.5px; font-weight: 600; color: #B54708; }
html body .rd-rev-item.sev-medium .rd-rev-sev { color: #93370D; }
html body .rd-rev-item.sev-low .rd-rev-sev { color: #475467; }
html body .rd-rev-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #667085; }
html body .rd-rev-prob { margin: 4px 0 0; font-size: 13px; line-height: 18px; font-weight: 600; color: #0F1C35; }
html body .rd-rev-fix { margin: 4px 0 0; font-size: 12.5px; line-height: 18px; color: #475467; }
html body .rd-rev-rw { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #F2F4F7; }
html body .rd-rev-rw p { flex: 1; margin: 0; font-size: 12.5px; line-height: 18px; color: #101828; }
html body .rd-rev-copy { flex-shrink: 0; padding: 0 6px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 12px; font-weight: 600; line-height: 20px; color: #0F1C35; cursor: pointer; }
html body .rd-rev-copy:hover { background: #fff; }
html body .rd-rev-go { position: absolute; top: 9px; right: 12px; margin: 0; }
html body .rd-rev-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 12px; line-height: 16px; color: #667085; }
@media (prefers-reduced-motion: reduce) { html body .rd-rev-spin { animation-duration: 2s; } }

/* Phones have no side menu: the checks get their own card under the progress bar
   (#rdAtsM), and the list opens as a sheet from the bottom. Hidden from 769px up. */
@media (min-width: 769px) { html body .rd-ats-m { display: none !important; } }
@media (max-width: 768px) { html body .rd-ats { display: none !important; } }

/* Behind the ATS checks list: the form and preview soften (side menu stays sharp) */
html body .rd-ats-scrim {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 59;
    background: rgba(15,28,53,.06);
    -webkit-backdrop-filter: blur(3px) saturate(115%); backdrop-filter: blur(3px) saturate(115%);
    opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility 0s linear .18s;
}
html body .rd-ats-scrim.on { opacity: 1; visibility: visible; transition: opacity .18s ease; }
html body .rd-ats-pop:not([hidden]) { animation: rdAtsIn .18s cubic-bezier(.2,.7,.3,1); }
@keyframes rdAtsIn { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    html body .rd-ats-scrim, html body .rd-ats-scrim.on { transition: none; }
    html body .rd-ats-pop:not([hidden]) { animation: none; }
}

/* =============================================================
   Tablets (769–1024px). The desktop frame above starts at 769px,
   so these put back the tablet layout it overrides:
   • two columns (sections + form); the preview has its own tab
   • the Edit / Preview tabs pinned under the 60px header (an older
     rule in responsive.css made them sticky at the top, behind it)
   • the side menu is white here, so the checks use dark text
   ============================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    html body .rd-app-layout {
        grid-template-columns: 232px minmax(0, 1fr) !important;
        margin-top: 104px !important;
        height: calc(100vh - 104px) !important; max-height: calc(100vh - 104px) !important;
    }
    html body #rdTabBar { position: fixed !important; top: 60px !important; left: 0 !important; right: 0 !important; }
    html body .rd-ats-btn { color: #98A2B3; }
    html body .rd-ats-btn:hover { background: #F2F4F7; }
    html body .rd-ats-btn:focus-visible { outline-color: #0F1C35; }
    html body .rd-ats-l, html body .rd-ats-n { color: #0F1C35; }
    html body .rd-ats-bar i { background: #E4E7EC; }
    html body .rd-ats-bar i.on { background: #12B76A; }
}

/* the sheet's close button (phones only) */
html body .rd-ats-x {
    display: none; position: absolute; top: 14px; right: 12px; width: 32px; height: 32px; align-items: center; justify-content: center;
    border: 0; border-radius: 8px; background: none; color: #475467; font-size: 20px; line-height: 1; cursor: pointer; z-index: 1;
}
html body .rd-ats-x:hover { background: #F2F4F7; color: #0F1C35; }

/* =============================================================
   Phones (≤768px): a Resume checks card under the progress bar,
   and the list as a bottom sheet
   ============================================================= */
@media (max-width: 768px) {
    html body .rd-ats-m {
        display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0 0; padding: 10px 12px;
        border: 1px solid #E4E7EC; border-radius: 10px; background: #fff; font: inherit; text-align: left; color: #98A2B3; cursor: pointer;
    }
    html body .rd-ats-m[hidden] { display: none; }
    html body .rd-ats-m:focus-visible { outline: 2px solid #0F1C35; outline-offset: 2px; }
    html body .rd-ats-m-t { flex: 1; min-width: 0; }
    html body .rd-ats-m-l { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: #0F1C35; }
    html body .rd-ats-m-s { display: block; font-size: 12.5px; line-height: 18px; font-weight: 500; color: #B54708; }
    html body .rd-ats-m-s.is-ok { color: #067647; }
    html body .rd-ats-m-n { font-size: 14px; font-weight: 600; color: #0F1C35; font-variant-numeric: tabular-nums; }
    html body .rd-ats-m svg { flex: none; }
    html body .rd-ats-m .rd-ats-bar { margin-top: 8px; }
    html body .rd-ats-m .rd-ats-bar i { height: 4px; background: #E4E7EC; }
    html body .rd-ats-m .rd-ats-bar i.on { background: #12B76A; }

    html body .rd-ats-pop {
        left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important;
        width: 100% !important; max-height: 86vh !important; max-height: 86dvh !important; overflow-y: auto !important;
        overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom);
        border: 0 !important; border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -12px 40px -8px rgba(15,28,53,.3) !important; z-index: 1200 !important;
    }
    html body .rd-ats-pop::before { content: ""; display: block; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: #D0D5DD; }
    html body .rd-ats-pop:not([hidden]) { animation: rdAtsUp .22s cubic-bezier(.2,.7,.3,1); }
    html body .rd-ats-scrim { left: 0 !important; z-index: 1150 !important; }
    /* more below: a soft fade on the sheet's bottom edge, gone once scrolled to the end */
    html body .rd-ats-pop::after {
        content: ""; position: sticky; bottom: 0; display: block; height: 48px; margin-top: -48px; pointer-events: none;
        background: linear-gradient(180deg, rgba(255,255,255,0), #fff 85%); transition: opacity .15s ease;
    }
    html body .rd-ats-pop.at-end::after { opacity: 0; }
    /* the job title box: plain padding (the form's icon padding doesn't apply), 16px so iOS doesn't zoom */
    html body .rd-target input { height: 40px !important; padding: 0 12px !important; font-size: 16px !important; text-indent: 0 !important; }
    html body .rd-target button { height: 40px !important; padding: 0 16px !important; font-size: 15px !important; }
    html body .rd-ats-x { display: flex; }
}
@keyframes rdAtsUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html body .rd-ats-pop:not([hidden]) { animation: none !important; } }

/* ── Skills editor (js/skills-editor.js): chips, and optional groups ─────────── */
.sk-editor { display: flex; flex-direction: column; gap: 10px; }
.sk-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--bp-line-2); border-radius: 10px; background: #fff; min-height: 46px; cursor: text; }
.sk-chips:focus-within { border-color: var(--bp-accent); box-shadow: 0 0 0 3px var(--bp-navy-50); }
.sk-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; background: var(--bp-soft); border: 1px solid var(--bp-line); border-radius: 999px; padding: 3px 4px 3px 10px; font: 13px var(--bp-sans); color: var(--bp-text); overflow-wrap: anywhere; }
.sk-x { border: 0; background: none; color: var(--bp-faint); font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 5px; border-radius: 50%; }
.sk-x:hover { color: var(--bp-ink); background: var(--bp-soft-2); }
.sk-input { flex: 1; min-width: 140px; border: 0; outline: 0; font: 14px var(--bp-sans); color: var(--bp-text); padding: 4px; background: transparent; }
.sk-group { border: 1px solid var(--bp-line); border-radius: 12px; padding: 10px; background: #FCFCFD; display: flex; flex-direction: column; gap: 8px; }
.sk-ghead { display: flex; gap: 8px; align-items: center; }
.sk-gname { flex: 1; min-width: 0; border: 1px solid var(--bp-line-2); border-radius: 8px; padding: 8px 10px; font: 600 14px var(--bp-sans); color: var(--bp-ink); background: #fff; }
.sk-gname:focus { outline: none; border-color: var(--bp-accent); box-shadow: 0 0 0 3px var(--bp-navy-50); }
.sk-gdel { border: 0; background: none; color: var(--bp-muted); font: 13px var(--bp-sans); cursor: pointer; padding: 6px; white-space: nowrap; }
.sk-gdel:hover { color: var(--bp-ink); }
.sk-add { border: 1px dashed var(--bp-line-2); background: #fff; border-radius: 10px; padding: 9px; font: 500 14px var(--bp-sans); color: var(--bp-ink); cursor: pointer; }
.sk-add:hover { background: var(--bp-soft); }
.sk-status { margin: 0; font: 13px var(--bp-sans); color: var(--bp-ok); }
.sk-status.is-warn { color: var(--bp-amber); }
.sk-tip { margin: 0; font: 12.5px/1.5 var(--bp-sans); color: var(--bp-muted); }
@media (max-width: 640px) { .sk-input { font-size: 16px; } .sk-gname { font-size: 16px; } }   /* no zoom on focus in iOS */
/* the builder's shared field styles (borders, icon padding, centred text on phones) stay out of the editor */
html body .sk-editor input.sk-input { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 4px !important; margin: 0 !important; height: auto !important; min-height: 0 !important; width: auto !important; text-align: left !important; border-radius: 0 !important; }
html body .sk-editor input.sk-gname { padding: 8px 10px !important; margin: 0 !important; height: auto !important; text-align: left !important; background-image: none !important; width: auto !important; }
.sk-switch { align-self: flex-start; border: 0; background: none; padding: 2px 0; font: 500 13px var(--bp-sans); color: var(--bp-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sk-switch:hover { color: var(--bp-ink); }

/* =============================================================
   Download PDF: a small, calm reaction before the click.
   Hover: a light sheen passes over the button and the arrow drops
   into the tray. Press: the button and arrow push down. Never while
   the PDF is being made (.is-busy shows its own progress).
   ============================================================= */
html body .rd-download-btn:not(.is-busy) { position: relative; overflow: hidden; isolation: isolate; }
html body .rd-download-btn:not(.is-busy)::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.2) 50%, transparent 70%);
    transform: translateX(-120%);
}
html body .rd-download-btn:not(.is-busy):hover::after { transform: translateX(120%); transition: transform .75s cubic-bezier(.2,.7,.3,1); }
html body .rd-download-btn svg polyline,
html body .rd-download-btn svg line,
html body .download-btn .btn-icon svg polyline,
html body .download-btn .btn-icon svg line { transition: transform .2s ease; }
html body .rd-download-btn:not(.is-busy):hover svg polyline,
html body .rd-download-btn:not(.is-busy):hover svg line { animation: dlDrop 1s ease-in-out infinite; }
html body .rd-download-btn:not(.is-busy):active svg polyline,
html body .rd-download-btn:not(.is-busy):active svg line,
html body .download-btn:not(.is-busy):active .btn-icon svg polyline,
html body .download-btn:not(.is-busy):active .btn-icon svg line { animation: none; transform: translateY(3px); }
html body .rd-download-btn:focus-visible { outline: 2px solid #34D399 !important; outline-offset: 2px !important; }
@keyframes dlDrop { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(2.5px); } }
@media (prefers-reduced-motion: reduce) {
    html body .rd-download-btn:not(.is-busy):hover::after { transition: none; }
    html body .rd-download-btn:not(.is-busy):hover svg polyline,
    html body .rd-download-btn:not(.is-busy):hover svg line { animation: none; transform: translateY(2px); }
}
