/* ============================================================================
   Aurora surface kit — shared by the dashboard shell and the public marketing
   site (linked from views/app-shell/*.ejs and views/layout/public-layout.ejs).

   Single source of truth for the presentational surfaces that both the Vue
   dashboard and the server-rendered marketing mockups draw with:
     1. tokens         (.aurora-surfaces scope, --surface-* custom properties)
     2. product header (was ProductHeader.vue <style scoped>)
     3. filter tabs    (was AuroraFilterTabs.vue <style scoped>)
     4. cards, kicker, pills, KPI tiles, AI callout, incident queue
                       (was SentimentPage.vue <style scoped>)
     5. card subtitle + trend line chart (trend-*)
                       (was SentimentPage.vue <style scoped>)

   Naming: shared surfaces use neutral aurora-* classes and --surface-* tokens
     aurora-card (+__header/__title/__kicker)   panel card
     aurora-pill (+--badge, tone-*)             status / severity pill
     aurora-kpi-row > aurora-kpi-hero | aurora-kpi (+--risk)   KPI tiles
     aurora-callout (+--primary, __icon/__body/__headline)     AI callout
     aurora-queue-panel > aurora-item-list > aurora-item-card  record queue
     aurora-surface-stack                       vertical section stack
   Only shared selectors live here (aurora-*, trend-*, product-header,
   aurora-filter-tab). Page-specific modifiers (e.g. aurora-card--brief) and
   page-only classes that happen to share declarations stay in the page's own
   scoped CSS, so nothing here can leak onto another page.
   Rules are plain global CSS: Vue pages that keep scoped overrides for these
   classes still win on specificity, which is intended.
   ============================================================================ */

/* 1. Tokens ---------------------------------------------------------------- */
/* Card primitives live at :root, not under .aurora-surfaces, so surfaces drawn
   outside that scope (the marketing site's page-level cards, landing.css) use
   the kit's exact fill and hairline instead of restating lookalike values. */
:root {
    --surface-card-fill: rgba(10, 17, 31, 0.78);
    --surface-hairline-rgb: 148, 163, 184;
}

.aurora-surfaces {
    --surface-panel: var(--panel-surface, rgba(8, 13, 24, 0.9));
    --surface-panel-strong: rgba(6, 10, 18, 0.95);
    --surface-panel-soft: var(--panel-surface-soft, rgba(12, 18, 30, 0.8));
    --surface-border: var(--panel-border, rgba(var(--surface-hairline-rgb), 0.16));
    --surface-ink: #f8fafc;
    --surface-muted: rgba(191, 203, 224, 0.72);
    --surface-subtle: rgba(148, 163, 184, 0.7);
    --surface-cyan: #34d399;
    --surface-cyan-strong: #14b8a6;
    --surface-amber: #f59e0b;
    --surface-orange: #fb7185;
    --surface-blue: #60a5fa;
    --surface-shadow: 0 22px 48px rgba(2, 6, 23, 0.32);
    /* House field status curve (forms.css .form-control), stated once as tokens.
       Every restated hover/focus/disabled block in this file references these —
       a forms.css tweak means editing this block, not a grep across the page. */
    --surface-control-base-bg: rgba(7, 11, 20, 0.92);
    --surface-control-hover-border: rgba(96, 165, 250, 0.34);
    --surface-control-hover-bg: rgba(17, 27, 49, 0.78);
    --surface-control-hover-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    --surface-control-active-border: rgba(96, 165, 250, 0.52);
    --surface-control-active-shadow:
        0 0 0 2px rgba(37, 99, 235, 0.16),
        0 0 14px rgba(37, 99, 235, 0.1);
    --surface-control-disabled-bg: rgba(15, 23, 42, 0.36);
    --surface-control-disabled-text: rgba(148, 163, 184, 0.66);
    --surface-radius-section: 16px;
    --surface-radius-action: 12px;
    --surface-radius-data: 8px;
    --surface-gap-section: 24px;
    --surface-gap-card: 16px;
    --surface-gap-inner: 12px;
    --surface-type-footnote: 0.66rem;
    --surface-type-kicker: 0.72rem;
    --surface-type-caption: 0.78rem;
    --surface-type-meta: 0.82rem;
    --surface-type-body: 0.9rem;
    --surface-type-card-title: 1rem;
    --surface-type-section-title: 1.16rem;
    /* Display sizes that scale with the surface, not the viewport, when a
       host (e.g. a marketing mockup frame) overrides them. */
    --surface-type-kpi: clamp(2rem, 4vw, 3.2rem);
    --surface-type-kpi-score: clamp(2.15rem, 4vw, 3.45rem);
    --surface-type-callout-title: clamp(1.45rem, 2.4vw, 2.05rem);
    --surface-type-metric: 1.28rem;
    font-family: inherit;
    font-size: var(--surface-type-body);
    line-height: 1.55;
}

