/* ==========================================================================
   AZORIQ Design System — Sprint 1: Foundation + Search Hero Component
   ==========================================================================
   Scope: purely additive. All rules are scoped to .ds-* prefixed classes
   and --ds-* custom properties, so nothing here can affect any existing
   page, component, or class (.top-nav, .analysis-card, .pill, etc.).
   Only pages that opt in by using .ds-* classes are affected. This file
   replaces static/css/home.css (removed — its rules are superseded and
   folded into this foundation, per "do not scatter one-off CSS").
   ========================================================================== */

:root {
    /* ---- Colour tokens (approved palette — exact values, no invention) ---- */
    --ds-navy: #081320;
    --ds-navy-raised: #0d1f30;
    --ds-cyan: #00C8D7;
    --ds-white: #F6F8FA;
    --ds-silver: #C7D0D8;
    --ds-success: #32D74B;
    --ds-warning: #FFB020;
    --ds-danger: #FF5A5F;
    /* Semantic aliases (B3.1): same approved values above, named to match
       the AZORIQ color-language spec exactly (green/amber/red/cyan) so any
       component consuming --ds-* has one unambiguous name per meaning. */
    --ds-green: var(--ds-success);
    --ds-amber: var(--ds-warning);
    --ds-red: var(--ds-danger);

    /* ---- Typography scale ---- */
    --ds-text-xs: 0.75rem;   /* 12px — microcopy, chip labels */
    --ds-text-sm: 0.85rem;   /* 13.6px — secondary links, field labels */
    --ds-text-base: 1rem;    /* 16px — field values, body */
    --ds-text-md: 1.05rem;   /* 16.8px — product line */
    --ds-text-lg: 1.25rem;   /* 20px — section-level emphasis */
    --ds-text-xl: 1.75rem;   /* 28px — brand, mobile */
    --ds-text-2xl: 2.25rem;  /* 36px — brand, desktop */

    /* ---- Spacing scale (4px base unit) ---- */
    --ds-space-1: 4px;
    --ds-space-2: 8px;
    --ds-space-3: 12px;
    --ds-space-4: 16px;
    --ds-space-5: 24px;
    --ds-space-6: 32px;
    --ds-space-7: 48px;
    --ds-space-8: 64px;

    /* ---- Radius scale ---- */
    --ds-radius-sm: 10px;
    --ds-radius-md: 16px;
    --ds-radius-lg: 24px;
    --ds-radius-pill: 999px;

    /* ---- Border / elevation ---- */
    --ds-border: 1px solid rgba(199, 208, 216, 0.14);
    --ds-border-strong: 1px solid rgba(199, 208, 216, 0.24);
    --ds-shadow-sm: 0 2px 10px rgba(2, 6, 12, 0.30);
    --ds-shadow-md: 0 12px 32px rgba(2, 6, 12, 0.38);
    --ds-shadow-lg: 0 24px 64px rgba(2, 6, 12, 0.46);
}

/* ===========================================================================
   AZORIQ Product Header — final app header
   ---------------------------------------------------------------------------
   One flat identity band. No card, no capsule, no glow. The brand asset is
   deliberately prominent on the left, the product title/navigation/signature
   stay fixed in the center, and the account action balances the right side.
   =========================================================================== */
