@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&family=Manrope:wght@400;600;700;800&family=Lora:wght@400;600;700&family=Merriweather:wght@400;700&family=Poppins:wght@400;600;700;800&family=Archivo:wght@700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    min-width: 300px;
}

h1:focus {
    outline: none;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: var(--fgColor-danger);
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var(--borderColor-default, #e0e0e0);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--fgColor-accent);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ===== Primer compat layer =====
   Implements the Bootstrap utility vocabulary still used by the markup,
   mapped onto Primer CSS variables. Primer's own classes (btn, form-control,
   form-select, form-checkbox, Label, d-flex, flex-*, color-fg-*, color-bg-*)
   are NOT redefined here. */
.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.g-2 { gap: var(--base-size-8, 8px); }
.g-3 { gap: var(--base-size-16, 16px); }
.row.g-2, .row.g-3 { gap: 0; }

.col-12, .col-md-3, .col-md-4, .col-md-6 {
    padding: 0 8px 16px;
    box-sizing: border-box;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }

.flex-grow-1 { flex: 1 1 auto; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }

.gap-1 { gap: var(--base-size-4, 4px); }
.gap-2 { gap: var(--base-size-8, 8px); }
.gap-3 { gap: var(--base-size-16, 16px); }
.mb-2 { margin-bottom: var(--base-size-8, 8px); }
.mb-3 { margin-bottom: var(--base-size-16, 16px); }
.mt-2 { margin-top: var(--base-size-8, 8px); }
.p-2 { padding: var(--base-size-8, 8px); }
.p-3 { padding: var(--base-size-16, 16px); }
.px-1 { padding-left: var(--base-size-4, 4px); padding-right: var(--base-size-4, 4px); }
.px-3 { padding-left: var(--base-size-16, 16px); padding-right: var(--base-size-16, 16px); }
.py-2 { padding-top: var(--base-size-8, 8px); padding-bottom: var(--base-size-8, 8px); }
.py-0 { padding-top: 0; padding-bottom: 0; }
.ms-auto { margin-left: auto; }
.mb-0 { margin-bottom: 0; }
.overflow-auto { overflow: auto; }

.border { border: 1px solid var(--borderColor-default); }
.border-bottom { border-bottom: 1px solid var(--borderColor-default); }
.rounded { border-radius: 6px; }
.rounded-2 { border-radius: 6px; }

.text-center { text-align: center; }
.text-decoration-line-through { text-decoration: line-through; }
.small { font-size: 12px; }

.form-label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fgColor-default);
}

.form-control {
    width: 100%;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-control-sm {
    padding: 3px 8px;
    font-size: 12px;
    min-height: 28px;
}

.form-select-sm {
    padding: 3px 24px 3px 8px;
    font-size: 12px;
    min-height: 28px;
}

.w-auto { width: auto; }



/* Primer has no .btn-group; connect adjacent buttons. */
.btn-group { display: inline-flex; }

.btn-group > .btn:not(:first-child) {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-group > .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Custom dropdown caret (Primer normally uses an Octicon). */
.dropdown-caret {
    display: inline-block;
    width: 0;
    height: 0;
    vertical-align: middle;
    border-style: solid;
    border-width: 4px 4px 0 4px;
    border-color: currentColor transparent transparent transparent;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

[aria-expanded="true"] .dropdown-caret {
    transform: rotate(180deg);
}

/* ===== Resume builder layout ===== */
.builder-layout {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.builder-toolbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--bgColor-default);
    border-bottom: 1px solid var(--borderColor-default);
    box-shadow: 0 1px 0 var(--shadow-resting-medium, rgba(31, 35, 40, 0.04));
}

.builder-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.editor-pane {
    overflow-y: auto;
    border-right: 1px solid var(--borderColor-default);
}

.preview-pane {
    overflow-y: auto;
}

.editor-pane .form-label {
    font-weight: 600;
    color: var(--fgColor-default);
}

.drag-handle,
.section-drag-handle {
    cursor: grab;
    user-select: none;
    color: var(--fgColor-muted);
}

    .drag-handle:active,
    .section-drag-handle:active {
        cursor: grabbing;
    }

.sortable-item {
    list-style: none;
}

/* ===== Resume preview (ATS-friendly, single column) ===== */
/* ===== Resume sidebar ===== */
.builder-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.builder-split {
    min-width: 0;
}

.resume-sidebar {
    width: 260px;
    flex: 0 0 260px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bgColor-muted);
    border-right: 1px solid var(--borderColor-default);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem .75rem;
    background: var(--bgColor-muted);
    border-bottom: 1px solid var(--borderColor-default);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .95rem;
}

.dropdown {
    position: relative;
    z-index: 1001;
}

.dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1001;
    display: none;
    min-width: 180px;
    max-width: calc(100vw - 32px);
    margin-top: 4px;
    padding: 4px 0;
    list-style: none;
    background: var(--bgColor-default);
    border: 1px solid var(--borderColor-default);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(31, 35, 40, 0.12);
}

