:root {
    --gt-black: #000000;
    --gt-ink: #000000;
    --gt-gold: #F6D24D;
    --gt-gold-deep: #c8a93b;
    --gt-cream: #f5f5f5;
    --gt-ivory: #ffffff;
    --gt-sand: #ededed;
    --gt-muted: #7A7A7A;
    --gt-border: rgba(0, 0, 0, 0.12);
    --gt-border-strong: rgba(0, 0, 0, 0.22);
    --gt-shadow: 0 24px 60px rgba(20, 19, 20, 0.12);
    --gt-card-shadow: 0 14px 32px rgba(20, 19, 20, 0.08);
    --gt-radius-lg: 18px;
    --gt-radius-md: 12px;
    --gt-radius-sm: 8px;

    --font-heading: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--gt-sand);
    background-image:
        radial-gradient(circle at 12% -8%, rgba(246, 210, 77, 0.07), transparent 52%),
        radial-gradient(circle at 80% 0%, rgba(0, 0, 0, 0.08), transparent 45%),
        linear-gradient(135deg, var(--gt-ivory) 0%, var(--gt-cream) 55%, var(--gt-sand) 100%);
    color: var(--gt-ink);
    margin: 0;
    min-height: 100vh;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--gt-border);
    box-shadow: 0 10px 30px rgba(20, 19, 20, 0.05);
    padding: 18px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

header .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(246, 210, 77, 0.95), rgba(246, 210, 77, 0.25), transparent);
}

header .brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

header .brand img {
    height: 36px;
}

header .brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

header .brand-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gt-muted);
    font-weight: 600;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin: 0;
    line-height: 1.1;
}

header .title-context {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gt-muted);
    margin-left: 8px;
}

header nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

header nav a {
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--gt-border);
    background: rgba(255, 255, 255, 0.98);
    transition: all 0.2s ease;
}

header nav a:hover {
    border-color: rgba(246, 210, 77, 0.7);
    background: var(--gt-cream);
}

.status {
    font-size: 13px;
    color: var(--gt-muted);
    background: var(--gt-ivory);
    border: 1px solid rgba(246, 210, 77, 0.35);
    padding: 6px 12px;
    border-radius: 999px;
}

main {
    padding: 32px 24px 64px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--gt-ivory);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-lg);
    padding: 22px;
    box-shadow: var(--gt-card-shadow);
    position: relative;
    overflow: hidden;
}

/* Some pages need sticky elements inside cards. */
.card--overflow-visible {
    overflow: visible;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(246, 210, 77, 0.06), transparent 62%);
    opacity: 0.8;
    pointer-events: none;
}

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

.card + .card {
    margin-top: 24px;
}

.hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-left: 6px solid var(--gt-gold);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hero-pill {
    background: var(--gt-cream);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--gt-muted);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.hero-chip {
    background: var(--gt-cream);
    border: 1px solid rgba(246, 210, 77, 0.6);
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
}

.subsection-block {
    margin-top: 18px;
}

.subsection-block:first-of-type {
    margin-top: 0;
}

.subsection-title {
    font-family: var(--font-heading);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gt-muted);
    margin: 0 0 10px;
}

@media (min-width: 860px) {
    .field.compact {
        max-width: 220px;
        width: 100%;
        justify-self: start;
    }
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
    font-weight: 600;
    color: var(--gt-muted);
    margin: 0 0 6px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 30px;
    margin: 0 0 6px;
    color: var(--gt-black);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 15px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gt-muted);
    margin: 0 0 12px;
}

.section-title + .notice {
    margin-top: -6px;
}

.notice {
    margin: 0;
    color: var(--gt-muted);
    font-size: 14px;
    line-height: 1.5;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    font-size: 14px;
}

.summary-item {
    background: var(--gt-cream);
    padding: 12px 14px;
    border-radius: var(--gt-radius-sm);
    border: 1px solid rgba(20, 19, 20, 0.08);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gt-ink);
}

.required {
    color: var(--gt-gold-deep);
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 12px;
    border-radius: var(--gt-radius-sm);
    border: 1px solid var(--gt-border-strong);
    font-size: 14px;
    font-family: inherit;
    background: var(--gt-ivory);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--gt-gold);
    box-shadow: 0 0 0 3px rgba(246, 210, 77, 0.3);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--gt-muted) 50%),
        linear-gradient(135deg, var(--gt-muted) 50%, transparent 50%),
        linear-gradient(to right, transparent, transparent);
    background-position: calc(100% - 18px) calc(1.2em),
        calc(100% - 13px) calc(1.2em),
        0 0;
    background-size: 5px 5px, 5px 5px, 100% 100%;
    background-repeat: no-repeat;
}

button,
.button-link {
    background: linear-gradient(135deg, var(--gt-gold), var(--gt-gold-deep));
    color: var(--gt-black);
    border: 1px solid rgba(20, 19, 20, 0.18);
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
    min-height: 44px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover,
.button-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(20, 19, 20, 0.16);
}