.az-product-header {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(420px, 2fr) minmax(210px, 1fr);
    align-items: center;
    column-gap: clamp(18px, 3vw, 40px);
    width: 100%;
    padding: 18px clamp(22px, 4vw, 54px) 16px;
    background:
        radial-gradient(circle at 18% 0%, rgba(0, 200, 215, 0.13), transparent 34%),
        linear-gradient(180deg, #081320 0%, #06101c 100%);
}

.az-product-brand,
.az-product-user {
    min-width: 0;
    display: flex;
    align-items: center;
}

.az-product-brand {
    justify-content: flex-start;
}

.az-product-logo {
    width: clamp(210px, 20vw, 315px);
    height: auto;
    display: block;
    object-fit: contain;
    filter: none;
}

.az-product-center {
    min-width: 0;
    width: 100%;
    display: grid;
    justify-items: center;
    row-gap: 11px;
    text-align: center;
}

.az-product-title {
    font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(18px, 1.55vw, 24px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ds-cyan);
    text-shadow: none;
}

.az-product-nav {
    width: min(100%, 820px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
}

.az-product-nav-item {
    min-width: 0;
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(199, 208, 216, 0.22);
    border-radius: 12px;
    background: rgba(246, 248, 250, 0.035);
    color: rgba(246, 248, 250, 0.82);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(11px, 0.85vw, 13px);
    font-weight: 600;
    letter-spacing: 0.045em;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.az-product-nav-item:hover {
    color: var(--ds-white);
    border-color: rgba(0, 200, 215, 0.34);
    background: rgba(0, 200, 215, 0.055);
}

.az-product-nav-item.active,
.az-product-nav-item--primary.active {
    color: var(--ds-white);
    border-color: rgba(0, 200, 215, 0.58);
    background: rgba(0, 200, 215, 0.105);
}

.az-product-nav-item--primary {
    font-weight: 700;
    border-color: rgba(0, 200, 215, 0.42);
}

.az-product-nav-item--inert {
    opacity: 0.62;
    cursor: default;
}

.az-product-nav-item--inert:hover {
    color: rgba(246, 248, 250, 0.82);
    border-color: rgba(199, 208, 216, 0.22);
    background: rgba(246, 248, 250, 0.035);
}

.az-product-tagline {
    width: min(100%, 760px);
    display: block;
    color: rgba(199, 208, 216, 0.78);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(11px, 0.8vw, 13px);
    font-weight: 400;
    letter-spacing: 0.18em;
    line-height: 1.35;
    text-align: center;
}

.az-product-user {
    justify-content: flex-end;
}

.az-product-user-link,
.az-product-signin {
    max-width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 7px;
    border: 1px solid rgba(199, 208, 216, 0.18);
    border-radius: 999px;
    background: rgba(246, 248, 250, 0.035);
    color: var(--ds-white);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.az-product-signin {
    color: var(--ds-white);
}

.az-product-user-link:hover,
.az-product-signin:hover {
    border-color: rgba(0, 200, 215, 0.34);
    color: var(--ds-cyan);
}

.az-product-user-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: block;
    border-radius: 9px;
    object-fit: contain;
}

.az-product-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.az-product-caret {
    font-size: 0.72em;
    color: rgba(199, 208, 216, 0.72);
}

.az-product-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 200, 215, 0.34), rgba(199, 208, 216, 0.12), transparent);
}

/* Standard user app navigation stays available across the product. */
body.az-standard-user .az-product-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

@media (max-width: 980px) {
    .az-product-header {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand user"
            "center center";
        row-gap: 14px;
        padding: 15px 18px 14px;
    }

    .az-product-brand { grid-area: brand; }
    .az-product-user { grid-area: user; }
    .az-product-center { grid-area: center; row-gap: 10px; }

    .az-product-logo {
        width: clamp(178px, 42vw, 245px);
    }

    .az-product-title {
        font-size: 17px;
        letter-spacing: 0.20em;
    }

    .az-product-nav {
        width: 100%;
        max-width: 620px;
        gap: 8px;
    }

    /* B6.2 FIX 5: 44px floor, consistent with the authenticated-header
       override further down this file. */
    .az-product-nav-item {
        height: 44px;
        padding: 0 10px;
        font-size: 12px;
        letter-spacing: 0.025em;
    }

    .az-product-tagline {
        width: 100%;
        font-size: 10.5px;
        letter-spacing: 0.115em;
    }
}

