        /* ═══════════════════════════════════════════════════
         *  DESIGN SYSTEM — Editorial / RemapHQ aesthetic
         * ═══════════════════════════════════════════════════ */
        /* ═══════════════════════════════════════════════════════
CSS CUSTOM PROPERTIES
═══════════════════════════════════════════════════════ */
        :root {
            /* ── Primary palette (structure, type, backgrounds) ── */
            --bg: #faf8f3;
            /* Warm white — page background */
            --surface: #f2ede5;
            /* Light stone — cards, subtle sections */
            --mid: #c9a96e;
            /* Honey oak — borders, dividers, accents */
            --text: #33302b;
            /* Warm charcoal — headlines, body copy */
            --text-muted: #6b6560;
            /* Muted charcoal — secondary text */
            --dark-surface: #1c1c1e;
            /* Near black — one dark section */

            /* ── Secondary palette (interactive, accent, alive) ── */
            --action: #c99a18;
            /* Pitcher yellow — buttons, primary CTA */
            --action-hover: #b08816;
            /* Darker yellow — hover state */
            --action-focus: rgba(201, 154, 24, 0.25);
            /* Yellow focus ring */
            --secondary: #4a6fa5;
            /* Jacket blue — tabs, link hovers */
            --secondary-hover: #3d5e8c;
            /* Darker blue — hover state */
            --highlight: #e8567f;
            /* Sticky pink — notifications, live tags */
            --tertiary: #189e48;
            /* Marker green — success, tertiary */

            .service-row.strategy span.material-symbols-outlined.service-arrow {
                color: var(--action);
            }

            .service-row.automation span.material-symbols-outlined.service-arrow {
                color: var(--highlight);
            }

            .service-row.product span.material-symbols-outlined.service-arrow {
                color: var(--tertiary);
            }

            /* ── Typography ── */
            --font-sans: "Noto Sans",
            -apple-system,
            BlinkMacSystemFont,
            sans-serif;
            --font-serif: "Noto Serif",
            Georgia,
            "Times New Roman",
            serif;

            /* ── Type scale (editorial, not corporate) ── */
            --text-xxs: 0.7rem;
            /* 11px — microcopy, ux copy */
            --text-xs: 0.8125rem;
            /* 13px — fine print, credits */
            --text-sm: 0.875rem;
            /* 14px — captions, labels */
            --text-base: 1.0625rem;
            /* 17px — body copy */
            --text-lg: 1.1875rem;
            /* 19px — lead paragraphs */
            --text-xl: 1.375rem;
            /* 22px — h3, subheadings */
            --text-2xl: 1.75rem;
            /* 28px — h2, section headings */
            --text-3xl: 2.5rem;
            /* 40px — h1, hero (mobile) */
            --text-4xl: 3.25rem;
            /* 52px — h1, hero (desktop) */

            /* ── Spacing tokens ── */
            --space-xs: 0.5rem;
            --space-sm: 1rem;
            --space-md: 1.5rem;
            --space-lg: 2.5rem;
            --space-xl: 4rem;
            --space-2xl: 6rem;

            /* ═══════════════════════════════════════════════════════
 PICO CSS OVERRIDES
 ═══════════════════════════════════════════════════════ */

            /* ── Page ── */
            --pico-font-family: var(--font-sans);
            --pico-font-family-sans-serif: var(--font-sans);
            --pico-font-family-serif: var(--font-serif);
            --pico-font-size: var(--text-base);
            --pico-line-height: 1.7;
            --pico-font-weight: 400;
            --pico-background-color: var(--bg);
            --pico-color: var(--text);

            /* ── Typography ── */
            --pico-text-decoration: none;
            --pico-muted-color: var(--text-muted);
            --pico-muted-border-color: var(--mid);
            --pico-h1-color: var(--text);
            --pico-h2-color: var(--text);
            --pico-h3-color: var(--text);
            --pico-h4-color: var(--text);
            --pico-h5-color: var(--text);
            --pico-h6-color: var(--text);

            /* ── Primary interactive (buttons, links) ── */
            --pico-primary: var(--text);
            --pico-primary-background: var(--text);
            --pico-primary-border: var(--text);
            --pico-primary-hover: #4a463e;
            --pico-primary-hover-background: #4a463e;
            --pico-primary-hover-border: #4a463e;
            --pico-primary-focus: rgba(51, 48, 43, 0.25);
            --pico-primary-inverse: var(--surface);
            /* text should be light stone */
            --pico-primary-active-background: #4a463e;
            --pico-primary-active-border: #4a463e;

            /* ── Secondary interactive ── */
            --pico-secondary: var(--secondary);
            --pico-secondary-background: var(--secondary);
            --pico-secondary-border: var(--secondary);
            --pico-secondary-hover: var(--secondary-hover);
            --pico-secondary-hover-background: var(--secondary-hover);
            --pico-secondary-hover-border: var(--secondary-hover);
            --pico-secondary-focus: rgba(74, 111, 165, 0.25);
            --pico-secondary-inverse: var(--bg);

            /* ── Cards and surfaces ── */
            --pico-card-background-color: var(--surface);
            --pico-card-sectioning-background-color: var(--surface);
            --pico-dropdown-background-color: var(--surface);
            --pico-dropdown-color: var(--text);

            /* ── Shadows & Depth ── */
            --pico-box-shadow: 0 6px 16px rgba(201, 169, 110, 0.12),
            0 2px 4px rgba(201, 169, 110, 0.04);
            --pico-group-box-shadow: var(--pico-box-shadow);

            /* ── Borders ── */
            --pico-border-color: var(--mid);
            --pico-border-radius: 100px;
            --pico-accordion-border-color: var(--mid);
            --pico-accordion-active-summary-color: var(--action);

            /* ── Blockquotes ── */
            --pico-blockquote-border-color: var(--mid);
            --pico-blockquote-color: var(--text);
            --pico-blockquote-footer-color: var(--text-muted);

            /* ── Form elements ── */
            --pico-form-element-background-color: var(--bg);
            --pico-form-element-border-color: var(--mid);
            --pico-form-element-active-background-color: var(--surface);
            --pico-form-element-active-border-color: var(--action);
            --pico-form-element-focus-color: var(--action-focus);
            --pico-form-element-color: var(--text);
            --pico-form-element-placeholder-color: var(--text-muted);

            /* ── Table elements ── */
            --pico-table-border-color: var(--mid);
            --pico-table-row-stripped-background-color: var(--surface);

            /* ── Code ── */
            --pico-code-background-color: var(--surface);
            --pico-code-color: var(--text);
            --pico-mark-background-color: var(--action-focus);
            --pico-mark-color: var(--text);
            --pico-ins-color: var(--tertiary);
            --pico-del-color: var(--highlight);

            /* ── Selection ── */
            --pico-text-selection-color: rgba(201, 154, 24, 0.25);

            /* ── HR ── */
            --pico-hr-border-color: var(--mid);
        }

        body>footer,
        body>header,
        body>main {
            width: 100%;
            margin-right: auto;
            margin-left: auto;
            padding: 0;
        }



        .page-header {
            text-align: center;
        }



        #chat-container {
            width: 100%;
            max-width: 1080px;
        }

        /* ── Header ─────────────────────────────────────── */
        .tool-header {
            margin-bottom: 3rem;
            text-align: center;
        }

        .tool-header h1 {
            font-family: var(--font-serif);
            font-size: var(--text-2xl);
            font-weight: 400;
            margin-bottom: 0.5rem;
            color: var(--text);
        }

        .tool-header h3 {
            color: var(--text-muted);
            font-size: var(--text-xs);
            margin-bottom: 0;
            font-weight: 400;
        }

        /* ── Progress (thin gold line) ──────────────────── */
        .progress-bar-track {
            width: 100%;
            height: 2px;
            background: var(--surface);
            margin-top: 2rem;
        }

        .progress-bar-fill {
            height: 100%;
            background: var(--mid);
            transition: width 0.6s ease;
        }

        .progress-label {
            font-size: var(--text-xxs);
            color: var(--text-light);
            margin-top: 0.5rem;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        /* ── Model selector ────────────────────────────── */
        .model-selector {
            text-align: right;
            margin-top: 0.5rem;
        }

        .model-selector select {
            max-width: 220px;
            font-size: var(--text-xxs);
            padding: 0.3rem 0.6rem;
            border: 1px solid var(--surface);
            border-radius: 6px;
            background: white;
            color: var(--text-muted);
            cursor: pointer;
        }

        /* ── Two-column layout ──────────────────────────── */
        .interview-layout {
            display: flex;
            gap: 4rem;
            margin-top: 3rem;
            align-items: flex-start;
        }

        /* ── Sidebar: magazine TOC ──────────────────────── */
        .sidebar {
            width: 220px;
            min-width: 220px;
            flex-shrink: 0;
            position: sticky;
            top: 2rem;
        }

        .sidebar-category {
            margin-bottom: 1.5rem;
        }

        .sidebar-category-head {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.4rem;
            background: none;
            border: none;
            padding: 0;
            cursor: default;
            width: 100%;
            text-align: left;
        }

        .sidebar-category-head .cat-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: transparent;
            flex-shrink: 0;
            transition: background 0.3s;
        }

        .sidebar-category-head.active .cat-dot {
            background: var(--action);
        }

        .sidebar-category-head .cat-name {
            font-size: 0.82rem;
            font-weight: 400;
            color: var(--text-muted);
            letter-spacing: 0.02em;
            transition:
                color 0.2s,
                font-weight 0.2s;
        }

        .sidebar-category-head.active .cat-name {
            font-weight: 700;
            color: var(--text);
        }

        .sidebar-category-head .cat-progress {
            margin-left: auto;
            font-size: 0.72rem;
            color: var(--text-light);
        }

        .sidebar-questions {
            padding: 0.2rem 0 0 1.1rem;
        }

        .sidebar-q {
            font-size: 0.78rem;
            padding: 0.15rem 0;
            color: var(--text-light);
            display: flex;
            align-items: center;
            gap: 0.4rem;
            line-height: 1.5;
        }

        .sidebar-q.covered {
            color: var(--text-muted);
        }

        .sidebar-q .check {
            color: var(--mid);
            font-size: 0.7rem;
            font-weight: 700;
        }

        /* ── Chat column ────────────────────────────────── */
        .chat-column {
            flex: 1;
            min-width: 0;
        }

        /* ── Chat window: no box, just content ─────────── */
        #chat-window {
            min-height: 400px;
            max-height: 68vh;
            overflow-y: auto;
            padding: 0 0 2rem 0;
        }

        #chat-window::-webkit-scrollbar {
            width: 3px;
        }

        #chat-window::-webkit-scrollbar-thumb {
            background: var(--mid);
            border-radius: 2px;
        }

        /* ── Transcript-style messages ──────────────────── */
        .msg {
            margin-bottom: 1rem;
            line-height: 1.5;
            word-wrap: break-word;
            display: flex;
            flex-direction: column;
        }

        .msg-assistant {
            align-items: flex-end;
            padding-left: 15%;
        }

        .msg-user {
            align-items: flex-start;
            padding-left: 0;
            text-align: left;
        }

        .msg-role {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }

        .msg-assistant .msg-role {
            color: var(--mid);
        }

        .msg-user .msg-role {
            color: var(--text-muted);
        }

        .msg-assistant .msg-body {
            font-family: var(--font-sans);
            font-size: 0.8rem;
            color: var(--text);
            font-style: normal;
            background: #f2ede5;
            padding: 1rem;
            border-radius: 0.5rem;
        }

        .msg-user .msg-body {
            font-size: 0.8rem;
            color: var(--text);
            font-style: normal;
        }

        /* ── Loading ────────────────────────────────────── */
        .loading-indicator {
            color: var(--text-light);
            font-size: 0.85rem;
            font-style: italic;
            padding: 1rem 0;
        }

        .loading-indicator::after {
            content: "";
            animation: dots 1.5s steps(4, end) infinite;
        }

        @keyframes dots {

            0%,
            20% {
                content: "";
            }

            40% {
                content: ".";
            }

            60% {
                content: "..";
            }

            80%,
            100% {
                content: "...";
            }
        }

        /* ── Input area ─────────────────────────────────── */
        .chat-input-wrapper {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            background: #f9f9f9;
            border-radius: 1.3rem;
            margin-top: auto;
            border-bottom: 1px solid var(--surface);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        .chat-input-wrapper input[type="text"] {
            flex: 1;
            border: none !important;
            outline: none !important;
            margin: 0 !important;
            padding: 0.5rem 0;
            background: transparent;
            font-size: 0.8rem;
        }

        .chat-input-wrapper input[type="text"]:focus {
            border-bottom-color: var(--mid);
            box-shadow: none;
        }

        .chat-input-wrapper input[type="text"]::placeholder {
            color: var(--text-light);
        }

        /* ── Mic button ────────────────────────────────── */
        #mic-btn {
            flex: 0 0 auto !important;
            width: 40px !important;
            height: 40px !important;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 0 !important;
            color: var(--text-muted);
            transition: color 0.2s;
            margin: 0;
        }

        #mic-btn:hover {
            color: var(--text);
        }

        #mic-btn.recording {
            color: var(--highlight);
            animation: pulse-mic 1.2s ease-in-out infinite;
        }

        .material-symbols-outlined {
            font-variation-settings:
                "FILL" 0,
                "wght" 400,
                "GRAD" 0,
                "opsz" 24;
            font-size: 24px;
        }

        @keyframes pulse-mic {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.5;
            }
        }

        /* ── Send button ───────────────────────────────── */
        #send-btn {
            flex-shrink: 0;
            background: var(--dark-surface);
            color: #fff;
            border: none;
            border-radius: 100px;
            padding: 0.6rem 1.8rem;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: opacity 0.2s;
            white-space: nowrap;
            margin-bottom: 0;
            width: auto;
        }

        #send-btn:hover {
            opacity: 0.85;
        }

        #send-btn:disabled {
            opacity: 0.35;
            cursor: not-allowed;
        }

        /* ── Download section ───────────────────────────── */
        .download-section {
            margin-top: 4rem;
            padding-top: 3rem;
            border-top: 1px solid var(--surface);
            text-align: center;
        }

        .download-section h3 {
            font-family: var(--font-serif);
            font-weight: 400;
            font-size: 1.4rem;
            color: var(--text);
            margin-bottom: 0.75rem;
        }

        .download-section p {
            color: var(--text-muted);
            font-size: 0.9rem;
            margin-bottom: 2rem;
        }

        .download-btn {
            display: inline-block;
            margin: 0 0.75rem;
            padding: 0.65rem 2rem;
            background: var(--dark-surface);
            color: #fff;
            border: none;
            border-radius: 100px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 500;
            transition: opacity 0.2s;
            max-width: 350px;
        }

        .download-btn:hover {
            opacity: 0.85;
        }

        /* ── Admin panels (Blip / designMode editing) ──── */
        body.admin-unlock .admin-visible {
            display: block !important;
            background: #fff3cd;
            border: 2px dashed var(--mid);
            padding: 1rem;
            margin-bottom: 2rem;
            font-family: monospace;
            font-size: 0.8rem;
        }

        body.admin-unlock .admin-visible .config-item,
        body.admin-unlock .admin-visible .q-item {
            display: block;
            padding: 0.4rem 0.6rem;
            margin: 0.3rem 0;
            border-left: 3px solid var(--mid);
            background: rgba(255, 255, 255, 0.6);
        }

        body.admin-unlock .admin-visible .panel-label {
            display: block;
            font-weight: 700;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
            padding-bottom: 0.3rem;
        }

        @keyframes input-blink {
            0% {
                box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6);
                /* Starts with a tight, slightly opaque blue */
            }

            50% {
                box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.1);
                /* Expands out and fades */
            }

            100% {
                box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
                /* Disappears completely */
            }
        }

        .blink-attention {
            animation: input-blink 1.5s ease-out 1;
            /* Runs exactly once on load */
        }