button.secondary,
.button-link.secondary {
    background: var(--gt-ivory);
    border: 1px solid rgba(122, 122, 122, 0.5);
    color: var(--gt-ink);
    box-shadow: none;
}

button.secondary:hover,
.button-link.secondary:hover {
    box-shadow: 0 6px 16px rgba(20, 19, 20, 0.08);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.actions-spaced {
    margin-top: 24px;
}

.phase-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.phase-tab {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--gt-border);
    color: var(--gt-ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
}

.phase-tab.active {
    background: var(--gt-gold);
    border-color: var(--gt-gold);
    color: var(--gt-black);
    box-shadow: 0 10px 20px rgba(246, 210, 77, 0.35);
}

.phase {
    margin-top: 16px;
}

.phase-title {
    font-family: var(--font-heading);
    font-size: 16px;
    margin: 0 0 12px;
}

.phase-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.phase-panel {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    background: var(--gt-cream);
}

.phase-panel h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-family: var(--font-heading);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.form-grid.two-column-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 860px) {
    .form-grid.two-column-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-grid .span-2 {
    grid-column: 1 / -1;
}

.short-input {
    max-width: 240px;
}

.short-field {
    max-width: 260px;
    width: 100%;
}

.creative-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
}

.creative-panel,
.collapsible-panel {
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    padding: 12px 16px;
    background: var(--gt-cream);
    width: 100%;
}

.creative-panel summary,
.collapsible-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.creative-panel summary::-webkit-details-marker,
.collapsible-panel summary::-webkit-details-marker {
    display: none;
}

.creative-panel summary::after,
.collapsible-panel summary::after {
    content: "+";
    margin-left: auto;
    font-weight: 700;
}

.creative-panel[open] summary::after,
.collapsible-panel[open] summary::after {
    content: "-";
}

.creative-panel textarea,
.collapsible-panel textarea {
    margin-top: 12px;
    min-height: 180px;
    background: var(--gt-cream);
}

.multiline-textarea {
    min-height: 200px;
}

.creative-textarea {
    min-height: 200px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.success-actions .button-link,
.success-actions button {
    min-height: 44px;
    width: 100%;
}

.button-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.button-row > * {
    width: 100%;
    min-width: 0;
}

.button-stack {
    display: grid;
    gap: 10px;
}

.action-item {
    background: var(--gt-cream);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    padding: 16px;
}

.action-item h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin: 0 0 10px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
    font-size: 14px;
}

.copy-area,
.mono-block {
    min-height: 140px;
    resize: vertical;
    background: var(--gt-cream);
    border-color: var(--gt-border);
    margin-bottom: 10px;
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}

.audience-input {
    min-height: 200px;
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--gt-ivory);
    border: 1px solid var(--gt-border-strong);
}

.mono-block {
    min-height: 160px;
    margin: 0;
}

.dashboard-section {
    margin-top: 24px;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll .dashboard-table {
    min-width: 720px;
}

@media (max-width: 600px) {
    .table-scroll .dashboard-table {
        min-width: 560px;
    }
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dashboard-table th,
.dashboard-table td {
    border-bottom: 1px solid var(--gt-border);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.dashboard-table th {
    font-family: var(--font-heading);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gt-muted);
}

.dashboard-table tbody tr:hover {
    background: var(--gt-cream);
}

.queue-card {
    background: var(--gt-cream);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    padding: 16px;
}

.queue-item {
    display: grid;
    gap: 6px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gt-border);
}

.queue-item:last-child {
    border-bottom: none;
}

.queue-meta {
    font-size: 13px;
    color: var(--gt-muted);
}

.inline-link {
    color: var(--gt-ink);
    text-decoration: underline;
    font-weight: 600;
}

.stack {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.success-layout {
    display: grid;
    gap: 16px;
}

.success-overview .notice {
    margin-bottom: 16px;
}

.detail-list {
    display: grid;
    gap: 10px;
}

.detail-row {
    display: grid;
    grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
}

.detail-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gt-muted);
    font-weight: 600;
}

.detail-value {
    font-weight: 600;
    color: var(--gt-black);
}

.success-actions-card .button-stack {
    margin-bottom: 12px;
}

.success-audience .audience-input {
    min-height: 220px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (min-width: 980px) {
    .success-layout {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        align-items: start;
    }
}

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

.intake-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.demo-bar {
    display: none;
    justify-content: flex-end;
}

body.demo-mode .demo-bar {
    display: flex;
}

.section-card {
    background: var(--gt-cream);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-lg);
    padding: 18px;
    box-shadow: var(--gt-card-shadow);
}

.intake-form .section-card {
    border-left: 4px solid rgba(246, 210, 77, 0.7);
    padding: 0;
    overflow: hidden;
}

.intake-form .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--gt-black);
}

.section-summary .section-title {
    margin: 0;
    line-height: 1.3;
}

.intake-form .section-index {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--gt-gold);
    color: var(--gt-black);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.section-summary {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 10px;
    padding: 18px;
    cursor: pointer;
    background: var(--gt-ivory);
    list-style: none;
}

.intake-section[data-locked="true"] .section-summary {
    opacity: 0.6;
    cursor: not-allowed;
}