/* Hide Primer's default pseudo-element carets on the menu box itself */
.dropdown-menu::before,
.dropdown-menu::after {
    display: none !important;
}

.dropdown-menu.dropdown-menu-end {
    left: auto;
    right: 0;
}

.dropdown-menu.show {
    display: block;
    z-index: 1001;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 6px 16px;
    border: 0;
    background: transparent;
    color: var(--fgColor-default);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--bgColor-accent-muted);
    color: var(--fgColor-default);
    outline: none;
}

.resume-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--bgColor-accent-muted);
    color: var(--fgColor-accent);
    font-size: .72rem;
    font-weight: 700;
}

.sidebar-list {
    overflow-y: auto;
    padding: .4rem;
}

.sidebar-footer {
    padding: .6rem .75rem;
    border-top: 1px solid var(--borderColor-default);
    background: var(--bgColor-muted);
    font-size: .8rem;
    color: var(--fgColor-muted);
    text-align: center;
}

.sidebar-footer a {
    color: var(--fgColor-accent);
    text-decoration: none;
}

.sidebar-footer a:hover {
    text-decoration: underline;
}

.resume-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .6rem;
    margin-bottom: .35rem;
    border-radius: .55rem;
    cursor: pointer;
    border: 1px solid transparent;
}

.resume-item:hover {
    background: var(--bgColor-accent-muted);
}

.resume-item.active {
    background: var(--bgColor-accent-muted);
    border-color: var(--borderColor-accent-emphasis);
}

.resume-dot {
    flex: 0 0 auto;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff;
}

.resume-item-icon {
    flex: 0 0 auto;
    color: var(--fgColor-muted);
    visibility: hidden;
}

.resume-item.active .resume-item-icon {
    visibility: visible;
}

.resume-item-main {
    flex: 1 1 auto;
    min-width: 0;
}

.resume-name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--fgColor-default);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resume-meta {
    font-size: .75rem;
    color: var(--fgColor-muted);
}

.resume-status {
    margin-left: .4rem;
    font-size: .7rem;
    line-height: 1.4;
}

.resume-item-actions {
    flex: 0 0 auto;
    display: flex;
    gap: .1rem;
}

.hover-actions {
    display: flex;
    gap: .1rem;
    opacity: 0;
    transform: translateX(4px);
    transition: none;
}

.resume-item:hover .hover-actions,
.resume-item:focus-within .hover-actions,
.resume-item.active .hover-actions {
    opacity: 1;
    transform: none;
}

.btn-icon {
    padding: .15rem .3rem;
    font-size: .85rem;
    line-height: 1;
    border-radius: .4rem;
    color: var(--fgColor-muted);
}

.btn-icon:hover {
    background: rgba(0, 0, 0, .06);
}

.btn-icon.color-fg-danger {
    color: var(--fgColor-danger);
}

.octicon {
    vertical-align: text-bottom;
    flex-shrink: 0;
}

.resume-rename {
    font-size: .8rem;
    padding: .15rem .4rem;
}

@media (hover: none), (max-width: 991.98px) {
    .hover-actions {
        opacity: 1;
        transform: none;
    }
}

.preview-controls {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 0 .75rem;
    padding: .75rem 1rem;
    background: var(--bgColor-muted);
    border-bottom: 1px solid var(--borderColor-default);
}

.preview-pane {
    overflow-y: auto;
    padding: 0;
}

.resume-preview {
    --accent: #1b6ec2;
    --accent-soft: #cfe1f5;
    --accent-ink: #10243f;
    background: #fff;
    max-width: 820px;
    margin: 1rem auto;
    padding: 2.25rem 2.5rem;
    font-size: 11pt;
    line-height: 1.45;
    color: #1a1a1a;
}

