/*!
 * CLIEAIR — Evidence Vault Extras CSS
 * Layer-2 additions: sourced banner, supremacy chips, RAG search, export bar.
 *
 * Tokens (from clieair-design-system.css):
 *   --clieair-navy: #0d1b2a
 *   --clieair-gold: #c9a227
 *   --clieair-font-serif (Cormorant Garamond)
 *   --clieair-font-sans  (Source Sans Pro)
 *
 * Auxiliary tokens used here:
 *   slate-800   #1a2738
 *   slate-700   #2a3447
 *   slate-600   #3a4458
 *   parchment   #f0e6d2
 *   mid-warm    #d8d0c0
 *   gold-soft   #b8a878
 *   gold-pale   #e8c97a
 *   amber       #d4a04a
 *   red-deep    #8b1e1e
 *   slate-mute  #8a9bb0
 *
 * All body text meets WCAG AA against navy bg.
 */

/* ------------------------------------------------------------------ */
/* BANNER — "You're not imagining this."                              */
/* ------------------------------------------------------------------ */

.banner-sourced {
    margin: 0 0 2rem 0;
    background: rgba(13, 27, 42, 0.92);
    border-left: 4px solid #c9a227;
    border-radius: 8px;
    padding: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: #f0e6d2;
    overflow: hidden;
}
.banner-sourced[hidden] { display: none !important; }

.banner-sourced__inner {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 640px) {
    .banner-sourced__inner { padding: 16px; }
}