.section-summary-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.section-summary::marker {
    content: "";
}

.section-summary::-webkit-details-marker {
    display: none;
}

.section-toggle {
    justify-self: end;
    font-weight: 700;
    color: var(--gt-muted);
}

.section-toggle::before {
    content: "+";
}

.intake-section[open] .section-toggle {
    color: var(--gt-black);
}

.intake-section[open] .section-toggle::before {
    content: "-";
}

.success-section[open] .section-toggle {
    color: var(--gt-black);
}

.success-section[open] .section-toggle::before {
    content: "-";
}

.section-preview {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 6px 12px;
    font-size: 13px;
    color: var(--gt-muted);
}

.preview-item {
    display: grid;
    gap: 2px;
}

.preview-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
    color: var(--gt-muted);
}

.preview-value {
    color: var(--gt-black);
    font-weight: 600;
    font-size: 13px;
    word-break: break-word;
}

.intake-section[open] .section-preview {
    display: none;
}

.success-section[open] .section-preview {
    display: none;
}

.section-body {
    padding: 18px;
    border-top: 1px solid var(--gt-border);
}

.section-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.section-actions button {
    min-width: 220px;
}

.section-status {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--gt-border);
    background: var(--gt-ivory);
    font-size: 12px;
    color: var(--gt-muted);
    font-weight: 600;
}

.intake-section[data-complete="true"] .section-status {
    border-color: rgba(246, 210, 77, 0.7);
    background: rgba(246, 210, 77, 0.2);
    color: var(--gt-black);
}

@media (max-width: 720px) {
    .section-summary {
        padding: 16px;
    }

    .section-status {
        margin-left: 0;
    }

    .section-body {
        padding: 16px;
    }

    .section-preview {
        grid-template-columns: 1fr;
    }

    .section-actions {
        justify-content: stretch;
    }

    .section-actions button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .time-select {
        grid-template-columns: 1fr;
    }
}

.section-card .section-title {
    margin-bottom: 12px;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px 16px;
}

.time-select {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 8px;
}

.time-select .time-period {
    min-width: 90px;
}

@media (min-width: 860px) {
    .section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 18px;
    }
}

.grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}

.row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.field.span-2 {
    grid-column: 1 / -1;
}

@media (min-width: 860px) {
    .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.qualification-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 8px;
}

@media (min-width: 860px) {
    .qualification-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.qual-card {
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    padding: 14px;
    background: var(--gt-cream);
    display: flex;
    flex-direction: column;
}

.qual-question {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--gt-black);
}

.segmented {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.seg-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.seg-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seg-option span {
    display: block;
    text-align: center;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid var(--gt-border-strong);
    background: var(--gt-ivory);
    font-weight: 600;
}

.seg-option input:checked + span {
    border-color: var(--gt-gold);
    box-shadow: 0 0 0 3px rgba(246, 210, 77, 0.25);
    background: rgba(246, 210, 77, 0.2);
}

.seg-option span:hover {
    border-color: rgba(20, 19, 20, 0.3);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer {
    text-align: center;
    margin-top: 18px;
    color: var(--gt-muted);
    font-size: 12px;
}

@media (max-width: 900px) {
    header {
        padding: 16px 18px;
    }

    main {
        padding: 24px 16px 48px;
    }
}

@media (max-width: 720px) {
    header .header-top {
        align-items: flex-start;
    }

    header nav {
        width: 100%;
        justify-content: flex-start;
    }

    header .title-context {
        display: none;
    }
}

/* ---------- UI polish helpers ---------- */

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    display: grid;
    gap: 10px;
    z-index: 1000;
    width: min(380px, calc(100vw - 36px));
}

.toast {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--gt-border);
    border-left: 6px solid rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(20, 19, 20, 0.12);
    padding: 12px 12px 12px 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 4px;
    cursor: pointer;
    animation: toast-in 180ms ease-out;
}

.toast-title {
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gt-muted);
}

.toast-message {
    grid-column: 1 / -1;
    font-size: 14px;
    line-height: 1.4;
    color: var(--gt-black);
}

.toast-close {
    grid-row: 1;
    grid-column: 2;
    align-self: start;
    justify-self: end;
    border: 1px solid var(--gt-border);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 10px;
    width: 34px;
    height: 34px;
    box-shadow: none;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    color: var(--gt-muted);
}

.toast-close:hover {
    transform: none;
    color: var(--gt-black);
    border-color: rgba(0, 0, 0, 0.2);
}

.toast-info { border-left-color: rgba(0, 0, 0, 0.25); }
.toast-success { border-left-color: rgba(30, 160, 90, 0.75); }
.toast-warning { border-left-color: rgba(246, 210, 77, 0.95); }
.toast-error { border-left-color: rgba(220, 60, 60, 0.85); }