.resume-preview.fs-small  { font-size: 10pt; }
.resume-preview.fs-medium { font-size: 11pt; }
.resume-preview.fs-large  { font-size: 12pt; }
.resume-preview.fs-xlarge { font-size: 13pt; }

.resume-preview a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.resume-preview h1 {
    font-size: 2.07em;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 .15rem;
}

.rp-title {
    font-size: 1.15em;
    font-weight: 600;
    margin-bottom: .4rem;
}

.rp-contact {
    font-size: .93em;
    color: #444;
    margin-bottom: .6rem;
}

.rp-summary {
    margin: 0 0 .4rem;
    color: #333;
}

.rp-section {
    margin-top: 1.4rem;
}

.rp-section h2 {
    font-size: 1.09em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding-bottom: .25rem;
    margin-bottom: .6rem;
}

.rp-entry {
    margin-bottom: .85rem;
}

.rp-entry:last-child {
    margin-bottom: 0;
}

.rp-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.rp-strong {
    font-size: 1.11em;
    font-weight: 700;
}

.rp-org {
    font-style: italic;
    color: #444;
}

.rp-dates,
.rp-muted {
    color: #666;
    font-size: .89em;
    white-space: nowrap;
    font-weight: 500;
}

.rp-desc {
    margin: .2rem 0 0;
    color: #333;
}

.rp-line {
    margin: 0;
    color: #333;
}

/* ---- Theme: Default (accent left border) ---- */
.theme-default {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.theme-default h1,
.theme-default .rp-strong {
    color: var(--accent-ink);
}

.theme-default .rp-title {
    color: var(--accent);
}

.theme-default .rp-section {
    padding-left: .75rem;
    border-left: 3px solid var(--accent);
}

.theme-default .rp-section h2 {
    color: var(--accent);
    border-bottom: 2px solid var(--accent-soft);
}

/* ---- Theme: Minimalism (black/white, airy) ---- */
.theme-minimal {
    font-family: 'Inter', "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.theme-minimal h1 {
    color: #000;
    font-weight: 700;
}

.theme-minimal .rp-strong {
    color: #111;
}

.theme-minimal .rp-title {
    color: #333;
}

.theme-minimal .rp-section {
    margin-top: 1.8rem;
    padding-left: 0;
}

.theme-minimal .rp-section h2 {
    color: #111;
    border-bottom: 1px solid #ccc;
    letter-spacing: .12em;
    font-weight: 600;
}

.theme-minimal .rp-entry {
    margin-bottom: 1rem;
}

/* ---- Theme: Modern (accent filled section bars) ---- */
.theme-modern {
    font-family: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.theme-modern h1 {
    color: var(--accent-ink);
}

.theme-modern .rp-title {
    color: var(--accent);
}

.theme-modern .rp-strong {
    color: var(--accent-ink);
}

.theme-modern .rp-section {
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
}

.theme-modern .rp-section h2 {
    color: #fff;
    background: var(--accent);
    border-bottom: none;
    letter-spacing: .06em;
    padding: .3rem .6rem;
    border-radius: 4px;
    margin-bottom: .6rem;
}

.theme-modern .rp-org {
    color: #475569;
}

/* ---- Theme: Classic (serif, traditional) ---- */
.theme-classic {
    font-family: 'Merriweather', Georgia, "Times New Roman", serif;
}

.theme-classic h1 {
    text-align: center;
    font-size: 2.18em;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--accent-ink);
}

.theme-classic .rp-title {
    text-align: center;
    color: var(--accent);
}

.theme-classic .rp-contact,
.theme-classic .rp-summary {
    text-align: center;
}

.theme-classic .rp-section h2 {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: 1.04em;
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
    padding-bottom: .3rem;
}

.theme-classic .rp-strong {
    color: var(--accent-ink);
}

/* ---- Theme: Compact (dense) ---- */
.theme-compact {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: .91em;
    line-height: 1.35;
}

.theme-compact h1 {
    font-size: 1.64em;
    margin: 0 0 .1rem;
    color: var(--accent-ink);
}

.theme-compact .rp-title {
    margin-bottom: .2rem;
    color: var(--accent);
}

.theme-compact .rp-section {
    margin-top: .8rem;
}

.theme-compact .rp-section h2 {
    font-size: .98em;
    color: var(--accent);
    border-bottom: 1px solid var(--accent-soft);
}

.theme-compact .rp-entry {
    margin-bottom: .5rem;
}

.theme-compact .rp-strong {
    color: var(--accent-ink);
}

/* ---- Theme: Elegant (refined, thin rules) ---- */
.theme-elegant {
    font-family: 'Lora', Georgia, "Times New Roman", Times, serif;
}

.theme-elegant h1 {
    font-weight: 600;
    font-size: 1.96em;
    letter-spacing: .04em;
    color: var(--accent-ink);
}

.theme-elegant .rp-title {
    color: var(--accent);
    font-style: italic;
}

.theme-elegant .rp-section {
    padding-left: .5rem;
    border-left: 2px solid var(--accent-soft);
}

.theme-elegant .rp-section h2 {
    font-size: 1.04em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--accent);
    border-bottom: 1px solid var(--accent-soft);
    padding-bottom: .25rem;
}

