/**
 * AI Compliance Bot - Design tokens.
 *
 * Transcribed from the two <style> blocks inject_product_styles() emits in
 * app/ui/streamlit_app.py, declaration for declaration.
 *
 * The accent ramps are the output of that module's two-anchor palette math
 * (_build_palette, with LIFT 0.12 / MID 0.06 / DEEP 0.14 / DEEPER 0.28 mixed
 * from `base` toward white and black). Adding a theme means adding two anchors
 * there and mixing the same four stops here - the values are not free-hand.
 *
 * Streamlit 1.60 defines no --st-* custom properties, so every
 * var(--st-something, X) chain in the source resolves to X. Those literals are
 * inlined below rather than carried as dead fallbacks.
 */

/* ==========================================================================
   Theme vars - defaults are Harbor Blue on the light base.
   Mirrors the first <style> block inject_product_styles() emits.
   ========================================================================== */
:root {
  --product-theme-page: #F8FAFC;
  --product-theme-surface: #FFFFFF;
  --product-theme-ink: #132238;
  --product-theme-border: #D7E1EB;

  --product-theme-accent: #33608f;
  --product-theme-start: #33608f;
  --product-theme-end: #2c537b;
  --product-theme-hover-start: #3f6a96;
  --product-theme-hover-end: #33608f;
  --product-theme-brand-start: #3f6a96;
  --product-theme-brand-end: #2c537b;
  --product-theme-glow: rgba(51, 96, 143, 0.18);
  --product-theme-aura1: rgba(143, 184, 220, 0.1);
  --product-theme-aura2: rgba(51, 96, 143, 0.06);
  --product-theme-btn-start: #33608f;
  --product-theme-btn-end: #2c537b;
  --product-theme-btn-hstart: #2c537b;
  --product-theme-btn-hend: #254567;
}

/* ==========================================================================
   Derived tokens - mirrors the second <style> block.
   ========================================================================== */