.toast-exit {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 160ms ease, transform 160ms ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Busy state (prevents double clicks) */
button.is-busy,
.button-link.is-busy {
    opacity: 0.85;
    cursor: progress;
}

/* Inline validation */
.field.invalid input,
.field.invalid textarea,
.field.invalid select,
.qual-card.invalid {
    border-color: rgba(220, 60, 60, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(220, 60, 60, 0.12) !important;
}

/* Inline status banners (used in pitch builder actions) */
#action-status,
#download-link {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--gt-radius-md);
    border: 1px solid rgba(246, 210, 77, 0.35);
    background: rgba(246, 210, 77, 0.12);
    display: none;
}

#action-status.status-active,
#download-link.status-active {
    display: block;
}

#action-status.status-error {
    border-color: rgba(220, 60, 60, 0.28);
    background: rgba(220, 60, 60, 0.08);
}

#action-status.status-success {
    border-color: rgba(30, 160, 90, 0.28);
    background: rgba(30, 160, 90, 0.08);
}

.error-text {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(220, 60, 60, 0.95);
}

/* Make the pitch phase nav feel anchored */
.phase-nav {
    position: sticky;
    top: 98px;
    z-index: 5;
    padding: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--gt-border);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}


/* ---------- Modern app theme (AI Studio-ish) ----------
   Goal: keep GeoTarget colors, but make the UI feel like a modern product UI
   (consistent surfaces, typography, elevation, and component states).
*/

:root {
    /* Softer neutrals (keeps the brand gold/black) */
    --gt-sand: #f6f7fb;
    --gt-cream: #f3f4f7;

    --gt-border: rgba(17, 17, 17, 0.10);
    --gt-border-strong: rgba(17, 17, 17, 0.16);

    --gt-muted: rgba(17, 17, 17, 0.62);

    /* Cleaner shadows */
    --gt-shadow: 0 18px 50px rgba(17, 17, 17, 0.12);
    --gt-card-shadow: 0 1px 2px rgba(17, 17, 17, 0.06), 0 10px 26px rgba(17, 17, 17, 0.08);

    /* Slightly tighter radii for “app UI” consistency */
    --gt-radius-lg: 16px;
    --gt-radius-md: 12px;
    --gt-radius-sm: 10px;

    /* Use one typeface family for a more “React app” feel */
    --font-heading: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--gt-sand);
    background-image:
        radial-gradient(circle at 12% -10%, rgba(246, 210, 77, 0.12), transparent 56%),
        linear-gradient(180deg, var(--gt-ivory) 0%, var(--gt-sand) 62%);
}

header {
    padding: 16px 22px;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--gt-border);
    box-shadow: 0 1px 2px rgba(17, 17, 17, 0.06);
}

header::after {
    height: 2px;
    background: linear-gradient(90deg, rgba(246, 210, 77, 0.9), rgba(246, 210, 77, 0.0));
}

header nav a {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

header nav a:hover {
    background: rgba(17, 17, 17, 0.04);
    border-color: rgba(17, 17, 17, 0.08);
}

header nav a.active {
    background: rgba(246, 210, 77, 0.22);
    border-color: rgba(246, 210, 77, 0.55);
}

.status {
    background: rgba(17, 17, 17, 0.04);
    border-color: rgba(17, 17, 17, 0.10);
}

main {
    padding-top: 28px;
}

/* Unify “surface” styling across cards/panels */
.card,
.section-card,
.queue-card,
.action-item,
.creative-panel,
.collapsible-panel,
.phase-panel {
    background: var(--gt-ivory);
    border: 1px solid var(--gt-border);
    box-shadow: var(--gt-card-shadow);
}

.card::before {
    display: none;
}

/* Reduce visual “mismatch” from mixed light-gray blocks */
.summary-item,
.hero-pill,
.hero-chip {
    background: rgba(17, 17, 17, 0.03);
    border-color: rgba(17, 17, 17, 0.08);
}

/* Typography hierarchy */
.section-title {
    font-size: 16px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--gt-black);
}

.subsection-title,
.detail-label,
.toast-title,
.brand-kicker {
    letter-spacing: 0.12em;
}

/* Form controls: cleaner “product UI” look */
input,
textarea,
select {
    border-color: var(--gt-border-strong);
    background: var(--gt-ivory);
}

input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 4px rgba(246, 210, 77, 0.22);
}

/* Buttons: flatten gradients + remove jumpy hover translate */
button,
.button-link {
    background: var(--gt-gold);
    border: 1px solid rgba(17, 17, 17, 0.12);
    box-shadow: 0 1px 2px rgba(17, 17, 17, 0.10);
    transform: none;
}

button:hover,
.button-link:hover {
    transform: none;
    filter: brightness(0.98);
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.12);
}

button:active,
.button-link:active {
    filter: brightness(0.96);
}

button.secondary,
.button-link.secondary {
    background: var(--gt-ivory);
    border-color: rgba(17, 17, 17, 0.16);
}

button.secondary:hover,
.button-link.secondary:hover {
    background: rgba(17, 17, 17, 0.03);
}

button:disabled,
.button-link:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
}

/* Phase nav: less “pill-y” to match modern app shells */
.phase-nav {
    border-radius: var(--gt-radius-lg);
    padding: 10px 12px;
}