@media (max-width: 560px) {
    .az-product-header {
        padding: 13px 14px 13px;
        row-gap: 13px;
    }

    .az-product-logo {
        width: clamp(148px, 54vw, 205px);
    }

    .az-product-user-link,
    .az-product-signin {
        min-height: 38px;
        padding: 4px 8px 4px 5px;
        gap: 7px;
        font-size: 12px;
    }

    .az-product-user-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .az-product-title {
        font-size: 15px;
        letter-spacing: 0.16em;
    }

    .az-product-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 100%;
        gap: 8px;
    }

    .az-product-nav-item {
        height: 36px;
        border-radius: 10px;
        font-size: 11px;
    }

    .az-product-tagline {
        max-width: 330px;
        letter-spacing: 0.055em;
        line-height: 1.45;
    }
}

/* ==========================================================================
   Premium page shell — the immersive backdrop a page's primary surface
   sits inside. Fills the width .content-shell already provides; does not
   fight base.html's existing layout structure.
   ========================================================================== */
.ds-shell {
    width: 100%;
    min-height: calc(100vh - 78px - 36px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ds-space-7);
    padding: var(--ds-space-8) var(--ds-space-4);
    background: var(--ds-navy);
    border-radius: var(--ds-radius-lg);
}

/* ==========================================================================
   Hero identity block — Brand -> Product -> Value proposition.
   ========================================================================== */
.ds-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--ds-space-2);
    max-width: 640px;
}

.ds-hero-brand {
    color: var(--ds-white);
    font-weight: 800;
    font-size: var(--ds-text-xl);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.1;
}

.ds-hero-product {
    color: var(--ds-cyan);
    font-weight: 600;
    font-size: var(--ds-text-md);
    letter-spacing: 0.02em;
}

.ds-hero-tagline {
    color: var(--ds-silver);
    font-size: var(--ds-text-sm);
    line-height: 1.5;
}

@media (min-width: 720px) {
    .ds-hero-brand {
        font-size: var(--ds-text-2xl);
    }
}

/* ==========================================================================
   Search intelligence surface — the elevated panel the search form lives
   in. Distinct tone from the shell it sits inside (raised, bordered,
   shadowed) so it reads as the command console, not a form card.
   ========================================================================== */
.ds-surface {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-5);
    padding: var(--ds-space-6);
    background: var(--ds-navy-raised);
    border: var(--ds-border-strong);
    border-radius: var(--ds-radius-lg);
    box-shadow: var(--ds-shadow-md);
}

.ds-surface-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ds-space-4);
}

@media (max-width: 520px) {
    .ds-surface-fields {
        grid-template-columns: 1fr;
    }
}

/* ---- Input fields ---- */
.ds-field {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
}

