/* PursuitARK — shared brand tokens and typography reset.
   Extracted from pages/templates/pages/placeholder.html so every
   template can link this instead of re-declaring the same rules. */

:root {
    --navy: #1B2A4A;
    --gold: #C9A84C;
    --navy-deep: #131f37;
    --green: #2E7D5E;
    --bg: #F4F7FC;
    --white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--navy-deep);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
}

a { color: inherit; text-decoration: none; }

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

/* PA-124 — copyright footer, shared by base.html and base_public.html. */
.legal-footer {
    padding: 1.5rem 2rem;
    font-size: 0.75rem;
    color: rgba(19, 31, 55, 0.45);
    text-align: center;
}

.legal-footer a { color: rgba(19, 31, 55, 0.55); text-decoration: underline; }
.legal-footer a:hover { color: var(--navy-deep); }

/* PA-150 — on-brand placeholder pages for unbuilt nav destinations. */
.coming-soon-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
}

.app-placeholder {
    max-width: 640px;
}

.app-placeholder-intro {
    margin: 0.5rem 0 1rem;
    font-size: 1.05rem;
    color: var(--navy-deep);
}

.app-placeholder-features {
    margin: 0;
    padding-left: 1.25rem;
    color: rgba(19, 31, 55, 0.75);
    line-height: 1.7;
}

/* PA-224 — branded "sailing ark" loading overlay. Placed inside a specific
   loading container (a narrative section on the result pages, the submit-button
   row on the wizard forms) via templates/_ark_spinner.html; that container is
   position:relative. The overlay covers just that container with a subtle dim;
   the ark sails flush across the container width and loops. Hidden by default;
   toggled via .active by showArkSpinner()/hideArkSpinner() (base.html).
   Animating left (0 -> 100%) together with translateX (-100% -> 0) walks the
   ark's edge from just off the left to just off the right of the container,
   independent of the ark's own width. overflow:hidden clips it at the edges;
   pointer-events:none keeps the dimmed content readable/scrollable. */
@keyframes ark-sail {
    from { left: 0;    transform: translateX(-100%); }
    to   { left: 100%; transform: translateX(0); }
}

.ark-spinner-overlay {
    position: absolute;
    inset: 0;
    display: none;
    overflow: hidden;
    background: none;
    pointer-events: none;
    z-index: 50;
}

.ark-spinner-overlay.active {
    display: block;
}

.ark-spinner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 400px;
    height: auto;
    transform: translateX(-100%);
    animation: ark-sail 7s linear infinite;
    pointer-events: none;
}

/* PA-229 — assessment PDF export actions (Download / Email). Secondary
   styling (not the primary gold button); shared across the result pages and
   the assessment tables via base.css, which every app page loads. */
.assessment-export-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 1.5rem 0 0.5rem;
}

.assessment-export-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: var(--white);
    color: var(--navy-deep);
    border: 1px solid rgba(19, 31, 55, 0.18);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.btn-export:hover { background: rgba(19, 31, 55, 0.04); }

.btn-export--download { color: var(--navy-deep); }

.btn-export--email {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-deep);
}

.btn-export--compact {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
}

.export-feedback {
    font-size: 0.82rem;
    color: rgba(19, 31, 55, 0.65);
}

.export-feedback .export-resend-link {
    color: var(--gold);
    text-decoration: underline;
}

/* PA-238 — progressive streaming narrative: plain-text container the SSE chunks
   append into before the final markdown render. pre-wrap keeps the streamed
   newlines visible while the text arrives word by word. */
.narrative-streaming-text {
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.6;
    color: inherit;
    padding: 0;
    margin: 0;
}

/* PA-240..244 — shared public navbar: links, actions, CTA, active state, and a
   no-JS burger for mobile. Sits alongside the .site-nav base rules in auth.css
   (loaded on every base_public page); the home page carries the same rules
   inline. Uses the brand tokens (--navy-deep, --gold, --white) from :root. */
.site-nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0 auto 0 2rem;
    padding: 0;
}
.site-nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.15s ease;
}
.site-nav-links a:hover,
.site-nav-links a.active { color: var(--gold); }
.site-nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.site-nav-cta {
    background: var(--gold);
    color: var(--navy-deep);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.site-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(201, 168, 76, 0.3);
}
.site-nav-toggle,
.site-nav-burger { display: none; }