/* Details sections: keep headers aligned with new surfaces */
.section-summary {
    background: rgba(255, 255, 255, 0.92);
}

.section-body {
    background: rgba(17, 17, 17, 0.02);
}

/* Tables */
.dashboard-table tbody tr:hover {
    background: rgba(17, 17, 17, 0.03);
}

/* ---------- CommandCenter dark theme ---------- */
body.theme-dark {
    --gt-black: #f8fafc;
    --gt-ink: #e2e8f0;
    --gt-gold: #facc15;
    --gt-gold-deep: #eab308;
    --gt-cream: #111827;
    --gt-ivory: #0f172a;
    --gt-sand: #0b1220;
    --gt-muted: rgba(148, 163, 184, 0.78);
    --gt-border: rgba(148, 163, 184, 0.18);
    --gt-border-strong: rgba(148, 163, 184, 0.32);
    --gt-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --gt-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --gt-accent: #2563eb;
    --gt-link: #93c5fd;
    --gt-link-strong: #60a5fa;

    background-color: #eef2f7;
    background-image:
        radial-gradient(circle at 20% -10%, rgba(250, 204, 21, 0.06), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.06), transparent 45%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--gt-ink);
}

/* Login page keeps the dark CommandCenter look */
body.login-page {
    background-color: #0b1220;
    background-image:
        radial-gradient(circle at 12% -10%, rgba(250, 204, 21, 0.12), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.12), transparent 45%),
        linear-gradient(180deg, #0f172a 0%, #0b1220 65%);
    color: #e2e8f0;
}

body.login-page .login-panel {
    background: transparent;
}

body.login-page .login-card {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
}

body.login-page .login-header h1 {
    color: #f8fafc;
}

body.login-page .login-header p {
    color: rgba(148, 163, 184, 0.75);
}

body.login-page label {
    color: rgba(148, 163, 184, 0.85);
}

body.login-page input,
body.login-page textarea,
body.login-page select {
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.25);
}

body.login-page input::placeholder,
body.login-page textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

body.login-page .login-logo {
    max-width: 220px;
}

body.theme-dark header {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--gt-border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

body.theme-dark header::after {
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.85), rgba(37, 99, 235, 0.35), transparent);
}

body.theme-dark header .brand-kicker {
    color: rgba(148, 163, 184, 0.7);
}

body.theme-dark header h1 {
    color: var(--gt-black);
}

body.theme-dark header nav a {
    color: var(--gt-muted);
    background: transparent;
    border-color: transparent;
}

body.theme-dark header nav a:hover {
    color: var(--gt-black);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dark header nav a.active {
    color: var(--gt-black);
    background: rgba(37, 99, 235, 0.24);
    border-color: rgba(37, 99, 235, 0.45);
}

body.theme-dark .status {
    color: var(--gt-muted);
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dark .card,
body.theme-dark .section-card,
body.theme-dark .queue-card,
body.theme-dark .action-item,
body.theme-dark .creative-panel,
body.theme-dark .collapsible-panel,
body.theme-dark .phase-panel {
    background: var(--gt-ivory);
    border-color: var(--gt-border);
    box-shadow: var(--gt-card-shadow);
}

body.theme-dark .summary-item,
body.theme-dark .hero-pill,
body.theme-dark .hero-chip {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--gt-ink);
}

body.theme-dark .section-summary {
    background: rgba(15, 23, 42, 0.86);
    border-bottom: 1px solid var(--gt-border);
}

body.theme-dark .section-body {
    background: rgba(15, 23, 42, 0.6);
}

body.theme-dark .section-status {
    background: rgba(15, 23, 42, 0.7);
    border-color: var(--gt-border);
    color: var(--gt-muted);
}

body.theme-dark .phase-nav {
    background: rgba(15, 23, 42, 0.92);
    border-color: var(--gt-border);
}

body.theme-dark .phase-tab {
    background: rgba(15, 23, 42, 0.72);
    color: var(--gt-ink);
    border-color: var(--gt-border);
}

body.theme-dark .phase-tab.active {
    background: var(--gt-accent);
    border-color: rgba(37, 99, 235, 0.6);
    color: #f8fafc;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    background: rgba(15, 23, 42, 0.9);
    color: var(--gt-black);
    border-color: var(--gt-border-strong);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

body.theme-dark input:focus,
body.theme-dark textarea:focus,
body.theme-dark select:focus {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

body.theme-dark button,
body.theme-dark .button-link {
    color: #111827;
    border-color: rgba(250, 204, 21, 0.6);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

body.theme-dark button.secondary,
body.theme-dark .button-link.secondary {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--gt-ink);
    box-shadow: none;
}

body.theme-dark button.secondary:hover,
body.theme-dark .button-link.secondary:hover {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.5);
    color: #f8fafc;
}

body.theme-dark .inline-link {
    color: var(--gt-link);
}

body.theme-dark .inline-link:hover {
    color: var(--gt-link-strong);
}

body.theme-dark .dashboard-table tbody tr:hover {
    background: rgba(148, 163, 184, 0.08);
}

body.theme-dark .toast {
    background: rgba(15, 23, 42, 0.98);
    border-color: var(--gt-border);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

body.theme-dark .toast-message {
    color: var(--gt-black);
}

body.theme-dark .toast-close {
    background: rgba(15, 23, 42, 0.9);
    border-color: var(--gt-border);
    color: var(--gt-muted);
}

/* ---------- Login page ---------- */
.login-page {
    min-height: 100vh;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.login-hero {
    position: relative;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    border-right: 1px solid var(--gt-border);
    color: var(--gt-black);
    background:
        radial-gradient(circle at 12% 0%, rgba(250, 204, 21, 0.18), transparent 55%),
        radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.18), transparent 45%),
        linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(8, 14, 27, 0.98));
}

.login-hero-content {
    max-width: 420px;
}

.login-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.login-hero-tag {
    margin: 24px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 12px;
    font-weight: 600;
    color: var(--gt-muted);
}

.login-hero-copy {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.8);
    margin: 0;
}