.theme-elegant .rp-strong {
    color: var(--accent-ink);
}

/* ---- Theme: Professional (bold name rule) ---- */
.theme-professional {
    font-family: 'Inter', "Segoe UI", Roboto, system-ui, sans-serif;
}

.theme-professional h1 {
    color: var(--accent-ink);
    border-bottom: 2px solid var(--accent);
    padding-bottom: .3rem;
    font-weight: 700;
}

.theme-professional .rp-title {
    color: var(--accent);
}

.theme-professional .rp-strong {
    color: var(--accent-ink);
}

.theme-professional .rp-section h2 {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 2px solid var(--accent);
    padding-bottom: .2rem;
}

/* ---- Theme: Creative (soft accent panel) ---- */
.theme-creative {
    font-family: 'Poppins', "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
}

.theme-creative h1 {
    color: var(--accent-ink);
    font-weight: 800;
    letter-spacing: -.01em;
}

.theme-creative .rp-title {
    color: var(--accent);
    font-style: italic;
}

.theme-creative .rp-strong {
    color: var(--accent-ink);
}

.theme-creative .rp-section {
    padding: .75rem;
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}

.theme-creative .rp-section h2 {
    color: var(--accent);
}

/* ---- Theme: Technical (monospace) ---- */
.theme-technical {
    font-family: 'JetBrains Mono', ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.theme-technical h1 {
    color: var(--accent-ink);
    letter-spacing: -.01em;
}

.theme-technical .rp-title {
    color: var(--accent);
}

.theme-technical .rp-strong {
    color: var(--accent-ink);
}

.theme-technical .rp-section h2 {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 1px dashed var(--accent);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ---- Theme: Bold (heavy type) ---- */
.theme-bold {
    font-family: 'Archivo', "Segoe UI", system-ui, Arial, sans-serif;
}

.theme-bold h1 {
    color: var(--accent-ink);
    font-size: 2.4em;
    font-weight: 900;
    letter-spacing: -.02em;
}

.theme-bold .rp-title {
    color: var(--accent);
}

.theme-bold .rp-strong {
    color: var(--accent-ink);
}

.theme-bold .rp-section {
    border-left: 6px solid var(--accent);
    padding-left: 1rem;
}

.theme-bold .rp-section h2 {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .1em;
}

/* ---- Color schemes (set accent variables) ---- */
.scheme-blue    { --accent: #1b6ec2; --accent-soft: #cfe1f5; --accent-ink: #10243f; }
.scheme-indigo  { --accent: #4f46e5; --accent-soft: #e0e7ff; --accent-ink: #1e1b4b; }
.scheme-emerald { --accent: #059669; --accent-soft: #d1fae5; --accent-ink: #064e3b; }
.scheme-rose    { --accent: #e11d48; --accent-soft: #ffe4e6; --accent-ink: #4c0519; }
.scheme-amber   { --accent: #d97706; --accent-soft: #fef3c7; --accent-ink: #451a03; }
.scheme-violet  { --accent: #7c3aed; --accent-soft: #ede9fe; --accent-ink: #2e1065; }
.scheme-teal    { --accent: #0d9488; --accent-soft: #ccfbf1; --accent-ink: #042f2e; }
.scheme-slate   { --accent: #475569; --accent-soft: #e2e8f0; --accent-ink: #0f172a; }
.scheme-black   { --accent: #111111; --accent-soft: #e5e7eb; --accent-ink: #000000; }
.scheme-red      { --accent: #dc2626; --accent-soft: #fee2e2; --accent-ink: #7f1d1d; }
.scheme-orange   { --accent: #ea580c; --accent-soft: #ffedd5; --accent-ink: #7c2d12; }
.scheme-pink     { --accent: #db2777; --accent-soft: #fce7f3; --accent-ink: #831843; }
.scheme-cyan     { --accent: #0891b2; --accent-soft: #cffafe; --accent-ink: #164e63; }
.scheme-lime     { --accent: #65a30d; --accent-soft: #ecfccb; --accent-ink: #365314; }
.scheme-purple   { --accent: #9333ea; --accent-soft: #f3e8ff; --accent-ink: #4a1d96; }

.mobile-header-row {
    width: 100%;
}

.brand {
    font-size: 1.05rem;
    letter-spacing: .02em;
}

@media (min-width: 992px) {
    .mobile-header-row {
        width: auto;
        margin-right: .75rem;
    }
}

.builder-toolbar .toolbar-contents .tb-group {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
}

@media (max-width: 991.98px) {
    .builder-toolbar {
        flex-direction: column;
        align-items: stretch !important;
        flex-wrap: nowrap;
        padding: 12px 12px !important;
        width: 100%;
        gap: 12px;
        position: static !important;
        box-shadow: none !important;
    }

    .mobile-header-row {
        padding-bottom: 8px;
        border-bottom: 1px solid var(--borderColor-default);
    }

    .builder-toolbar .toolbar-contents {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 12px;
    }

    .builder-toolbar .toolbar-selects {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px !important;
        width: 100%;
        padding-left: 0 !important;
    }

    .builder-toolbar .toolbar-selects .select-group {
        flex-direction: column;
        align-items: stretch !important;
        gap: 2px !important;
    }

    .builder-toolbar .toolbar-selects .form-label {
        font-size: 11px;
        margin-bottom: 2px;
        width: 100%;
        text-align: left;
    }

    .builder-toolbar .toolbar-selects select {
        width: 100% !important;
    }

    .builder-toolbar .toolbar-contents .ms-auto {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0;
        gap: 8px !important;
        justify-content: stretch !important;
    }

    .builder-toolbar .toolbar-contents .tb-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        gap: 6px;
    }

    .builder-toolbar .toolbar-contents .tb-group.tb-group-1 {
        grid-template-columns: 1fr;
    }

    .builder-toolbar .toolbar-contents .tb-group > * {
        min-width: 0;
    }

    .builder-toolbar .toolbar-contents .tb-group .btn,
    .builder-toolbar .toolbar-contents .tb-group .dropdown-toggle {
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .builder-toolbar .toolbar-contents .tb-group .dropdown {
        display: flex;
    }

    .builder-toolbar .toolbar-contents .tb-group .btn-group {
        display: flex;
        width: 100%;
    }

    .builder-toolbar .toolbar-contents .tb-group .btn-group > .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .builder-toolbar .toolbar-contents:not(.d-none) {
        background: var(--bgColor-muted);
        border: 1px solid var(--borderColor-default);
        border-radius: 8px;
        padding: 12px;
        margin-top: 4px;
    }

    .builder-layout {
        height: auto;
        overflow: visible;
    }

    .builder-body {
        flex-direction: column;
    }

    .resume-sidebar {
        width: 100%;
        flex: 0 0 auto;
        max-height: 40vh;
    }

    .builder-split {
        grid-template-columns: 1fr;
    }

    .editor-pane,
    .preview-pane {
        max-height: none;
    }

    .col-md-3, .col-md-4, .col-md-6 { flex: 0 0 100%; max-width: 100%; }

    .sidebar-footer {
        display: none;
    }
}

/* ===== Print: show only the preview ===== */
@media print {
    .sidebar,
    .resume-sidebar,
    .builder-toolbar,
    .editor-pane,
    .preview-controls {
        display: none !important;
    }

    .builder-split {
        display: block;
    }

    .preview-pane {
        overflow: visible;
        max-height: none;
        background: #fff !important;
        padding: 0 !important;
    }

    .resume-preview {
        box-shadow: none;
        max-width: 100%;
        padding: 0.5rem 0.75rem !important;
    }
}

.collapse-toggle {
    text-decoration: none;
    color: var(--fgColor-muted);
    font-size: 1rem;
    line-height: 1;
}

.collapse-toggle:hover {
    color: var(--fgColor-accent);
}