/* 2. Product header (ProductHeader.vue) ------------------------------------ */
.product-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.product-header__copy {
    display: grid;
    gap: 8px;
    flex: 1 1 auto;
    /* Wide enough that a typical subtitle sits on one line; the block still shrinks
       (flex + min-width: 0) so the subtitle wraps on narrow viewports. */
    max-width: 1040px;
    min-width: 0;
}

.product-header__controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 2px;
}

.product-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
    padding-top: 22px;
}

/* Without the accent tag the title starts at the top, so actions align to the
   title line instead of compensating for the tag height. */
.product-header--plain .product-header__actions {
    padding-top: 4px;
}

.product-header__tag {
    color: #9fd8ff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.product-header__title {
    margin: 0;
    color: #f8fafc;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: 0;
}

.product-header__subtitle {
    margin: 0;
    color: rgba(191, 219, 254, 0.72);
    font-size: 1rem;
    line-height: 1.65;
}

@media (max-width: 720px) {
    .product-header {
        flex-direction: column;
    }

    .product-header__actions {
        width: 100%;
        justify-content: flex-start;
        padding-top: 2px;
    }

    .product-header__controls {
        width: 100%;
    }

    .product-header__actions .btn,
    .product-header__actions .sentiment-btn {
        width: 100%;
        justify-content: center;
    }

    .product-header__title {
        font-size: 2rem;
    }

    .product-header__subtitle {
        font-size: 0.94rem;
    }
}

/* 3. Filter tabs (AuroraFilterTabs.vue) ------------------------------------ */
.aurora-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.aurora-filter-tabs--compact {
    gap: 7px;
}

.aurora-filter-tabs--nowrap {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.aurora-filter-tabs--nowrap::-webkit-scrollbar {
    display: none;
}

.aurora-filter-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(var(--surface-hairline-rgb), 0.12);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: #bfd3f8;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.aurora-filter-tabs--compact .aurora-filter-tab {
    height: 32px;
    gap: 8px;
    padding: 0 10px;
    font-size: 0.8rem;
    font-weight: 800;
}

.aurora-filter-tabs--compact .aurora-filter-tab strong {
    font-size: 0.7rem;
}

.aurora-filter-tab strong {
    display: inline-grid;
    place-items: center;
    min-width: 1ch;
    color: #f8fafc;
    font-size: 0.74rem;
    line-height: 1;
}

/* On/off status chip — for toggleable feature tabs (e.g. sentiment alerts /
   daily report) so the enabled state is visible without opening the tab.
   A bare toggle glyph (mirrors the actual switch control) keeps it tiny — no
   pill or label widening the tab; the text lives in the title/aria-label. */
.aurora-filter-tab__status {
    display: inline-flex;
    align-items: center;
    margin-left: -3px;
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.95rem;
    line-height: 1;
}

.aurora-filter-tab__status.is-on {
    color: #5ee6b7;
}

/* Needs-a-fix dot: the tab's content holds a validation error that is not on
   screen (it sits on this tab, not the open one). The validation red of
   forms.css, as a dot so the tab does not widen. */
.aurora-filter-tab__alert {
    width: 7px;
    height: 7px;
    margin-left: -3px;
    border-radius: 999px;
    background: var(--danger-strong, #f87171);
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.18);
}

.aurora-filter-tab:hover {
    border-color: rgba(129, 140, 248, 0.24);
    background: rgba(20, 30, 50, 0.86);
}

.aurora-filter-tab:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.5);
    outline-offset: 3px;
}

.aurora-filter-tab.is-active {
    border-color: rgba(91, 124, 255, 0.34);
    background: rgba(40, 54, 92, 0.96);
    color: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(91, 124, 255, 0.14);
}

.aurora-filter-tabs--indigo .aurora-filter-tab.is-active {
    border-color: rgba(103, 232, 249, 0.34);
    background: rgba(8, 145, 178, 0.18);
    color: #e0faff;
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.1);
}