.login-hero-footer {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: rgba(148, 163, 184, 0.7);
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: rgba(8, 12, 22, 0.88);
}

.login-card {
    width: min(420px, 100%);
    background: var(--gt-ivory);
    border: 1px solid var(--gt-border);
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--gt-shadow);
}

.login-mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.login-mobile-tag {
    margin: 12px 0 0;
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gt-muted);
    font-weight: 600;
}

.login-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    color: var(--gt-black);
}

.login-header p {
    margin: 0 0 24px;
    color: var(--gt-muted);
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    font-size: 13px;
    color: var(--gt-muted);
}

.login-submit {
    margin-top: 10px;
    width: 100%;
}

.login-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: rgba(248, 113, 113, 0.95);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-hero {
        display: none !important;
    }

    .login-panel {
        padding: 36px 20px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .login-mobile-brand {
        display: block;
    }
}

@media (max-width: 980px) {
    body.login-page .login-panel {
        padding: 28px 18px;
    }

    body.login-page .login-card {
        padding: 26px 22px;
        box-shadow: none;
    }

    body.login-page .login-logo {
        height: 40px;
    }
}

/* ---------- Logged-in shell polish ---------- */
body.theme-dark .app-header {
    min-height: 56px;
    height: auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid var(--gt-border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body.theme-dark .app-header .header-top {
    align-items: center;
    width: 100%;
    gap: 24px;
}

body.theme-dark .brand {
    gap: 12px;
}

body.theme-dark .brand-link img {
    height: 30px;
}

body.theme-dark .brand-text {
    gap: 2px;
}

body.theme-dark .brand-kicker {
    font-size: 10px;
    letter-spacing: 0.24em;
    color: rgba(148, 163, 184, 0.7);
}

body.theme-dark .app-header h1 {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.92);
}

body.theme-dark nav {
    gap: 8px;
}

body.theme-dark nav a {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.78);
    background: transparent;
    border: 1px solid transparent;
    padding: 6px 12px;
}

body.theme-dark nav a.active {
    color: #f8fafc;
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(37, 99, 235, 0.5);
}

body.theme-dark main {
    padding: 28px 24px 60px;
}