@media (max-width: 860px) {
    .site-nav-burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 30px;
        height: 30px;
        cursor: pointer;
        margin-left: auto;
    }
    .site-nav-burger span {
        display: block;
        height: 2px;
        width: 22px;
        background: var(--gold);
        border-radius: 2px;
    }
    .site-nav-links {
        position: fixed;
        top: 52px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin: 0;
        background: var(--navy-deep);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }
    .site-nav-toggle:checked ~ .site-nav-links { max-height: 70vh; }
    .site-nav-links li { width: 100%; }
    .site-nav-links a { display: block; padding: 0.85rem 1.5rem; width: 100%; }
    .site-nav-actions { gap: 0.85rem; margin-left: 0.85rem; }
    .site-nav-cta { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
}

/* PA-249 — BQS dropdown in the shared public nav. CSS-only (hover/focus-within)
   on desktop; on mobile (burger open) it flattens to indented items under a
   "BQS" label. Uses the brand tokens from :root. */
.site-nav-dropdown { position: relative; }
.site-nav-dropdown-label {
    color: var(--white); font-size: 0.92rem; font-weight: 500;
    letter-spacing: 0.01em; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.3rem;
}
.site-nav-dropdown:hover > .site-nav-dropdown-label,
.site-nav-dropdown:focus-within > .site-nav-dropdown-label,
.site-nav-dropdown.active > .site-nav-dropdown-label { color: var(--gold); }
.site-nav-caret { font-size: 0.7rem; }
.site-nav-dropdown-menu {
    list-style: none; margin: 0; padding: 0.4rem 0;
    position: absolute; top: 100%; left: 0; min-width: 210px;
    background: var(--navy-deep); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0; visibility: hidden; transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease; z-index: 1001;
}
.site-nav-dropdown:hover > .site-nav-dropdown-menu,
.site-nav-dropdown:focus-within > .site-nav-dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.site-nav-dropdown-menu a {
    display: block; padding: 0.55rem 1rem; color: var(--white);
    text-decoration: none; font-size: 0.9rem; font-weight: 500; white-space: nowrap;
}
.site-nav-dropdown-menu a:hover,
.site-nav-dropdown-menu a.active { color: var(--gold); }

@media (max-width: 860px) {
    .site-nav-dropdown-label { display: block; padding: 0.85rem 1.5rem; width: 100%; }
    .site-nav-caret { display: none; }
    .site-nav-dropdown-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        background: transparent; border: none; box-shadow: none;
        padding: 0; min-width: 0; z-index: auto;
    }
    .site-nav-dropdown-menu a { padding: 0.6rem 1.5rem 0.6rem 2.75rem; }
}

/* PA-272 — account dropdown on the sign-in icon (right of the public nav).
   JS-driven click-to-open (the .open class is toggled by site_nav.js), so it
   works on tap as well as click. Right-aligned navy panel, white text, gold on
   hover — matching the BQS dropdown. Lives in .site-nav-actions, which stays in
   the top bar at every width, so the absolute menu is correct on mobile too. */
.site-nav-account { position: relative; display: inline-flex; }
.site-nav-account-toggle {
    background: none; border: none; padding: 0; margin: 0;
    cursor: pointer; color: var(--gold); font: inherit; line-height: 0;
    display: inline-flex; align-items: center; gap: 0.25rem;
}
.site-nav-account-caret { font-size: 0.7rem; line-height: 1; }
.site-nav-account-menu {
    list-style: none; margin: 0; padding: 0.4rem 0;
    position: absolute; top: 100%; right: 0; min-width: 160px;
    background: var(--navy-deep); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0; visibility: hidden; transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease; z-index: 1001;
}
.site-nav-account.open > .site-nav-account-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.site-nav-account-menu a {
    display: block; padding: 0.55rem 1rem; color: var(--white);
    text-decoration: none; font-size: 0.9rem; font-weight: 500; white-space: nowrap;
}
.site-nav-account-menu a:hover,
.site-nav-account-menu a:focus { color: var(--gold); }