.aurora-filter-tabs--teal .aurora-filter-tab:hover {
    border-color: rgba(45, 212, 191, 0.26);
    background: rgba(17, 37, 45, 0.86);
}

.aurora-filter-tabs--teal .aurora-filter-tab.is-active {
    border-color: rgba(45, 212, 191, 0.42);
    background: rgba(20, 184, 166, 0.16);
    color: #ccfbf1;
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.12);
}

/* Underline variant: shared baseline + active indicator, for page-level tab navigation.
   The pill variant stays the default for list filters. */
.aurora-filter-tabs--variant-underline {
    gap: 4px;
    border-bottom: 1px solid rgba(var(--surface-hairline-rgb), 0.18);
}

.aurora-filter-tabs--variant-underline .aurora-filter-tab {
    position: relative;
    height: auto;
    padding: 9px 14px 11px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: rgba(202, 213, 232, 0.65);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.aurora-filter-tabs--variant-underline.aurora-filter-tabs--compact .aurora-filter-tab {
    padding: 6px 10px 8px;
}

.aurora-filter-tabs--variant-underline .aurora-filter-tab:hover {
    background: transparent;
    color: #dbe7ff;
    border-bottom-color: rgba(var(--surface-hairline-rgb), 0.4);
}

.aurora-filter-tabs--variant-underline .aurora-filter-tab.is-active {
    background: transparent;
    color: #f8fafc;
    box-shadow: none;
}

/* Active indicator mirrors the sidebar nav bar: same blue→cyan accent and
   rounded pill ends, so page tabs and navigation read as one accent system. */
.aurora-filter-tabs--variant-underline .aurora-filter-tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--aurora-accent-bar-from), var(--aurora-accent-bar-to));
}

.aurora-filter-tabs--variant-underline .aurora-filter-tab:focus-visible {
    outline-offset: -2px;
}

/* Section variant: top-level module tabs. The underline active indicator (as in
   the underline variant) plus a filled, rounded-top tab shape on hover/active and
   a focus glow — promoted from the Starboard module tabs so every module reads as
   one system. */
.aurora-filter-tabs--variant-section {
    gap: 4px;
    border-bottom: 1px solid rgba(var(--surface-hairline-rgb), 0.18);
}

.aurora-filter-tabs--variant-section .aurora-filter-tab {
    position: relative;
    height: auto;
    padding: 9px 14px 11px;
    border: none;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: rgba(202, 213, 232, 0.65);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.aurora-filter-tabs--variant-section.aurora-filter-tabs--compact .aurora-filter-tab {
    padding: 6px 10px 8px;
}

.aurora-filter-tabs--variant-section .aurora-filter-tab:hover {
    background: rgba(17, 27, 49, 0.78);
    color: rgba(239, 246, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.aurora-filter-tabs--variant-section .aurora-filter-tab:focus-visible {
    outline: none;
    background: rgba(15, 23, 42, 0.62);
    color: #f8fbff;
    box-shadow:
        0 0 0 2px rgba(37, 99, 235, 0.16),
        0 0 12px rgba(37, 99, 235, 0.1);
}

.aurora-filter-tabs--variant-section .aurora-filter-tab.is-active {
    background: rgba(15, 23, 42, 0.44);
    color: #f8fbff;
    box-shadow: none;
}

.aurora-filter-tabs--variant-section .aurora-filter-tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--aurora-accent-bar-from), var(--aurora-accent-bar-to));
}

/* 4. Cards, kicker, pills, KPI tiles, AI callout, incident queue (SentimentPage.vue) */
.aurora-card__kicker {
    margin: 0;
    color: #99f6e4;
    font-size: var(--surface-type-kicker);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
}

.aurora-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(var(--surface-hairline-rgb), 0.12);
    background: rgba(255, 255, 255, 0.028);
    color: rgba(226, 232, 240, 0.86);
    font-size: var(--surface-type-caption);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

.aurora-pill--badge {
    min-height: 24px;
    padding: 0 10px;
    border-color: rgba(var(--surface-hairline-rgb), 0.12);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(226, 232, 240, 0.8);
    font-size: var(--surface-type-kicker);
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: none;
}

.aurora-kpi-hero,
.aurora-kpi,
.aurora-callout {
    border-radius: var(--surface-radius-section);
    border: 1px solid rgba(var(--surface-hairline-rgb), 0.12);
    background: var(--surface-card-fill);
    box-shadow: none;
}