body.theme-dark .card,
body.theme-dark .section-card,
body.theme-dark .queue-card,
body.theme-dark .action-item,
body.theme-dark .creative-panel,
body.theme-dark .collapsible-panel,
body.theme-dark .phase-panel {
    background: #f8fafc;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

body.theme-dark .summary-item,
body.theme-dark .hero-pill,
body.theme-dark .hero-chip {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

body.theme-dark .section-summary {
    background: #0f172a;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

body.theme-dark .section-body {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

body.theme-dark .section-status {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

body.theme-dark .section-toggle {
    color: #cbd5f5;
}

body.theme-dark .section-index {
    background: #facc15;
    color: #0f172a;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
}

body.theme-dark .preview-label {
    color: rgba(226, 232, 240, 0.7);
}

body.theme-dark .preview-value {
    color: #f8fafc;
}

body.theme-dark .section-summary .section-title {
    color: #f8fafc;
}

body.theme-dark .qual-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.theme-dark .seg-option span {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.theme-dark .seg-option input:checked + span {
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.22);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.22);
}

body.theme-dark .seg-option span:hover {
    border-color: #94a3b8;
}

/* Qualification cards: keep dark like CommandCenter */
body.theme-dark .qualification-grid .qual-card {
    background: #0f172a;
    border-color: #1e293b;
    color: #e2e8f0;
}

body.theme-dark .qualification-grid .qual-question {
    color: #f8fafc;
}

body.theme-dark .qualification-grid .seg-option span {
    background: #111827;
    border-color: #1f2937;
    color: #e2e8f0;
}

body.theme-dark .qualification-grid .seg-option input:checked + span {
    background: #facc15;
    border-color: #facc15;
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

body.theme-dark .qualification-grid .seg-option span:hover {
    border-color: #334155;
}

body.theme-dark .phase-nav {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

body.theme-dark .phase-tab {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}

body.theme-dark .phase-tab.active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

body.theme-dark .section-title {
    color: #0f172a;
    font-weight: 600;
}

body.theme-dark .subsection-title,
body.theme-dark .notice {
    color: rgba(15, 23, 42, 0.62);
}

body.theme-dark label {
    color: #475569;
    font-weight: 600;
}

body.theme-dark .subsection-title {
    color: #475569;
    font-weight: 700;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.2);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: #94a3b8;
}

body.theme-dark input:focus,
body.theme-dark textarea:focus,
body.theme-dark select:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

body.theme-dark .dashboard-table th {
    color: rgba(15, 23, 42, 0.6);
}

/* ---------- Compact density (CommandCenter-ish) ---------- */
body.theme-dark:not(.login-page) {
    font-size: 14.5px;
}

body.theme-dark:not(.login-page) .app-header {
    min-height: 56px;
    height: auto;
    padding: 8px 20px;
}

body.theme-dark:not(.login-page) nav a {
    padding: 4px 9px;
}

body.theme-dark:not(.login-page) main {
    padding: 22px 18px 48px;
}

body.theme-dark:not(.login-page) .card {
    padding: 18px;
}

body.theme-dark:not(.login-page) .section-summary {
    padding: 12px 14px;
}

body.theme-dark:not(.login-page) .section-body {
    padding: 12px 14px;
}

body.theme-dark:not(.login-page) input,
body.theme-dark:not(.login-page) textarea,
body.theme-dark:not(.login-page) select {
    padding: 9px 11px;
    font-size: 0.94em;
}

body.theme-dark:not(.login-page) button,
body.theme-dark:not(.login-page) .button-link {
    padding: 8px 12px;
    min-height: 38px;
}

body.theme-dark:not(.login-page) .phase-nav {
    padding: 7px 9px;
}

body.theme-dark:not(.login-page) .phase-tab {
    padding: 5px 10px;
    font-size: 11px;
}

body.theme-dark:not(.login-page) .qual-card {
    padding: 10px;
}

body.theme-dark:not(.login-page) .seg-option span {
    padding: 7px 9px;
}

/* Audience phase spacing + cleanliness */
body.theme-dark .phase[data-phase="audience"] {
    margin-top: 12px;
}

body.theme-dark .phase[data-phase="audience"] .form-grid {
    gap: 12px;
}

body.theme-dark .phase[data-phase="audience"] .form-grid.two-column-grid {
    gap: 12px;
}

body.theme-dark .phase[data-phase="audience"] .collapsible-panel {
    padding: 10px 12px;
}

body.theme-dark .phase[data-phase="audience"] .phase-panel {
    margin-top: 12px;
}

body.theme-dark .phase[data-phase="audience"] .phase-actions {
    margin-top: 14px;
}

/* Force dark qualification cards + buttons (final override) */
body.theme-dark .intake-form .qualification-grid .qual-card {
    background: #0f172a;
    border-color: #1e293b;
    color: #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}

body.theme-dark .intake-form .qualification-grid .qual-question {
    color: #f8fafc;
}

body.theme-dark .intake-form .qualification-grid .seg-option span {
    background: #111827;
    border-color: #1f2937;
    color: #e2e8f0;
}

body.theme-dark .intake-form .qualification-grid .seg-option span:hover {
    border-color: #334155;
}

body.theme-dark .intake-form .qualification-grid .seg-option input:checked + span {
    background: #facc15;
    border-color: #facc15;
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

/* Dashboard spacing + table density */
body.theme-dark .dashboard-section {
    margin-top: 16px;
}

body.theme-dark .queue-card {
    padding: 12px;
}

body.theme-dark .queue-item {
    gap: 4px;
    padding: 10px 0;
}

body.theme-dark .queue-meta {
    font-size: 12px;
    color: #64748b;
}

body.theme-dark .card.table-scroll {
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

body.theme-dark .dashboard-table {
    font-size: 13px;
}

body.theme-dark .dashboard-table th {
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    letter-spacing: 0.12em;
}

body.theme-dark .dashboard-table td {
    padding: 12px;
    border-bottom: 1px solid #eef2f7;
}

body.theme-dark .dashboard-table tbody tr:hover {
    background: #f1f5f9;
}

/* ---------- Crisp cleanup override ---------- */
body.theme-dark {
    -webkit-font-smoothing: antialiased;
    text-rendering: auto;
}

body.theme-dark .card,
body.theme-dark .section-card,
body.theme-dark .queue-card,
body.theme-dark .action-item,
body.theme-dark .creative-panel,
body.theme-dark .collapsible-panel,
body.theme-dark .phase-panel {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

body.theme-dark .summary-item,
body.theme-dark .hero-pill,
body.theme-dark .hero-chip {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.theme-dark .section-body {
    background: #ffffff;
}

body.theme-dark .phase-nav {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: none;
}

body.theme-dark .phase-tab {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

body.theme-dark .phase-tab.active {
    box-shadow: none;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    border-color: #cbd5e1;
    box-shadow: none;
}

body.theme-dark button,
body.theme-dark .button-link {
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

body.theme-dark button.secondary,
body.theme-dark .button-link.secondary {
    box-shadow: none;
}

/* ---------- Mobile optimization ---------- */
@media (max-width: 820px) {
    body.theme-dark:not(.login-page) .app-header {
        height: auto;
        padding: 10px 14px;
    }

    body.theme-dark:not(.login-page) .app-header .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    body.theme-dark:not(.login-page) .brand-text {
        display: none;
    }

    body.theme-dark:not(.login-page) nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }

    body.theme-dark:not(.login-page) nav a {
        font-size: 10px;
        letter-spacing: 0.12em;
        padding: 4px 8px;
    }

    body.theme-dark .status {
        margin-left: 0;
    }

    body.theme-dark:not(.login-page) main {
        padding: 16px 12px 32px;
    }

    body.theme-dark .card,
    body.theme-dark .section-card,
    body.theme-dark .queue-card,
    body.theme-dark .action-item,
    body.theme-dark .creative-panel,
    body.theme-dark .collapsible-panel,
    body.theme-dark .phase-panel {
        border-radius: 14px;
    }

    body.theme-dark .section-summary {
        padding: 12px 14px;
        gap: 8px;
    }

    body.theme-dark .section-summary-main {
        width: 100%;
    }

    body.theme-dark .section-status {
        margin-left: 0;
    }

    body.theme-dark .section-preview {
        grid-template-columns: 1fr;
    }

    body.theme-dark .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    body.theme-dark .form-actions button {
        width: 100%;
    }

    body.theme-dark .phase-nav {
        position: static;
        padding: 6px;
        flex-wrap: wrap;
        border-radius: 12px;
    }

    body.theme-dark .phase-tab {
        flex: 1 1 120px;
        text-align: center;
    }

    body.theme-dark .qualification-grid {
        gap: 10px;
    }

    body.theme-dark .summary-grid {
        grid-template-columns: 1fr;
    }

    body.theme-dark .action-grid {
        grid-template-columns: 1fr;
    }

    body.theme-dark .button-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body.theme-dark .dashboard-table th,
    body.theme-dark .dashboard-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    body.theme-dark .queue-card {
        padding: 10px;
    }

    body.theme-dark .queue-item {
        padding: 8px 0;
    }

    body.theme-dark .dashboard-table td form {
        gap: 8px;
    }

    body.theme-dark .dashboard-table td form select,
    body.theme-dark .dashboard-table td form button {
        min-height: 34px;
        font-size: 12px;
    }
}

/* ---------- Typography + reassign cleanup ---------- */
body.theme-dark .section-title,
body.theme-dark .phase-title,
body.theme-dark .qual-question,
body.theme-dark label,
body.theme-dark .dashboard-table th {
    letter-spacing: 0;
}

body.theme-dark .detail-label {
    color: #475569;
}

body.theme-dark .detail-value {
    color: #0f172a;
    font-weight: 600;
}

/* Card headers like intake */
body.theme-dark .card--header {
    padding: 16px;
}

body.theme-dark .card--header > .section-title {
    margin: -16px -16px 16px;
    padding: 12px 16px;
    background: #0f172a;
    color: #f8fafc;
    border-bottom: 1px solid #1e293b;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

body.theme-dark .card--header > .section-title + * {
    margin-top: 0;
}

/* Pitch builder alignment with intake styling */
body.theme-dark #pitch-form {
    background: #ffffff;
}

body.theme-dark #pitch-form .phase-nav {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px;
    border-radius: 12px;
}

body.theme-dark #pitch-form .phase-tab {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
    font-weight: 600;
}

body.theme-dark #pitch-form .phase-tab.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

body.theme-dark #pitch-form .phase {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 16px;
    margin-top: 16px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

body.theme-dark #pitch-form .phase-title {
    margin: -16px -16px 14px;
    padding: 12px 16px;
    background: #0f172a;
    color: #f8fafc;
    border-bottom: 1px solid #1e293b;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

body.theme-dark #pitch-form .form-grid {
    gap: 12px;
}

body.theme-dark #pitch-form .form-grid + .form-grid.two-column-grid {
    margin-top: 12px;
}

body.theme-dark #pitch-form .form-grid + .phase-panel {
    margin-top: 12px;
}

body.theme-dark #pitch-form .creative-panel,
body.theme-dark #pitch-form .collapsible-panel {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.theme-dark #pitch-form .creative-panel summary,
body.theme-dark #pitch-form .collapsible-panel summary {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 12px;
}

body.theme-dark #pitch-form .phase-panel {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.theme-dark .success-overview .notice {
    color: #475569;
}

body.theme-dark .dashboard-table th {
    font-size: 12px;
    font-weight: 600;
}

body.theme-dark .dashboard-table td {
    font-size: 13px;
    line-height: 1.35;
    vertical-align: middle;
}

body.theme-dark .dashboard-table td form {
    display: grid;
    gap: 6px;
}

body.theme-dark .dashboard-table td form select,
body.theme-dark .dashboard-table td form button {
    width: 100%;
    min-height: 32px;
    font-size: 12px;
    padding: 6px 10px;
}
