        :root {
            --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
            --font-display: 'DM Serif Display', Georgia, serif;
            --ink: #0f1219;
            --ink-muted: #374151;
            --ink-light: #4b5563;
            /* Brand accent (match landing CTAs + wizard) */
            --accent: rgb(71, 70, 68);
            --accent-hover: #5a5856;
            --accent-soft: rgba(71, 70, 68, 0.10);
            --paper: #faf9f7;
            --paper-warm: #f5f3f0;
            --border: #e2dfdb;
            --border-strong: #c9c4be;
            /* Print / newspaper tokens (shared with job board) */
            --news-ink: #111111;
            --news-muted: #4a4a4a;
            --news-rule: #1a1a1a;
            --news-paper: #f5f2ea;
            --news-paper-contrast: #faf8f3;
            --news-fold: #e8e4d9;
        }

        html {
            overflow-x: hidden;
            /* Reserve scrollbar gutter so column widths (and container-query-derived heights) do not jump when accordion/step height crosses overflow. */
            scrollbar-gutter: stable;
            /* Prevents iOS Safari from inflating text and blowing flex/grid layouts (DevTools often keeps 16px). */
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }
        body {
            font-family: var(--font-sans);
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
            min-height: 100dvh;
            position: relative;
            background: var(--news-paper);
            background-image:
                linear-gradient(180deg, var(--news-paper-contrast) 0%, var(--news-paper) 28%, var(--news-paper) 100%);
            /* fixed backgrounds are unreliable on iOS / Chrome Android; desktop-only avoids repaint/layout bugs on real devices. */
            background-attachment: scroll;
            transition: opacity 180ms ease;
        }
        @media (min-width: 1024px) {
            body {
                background-attachment: fixed;
            }
        }
        html.js-page-transition body {
            opacity: 0;
        }
        html.js-page-transition body.page-ready {
            opacity: 1;
        }
        body.page-leaving {
            opacity: 0 !important;
        }
        @media (prefers-reduced-motion: reduce) {
            body {
                transition: none;
            }
            html.js-page-transition body,
            html.js-page-transition body.page-ready,
            body.page-leaving {
                opacity: 1 !important;
            }
        }

        /* Light newsprint ruling */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image:
                repeating-linear-gradient(
                    0deg,
                    transparent,
                    transparent 23px,
                    rgba(26, 26, 26, 0.045) 24px
                );
            pointer-events: none;
            z-index: 0;
        }
        /* position:fixed + full-screen layers often glitch on mobile WebKit; anchor to body height instead. */
        @media (max-width: 1023px) {
            body::before {
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                min-height: 100vh;
                min-height: 100dvh;
            }
        }

        /* Column flex + min height: avoids a tall empty band below the footer when main is short (e.g. dashboard). */
        #app {
            position: relative;
            z-index: 1;
            min-height: 100vh;
            min-height: 100dvh;
            display: flex;
            flex-direction: column;
        }
        /* Template carousel auto-scroll */
        @keyframes carousel-scroll {
            0%   { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }
        .carousel-track {
            animation: carousel-scroll 40s linear infinite;
        }
        .carousel-track:hover {
            animation-play-state: paused;
        }
        @keyframes carousel-scroll-third {
            0%   { transform: translateX(0); }
            100% { transform: translateX(-33.333%); }
        }
        .carousel-track-slow {
            animation: carousel-scroll-third 55s linear infinite;
        }
        .carousel-track-slow:hover {
            animation-play-state: paused;
        }
        .landing-template-carousel-track {
            animation: carousel-scroll-third 48s linear infinite;
        }
        .landing-template-carousel-track:hover {
            animation-play-state: paused;
        }
        .landing-template-card {
            width: 320px;
            flex: 0 0 auto;
        }
        .landing-template-preview {
            aspect-ratio: 210/297;
            width: 100%;
            border-radius: 1rem;
            overflow: hidden;
            border: 1px solid #e5e7eb;
            background: #fff;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
            position: relative;
        }
        .landing-template-iframe {
            border: none;
            width: 794px;
            height: 1123px;
            transform: scale(0.403);
            transform-origin: 0 0;
            pointer-events: none;
            display: block;
        }

        /* Form controls — warm paper + ink; sharp square frames, #1a1a1a border (matches --news-rule) */
        #app input:not([type="range"]):not([type="color"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not(.sr-only):not(.news-modal-input):not(.border-red-100),
        #app select,
        #app textarea:not(.news-modal-input) {
            background-color: var(--paper);
            color: var(--ink);
            transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
            border-radius: 0 !important;
            border-width: 1px;
            border-style: solid;
            border-color: #1a1a1a !important;
        }
        /* Placeholders: explicit color + no opacity stacking (Safari/WebKit often hid these with opacity + inherited color). */
        #app input:not([type="range"]):not([type="color"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only):not(.news-modal-input):not(.border-red-100)::placeholder,
        #app textarea:not(.news-modal-input)::placeholder {
            color: #6b7280 !important;
            opacity: 1 !important;
        }
        #app input:not([type="range"]):not([type="color"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only):not(.news-modal-input):not(.border-red-100)::-webkit-input-placeholder,
        #app textarea:not(.news-modal-input)::-webkit-input-placeholder {
            color: #6b7280 !important;
            -webkit-text-fill-color: #6b7280 !important;
            opacity: 1 !important;
        }
        #app input:not([type="range"]):not([type="color"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only):not(.news-modal-input):not(.border-red-100)::-moz-placeholder,
        #app textarea:not(.news-modal-input)::-moz-placeholder {
            color: #6b7280 !important;
            opacity: 1 !important;
        }
        #app input:not([type="range"]):not([type="color"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only):not(.news-modal-input):not(.border-red-100):focus,
        #app select:focus,
        #app textarea:not(.news-modal-input):focus {
            border-color: #1a1a1a !important;
            box-shadow: 0 0 0 3px var(--accent-soft);
            outline: none;
        }

        #app input[type="color"].color-picker-input {
            border-radius: 0 !important;
            border-color: #1a1a1a !important;
        }

        /* ── Sitewide masthead & landing (newspaper family) ── */
        .app-header-newspaper {
            background: linear-gradient(180deg, var(--news-paper-contrast) 0%, var(--news-paper) 100%);
            border-bottom: 3px double var(--news-rule);
            box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
            /* Notch / Dynamic Island: keep masthead content in the safe area (viewport-fit=cover). */
            padding-top: env(safe-area-inset-top, 0px);
        }

        .app-header-newspaper .language-dropdown {
            border-radius: 2px;
            border: 2px solid var(--news-rule);
            box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.06);
        }
        .header-control-btn {
            box-sizing: border-box;
            min-height: 42px;
            height: 42px;
        }
        /* Same footprint for language + Sign In (all breakpoints) */
        .app-header-newspaper .header-bar-ghost {
            box-sizing: border-box;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            min-height: 42px;
            height: 42px;
            padding: 0 1rem;
            font-size: 0.875rem;
            line-height: 1.25rem;
        }
        /* Primary CTA in header: same 42px bar as language + Sign In */
        .app-header-newspaper .header-bar-solid {
            box-sizing: border-box;
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            min-height: 42px;
            height: 42px;
            padding: 0 1rem !important;
            line-height: 1.2 !important;
        }
        /* Phones / small tablets: hide duplicate “Build” in masthead (overlap on Chrome Android / zoomed viewports). */
        @media (max-width: 1023px) {
            .app-header-newspaper .header-bar-solid.header-cta-hide-narrow {
                display: none !important;
            }
        }
        .app-header-newspaper nav a {
            white-space: nowrap;
        }
        .app-header-logo-mark {
            color: var(--news-ink);
            flex-shrink: 0;
        }
        .app-header-logo-mark svg {
            display: block;
        }
        /* Center nav via flex (flex-1 justify-center), never position:absolute — absolute nav
           overlapped the language control and right-side actions on md+ screens. */
        .app-header-nav-links {
            flex-wrap: nowrap;
        }
        @media (max-width: 1023px) and (min-width: 768px) {
            .app-header-nav-links {
                gap: 0.75rem;
            }
        }
        /* Balanced header: nav stays viewport-centered on md+ even when left/right chrome width differs (landing vs dashboard). */
        .app-header-bar {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            column-gap: 0.5rem;
        }
        /* <md: three tracks so menu | centered brand | actions never overlap (large phones, e.g. Galaxy Ultra). */
        @media (max-width: 767px) {
            .app-header-bar {
                grid-template-columns: auto minmax(0, 1fr) auto;
                column-gap: 0.375rem;
            }
        }
        @media (min-width: 768px) {
            .app-header-bar {
                grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
                column-gap: 0.75rem;
            }
        }
        @media (min-width: 1024px) {
            .app-header-bar {
                column-gap: 1rem;
            }
        }

        .newspaper-main {
            padding-top: 1.75rem;
            padding-bottom: 2.5rem;
        }

        .newspaper-back-link {
            font-size: 0.8rem;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: var(--news-ink);
            text-decoration: underline;
            text-underline-offset: 3px;
        }

        .newspaper-back-link:hover {
            color: var(--news-muted);
        }

        /* Landing-only warm accent (headlines / rules — keeps print feel) */

        .landing-newspaper .landing-kicker {
            font-size: 0.65rem;
            letter-spacing: 0.28em;
            text-transform: uppercase;
            color: var(--news-muted);
            font-weight: 600;
            border: 1px solid var(--news-rule);
            border-left: 3px solid var(--landing-accent);
            padding: 0.4rem 0.85rem;
            border-radius: 1px;
            background: linear-gradient(90deg, var(--landing-accent-soft) 0%, var(--news-paper-contrast) 38%, var(--news-paper-contrast) 100%);
            box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
        }

        .landing-newspaper .landing-stat-cell {
            border: 1px solid var(--news-rule);
            border-radius: 2px;
            background: linear-gradient(180deg, #ffffff 0%, #faf9f7 100%);
            box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.06);
            padding: 0.85rem 1rem;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .landing-newspaper .landing-stat-cell:hover {
            transform: translateY(-2px);
            box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.08);
        }

        .landing-newspaper .landing-hero-title {
            letter-spacing: -0.02em;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
        }

        .landing-newspaper .landing-section-head h2 {
            position: relative;
            display: inline-block;
            padding-bottom: 0.65rem;
        }

        .landing-newspaper .landing-section-head h2::after {
            content: '';
            position: absolute;
            left: 50%;
            bottom: 0;
            transform: translateX(-50%);
            width: min(5rem, 40%);
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--landing-accent), transparent);
            border-radius: 1px;
        }

        .landing-newspaper .newspaper-btn-solid {
            box-shadow: 4px 4px 0 rgba(17, 17, 17, 0.12) !important;
            transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
        }

        .landing-newspaper .newspaper-btn-solid:hover {
            transform: translate(-2px, -2px);
            box-shadow: 6px 6px 0 rgba(17, 17, 17, 0.14) !important;
        }

        .landing-newspaper .newspaper-btn-ghost {
            transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
        }

        .landing-newspaper .newspaper-btn-ghost:hover {
            transform: translateY(-1px);
            border-color: var(--news-ink) !important;
        }

        .landing-newspaper .landing-trust-logo {
            opacity: 0.72;
            transition: opacity 0.2s ease, color 0.2s ease;
        }

        .landing-newspaper .landing-trust-logo:hover {
            opacity: 1;
            color: var(--news-ink);
        }

        @media (prefers-reduced-motion: reduce) {
            .landing-newspaper .landing-stat-cell,
            .landing-newspaper .landing-stat-cell:hover,
            .landing-newspaper .newspaper-btn-solid,
            .landing-newspaper .newspaper-btn-solid:hover,
            .landing-newspaper .newspaper-btn-ghost,
            .landing-newspaper .newspaper-btn-ghost:hover,
            .landing-newspaper .landing-template-preview,
            .landing-newspaper .landing-template-card:hover .landing-template-preview {
                transition: none !important;
                transform: none !important;
            }
        }

        .landing-newspaper .landing-template-preview {
            border-radius: 2px;
            border: 2px solid var(--news-rule);
            box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.07);
            transition: transform 0.25s ease, box-shadow 0.25s ease;
        }

        .landing-newspaper .landing-template-card:hover .landing-template-preview {
            transform: translateY(-4px);
            box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.09);
        }

        .landing-newspaper .landing-template-carousel-wrap {
            border: 2px solid var(--news-rule);
            border-radius: 2px;
            background: var(--news-paper-contrast);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
            -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
        }

        /* Landing: full viewport width bands + readable wide inner column */
        .landing-newspaper {
            --landing-accent: #b45309;
            --landing-accent-soft: rgba(180, 83, 9, 0.12);
            width: 100%;
            overflow-x: hidden;
        }

        .landing-newspaper .landing-hero-surface {
            background:
                radial-gradient(ellipse 120% 80% at 50% -20%, rgba(180, 83, 9, 0.07), transparent 55%),
                linear-gradient(180deg, #fdfcfa 0%, var(--news-paper) 42%, #efe8dc 100%);
        }
        /* Use % of the parent width instead of 100vw: on iOS/Chrome Android, vw often exceeds the layout viewport and causes horizontal overflow. */
        .landing-wide-inner {
            width: 100%;
            max-width: min(118rem, calc(100% - 1.5rem));
            margin-left: auto;
            margin-right: auto;
            padding-left: max(1rem, env(safe-area-inset-left, 0px));
            padding-right: max(1rem, env(safe-area-inset-right, 0px));
        }
        @media (min-width: 640px) {
            .landing-wide-inner {
                max-width: min(122rem, calc(100% - 2.5rem));
                padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
                padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
            }
        }
        @media (min-width: 1024px) {
            .landing-wide-inner {
                max-width: min(128rem, calc(100% - 4rem));
                padding-left: max(2.5rem, env(safe-area-inset-left, 0px));
                padding-right: max(2.5rem, env(safe-area-inset-right, 0px));
            }
        }
        @media (min-width: 1536px) {
            .landing-wide-inner {
                max-width: min(136rem, calc(100% - 5rem));
                padding-left: max(3rem, env(safe-area-inset-left, 0px));
                padding-right: max(3rem, env(safe-area-inset-right, 0px));
            }
        }

        .newspaper-cta-panel {
            border: 2px solid var(--news-rule);
            border-radius: 2px;
            background: #fff;
            box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.07);
        }

        .landing-newspaper .newspaper-cta-panel {
            background: linear-gradient(180deg, #ffffff 0%, #fbf9f5 55%, #f7f3ec 100%);
            border-top: 3px solid var(--landing-accent);
            box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
        }

        /* Landing hero: product mockup (print/editorial, not glassmorphism SaaS) */
        .landing-newspaper .landing-product-mockup .template-preview-mini.modern-preview .header {
            border-bottom: 2px solid var(--news-rule);
        }
        .landing-newspaper .landing-product-mockup .template-preview-mini.modern-preview .name {
            color: var(--news-ink);
            font-family: var(--font-display);
        }
        .landing-newspaper .landing-product-mockup .template-preview-mini.modern-preview .section-title {
            border-bottom: 1px solid var(--news-rule);
            color: var(--news-ink);
            font-size: 5px;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        /* Landing hero mock: real wizard design-group layout without full-bleed negative margins */
        .landing-newspaper .landing-product-mockup .landing-mock-design-group.design-group {
            margin: 0;
            width: 100%;
        }
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .design-subsection {
            padding: 6px 0;
        }
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .design-subsection > * {
            padding-left: 0;
            padding-right: 0;
        }
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .design-subsection-title {
            font-size: 10px;
            margin-bottom: 6px;
            gap: 6px;
        }
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .design-subsection-title svg {
            width: 13px;
            height: 13px;
        }
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-card.template-card-design {
            min-height: 0;
            padding: 6px;
        }
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini {
            max-height: 68px;
            margin-bottom: 4px;
            padding: 3px 4px;
            border-radius: 6px;
        }
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .name {
            font-size: 5px;
        }
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .section-title {
            font-size: 4px;
            margin-top: 2px;
            margin-bottom: 1px;
        }
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .experience-item,
        .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .education-item {
            font-size: 3px;
        }

        .landing-newspaper .landing-product-mockup .landing-mock-preview-empty-page {
            min-height: 200px;
            box-sizing: border-box;
        }

        /* Blank A4: no “Start here” copy — looks like an empty resume page */
        .landing-newspaper .landing-product-mockup .landing-mock-preview-blank-a4 .landing-mock-blank-a4-rules {
            margin-top: auto;
            padding-top: 10px;
            opacity: 0.22;
        }

        .landing-newspaper .landing-product-mockup .newspaper-tag {
            font-size: 0.7rem;
            letter-spacing: 0.04em;
            text-transform: none;
        }

        /* Faux form fields in hero mock — same visual language as builder inputs (border, rounded-xl, inset) */
        .landing-product-mockup .landing-mock-field-label {
            display: block;
            font-size: 8px;
            font-weight: 500;
            color: #374151;
            margin-bottom: 0.125rem;
            line-height: 1.25;
        }
        @media (min-width: 640px) {
            .landing-product-mockup .landing-mock-field-label {
                font-size: 9px;
            }
        }
        .landing-product-mockup .landing-mock-faux-input {
            display: flex;
            align-items: center;
            width: 100%;
            min-height: 1.375rem;
            padding: 0.2rem 0.45rem;
            border: 1px solid var(--border);
            border-radius: 0.75rem;
            background: #fff;
            box-shadow: inset 0 1px 2px rgba(15, 18, 25, 0.06);
            font-size: 7px;
            line-height: 1.2;
            color: #9ca3af;
        }
        @media (min-width: 640px) {
            .landing-product-mockup .landing-mock-faux-input {
                min-height: 1.625rem;
                padding: 0.25rem 0.5rem;
                font-size: 8px;
            }
        }
        .landing-product-mockup .landing-mock-faux-input span:not(.landing-mock-type-caret) {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            width: 100%;
            min-width: 0;
        }
        .landing-product-mockup .landing-mock-faux-input--filled,
        .landing-product-mockup .landing-mock-faux-input--filled span:not(.landing-mock-type-caret) {
            color: var(--ink);
        }
        .landing-product-mockup .landing-mock-faux-input--multiline {
            align-items: flex-start;
        }
        .landing-product-mockup .landing-mock-faux-input--multiline span:not(.landing-mock-type-caret) {
            white-space: pre-wrap;
            word-break: break-word;
            text-overflow: clip;
        }
        .landing-mock-type-caret {
            display: inline-block;
            flex: 0 0 auto;
            width: 1px;
            max-width: 1px;
            min-width: 1px;
            align-self: center;
            min-height: 0.85em;
            margin-left: 2px;
            background: var(--ink-muted);
            vertical-align: -0.06em;
            animation: landing-mock-caret-blink 1s step-end infinite;
        }
        .landing-product-mockup .landing-mock-faux-input--multiline .landing-mock-type-caret {
            align-self: flex-start;
            margin-top: 0.15em;
        }
        @keyframes landing-mock-caret-blink {
            50%, 100% { opacity: 0; }
        }
        @media (prefers-reduced-motion: reduce) {
            .landing-mock-type-caret {
                animation: none;
                opacity: 1;
            }
        }

        /* Hero mock: left “sections” panel — below lg, fixed height so accordion body does not resize between demo steps (was min-height + taller is-design). */
        @media (max-width: 639px) {
            .landing-mock-sections-inner {
                box-sizing: border-box;
                height: 530px;
                min-height: 530px;
                max-height: 530px;
                overflow: hidden;
            }
        }
        @media (min-width: 640px) and (max-width: 1023px) {
            .landing-mock-sections-inner {
                box-sizing: border-box;
                height: 610px;
                min-height: 610px;
                max-height: 610px;
                overflow: hidden;
            }
        }
        @media (min-width: 1024px) {
            .landing-mock-sections-inner {
                min-height: 420px;
            }
            .landing-mock-sections-inner.is-design {
                min-height: 500px;
            }
        }

        /* Hero mockup is desktop-width; overflow-hidden clips it on real phones (S24, iPhone). */
        .landing-product-mockup-card {
            max-width: 100%;
        }
        .landing-product-mockup .landing-mockup-scale-root {
            transform: scale(0.975);
            transform-origin: top left;
        }
        @media (max-width: 1023px) {
            .landing-product-mockup {
                min-width: 0;
                max-width: 100%;
            }
            .landing-product-mockup-card {
                /* Clip scaled mock; both axes avoid becoming a scroll container with visible overflow-y */
                overflow: hidden;
                touch-action: pan-y;
            }
            /* Larger on phones: whole mock + left section panel read clearly. */
            .landing-product-mockup .landing-mockup-scale-root {
                transform: scale(0.74) !important;
                width: 135.14%;
                transform-origin: top left;
            }
            /* Extra vertical space vs base 962px: preview 594/210; sections height stepped down. */
            .landing-product-mockup .landing-mockup-viewport {
                height: calc(962px + (100vw - 2.75rem) * 114 / 210) !important;
                min-height: 0;
            }
            .landing-product-mockup .landing-mockup-mini-resume-scale {
                transform: translate(-10px, -10px) scale(1.78) !important;
            }
            .landing-product-mockup .landing-mock-field-label {
                font-size: 12px;
                margin-bottom: 0.2rem;
            }
            .landing-product-mockup .landing-mock-faux-input {
                font-size: 11px;
                min-height: 1.75rem;
                padding: 0.35rem 0.65rem;
                border-radius: 0.85rem;
            }
            .landing-product-mockup .landing-mock-sections-inner {
                padding: 0.95rem 1rem !important;
            }
            .landing-product-mockup .landing-mock-sections-card-head {
                padding: 0.65rem 0.85rem !important;
            }
            .landing-product-mockup .landing-mock-section-title-text {
                font-size: 12px !important;
                line-height: 1.3 !important;
            }
            .landing-product-mockup .landing-mock-section-subtitle {
                font-size: 10px !important;
                margin-top: 0.15rem !important;
            }
            .landing-product-mockup .landing-mock-basic-photo-slot {
                width: 3.25rem !important;
                height: 3.25rem !important;
            }
            /* Sizing comes from landingMockMobileWizardChipClass (+ Tailwind); keep min-width from clipping labels. */
            .landing-product-mockup .landing-mock-wizard-bar--mobile .wizard-step-btn {
                min-width: auto !important;
            }
            .landing-product-mockup .landing-mock-micro {
                font-size: 10px !important;
            }
            .landing-product-mockup .landing-mock-design-range-labels span {
                font-size: 9px !important;
            }
            .landing-product-mockup .landing-mock-masthead-title {
                font-size: 13px !important;
            }
            .landing-product-mockup .landing-mock-masthead-badge {
                font-size: 9px !important;
                padding: 0.2rem 0.45rem !important;
            }
            .landing-product-mockup .landing-mock-masthead-status {
                font-size: 10px !important;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .design-subsection-title {
                font-size: 11px !important;
                margin-bottom: 8px !important;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .design-subsection-title svg {
                width: 15px !important;
                height: 15px !important;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .name {
                font-size: 6px !important;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .section-title {
                font-size: 5px !important;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .experience-item,
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .education-item {
                font-size: 4px !important;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-card.template-card-design {
                padding: 6px !important;
                min-height: 118px !important;
            }
            /* Taller mini previews in design step (default 68px max was too short on scaled mobile mock). */
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini {
                max-height: none !important;
                min-height: 72px !important;
                aspect-ratio: 210 / 297;
            }
            /* Card is pan-y only; wizard strip still needs horizontal pan for chip overflow */
            .landing-product-mockup .landing-mock-wizard-bar {
                touch-action: pan-x pan-y;
            }
        }
        @media (max-width: 400px) {
            .landing-product-mockup .landing-mockup-scale-root {
                transform: scale(0.66) !important;
                width: 151.52%;
            }
            .landing-product-mockup .landing-mockup-viewport {
                height: calc(914px + (100vw - 2.75rem) * 114 / 210) !important;
            }
            .landing-product-mockup .landing-mockup-mini-resume-scale {
                transform: translate(-6px, -6px) scale(1.62) !important;
            }
        }
        /* Live preview mini-resume: clip overflow on small screens (no scroll inside the preview pane) */
        @media (max-width: 1023px) {
            .landing-product-mockup .landing-mock-live-preview-col {
                overflow: hidden !important;
                overscroll-behavior: none;
                touch-action: manipulation;
            }
            .landing-product-mockup .landing-mock-live-preview-card {
                overflow: hidden !important;
                overscroll-behavior: none;
                touch-action: manipulation;
            }
            /* Live preview paper: 594/210 (540/210 + 10%). */
            .landing-product-mockup .landing-mock-preview-aspect {
                aspect-ratio: unset !important;
                height: calc((100vw - 2.75rem) * 594 / 210) !important;
                min-height: calc((100vw - 2.75rem) * 594 / 210) !important;
                max-height: calc((100vw - 2.75rem) * 594 / 210) !important;
                padding-bottom: 0 !important;
                position: relative;
                overflow: hidden !important;
                overscroll-behavior: none;
                touch-action: manipulation;
                -webkit-overflow-scrolling: auto;
                box-sizing: border-box;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini {
                overflow: hidden !important;
                overscroll-behavior: none;
            }
            .landing-product-mockup .landing-mock-preview-aspect .landing-mockup-mini-resume-scale {
                position: absolute;
                inset: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
                pointer-events: none;
            }
            .landing-product-mockup .landing-mock-preview-aspect .landing-mockup-mini-resume-scale > div {
                height: 100%;
                min-height: 100%;
                width: 100%;
            }
            /* Cross-fade without out-in: both roots stack in flow; pin so height never doubles during transition. */
            .landing-product-mockup .landing-mock-preview-aspect .landing-mockup-mini-resume-scale > .landing-mock-preview-transition-root {
                position: absolute;
                inset: 0;
                width: 100%;
                height: 100%;
                box-sizing: border-box;
            }
            /* Live preview column: readable mini resume (hero mock only; frame height from aspect + zoom). */
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini {
                font-size: 6px !important;
                line-height: 1.3 !important;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .name {
                font-size: 9px !important;
                margin-bottom: 3px !important;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .contact {
                font-size: 5.5px !important;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .section-title {
                font-size: 6.5px !important;
                margin-top: 5px !important;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .experience-item,
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .education-item {
                font-size: 5.5px !important;
                margin-bottom: 2px !important;
            }
            .landing-product-mockup .landing-mock-preview-header-photo {
                width: 34px !important;
                height: 34px !important;
            }
            .landing-product-mockup .landing-mock-live-preview-card .landing-mock-live-preview-toolbar-label {
                font-size: 10px !important;
            }
        }

        @media (min-width: 1024px) {
            /* Let resume paper extend +10px past frame without clipping. */
            .landing-product-mockup-card {
                overflow-x: visible;
                overflow-y: hidden;
            }
            .landing-product-mockup .landing-mockup-scale-root {
                transform: scale(0.975) !important;
                width: auto !important;
            }
            .landing-product-mockup .landing-mock-live-preview-card {
                overflow-x: visible !important;
                overflow-y: hidden;
            }
            .landing-product-mockup .landing-mock-live-preview-frame {
                container-type: inline-size;
                container-name: landing-mock-lg-preview;
                overflow-x: visible;
            }
            /* Paper: a few px wider than frame inner (cqw); height tracks width for A4 proportion + 50px (was +200px, −150px). */
            .landing-product-mockup .landing-mock-preview-aspect {
                aspect-ratio: unset !important;
                width: calc(100cqw + 32px) !important;
                max-width: none !important;
                height: calc((100cqw + 32px) * 297 / 210 + 50px) !important;
                min-height: calc((100cqw + 32px) * 297 / 210 + 50px) !important;
                max-height: none !important;
            }
            /* Slightly larger mini-resume zoom on lg+ (inline default kept for markup; this wins here). */
            .landing-product-mockup .landing-mock-preview-aspect .landing-mockup-mini-resume-scale {
                transform: translate(-13px, -13px) scale(2.2) !important;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-card.template-card-design {
                min-height: 168px;
                padding: 8px;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini {
                max-height: none;
                min-height: 120px;
                margin-bottom: 6px;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .name {
                font-size: 6px;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .section-title {
                font-size: 5px;
            }
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .experience-item,
            .landing-newspaper .landing-product-mockup .landing-mock-design-group .template-preview-mini .education-item {
                font-size: 4px;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo .name {
                font-size: 7px !important;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo .contact {
                font-size: 5px !important;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo.is-boosted .name {
                font-size: 8.5px !important;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo.is-boosted .contact {
                font-size: 5.75px !important;
            }
        }

        /* Live preview: same padding for every mini template so modern ↔ professional does not shift inside the frame. */
        .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini {
            padding: 8px !important;
            box-sizing: border-box;
            /* Outer frame sets height; inner must not use global A4 aspect (causes step-to-step height jumps on mobile). */
            aspect-ratio: unset !important;
            max-height: none !important;
            height: 100% !important;
            min-height: 100% !important;
        }
        /* Live preview header: +2px name/contact after design slider “boost” (transition after template switch). */
        .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo .name,
        .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo .contact {
            transition: font-size 0.7s cubic-bezier(0.25, 0.1, 0.25, 1), margin-bottom 0.7s ease;
        }
        @media (max-width: 1023px) {
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo.is-boosted .name {
                font-size: 11px !important;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo.is-boosted .contact {
                font-size: 7.5px !important;
            }
        }
        .landing-mock-header-size-track {
            position: relative;
        }
        .landing-mock-header-size-fill {
            width: 45%;
            position: relative;
            transition: width 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
        }
        .landing-mock-header-size-fill.is-boosted {
            width: 72%;
        }
        .landing-mock-header-size-thumb {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translate(50%, -50%);
            width: 7px;
            height: 7px;
            border-radius: 9999px;
            background: #fff;
            border: 2px solid var(--accent, #474644);
            box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
            pointer-events: none;
        }
        @media (prefers-reduced-motion: reduce) {
            .landing-mock-header-size-fill {
                transition: none;
            }
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo .name,
            .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .landing-mock-preview-header-typo .contact {
                transition: none;
            }
        }
        /* One header rhythm for all mini templates; cancels professional full-bleed negative margins in live preview. */
        .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini .header {
            margin: 0 0 6px 0 !important;
            padding-bottom: 5px !important;
        }
        .landing-product-mockup .landing-mock-preview-aspect .template-preview-mini.professional-preview .header {
            background: transparent;
        }

        /* Landing mock: cross-fade when auto-cycling wizard sections (opacity only — no translate, avoids clipping against overflow:hidden on the preview frame). */
        .landing-mock-section-fade-enter-active,
        .landing-mock-section-fade-leave-active {
            transition: opacity 0.22s ease;
        }
        .landing-mock-section-fade-enter-from {
            opacity: 0;
        }
        .landing-mock-section-fade-leave-to {
            opacity: 0;
        }
        @media (prefers-reduced-motion: reduce) {
            .landing-mock-section-fade-enter-active,
            .landing-mock-section-fade-leave-active {
                transition: none;
            }
            .landing-mock-section-fade-enter-from,
            .landing-mock-section-fade-leave-to {
                transform: none;
            }
        }

        /* Landing mock: About section — photo upload simulation */
        .landing-mock-photo-fade-enter-active,
        .landing-mock-photo-fade-leave-active {
            transition: opacity 0.2s ease, transform 0.2s ease;
        }
        .landing-mock-photo-fade-enter-from,
        .landing-mock-photo-fade-leave-to {
            opacity: 0;
            transform: scale(0.92);
        }
        @keyframes landing-mock-photo-slot-pulse {
            0%, 100% { border-color: rgba(71, 70, 68, 0.35); box-shadow: 0 0 0 0 rgba(71, 70, 68, 0.08); }
            50% { border-color: rgba(71, 70, 68, 0.85); box-shadow: 0 0 0 3px rgba(71, 70, 68, 0.12); }
        }
        .landing-mock-basic-photo-slot--uploading {
            animation: landing-mock-photo-slot-pulse 0.85s ease-in-out infinite;
        }
        .landing-mock-basic-photo-spinner {
            width: 1.125rem;
            height: 1.125rem;
            border: 2px solid rgba(71, 70, 68, 0.2);
            border-top-color: rgba(71, 70, 68, 0.75);
            border-radius: 50%;
            animation: landing-mock-spin 0.65s linear infinite;
        }
        .landing-mock-basic-photo-spinner--xs {
            width: 0.65rem;
            height: 0.65rem;
            border-width: 1.5px;
        }
        @keyframes landing-mock-spin {
            to { transform: rotate(360deg); }
        }
        .landing-mock-preview-photo-uploading {
            border: 1px solid var(--news-rule);
            border-radius: 2px;
            animation: landing-mock-photo-slot-pulse 0.85s ease-in-out infinite;
            background: linear-gradient(135deg, rgba(17, 17, 17, 0.04), rgba(17, 17, 17, 0.02));
        }
        @media (prefers-reduced-motion: reduce) {
            .landing-mock-photo-fade-enter-active,
            .landing-mock-photo-fade-leave-active {
                transition: none;
            }
            .landing-mock-photo-fade-enter-from,
            .landing-mock-photo-fade-leave-to {
                transform: none;
            }
            .landing-mock-basic-photo-slot--uploading,
            .landing-mock-preview-photo-uploading {
                animation: none;
            }
            .landing-mock-basic-photo-spinner {
                animation: none;
                border-top-color: rgba(71, 70, 68, 0.35);
            }
        }

        .newspaper-footer {
            background: linear-gradient(180deg, var(--news-paper-contrast) 0%, var(--news-fold) 100%);
            border-top: 3px double var(--news-rule);
        }

        .dashboard-newspaper-panel {
            background: var(--news-paper-contrast);
            border: 2px solid var(--news-rule);
            border-radius: 2px;
            box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.06);
        }

        .newspaper-btn-solid {
            border-radius: 2px !important;
            background: var(--news-ink) !important;
            color: #fff !important;
            border: 2px solid var(--news-ink) !important;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            font-size: 0.7rem !important;
            box-shadow: none !important;
        }

        .newspaper-btn-solid:hover {
            background: #2a2a2a !important;
        }

        .newspaper-btn-ghost {
            border-radius: 2px !important;
            border: 2px solid var(--news-rule) !important;
            background: transparent !important;
            color: var(--news-ink) !important;
            font-weight: 600;
            letter-spacing: 0.03em;
        }

        .newspaper-btn-ghost:hover {
            background: rgba(0, 0, 0, 0.05) !important;
        }

        /* Range slider — visible track (appearance-none hides default) */
        input[type="range"] {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 10px;
            border-radius: 6px;
            background: var(--border);
            outline: none;
        }
        input[type="range"]::-webkit-slider-runnable-track {
            width: 100%;
            height: 10px;
            border-radius: 6px;
            background: var(--border);
        }
        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--accent);
            cursor: pointer;
            margin-top: -5px;
            border: 2px solid white;
            box-shadow: 0 1px 3px rgba(0,0,0,0.15);
        }
        input[type="range"]::-moz-range-track {
            width: 100%;
            height: 10px;
            border-radius: 6px;
            background: var(--border);
        }
        input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--accent);
            cursor: pointer;
            border: 2px solid white;
            box-shadow: 0 1px 3px rgba(0,0,0,0.15);
        }

        /* Modal / card surfaces: rounded corners, borders, shadows */

        .form-section {
            padding: 0;
            margin-bottom: 0;
            background: transparent;
            border: none;
        }

        /* ── Accordion (divided style) ── */
        .accordion-section {
            margin-bottom: 0;
            background: transparent;
            border: none;
            border-radius: 0;
            overflow: visible;
            cursor: pointer;
            position: relative;
        }

        .accordion-section::before { display: none; }

        .accordion-trigger {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            background: transparent;
            border: none;
            cursor: pointer;
            text-align: left;
            transition: background 0.15s ease;
            position: relative;
            z-index: 1;
            gap: 12px;
        }

        .accordion-trigger:hover {
            background: rgba(37, 99, 235, 0.03);
        }

        .accordion-trigger:focus { outline: none; }
        .accordion-trigger:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: -2px;
            border-radius: 0.75rem;
        }

        /* Chevron indicator */
        .accordion-trigger::after {
            content: '';
            width: 8px;
            height: 8px;
            border-right: 2px solid #9ca3af;
            border-bottom: 2px solid #9ca3af;
            transform: rotate(-45deg);
            transition: transform 0.2s ease, border-color 0.2s ease;
            flex-shrink: 0;
        }

        .accordion-section.is-open .accordion-trigger::after {
            transform: rotate(45deg);
            border-color: var(--accent);
        }

        .accordion-section:not(.is-open):hover .accordion-trigger::after {
            border-color: #6b7280;
        }

        /* Section icon */
        .accordion-trigger .section-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: background 0.2s ease, transform 0.15s ease;
        }

        .accordion-section:not(.is-open) .accordion-trigger .section-icon {
            background: #f3f4f6;
        }

        .accordion-section.is-open .accordion-trigger .section-icon {
            background: var(--accent-soft);
        }

        .accordion-section:not(.is-open):hover .accordion-trigger .section-icon {
            background: #e5e7eb;
            transform: scale(1.05);
        }

        .accordion-trigger .section-icon svg {
            width: 18px;
            height: 18px;
            transition: color 0.15s ease;
        }

        .accordion-section:not(.is-open) .accordion-trigger .section-icon svg {
            color: #9ca3af;
        }

        .accordion-section.is-open .accordion-trigger .section-icon svg {
            color: var(--accent);
        }

        .accordion-section:not(.is-open):hover .accordion-trigger .section-icon svg {
            color: #6b7280;
        }

        /* Title text */
        .accordion-trigger .section-label {
            flex: 1;
            min-width: 0;
        }

        .accordion-trigger .section-label p {
            margin: 0;
            font-weight: 600;
            font-size: 0.9rem;
            transition: color 0.15s ease;
        }

        .accordion-section:not(.is-open) .accordion-trigger .section-label p {
            color: #374151;
        }

        .accordion-section.is-open .accordion-trigger .section-label p {
            color: var(--ink);
        }

        .accordion-section:not(.is-open):hover .accordion-trigger .section-label p {
            color: var(--ink);
        }

        /* Hide hint text when section is expanded */
        .accordion-section.is-open .accordion-trigger .section-label span {
            display: none;
        }

        /* Status badges */
        .accordion-trigger .section-badge {
            flex-shrink: 0;
        }

        /* Body */
        .accordion-section:not(.is-open) .accordion-body {
            pointer-events: none;
        }

        .accordion-section.is-open .accordion-body {
            pointer-events: auto;
        }

        .accordion-body {
            padding: 0 20px 20px 20px;
            overflow: hidden;
        }
        /* Professional Summary: +50% vertical editing room */
        #section-summary.accordion-body {
            min-height: 225px;
        }
        #section-experience.accordion-body {
            min-height: 150px;
        }

        .accordion-body--scrollable {
            max-height: min(70vh, 520px);
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
        }

        /* ── Wizard Steps Bar (newspaper theme) ── */
        .wizard-steps-bar {
            scrollbar-width: thin;
            scrollbar-color: rgba(0,0,0,0.15) transparent;
        }
        /* Connector between wizard step buttons (fills when prior section has data) */
        .wizard-step-connector {
            align-self: center;
            flex-shrink: 0;
            height: 2px;
            min-width: 0.5rem;
            width: 0.75rem;
        }
        @media (min-width: 640px) {
            .wizard-step-connector {
                width: 1.25rem;
            }
        }
        .wizard-steps-bar::-webkit-scrollbar {
            height: 4px;
        }
        .wizard-steps-bar::-webkit-scrollbar-track {
            background: transparent;
        }
        .wizard-steps-bar::-webkit-scrollbar-thumb {
            background: rgba(0,0,0,0.15);
            border-radius: 2px;
        }
        .wizard-step-btn {
            min-width: 2.5rem;
            border-radius: 2px;
        }
        .wizard-step-btn.active {
            background: var(--news-ink, #1a1a1a);
            color: #fff;
        }
        @media (min-width: 640px) {
            .wizard-step-btn {
                min-width: auto;
            }
        }
        /* Landing hero mock: mobile chips show step titles; don’t force 2.5rem min-width. */
        .landing-product-mockup .landing-mock-wizard-bar--mobile.wizard-steps-bar .wizard-step-btn {
            min-width: auto;
        }

        /* ── Wizard Navigation (newspaper theme) ── */
        .wizard-nav {
            background: var(--news-paper-contrast, #faf8f3);
            border: 2px solid var(--news-rule, #1a1a1a);
            border-radius: 2px;
            box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.06);
        }
        .wizard-nav button {
            border-radius: 2px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            font-size: 0.75rem;
        }
        .wizard-nav button:not(:disabled):hover {
            transform: translate(-1px, -1px);
            box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
        }

        /* ── Accordion Frame (newspaper theme) ── */
        .accordion-frame {
            background: var(--news-paper-contrast, #faf8f3);
            border: 2px solid var(--news-rule, #1a1a1a);
            border-radius: 2px;
            overflow: hidden;
            box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.06);
        }

        .accordion-frame .form-section,
        .accordion-frame .accordion-section {
            border: none;
            border-radius: 0;
            margin-bottom: 0;
            width: 100%;
            background: transparent;
        }

        .accordion-frame .accordion-section:not(:last-child) {
            border-bottom: 1px solid var(--news-rule, #1a1a1a);
            border-bottom-style: dashed;
            opacity: 1;
        }

        .accordion-frame .accordion-section.is-open {
            background: rgba(255, 255, 255, 0.6);
        }

        .accordion-frame .accordion-section.is-open + .accordion-section {
            border-top: none;
        }

        .accordion-frame .accordion-section.is-open .accordion-body {
            border-top: 1px dashed var(--news-rule, #1a1a1a);
            padding-top: 16px;
        }

        .accordion-frame .accordion-trigger {
            font-family: var(--font-display, Georgia, 'Times New Roman', serif);
        }

        /* Vue accordion transition */
        .accordion-enter-active,
        .accordion-leave-active {
            transition: max-height 0.3s ease, opacity 0.25s ease;
            overflow: hidden;
        }

        .accordion-enter-from,
        .accordion-leave-to {
            max-height: 0;
            opacity: 0;
        }

        .accordion-enter-to,
        .accordion-leave-from {
            max-height: 2000px;
            opacity: 1;
        }

        /* Design Group Sub-sections */
        .design-group {
            display: flex;
            flex-direction: column;
            gap: 0;
            margin: 0 -20px;
            padding: 0;
            width: calc(100% + 40px);
        }

        .design-subsection {
            padding: 16px 0;
            background: var(--paper);
            border-left: none;
            border-right: none;
            border-top: 1px solid var(--border);
            border-bottom: 1px solid var(--border);
            border-radius: 0;
            transition: all 0.2s ease;
            width: 100%;
            box-sizing: border-box;
        }

        .design-subsection > * {
            padding-left: 20px;
            padding-right: 20px;
        }

        .design-subsection:first-child {
            border-top: none;
        }

        .design-subsection:last-child {
            border-bottom: none;
        }

        .design-subsection:hover {
            background: var(--paper-warm);
            border-color: var(--border-strong);
        }

        .design-subsection-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--ink-muted);
            letter-spacing: 0.02em;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .design-subsection-title svg {
            width: 16px;
            height: 16px;
            color: var(--ink-light);
        }
        /* A4 Proportional Preview Styles - wrapper width grows with zoom so container scrolls instead of clipping */
        .resume-preview-wrapper {
            position: relative;
            min-width: 210mm;
        }
        .resume-preview-zoom-inner {
            transform-origin: top left;
            overflow: visible;
        }
        .resume-preview-zoom-content {
            overflow: visible;
        }

        /* Preview column: show full preview; rely on page scroll (no inner scroll) */
        .resume-preview-column {
            max-height: none;
            overflow-x: visible;
            overflow-y: visible;
            -webkit-overflow-scrolling: auto;
            min-height: 0;
        }
        /* Ensure preview wrapper doesn't shrink when zoomed so horizontal scroll works */
        .resume-preview-wrapper {
            flex-shrink: 0;
        }

        .resume-preview-scroller {
            position: relative;
            width: 100%;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 24px;
            align-items: center;
        }

        .resume-page {
            font-family: Arial, sans-serif;
            font-size: 16.8px; /* 20% larger than 14px */
            line-height: 1.6;
            color: var(--text-color, #1a1a1a);
            width: 210mm;
            height: 297mm;
            min-height: 297mm;
            aspect-ratio: 8.27 / 11.69;
            background: var(--background-color, #ffffff);
            border: 1px solid #e5e7eb;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            box-sizing: border-box;
            position: relative;
            overflow: hidden;
            break-inside: avoid;
            transition: background-color 0.35s ease-out, box-shadow 0.35s ease-out, border-color 0.35s ease-out;
        }

        .resume-page {
            border: 1px solid #e5e7eb !important;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
            /* Matches server PDF/preview: narrow 10mm, normal 15mm, wide 22mm */
            --resume-margin-inset: 15mm;
        }
        .resume-page[data-margins="narrow"] {
            --resume-margin-inset: 10mm;
        }
        .resume-page[data-margins="normal"] {
            --resume-margin-inset: 15mm;
        }
        .resume-page[data-margins="wide"] {
            --resume-margin-inset: 22mm;
        }
        /* Server HTML inside iframe already applies body padding; outer shell must not add a second inset.
           Three-class selectors beat later .professional-preview.resume-page padding rules. */
        .resume-page.resume-preview-shell--iframe.professional-preview,
        .resume-page.resume-preview-shell--iframe.elegant-preview {
            padding: 0 !important;
        }

        .resume-page-content {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            box-sizing: border-box;
            overflow: hidden;
        }

        .resume-page[data-border="narrow"] .resume-page-content {
            padding: 20px 30px 30px 30px;
        }

        .resume-page[data-border="wide"] .resume-page-content {
            padding: 40px 50px 50px 50px;
        }

        .resume-page[data-full-bg="true"] .resume-page-content {
            padding: 0;
        }

        .resume-page-inner {
            display: block;
        }

        .resume-preview-iframe {
            display: block;
            width: 100%;
            border: none;
            pointer-events: none;
            position: absolute;
            left: 0;
            top: 0;
        }
        @media (max-width: 1023px) {
            .resume-preview-wrapper {
                min-width: 0 !important;
                width: 100% !important;
                left: 0 !important;
            }
            /* Keep A4 width inside zoom layer; downscale via transform (see previewZoom* computed). */
            .resume-preview-scroller {
                max-width: 100%;
                overflow-x: hidden;
            }
        }
        /* iPad / small laptop: two-column builder (lg) but preview column < A4 — same downscale as phone. */
        @media (min-width: 1024px) and (max-width: 1279px) {
            .builder-scope .resume-preview-wrapper {
                min-width: 0 !important;
                width: 100% !important;
                max-width: 100%;
                left: 0 !important;
                flex-shrink: 1;
            }
            .builder-scope .resume-preview-scroller {
                max-width: 100%;
                overflow-x: hidden;
            }
        }
        .resume-page-break-fill {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 2;
            pointer-events: none;
        }


        /* Shared Template Base Styles */
        .resume-page .header {
            padding-bottom: 20px;
            margin-bottom: 30px;
        }
        .resume-page .resume-field-placeholder {
            color: #9ca3af;
        }

        /* Client-side fallback preview (no server HTML): mirror header + photo layout from PDF/preview-html */
        .resume-page .header-top-with-photo {
            display: flex;
            align-items: flex-start;
            gap: 20px;
            flex-wrap: nowrap;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            margin-bottom: 0;
        }
        .resume-page .header-top-with-photo > .header {
            flex: 1 1 auto;
            min-width: 0;
            max-width: 100%;
            margin: 0 !important;
            padding: 0 !important;
            border: none !important;
            background: transparent !important;
        }
        .resume-page .header-top-with-photo.header-photo-top_left,
        .resume-page .header-top-with-photo.header-photo-top-left,
        .resume-page .header-top-with-photo.header-photo-top_right,
        .resume-page .header-top-with-photo.header-photo-top-right {
            flex-direction: row;
            align-items: flex-start;
        }
        .resume-page .header-top-with-photo.header-photo-top_center,
        .resume-page .header-top-with-photo.header-photo-top-center {
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 14px;
        }
        .resume-page .header-top-with-photo.header-photo-top_center > .header,
        .resume-page .header-top-with-photo.header-photo-top-center > .header {
            flex: 0 0 auto;
            width: 100%;
            text-align: center;
        }
        .resume-page .header-top-with-photo .header-photo-wrap {
            flex: 0 0 auto;
            max-width: min(280px, 38%);
        }
        .resume-page .header-top-with-photo.header-photo-top_center .header-photo-wrap,
        .resume-page .header-top-with-photo.header-photo-top-center .header-photo-wrap {
            max-width: 100%;
            width: 100%;
            display: flex;
            justify-content: center;
        }
        .resume-page .header-photo-wrap-center {
            margin: 0 auto;
        }
        .resume-page .header-photo {
            object-fit: cover;
            display: block;
            max-width: 100%;
        }
        .resume-page .header-photo-square {
            border-radius: 6px;
        }
        .resume-page .header-photo-circle {
            border-radius: 50%;
        }
        .resume-page .header-photo-extra_small { width: 80px; height: 80px; }
        .resume-page .header-photo-small { width: 113px; height: 113px; }
        .resume-page .header-photo-medium { width: 156px; height: 156px; }
        .resume-page .header-photo-large { width: 200px; height: 200px; }
        .resume-page .header-photo-extra_large { width: 240px; height: 240px; }
        .resume-page .header-photo-xx_large { width: 280px; height: 280px; }
        .resume-page .header-summary-row {
            margin-top: 12px;
            margin-bottom: 20px;
            padding-top: 0;
        }

        .resume-page .summary {
            font-size: 14px !important;
            line-height: 1.4 !important;
            margin-bottom: 10px !important;
            white-space: pre-wrap !important;
        }
        .resume-page .summary p {
            margin: 0 0 0.6em 0;
            white-space: pre-wrap !important;
        }
        .resume-page .summary p:last-child {
            margin-bottom: 0;
        }

        .resume-page .section-title {
            font-size: 22px;
            font-weight: bold;
            color: var(--selected-color);
            margin: 30px 0 15px 0;
            padding-bottom: 6px;
        }

        .resume-page .experience-item,
        .resume-page .education-item {
            margin-bottom: 12px !important;
        }

        /* Section block: title + content stay together (screen + print) */
        .resume-page .section-block {
            margin-bottom: 20px;
        }

        /* Print: page break control - matches PDF output */
        @media print {
            .resume-preview-wrapper { transform: none !important; }
            .resume-page { break-inside: avoid; box-shadow: none !important; border: none !important; }
            .resume-header { page-break-inside: avoid; page-break-after: avoid; }
            .section-block { page-break-inside: avoid; }
            .section-title { page-break-after: avoid; }
            .experience-item, .education-item { page-break-inside: avoid; }
            .skills { page-break-inside: avoid; }
        }

        .resume-page .company,
        .resume-page .institution {
            font-size: 16px !important;
            font-weight: bold !important;
            margin-bottom: 4px !important;
        }

        .resume-page .position,
        .resume-page .degree {
             font-size: 16px !important;
             margin-bottom: 4px !important;
             font-weight: bold;
        }

        .resume-page .description {
            font-size: 13px !important;
            line-height: 1.4 !important;
            margin-top: 3px !important;
        }

        .job-description-rich {
            color: var(--ink);
            font-size: 15px;
            line-height: 1.75;
        }

        .job-description-rich p {
            margin: 0 0 0.85rem 0;
        }

        .job-description-rich ul {
            margin: 0.45rem 0 0.9rem 0;
            padding-left: 1.15rem;
            list-style: disc;
        }

        .job-description-rich li {
            margin: 0 0 0.35rem 0;
        }

        .job-description-rich .job-desc-heading {
            margin: 0.95rem 0 0.45rem 0;
            font-weight: 650;
            color: var(--ink);
            letter-spacing: -0.01em;
        }

        .job-description-snippet {
            color: var(--ink-light);
            font-size: 0.9rem;
            line-height: 1.55;
        }

        .jobs-page-title {
            font-family: var(--font-sans);
            letter-spacing: -0.01em;
        }

        .jobs-page-subtitle {
            color: var(--ink-muted);
            font-size: 0.95rem;
            line-height: 1.5;
            max-width: 64ch;
        }

        .job-card {
            border-radius: 0.75rem;
            border: 1px solid #dfe3e8;
            background: #fff;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
            padding: 0.95rem 1rem;
            transition: box-shadow 0.14s ease, border-color 0.14s ease;
        }

        .job-card:hover {
            border-color: #c7d2fe;
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
        }

        .job-card-title {
            font-size: 1rem;
            font-weight: 600;
            line-height: 1.3;
            letter-spacing: -0.01em;
            color: #0a66c2;
        }

        .job-card-meta {
            margin-top: 0.2rem;
            font-size: 0.84rem;
            color: var(--ink-muted);
        }

        .job-details-title {
            font-family: var(--font-sans);
            letter-spacing: -0.01em;
            line-height: 1.22;
        }

        .job-details-company {
            font-size: 0.98rem;
            color: var(--ink-muted);
            margin-top: 0.45rem;
        }

        .job-meta-chip {
            display: inline-flex;
            align-items: center;
            padding: 0.2rem 0.55rem;
            border-radius: 9999px;
            font-size: 0.72rem;
            border: 1px solid #e5e7eb;
            background: #f8fafc;
            color: #475569;
        }

        .jobs-shell {
            position: relative;
        }

        .indeed-searchbar {
            backdrop-filter: blur(6px);
        }

        .jobs-shell::before {
            content: '';
            position: absolute;
            inset: -18px -20px auto -20px;
            height: 180px;
            border-radius: 1.25rem;
            background: radial-gradient(80% 90% at 10% 0%, rgba(10, 102, 194, 0.12), transparent 70%),
                        radial-gradient(70% 80% at 100% 0%, rgba(59, 130, 246, 0.12), transparent 75%);
            pointer-events: none;
            z-index: 0;
        }

        .jobs-shell > * {
            position: relative;
            z-index: 1;
        }

        .jobs-toolbar {
            border-radius: 1rem;
            border: 1px solid #dbe4f0;
            background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
            box-shadow: 0 10px 26px -22px rgba(15, 23, 42, 0.35);
        }

        .job-details-card {
            border-radius: 1rem;
            border: 1px solid #dfe3e8;
            background: #fff;
            box-shadow: 0 8px 30px -24px rgba(15, 23, 42, 0.35);
        }

        .job-apply-card {
            border-radius: 1rem;
            border: 1px solid #dfe3e8;
            background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
            box-shadow: 0 12px 30px -25px rgba(15, 23, 42, 0.38);
        }

        .job-section-title {
            font-size: 0.78rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #64748b;
            font-weight: 700;
        }

        .job-description-rich {
            border-left: 3px solid #e2e8f0;
            padding-left: 0.9rem;
        }

        @media (max-width: 1023px) {
            .indeed-searchbar {
                top: 64px;
            }
        }

        /* ── Job board: newspaper / print-inspired ── */
        .jobs-newspaper.jobs-shell::before {
            display: none;
        }

        .jobs-newspaper {
            --news-ink: #111111;
            --news-muted: #4a4a4a;
            --news-rule: #1a1a1a;
            --news-paper: #f5f2ea;
            --news-paper-contrast: #faf8f3;
            --news-fold: #e8e4d9;
            background: var(--news-paper);
            padding: 0.5rem 0.75rem 1.5rem;
            border: 2px solid var(--news-rule);
            box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
        }

        .newspaper-masthead {
            text-align: center;
            padding: 0.75rem 0.5rem 1rem;
            border-bottom: 4px double var(--news-rule);
            margin-bottom: 1rem;
            background: linear-gradient(180deg, #faf8f3 0%, var(--news-paper) 100%);
        }

        .newspaper-kicker {
            font-size: 0.65rem;
            letter-spacing: 0.28em;
            text-transform: uppercase;
            color: var(--news-muted);
            font-weight: 600;
            margin-bottom: 0.35rem;
        }

        .newspaper-masthead-title {
            font-family: var(--font-display);
            font-size: clamp(1.75rem, 4vw, 2.35rem);
            font-weight: 700;
            color: var(--news-ink);
            letter-spacing: -0.02em;
            line-height: 1.1;
        }

        .newspaper-masthead-sub {
            font-size: 0.8rem;
            color: var(--news-muted);
            margin-top: 0.4rem;
            font-style: italic;
        }

        .newspaper-dateline {
            font-size: 0.72rem;
            color: var(--news-muted);
            text-transform: uppercase;
            letter-spacing: 0.12em;
            margin-top: 0.5rem;
        }

        .newspaper-searchbar {
            background: var(--news-paper-contrast);
            border: 2px solid var(--news-rule);
            border-radius: 2px;
            padding: 0.65rem 0.75rem;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
        }

        .newspaper-searchbar input {
            border-radius: 0 !important;
            border: 1px solid #1a1a1a !important;
            background: #fff !important;
            color: var(--news-ink) !important;
        }

        .newspaper-searchbar input:focus {
            outline: 2px solid var(--news-ink);
            outline-offset: 1px;
        }

        .newspaper-searchbar button[type="button"] {
            border-radius: 2px !important;
            background: var(--news-ink) !important;
            color: #fff !important;
            border: 2px solid var(--news-ink) !important;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            font-size: 0.7rem !important;
        }

        .newspaper-searchbar button[type="button"]:hover {
            background: #2d2d2d !important;
        }

        .newspaper-filters-panel {
            background: var(--news-paper-contrast);
            border: 1px solid var(--news-rule);
            border-radius: 2px;
            padding: 0.65rem 0.75rem;
        }

        .newspaper-filters-panel select,
        .newspaper-filters-panel input[type="text"] {
            border-radius: 0 !important;
            border: 1px solid #1a1a1a !important;
            background: var(--news-paper-contrast) !important;
            color: var(--news-ink) !important;
            font-size: 0.75rem !important;
        }
        .newspaper-filters-panel select:focus,
        .newspaper-filters-panel input[type="text"]:focus {
            border-color: var(--news-ink) !important;
            box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.06);
            outline: none;
        }

        .newspaper-filters-panel button {
            border-radius: 2px !important;
            border: 1px solid var(--news-rule) !important;
            background: transparent !important;
            color: var(--news-ink) !important;
            font-size: 0.7rem !important;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .newspaper-filters-panel button:hover {
            background: rgba(0, 0, 0, 0.06) !important;
        }

        .newspaper-columns-label {
            font-size: 0.62rem;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            color: var(--news-muted);
            border-bottom: 1px solid var(--news-rule);
            padding-bottom: 0.35rem;
            margin-bottom: 0;
        }

        .newspaper-list-shell {
            border: 2px solid var(--news-rule);
            border-radius: 2px;
            background: #fff;
        }

        .newspaper-list-header {
            padding: 0.5rem 0.85rem;
            background: linear-gradient(180deg, #f0ece2 0%, #e8e4d9 100%);
            border-bottom: 2px solid var(--news-rule);
            font-family: var(--font-display);
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--news-ink);
        }

        .newspaper-list-item {
            border-bottom: 1px solid #c9c4b8;
            transition: background 0.12s ease;
        }

        .newspaper-list-item:hover {
            background: #f7f4ec;
        }

        .newspaper-list-item.is-active {
            background: #ebe6db;
            border-left: 4px solid var(--news-ink);
            padding-left: calc(1rem - 4px);
        }

        .newspaper-job-title {
            font-family: var(--font-display);
            font-size: 1.02rem;
            font-weight: 700;
            color: var(--news-ink);
            line-height: 1.25;
            letter-spacing: -0.01em;
        }

        .newspaper-job-byline {
            font-size: 0.78rem;
            color: var(--news-muted);
            margin-top: 0.15rem;
        }

        .newspaper-job-line {
            font-size: 0.72rem;
            color: var(--news-muted);
        }

        .newspaper-tag {
            font-size: 0.62rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--news-ink);
            border: 1px solid #8a8578;
            padding: 0.1rem 0.35rem;
            border-radius: 1px;
            background: #f5f2ea;
        }

        .newspaper-tag.tag-sentence {
            text-transform: none;
            letter-spacing: 0.02em;
            font-size: 0.72rem;
        }

        .newspaper-salary {
            font-size: 0.72rem;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
            color: var(--news-ink);
        }

        .newspaper-list-item .job-description-snippet {
            font-size: 0.8rem;
            line-height: 1.45;
            color: #3d3d3d;
        }

        .newspaper-detail-card {
            border: 2px solid var(--news-rule);
            border-radius: 2px;
            background: #fff;
            box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
        }

        .newspaper-detail-card .job-section-title {
            font-family: var(--font-sans);
            border-bottom: 2px solid var(--news-rule);
            padding-bottom: 0.35rem;
            margin-bottom: 0.75rem;
            color: var(--news-ink);
            letter-spacing: 0.12em;
        }

        .newspaper-detail-card .job-description-rich {
            border-left: 4px solid var(--news-ink);
            padding-left: 1rem;
            font-size: 0.95rem;
            line-height: 1.65;
            color: #222;
        }

        .newspaper-detail-title {
            font-family: var(--font-display);
            font-size: clamp(1.35rem, 2.5vw, 1.85rem);
            font-weight: 700;
            color: var(--news-ink);
            line-height: 1.15;
            letter-spacing: -0.02em;
        }

        .newspaper-detail-company {
            font-size: 0.95rem;
            color: var(--news-muted);
            font-style: italic;
            margin-top: 0.35rem;
        }

        .newspaper-apply-btn {
            border-radius: 2px !important;
            background: var(--news-ink) !important;
            color: #fff !important;
            border: 2px solid var(--news-ink) !important;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            font-size: 0.75rem !important;
        }

        .newspaper-apply-btn:hover {
            background: #2a2a2a !important;
        }

        @media (min-width: 1024px) {
            .newspaper-body-columns {
                column-count: 1;
            }

            .newspaper-detail-card .job-description-rich {
                max-width: 72ch;
            }
        }

        .resume-page .date {
            font-size: 13px !important;
            color: #404040 !important;
            margin-top: 3px !important;
        }

        .resume-page .skill {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 14px;
            display: inline-block;
            margin: 3px;
        }

        /* Page number: bottom-right corner, never overlaps content */
        .page-number {
            position: absolute;
            bottom: 12px;
            right: 20px;
            font-size: 13px;
            color: #6b7280;
            z-index: 10;
            pointer-events: none;
        }

        .resume-page:first-child .page-number {
            display: none;
        }

        /* Mini A4 template previews (step 6 / design template selection style) */
        .template-preview-mini {
            width: 100%;
            aspect-ratio: 210 / 297;
            max-height: 200px;
            overflow: hidden;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: #fff;
            padding: 6px 8px;
            box-sizing: border-box;
            font-size: 5px;
            line-height: 1.25;
        }
        .template-preview-mini .header { padding-bottom: 4px; margin-bottom: 5px; }
        .template-preview-mini .name { font-weight: bold; margin-bottom: 2px; display: block; }
        .template-preview-mini .contact { font-size: 4px; color: #666; margin-bottom: 2px; }
        .template-preview-mini .section-title { font-weight: bold; margin: 4px 0 2px 0; padding-bottom: 2px; display: block; }
        .template-preview-mini .section-block { margin-bottom: 3px; }
        .template-preview-mini .experience-item,
        .template-preview-mini .education-item { font-size: 4px; color: #444; margin-bottom: 1px; }
        .template-preview-mini.modern-preview { font-family: "Helvetica Neue", Arial, sans-serif; }
        .template-preview-mini.modern-preview .header { border-bottom: 1px solid var(--selected-color, #3b82f6); }
        .template-preview-mini.modern-preview .name { font-size: 7px; color: var(--selected-color, #3b82f6); }
        .template-preview-mini.modern-preview .section-title { border-bottom: 1px solid #e5e7eb; font-size: 5px; }
        .template-preview-mini.minimal-preview { font-family: "Times New Roman", serif; }
        .template-preview-mini.minimal-preview .header { border-bottom: 1px solid var(--selected-color, #000); }
        .template-preview-mini.minimal-preview .name { font-size: 6px; color: var(--selected-color, #000); }
        .template-preview-mini.minimal-preview .section-title { border-bottom: 1px solid var(--selected-color, #000); font-size: 5px; }
        .template-preview-mini.professional-preview { font-family: Georgia, serif; background: #f0fdf4 !important; padding: 8px !important; }
        .template-preview-mini.professional-preview .header { border-bottom: 1px solid var(--selected-color, #059669); background: #f0fdf4; padding: 4px 0; margin: -8px -8px 4px -8px; padding-left: 8px; padding-right: 8px; }
        .template-preview-mini.professional-preview .name { font-size: 6px; color: var(--selected-color, #059669); }
        .template-preview-mini.professional-preview .section-title { border-bottom: 1px solid #a7f3d0; font-size: 5px; }
        .template-preview-mini.elegant-preview { font-family: Garamond, serif; background: #fafafa !important; padding: 8px !important; }
        .template-preview-mini.elegant-preview .header { border-bottom: 1px solid var(--selected-color, #8b5cf6); background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%); padding: 4px 0; margin: -8px -8px 4px -8px; padding-left: 8px; padding-right: 8px; }
        .template-preview-mini.elegant-preview .name { font-size: 7px; color: #7c3aed; font-style: italic; }
        .template-preview-mini.elegant-preview .section-title { border-bottom: 1px solid #ddd6fe; font-size: 5px; font-style: italic; }
        .template-preview-mini.corporate-preview { font-family: Calibri, Arial, sans-serif; }
        .template-preview-mini.corporate-preview .header { border-bottom: 1px solid var(--selected-color, #dc2626); }
        .template-preview-mini.corporate-preview .name { font-size: 6px; color: var(--selected-color, #dc2626); text-transform: uppercase; letter-spacing: 0.5px; }
        .template-preview-mini.corporate-preview .section-title { border-bottom: 1px solid #fca5a5; font-size: 5px; text-transform: uppercase; }
        .template-preview-mini.saas-preview { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
        .template-preview-mini.saas-preview .header { padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid #e5e7eb; }
        .template-preview-mini.saas-preview .name { font-size: 6px; font-weight: 600; color: #111827; letter-spacing: -0.02em; }
        .template-preview-mini.saas-preview .contact { font-size: 4px; color: #6b7280; }
        .template-preview-mini.saas-preview .section-title { font-size: 4px; font-weight: 600; color: var(--selected-color, #0f766e); letter-spacing: 0.05em; text-transform: uppercase; padding-bottom: 2px; border-bottom: 1px solid #f3f4f6; }
        .template-card.template-card-design { min-height: 200px; }
        /* Selected template card: use box-shadow so it isn't clipped by accordion overflow */
        .template-cards-grid { padding: 3px; overflow: visible; }
        .template-card.template-card-design.template-card--selected {
            position: relative;
            z-index: 1;
            box-shadow: 0 0 0 2px var(--accent);
        }
        @media (max-width: 768px) {
            .template-preview-mini { max-height: 160px; padding: 4px 6px; font-size: 4px; }
            .template-card.template-card-design { padding: 10px; min-height: 180px; }
        }

        /* Template Overrides */

        /* Modern Template */
        .modern-preview {
            font-family: "Helvetica Neue", Arial, sans-serif;
        }
        .modern-preview .header {
            border-bottom: 3px solid var(--selected-color);
        }
        .modern-preview .name {
            font-size: 34px;
            color: var(--selected-color);
            font-weight: bold;
            margin-bottom: 12px;
        }
        .modern-preview .resume-document-title {
            font-size: 20px;
            font-weight: 600;
            color: var(--selected-color);
            margin: 0 0 10px 0;
            line-height: 1.25;
        }
        .modern-preview .section-title {
            border-bottom: 2px solid #e5e7eb;
        }
        .modern-preview .position {
            color: #1e40af;
            font-size: 19px !important;
        }
        .modern-preview .skill {
            background: #dbeafe;
            color: #1e40af;
        }

        /* Minimal Template */
        .minimal-preview {
            font-family: "Times New Roman", serif;
        }
        .minimal-preview .header {
            border-bottom: 1px solid var(--selected-color);
        }
        .minimal-preview .name {
            font-size: 29px;
            color: var(--selected-color);
            font-weight: bold;
            margin-bottom: 12px;
        }
        .minimal-preview .resume-document-title {
            font-size: 21px;
            font-weight: 600;
            color: var(--selected-color);
            margin: 0 0 10px 0;
            line-height: 1.25;
        }
        .minimal-preview .section-title {
            font-size: 19px;
            border-bottom: 1px solid var(--selected-color);
        }
        .minimal-preview .position {
            color: var(--selected-color);
            font-size: 17px !important;
        }
        .minimal-preview .skill {
            background: #f5f5f5;
            color: var(--selected-color);
            border: 1px solid var(--selected-color);
        }

        /* Professional Template - full green background */
        .professional-preview,
        .professional-preview.resume-page {
            font-family: "Georgia", serif;
            background: #f0fdf4 !important;
            padding: var(--resume-margin-inset) !important;
            margin: 0 !important;
            width: 100% !important;
            box-sizing: border-box;
        }
        .professional-preview .resume-page-content {
            background: transparent !important;
        }
        /* Client-side fallback render: .header has margin: calc(-1 * var(--resume-margin-inset)) to span
           edge-to-edge. The data-border padding (20px/40px) is smaller than --resume-margin-inset (57px+),
           so the negative margin overshoots overflow:hidden and clips the top of the header.
           Match padding to --resume-margin-inset so the negative margin cancels it exactly.
           The :not(.resume-preview-shell--iframe) guard keeps the iframe branch untouched. */
        .professional-preview:not(.resume-preview-shell--iframe) .resume-page-content {
            padding: var(--resume-margin-inset) !important;
        }
        .professional-preview .header {
            border-bottom: 2px solid var(--selected-color);
            background: #f0fdf4;
            padding: 20px var(--resume-margin-inset);
            margin: calc(-1 * var(--resume-margin-inset)) calc(-1 * var(--resume-margin-inset)) 30px calc(-1 * var(--resume-margin-inset));
        }
        .professional-preview .name {
            font-size: 31px;
            color: var(--selected-color);
            font-weight: bold;
            margin-bottom: 12px;
        }
        .professional-preview .resume-document-title {
            font-size: 21px;
            font-weight: 600;
            color: var(--selected-color);
            margin: 0 0 10px 0;
            line-height: 1.25;
        }
        .professional-preview .section-title {
            border-bottom: 1px solid #a7f3d0;
        }
        .professional-preview .position {
            color: #065f46;
            font-size: 19px !important;
        }
        .professional-preview .skill {
            background: #d1fae5;
            color: #065f46;
        }

        /* Elegant Template */
        .elegant-preview {
            font-family: "Garamond", serif;
            background: #fafafa !important;
            padding: var(--resume-margin-inset) !important;
            margin: 0 !important;
            width: 100% !important;
            box-sizing: border-box;
        }
        .elegant-preview .header {
            border-bottom: 2px solid var(--selected-color);
            background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
            padding: 25px var(--resume-margin-inset);
            margin: calc(-1 * var(--resume-margin-inset)) calc(-1 * var(--resume-margin-inset)) 30px calc(-1 * var(--resume-margin-inset));
        }
        .elegant-preview .name {
            font-size: 38px;
            color: #7c3aed;
            font-weight: bold;
            font-style: italic;
            margin-bottom: 12px;
        }
        .elegant-preview .resume-document-title {
            font-size: 22px;
            font-weight: 600;
            font-style: italic;
            color: var(--selected-color, #7c3aed);
            margin: 0 0 10px 0;
            line-height: 1.25;
        }
        .elegant-preview .contact {
             color: var(--text-color, #5b21b6);
        }
        .elegant-preview .section-title {
            font-size: 24px;
            font-style: italic;
            border-bottom: 2px solid #ddd6fe;
        }
        .elegant-preview .position {
            color: #7c3aed;
            font-style: italic;
            font-size: 19px !important;
        }
        .elegant-preview .skill {
            background: linear-gradient(135deg, #ddd6fe 0%, #e9d5ff 100%);
            color: #7c3aed;
            border: 1px solid #c4b5fd;
        }

        /* Corporate Template */
        .corporate-preview {
            font-family: "Calibri", "Arial", sans-serif;
        }
        .corporate-preview .header {
            border-bottom: 3px solid var(--selected-color);
        }
        .corporate-preview .name {
            font-size: 31px;
            color: var(--selected-color);
            font-weight: bold;
            text-transform: uppercase;
            letter-spacing: 1.3px;
            margin-bottom: 12px;
        }
        .corporate-preview .resume-document-title {
            font-size: 15px;
            font-weight: 700;
            color: var(--selected-color);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin: 0 0 10px 0;
            line-height: 1.25;
        }
        .corporate-preview .contact {
             color: var(--text-color, #7f1d1d);
             text-transform: uppercase;
        }
        .corporate-preview .section-title {
            font-size: 19px;
            text-transform: uppercase;
            border-bottom: 2px solid #fca5a5;
        }
        .corporate-preview .position {
            color: #991b1b;
            text-transform: uppercase;
            font-size: 17px !important;
        }
        .corporate-preview .skill {
            background: #fef2f2;
            color: var(--selected-color);
            border: 1px solid #fca5a5;
            text-transform: uppercase;
            font-size: 13px;
        }

        /* SaaS / Premium Template - Stripe, Linear, Notion aesthetic */
        .saas-preview {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
        }
        .saas-preview .header {
            padding-bottom: 24px;
            margin-bottom: 24px;
            border-bottom: 1px solid #e5e7eb;
        }
        .saas-preview .name {
            font-size: 26px;
            font-weight: 600;
            color: #0f172a;
            letter-spacing: -0.025em;
            margin-bottom: 8px;
            line-height: 1.25;
        }
        .saas-preview .resume-document-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--selected-color);
            letter-spacing: -0.01em;
            margin: 0 0 10px 0;
            line-height: 1.3;
        }
        .saas-preview .contact {
            font-size: 11px;
            color: #4b5563;
            letter-spacing: 0.01em;
            line-height: 1.6;
        }
        .saas-preview .summary {
            font-size: 12px;
            color: #374151;
            line-height: 1.6;
            margin-bottom: 24px;
        }
        .saas-preview .section-title {
            font-size: 11px;
            font-weight: 600;
            color: var(--selected-color);
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin: 24px 0 16px 0;
            padding-bottom: 8px;
            border-bottom: 1px solid #f3f4f6;
        }
        .saas-preview .section-block:first-of-type .section-title { margin-top: 0; }
        .saas-preview .experience-item, .saas-preview .education-item { margin-bottom: 20px !important; }
        .saas-preview .position, .saas-preview .degree {
            font-size: 13px !important;
            font-weight: 600 !important;
            color: #0f172a !important;
        }
        .saas-preview .company, .saas-preview .institution {
            font-size: 12px !important;
            font-weight: 500 !important;
            color: var(--selected-color) !important;
        }
        .saas-preview .date {
            font-size: 11px !important;
            color: #6b7280 !important;
            font-weight: 500 !important;
        }
        .saas-preview .description {
            font-size: 12px !important;
            color: #374151 !important;
            line-height: 1.55 !important;
            margin-top: 4px !important;
        }
        .saas-preview .skill {
            font-size: 11px !important;
            font-weight: 500 !important;
            padding: 3px 10px !important;
            border-radius: 4px !important;
            color: #1f2937 !important;
            background: #f9fafb !important;
            border: 1px solid #e5e7eb !important;
            margin: 0 6px 6px 0 !important;
        }

        /* Loading Animation Styles */
        @keyframes pulse-dots {
            0%, 80%, 100% {
                opacity: 0.3;
                transform: scale(0.8);
            }
            40% {
                opacity: 1;
                transform: scale(1);
            }
        }

        .animate-pulse-dots span {
            animation: pulse-dots 1.4s infinite ease-in-out both;
        }

        .animate-pulse-dots span:nth-child(1) { animation-delay: -0.32s; }
        .animate-pulse-dots span:nth-child(2) { animation-delay: -0.16s; }
        .animate-pulse-dots span:nth-child(3) { animation-delay: 0s; }

        /* Shimmer for skeletons - GPU-friendly, no layout thrash */
        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }

        .skeleton-shimmer {
            background: linear-gradient(
                90deg,
                var(--skeleton-bg, #f0f0f0) 0%,
                var(--skeleton-highlight, #e8e8e8) 40%,
                var(--skeleton-bg, #f0f0f0) 100%
            );
            background-size: 200% 100%;
            animation: shimmer 1.5s ease-in-out infinite;
        }

        .skeleton-shimmer-subtle {
            background: linear-gradient(
                90deg,
                #f3f4f6 0%,
                #e5e7eb 50%,
                #f3f4f6 100%
            );
            background-size: 200% 100%;
            animation: shimmer 2s ease-in-out infinite;
        }

        /* Progress bar animation */
        @keyframes progress {
            0% {
                width: 0%;
                transform: translateX(-100%);
            }
            50% {
                width: 70%;
                transform: translateX(0%);
            }
            100% {
                width: 100%;
                transform: translateX(0%);
            }
        }

        .animate-progress {
            animation: progress 2s ease-in-out infinite;
        }

        /* Preview loading placeholder - A4-style skeleton */
        .preview-loading-skeleton {
            aspect-ratio: 210 / 297;
            max-width: 100%;
            min-height: 360px;
            background: linear-gradient(
                180deg,
                #f3f4f6 0%,
                #e5e7eb 12%,
                #f3f4f6 14%,
                #e5e7eb 18%,
                #f3f4f6 22%,
                #e5e7eb 28%,
                #f3f4f6 32%,
                #e5e7eb 38%,
                #f3f4f6 100%
            );
            background-size: 100% 200%;
            animation: preview-skeleton-pulse 2s ease-in-out infinite;
        }

        @keyframes preview-skeleton-pulse {
            0%, 100% { opacity: 0.95; }
            50% { opacity: 1; }
        }

        .toast-enter-active, .toast-leave-active { transition: opacity 0.3s, transform 0.3s; }
        .toast-enter-from, .toast-leave-to { opacity: 0; transform: translate(-50%, 10px); }

        /* ATS Resume Scanning Animation */
        .ats-scan-container {
            --ats-paper: #f8fafc;
            --ats-paper-line: rgba(148, 163, 184, 0.25);
            --ats-scan-glow: var(--accent);
            --ats-scan-shadow: rgba(37, 99, 235, 0.35);
        }
        @media (prefers-color-scheme: dark) {
            .ats-scan-container { --ats-paper: #1e293b; --ats-paper-line: rgba(148, 163, 184, 0.15); --ats-scan-shadow: rgba(99, 102, 241, 0.4); }
        }
        .ats-scan-doc {
            aspect-ratio: 210 / 297;
            max-width: 180px;
            background: var(--ats-paper);
            border: 1px solid var(--border);
            border-radius: 4px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            overflow: hidden;
            position: relative;
        }
        .ats-scan-lines {
            position: absolute; inset: 0;
            background-image:
                linear-gradient(var(--ats-paper-line) 1px, transparent 1px),
                linear-gradient(90deg, var(--ats-paper-line) 1px, transparent 1px);
            background-size: 100% 24px;
            background-position: 12px 16px;
            opacity: 0.8;
        }
        .ats-scan-line {
            position: absolute;
            left: 0; right: 0;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--ats-scan-glow), transparent);
            box-shadow: 0 0 12px var(--ats-scan-shadow), 0 0 24px var(--ats-scan-shadow);
            animation: ats-scan-sweep 16s ease-in-out infinite;
        }
        @media (prefers-reduced-motion: reduce) {
            .ats-scan-line { animation: ats-scan-sweep-slow 24s ease-in-out infinite; }
        }
        @keyframes ats-scan-sweep {
            0% { top: 8%; opacity: 0.6; }
            15% { opacity: 1; }
            85% { opacity: 1; }
            100% { top: 92%; opacity: 0.6; }
        }
        @keyframes ats-scan-sweep-slow {
            0% { top: 8%; opacity: 0.6; }
            100% { top: 92%; opacity: 0.6; }
        }
        .ats-scan-highlight {
            position: absolute;
            left: 0; right: 0;
            top: 0;
            height: 28%;
            background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, transparent 100%);
            pointer-events: none;
            animation: ats-scan-highlight 16s ease-in-out infinite;
        }
        @media (prefers-reduced-motion: reduce) {
            .ats-scan-highlight { animation: ats-scan-highlight-slow 24s ease-in-out infinite; }
        }
        @keyframes ats-scan-highlight {
            0% { top: 0%; opacity: 0.3; }
            100% { top: 85%; opacity: 0.3; }
        }
        @keyframes ats-scan-highlight-slow {
            0% { top: 0%; opacity: 0.3; }
            100% { top: 85%; opacity: 0.3; }
        }
        .ats-scan-dots {
            position: absolute;
            inset: 0;
            pointer-events: none;
        }
        .ats-scan-dot {
            position: absolute;
            width: 4px; height: 4px;
            background: var(--ats-scan-glow);
            border-radius: 50%;
            opacity: 0;
            animation: ats-scan-dot 16s ease-in-out infinite;
        }
        .ats-scan-dot:nth-child(1) { left: 15%; top: 20%; animation-delay: 1.6s; }
        .ats-scan-dot:nth-child(2) { left: 45%; top: 35%; animation-delay: 3.7s; }
        .ats-scan-dot:nth-child(3) { left: 70%; top: 50%; animation-delay: 5.8s; }
        .ats-scan-dot:nth-child(4) { left: 25%; top: 65%; animation-delay: 8s; }
        .ats-scan-dot:nth-child(5) { left: 60%; top: 80%; animation-delay: 6.7s; }
        @keyframes ats-scan-dot {
            0%, 100% { opacity: 0; transform: scale(0.5); }
            20%, 80% { opacity: 0.7; transform: scale(1); }
            50% { opacity: 0.4; transform: scale(0.8); }
        }
        @media (prefers-reduced-motion: reduce) {
            .ats-scan-dot { animation: none; opacity: 0.3; }
        }
        .ats-scan-doc-wrapper {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .ats-scan-magnifier {
            position: absolute;
            width: 28px;
            height: 28px;
            margin-left: -14px;
            margin-top: -14px;
            color: var(--ats-scan-glow);
            filter: drop-shadow(0 0 6px var(--ats-scan-shadow));
            pointer-events: none;
            z-index: 5;
            animation: ats-magnifier-scan 16s ease-in-out infinite;
        }
        @media (prefers-reduced-motion: reduce) {
            .ats-scan-magnifier { animation: ats-magnifier-scan 24s ease-in-out infinite; }
        }
        @keyframes ats-magnifier-scan {
            0% { left: 12%; top: 15%; opacity: 0.8; }
            12% { left: 50%; top: 15%; opacity: 1; }
            25% { left: 88%; top: 15%; opacity: 0.8; }
            37% { left: 88%; top: 45%; opacity: 1; }
            50% { left: 50%; top: 45%; opacity: 0.9; }
            62% { left: 12%; top: 45%; opacity: 1; }
            75% { left: 12%; top: 75%; opacity: 0.9; }
            87% { left: 50%; top: 75%; opacity: 1; }
            100% { left: 12%; top: 15%; opacity: 0.8; }
        }

        /* Smooth loading transition */
        #loading-overlay {
            transition: opacity 0.5s ease-out;
        }

        #app {
            transition: opacity 0.5s ease-in;
        }

        /* Fade in animation for skeleton */
        @keyframes fade-in {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .animate-fade-in {
            animation: fade-in 0.6s ease-out forwards;
        }

        /* Fade in up animation for content loading */
        @keyframes fade-in-up {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .animate-fade-in-up {
            animation: fade-in-up 0.5s ease-out forwards;
        }

        /* Preview content transition when design/style changes */
        .preview-content-enter-active,
        .preview-content-leave-active {
            transition: opacity 0.3s ease-out, transform 0.3s ease-out;
        }
        .preview-content-enter-from {
            opacity: 0;
            transform: scale(0.995);
        }
        .preview-content-leave-to {
            opacity: 0;
            transform: scale(0.998);
        }

        /* Smooth transitions for loaded content */
        .transition-all {
            transition: all 0.3s ease-in-out;
        }

        /* Auth modals: must apply on all breakpoints (was incorrectly scoped inside mobile-only media query). */
        .auth-modal-overlay {
            z-index: 9999;
            padding: 16px;
        }
        .auth-modal-panel {
            width: 100%;
            max-width: 32rem;
            isolation: isolate;
            position: relative;
            background: var(--news-paper-contrast);
        }
        .auth-modal-panel,
        .auth-modal-panel * {
            box-sizing: border-box;
        }
        .auth-modal-panel .newspaper-btn-solid,
        .auth-modal-panel .newspaper-btn-ghost {
            letter-spacing: normal !important;
            text-transform: none !important;
        }
        .auth-modal-panel input,
        .auth-modal-panel button,
        .auth-modal-panel a {
            line-height: 1.25rem;
        }

        /* Newspaper-styled dialogs (must not be scoped to mobile-only — modals use these on all breakpoints). */
        .mobile-modal {
            max-height: calc(100vh - 32px);
            overflow-y: auto;
        }
        .news-modal-panel {
            background: var(--news-paper-contrast);
            border: 2px solid var(--news-rule);
            border-radius: 2px;
            box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.08);
        }
        .news-modal-close {
            border: 1px solid var(--news-rule);
            border-radius: 2px;
            color: var(--news-muted);
            background: #fff;
        }
        .news-modal-close:hover {
            color: var(--news-ink);
            background: var(--news-paper);
        }
        .news-modal-input {
            border: 1px solid #1a1a1a !important;
            border-radius: 0 !important;
            background: var(--news-paper-contrast) !important;
            color: var(--news-ink) !important;
        }
        .news-modal-input::placeholder {
            color: var(--news-muted);
            opacity: 0.85;
        }
        .news-modal-input:focus {
            border-color: #1a1a1a !important;
            box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
            outline: none;
        }
        .news-modal-alert {
            border: 2px solid #dc2626;
            border-radius: 2px;
            background: #fef2f2;
            color: #b91c1c;
        }
        .news-modal-panel .newspaper-btn-solid,
        .news-modal-panel .newspaper-btn-ghost {
            letter-spacing: normal !important;
            text-transform: none !important;
        }

        .legal-modal-panel {
            width: 100%;
            max-width: 42rem;
            isolation: isolate;
            position: relative;
            background: var(--news-paper-contrast);
            max-height: calc(100vh - 32px);
            display: flex;
            flex-direction: column;
        }
        .legal-modal-panel,
        .legal-modal-panel * {
            box-sizing: border-box;
        }
        .legal-modal-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
            border-bottom: 2px solid var(--news-rule);
            padding-bottom: 0.5rem;
            margin-bottom: 0.75rem;
        }
        .legal-modal-tab {
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 0.45rem 0.65rem;
            border: 2px solid var(--news-rule);
            border-radius: 2px;
            background: #fff;
            color: var(--news-muted);
            cursor: pointer;
            transition: color 0.15s, background 0.15s, border-color 0.15s;
        }
        .legal-modal-tab:hover {
            color: var(--news-ink);
            background: var(--news-paper);
        }
        .legal-modal-tab--active {
            color: var(--news-ink);
            border-color: var(--accent, #0f766e);
            background: var(--news-paper);
        }
        .legal-modal-body {
            overflow-y: auto;
            flex: 1;
            min-height: 0;
            padding-right: 0.25rem;
        }
        .legal-modal-prose {
            font-size: 0.8125rem;
            line-height: 1.6;
            color: var(--news-ink);
        }
        .legal-modal-prose h3 {
            font-size: 0.9375rem;
            font-weight: 700;
            margin-top: 1rem;
            margin-bottom: 0.4rem;
            color: var(--news-ink);
        }
        .legal-modal-prose h3:first-child {
            margin-top: 0;
        }
        .legal-modal-prose p {
            margin: 0.35rem 0 0.65rem;
        }
        .legal-modal-prose ul {
            list-style: disc;
            padding-left: 1.2rem;
            margin: 0.35rem 0 0.65rem;
        }
        .legal-modal-prose li {
            margin: 0.2rem 0;
        }
        .legal-modal-prose hr {
            border: 0;
            border-top: 1px solid var(--news-rule);
            margin: 0.85rem 0;
        }
        .legal-modal-prose .legal-note {
            font-size: 0.75rem;
            color: var(--news-muted);
            margin-top: 0.5rem;
        }

        /* Mobile Optimizations */
        @media (max-width: 1024px) {
            .resume-preview-wrapper {
                width: 100%;
                transform: none;
                margin-bottom: 0;
                transform-origin: center top;
            }

            .resume-page {
                width: 100%;
                /* Fixed height for page-break detection; A4 proportion when narrow. Avoid 100vw on real phones (layout vs visual viewport). */
                height: min(297mm, calc(100vw * 11.69 / 8.27));
                min-height: min(297mm, calc(100vw * 11.69 / 8.27));
                height: min(297mm, calc(100dvw * 11.69 / 8.27));
                min-height: min(297mm, calc(100dvw * 11.69 / 8.27));
                aspect-ratio: 8.27 / 11.69 !important;
            }

            /* Scaled builder preview: keep true A4 box so iframe slices aren’t clipped to vw-based height. */
            .resume-preview-zoom-inner .resume-page {
                width: 100%;
                height: 297mm !important;
                min-height: 297mm !important;
                max-height: none !important;
                aspect-ratio: 8.27 / 11.69 !important;
            }

            .resume-page-content {
                min-height: 100%;
            }

            .resume-preview-scroller {
                padding-bottom: 24px;
            }

            /* Builder mobile preview: less dead space under scaled A4 (trim is also applied via marginBottom on zoom layer). */
            .builder-scope .resume-preview-scroller {
                padding-bottom: 8px;
                gap: 12px;
            }
        }

        @media (max-width: 768px) {
            /* Accordion Frame Mobile */
            .accordion-frame {
                border-radius: 0.75rem;
            }

            /* Mobile Header */
            header .text-xl {
                font-size: 1.125rem; /* 18px */
            }

            /* Mobile Typography */
            .mobile-title {
                font-size: 1.5rem; /* 24px */
                line-height: 2rem; /* 32px */
            }

            .mobile-subtitle {
                font-size: 1rem; /* 16px */
                line-height: 1.5rem; /* 24px */
            }

            /* Mobile Form Elements */
            .mobile-input {
                font-size: 16px; /* Prevents zoom on iOS */
                padding: 12px 16px;
                min-height: 44px; /* iOS minimum touch target */
            }

            .mobile-button {
                min-height: 44px;
                padding: 12px 24px;
                font-size: 16px;
            }

            .mobile-select {
                font-size: 16px;
                padding: 12px 16px;
                min-height: 44px;
            }

            /* Mobile Accordion */
            .accordion-trigger {
                padding: 14px 16px;
                font-size: 16px;
                min-height: 48px;
            }

            .accordion-body {
                padding: 0 16px 14px 16px;
            }

            /* Mobile Design Group */
            .design-group {
                gap: 0;
                margin: 0 -16px;
                padding: 0;
            }

            .design-subsection {
                padding: 12px 0;
                border-left: none;
                border-right: none;
                border-radius: 0;
                width: 100%;
            }

            .design-subsection > * {
                padding-left: 16px;
                padding-right: 16px;
            }

            .design-subsection-title {
                font-size: 13px;
                margin-bottom: 8px;
            }

            /* Mobile Template Cards */
            .template-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .template-card {
                padding: 12px;
                min-height: 120px;
            }

            .template-card h4 {
                font-size: 14px;
            }

            .template-card p {
                font-size: 12px;
            }

            /* Mobile Form Spacing */
            .form-section {
                margin-bottom: 0;
                padding: 0;
            }

            /* Mobile Preview Panel */
            .mobile-preview-panel {
                padding: 16px;
            }

            .mobile-preview-controls {
                padding: 8px 12px 12px;
                gap: 8px;
            }

            /* Dashboard resume grid */
            .dashboard-resume-grid {
                gap: 24px;
            }

            /* Mobile Dashboard Cards */
            .dashboard-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .dashboard-resume-grid {
                gap: 20px;
            }

            .dashboard-card {
                padding: 20px;
            }

            /* Mobile Welcome / Landing */
            .welcome-section .rounded-2xl.bg-white {
                padding: 1.5rem 1.25rem;
            }

            .welcome-title {
                font-size: 1.75rem;
                line-height: 2.25rem;
            }

            .welcome-description {
                font-size: 1rem;
                line-height: 1.625rem;
            }

            /* Mobile Language Switcher */
            .language-dropdown {
                width: 100%;
                left: 0;
                right: 0;
            }

            /* Mobile Color Picker */
            .color-picker-container {
                flex-direction: column;
                gap: 16px;
                align-items: flex-start;
            }

            .color-picker-input {
                width: 100%;
                max-width: 200px;
                height: 48px;
            }

            /* Mobile Skill Input */
            .skill-input-container {
                flex-direction: column;
                gap: 8px;
            }

            .skill-input {
                width: 100%;
            }

            .skill-add-button {
                width: 100%;
                min-height: 44px;
            }

            /* Mobile Experience Form */
            .experience-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .experience-textarea {
                min-height: 100px;
            }

            /* Mobile Actions */
            .action-buttons {
                flex-direction: column;
                gap: 12px;
            }

            .action-button {
                width: 100%;
                min-height: 48px;
                justify-content: center;
            }
        }

        @media (max-width: 640px) {
            /* Extra small mobile optimizations */
            .accordion-trigger {
                padding: 12px 14px;
            }

            .accordion-body {
                padding: 0 14px 12px 14px;
            }

            /* Extra small Design Group */
            .design-group {
                gap: 0;
                margin: 0 -14px;
                padding: 0;
            }

            .design-subsection {
                padding: 10px 0;
                border-left: none;
                border-right: none;
                border-radius: 0;
                width: 100%;
            }

            .design-subsection > * {
                padding-left: 14px;
                padding-right: 14px;
            }

            .design-subsection-title {
                font-size: 12px;
                margin-bottom: 6px;
            }

            .mobile-builder-toggle {
                margin-bottom: 12px;
            }

            .mobile-builder-toggle button {
                padding: 8px 6px;
                font-size: inherit;
                line-height: 1.2;
            }

            @media (max-width: 360px) {
                .mobile-builder-toggle button svg {
                    display: none;
                }
            }

            .form-section {
                padding: 0;
                margin-bottom: 0;
            }

            .template-card {
                padding: 10px;
                min-height: 100px;
            }

            .dashboard-card {
                padding: 16px;
            }

            .dashboard-resume-grid .resume-card-preview {
                width: 220px !important;
            }

            .dashboard-resume-grid .preview-thumb-iframe {
                transform: scale(0.277) !important;
                transform-origin: 0 0 !important;
            }

            /* Overlay content pop-up: desktop on hover, mobile on show (more noticeable) */
            .dashboard-resume-grid .resume-card-overlay-content {
                transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease-out;
            }
            @media (min-width: 768px) {
                .dashboard-resume-grid .resume-card-overlay-content {
                    transform: translateY(28px) scale(0.92);
                    opacity: 0;
                }
                .dashboard-resume-grid .group:hover .resume-card-overlay-content {
                    transform: translateY(0) scale(1);
                    opacity: 1;
                }
            }
            @media (max-width: 767px) {
                .dashboard-resume-grid .resume-card-overlay-content {
                    animation: resume-overlay-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
                }
            }
            @keyframes resume-overlay-pop {
                from { transform: translateY(28px) scale(0.92); opacity: 0; }
                to { transform: translateY(0) scale(1); opacity: 1; }
            }

            /* Mobile: larger resume cards */
            @media (max-width: 767px) {
                .dashboard-resume-grid .resume-card-preview {
                    width: 100% !important;
                    max-width: 440px;
                }
                .dashboard-resume-grid .preview-thumb-iframe {
                    transform: scale(0.554) !important;
                    transform-origin: 0 0 !important;
                }
                .dashboard-resume-grid .rounded-xl.skeleton-shimmer-subtle {
                    width: 100% !important;
                    max-width: 440px;
                }
                .dashboard-resume-grid > div {
                    width: 100%;
                    max-width: 440px;
                }
                .dashboard-resume-grid > div > div[style*="max-width: 260px"] {
                    max-width: 100% !important;
                }
            }

            .mobile-modal {
                margin: 16px;
            }

            .app-header-newspaper .header-bar-ghost {
                padding: 0 12px;
                font-size: 14px;
            }
            .app-header-newspaper .header-bar-solid {
                padding: 0 12px !important;
            }

            .language-dropdown {
                margin-top: 8px;
            }

            /* Mobile navigation */
            .nav-brand {
                flex-shrink: 0;
            }

            .nav-brand h1 {
                font-size: 1rem;
            }

            /* Mobile spacing */
            main {
                padding: 16px 12px;
            }

            .section-spacing {
                margin-bottom: 24px;
            }
        }

            #sign-out-btn,
            header button.sign-out-btn {
                color: #fff !important;
                cursor: pointer;
            }