.aurora-kpi-hero,
.aurora-kpi {
    min-height: 132px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

/* The hero card is a lit gradient pane, so it has no border: a tone-coloured
   line fights the far end of its own gradient (amber rim against the blue
   corner), and even a transparent one lets the gradient tile into the border
   strip. One soft glint inside the top edge is the only edge treatment, for
   every tone. */
.aurora-kpi-hero {
    overflow: hidden;
    border: 0;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
    background:
        radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.22), transparent 28%),
        linear-gradient(135deg, rgba(59, 130, 246, 0.92), rgba(20, 184, 166, 0.82));
}

/* Forced-colors mode drops the gradient and the glint; without a border the
   hero card would have no edge while its sibling cards keep theirs. */
@media (forced-colors: active) {
    .aurora-kpi-hero {
        border: 1px solid CanvasText;
    }
}

.aurora-kpi-hero.tone-critical,
.aurora-kpi-hero.tone-risk,
.aurora-kpi-hero.tone-negative {
    background:
        radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.2), transparent 28%),
        linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(245, 158, 11, 0.82));
}

.aurora-kpi-hero.tone-elevated,
.aurora-kpi-hero.tone-warning {
    background:
        radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.2), transparent 28%),
        linear-gradient(135deg, rgba(217, 119, 6, 0.92), rgba(14, 165, 233, 0.72));
}

.aurora-kpi-hero span,
.aurora-kpi span {
    color: rgba(226, 232, 240, 0.74);
    font-size: var(--surface-type-kicker);
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.aurora-kpi-hero span,
.aurora-kpi-hero p,
.aurora-kpi-hero strong {
    color: #ffffff;
}

.aurora-kpi-hero strong,
.aurora-kpi strong {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--surface-ink);
    font-size: var(--surface-type-kpi);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 0.95;
}

.aurora-kpi-hero small,
.aurora-kpi small {
    color: rgba(226, 232, 240, 0.72);
    font-size: var(--surface-type-card-title);
    font-weight: 800;
}

.aurora-kpi-hero p,
.aurora-kpi p {
    margin: 0;
    color: var(--surface-muted);
    font-size: var(--surface-type-meta);
    font-weight: 700;
    line-height: 1.35;
}

.aurora-callout {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 22px 24px;
    border-color: rgba(96, 165, 250, 0.18);
    background: rgba(15, 32, 58, 0.72);
}

.aurora-callout__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #14b8a6);
    color: #eff6ff;
    font-size: 1.2rem;
}

.aurora-callout h2 {
    margin: 4px 0 0;
    color: var(--surface-ink);
    font-size: var(--surface-type-section-title);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.25;
}

.aurora-callout p:last-child {
    margin: 8px 0 0;
    color: var(--surface-muted);
    line-height: 1.62;
}

.aurora-surface-stack {
    display: flex;
    flex-direction: column;
    gap: var(--surface-gap-card);
}

.aurora-kpi-row {
    display: grid;
    grid-template-columns: 1.14fr repeat(3, minmax(0, 1fr));
    gap: var(--surface-gap-card);
}

.aurora-kpi-hero--score strong {
    font-size: var(--surface-type-kpi-score);
}

.aurora-kpi--risk {
    border-color: rgba(251, 113, 133, 0.18);
}

.aurora-kpi--risk.tone-positive,
.aurora-kpi--risk.tone-stable,
.aurora-kpi--risk.tone-resolved {
    border-color: rgba(52, 211, 153, 0.18);
}

.aurora-kpi--risk.tone-elevated,
.aurora-kpi--risk.tone-warning,
.aurora-kpi--risk.tone-guarded {
    border-color: rgba(245, 158, 11, 0.2);
}

.aurora-callout--primary {
    align-items: flex-start;
    padding: 30px;
    border-color: rgba(45, 212, 191, 0.22);
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(59, 130, 246, 0.1) 42%, rgba(10, 17, 31, 0.82)),
        rgba(10, 17, 31, 0.88);
}

.aurora-callout--primary .aurora-callout__icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
}

.aurora-callout__body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.aurora-callout__headline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--surface-gap-card);
}

.aurora-callout--primary h2 {
    max-width: 980px;
    font-size: var(--surface-type-callout-title);
    line-height: 1.16;
}

