/* ── Brief — Campaign Brief Generator ───────────────────────────────────────
   Self-contained. Accent: #14b8a6 (teal)
   ────────────────────────────────────────────────────────────────────────── */

/* ── Page shell ─────────────────────────────────────────────────────────── */
.brief-page {
    background: #001512;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    margin-bottom: -96px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.brief-header {
    background: linear-gradient(140deg, #001512 0%, #001f1b 55%, #001a16 100%);
    border-bottom: 1px solid rgba(20, 184, 166, 0.18);
    position: relative;
    margin: -60px 0 -110px 0;
}

.brief-header .back-to-store-btn {
    display: inline-flex !important;
    width: auto;
    align-self: flex-start;
}

.brief-header::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -120px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.08) 0%, transparent 65%);
    pointer-events: none;
}

.brief-header__body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.brief-header__badge {
    display: inline-flex;
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
    border: 1px solid rgba(20, 184, 166, 0.30);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 12px;
    margin-bottom: 10px;
}

.brief-header__title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.brief-header__subtitle {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.50);
    margin: 0;
    max-width: 560px;
    line-height: 1.6;
}

.brief-header__chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.brief-chip {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.70);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
}

.brief-chip--goal {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.28);
    color: #14b8a6;
}

.brief-chip--platform {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.65);
}

.brief-chip--ai {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.28);
    color: #a78bfa;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.brief-body {
    padding: 80px 0 80px;
}

/* ── Form grid ──────────────────────────────────────────────────────────── */
.brief-form-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

.brief-col {
    display: flex;
    flex-direction: column;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.brief-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.brief-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.brief-step {
    font-size: 0.68rem;
    font-weight: 800;
    color: #14b8a6;
    letter-spacing: 0.10em;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.25);
    border-radius: 6px;
    padding: 3px 8px;
}

.brief-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* ── Fields ─────────────────────────────────────────────────────────────── */
.brief-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.brief-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: #fff;
    font-size: 0.88rem;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.18s;
    width: 100%;
    box-sizing: border-box;
}

.brief-input::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.brief-input:focus {
    border-color: rgba(20, 184, 166, 0.50);
}

.brief-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: #fff;
    font-size: 0.88rem;
    padding: 10px 14px;
    outline: none;
    resize: vertical;
    transition: border-color 0.18s;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.55;
}

.brief-textarea::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.brief-textarea:focus {
    border-color: rgba(20, 184, 166, 0.50);
}

/* ── Labels ─────────────────────────────────────────────────────────────── */
.brief-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

/* ── Pills ──────────────────────────────────────────────────────────────── */
.brief-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.brief-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.50);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 16px;
    cursor: pointer;
    transition: all 0.15s;
}

.brief-pill:hover {
    background: rgba(20, 184, 166, 0.09);
    border-color: rgba(20, 184, 166, 0.28);
    color: #14b8a6;
}

.brief-pill.active {
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(20, 184, 166, 0.48);
    color: #14b8a6;
    font-weight: 700;
}

/* ── Generate button ────────────────────────────────────────────────────── */
.brief-generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.15s;
    letter-spacing: 0.01em;
}

.brief-generate-btn:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
}

.brief-generate-btn:disabled {
    opacity: 0.50;
    cursor: not-allowed;
}

.brief-generate-btn--loading {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
}

/* ── Error ──────────────────────────────────────────────────────────────── */
.brief-error {
    color: #f87171;
    font-size: 0.84rem;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.20);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 4px;
}

/* ── Results ────────────────────────────────────────────────────────────── */
.brief-results {
    margin-top: 52px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.brief-results__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.brief-results__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
}

.brief-results__sub {
    font-size: 0.87rem;
    color: rgba(255, 255, 255, 0.38);
    margin: 0;
}

.brief-results__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brief-copy-all-btn {
    background: rgba(20, 184, 166, 0.14);
    border: 1px solid rgba(20, 184, 166, 0.35);
    color: #14b8a6;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 9px 20px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.brief-copy-all-btn:hover,
.brief-copy-all-btn.copied {
    background: rgba(20, 184, 166, 0.22);
    border-color: rgba(20, 184, 166, 0.55);
}

.brief-regen-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.44);
    border-radius: 10px;
    padding: 9px 20px;
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.brief-regen-btn:hover:not(:disabled) {
    border-color: rgba(20, 184, 166, 0.32);
    color: #14b8a6;
}

/* ── Sections grid ──────────────────────────────────────────────────────── */
.brief-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.brief-section-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.20s;
}

.brief-section-card:hover {
    border-color: rgba(20, 184, 166, 0.22);
}