.ds-field-label {
    color: var(--ds-silver);
    font-size: var(--ds-text-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ds-field-input {
    width: 100%;
    padding: var(--ds-space-3) var(--ds-space-4);
    background: rgba(246, 248, 250, 0.04);
    border: var(--ds-border);
    border-radius: var(--ds-radius-sm);
    color: var(--ds-white);
    font-size: var(--ds-text-base);
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ds-field-input::placeholder {
    color: rgba(199, 208, 216, 0.45);
}

.ds-field-input:focus {
    outline: none;
    border-color: var(--ds-cyan);
    background: rgba(246, 248, 250, 0.06);
}

/* ---- Primary CTA ---- */
.ds-cta-primary {
    width: 100%;
    padding: var(--ds-space-4);
    background: var(--ds-cyan);
    border: 1px solid var(--ds-cyan);
    border-radius: var(--ds-radius-sm);
    color: var(--ds-navy);
    font-size: var(--ds-text-base);
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ds-cta-primary:hover {
    background: #14d6e3;
}

.ds-cta-primary:focus-visible {
    outline: 2px solid var(--ds-white);
    outline-offset: 2px;
}

/* ---- Microcopy ---- */
.ds-microcopy {
    color: var(--ds-silver);
    font-size: var(--ds-text-xs);
    text-align: center;
    line-height: 1.5;
}

/* ---- Secondary text link ---- */
.ds-link-secondary {
    color: var(--ds-silver);
    font-size: var(--ds-text-sm);
    text-decoration: none;
}

.ds-link-secondary:hover {
    color: var(--ds-cyan);
}

/* ==========================================================================
   Small evidence/status chips — foundation component for future use
   (e.g. Track Record, Research). Not used on the homepage; included here
   as part of the reusable system per Sprint 1 scope.
   ========================================================================== */
.ds-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-1);
    padding: var(--ds-space-1) var(--ds-space-3);
    border-radius: var(--ds-radius-pill);
    font-size: var(--ds-text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    border: var(--ds-border);
    color: var(--ds-silver);
    background: rgba(199, 208, 216, 0.06);
}

.ds-chip-success {
    color: var(--ds-success);
    border-color: rgba(50, 215, 75, 0.35);
    background: rgba(50, 215, 75, 0.08);
}

.ds-chip-warning {
    color: var(--ds-warning);
    border-color: rgba(255, 176, 32, 0.35);
    background: rgba(255, 176, 32, 0.08);
}

.ds-chip-danger {
    color: var(--ds-danger);
    border-color: rgba(255, 90, 95, 0.35);
    background: rgba(255, 90, 95, 0.08);
}

@media (max-width: 480px) {
    .ds-shell {
        padding: var(--ds-space-6) var(--ds-space-3);
        gap: var(--ds-space-6);
    }

    .ds-surface {
        padding: var(--ds-space-4);
    }
}

/* ==========================================================================
   AZORIQ Logged Header Composition (final)
   ---------------------------------------------------------------------------
   Everything below is scoped to `body.az-authenticated` (set by base.html
   whenever current_user is truthy -- both admin and standard accounts).
   login.html / signup.html render the SAME shared header markup for
   anonymous visitors (body.az-public-user) and already hide .az-product-nav
   / .az-product-user themselves with their own page-level CSS -- scoping
   every rule here to the logged-in state means those two pages, and the
   shared bare rules above that they depend on, are completely untouched by
   this composition pass. Nav is flexbox (not a fixed-column grid) so it
   auto-sizes to however many real <a> nav items exist (1 for admin's
   "Control Panel", 2 for a standard user's Analyze/All Research) without
   ever leaving dead grid columns. Appended last in the file so it wins the
   cascade over every bare/unscoped rule above by specificity, not source
   order alone.
   ========================================================================== */

/* ---- Desktop / laptop (>=769px): one balanced horizontal bar ---- */
body.az-authenticated .az-product-header {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px clamp(20px, 3vw, 36px);
    grid-template-columns: minmax(150px, 230px) 1fr minmax(150px, 230px);
    column-gap: clamp(16px, 2.4vw, 32px);
}

body.az-authenticated .az-product-logo {
    width: clamp(140px, 10.5vw, 180px);
}

body.az-authenticated .az-product-center {
    row-gap: 6px;
}

body.az-authenticated .az-product-title {
    font-size: clamp(15px, 1.15vw, 18px);
    letter-spacing: 0.20em;
}

body.az-authenticated .az-product-nav {
    width: auto;
    max-width: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

body.az-authenticated .az-product-nav-item {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 16px;
}

body.az-authenticated .az-product-user-link,
body.az-authenticated .az-product-signin {
    min-height: 38px;
}

/* ---- Mobile (<=768px): compact app-style header ----
   AZORIQ UI BETA MOBILE HEADER COMPACT FINAL: logo and account pill now
   share one top row (logo left, pill right) instead of two stacked full
   rows -- that stacking was the main source of wasted vertical height.
   Title and nav are unchanged internally: both still live inside the
   single .az-product-center grid area (which already stacks them via its
   own row-gap), so they simply become row 2 of the header grid. DOM order
   (brand, center, user) is unchanged; only grid placement changes. */
@media (max-width: 768px) {
    body.az-authenticated .az-product-header {
        max-width: none;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "brand user"
            "center center";
        row-gap: 4px;
        padding: 10px 14px;
    }

    body.az-authenticated .az-product-brand {
        justify-content: flex-start;
    }

    body.az-authenticated .az-product-user {
        justify-content: flex-end;
    }

    body.az-authenticated .az-product-center {
        row-gap: 4px;
    }

    /* Logo: left-aligned, kept at a premium/legible size -- sharing half
       the top row with the pill (not the full row alone), so it no longer
       needs the old centered-row shrink. */
    body.az-authenticated .az-product-logo {
        width: clamp(128px, 36vw, 165px);
    }

    /* Account pill: right-aligned, slightly tighter than desktop so the
       logo and pill never crowd each other on the same row. Still icon +
       username + caret -- dropdown markup/behavior is untouched.
       B6.2 FIX 5: min-height raised from 32px to the 44px thumb-friendly
       floor -- this pill is a real tap target (opens the account menu /
       signs in), not decoration. */
    body.az-authenticated .az-product-user-link,
    body.az-authenticated .az-product-signin {
        min-height: 44px;
        padding: 3px 10px 3px 4px;
        gap: 6px;
    }

    body.az-authenticated .az-product-user-name {
        max-width: 28vw;
        font-size: 12px;
    }

    body.az-authenticated .az-product-title {
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    /* Nav: centered flex row sized to its real content (1 or 2 buttons),
       never a fixed grid with empty trailing columns. */
    body.az-authenticated .az-product-nav {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* B6.2 FIX 5: height raised from 32px to 44px -- these are the primary
       "Analyze" / "All Research" / "Control Panel" nav buttons, not
       secondary chrome. */
    body.az-authenticated .az-product-nav-item {
        flex: 0 0 auto;
        height: 44px;
        padding: 0 14px;
        font-size: 12px;
    }
}

/* ==========================================================================
   AZORIQ Account Pill Dropdown
   ---------------------------------------------------------------------------
   The pill (icon + username + caret) is now a <button> that toggles a small
   menu instead of being a direct link to /logout. "Sign out" inside the menu
   is the only real navigation action besides the future /account route --
   "Account details" stays a disabled label (not a link) since that page
   does not exist yet. Positioning: right-aligned under the pill on desktop
   (pill sits on the right edge of the header); centered under the pill on
   mobile (pill is itself centered there), clamped so it never overflows the
   viewport.
   ========================================================================== */
.az-product-account {
    position: relative;
    display: flex;
    min-width: 0;
}

.az-product-account-trigger {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
}

.az-product-account-trigger .az-product-caret {
    transition: transform 0.15s ease;
}

.az-product-account[data-open="true"] .az-product-account-trigger .az-product-caret {
    transform: rotate(180deg);
}

.az-account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    min-width: 220px;
    max-width: min(280px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 2px;
    background: #0d1f30;
    border: 1px solid rgba(199, 208, 216, 0.2);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(2, 6, 12, 0.46);
    z-index: 1100;
}

.az-account-menu[hidden] {
    display: none;
}

.az-account-menu-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px;
}

.az-account-menu-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(199, 208, 216, 0.56);
}

.az-account-menu-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-white);
    overflow-wrap: anywhere;
}

.az-account-menu-divider {
    height: 1px;
    margin: 4px 6px;
    background: rgba(199, 208, 216, 0.14);
}

/* B6.2 FIX 5: min-height 44px -- "Account details" / "Sign out" are real
   tap targets in a dropdown menu, easy to mis-tap at the previous ~34px
   effective height. */
.az-account-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 8px;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ds-white);
}