.aurora-callout--primary p {
    max-width: 1040px;
    font-size: 1rem;
}

.aurora-card {
    border-radius: var(--surface-radius-section);
    border: 1px solid rgba(var(--surface-hairline-rgb), 0.1);
    background: var(--surface-card-fill);
    box-shadow: none;
}

.aurora-card {
    padding: 24px;
}

.aurora-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--surface-gap-card);
    margin-bottom: var(--surface-gap-card);
}

.aurora-card__header-main {
    flex: 1 1 auto;
    min-width: 0;
}

.aurora-card__header-side {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--surface-gap-inner);
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.aurora-card__title {
    margin: 4px 0 0;
    color: var(--surface-ink);
    font-size: var(--surface-type-section-title);
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: 0;
}

.aurora-item-card__summary {
    margin: 0;
    color: var(--surface-muted);
    font-size: var(--surface-type-body);
    line-height: 1.6;
}

.aurora-item-list {
    display: flex;
    flex-direction: column;
    gap: var(--surface-gap-card);
}

.aurora-queue-panel .aurora-item-list {
    max-height: min(760px, calc(100vh - 330px));
    overflow-y: auto;
    padding-right: 4px;
}

.aurora-item-card__title {
    color: var(--surface-ink);
}

.aurora-item-card__badges,
.trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aurora-item-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--surface-gap-inner) var(--surface-gap-card);
    margin-top: var(--surface-gap-inner);
    font-size: var(--surface-type-meta);
}

.aurora-item-card {
    padding: 16px;
    border-radius: var(--surface-radius-action);
    border: 1px solid rgba(var(--surface-hairline-rgb), 0.1);
    background: rgba(11, 18, 32, 0.72);
}

.aurora-queue-panel {
    display: grid;
    gap: var(--surface-gap-card);
    max-height: min(900px, calc(100vh - 220px));
}

.aurora-queue-panel__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--surface-gap-inner);
    color: rgba(148, 163, 184, 0.86);
    font-size: var(--surface-type-meta);
    font-weight: 800;
}

.aurora-queue-panel__meta span {
    color: #99f6e4;
}

.aurora-item-card__top {
    display: flex;
    justify-content: space-between;
    gap: var(--surface-gap-card);
}

.aurora-item-card__header-side {
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.aurora-item-card__summary {
    margin-top: 8px;
}

.aurora-pill.tone-critical {
    background: rgba(251, 113, 133, 0.12);
    color: #fecaca;
}

.aurora-pill.tone-elevated {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
}

.aurora-pill.tone-guarded,
.aurora-pill.tone-rising {
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
}

.aurora-pill.tone-stable,
.aurora-pill.tone-neutral,
.aurora-pill.tone-reviewing {
    background: rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
}

.aurora-pill.tone-positive,
.aurora-pill.tone-resolved {
    background: rgba(52, 211, 153, 0.14);
    color: #bbf7d0;
}

.aurora-pill.tone-cooling,
.aurora-pill.tone-muted {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
}

.aurora-pill--badge.aurora-pill.tone-critical {
    background: rgba(251, 113, 133, 0.08);
    border-color: rgba(251, 113, 133, 0.14);
    color: #fda4af;
}

.aurora-pill--badge.aurora-pill.tone-elevated {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
}

.aurora-pill--badge.aurora-pill.tone-guarded,
.aurora-pill--badge.aurora-pill.tone-rising {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.14);
    color: #bfdbfe;
}

.aurora-pill--badge.aurora-pill.tone-stable,
.aurora-pill--badge.aurora-pill.tone-neutral,
.aurora-pill--badge.aurora-pill.tone-open,
.aurora-pill--badge.aurora-pill.tone-reviewing {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(var(--surface-hairline-rgb), 0.14);
    color: rgba(226, 232, 240, 0.82);
}

.aurora-pill--badge.aurora-pill.tone-positive,
.aurora-pill--badge.aurora-pill.tone-resolved {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.14);
    color: #bbf7d0;
}

.aurora-pill--badge.aurora-pill.tone-cooling,
.aurora-pill--badge.aurora-pill.tone-muted {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
}

.aurora-item-card.tone-critical {
    border-color: rgba(251, 113, 133, 0.18);
}

.aurora-item-card.tone-elevated {
    border-color: rgba(245, 158, 11, 0.18);
}