.banner-sourced__headline {
    font-family: var(--clieair-font-serif, "Cormorant Garamond", serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: #f0e6d2;
    margin: 0;
    line-height: 1.2;
}

.banner-sourced__body {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #d8d0c0;
    margin: 0;
}

.banner-sourced__crisis {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e8c97a;
    margin: 0;
}

.banner-sourced__988 {
    color: #f0e6d2;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.banner-sourced__988:hover,
.banner-sourced__988:focus {
    color: #fff;
    outline: 2px solid #c9a227;
    outline-offset: 3px;
    border-radius: 2px;
}

.banner-sourced__more {
    color: #e8c97a;
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-left: 4px;
}

.banner-sourced__toggle {
    background: transparent;
    border: 0;
    padding: 6px 0;
    color: #b8a878;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-align: left;
    cursor: pointer;
    align-self: flex-start;
    font-family: inherit;
}
.banner-sourced__toggle:hover,
.banner-sourced__toggle:focus {
    color: #e8c97a;
    outline: 2px solid #c9a227;
    outline-offset: 3px;
    border-radius: 2px;
}

.banner-sourced__toggle-chev {
    display: inline-block;
    transition: transform 200ms ease-out;
}

.banner-sources-list {
    background: #1a2738;
    padding: 16px;
    border-radius: 6px;
    margin-top: 8px;
    animation: bannerSourcesIn 250ms ease-out;
}
.banner-sources-list[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    .banner-sources-list { animation: none; }
    .banner-sourced__toggle-chev { transition: none; }
}

@keyframes bannerSourcesIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.banner-sources-list__items {
    padding-left: 1.5em;
    margin: 0 0 12px 0;
}

.banner-sources-list__items li {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #d8d0c0;
    margin-bottom: 4px;
}

.banner-sources-list__items a {
    color: #e8c97a;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}
.banner-sources-list__items a:hover,
.banner-sources-list__items a:focus {
    color: #fff;
    outline: 2px solid #c9a227;
    outline-offset: 2px;
    border-radius: 2px;
}

.banner-sources-list__closing {
    font-style: italic;
    font-size: 0.8rem;
    color: #8a9bb0;
    margin: 8px 0 0 0;
    line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* SUPREMACY CHIPS                                                    */
/* ------------------------------------------------------------------ */

.supremacy-chip-host {
    display: block;
    margin: 0.75rem 0;
}

.supremacy-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-family: var(--clieair-font-sans, "Source Sans Pro", sans-serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}
.supremacy-chip:hover,
.supremacy-chip:focus {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .supremacy-chip { transition: none; }
}

.supremacy-chip__icon {
    font-size: 14px;
    line-height: 1;
}

.supremacy-chip__label {
    line-height: 1;
}

/* State variants */
.supremacy-chip--red {
    background: linear-gradient(135deg, #8b1e1e 0%, #c9a227 100%);
    border-color: #c9a227;
    color: #fff;
}

.supremacy-chip--gold {
    background: #1a2738;
    border: 2px solid #c9a227;
    color: #f0e6d2;
}

.supremacy-chip--amber {
    background: #2a2418;
    border: 2px solid #d4a04a;
    color: #f0e6d2;
}

.supremacy-chip--slate {
    background: #2a3447;
    border: 1px solid #8a9bb0;
    color: #d8d0c0;
}

.supremacy-chip__subline {
    font-size: 0.8rem;
    color: #d8d0c0;
    font-weight: 400;
    margin: 6px 0 0 0;
    line-height: 1.5;
}

/* For pages with light card backgrounds, soften the subline */
.ev-page .supremacy-chip__subline {
    color: rgba(13, 27, 42, 0.78);
}

.supremacy-chip__expand-trigger {
    display: inline-block;
    background: transparent;
    border: 0;
    padding: 4px 0;
    color: #c9a227;
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 4px;
}
.supremacy-chip__expand-trigger:hover,
.supremacy-chip__expand-trigger:focus {
    color: #b8a878;
    outline: 2px solid #c9a227;
    outline-offset: 2px;
    border-radius: 2px;
}

.supremacy-chip-expand {
    background: #0a1420;
    padding: 16px;
    border-top: 1px solid #c9a227;
    border-radius: 0 0 6px 6px;
    margin-top: 12px;
    animation: chipExpandIn 250ms ease-out;
    color: #d8d0c0;
}
.supremacy-chip-expand[hidden] { display: none; }

.supremacy-chip--amber + .supremacy-chip__subline + .supremacy-chip__expand-trigger + .supremacy-chip-expand,
.supremacy-chip--amber ~ .supremacy-chip-expand { border-top-color: #d4a04a; }
.supremacy-chip--slate ~ .supremacy-chip-expand { border-top-color: #8a9bb0; }

@media (prefers-reduced-motion: reduce) {
    .supremacy-chip-expand { animation: none; }
}

@keyframes chipExpandIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.supremacy-chip-expand:focus {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

.supremacy-chip-expand__hdr {
    font-family: var(--clieair-font-sans, sans-serif);
    font-size: 0.8rem;
    font-weight: 700;
    color: #c9a227;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6px 0;
}

.supremacy-chip-expand__hdr + .supremacy-chip-expand__p {
    margin-top: 0;
}

.supremacy-chip-expand__p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #d8d0c0;
    margin: 0 0 14px 0;
}

.supremacy-chip-expand__footer {
    font-size: 0.7rem;
    font-style: italic;
    color: #8a9bb0;
    padding-top: 12px;
    border-top: 1px dotted #3a4458;
    margin: 12px 0 0 0;
    line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* RAG SEARCH                                                         */
/* ------------------------------------------------------------------ */

.rag-search__host {
    margin: 1.5rem 0;
}

.rag-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 880px;
    height: 56px;
    background: #1a2738;
    border: 1px solid #2a3447;
    border-radius: 12px;
    padding: 0 16px;
    transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.rag-search-bar:focus-within {
    border-color: #c9a227;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}
@media (prefers-reduced-motion: reduce) {
    .rag-search-bar { transition: none; }
}

.rag-search-bar__icon {
    font-size: 20px;
    color: #c9a227;
    line-height: 1;
    flex-shrink: 0;
}

.rag-search-bar__input {
    flex: 1;
    background: transparent;
    border: 0;
    color: #f0e6d2;
    font-size: 16px;
    font-family: var(--clieair-font-sans, sans-serif);
    outline: none;
    padding: 0;
    line-height: 1.2;
    min-width: 0;
}
.rag-search-bar__input::placeholder {
    color: #8a9bb0;
    opacity: 1;
}

.rag-search-bar__kbd {
    font-size: 11px;
    color: #6a7488;
    background: #0d1b2a;
    border: 1px solid #2a3447;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (max-width: 640px) {
    .rag-search-bar__kbd { display: none; }
}

.rag-search-bar__clear {
    background: transparent;
    border: 0;
    color: #8a9bb0;
    font-size: 20px;
    line-height: 1;
    padding: 0 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.rag-search-bar__clear:hover,
.rag-search-bar__clear:focus {
    color: #f0e6d2;
    outline: 2px solid #c9a227;
    outline-offset: 2px;
    border-radius: 2px;
}

.rag-results {
    background: #0d1b2a;
    border-radius: 12px;
    margin-top: 12px;
    padding: 16px;
    max-width: 880px;
    border: 1px solid #2a3447;
}
.rag-results[hidden] { display: none; }

.rag-results__hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #8a9bb0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a3447;
}

.rag-results__hdr--soft {
    color: #d8d0c0;
}

.rag-results__clear-link {
    background: transparent;
    border: 0;
    color: #c9a227;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    font-family: inherit;
}
.rag-results__clear-link:hover,
.rag-results__clear-link:focus {
    color: #e8c97a;
    outline: 2px solid #c9a227;
    outline-offset: 2px;
    border-radius: 2px;
}

.rag-results__section {
    margin-top: 12px;
}

.rag-results__section-hdr {
    font-family: var(--clieair-font-sans, sans-serif);
    font-size: 12px;
    font-weight: 700;
    color: #c9a227;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px 0;
}

.rag-result-card {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 14px;
    background: #1a2738;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 8px;
    transition: background-color 120ms ease-out;
}
.rag-result-card:hover {
    background: #1f2d40;
}
@media (prefers-reduced-motion: reduce) {
    .rag-result-card { transition: none; }
}

.rag-result-card--skel {
    height: 96px;
    background: #1a2738;
    position: relative;
    overflow: hidden;
}
.rag-result-card--skel::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.08), transparent);
    animation: ragShimmer 1.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .rag-result-card--skel::after { animation: none; background: rgba(201, 162, 39, 0.04); }
}
@keyframes ragShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@media (max-width: 600px) {
    .rag-result-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.rag-result-card__icon-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.rag-result-card__icon {
    font-size: 32px;
    line-height: 1;
}

.rag-result-card__date {
    font-size: 10px;
    color: #6a7488;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.rag-result-card__content {
    min-width: 0;
}

.rag-result-card__title {
    font-size: 15px;
    font-weight: 500;
    color: #f0e6d2;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.rag-result-card__meta {
    font-size: 13px;
    color: #b8a878;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.rag-result-card__excerpt {
    font-size: 13px;
    color: #d8d0c0;
    margin: 0 0 8px 0;
    line-height: 1.5;
    word-break: break-word;
}

.rag-result-card__excerpt mark {
    background: rgba(201, 162, 39, 0.30);
    color: inherit;
    padding: 1px 2px;
    border-radius: 2px;
}

.rag-result-card__confidence {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rag-result-card__bar {
    flex: 1;
    background: #0d1b2a;
    border-radius: 999px;
    height: 4px;
    overflow: hidden;
    max-width: 160px;
}

.rag-result-card__bar-fill {
    background: #c9a227;
    height: 100%;
}

.rag-result-card__conf-label {
    font-size: 11px;
    color: #8a9bb0;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.rag-result-card__actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    align-items: stretch;
    min-width: 132px;
}

@media (max-width: 600px) {
    .rag-result-card__actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 0;
    }
}

.rag-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid transparent;
    line-height: 1;
}
.rag-action:focus {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

.rag-action--primary {
    background: #c9a227;
    color: #0d1b2a;
}
.rag-action--primary:hover { background: #e8c97a; }

.rag-action--secondary {
    background: transparent;
    color: #c9a227;
    border: 1px solid #c9a227;
}
.rag-action--secondary:hover { background: rgba(201, 162, 39, 0.1); }

.rag-action--active {
    background: rgba(201, 162, 39, 0.2);
}

.rag-action--tertiary {
    background: transparent;
    color: #c9a227;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rag-result-slim {
    background: #1a2738;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 6px;
}

.rag-result-slim__title {
    font-size: 13px;
    font-weight: 600;
    color: #f0e6d2;
    margin: 0;
}

.rag-result-slim__meta {
    font-size: 12px;
    color: #8a9bb0;
    margin: 4px 0 0 0;
}

.rag-results__empty {
    background: #1a2738;
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
}

.rag-results__empty-icon {
    font-size: 32px;
    color: #3a4458;
    line-height: 1;
    margin-bottom: 8px;
}

.rag-results__empty-headline {
    font-family: var(--clieair-font-serif, "Cormorant Garamond", serif);
    font-size: 1.1rem;
    color: #f0e6d2;
    margin: 0 0 6px 0;
}

.rag-results__empty-body {
    font-size: 13px;
    color: #d8d0c0;
    margin: 0 auto 12px auto;
    max-width: 48ch;
    line-height: 1.5;
}

.rag-results__empty-chips {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.rag-results__chip {
    background: #2a3447;
    border: 0;
    color: #f0e6d2;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}
.rag-results__chip:hover,
.rag-results__chip:focus {
    background: #3a4458;
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

.rag-results__error {
    font-size: 13px;
    color: #d4a04a;
    margin: 8px 0 0 0;
    line-height: 1.5;
}

.rag-results__privacy {
    font-size: 11px;
    font-style: italic;
    color: #6a7488;
    margin: 12px 0 0 0;
    line-height: 1.5;
    text-align: center;
}

/* ------------------------------------------------------------------ */
/* EXPORT BAR                                                         */
/* ------------------------------------------------------------------ */

.export-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    background: #0a1420;
    border-top: 2px solid #c9a227;
    margin-top: 2rem;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .export-bar {
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }
}

.export-tile {
    background: #1a2738;
    border: 1px solid #2a3447;
    border-radius: 12px;
    color: #f0e6d2;
    width: 144px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: background-color 120ms ease-out, border-color 120ms ease-out;
    font-family: inherit;
}
@media (prefers-reduced-motion: reduce) {
    .export-tile { transition: none; }
}
@media (max-width: 600px) {
    .export-tile {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 20px;
        gap: 12px;
        height: 64px;
    }
}

.export-tile:hover {
    background: #1f2d40;
    border-color: #c9a227;
}
.export-tile:focus {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

.export-tile__icon {
    font-size: 28px;
    line-height: 1;
}

.export-tile__label {
    font-size: 12px;
    font-weight: 500;
    color: #f0e6d2;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .export-tile__label { font-size: 14px; }
}

/* ------------------------------------------------------------------ */
/* EXPORT MODAL                                                       */
/* ------------------------------------------------------------------ */

.export-modal__scrim {
    position: fixed;
    inset: 0;
    background: rgba(5, 12, 22, 0.78);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
    animation: scrimIn 200ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .export-modal__scrim { animation: none; }
}
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }

.export-modal {
    background: #0d1b2a;
    border: 1px solid #c9a227;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #f0e6d2;
    animation: modalSlideUp 220ms ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.export-modal:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
    .export-modal { animation: none; }
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.export-modal__hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2a3447;
}

.export-modal__title {
    font-family: var(--clieair-font-serif, "Cormorant Garamond", serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: #f0e6d2;
    margin: 0;
}

.export-modal__close {
    background: transparent;
    border: 0;
    color: #8a9bb0;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 8px;
}
.export-modal__close:hover,
.export-modal__close:focus {
    color: #f0e6d2;
    outline: 2px solid #c9a227;
    outline-offset: 2px;
    border-radius: 4px;
}

.export-modal__body {
    padding: 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.export-modal__framing {
    font-size: 13px;
    color: #b8a878;
    margin: 0 0 16px 0;
    line-height: 1.5;
    font-style: italic;
}

.export-modal__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.export-modal__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #2a3447;
}

@media (max-width: 480px) {
    .export-modal__actions { flex-direction: column-reverse; }
    .export-modal__actions .ev-btn { width: 100%; }
}

.export-modal__primary { min-width: 140px; }

/* ------------------------------------------------------------------ */
/* EXPORT FIELDS                                                      */
/* ------------------------------------------------------------------ */

.export-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 0;
    padding: 0;
    margin: 0;
}

.export-field__label {
    font-size: 13px;
    font-weight: 600;
    color: #f0e6d2;
    letter-spacing: 0.02em;
}

.export-field__input,
.export-field__select {
    background: #1a2738;
    border: 1px solid #2a3447;
    border-radius: 6px;
    color: #f0e6d2;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    min-height: 40px;
    width: 100%;
    box-sizing: border-box;
}
.export-field__input:focus,
.export-field__select:focus {
    outline: 2px solid #c9a227;
    outline-offset: 1px;
    border-color: #c9a227;
}

.export-field__help {
    font-size: 12px;
    color: #c9a227;
    margin: 0;
    line-height: 1.5;
}

.export-field__warn {
    font-size: 12px;
    color: #d4a04a;
    margin: 6px 0 0 0;
    line-height: 1.5;
}

.export-field__pass-row {
    display: flex;
    gap: 6px;
}
.export-field__pass-row .export-field__input { flex: 1; }

.export-field__pass-toggle {
    background: #1a2738;
    border: 1px solid #2a3447;
    border-radius: 6px;
    color: #c9a227;
    cursor: pointer;
    padding: 0 12px;
    font-size: 16px;
    min-height: 40px;
}
.export-field__pass-toggle:hover,
.export-field__pass-toggle:focus {
    background: #1f2d40;
    outline: 2px solid #c9a227;
    outline-offset: 1px;
}

.export-field__strength {
    display: flex;
    gap: 4px;
    height: 4px;
}

.export-field__strength-seg {
    flex: 1;
    background: #2a3447;
    border-radius: 2px;
    transition: background-color 120ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .export-field__strength-seg { transition: none; }
}

.export-field__strength-seg--on.export-field__strength-seg--weak    { background: #8b1e1e; }
.export-field__strength-seg--on.export-field__strength-seg--fair    { background: #d4a04a; }
.export-field__strength-seg--on.export-field__strength-seg--strong  { background: #c9a227; }
.export-field__strength-seg--on.export-field__strength-seg--excellent { background: #e8c97a; }

.export-field__strength-label {
    font-size: 11px;
    color: #8a9bb0;
    margin: 0;
    min-height: 14px;
}

.export-field--radio { gap: 6px; }
.export-field__radio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
    font-size: 14px;
    color: #f0e6d2;
    cursor: pointer;
}

.export-field--toggle { gap: 0; }
.export-field__toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #f0e6d2;
    cursor: pointer;
}
.export-field__toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #c9a227;
}

.export-field--readiness {
    background: #1a2738;
    border-radius: 6px;
    padding: 12px;
}

.export-field__readiness-hdr {
    font-size: 12px;
    font-weight: 700;
    color: #c9a227;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6px 0;
}

.export-field__readiness-body {
    font-size: 12px;
    color: #d8d0c0;
    margin: 0;
    line-height: 1.5;
}

.export-field__drives {
    background: #1a2738;
    border-radius: 6px;
    padding: 12px;
}

.export-field__drive {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: #f0e6d2;
    cursor: pointer;
    border-bottom: 1px solid #2a3447;
}
.export-field__drive:last-child { border-bottom: 0; }
.export-field__drive input[type="radio"] { margin-right: 8px; accent-color: #c9a227; }

/* ------------------------------------------------------------------ */
/* EXPORT PROGRESS + SUCCESS                                          */
/* ------------------------------------------------------------------ */

.export-progress {
    width: 100%;
    background: #1a2738;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    margin: 8px 0 12px 0;
}

.export-progress__fill {
    background: #c9a227;
    height: 100%;
    transition: width 400ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .export-progress__fill { transition: none; }
}

.export-status__line {
    font-size: 14px;
    color: #f0e6d2;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.export-status__sub {
    font-size: 13px;
    color: #8a9bb0;
    margin: 0;
    line-height: 1.5;
}

.export-success__icon {
    font-size: 32px;
    color: #c9a227;
    text-align: center;
    margin-bottom: 8px;
}

.export-success__title {
    font-family: var(--clieair-font-serif, "Cormorant Garamond", serif);
    font-size: 1.3rem;
    color: #f0e6d2;
    text-align: center;
    margin: 0 0 16px 0;
}

.export-success__details {
    background: #1a2738;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
    color: #d8d0c0;
}

.export-success__details p {
    margin: 0 0 6px 0;
}

.manifest-sha-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #2a3447;
}

.manifest-sha-display__label {
    font-size: 11px;
    color: #8a9bb0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.manifest-sha-display__code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 12px;
    color: #c9a227;
    background: #0a1420;
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-all;
}

.manifest-sha-display__copy {
    background: transparent;
    border: 1px solid #c9a227;
    color: #c9a227;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}
.manifest-sha-display__copy:hover,
.manifest-sha-display__copy:focus {
    background: rgba(201, 162, 39, 0.1);
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

.manifest-sha-display__hint {
    font-size: 11px;
    color: #c9a227;
    margin: 8px 0 0 0;
    line-height: 1.5;
    font-family: var(--clieair-font-sans, sans-serif);
    width: 100%;
}

.export-success__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.export-success__done {
    background: transparent;
    border: 0;
    color: #8a9bb0;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    font-family: inherit;
    padding: 6px 10px;
}
.export-success__done:hover,
.export-success__done:focus {
    color: #f0e6d2;
    outline: 2px solid #c9a227;
    outline-offset: 2px;
    border-radius: 4px;
}

.export-error__title {
    font-family: var(--clieair-font-serif, "Cormorant Garamond", serif);
    font-size: 1.2rem;
    color: #d4a04a;
    text-align: center;
    margin: 0 0 8px 0;
}

.export-error__body {
    font-size: 14px;
    color: #d8d0c0;
    text-align: center;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.export-error__detail {
    font-size: 12px;
    color: #8a9bb0;
    background: #1a2738;
    padding: 10px;
    border-radius: 6px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    margin: 0;
    word-break: break-word;
}

/* ------------------------------------------------------------------ */
/* RESUME TOAST                                                       */
/* ------------------------------------------------------------------ */

.export-resume-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0d1b2a;
    border: 1px solid #c9a227;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f0e6d2;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 999;
    max-width: 360px;
    font-size: 13px;
    animation: toastSlideIn 250ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .export-resume-toast { animation: none; }
}
@media (max-width: 600px) {
    .export-resume-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.export-resume-toast__icon { font-size: 20px; }
.export-resume-toast__text { flex: 1; line-height: 1.4; }

.export-resume-toast__btn {
    background: #c9a227;
    color: #0d1b2a;
    border: 0;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.export-resume-toast__btn:hover,
.export-resume-toast__btn:focus {
    background: #e8c97a;
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

.export-resume-toast__close {
    background: transparent;
    border: 0;
    color: #8a9bb0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.export-resume-toast__close:hover { color: #f0e6d2; }

/* ------------------------------------------------------------------ */
/* sr-only (compat)                                                   */
/* ------------------------------------------------------------------ */

.sr-only {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ================================================================== */
/* PRIMARY-ROW REFACTOR                                               */
/* Primary 5-tile row (always visible) + Power-user disclosure panel  */
/* ================================================================== */

/* Override .export-bar to flow vertically: primary row, then toggle, */
/* then power-user panel.                                             */
.export-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.export-primary-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

@media (max-width: 880px) {
    .export-primary-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .export-primary-row {
        grid-template-columns: 1fr;
    }
}

/* Primary tiles are larger than the disclosure tiles and include a
   subtitle line. The base .export-tile rules are inherited; we just
   override the size constraints and stack the content top-down. */
.export-primary-row .export-tile {
    width: auto;
    height: auto;
    min-height: 108px;
    padding: 14px 12px;
    text-align: center;
}

@media (max-width: 600px) {
    .export-primary-row .export-tile {
        flex-direction: column;
        justify-content: center;
        padding: 14px 12px;
        height: auto;
        min-height: 108px;
    }
}

.export-tile__sub {
    display: block;
    font-size: 11px;
    color: #8a9bb0;
    margin-top: 4px;
    line-height: 1.4;
    font-weight: 400;
}

@media (max-width: 600px) {
    .export-tile__sub { font-size: 12px; }
}

/* ---- Disclosure toggle ("Power user options ▾") ----------------- */
.export-disclosure-toggle {
    background: transparent;
    border: 1px solid #2a3447;
    border-radius: 8px;
    color: #8a9bb0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: center;
    transition: background-color 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
}
.export-disclosure-toggle:hover,
.export-disclosure-toggle:focus {
    background: #1a2738;
    color: #f0e6d2;
    border-color: #c9a227;
    outline: none;
}
.export-disclosure-toggle:focus-visible {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

.export-disclosure-toggle__chev {
    display: inline-block;
    font-size: 10px;
    transition: transform 160ms ease-out;
}
.export-disclosure-toggle[aria-expanded="true"] .export-disclosure-toggle__chev {
    transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
    .export-disclosure-toggle { transition: none; }
    .export-disclosure-toggle__chev { transition: none; }
}

/* ---- Power-user disclosure panel ------------------------------- */
.export-disclosure-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    padding: 14px;
    background: #061018;
    border: 1px solid #2a3447;
    border-radius: 8px;
}
.export-disclosure-panel[hidden] { display: none; }

/* Smaller variant used inside the disclosure */
.export-tile--small {
    width: auto;
    height: auto;
    min-height: 80px;
    padding: 10px 12px;
    text-align: center;
    background: #14202e;
}
.export-tile--small .export-tile__icon { font-size: 22px; }
.export-tile--small .export-tile__label { font-size: 12px; }
.export-tile--small .export-tile__sub { font-size: 10.5px; }

@media (max-width: 600px) {
    .export-tile--small {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    .export-tile--small .export-tile__label,
    .export-tile--small .export-tile__sub {
        text-align: left;
    }
}

/* ================================================================== */
/* SHARE LINK / EMAIL / DOWNLOAD SUCCESS CARD                         */
/* ================================================================== */

.share-link-modal-result {
    background: #1a2738;
    border: 1px solid #c9a227;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    color: #f0e6d2;
}

.share-link-modal-result__line {
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 12px 0;
    color: #f0e6d2;
}

.share-link-modal-result__link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.share-link-modal-result__url {
    flex: 1 1 240px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 12px;
    color: #c9a227;
    background: #0a1420;
    padding: 8px 10px;
    border-radius: 6px;
    word-break: break-all;
    min-width: 0;
}

.share-link-modal-result__hint {
    font-size: 12px;
    color: #c9a227;
    margin: 10px 0 0 0;
    line-height: 1.5;
}

.share-link-modal-result__expand {
    background: transparent;
    border: 0;
    color: #c9a227;
    font-family: inherit;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    padding: 6px 0;
    margin-top: 10px;
}
.share-link-modal-result__expand:hover,
.share-link-modal-result__expand:focus-visible {
    color: #f0e6d2;
    outline: 2px solid #c9a227;
    outline-offset: 2px;
    border-radius: 4px;
}

.share-link-modal-result__script {
    background: #0a1420;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 6px;
}
.share-link-modal-result__script[hidden] { display: none; }

.share-link-modal-result__script-text {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 12px;
    color: #d8d0c0;
    margin: 0;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ================================================================== */
/* INTEGRITY NUMBER — reused in download / share / email success      */
/* ================================================================== */

.integrity-number {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #1a2738;
    border: 1px solid #c9a227;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 12px;
}

.integrity-number__label {
    font-size: 11px;
    color: #8a9bb0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.integrity-number__code {
    flex: 1 1 220px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 12px;
    color: #c9a227;
    background: #0a1420;
    padding: 6px 9px;
    border-radius: 4px;
    word-break: break-all;
    min-width: 0;
}

.integrity-number__copy {
    background: transparent;
    border: 1px solid #c9a227;
    color: #c9a227;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}
.integrity-number__copy:hover,
.integrity-number__copy:focus-visible {
    background: rgba(201, 162, 39, 0.1);
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

/* ================================================================== */
/* Cloud-saver host (Dropbox + Google Save-to-Drive buttons)          */
/* ================================================================== */

.cloud-saver-host {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cloud-saver-btn {
    min-height: 40px;
}

/* Reduced-motion: no slide animations on disclosure panel. We use
   display:none/grid (no transitions in the first place), but in case
   future change adds them, this guard is in place. */
@media (prefers-reduced-motion: reduce) {
    .export-disclosure-panel { transition: none; }
}