a.az-account-menu-item:hover,
a.az-account-menu-item:focus-visible {
    background: rgba(0, 200, 215, 0.08);
    color: var(--ds-cyan);
}

.az-account-menu-item--disabled {
    color: rgba(246, 248, 250, 0.4);
    cursor: default;
}

.az-account-menu-soon {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(199, 208, 216, 0.55);
    background: rgba(199, 208, 216, 0.08);
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.az-account-menu-item--action {
    color: #ff8489;
}

.az-account-menu-item--action:hover,
.az-account-menu-item--action:focus-visible {
    color: #ffa1a4;
    background: rgba(255, 90, 95, 0.1);
}

/* ==========================================================================
   B8.1 — Legal footer + cookie notice. Mobile-first, minimal: a single thin
   link row, no multi-column footer, no new page-level layout changes.
   ========================================================================== */

.az-footer {
    width: 100%;
    max-width: 1320px;
    margin: var(--ds-space-7, 48px) auto 0;
    padding: var(--ds-space-4, 16px) var(--ds-space-4, 16px) var(--ds-space-6, 32px);
    border-top: 1px solid rgba(199, 208, 216, 0.12);
    text-align: center;
}

.az-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--ds-space-4, 16px);
    margin-bottom: var(--ds-space-2, 8px);
}