.brief-section-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.brief-section-card__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #14b8a6;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.brief-section-icon {
    width: 26px;
    height: 26px;
    background: rgba(20, 184, 166, 0.12);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.brief-copy-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.brief-copy-btn:hover,
.brief-copy-btn.copied {
    background: rgba(20, 184, 166, 0.13);
    border-color: rgba(20, 184, 166, 0.32);
    color: #14b8a6;
}

.brief-section-card__body {
    font-size: 0.865rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.72;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .brief-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .brief-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .brief-row {
        grid-template-columns: 1fr;
    }
    .brief-header__body {
        flex-direction: column;
        align-items: flex-start;
    }
    .brief-results__head {
        flex-direction: column;
    }
    .brief-results__actions {
        width: 100%;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   Light mode
   ══════════════════════════════════════════════════════════════════════════ */
html[data-theme="light"] .brief-page { background: #f0fdfa; }
html[data-theme="light"] .brief-page .brief-header {
    background: linear-gradient(140deg, #ccfbf1 0%, #99f6e4 55%, #ccfbf1 100%);
    border-bottom-color: rgba(20, 184, 166, 0.35);
}
html[data-theme="light"] .brief-page .brief-header__badge {
    color: #0d9488;
    background: rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.35);
}
html[data-theme="light"] .brief-page .brief-header__title    { color: #134e4a; }
html[data-theme="light"] .brief-page .brief-header__subtitle { color: rgba(19, 78, 74, 0.65); }
html[data-theme="light"] .brief-page .brief-chip             { color: #0d9488; border-color: rgba(20, 184, 166, 0.30); background: rgba(20, 184, 166, 0.10); }

html[data-theme="light"] .brief-page .brief-card             { background: #fff; border-color: rgba(20, 184, 166, 0.18); }
html[data-theme="light"] .brief-page .brief-card__title      { color: #134e4a; }
html[data-theme="light"] .brief-page .brief-label            { color: #0f766e; }

html[data-theme="light"] .brief-page .brief-input {
    background: #f0fdfa; color: #134e4a; border-color: rgba(20, 184, 166, 0.28);
}
html[data-theme="light"] .brief-page .brief-input::placeholder { color: rgba(19, 78, 74, 0.38); }
html[data-theme="light"] .brief-page .brief-input:focus        { border-color: rgba(20, 184, 166, 0.60); }

html[data-theme="light"] .brief-page .brief-textarea {
    background: #f0fdfa; color: #134e4a; border-color: rgba(20, 184, 166, 0.28);
}
html[data-theme="light"] .brief-page .brief-textarea::placeholder { color: rgba(19, 78, 74, 0.38); }
html[data-theme="light"] .brief-page .brief-textarea:focus        { border-color: rgba(20, 184, 166, 0.60); }

html[data-theme="light"] .brief-page .brief-pill       { background: rgba(20, 184, 166, 0.08); border-color: rgba(20, 184, 166, 0.25); color: #0f766e; }
html[data-theme="light"] .brief-page .brief-pill:hover { background: rgba(20, 184, 166, 0.15); color: #0d9488; }
html[data-theme="light"] .brief-page .brief-pill.active { background: rgba(20, 184, 166, 0.20); border-color: rgba(20, 184, 166, 0.55); color: #0d9488; }

html[data-theme="light"] .brief-page .brief-results { border-top-color: rgba(20, 184, 166, 0.20); }
html[data-theme="light"] .brief-page .brief-results__title { color: #134e4a; }
html[data-theme="light"] .brief-page .brief-results__sub   { color: rgba(19, 78, 74, 0.55); }

html[data-theme="light"] .brief-page .brief-section-card {
    background: #fff; border-color: rgba(20, 184, 166, 0.18);
}
html[data-theme="light"] .brief-page .brief-section-card:hover { border-color: rgba(20, 184, 166, 0.38); }
html[data-theme="light"] .brief-page .brief-section-card__body { color: #1c4b47; }
html[data-theme="light"] .brief-page .brief-section-card__label { color: #0d9488; }
html[data-theme="light"] .brief-page .brief-section-icon { background: rgba(20, 184, 166, 0.12); }

html[data-theme="light"] .brief-page .brief-copy-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.10); color: #6b7280; }
html[data-theme="light"] .brief-page .brief-copy-btn:hover,
html[data-theme="light"] .brief-page .brief-copy-btn.copied { background: rgba(20, 184, 166, 0.10); border-color: rgba(20, 184, 166, 0.35); color: #0d9488; }

html[data-theme="light"] .brief-page .brief-copy-all-btn { background: rgba(20, 184, 166, 0.12); border-color: rgba(20, 184, 166, 0.30); color: #0d9488; }
html[data-theme="light"] .brief-page .brief-regen-btn { border-color: rgba(20, 184, 166, 0.25); color: #6b7280; }
html[data-theme="light"] .brief-page .brief-regen-btn:hover { border-color: rgba(20, 184, 166, 0.50); color: #0d9488; }

/* ══════════════════════════════════════════════════════════════════════════
   How It Works — button + modal
   ══════════════════════════════════════════════════════════════════════════ */
.brief-hiw-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.50);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.brief-hiw-btn:hover {
    background: rgba(20, 184, 166, 0.14);
    color: #14b8a6;
    border-color: rgba(20, 184, 166, 0.35);
}

.brief-hiw-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 18, 15, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: brief-backdrop-in 0.18s ease;
}
@keyframes brief-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.brief-hiw-modal {
    position: relative;
    background: #001512;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 20px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.70), 0 0 0 1px rgba(20, 184, 166, 0.08);
    animation: brief-modal-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(20, 184, 166, 0.20) transparent;
}
.brief-hiw-modal::-webkit-scrollbar       { width: 5px; }
.brief-hiw-modal::-webkit-scrollbar-thumb { background: rgba(20, 184, 166, 0.20); border-radius: 99px; }

@keyframes brief-modal-in {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.brief-hiw-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.brief-hiw-modal__close:hover { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.30); }

.brief-hiw-modal__header { margin-bottom: 28px; padding-right: 40px; }

.brief-hiw-modal__eyebrow {
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #14b8a6;
    margin: 0 0 8px;
}

.brief-hiw-modal__title {
    font-size: 1.50rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.brief-hiw-modal__subtitle {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.50);
    margin: 0;
    line-height: 1.6;
}

.brief-hiw-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px 0;
}
.brief-hiw-section:first-of-type { border-top: none; }

.brief-hiw-section__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.brief-hiw-section__icon {
    font-size: 1.15rem;
    width: 34px;
    height: 34px;
    background: rgba(20, 184, 166, 0.10);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brief-hiw-section__title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.brief-hiw-section__body {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    margin: 0 0 10px;
}
.brief-hiw-section__body:last-child { margin-bottom: 0; }
.brief-hiw-section__body strong { color: rgba(255, 255, 255, 0.85); font-weight: 600; }
.brief-hiw-section__body em     { color: #5eead4; font-style: normal; }

.brief-hiw-passes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.brief-hiw-pass {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px;
}

.brief-hiw-pass__num {
    min-width: 32px;
    height: 32px;
    background: rgba(20, 184, 166, 0.15);
    border: 1px solid rgba(20, 184, 166, 0.30);
    border-radius: 50%;
    color: #14b8a6;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 4px;
}

.brief-hiw-pass__content { flex: 1; min-width: 0; }

.brief-hiw-pass__title {
    font-size: 0.83rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.80);
    margin: 0 0 4px;
}

.brief-hiw-pass__desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    margin: 0;
}

/* ── HIW light mode ──────────────────────────────────────────────────────── */
html[data-theme="light"] .brief-page .brief-hiw-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); color: #0d9488; }
html[data-theme="light"] .brief-page .brief-hiw-btn:hover { background: rgba(20,184,166,0.10); color: #0d9488; border-color: rgba(20,184,166,0.35); }

html[data-theme="light"] .brief-page .brief-hiw-modal { background: #fff; border-color: rgba(20,184,166,0.28); box-shadow: 0 32px 100px rgba(0,0,0,0.12); }
html[data-theme="light"] .brief-page .brief-hiw-modal__close { background: rgba(0,0,0,0.04); border-color: #e7e5e4; color: #78716c; }
html[data-theme="light"] .brief-page .brief-hiw-modal__eyebrow { color: #0d9488; }
html[data-theme="light"] .brief-page .brief-hiw-modal__title { color: #134e4a; }
html[data-theme="light"] .brief-page .brief-hiw-modal__subtitle { color: #4b5563; }
html[data-theme="light"] .brief-page .brief-hiw-section { border-top-color: #f0ede8; }
html[data-theme="light"] .brief-page .brief-hiw-section__icon { background: rgba(20,184,166,0.10); }
html[data-theme="light"] .brief-page .brief-hiw-section__title { color: #134e4a; }
html[data-theme="light"] .brief-page .brief-hiw-section__body { color: #374151; }
html[data-theme="light"] .brief-page .brief-hiw-section__body strong { color: #134e4a; }
html[data-theme="light"] .brief-page .brief-hiw-section__body em { color: #0d9488; }
html[data-theme="light"] .brief-page .brief-hiw-pass { background: #f9fafb; border-color: #e7e5e4; }
html[data-theme="light"] .brief-page .brief-hiw-pass__title { color: #1c1917; }
html[data-theme="light"] .brief-page .brief-hiw-pass__desc { color: #6b7280; }