/* 5. Card subtitle + trend chart: legend, SVG line chart, points, tooltip, axis labels
      (SentimentPage.vue) ------------------------------------------------------ */
.aurora-card__subtitle {
    margin: 8px 0 0;
    color: var(--surface-muted);
    font-size: var(--surface-type-body);
    line-height: 1.55;
}

.trend-panel {
    display: flex;
    flex-direction: column;
    gap: var(--surface-gap-card);
}

.trend-legend {
    color: var(--surface-subtle);
    font-size: var(--surface-type-meta);
}

.trend-legend__dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 999px;
    margin-right: 6px;
}

.trend-legend__dot.is-total {
    background: #60a5fa;
}

.trend-legend__dot.is-negative {
    background: #fb7185;
}

.trend-legend__dot.is-risk {
    background: #f59e0b;
}

.trend-chart {
    height: 220px;
    padding: 12px 10px 8px;
    border-radius: 10px;
    background: rgba(11, 18, 32, 0.64);
    border: 1px solid rgba(var(--surface-hairline-rgb), 0.1);
}

.trend-chart__canvas {
    position: relative;
    width: 100%;
    height: 100%;
}

.trend-chart svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.trend-chart__grid {
    stroke: rgba(148, 163, 184, 0.12);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.trend-chart__line {
    fill: none;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.trend-chart__line--total {
    stroke: #60a5fa;
}

.trend-chart__line--negative {
    stroke: #fb7185;
    stroke-width: 1.35;
    stroke-dasharray: 6 5;
}

.trend-chart__line--risk {
    stroke: #f59e0b;
    stroke-width: 1.2;
    stroke-dasharray: 4 5;
}

.trend-chart__crosshair {
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: 1px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(125, 211, 252, 0), rgba(125, 211, 252, 0.36), rgba(125, 211, 252, 0));
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
}

.trend-chart__hit-area {
    position: absolute;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 2;
}

.trend-chart__hit-area:focus-visible {
    outline: 2px solid rgba(94, 234, 212, 0.9);
    outline-offset: 2px;
}

.trend-chart__point {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.22);
    border: 1px solid rgba(96, 165, 250, 0.32);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.trend-chart__hit-area.is-annotated .trend-chart__point {
    width: 10px;
    height: 10px;
    background: #f8fafc;
    border-color: rgba(96, 165, 250, 0.58);
    box-shadow: 0 0 0 5px rgba(96, 165, 250, 0.12);
}

.trend-chart__hit-area:hover .trend-chart__point,
.trend-chart__hit-area:focus-visible .trend-chart__point,
.trend-chart__hit-area.is-active .trend-chart__point,
.trend-chart__hit-area.is-pinned .trend-chart__point {
    transform: scale(1.18);
    background: #dbeafe;
    border-color: rgba(125, 211, 252, 0.92);
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.14);
}

.trend-chart__tooltip {
    position: absolute;
    z-index: 3;
    min-width: 176px;
    padding: 12px 14px;
    border-radius: var(--surface-radius-action);
    border: 1px solid rgba(125, 211, 252, 0.2);
    background: var(--surface-panel-strong);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.42);
    pointer-events: none;
}

.trend-chart__tooltip.is-pinned {
    border-color: rgba(94, 234, 212, 0.42);
}

.trend-chart__tooltip.is-align-center.is-above {
    transform: translate(-50%, calc(-100% - 16px));
}

.trend-chart__tooltip.is-align-start.is-above {
    transform: translate(0, calc(-100% - 16px));
}

.trend-chart__tooltip.is-align-end.is-above {
    transform: translate(-100%, calc(-100% - 16px));
}

.trend-chart__tooltip.is-align-center.is-below {
    transform: translate(-50%, 16px);
}

.trend-chart__tooltip.is-align-start.is-below {
    transform: translate(0, 16px);
}

.trend-chart__tooltip.is-align-end.is-below {
    transform: translate(-100%, 16px);
}

.trend-chart__tooltip-label {
    display: block;
    color: rgba(226, 232, 240, 0.76);
    font-size: var(--surface-type-kicker);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.trend-chart__tooltip-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    margin-top: 10px;
    color: #e2e8f0;
    font-size: var(--surface-type-meta);
}

.trend-chart__tooltip-grid strong {
    color: #f8fafc;
    font-weight: 800;
}

.trend-labels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px;
    color: var(--surface-subtle);
    font-size: var(--surface-type-caption);
}