.az-footer-links a {
    color: rgba(246, 248, 250, 0.62);
    font-size: var(--ds-text-xs, 0.75rem);
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.az-footer-links a:hover,
.az-footer-links a:focus-visible {
    color: var(--ds-cyan, #00C8D7);
}

.az-footer-copy {
    margin: 0;
    font-size: 11px;
    color: rgba(199, 208, 216, 0.42);
}

.az-cookie-notice {
    position: fixed;
    left: var(--ds-space-3, 12px);
    right: var(--ds-space-3, 12px);
    /* B8.1.1: safe-area aware -- on iOS devices with a home-indicator bar,
       env(safe-area-inset-bottom) keeps the notice clear of it instead of
       sitting flush against/under it. max() falls back to the plain 12px
       gap on devices that don't report a safe-area inset. */
    bottom: max(var(--ds-space-3, 12px), env(safe-area-inset-bottom, 0px));
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 440px;
    max-height: 40vh;
    overflow: auto;
    margin: 0 auto;
    padding: 12px 14px;
    border-radius: var(--ds-radius-md, 16px);
    border: 1px solid rgba(0, 200, 215, 0.28);
    background: linear-gradient(145deg, rgba(3, 12, 26, 0.97), rgba(7, 24, 43, 0.95));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* B8.1.1 FIX: the missing [hidden] override was the root cause of the
   notice "not reliably disappearing" -- .az-cookie-notice's own
   `display: flex` above has the same specificity as the browser's built-in
   `[hidden] { display: none }` rule, and an author stylesheet rule at equal
   specificity always wins over the user-agent stylesheet regardless of
   source order. So toggling the `hidden` DOM property in app.js silently
   had no visual effect. Same fix already used by .az-account-menu[hidden]
   above for the exact same reason -- not a new pattern. */
.az-cookie-notice[hidden] {
    display: none;
}

.az-cookie-notice p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(246, 248, 250, 0.82);
}

.az-cookie-notice a {
    color: var(--ds-cyan, #00C8D7);
    font-weight: 700;
    text-decoration: none;
}

.az-cookie-dismiss {
    align-self: flex-end;
    padding: 6px 15px;
    border-radius: var(--ds-radius-pill, 999px);
    border: 1px solid rgba(0, 200, 215, 0.4);
    background: rgba(0, 200, 215, 0.1);
    color: #e8fbff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.az-cookie-dismiss:hover {
    background: rgba(0, 200, 215, 0.18);
}

@media (min-width: 600px) {
    .az-cookie-notice {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--ds-space-3, 12px);
        max-width: 640px;
        padding: 14px 16px;
    }

    .az-cookie-notice p {
        font-size: 12.5px;
        line-height: 1.5;
    }

    .az-cookie-dismiss {
        align-self: center;
        flex: 0 0 auto;
        padding: 7px 16px;
        font-size: 11.5px;
    }
}

/* AZORIQ UI BETA MOBILE HEADER COMPACT FINAL: the pill is now right-aligned
   on mobile too (see the header composition block above), so the menu
   inherits the same right-aligned desktop rule (right: 0) with no
   mobile-specific centering override -- its max-width clamp above already
   keeps it from overflowing the left edge of the viewport. */