:root {
  --product-page: var(--product-theme-page, #F8FAFC);
  --product-surface: var(--product-theme-surface, #FFFFFF);
  --product-ink: var(--product-theme-ink, CanvasText);
  --product-muted: color-mix(in srgb, var(--product-ink) 66%, transparent);
  --product-border: var(
    --product-theme-border,
    color-mix(in srgb, var(--product-ink) 22%, transparent)
  );
  --product-soft: color-mix(
    in srgb,
    var(--product-surface) 82%,
    var(--product-page) 18%
  );

  /* Fallbacks mirror the light-mode Harbor Blue tokens. The real values arrive
     per theme and per light/dark base from the palette blocks below. */
  --product-accent: var(--product-theme-accent, #33608f);
  --product-accent-start: var(--product-theme-start, #33608f);
  --product-accent-end: var(--product-theme-end, #2c537b);
  --product-accent-hover-start: var(--product-theme-hover-start, #3f6a96);
  --product-accent-hover-end: var(--product-theme-hover-end, #33608f);
  --product-brand-start: var(--product-theme-brand-start, #3f6a96);
  --product-brand-end: var(--product-theme-brand-end, #2c537b);
  --product-accent-glow: var(--product-theme-glow, rgba(51, 96, 143, 0.18));
  --product-accent-aura1: var(--product-theme-aura1, rgba(143, 184, 220, 0.1));
  --product-accent-aura2: var(--product-theme-aura2, rgba(51, 96, 143, 0.06));

  /* Distinct from --product-accent: this one always carries white button text,
     so it must stay deep even when the accent lightens for dark mode. */
  --product-btn-primary-start: var(--product-theme-btn-start, #33608f);
  --product-btn-primary-end: var(--product-theme-btn-end, #2c537b);
  --product-btn-primary-hover-start: var(--product-theme-btn-hstart, #2c537b);
  --product-btn-primary-hover-end: var(--product-theme-btn-hend, #254567);

  --product-accent-ink: color-mix(
    in srgb,
    var(--product-accent) 75%,
    var(--product-ink) 25%
  );
  --product-accent-soft: color-mix(
    in srgb,
    var(--product-accent) 13%,
    var(--product-page) 87%
  );

  --product-info: #0284c7;
  --product-success: #087a55;
  --product-warning: #a95806;
  --product-danger: #b42318;

  --product-control-bg: var(--product-surface);
  --product-control-hover: color-mix(
    in srgb,
    var(--product-accent) 10%,
    var(--product-surface) 90%
  );
  --product-menu-bg: color-mix(
    in srgb,
    var(--product-page) 94%,
    var(--product-accent) 6%
  );
  --product-menu-hover: color-mix(
    in srgb,
    var(--product-page) 84%,
    var(--product-accent) 16%
  );

  /* Type scale */
  --product-type-page: clamp(1.65rem, 2.5vw, 2.15rem);
  --product-type-section: clamp(1.5rem, 2.2vw, 1.85rem);
  --product-type-subsection: clamp(1.15rem, 1.7vw, 1.35rem);
  --product-type-minor: 1.02rem;
  --product-type-body: 0.88rem;
  --product-type-caption: 0.82rem;
  --product-type-badge: 0.66rem;

  --product-banner-surface: color-mix(
    in srgb,
    var(--product-surface) 82%,
    #ffffff 18%
  );

  /* Floating navigation */
  --product-nav-bg: color-mix(
    in srgb,
    var(--product-surface) 82%,
    var(--product-page) 18%
  );
  --product-nav-border: color-mix(
    in srgb,
    var(--product-border) 80%,
    rgba(255, 255, 255, 0.15) 20%
  );
  --product-nav-shadow: 0 1.15rem 3rem color-mix(
    in srgb,
    var(--product-ink) 12%,
    transparent
  );
  --product-nav-ink: var(--product-ink);
  --product-nav-muted: var(--product-muted);

  /* Glass surface system. Deliberately identical on both bases - the source
     derives every glass token from --product-surface, which is what changes. */
  --glass-blur: blur(1.5rem) saturate(150%);
  --glass-blur-soft: blur(0.9rem) saturate(130%);
  --glass-chrome: color-mix(in srgb, var(--product-surface) 58%, transparent);
  --glass-panel: color-mix(in srgb, var(--product-surface) 74%, transparent);
  --glass-inset: color-mix(in srgb, var(--product-surface) 38%, transparent);
  --glass-rim: color-mix(in srgb, var(--product-ink) 11%, transparent);
  --glass-sheen: inset 0 1px 0 color-mix(in srgb, #ffffff 48%, transparent);
  --glass-lift: 0 0.7rem 1.9rem color-mix(in srgb, var(--product-ink) 9%, transparent);
  --glass-accent-wash: color-mix(in srgb, var(--product-accent) 16%, transparent);
  --glass-accent-rim: color-mix(in srgb, var(--product-accent) 34%, transparent);

  /* Motion */
  --ease-standard: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-micro: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --motion-micro: 170ms;
  --motion-standard: 340ms;
  --motion-surface: 480ms;
  --motion-stagger: 55ms;

  /* Layout - .block-container and portal-shell metrics from the source. */
  --product-shell-max: 1400px;
  --product-shell-inset: 2rem;
  --product-shell-top: 4.15rem;
  --product-shell-bottom: 4rem;
  --product-sidebar-width: 18rem;
  --product-sidebar-min: 17rem;
  --product-sidebar-max: 19rem;

  /* Sidebar chrome - [theme.light.sidebar] in .streamlit/config.toml. */
  --product-sidebar-page: #F8FAFC;
  --product-sidebar-surface: #FFFFFF;
  --product-sidebar-ink: #132238;
  --product-sidebar-border: #D7E1EB;
}

/* ==========================================================================
   Light / dark base surfaces. Only these four change between bases.
   ========================================================================== */
:root[data-theme="light"] {
  --product-theme-page: #F8FAFC;
  --product-theme-surface: #FFFFFF;
  --product-theme-ink: #132238;
  --product-theme-border: #D7E1EB;
}

:root[data-theme="dark"] {
  --product-theme-page: #0B1220;
  --product-theme-surface: #141F30;
  --product-theme-ink: #F1F5F9;
  --product-theme-border: #334155;

  /* [theme.dark.sidebar] runs cooler and darker than the dark page. */
  --product-sidebar-page: #17191F;
  --product-sidebar-surface: #20242D;
  --product-sidebar-ink: #EEF5FC;
  --product-sidebar-border: #343944;
}

/* ==========================================================================
   Accent palettes, mixed from the anchors in _PALETTE_ANCHORS.
   `base` is the light-mode accent; `tint` is the dark-mode accent.
   ========================================================================== */

/* Harbor Blue - #33608f / #8fb8dc */
[data-palette="harbor"] {
  --product-theme-accent: #33608f;
  --product-theme-start: #33608f;
  --product-theme-end: #2c537b;
  --product-theme-hover-start: #3f6a96;
  --product-theme-hover-end: #33608f;
  --product-theme-brand-start: #3f6a96;
  --product-theme-brand-end: #2c537b;
  --product-theme-glow: rgba(51, 96, 143, 0.18);
  --product-theme-aura1: rgba(143, 184, 220, 0.1);
  --product-theme-aura2: rgba(51, 96, 143, 0.06);
  --product-theme-btn-start: #33608f;
  --product-theme-btn-end: #2c537b;
  --product-theme-btn-hstart: #2c537b;
  --product-theme-btn-hend: #254567;
}
[data-palette="harbor"][data-theme="dark"] {
  --product-theme-accent: #8fb8dc;
  --product-theme-start: #3f6a96;
  --product-theme-end: #33608f;
  --product-theme-hover-start: #4b739c;
  --product-theme-hover-end: #3f6a96;
  --product-theme-brand-start: #4b739c;
  --product-theme-brand-end: #33608f;
  --product-theme-glow: rgba(51, 96, 143, 0.4);
  --product-theme-aura1: rgba(143, 184, 220, 0.09);
  --product-theme-aura2: rgba(143, 184, 220, 0.05);
  --product-theme-btn-start: #3f6a96;
  --product-theme-btn-end: #33608f;
  --product-theme-btn-hstart: #4b739c;
  --product-theme-btn-hend: #3f6a96;
}

/* Cypress Green - #2f6a58 / #83c0aa */
[data-palette="cypress"] {
  --product-theme-accent: #2f6a58;
  --product-theme-start: #2f6a58;
  --product-theme-end: #285b4c;
  --product-theme-hover-start: #3b7362;
  --product-theme-hover-end: #2f6a58;
  --product-theme-brand-start: #3b7362;
  --product-theme-brand-end: #285b4c;
  --product-theme-glow: rgba(47, 106, 88, 0.18);
  --product-theme-aura1: rgba(131, 192, 170, 0.1);
  --product-theme-aura2: rgba(47, 106, 88, 0.06);
  --product-theme-btn-start: #2f6a58;
  --product-theme-btn-end: #285b4c;
  --product-theme-btn-hstart: #285b4c;
  --product-theme-btn-hend: #224c3f;
}
[data-palette="cypress"][data-theme="dark"] {
  --product-theme-accent: #83c0aa;
  --product-theme-start: #3b7362;
  --product-theme-end: #2f6a58;
  --product-theme-hover-start: #487c6c;
  --product-theme-hover-end: #3b7362;
  --product-theme-brand-start: #487c6c;
  --product-theme-brand-end: #2f6a58;
  --product-theme-glow: rgba(47, 106, 88, 0.4);
  --product-theme-aura1: rgba(131, 192, 170, 0.09);
  --product-theme-aura2: rgba(131, 192, 170, 0.05);
  --product-theme-btn-start: #3b7362;
  --product-theme-btn-end: #2f6a58;
  --product-theme-btn-hstart: #487c6c;
  --product-theme-btn-hend: #3b7362;
}

/* Iris Indigo - #54539b / #adace0 */
[data-palette="iris"] {
  --product-theme-accent: #54539b;
  --product-theme-start: #54539b;
  --product-theme-end: #484785;
  --product-theme-hover-start: #5e5da1;
  --product-theme-hover-end: #54539b;
  --product-theme-brand-start: #5e5da1;
  --product-theme-brand-end: #484785;
  --product-theme-glow: rgba(84, 83, 155, 0.18);
  --product-theme-aura1: rgba(173, 172, 224, 0.1);
  --product-theme-aura2: rgba(84, 83, 155, 0.06);
  --product-theme-btn-start: #54539b;
  --product-theme-btn-end: #484785;
  --product-theme-btn-hstart: #484785;
  --product-theme-btn-hend: #3c3c70;
}
[data-palette="iris"][data-theme="dark"] {
  --product-theme-accent: #adace0;
  --product-theme-start: #5e5da1;
  --product-theme-end: #54539b;
  --product-theme-hover-start: #6968a7;
  --product-theme-hover-end: #5e5da1;
  --product-theme-brand-start: #6968a7;
  --product-theme-brand-end: #54539b;
  --product-theme-glow: rgba(84, 83, 155, 0.4);
  --product-theme-aura1: rgba(173, 172, 224, 0.09);
  --product-theme-aura2: rgba(173, 172, 224, 0.05);
  --product-theme-btn-start: #5e5da1;
  --product-theme-btn-end: #54539b;
  --product-theme-btn-hstart: #6968a7;
  --product-theme-btn-hend: #5e5da1;
}

/* Sienna Clay - #8f5227 / #e0ac7e */
[data-palette="sienna"] {
  --product-theme-accent: #8f5227;
  --product-theme-start: #8f5227;
  --product-theme-end: #7b4722;
  --product-theme-hover-start: #965c34;
  --product-theme-hover-end: #8f5227;
  --product-theme-brand-start: #965c34;
  --product-theme-brand-end: #7b4722;
  --product-theme-glow: rgba(143, 82, 39, 0.18);
  --product-theme-aura1: rgba(224, 172, 126, 0.1);
  --product-theme-aura2: rgba(143, 82, 39, 0.06);
  --product-theme-btn-start: #8f5227;
  --product-theme-btn-end: #7b4722;
  --product-theme-btn-hstart: #7b4722;
  --product-theme-btn-hend: #673b1c;
}
[data-palette="sienna"][data-theme="dark"] {
  --product-theme-accent: #e0ac7e;
  --product-theme-start: #965c34;
  --product-theme-end: #8f5227;
  --product-theme-hover-start: #9c6741;
  --product-theme-hover-end: #965c34;
  --product-theme-brand-start: #9c6741;
  --product-theme-brand-end: #8f5227;
  --product-theme-glow: rgba(143, 82, 39, 0.4);
  --product-theme-aura1: rgba(224, 172, 126, 0.09);
  --product-theme-aura2: rgba(224, 172, 126, 0.05);
  --product-theme-btn-start: #965c34;
  --product-theme-btn-end: #8f5227;
  --product-theme-btn-hstart: #9c6741;
  --product-theme-btn-hend: #965c34;
}

/* Rosewood - #a03e52 / #dfa0ae */
[data-palette="rosewood"] {
  --product-theme-accent: #a03e52;
  --product-theme-start: #a03e52;
  --product-theme-end: #8a3547;
  --product-theme-hover-start: #a64a5c;
  --product-theme-hover-end: #a03e52;
  --product-theme-brand-start: #a64a5c;
  --product-theme-brand-end: #8a3547;
  --product-theme-glow: rgba(160, 62, 82, 0.18);
  --product-theme-aura1: rgba(223, 160, 174, 0.1);
  --product-theme-aura2: rgba(160, 62, 82, 0.06);
  --product-theme-btn-start: #a03e52;
  --product-theme-btn-end: #8a3547;
  --product-theme-btn-hstart: #8a3547;
  --product-theme-btn-hend: #732d3b;
}
[data-palette="rosewood"][data-theme="dark"] {
  --product-theme-accent: #dfa0ae;
  --product-theme-start: #a64a5c;
  --product-theme-end: #a03e52;
  --product-theme-hover-start: #ab5567;
  --product-theme-hover-end: #a64a5c;
  --product-theme-brand-start: #ab5567;
  --product-theme-brand-end: #a03e52;
  --product-theme-glow: rgba(160, 62, 82, 0.4);
  --product-theme-aura1: rgba(223, 160, 174, 0.09);
  --product-theme-aura2: rgba(223, 160, 174, 0.05);
  --product-theme-btn-start: #a64a5c;
  --product-theme-btn-end: #a03e52;
  --product-theme-btn-hstart: #ab5567;
  --product-theme-btn-hend: #a64a5c;
}

/* ==========================================================================
   Accessibility preferences, mirroring the source's media blocks.
   ========================================================================== */
@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass-blur: none;
    --glass-blur-soft: none;
    --glass-chrome: var(--product-nav-bg);
    --glass-panel: var(--product-surface);
    --glass-inset: color-mix(in srgb, var(--product-surface) 92%, var(--product-page));
    --glass-sheen: none;
  }
}
