/* ==========================================================================
   Late Shift Design System
   File: css/late-shift-design-system.css
   Version: 1.3
   Scope: Canonical global project-wide visual system

   Canonical dependencies:
   - Fonts: css/fonts/
   - Icons: img/lucide_icons/
   - Charts: js/apexcharts.min.js

   Principles:
   - Cinematic. Intelligent. Premium.
   - Dark cinematic framing + warm analytical workspace.
   - Late Shift red is the primary action color.
   - Serif expresses editorial meaning. Sans expresses interface structure.
   - Fluid first, breakpoint second.
   - Use this file before writing page-specific CSS.
   ========================================================================== */


/* ==========================================================================
   1. SELF-HOSTED FONTS
   ========================================================================== */

@font-face {
  font-family: "Noto Sans";
  src: url("./fonts/NotoSans-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("./fonts/NotoSans-Italic-Variable.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif";
  src: url("./fonts/NotoSerif-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif";
  src: url("./fonts/NotoSerif-Italic-Variable.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
}


/* ==========================================================================
   2. DESIGN TOKENS
   ========================================================================== */

:root {
  /* Viewport modes:
     Mobile:  0–767px
     Tablet:  768–1199px
     Desktop: 1200px+
     Small-mobile guard: <=479px
  */

  /* Typography */
  --ls-font-sans: "Noto Sans", Arial, Helvetica, sans-serif;
  --ls-font-serif: "Noto Serif", Georgia, "Times New Roman", serif;

  --ls-fw-light: 300;
  --ls-fw-regular: 400;
  --ls-fw-medium: 500;
  --ls-fw-semibold: 600;
  --ls-fw-bold: 700;

  --ls-fs-xs: clamp(0.6875rem, 0.66rem + 0.12vw, 0.75rem);
  --ls-fs-sm: clamp(0.8125rem, 0.78rem + 0.14vw, 0.875rem);
  --ls-fs-md: clamp(0.9375rem, 0.90rem + 0.18vw, 1rem);
  --ls-fs-lg: clamp(1rem, 0.96rem + 0.30vw, 1.125rem);
  --ls-fs-xl: clamp(1.125rem, 1.05rem + 0.40vw, 1.25rem);
  --ls-fs-h4: clamp(1.25rem, 1.12rem + 0.45vw, 1.375rem);
  --ls-fs-h3: clamp(1.375rem, 1.18rem + 0.80vw, 1.625rem);
  --ls-fs-h2: clamp(1.75rem, 1.45rem + 1.20vw, 2rem);
  --ls-fs-h1: clamp(2.125rem, 1.55rem + 2.20vw, 2.75rem);
  --ls-fs-display: clamp(2.75rem, 1.80rem + 3.50vw, 4rem);

  --ls-lh-tight: 1.10;
  --ls-lh-heading: 1.20;
  --ls-lh-body: 1.55;
  --ls-lh-relaxed: 1.70;

  --ls-tracking-micro: 0.10em;
  --ls-tracking-label: 0.06em;

  /* Core brand */
  --ls-black: #080708;
  --ls-white: #FFFFFF;

  --ls-red: #ED1639;
  --ls-red-ui: #E51638;
  --ls-red-hover: #D71231;
  --ls-red-active: #BE102A;
  --ls-red-soft: #FBE8EB;

  --ls-wine: #78192A;
  --ls-burgundy: #2B0D12;

  --ls-gold: #D8A14A;
  --ls-gold-soft: #F6ECD9;

  /* Dark surfaces */
  --ls-dark-950: #080708;
  --ls-dark-900: #0D0B0C;
  --ls-dark-850: #151214;
  --ls-dark-800: #1B1719;
  --ls-dark-750: #241F21;

  /* Warm light surfaces */
  --ls-canvas: #F6F2EB;
  --ls-surface: #FAF8F4;
  --ls-surface-raised: #FFFFFF;
  --ls-surface-muted: #F1ECE5;
  --ls-border: #DED7CD;
  --ls-border-strong: #C9C0B5;

  /* Text */
  --ls-text: #181516;
  --ls-text-secondary: #5F575A;
  --ls-text-muted: #756D70;
  --ls-text-faint: #81787B;
  --ls-text-inverse: #FFFFFF;
  --ls-text-inverse-muted: rgba(255,255,255,0.68);

  /* Semantic / data accents — not primary CTA colors */
  --ls-accent-green: #458B63;
  --ls-accent-green-bg: #EDF5EF;
  --ls-accent-blue: #3D78B9;
  --ls-accent-blue-bg: #EDF3F9;
  --ls-accent-violet: #8759A8;
  --ls-accent-violet-bg: #F3EEF7;
  --ls-accent-orange: #D47A36;
  --ls-accent-orange-bg: #FAF0E8;
  --ls-accent-gold: #C59A3D;
  --ls-accent-gold-bg: #F7F2E6;

  /* Status */
  --ls-success: #3F8A5C;
  --ls-success-bg: #EAF4ED;
  --ls-warning: #B77720;
  --ls-warning-bg: #FAF0DE;
  --ls-danger: #C73545;
  --ls-danger-bg: #FBEAEC;
  --ls-info: #3D78B9;
  --ls-info-bg: #EDF3F9;

  /* Fluid geometry */
  --ls-page-gutter: clamp(16px, 3vw, 48px);

  --ls-section-space-sm: clamp(32px, 4vw, 56px);
  --ls-section-space-md: clamp(48px, 6vw, 80px);
  --ls-section-space-lg: clamp(64px, 8vw, 120px);

  --ls-grid-gap-sm: clamp(12px, 1.5vw, 20px);
  --ls-grid-gap-md: clamp(16px, 2vw, 28px);
  --ls-grid-gap-lg: clamp(20px, 2.5vw, 36px);

  /* Micro spacing */
  --ls-space-1: 4px;
  --ls-space-2: 8px;
  --ls-space-3: 12px;
  --ls-space-4: 16px;
  --ls-space-5: 24px;
  --ls-space-6: 32px;
  --ls-space-7: 48px;
  --ls-space-8: 64px;

  /* Radius */
  --ls-radius-sm: 8px;
  --ls-radius-control: 10px;
  --ls-radius-card-compact: 10px;
  --ls-radius-md: 12px;
  --ls-radius-card: clamp(12px, 1.3vw, 16px);
  --ls-radius-feature: clamp(16px, 1.8vw, 24px);
  --ls-radius-pill: 999px;

  /* Shadows */
  --ls-shadow-xs: 0 1px 2px rgba(24,21,22,0.04);
  --ls-shadow-sm: 0 4px 14px rgba(24,21,22,0.06);
  --ls-shadow-md: 0 12px 32px rgba(24,21,22,0.08);

  /* Icons — canonical source: img/lucide_icons/ */
  --ls-icon-xs: 14px;
  --ls-icon-sm: 16px;
  --ls-icon-md: 20px;
  --ls-icon-lg: 24px;
  --ls-icon-xl: 32px;

  /* Controls */
  --ls-control-sm: 36px;
  --ls-control-md: 44px;
  --ls-control-lg: 52px;

  /* Layout widths */
  --ls-content-max: 1440px;
  --ls-reading-max: 920px;
  --ls-reading-narrow: 760px;
  --ls-grid-max: 1280px;

  /* Component sizes */
  --ls-modal-max: 680px;
  --ls-modal-wide-max: 920px;
  --ls-drawer-max: 520px;
  --ls-table-scroll-min: 640px;
  --ls-report-aside-width: clamp(380px, 34vw, 520px);
  --ls-report-aside-tablet-width: clamp(360px, 48vw, 500px);
  --ls-report-aside-top: var(--ls-header-height);
  --ls-report-aside-z: 980;

  /* Header / hero */
  --ls-header-height: clamp(64px, 5vw, 74px);
  --ls-header-height-compact: 56px;
  --ls-hero-standard: clamp(260px, 24vw, 340px);
  --ls-hero-large: clamp(360px, 38vw, 520px);


  /* Interaction states */
  --ls-hover-lift: -1px;
  --ls-active-shift: 1px;

  --ls-hover-bg: rgba(24,21,22,0.035);
  --ls-hover-bg-strong: rgba(24,21,22,0.055);
  --ls-hover-bg-dark: rgba(255,255,255,0.055);

  --ls-hover-border: var(--ls-border-strong);
  --ls-hover-shadow: var(--ls-shadow-sm);

  --ls-selected-ring: 0 0 0 1px rgba(237,22,57,0.14);
  --ls-selected-bg: color-mix(in srgb, var(--ls-red-soft) 46%, var(--ls-surface-raised));

  --ls-disabled-opacity: 0.52;

  --ls-interaction-fast: 120ms ease;
  --ls-interaction-base: 180ms ease;


  /* Layering / z-index */
  --ls-z-base: 0;
  --ls-z-sticky: 100;
  --ls-z-subnav: 200;
  --ls-z-header: 900;
  --ls-z-drawer-backdrop: 950;
  --ls-z-drawer: 960;
  --ls-z-aside-backdrop: 970;
  --ls-z-aside: 980;
  --ls-z-modal: 1000;
  --ls-z-tooltip: 1200;
  --ls-z-toast: 1300;

  /* Accessibility / touch */
  --ls-touch-target-min: 44px;

  /* Scrollbars */
  --ls-scrollbar-size: 10px;
  --ls-scrollbar-thumb: rgba(24,21,22,0.24);
  --ls-scrollbar-thumb-hover: rgba(24,21,22,0.38);
  --ls-scrollbar-track: transparent;
  --ls-scrollbar-thumb-dark: rgba(255,255,255,0.20);
  --ls-scrollbar-thumb-dark-hover: rgba(255,255,255,0.34);

  /* Content resilience / localization */
  --ls-copy-safe-expansion: 1.4;

  /* Print */
  --ls-print-margin: 14mm;

  /* Motion */
  --ls-transition-fast: 120ms ease;
  --ls-transition-base: 180ms ease;
  --ls-transition-slow: 280ms ease;

  /* Focus */
  --ls-focus-ring: 0 0 0 3px rgba(229,22,56,0.16);
}


/* ==========================================================================
   3. FOUNDATION
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--ls-font-sans);
  font-stretch: 100%;
  color: var(--ls-text);
  background: var(--ls-canvas);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ls-canvas);
  color: var(--ls-text);
  font-family: var(--ls-font-sans);
  font-size: var(--ls-fs-md);
  font-weight: var(--ls-fw-regular);
  line-height: var(--ls-lh-body);
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ls-focus-ring);
}

::selection {
  background: var(--ls-red);
  color: var(--ls-white);
}


/* ==========================================================================
   4. TYPOGRAPHY
   Serif = editorial meaning. Sans = interface structure.
   ========================================================================== */

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--ls-font-sans);
  line-height: var(--ls-lh-heading);
}

.ls-display,
.ls-editorial-title,
.ls-hero__title,
.ls-modal__title,
.ls-drawer__title,
.ls-empty__title {
  font-family: var(--ls-font-serif);
}

.ls-display {
  font-size: var(--ls-fs-display);
  font-weight: var(--ls-fw-semibold);
  line-height: var(--ls-lh-tight);
  letter-spacing: -0.025em;
}

h1,
.ls-h1 {
  font-size: var(--ls-fs-h1);
  font-weight: var(--ls-fw-semibold);
  line-height: var(--ls-lh-tight);
  letter-spacing: -0.02em;
}

h2,
.ls-h2 {
  font-size: var(--ls-fs-h2);
  font-weight: var(--ls-fw-semibold);
  letter-spacing: -0.015em;
}

h3,
.ls-h3 {
  font-size: var(--ls-fs-h3);
  font-weight: var(--ls-fw-semibold);
}

h4,
.ls-h4 {
  font-size: var(--ls-fs-h4);
  font-weight: var(--ls-fw-semibold);
}

p,
.ls-body {
  font-size: var(--ls-fs-md);
  line-height: var(--ls-lh-body);
}

.ls-body-lg {
  font-size: var(--ls-fs-lg);
  line-height: var(--ls-lh-relaxed);
}

.ls-meta {
  font-size: var(--ls-fs-sm);
  color: var(--ls-text-muted);
}

.ls-micro-label {
  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-semibold);
  letter-spacing: var(--ls-tracking-micro);
  text-transform: uppercase;
}

.ls-text-light { font-weight: var(--ls-fw-light); }
.ls-text-regular { font-weight: var(--ls-fw-regular); }
.ls-text-medium { font-weight: var(--ls-fw-medium); }
.ls-text-semibold { font-weight: var(--ls-fw-semibold); }
.ls-text-bold { font-weight: var(--ls-fw-bold); }

.ls-text-red { color: var(--ls-red); }
.ls-text-gold { color: var(--ls-gold); }
.ls-text-muted { color: var(--ls-text-muted); }


/* ==========================================================================
   5. LAYOUT PRIMITIVES
   ========================================================================== */

.ls-container {
  width: min(
    calc(100% - (2 * var(--ls-page-gutter))),
    var(--ls-content-max)
  );
  margin-inline: auto;
}

.ls-container--grid { max-width: var(--ls-grid-max); }

.ls-reading { width: min(100%, var(--ls-reading-max)); }
.ls-reading--narrow { width: min(100%, var(--ls-reading-narrow)); }

.ls-section { padding-block: var(--ls-section-space-md); }
.ls-section--compact { padding-block: var(--ls-section-space-sm); }

.ls-section--cinematic {
  padding-block: var(--ls-section-space-lg);
  background: var(--ls-dark-950);
  color: var(--ls-text-inverse);
}

.ls-section--analytical {
  background: var(--ls-canvas);
  color: var(--ls-text);
}

.ls-grid {
  display: grid;
  gap: var(--ls-grid-gap-md);
}



/* ==========================================================================
   6. CANONICAL INTERACTION STATES
   Hover indicates interactivity. Selected indicates chosen/current state.
   Active indicates pointer press. Focus-visible indicates keyboard focus.
   These states must remain visually distinct.
   ========================================================================== */

.ls-interactive-surface {
  transition:
    background-color var(--ls-interaction-base),
    border-color var(--ls-interaction-base),
    box-shadow var(--ls-interaction-base),
    color var(--ls-interaction-base),
    transform var(--ls-interaction-base);
}

@media (hover: hover) and (pointer: fine) {
  .ls-interactive-surface:hover {
    border-color: var(--ls-hover-border);
    box-shadow: var(--ls-hover-shadow);
    transform: translateY(var(--ls-hover-lift));
  }

  .ls-clickable-row:hover {
    background: var(--ls-hover-bg);
  }

  .ls-clickable-row--dark:hover {
    background: var(--ls-hover-bg-dark);
  }

  .ls-icon-action:hover {
    background: var(--ls-hover-bg);
    color: var(--ls-text);
  }

  .ls-icon-action--dark:hover {
    background: var(--ls-hover-bg-dark);
    color: var(--ls-white);
  }
}

.ls-interactive-surface:active,
.ls-clickable-row:active,
.ls-icon-action:active {
  transform: translateY(var(--ls-active-shift));
}

.ls-interactive-surface.is-selected,
.ls-interactive-surface[aria-selected="true"],
.ls-interactive-surface[aria-pressed="true"] {
  border-color: var(--ls-red);
  background: var(--ls-selected-bg);
  box-shadow: var(--ls-selected-ring);
}

.ls-clickable-row {
  transition:
    background-color var(--ls-interaction-fast),
    color var(--ls-interaction-fast),
    border-color var(--ls-interaction-fast);
}

.ls-icon-action {
  display: inline-grid;
  place-items: center;
  width: var(--ls-control-md);
  height: var(--ls-control-md);
  padding: 0;
  border: 0;
  border-radius: var(--ls-radius-control);
  background: transparent;
  color: var(--ls-text-muted);
  transition:
    background-color var(--ls-interaction-fast),
    color var(--ls-interaction-fast),
    transform var(--ls-interaction-fast);
}

.ls-icon-action--dark {
  color: rgba(255,255,255,0.68);
}

.ls-interactive-surface:disabled,
.ls-interactive-surface[aria-disabled="true"],
.ls-clickable-row:disabled,
.ls-clickable-row[aria-disabled="true"],
.ls-icon-action:disabled,
.ls-icon-action[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: var(--ls-disabled-opacity);
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

@media (hover: none) {
  .ls-interactive-surface:hover,
  .ls-clickable-row:hover,
  .ls-icon-action:hover {
    transform: none;
    box-shadow: inherit;
  }
}


/* Shared hover/press language for recurring clickable components. */
:where(
  .ls-card--interactive,
  .ls-choice-card,
  .ls-media-card--interactive,
  .ls-stat--interactive
) {
  transition:
    background-color var(--ls-interaction-base),
    border-color var(--ls-interaction-base),
    box-shadow var(--ls-interaction-base),
    color var(--ls-interaction-base),
    transform var(--ls-interaction-base);
}

@media (hover: hover) and (pointer: fine) {
  :where(
    .ls-card--interactive,
    .ls-choice-card,
    .ls-media-card--interactive,
    .ls-stat--interactive
  ):hover {
    border-color: var(--ls-hover-border);
    box-shadow: var(--ls-hover-shadow);
    transform: translateY(var(--ls-hover-lift));
  }
}

@media (hover: none) {
  :where(
    .ls-card--interactive,
    .ls-choice-card,
    .ls-media-card--interactive,
    .ls-stat--interactive
  ):hover {
    transform: none;
  }
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */

.ls-btn {
  min-height: var(--ls-control-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ls-space-2);
  padding: 0 clamp(16px, 2vw, 24px);

  border: 1px solid transparent;
  border-radius: var(--ls-radius-control);

  font-family: var(--ls-font-sans);
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-semibold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;

  transition:
    background-color var(--ls-transition-fast),
    border-color var(--ls-transition-fast),
    color var(--ls-transition-fast),
    transform var(--ls-transition-fast);
}

.ls-btn:hover { text-decoration: none; }
.ls-btn:active { transform: translateY(1px); }

.ls-btn:disabled,
.ls-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: var(--ls-disabled-opacity);
  transform: none;
}

.ls-btn--primary {
  background: var(--ls-red-ui);
  border-color: var(--ls-red-ui);
  color: var(--ls-white);
}

.ls-btn--primary:hover {
  background: var(--ls-red-hover);
  border-color: var(--ls-red-hover);
}

.ls-btn--primary:active {
  background: var(--ls-red-active);
  border-color: var(--ls-red-active);
}

.ls-btn--secondary {
  background: transparent;
  border-color: var(--ls-border-strong);
  color: var(--ls-text);
}

.ls-btn--secondary:hover {
  border-color: var(--ls-text);
  background: rgba(24,21,22,0.035);
}

.ls-btn--secondary-inverse {
  background: transparent;
  border-color: rgba(255,255,255,0.34);
  color: var(--ls-white);
}

.ls-btn--secondary-inverse:hover {
  border-color: rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.06);
}

.ls-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ls-text-secondary);
}

.ls-btn--ghost:hover {
  color: var(--ls-text);
  background: rgba(24,21,22,0.04);
}

.ls-btn--sm {
  min-height: var(--ls-control-sm);
  padding-inline: clamp(12px, 1.5vw, 18px);
  font-size: var(--ls-fs-xs);
}

.ls-btn--lg {
  min-height: var(--ls-control-lg);
  padding-inline: clamp(20px, 2.5vw, 30px);
  font-size: var(--ls-fs-md);
}

.ls-btn--icon {
  width: var(--ls-control-md);
  padding: 0;
}

.ls-btn--icon.ls-btn--sm { width: var(--ls-control-sm); }
.ls-btn--icon.ls-btn--lg { width: var(--ls-control-lg); }


/* ==========================================================================
   8. FORMS
   ========================================================================== */

.ls-field {
  display: grid;
  gap: var(--ls-space-2);
}

.ls-label {
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
  color: var(--ls-text-secondary);
}

.ls-input,
.ls-select,
.ls-textarea {
  width: 100%;
  min-height: 48px;

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-control);

  background: var(--ls-surface-raised);
  color: var(--ls-text);

  font-family: var(--ls-font-sans);
  font-size: max(16px, var(--ls-fs-md));
  font-weight: var(--ls-fw-regular);
  line-height: var(--ls-lh-body);

  transition:
    border-color var(--ls-transition-fast),
    box-shadow var(--ls-transition-fast),
    background-color var(--ls-transition-fast);
}

.ls-input,
.ls-select {
  height: 48px;
  padding: 0 clamp(12px, 1.5vw, 16px);
}

.ls-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;
  background-image: url("../img/lucide_icons/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
}

.ls-textarea {
  min-height: clamp(120px, 15vw, 180px);
  padding: 12px clamp(12px, 1.5vw, 16px);
  resize: vertical;
}

.ls-input::placeholder,
.ls-textarea::placeholder {
  color: var(--ls-text-muted);
  opacity: 0.82;
}

.ls-input:hover,
.ls-select:hover,
.ls-textarea:hover {
  border-color: var(--ls-border-strong);
}

.ls-input:focus,
.ls-select:focus,
.ls-textarea:focus {
  outline: none;
  border-color: var(--ls-red-ui);
  box-shadow: var(--ls-focus-ring);
}

.ls-input:disabled,
.ls-select:disabled,
.ls-textarea:disabled {
  cursor: not-allowed;
  background-color: var(--ls-surface-muted);
  color: var(--ls-text-muted);
}

.ls-field--dark .ls-label { color: var(--ls-text-inverse-muted); }

.ls-input--dark,
.ls-select--dark,
.ls-textarea--dark {
  background-color: rgba(8,7,8,0.72);
  color: var(--ls-white);
  border-color: rgba(255,255,255,0.22);
}

.ls-input--dark::placeholder,
.ls-textarea--dark::placeholder {
  color: rgba(255,255,255,0.52);
}

.ls-input--dark:hover,
.ls-select--dark:hover,
.ls-textarea--dark:hover {
  border-color: rgba(255,255,255,0.38);
}

.ls-input--dark:focus,
.ls-select--dark:focus,
.ls-textarea--dark:focus {
  border-color: var(--ls-red-ui);
  box-shadow: var(--ls-focus-ring);
}

.ls-check {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--ls-space-2);
  cursor: pointer;
  font-size: var(--ls-fs-sm);
}

.ls-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--ls-red-ui);
}

.ls-field-help {
  font-size: var(--ls-fs-xs);
  color: var(--ls-text-muted);
}

.ls-field-error {
  font-size: var(--ls-fs-xs);
  color: var(--ls-danger);
}


/* ==========================================================================
   9. CARDS / BOXES / CHOICES / STATS
   ========================================================================== */

.ls-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--ls-surface-raised);
  color: var(--ls-text);
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);
  box-shadow: var(--ls-shadow-xs);

  transition:
    border-color var(--ls-transition-base),
    box-shadow var(--ls-transition-base),
    transform var(--ls-transition-base),
    background-color var(--ls-transition-base);
}

.ls-card__body { padding: clamp(18px, 2.2vw, 28px); }

.ls-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ls-grid-gap-sm);
  padding: clamp(18px, 2.2vw, 28px);
  padding-bottom: 0;
}

.ls-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ls-grid-gap-sm);
  padding: 0 clamp(18px, 2.2vw, 28px) clamp(18px, 2.2vw, 28px);
}

.ls-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.ls-card__title {
  display: block;
  margin: 0;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-fs-h4);
  font-weight: var(--ls-fw-semibold);
  line-height: var(--ls-lh-heading);
}

.ls-card__meta {
  margin-top: var(--ls-space-2);
  font-size: var(--ls-fs-sm);
  color: var(--ls-text-muted);
}

.ls-card--compact { border-radius: var(--ls-radius-card-compact); }
.ls-card--soft { background: var(--ls-surface); }

.ls-card--dark {
  background: var(--ls-dark-900);
  color: var(--ls-text-inverse);
  border-color: rgba(255,255,255,0.10);
  box-shadow: none;
}

.ls-card--dark .ls-card__meta { color: var(--ls-text-inverse-muted); }
.ls-card--feature { border-radius: var(--ls-radius-feature); }
.ls-card--interactive { cursor: pointer; }

.ls-card--interactive:hover {
  border-color: var(--ls-hover-border);
  box-shadow: var(--ls-hover-shadow);
  transform: translateY(var(--ls-hover-lift));
}

.ls-card--selected,
.ls-card[aria-selected="true"] {
  border-color: var(--ls-red);
  box-shadow: var(--ls-selected-ring);
}

.ls-card--disabled,
.ls-card[aria-disabled="true"] {
  opacity: 0.56;
  filter: saturate(0.75);
  pointer-events: none;
}

.ls-box {
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-md);
  background: transparent;
  padding: clamp(16px, 2vw, 24px);
}

.ls-box--cinematic {
  background: linear-gradient(135deg, var(--ls-dark-900), var(--ls-burgundy));
  color: var(--ls-white);
  border: 1px solid rgba(255,255,255,0.10);
}

/* Choice cards */
.ls-choice-card {
  position: relative;
  display: grid;
  gap: var(--ls-space-3);

  padding: clamp(16px, 2vw, 24px);

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);

  background: var(--ls-surface-raised);
  color: var(--ls-text);

  cursor: pointer;

  transition:
    border-color var(--ls-transition-fast),
    box-shadow var(--ls-transition-fast),
    background-color var(--ls-transition-fast),
    transform var(--ls-transition-fast);
}

.ls-choice-card:hover {
  border-color: var(--ls-border-strong);
  box-shadow: var(--ls-shadow-sm);
}

.ls-choice-card.is-selected,
.ls-choice-card[aria-selected="true"] {
  border-color: var(--ls-red);
  background: var(--ls-selected-bg);
  box-shadow: var(--ls-selected-ring);
}

.ls-choice-card__control {
  position: absolute;
  top: 14px;
  right: 14px;

  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;

  border: 1px solid var(--ls-border-strong);
  border-radius: 50%;
  background: var(--ls-surface-raised);
}

.ls-choice-card.is-selected .ls-choice-card__control,
.ls-choice-card[aria-selected="true"] .ls-choice-card__control {
  border-color: var(--ls-red-ui);
  background: var(--ls-red-ui);
  color: var(--ls-white);
}

.ls-choice-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--ls-radius-card) - 2px);
}

.ls-choice-card__title {
  margin: 0;
  padding-right: 28px;
  font-size: var(--ls-fs-lg);
  font-weight: var(--ls-fw-semibold);
}

.ls-choice-card__description,
.ls-choice-card__meta {
  margin: 0;
  color: var(--ls-text-secondary);
  font-size: var(--ls-fs-sm);
}

/* Stat / KPI tiles */
.ls-stat {
  display: grid;
  gap: var(--ls-space-2);

  padding: clamp(16px, 2vw, 24px);

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);

  background: var(--ls-surface-raised);
}

.ls-stat--compact { padding: 14px 16px; }

.ls-stat--dark {
  background: var(--ls-dark-900);
  color: var(--ls-white);
  border-color: rgba(255,255,255,0.10);
}

.ls-stat__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;

  border-radius: 10px;

  background: var(--ls-red-soft);
  color: var(--ls-red);
}

.ls-stat--dark .ls-stat__icon {
  background: rgba(237,22,57,0.14);
  color: var(--ls-red);
}

.ls-stat__label {
  color: var(--ls-text-muted);
  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-semibold);
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
}

.ls-stat--dark .ls-stat__label { color: var(--ls-text-inverse-muted); }

.ls-stat__value {
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  font-weight: var(--ls-fw-semibold);
  line-height: 1.05;
}

.ls-stat__meta {
  color: var(--ls-text-secondary);
  font-size: var(--ls-fs-sm);
}

.ls-stat--dark .ls-stat__meta { color: var(--ls-text-inverse-muted); }


/* ==========================================================================
   10. BADGES / CHIPS / STATUS
   ========================================================================== */

.ls-badge,
.ls-chip,
.ls-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border-radius: var(--ls-radius-pill);
  white-space: nowrap;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-semibold);
  line-height: 1;
}

.ls-badge {
  min-height: 26px;
  padding: 0 10px;
  color: var(--ls-text-secondary);
  background: var(--ls-surface-muted);
  border: 1px solid var(--ls-border);
}

.ls-chip {
  min-height: 32px;
  padding: 0 12px;
  color: var(--ls-text-secondary);
  background: var(--ls-surface-raised);
  border: 1px solid var(--ls-border);
}

button.ls-chip,
a.ls-chip {
  cursor: pointer;
  transition:
    background-color var(--ls-transition-fast),
    border-color var(--ls-transition-fast),
    color var(--ls-transition-fast);
}

button.ls-chip:hover,
a.ls-chip:hover {
  border-color: var(--ls-border-strong);
  color: var(--ls-text);
}

.ls-chip--selected,
.ls-chip[aria-selected="true"],
.ls-chip[aria-pressed="true"] {
  color: var(--ls-red);
  border-color: var(--ls-red);
  background: var(--ls-red-soft);
}

.ls-status {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid transparent;
}

.ls-status--success { color: var(--ls-success); background: var(--ls-success-bg); }
.ls-status--warning { color: var(--ls-warning); background: var(--ls-warning-bg); }
.ls-status--danger { color: var(--ls-danger); background: var(--ls-danger-bg); }
.ls-status--info { color: var(--ls-info); background: var(--ls-info-bg); }
.ls-status--brand { color: var(--ls-red); background: var(--ls-red-soft); }

.ls-status--neutral {
  color: var(--ls-text-secondary);
  background: var(--ls-surface-muted);
  border-color: var(--ls-border);
}

.ls-badge--dark,
.ls-chip--dark {
  color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

.ls-chip--dark.ls-chip--selected,
.ls-chip--dark[aria-selected="true"],
.ls-chip--dark[aria-pressed="true"] {
  color: var(--ls-white);
  background: rgba(237,22,57,0.18);
  border-color: var(--ls-red);
}


/* ==========================================================================
   11. SECTION HEADINGS / TOOLBARS / SEARCH
   ========================================================================== */

.ls-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--ls-grid-gap-md);

  margin-bottom: clamp(20px, 2.8vw, 36px);
}

.ls-section-heading__eyebrow {
  margin-bottom: 8px;
  color: var(--ls-red);
  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-bold);
  letter-spacing: var(--ls-tracking-micro);
  text-transform: uppercase;
}

.ls-section-heading__title {
  margin: 0;
  font-family: var(--ls-font-serif);
  font-size: var(--ls-fs-h2);
  font-weight: var(--ls-fw-semibold);
  line-height: var(--ls-lh-heading);
}

.ls-section-heading__description {
  width: min(100%, 720px);
  margin: 10px 0 0;
  color: var(--ls-text-secondary);
  font-size: var(--ls-fs-md);
}

.ls-section-heading__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ls-space-3);
}

.ls-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ls-grid-gap-sm);
  flex-wrap: wrap;

  margin-bottom: clamp(16px, 2vw, 24px);
}

.ls-toolbar__primary,
.ls-toolbar__filters,
.ls-toolbar__actions {
  display: flex;
  align-items: center;
  gap: var(--ls-space-2);
  flex-wrap: wrap;
}

.ls-toolbar__primary { flex: 1 1 280px; }
.ls-toolbar__filters { flex: 1 1 auto; }
.ls-toolbar__actions { margin-left: auto; }

.ls-toolbar__count {
  color: var(--ls-text-muted);
  font-size: var(--ls-fs-sm);
  white-space: nowrap;
}

.ls-search {
  position: relative;
  width: min(100%, 420px);
}

.ls-search .ls-input {
  padding-left: 42px;
}

.ls-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  translate: 0 -50%;
  width: var(--ls-icon-sm);
  height: var(--ls-icon-sm);
  color: var(--ls-text-muted);
  pointer-events: none;
}


/* ==========================================================================
   12. HEADER / PRIMARY NAVIGATION / MENUS
   ========================================================================== */

.ls-header {
  position: relative;
  z-index: var(--ls-z-header);
  width: 100%;
  min-height: var(--ls-header-height);
  background: var(--ls-dark-950);
  color: var(--ls-white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ls-header--sticky {
  position: sticky;
  top: 0;
}

.ls-header__inner {
  width: min(
    calc(100% - (2 * var(--ls-page-gutter))),
    var(--ls-content-max)
  );
  min-height: var(--ls-header-height);
  margin-inline: auto;

  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
}

.ls-header__brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  color: var(--ls-white);
  text-decoration: none;
}

.ls-header__logo {
  display: block;
  width: 150px;
  max-width: 150px;
  max-height: 36px;
}

.ls-header__nav {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  align-self: stretch;
}

.ls-header__actions {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 12px);
}

.ls-header__divider {
  width: 1px;
  height: 24px;
  margin-inline: var(--ls-space-1);
  background: rgba(255,255,255,0.12);
}

.ls-nav {
  display: flex;
  align-items: stretch;
  gap: clamp(4px, 0.55vw, 10px);
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--ls-font-sans);
}

.ls-nav__item {
  position: relative;
  display: flex;
  align-items: center;
}

.ls-nav__link {
  position: relative;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding-inline: 14px;

  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;

  color: rgba(255,255,255,0.70);
  text-decoration: none;

  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
  line-height: 1;

  transition:
    color var(--ls-transition-fast),
    background-color var(--ls-transition-fast);
}

.ls-nav__link::after {
  content: "";
  position: absolute;
  left: clamp(10px, 1.15vw, 18px);
  right: clamp(10px, 1.15vw, 18px);
  bottom: 0;

  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.ls-nav__link:hover {
  color: var(--ls-white);
  background: rgba(120,25,42,0.16);
}

.ls-nav__link.is-active,
.ls-nav__link[aria-current="page"],
.ls-nav__item.is-active > .ls-nav__link {
  color: var(--ls-white);
  border-color: rgba(237,22,57,0.28);
  background: linear-gradient(180deg, rgba(120,25,42,0.42), rgba(43,13,18,0.62));
  box-shadow: inset 0 0 18px rgba(237,22,57,0.08);
}

.ls-nav__link.is-active::after,
.ls-nav__link[aria-current="page"]::after {
  background: var(--ls-red);
}

.ls-nav__link.is-active .ls-icon,
.ls-nav__link[aria-current="page"] .ls-icon {
  color: var(--ls-red);
}

.ls-header-action {
  min-width: var(--ls-control-md);
  min-height: var(--ls-control-md);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding-inline: 10px;

  border: 1px solid transparent;
  border-radius: var(--ls-radius-control);

  background: transparent;
  color: rgba(255,255,255,0.72);

  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
  text-decoration: none;
}

.ls-header-action:hover {
  color: var(--ls-white);
  background: rgba(255,255,255,0.05);
}

.ls-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  min-height: var(--ls-control-md);
  padding: 4px 8px 4px 4px;

  border: 0;
  border-radius: var(--ls-radius-pill);

  background: transparent;
  color: var(--ls-white);

  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
}

.ls-profile:hover { background: rgba(255,255,255,0.05); }

.ls-profile__avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;

  display: grid;
  place-items: center;
  overflow: hidden;

  border-radius: 50%;
  background: var(--ls-dark-750);
  border: 1px solid rgba(255,255,255,0.10);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-semibold);
}

.ls-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ls-menu {
  min-width: 220px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 8px;

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-md);

  background: var(--ls-surface-raised);
  color: var(--ls-text);

  box-shadow: var(--ls-shadow-md);
}

.ls-menu--dark {
  background: var(--ls-dark-850);
  color: var(--ls-white);
  border-color: rgba(255,255,255,0.10);
}

.ls-menu__label {
  padding: 8px 10px 6px;
  color: var(--ls-text-muted);
  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-semibold);
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
}

.ls-menu__item {
  position: relative;

  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%;
  padding: 8px 10px;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: var(--ls-text-secondary);

  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
  text-align: left;
  text-decoration: none;
}

.ls-menu__item:hover {
  background: var(--ls-surface-muted);
  color: var(--ls-text);
}

.ls-menu--dark .ls-menu__item { color: rgba(255,255,255,0.72); }

.ls-menu--dark .ls-menu__item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--ls-white);
}

.ls-menu__item.is-active,
.ls-menu__item[aria-current="page"],
.ls-menu__item[aria-selected="true"] {
  color: var(--ls-red);
  background: var(--ls-red-soft);
}

/* Mega menu */
.ls-mega-menu {
  width: min(920px, calc(100vw - (2 * var(--ls-page-gutter))));
  padding: clamp(18px, 2.5vw, 28px);

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-feature);

  background: var(--ls-surface-raised);
  color: var(--ls-text);

  box-shadow: var(--ls-shadow-md);
}

.ls-mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ls-grid-gap-md);
}

.ls-mega-menu__group {
  display: grid;
  gap: var(--ls-space-2);
}

.ls-mega-menu__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;

  padding: 12px;

  border-radius: var(--ls-radius-md);

  color: var(--ls-text);
  text-decoration: none;
}

.ls-mega-menu__item:hover { background: var(--ls-surface-muted); }

.ls-mega-menu__thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
}

.ls-mega-menu__title {
  margin: 0;
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-semibold);
}

.ls-mega-menu__description {
  margin: 4px 0 0;
  color: var(--ls-text-muted);
  font-size: var(--ls-fs-xs);
}

.ls-mega-menu--cinematic {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: min(560px, calc(100vw - 32px));
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  background: rgba(13,11,12,0.96);
  color: var(--ls-white);
  box-shadow: 0 18px 42px rgba(0,0,0,0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ls-mega-menu--cinematic .ls-mega-menu__item {
  grid-template-columns: 28px minmax(0,1fr) 16px 145px;
  align-items: center;
  min-height: 72px;
  gap: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  color: rgba(255,255,255,0.88);
}

.ls-mega-menu--cinematic .ls-mega-menu__item + .ls-mega-menu__item {
  border-top: 1px solid rgba(255,255,255,0.07);
}

.ls-mega-menu--cinematic .ls-mega-menu__item:hover {
  background: linear-gradient(90deg, rgba(120,25,42,0.20), rgba(237,22,57,0.035));
}

.ls-mega-menu--cinematic .ls-mega-menu__item[aria-current="page"],
.ls-mega-menu--cinematic .ls-mega-menu__item[aria-selected="true"],
.ls-mega-menu--cinematic .ls-mega-menu__item.is-selected {
  background: linear-gradient(90deg, rgba(120,25,42,0.34), rgba(43,13,18,0.26));
  box-shadow: inset 3px 0 0 var(--ls-red);
}

.ls-mega-menu--cinematic .ls-mega-menu__item > .ls-icon:first-child {
  width: 24px;
  height: 24px;
}

.ls-mega-menu--cinematic .ls-mega-menu__item > .ls-icon:nth-last-child(2) {
  width: 15px;
  height: 15px;
  opacity: 0.64;
}

.ls-mega-menu--cinematic .ls-mega-menu__item:hover > .ls-icon,
.ls-mega-menu--cinematic .ls-mega-menu__item[aria-current="page"] > .ls-icon {
  filter: invert(20%) sepia(98%) saturate(4300%) hue-rotate(343deg) brightness(94%) contrast(96%);
  opacity: 1;
}

.ls-mega-menu--cinematic .ls-mega-menu__item > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.ls-mega-menu--cinematic .ls-mega-menu__item strong {
  font-size: 15px;
  font-weight: var(--ls-fw-semibold);
}

.ls-mega-menu--cinematic .ls-mega-menu__item small {
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  font-weight: var(--ls-fw-regular);
  line-height: 1.35;
}

.ls-mega-menu--cinematic .ls-mega-menu__item > img:not(.ls-icon) {
  width: 145px;
  height: 62px;
  border-radius: 6px;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.06) brightness(0.76);
}

.ls-mega-menu--cinematic .ls-mega-menu__item[aria-current="page"] > img:not(.ls-icon) {
  filter: saturate(0.96) contrast(1.08) brightness(0.88);
}

/* Compact application dropdowns remain distinct from cinematic mega menus. */
.lateshift-nav__dropdown {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: max-content;
  min-width: 200px;
  max-width: 280px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  background: var(--ls-dark-850);
  color: var(--ls-white);
  box-shadow: 0 14px 32px rgba(0,0,0,0.28);
}

.lateshift-profile__dropdown {
  right: 0;
  left: auto;
  width: max-content;
  min-width: 220px;
  max-width: 260px;
}

.lateshift-global-nav .ls-icon {
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}

.lateshift-mobile-trigger,
.lateshift-profile__trigger,
.lateshift-quick-action {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,0.76);
  font: var(--ls-fw-medium) var(--ls-fs-sm)/1 var(--ls-font-sans);
}

.lateshift-mobile-trigger { display: none; }
.lateshift-user-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lateshift-quick-action { display: flex; align-items: center; gap: 7px; padding-inline: 14px; border: 1px solid rgba(237,22,57,0.32); }
.lateshift-quick-action:disabled { color: rgba(255,255,255,0.34); cursor: default; }
.lateshift-profile { position: relative; }
.lateshift-profile__trigger { display: flex; align-items: center; gap: 8px; padding: 5px 7px; cursor: pointer; }
.lateshift-profile__trigger:hover,
.lateshift-profile__trigger[aria-expanded="true"] { background: rgba(255,255,255,0.05); color: var(--ls-white); }
.lateshift-profile__trigger > .ls-icon:last-child { width: 12px; height: 12px; }
.lateshift-avatar { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,0.22); border-radius: 50%; background: var(--ls-wine); color: var(--ls-white); font-size: 11px; font-weight: var(--ls-fw-semibold); }
.lateshift-profile__name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lateshift-nav__dropdown a,
.lateshift-nav__dropdown > button,
.lateshift-nav__dropdown form > button,
.lateshift-language-selector summary { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: rgba(255,255,255,0.78); text-align: left; text-decoration: none; font: inherit; }
.lateshift-nav__dropdown a:hover,
.lateshift-nav__dropdown form > button:hover,
.lateshift-language-selector summary:hover { background: rgba(255,255,255,0.06); color: var(--ls-white); }
.lateshift-nav__dropdown button:disabled { color: rgba(255,255,255,0.42); cursor: default; }
.lateshift-nav__dropdown span { display: grid; min-width: 0; gap: 2px; }
.lateshift-nav__dropdown strong { font-size: 13px; }
.lateshift-nav__dropdown small { color: rgba(255,255,255,0.56); font-size: 10px; line-height: 1.35; }
.lateshift-profile__summary { display: grid; gap: 3px; margin: 2px 5px 7px; padding: 8px 5px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.lateshift-profile__summary strong { font-size: 13px; }
.lateshift-profile__summary small { overflow: hidden; color: rgba(255,255,255,0.56); font-size: 10px; text-overflow: ellipsis; }
.lateshift-language-selector { border-radius: 8px; }
.lateshift-language-selector[open] { background: rgba(237,22,57,0.07); box-shadow: inset 3px 0 0 var(--ls-red); }
.lateshift-language-selector summary { cursor: pointer; list-style: none; }
.lateshift-language-selector summary::-webkit-details-marker { display: none; }
.lateshift-language-selector form,
.lateshift-signout-form { margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,0.08); }
.lateshift-language-selector form { padding: 5px 6px 6px; }
.lateshift-language-selector form button { justify-content: space-between; font-size: 13px; font-weight: var(--ls-fw-semibold); }
.lateshift-language-selector form button[aria-current="true"] { background: rgba(237,22,57,0.14); color: var(--ls-white); }
.lateshift-signout { color: var(--ls-white); }

@media (max-width: 1100px) {
  .lateshift-profile__name,
  .lateshift-quick-action span { display: none; }
}

@media (max-width: 767px) {
  .lateshift-mobile-trigger { display: inline-grid; width: 44px; place-items: center; margin-left: auto; }
  .lateshift-nav { position: fixed; z-index: var(--ls-z-header); top: var(--ls-header-height); right: 0; bottom: 0; left: 0; display: none; overflow-y: auto; padding: 12px 14px 28px; background: var(--ls-dark-950); }
  .lateshift-nav.is-open { display: block; }
  .lateshift-nav__item { display: block; margin-bottom: 4px; }
  .lateshift-nav__link { width: 100%; justify-content: flex-start; }
  .lateshift-nav__link > .ls-icon:last-child { margin-left: auto; }
  .ls-mega-menu--cinematic { position: static; width: 100%; margin: 4px 0 9px; box-shadow: none; }
  .ls-mega-menu--cinematic .ls-mega-menu__item { grid-template-columns: 26px minmax(0,1fr) 14px 112px; }
  .ls-mega-menu--cinematic .ls-mega-menu__item > img:not(.ls-icon) { width: 112px; height: 54px; }
}

@media (max-width: 479px) {
  .ls-mega-menu--cinematic .ls-mega-menu__item { grid-template-columns: 24px minmax(0,1fr) 14px; }
  .ls-mega-menu--cinematic .ls-mega-menu__item > img:not(.ls-icon) { display: none; }
}


/* ==========================================================================
   13. CINEMATIC HERO / SUBNAV
   ========================================================================== */

.ls-hero {
  position: relative;
  isolation: isolate;

  min-height: var(--ls-hero-standard);
  display: flex;
  align-items: flex-end;
  overflow: hidden;

  background:
    linear-gradient(90deg, rgba(8,7,8,0.92) 0%, rgba(8,7,8,0.64) 45%, rgba(8,7,8,0.18) 100%),
    var(--ls-dark-900);

  color: var(--ls-white);
}

.ls-hero--large { min-height: var(--ls-hero-large); }

.ls-hero__media {
  position: absolute;
  inset: 0;
  z-index: -3;

  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ls-hero__veil {
  position: absolute;
  inset: 0;
  z-index: -2;

  background:
    linear-gradient(180deg, rgba(8,7,8,0.04) 0%, rgba(8,7,8,0.30) 100%);
}

.ls-hero__inner {
  width: min(
    calc(100% - (2 * var(--ls-page-gutter))),
    var(--ls-content-max)
  );
  margin-inline: auto;

  padding-block:
    clamp(48px, 6vw, 88px)
    clamp(34px, 4.5vw, 60px);
}

.ls-hero__content { width: min(100%, 760px); }

.ls-hero__eyebrow {
  margin-bottom: clamp(10px, 1.2vw, 16px);
  color: var(--ls-red);
  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-bold);
  letter-spacing: var(--ls-tracking-micro);
  text-transform: uppercase;
}

.ls-hero__title {
  margin: 0;
  font-size: var(--ls-fs-display);
  font-weight: var(--ls-fw-semibold);
  line-height: var(--ls-lh-tight);
  letter-spacing: -0.025em;
}

.ls-hero__lead {
  width: min(100%, 680px);
  margin: clamp(14px, 1.8vw, 22px) 0 0;

  color: rgba(255,255,255,0.76);

  font-size: var(--ls-fs-lg);
  font-weight: var(--ls-fw-regular);
  line-height: var(--ls-lh-relaxed);
}

.ls-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ls-space-3);
  margin-top: clamp(20px, 2.6vw, 32px);
}

.ls-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.6vw, 32px);
  margin-top: clamp(20px, 2.8vw, 36px);
}

.ls-hero__metric {
  display: grid;
  gap: 3px;
}

.ls-hero__metric-value {
  color: var(--ls-white);
  font-size: var(--ls-fs-xl);
  font-weight: var(--ls-fw-semibold);
}

.ls-hero__metric-label {
  color: rgba(255,255,255,0.54);
  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-medium);
}

.ls-hero--center .ls-hero__inner {
  display: grid;
  place-items: center;
  text-align: center;
}

.ls-hero--center .ls-hero__content { width: min(100%, 860px); }
.ls-hero--center .ls-hero__lead { margin-inline: auto; }
.ls-hero--center .ls-hero__actions,
.ls-hero--center .ls-hero__meta { justify-content: center; }

.ls-hero--soft-overlay {
  background:
    linear-gradient(90deg, rgba(8,7,8,0.78) 0%, rgba(8,7,8,0.40) 50%, rgba(8,7,8,0.08) 100%),
    var(--ls-dark-900);
}

.ls-hero--deep-overlay {
  background:
    linear-gradient(90deg, rgba(8,7,8,0.96) 0%, rgba(8,7,8,0.78) 52%, rgba(8,7,8,0.30) 100%),
    var(--ls-dark-950);
}

.ls-subnav {
  position: relative;
  z-index: 20;
  background: var(--ls-surface-raised);
  border-bottom: 1px solid var(--ls-border);
}

.ls-subnav--sticky {
  position: sticky;
  top: var(--ls-header-height);
}

.ls-subnav__inner {
  width: min(
    calc(100% - (2 * var(--ls-page-gutter))),
    var(--ls-content-max)
  );
  margin-inline: auto;

  display: flex;
  align-items: center;
  gap: 4px;

  overflow-x: auto;
  scrollbar-width: none;
}

.ls-subnav__inner::-webkit-scrollbar { display: none; }

.ls-subnav__link {
  position: relative;

  min-height: 52px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;

  padding-inline: clamp(10px, 1.2vw, 16px);

  color: var(--ls-text-secondary);
  text-decoration: none;

  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
  white-space: nowrap;
}

.ls-subnav__link:hover { color: var(--ls-text); }

.ls-subnav__link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;

  height: 2px;
  background: transparent;
}

.ls-subnav__link.is-active,
.ls-subnav__link[aria-current="page"] {
  color: var(--ls-text);
}

.ls-subnav__link.is-active::after,
.ls-subnav__link[aria-current="page"]::after {
  background: var(--ls-red);
}


/* ==========================================================================
   14. TABS / SEGMENTED / TABLES / DATA LISTS
   ========================================================================== */

.ls-tabs {
  display: flex;
  align-items: center;
  gap: 4px;

  overflow-x: auto;
  scrollbar-width: none;

  border-bottom: 1px solid var(--ls-border);
}

.ls-tabs::-webkit-scrollbar { display: none; }

.ls-tab {
  position: relative;
  min-height: 48px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  flex: 0 0 auto;
  padding-inline: clamp(10px, 1.4vw, 18px);

  border: 0;
  background: transparent;
  color: var(--ls-text-secondary);

  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
  white-space: nowrap;
  text-decoration: none;
}

.ls-tab:hover { color: var(--ls-text); }

.ls-tab::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;

  height: 2px;
  background: transparent;
}

.ls-tab.is-active,
.ls-tab[aria-selected="true"] {
  color: var(--ls-text);
}

.ls-tab.is-active::after,
.ls-tab[aria-selected="true"]::after {
  background: var(--ls-red);
}

.ls-segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-md);

  background: var(--ls-surface-muted);
}

.ls-segmented__item {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 0 12px;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: var(--ls-text-secondary);

  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
}

.ls-segmented__item:hover { color: var(--ls-text); }

.ls-segmented__item.is-active,
.ls-segmented__item[aria-pressed="true"],
.ls-segmented__item[aria-selected="true"] {
  background: var(--ls-surface-raised);
  color: var(--ls-text);
  box-shadow: var(--ls-shadow-xs);
}

.ls-table-wrap {
  width: 100%;
  overflow-x: auto;

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);

  background: var(--ls-surface-raised);
}

.ls-table {
  width: 100%;
  min-width: var(--ls-table-scroll-min);
  border-collapse: collapse;
  font-size: var(--ls-fs-sm);
}

.ls-table th,
.ls-table td {
  padding: clamp(12px, 1.5vw, 18px);
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--ls-border);
}

.ls-table th {
  color: var(--ls-text-secondary);
  background: var(--ls-surface);
  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-semibold);
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
}

.ls-table tbody tr:last-child td { border-bottom: 0; }
.ls-table tbody tr:hover td { background: rgba(24,21,22,0.025); }

.ls-data-list {
  display: grid;
  gap: 0;

  margin: 0;
  padding: 0;
  list-style: none;

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);
  background: var(--ls-surface-raised);
  overflow: hidden;
}

.ls-data-list__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ls-grid-gap-sm);

  padding: clamp(14px, 1.8vw, 20px);
  border-bottom: 1px solid var(--ls-border);
}

.ls-data-list__item:last-child { border-bottom: 0; }

.ls-data-list__label {
  color: var(--ls-text-secondary);
  font-size: var(--ls-fs-sm);
}

.ls-data-list__value {
  color: var(--ls-text);
  font-weight: var(--ls-fw-semibold);
}


/* ==========================================================================
   15. STEPPER / PROGRESS / STATE
   ========================================================================== */

.ls-progress { width: 100%; }

.ls-progress__track {
  width: 100%;
  height: 8px;

  overflow: hidden;
  border-radius: var(--ls-radius-pill);

  background: var(--ls-surface-muted);
}

.ls-progress__bar {
  height: 100%;
  width: var(--ls-progress, 0%);
  border-radius: inherit;
  background: var(--ls-red-ui);

  transition: width var(--ls-transition-slow);
}

.ls-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--ls-space-3);

  margin-top: 8px;

  color: var(--ls-text-muted);
  font-size: var(--ls-fs-xs);
}

.ls-progress--success .ls-progress__bar { background: var(--ls-success); }
.ls-progress--warning .ls-progress__bar { background: var(--ls-warning); }

.ls-stepper {
  display: grid;
  gap: var(--ls-space-4);
}

.ls-stepper--horizontal {
  grid-template-columns: repeat(var(--ls-step-count, 3), minmax(0, 1fr));
}

.ls-stepper--vertical {
  grid-template-columns: minmax(0, 1fr);
}

.ls-stepper__item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ls-stepper__marker {
  position: relative;
  z-index: 2;

  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;

  border-radius: 50%;

  background: var(--ls-surface-muted);
  color: var(--ls-text-muted);
  border: 1px solid var(--ls-border);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-semibold);
}

.ls-stepper__item.is-active .ls-stepper__marker {
  background: var(--ls-red-ui);
  color: var(--ls-white);
  border-color: var(--ls-red-ui);
}

.ls-stepper__item.is-complete .ls-stepper__marker {
  background: var(--ls-success);
  color: var(--ls-white);
  border-color: var(--ls-success);
}

.ls-stepper__content {
  display: grid;
  gap: 4px;
}

.ls-stepper__label {
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-semibold);
}

.ls-stepper__meta {
  color: var(--ls-text-muted);
  font-size: var(--ls-fs-xs);
}

.ls-stepper--vertical .ls-stepper__item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: calc(-1 * var(--ls-space-4));

  width: 2px;
  background: var(--ls-border);
}

.ls-stepper--vertical .ls-stepper__item.is-complete:not(:last-child)::after {
  background: var(--ls-success);
}


/* ==========================================================================
   16. SUMMARY PANELS / ACTION BARS / PRICE
   ========================================================================== */

.ls-summary-panel {
  padding: clamp(18px, 2.2vw, 28px);

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);

  background: var(--ls-surface-raised);
  box-shadow: var(--ls-shadow-sm);
}

.ls-summary-panel--sticky {
  position: sticky;
  top: calc(var(--ls-header-height) + var(--ls-space-4));
}

.ls-summary-panel__title {
  margin: 0 0 var(--ls-space-4);
  font-size: var(--ls-fs-lg);
  font-weight: var(--ls-fw-semibold);
}

.ls-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ls-grid-gap-md);

  padding: clamp(14px, 2vw, 20px) var(--ls-page-gutter);

  background: var(--ls-surface-raised);
  border-top: 1px solid var(--ls-border);
}

.ls-action-bar--sticky {
  position: sticky;
  bottom: 0;
  z-index: 80;
  box-shadow: 0 -10px 30px rgba(24,21,22,0.06);
}

.ls-action-bar__summary {
  min-width: 0;
  color: var(--ls-text-secondary);
  font-size: var(--ls-fs-sm);
}

.ls-action-bar__actions {
  display: flex;
  align-items: center;
  gap: var(--ls-space-3);
}

.ls-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.ls-price__amount {
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.6rem);
  font-weight: var(--ls-fw-semibold);
  line-height: 1;
}

.ls-price__currency,
.ls-price__suffix {
  color: var(--ls-text-secondary);
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
}

.ls-price__note {
  width: 100%;
  margin-top: 4px;
  color: var(--ls-text-muted);
  font-size: var(--ls-fs-xs);
}

.ls-purchase-summary {
  display: grid;
  gap: var(--ls-space-4);
}


/* ==========================================================================
   17. MEDIA / EVIDENCE / PAGE BAR
   ========================================================================== */

.ls-media-card {
  position: relative;
  overflow: hidden;

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);

  background: var(--ls-surface-raised);
}

.ls-media-card__image {
  width: 100%;
  aspect-ratio: var(--ls-media-ratio, 16 / 9);
  object-fit: cover;
  display: block;
}

.ls-media-card__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: clamp(18px, 2.2vw, 28px);

  background:
    linear-gradient(180deg, transparent 0%, rgba(8,7,8,0.86) 100%);

  color: var(--ls-white);
}

.ls-media-card__caption {
  margin: 0;
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-semibold);
}

.ls-media-card__source,
.ls-media-card__meta {
  margin-top: 4px;
  color: rgba(255,255,255,0.66);
  font-size: var(--ls-fs-xs);
}

.ls-page-bar {
  min-height: var(--ls-header-height-compact);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ls-space-4);

  padding-inline: var(--ls-page-gutter);

  border-bottom: 1px solid var(--ls-border);
  background: var(--ls-surface-raised);
}

.ls-page-bar__start,
.ls-page-bar__end {
  display: flex;
  align-items: center;
  gap: var(--ls-space-2);
}

.ls-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: var(--ls-text-secondary);
  text-decoration: none;

  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
}

.ls-back-link:hover { color: var(--ls-text); }


/* ==========================================================================
   18. MODALS / DRAWERS / TOOLTIP / TOAST / EMPTY / LOADING
   ========================================================================== */

.ls-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--ls-z-modal);

  display: grid;
  place-items: center;

  padding: var(--ls-page-gutter);

  background: rgba(8,7,8,0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ls-modal {
  width: min(100%, var(--ls-modal-max));
  max-height: calc(100vh - (2 * var(--ls-page-gutter)));
  overflow: auto;

  background: var(--ls-surface-raised);
  color: var(--ls-text);

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-feature);
  box-shadow: var(--ls-shadow-md);
}

.ls-modal--wide { width: min(100%, var(--ls-modal-wide-max)); }

.ls-modal--dark {
  background: rgba(13,11,12,0.96);
  color: var(--ls-white);
  border-color: rgba(255,255,255,0.12);
}

.ls-modal__header,
.ls-modal__body,
.ls-modal__footer {
  padding-inline: clamp(20px, 3vw, 36px);
}

.ls-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ls-space-4);

  padding-top: clamp(20px, 3vw, 32px);
  padding-bottom: var(--ls-space-4);
}

.ls-modal__body { padding-bottom: clamp(20px, 3vw, 32px); }

.ls-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--ls-space-3);

  padding-top: var(--ls-space-4);
  padding-bottom: clamp(20px, 3vw, 32px);

  border-top: 1px solid var(--ls-border);
}

.ls-modal__title {
  margin: 0;
  font-size: var(--ls-fs-h3);
  font-weight: var(--ls-fw-semibold);
}

.ls-modal__close {
  width: var(--ls-control-md);
  height: var(--ls-control-md);
  flex: 0 0 auto;

  display: inline-grid;
  place-items: center;

  padding: 0;
  border: 0;
  border-radius: var(--ls-radius-control);

  background: transparent;
  color: var(--ls-text-muted);
}

.ls-modal__close:hover {
  background: rgba(24,21,22,0.05);
  color: var(--ls-text);
}

.ls-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--ls-z-drawer-backdrop);
  background: rgba(8,7,8,0.52);
}

.ls-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: var(--ls-z-drawer);

  width: min(var(--ls-drawer-max), 92vw);
  height: 100vh;
  overflow-y: auto;

  background: var(--ls-surface-raised);
  color: var(--ls-text);

  border-left: 1px solid var(--ls-border);
  box-shadow: -16px 0 40px rgba(8,7,8,0.12);
}

.ls-drawer--dark {
  background: var(--ls-dark-900);
  color: var(--ls-white);
  border-left-color: rgba(255,255,255,0.10);
}

.ls-drawer__header {
  position: sticky;
  top: 0;
  z-index: 2;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ls-space-4);

  padding: clamp(20px, 3vw, 30px);

  background: inherit;
  border-bottom: 1px solid var(--ls-border);
}

.ls-drawer__body { padding: clamp(20px, 3vw, 30px); }

.ls-drawer__footer {
  position: sticky;
  bottom: 0;

  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--ls-space-3);

  padding: clamp(16px, 2.5vw, 24px) clamp(20px, 3vw, 30px);

  background: inherit;
  border-top: 1px solid var(--ls-border);
}

.ls-drawer__title {
  margin: 0;
  font-size: var(--ls-fs-h3);
  font-weight: var(--ls-fw-semibold);
}

.ls-tooltip {
  position: absolute;
  z-index: var(--ls-z-tooltip);

  max-width: 280px;
  padding: 8px 10px;

  border-radius: 8px;

  background: var(--ls-dark-900);
  color: var(--ls-white);

  box-shadow: var(--ls-shadow-sm);

  font-size: var(--ls-fs-xs);
  line-height: 1.45;
}

.ls-tooltip--light {
  background: var(--ls-surface-raised);
  color: var(--ls-text);
  border: 1px solid var(--ls-border);
}

.ls-toast-stack {
  position: fixed;
  z-index: var(--ls-z-toast);

  right: var(--ls-page-gutter);
  bottom: var(--ls-page-gutter);

  width: min(380px, calc(100vw - (2 * var(--ls-page-gutter))));

  display: grid;
  gap: var(--ls-space-3);
}

.ls-toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;

  padding: 14px 16px;

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-md);

  background: var(--ls-surface-raised);
  color: var(--ls-text);

  box-shadow: var(--ls-shadow-md);
}

.ls-toast__close {
  display: inline-grid;
  place-items: center;
  width: var(--ls-control-md);
  height: var(--ls-control-md);
  padding: 0;
  border: 0;
  border-radius: var(--ls-radius-control);
  background: transparent;
  color: var(--ls-text-muted);
}

.ls-toast__close:hover {
  background: var(--ls-surface-muted);
  color: var(--ls-text);
}

.ls-toast__title {
  margin: 0 0 2px;
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-semibold);
}

.ls-toast__message {
  margin: 0;
  color: var(--ls-text-secondary);
  font-size: var(--ls-fs-xs);
  line-height: 1.5;
}

.ls-toast--success { border-left: 3px solid var(--ls-success); }
.ls-toast--warning { border-left: 3px solid var(--ls-warning); }
.ls-toast--danger { border-left: 3px solid var(--ls-danger); }
.ls-toast--info { border-left: 3px solid var(--ls-info); }
.ls-toast--brand { border-left: 3px solid var(--ls-red); }

.ls-empty {
  display: grid;
  place-items: center;

  min-height: clamp(220px, 28vw, 360px);
  padding: var(--ls-section-space-sm);

  border: 1px dashed var(--ls-border-strong);
  border-radius: var(--ls-radius-card);

  background: var(--ls-surface);
  text-align: center;
}

.ls-empty__inner {
  width: min(100%, 520px);
  display: grid;
  justify-items: center;
  gap: var(--ls-space-3);
}

.ls-empty__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;

  border-radius: 50%;

  background: var(--ls-surface-muted);
  color: var(--ls-text-muted);
}

.ls-empty__title {
  margin: 0;
  font-size: var(--ls-fs-h3);
  font-weight: var(--ls-fw-semibold);
}

.ls-empty__text {
  margin: 0;
  color: var(--ls-text-secondary);
  font-size: var(--ls-fs-sm);
  line-height: var(--ls-lh-body);
}

@keyframes ls-skeleton-pulse {
  0% { opacity: 0.52; }
  50% { opacity: 0.88; }
  100% { opacity: 0.52; }
}

.ls-skeleton {
  display: block;
  min-height: 1em;

  border-radius: 8px;
  background: var(--ls-surface-muted);

  animation: ls-skeleton-pulse 1.4s ease-in-out infinite;
}

.ls-skeleton--text { height: 12px; }
.ls-skeleton--title { height: 22px; }
.ls-skeleton--avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.ls-skeleton--dark { background: rgba(255,255,255,0.08); }




/* ==========================================================================
   19. REPORT ASIDE
   Canonical deep-detail surface for report values.
   This is distinct from a generic drawer: it is an editorial interpretation
   surface with evidence, benchmark, recommendation and Journey actions.

   Desktop/tablet:
   - fixed on the right
   - independently scrollable
   - underlying report remains visible but visually recedes
   - page may override --ls-report-aside-top when a secondary report toolbar
     is present

   Mobile:
   - becomes a full-screen sheet
   ========================================================================== */

.ls-report-aside-backdrop {
  position: fixed;
  top: var(--ls-report-aside-top);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--ls-z-aside-backdrop);

  background: rgba(8,7,8,0.18);
  backdrop-filter: saturate(0.88);
  -webkit-backdrop-filter: saturate(0.88);
}

.ls-report-aside {
  position: fixed;
  top: var(--ls-report-aside-top);
  right: 0;
  bottom: 0;
  z-index: var(--ls-z-aside);

  width: var(--ls-report-aside-width);
  max-width: calc(100vw - 48px);

  overflow-y: auto;
  overscroll-behavior: contain;

  background: var(--ls-surface);
  color: var(--ls-text);

  border-left: 1px solid var(--ls-border);
  box-shadow: -18px 0 44px rgba(8,7,8,0.13);
}

.ls-report-aside__header {
  position: sticky;
  top: 0;
  z-index: 4;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ls-space-4);

  padding:
    clamp(22px, 2.4vw, 34px)
    clamp(22px, 2.8vw, 38px)
    clamp(18px, 2vw, 26px);

  background:
    linear-gradient(
      180deg,
      rgba(250,248,244,0.98) 0%,
      rgba(250,248,244,0.95) 84%,
      rgba(250,248,244,0.88) 100%
    );

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-bottom: 1px solid var(--ls-border);
}

.ls-report-aside__heading {
  min-width: 0;
}

.ls-report-aside__eyebrow {
  margin: 0 0 8px;

  color: var(--ls-red);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-bold);
  letter-spacing: var(--ls-tracking-micro);
  text-transform: uppercase;
}

.ls-report-aside__title {
  margin: 0;

  font-family: var(--ls-font-serif);
  font-size: var(--ls-fs-h2);
  font-weight: var(--ls-fw-semibold);
  line-height: var(--ls-lh-heading);
  letter-spacing: -0.015em;
}

.ls-report-aside__close {
  width: var(--ls-control-md);
  height: var(--ls-control-md);
  flex: 0 0 auto;

  display: inline-grid;
  place-items: center;

  padding: 0;
  margin: -6px -8px 0 0;

  border: 0;
  border-radius: var(--ls-radius-control);

  background: transparent;
  color: var(--ls-text-muted);
}

.ls-report-aside__close:hover {
  background: var(--ls-surface-muted);
  color: var(--ls-text);
}

.ls-report-aside__body {
  display: grid;
  gap: clamp(22px, 2.8vw, 34px);

  padding:
    clamp(20px, 2.6vw, 34px)
    clamp(22px, 2.8vw, 38px)
    clamp(36px, 4vw, 56px);
}

.ls-report-aside__section {
  display: grid;
  gap: var(--ls-space-3);
}

.ls-report-aside__section + .ls-report-aside__section {
  padding-top: clamp(20px, 2.4vw, 30px);
  border-top: 1px solid var(--ls-border);
}

.ls-report-aside__section-title {
  margin: 0;

  color: var(--ls-wine);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-bold);
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
}

.ls-report-aside__lead {
  margin: 0;

  color: var(--ls-text-secondary);

  font-size: var(--ls-fs-md);
  line-height: var(--ls-lh-relaxed);
}

.ls-report-aside__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  min-height: 48px;
  padding: 0 14px;

  border-radius: var(--ls-radius-md);

  background: var(--ls-red-soft);
  color: var(--ls-red-active);

  font-size: clamp(1.3rem, 1.05rem + 0.8vw, 1.75rem);
  font-weight: var(--ls-fw-bold);
  line-height: 1;
}

.ls-report-aside__rows {
  display: grid;
  gap: 8px;
}

.ls-report-aside__row {
  position: relative;

  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;

  min-height: 48px;
  padding: 8px 10px;

  border: 1px solid transparent;
  border-radius: var(--ls-radius-control);

  background: var(--ls-surface-muted);
}

.ls-report-aside__row.is-active,
.ls-report-aside__row[aria-current="true"] {
  border-color: rgba(237,22,57,0.16);
  background: var(--ls-selected-bg);
}

.ls-report-aside__row.is-active::before,
.ls-report-aside__row[aria-current="true"]::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;

  width: 3px;

  border-radius: 0 3px 3px 0;
  background: var(--ls-red);
}

.ls-report-aside__index,
.ls-report-aside__row-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 38px;
  min-height: 28px;
  padding-inline: 8px;

  border-radius: 6px;

  background: var(--ls-dark-800);
  color: var(--ls-white);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-bold);
}

.ls-report-aside__row-label {
  color: var(--ls-text-secondary);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-semibold);
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.ls-report-aside__row--benchmark {
  background: var(--ls-gold-soft);
}

.ls-report-aside__row--benchmark .ls-report-aside__index,
.ls-report-aside__row--benchmark .ls-report-aside__row-value {
  background: var(--ls-accent-gold);
}

.ls-report-aside__interpretation {
  display: grid;
  gap: var(--ls-space-3);

  padding: clamp(18px, 2.2vw, 26px);

  border: 1px solid color-mix(in srgb, var(--ls-wine) 16%, var(--ls-border));
  border-radius: var(--ls-radius-card);

  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--ls-red-soft) 38%, var(--ls-surface-raised)),
      var(--ls-surface-raised)
    );
}

.ls-report-aside__interpretation-title {
  margin: 0;

  color: var(--ls-wine);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-bold);
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
}

.ls-report-aside__interpretation-text {
  margin: 0;

  font-family: var(--ls-font-serif);
  font-size: var(--ls-fs-lg);
  font-weight: var(--ls-fw-medium);
  line-height: 1.5;
}

.ls-report-aside__recommendations {
  display: grid;
  gap: 12px;
}

.ls-report-aside__recommendation {
  display: grid;
  gap: var(--ls-space-3);

  padding: clamp(16px, 2vw, 22px);

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);

  background: var(--ls-surface-raised);
}

.ls-report-aside__recommendation-head {
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--ls-wine);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-bold);
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
}

.ls-report-aside__recommendation-text {
  margin: 0;

  color: var(--ls-text);
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
  line-height: var(--ls-lh-body);
}

.ls-report-aside__why {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  width: fit-content;
  padding: 0;

  border: 0;
  background: transparent;

  color: var(--ls-text-secondary);

  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
}

.ls-report-aside__why:hover {
  color: var(--ls-red);
}

.ls-report-aside__journey-action {
  width: 100%;
}

.ls-report-aside__provenance {
  display: grid;
  gap: 6px;

  padding: 14px 16px;

  border-radius: var(--ls-radius-md);

  background: var(--ls-surface-muted);

  color: var(--ls-text-muted);

  font-size: var(--ls-fs-xs);
  line-height: 1.5;
}

/* Optional dark conclusion inside the otherwise warm aside. */
.ls-report-aside__chapter {
  display: grid;
  gap: var(--ls-space-3);

  padding: clamp(18px, 2.4vw, 28px);

  border-radius: var(--ls-radius-card);

  background:
    linear-gradient(135deg, var(--ls-dark-900), var(--ls-burgundy));

  color: var(--ls-white);
}

.ls-report-aside__chapter .ls-report-aside__section-title {
  color: var(--ls-red);
}

.ls-report-aside__chapter p {
  color: rgba(255,255,255,0.76);
}


/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .ls-report-aside {
    width: var(--ls-report-aside-tablet-width);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .ls-report-aside-backdrop {
    top: 0;
  }

  .ls-report-aside {
    top: 0;

    width: 100%;
    max-width: none;
    height: 100svh;

    border-left: 0;
    box-shadow: none;
  }

  .ls-report-aside__header {
    padding:
      max(16px, env(safe-area-inset-top))
      var(--ls-page-gutter)
      16px;
  }

  .ls-report-aside__body {
    padding:
      20px
      var(--ls-page-gutter)
      calc(32px + env(safe-area-inset-bottom));
  }
}


/* ==========================================================================
   20. AUTHENTICATION
   ========================================================================== */

.ls-auth {
  position: relative;
  isolation: isolate;

  min-height: 100svh;
  display: grid;
  place-items: center;

  padding: max(28px, env(safe-area-inset-top)) var(--ls-page-gutter) max(28px, env(safe-area-inset-bottom));

  background: var(--ls-dark-950);
  color: var(--ls-white);
  overflow-x: hidden;
}

.ls-auth__background {
  position: fixed;
  inset: 0;
  z-index: -3;

  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ls-auth__veil {
  position: fixed;
  inset: 0;
  z-index: -2;

  background:
    radial-gradient(ellipse at 50% 51%, rgba(8,7,8,0.56) 0%, rgba(8,7,8,0.34) 34%, rgba(8,7,8,0.12) 68%, rgba(8,7,8,0.04) 100%),
    linear-gradient(180deg, rgba(8,7,8,0.04), rgba(8,7,8,0.28));
}

.ls-auth__content {
  width: min(100%, 470px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2.4vh, 22px);
  margin-inline: auto;
}

.ls-auth--login .ls-auth__veil,
.ls-auth--register .ls-auth__veil {
  background:
    radial-gradient(
      ellipse at center,
      rgba(8,7,8,0.72) 0%,
      rgba(8,7,8,0.56) 45%,
      rgba(8,7,8,0.24) 72%,
      rgba(8,7,8,0) 100%
    );
}

.ls-auth--login .ls-auth__content,
.ls-auth--message .ls-auth__content {
  width: min(100%, 440px);
}

.ls-auth--message .ls-auth__content {
  text-align: center;
}

.ls-auth__panel {
  width: 100%;
  padding: clamp(16px, 2vw, 20px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--ls-radius-card);
  background: rgba(8,7,8,0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
}

.ls-auth__brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  text-align: center;
}

.ls-auth__logo {
  width: clamp(250px, 24vw, 330px);
  max-width: 100%;
  height: auto;
}

.ls-auth__title {
  margin: 0;
  color: var(--ls-white);
  font-family: var(--ls-font-sans);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  font-weight: var(--ls-fw-medium);
  line-height: var(--ls-lh-heading);
  white-space: normal;
}

.ls-auth__title-mark {
  color: var(--ls-red);
}

.ls-auth__lead {
  width: min(100%, 430px);
  margin: 0;
  color: var(--ls-text-inverse-muted);
  font-size: clamp(0.9375rem, 0.91rem + 0.12vw, 1.0625rem);
  line-height: var(--ls-lh-body);
}

.ls-auth__lead > span {
  display: block;
}

.ls-auth__form {
  display: grid;
  gap: 9px;
}

.ls-auth .ls-input,
.ls-auth .ls-select,
.ls-auth .ls-btn--lg {
  min-height: 52px;
}

.ls-auth .ls-input,
.ls-auth .ls-select {
  height: 52px;
}

.ls-auth__footer {
  margin-top: var(--ls-space-5);
  color: var(--ls-text-inverse-muted);
  font-size: var(--ls-fs-xs);
}

@media (max-width: 767px) {
  .ls-auth {
    place-items: start center;
    padding-block: max(24px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-bottom));
  }

  .ls-auth__veil {
    background:
      radial-gradient(ellipse at 50% 42%, rgba(8,7,8,0.64) 0%, rgba(8,7,8,0.42) 45%, rgba(8,7,8,0.20) 100%),
      linear-gradient(180deg, rgba(8,7,8,0.10), rgba(8,7,8,0.40));
  }

  .ls-auth__logo {
    width: clamp(250px, 78vw, 300px);
  }

  .ls-auth__lead {
    font-size: var(--ls-fs-sm);
  }

  .ls-auth__panel {
    padding: 16px;
  }
}

@media (max-width: 479px) {
  .ls-auth {
    padding-inline: 16px;
  }
}


/* ==========================================================================
   21. PLAYER
   No seek bar / traditional duration progress bar.
   ========================================================================== */

.ls-player {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;

  background: #000;
  color: var(--ls-white);
}

.ls-player__viewport {
  position: relative;
  min-height: 0;
  background: #000;
  overflow: hidden;
}

.ls-player__viewport video,
.ls-player__viewport iframe {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.ls-player__topbar,
.ls-player__bottombar {
  position: relative;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ls-space-4);

  padding: clamp(12px, 1.8vw, 20px) var(--ls-page-gutter);

  background: var(--ls-dark-950);
}

.ls-player__topbar {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ls-player__bottombar {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.ls-player__stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1.6vw, 18px);
  flex-wrap: wrap;
}

.ls-player__stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;

  color: rgba(255,255,255,0.62);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-semibold);
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
}

.ls-player__stat strong {
  color: var(--ls-white);
  font-size: var(--ls-fs-sm);
}

.ls-player__identity {
  display: grid;
  gap: 2px;
}

.ls-player__identity-title {
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-semibold);
}

.ls-player__identity-meta {
  color: rgba(255,255,255,0.52);
  font-size: var(--ls-fs-xs);
}

.ls-player__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.ls-player-control {
  min-width: var(--ls-control-md);
  min-height: var(--ls-control-md);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 0 10px;

  border: 0;
  border-radius: var(--ls-radius-control);

  background: transparent;
  color: rgba(255,255,255,0.72);

  font-size: var(--ls-fs-xs);
  font-weight: var(--ls-fw-medium);
}

.ls-player-control:hover {
  background: rgba(255,255,255,0.06);
  color: var(--ls-white);
}

.ls-player-control.is-active {
  background: rgba(237,22,57,0.14);
  color: var(--ls-white);
}


/* ==========================================================================
   22. ICONS / APEXCHARTS THEME HOOKS
   ========================================================================== */

.ls-icon {
  display: inline-block;
  width: var(--ls-icon-md);
  height: var(--ls-icon-md);
  flex: 0 0 auto;
  color: currentColor;
  vertical-align: -0.125em;
}

.ls-icon--xs { width: var(--ls-icon-xs); height: var(--ls-icon-xs); }
.ls-icon--sm { width: var(--ls-icon-sm); height: var(--ls-icon-sm); }
.ls-icon--lg { width: var(--ls-icon-lg); height: var(--ls-icon-lg); }
.ls-icon--xl { width: var(--ls-icon-xl); height: var(--ls-icon-xl); }

.ls-chart {
  --ls-chart-grid: rgba(24,21,22,0.10);
  --ls-chart-label: var(--ls-text-secondary);
  --ls-chart-tooltip-bg: var(--ls-surface-raised);
  --ls-chart-tooltip-text: var(--ls-text);
}

.ls-chart--dark {
  --ls-chart-grid: rgba(255,255,255,0.10);
  --ls-chart-label: rgba(255,255,255,0.72);
  --ls-chart-tooltip-bg: var(--ls-dark-800);
  --ls-chart-tooltip-text: var(--ls-white);
}


/* ==========================================================================
   23. RESPONSIVE STRUCTURAL RULES
   Fluid first, breakpoint second.
   ========================================================================== */

/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .ls-grid--responsive-4,
  .ls-grid--responsive-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ls-header__inner {
    gap: clamp(12px, 2vw, 22px);
  }

  .ls-nav { gap: 0; }
  .ls-nav__link { padding-inline: 10px; }
  .ls-profile__label { display: none; }

  .ls-hero__content { width: min(100%, 720px); }

  .ls-toolbar {
    align-items: flex-start;
  }

  .ls-toolbar__primary {
    flex-basis: 100%;
  }
}

/* Desktop */
@media (min-width: 1200px) {
  .ls-grid--responsive-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ls-grid--responsive-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ls-grid--responsive-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ls-nav-toggle { display: none; }
}

/* Mobile */
@media (max-width: 767px) {
  .ls-grid--responsive-4,
  .ls-grid--responsive-3,
  .ls-grid--responsive-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .ls-btn--mobile-full { width: 100%; }

  .ls-section-heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .ls-section-heading__actions {
    justify-content: flex-start;
  }

  .ls-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .ls-toolbar__primary,
  .ls-toolbar__filters,
  .ls-toolbar__actions {
    width: 100%;
  }

  .ls-search { width: 100%; }

  .ls-header__inner {
    min-height: var(--ls-header-height);
    justify-content: space-between;
  }

  .ls-header__nav { display: none; }
  .ls-header__actions { gap: 4px; }

  .ls-header-action__label,
  .ls-profile__label {
    display: none;
  }

  .ls-header__logo { max-width: 126px; }

  .ls-nav-toggle {
    display: inline-grid;
    place-items: center;

    width: var(--ls-control-md);
    height: var(--ls-control-md);

    padding: 0;
    border: 0;
    border-radius: var(--ls-radius-control);

    background: transparent;
    color: var(--ls-white);
  }

  .ls-hero {
    min-height: var(--ls-hero-standard);
    background:
      linear-gradient(180deg, rgba(8,7,8,0.24) 0%, rgba(8,7,8,0.88) 72%, rgba(8,7,8,0.96) 100%),
      var(--ls-dark-900);
  }

  .ls-hero__inner {
    padding-top: clamp(64px, 14vw, 96px);
    padding-bottom: clamp(30px, 7vw, 44px);
  }

  .ls-hero__content,
  .ls-hero__lead {
    width: 100%;
  }

  .ls-hero__actions {
    align-items: stretch;
  }

  .ls-hero__actions .ls-btn {
    width: 100%;
  }

  .ls-hero__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ls-mega-menu {
    width: calc(100vw - (2 * var(--ls-page-gutter)));
  }

  .ls-mega-menu__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ls-data-list__item {
    grid-template-columns: minmax(0, 1fr);
  }

  .ls-segmented {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ls-segmented__item {
    flex: 1 0 auto;
  }

  .ls-stepper--horizontal {
    grid-template-columns: minmax(0, 1fr);
  }

  .ls-summary-panel--sticky {
    position: static;
  }

  .ls-action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .ls-action-bar__actions {
    width: 100%;
    flex-direction: column-reverse;
  }

  .ls-action-bar__actions .ls-btn {
    width: 100%;
  }

  .ls-modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .ls-modal,
  .ls-modal--wide {
    width: 100%;
    max-height: 92vh;

    border-radius: var(--ls-radius-feature) var(--ls-radius-feature) 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .ls-modal__footer,
  .ls-drawer__footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .ls-modal__footer .ls-btn,
  .ls-drawer__footer .ls-btn {
    width: 100%;
  }

  .ls-drawer {
    width: 100%;
    height: 100vh;
    border-left: 0;
    box-shadow: none;
  }

  .ls-toast-stack {
    left: var(--ls-page-gutter);
    right: var(--ls-page-gutter);
    width: auto;
  }

  .ls-player__topbar,
  .ls-player__bottombar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ls-player__stats,
  .ls-player__controls {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Very small mobile guard */
@media (max-width: 479px) {
  .ls-btn {
    white-space: normal;
    text-align: center;
  }

  .ls-header__actions .ls-header-action:not(.ls-header-action--essential) {
    display: none;
  }

  .ls-hero__meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .ls-card__header,
  .ls-card__body,
  .ls-card__footer {
    padding-inline: 16px;
  }

  .ls-badge,
  .ls-chip,
  .ls-status {
    white-space: normal;
  }
}



/* ==========================================================================
   24. ACCESSIBILITY / SEMANTIC STATES
   ========================================================================== */

/* Minimum target size for primary interactive controls. */
.ls-touch-target,
.ls-icon-action,
.ls-nav-toggle,
.ls-modal__close,
.ls-report-aside__close,
.ls-toast__close {
  min-width: var(--ls-touch-target-min);
  min-height: var(--ls-touch-target-min);
}

[hidden] {
  display: none;
}

/* Semantic visual states */
.ls-state {
  display: grid;
  gap: var(--ls-space-3);

  padding: clamp(16px, 2vw, 24px);

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);

  background: var(--ls-surface-raised);
}

.ls-state__title {
  margin: 0;
  font-size: var(--ls-fs-lg);
  font-weight: var(--ls-fw-semibold);
}

.ls-state__text {
  margin: 0;
  color: var(--ls-text-secondary);
  font-size: var(--ls-fs-sm);
}

.ls-state--error {
  border-color: color-mix(in srgb, var(--ls-danger) 28%, var(--ls-border));
  background: var(--ls-danger-bg);
}

.ls-state--warning {
  border-color: color-mix(in srgb, var(--ls-warning) 28%, var(--ls-border));
  background: var(--ls-warning-bg);
}

.ls-state--locked,
.ls-state--unavailable {
  background: var(--ls-surface-muted);
  color: var(--ls-text-secondary);
}

.ls-state--locked .ls-state__title,
.ls-state--unavailable .ls-state__title {
  color: var(--ls-text);
}


/* ==========================================================================
   25. LINKS
   ========================================================================== */

.ls-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: var(--ls-red-active);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;

  font-weight: var(--ls-fw-medium);
}

.ls-link:hover {
  color: var(--ls-red-hover);
}

.ls-link--subtle {
  color: var(--ls-text-secondary);
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.ls-link--subtle:hover {
  color: var(--ls-text);
}

.ls-link--danger {
  color: var(--ls-danger);
}

.ls-link--danger:hover {
  color: color-mix(in srgb, var(--ls-danger) 82%, black);
}


/* ==========================================================================
   26. DISCLOSURE / ACCORDION
   ========================================================================== */

.ls-disclosure {
  border-top: 1px solid var(--ls-border);
}

.ls-disclosure:last-child {
  border-bottom: 1px solid var(--ls-border);
}

.ls-disclosure__trigger {
  width: 100%;
  min-height: var(--ls-touch-target-min);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ls-space-3);

  padding: clamp(12px, 1.6vw, 18px) 0;

  border: 0;
  background: transparent;
  color: var(--ls-text);

  text-align: left;
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-semibold);
}

.ls-disclosure__trigger:hover {
  color: var(--ls-red-active);
}

.ls-disclosure__icon {
  transition: transform var(--ls-transition-fast);
}

.ls-disclosure[open] .ls-disclosure__icon,
.ls-disclosure.is-open .ls-disclosure__icon {
  transform: rotate(180deg);
}

.ls-disclosure__content {
  padding: 0 0 clamp(14px, 1.8vw, 20px);

  color: var(--ls-text-secondary);

  font-size: var(--ls-fs-sm);
  line-height: var(--ls-lh-body);
}

.ls-disclosure--card {
  padding-inline: clamp(16px, 2vw, 22px);

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);

  background: var(--ls-surface-raised);
}

.ls-disclosure--card + .ls-disclosure--card {
  margin-top: var(--ls-space-3);
}


/* ==========================================================================
   27. PAGINATION / LOAD MORE
   ========================================================================== */

.ls-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  flex-wrap: wrap;
}

.ls-pagination__item {
  min-width: var(--ls-touch-target-min);
  min-height: var(--ls-touch-target-min);

  display: inline-grid;
  place-items: center;

  padding: 0 10px;

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-control);

  background: var(--ls-surface-raised);
  color: var(--ls-text-secondary);

  text-decoration: none;
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-medium);
}

.ls-pagination__item:hover {
  border-color: var(--ls-hover-border);
  color: var(--ls-text);
}

.ls-pagination__item.is-current,
.ls-pagination__item[aria-current="page"] {
  border-color: var(--ls-red);
  background: var(--ls-red-soft);
  color: var(--ls-red-active);
}

.ls-pagination__item:disabled,
.ls-pagination__item[aria-disabled="true"] {
  opacity: var(--ls-disabled-opacity);
  pointer-events: none;
}

.ls-load-more {
  display: grid;
  place-items: center;
  gap: var(--ls-space-2);

  margin-top: var(--ls-section-space-sm);
}


/* ==========================================================================
   28. BREADCRUMBS
   ========================================================================== */

.ls-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;

  color: var(--ls-text-muted);

  font-size: var(--ls-fs-xs);
}

.ls-breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ls-breadcrumbs__link {
  color: var(--ls-text-secondary);
  text-decoration: none;
}

.ls-breadcrumbs__link:hover {
  color: var(--ls-text);
}

.ls-breadcrumbs__current {
  max-width: min(48ch, 50vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--ls-text);
  font-weight: var(--ls-fw-medium);
}


/* ==========================================================================
   29. DESTRUCTIVE ACTIONS
   ========================================================================== */

.ls-btn--danger {
  background: var(--ls-danger);
  border-color: var(--ls-danger);
  color: var(--ls-white);
}

.ls-btn--danger:hover {
  background: color-mix(in srgb, var(--ls-danger) 84%, black);
  border-color: color-mix(in srgb, var(--ls-danger) 84%, black);
}

.ls-btn--danger-outline {
  background: transparent;
  border-color: color-mix(in srgb, var(--ls-danger) 48%, var(--ls-border));
  color: var(--ls-danger);
}

.ls-btn--danger-outline:hover {
  background: var(--ls-danger-bg);
  border-color: var(--ls-danger);
}


/* ==========================================================================
   30. FILE / DOWNLOAD / EXPORT ITEMS
   ========================================================================== */

.ls-file-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;

  min-height: 60px;
  padding: 12px 14px;

  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-md);

  background: var(--ls-surface-raised);
}

.ls-file-item__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;

  border-radius: 10px;

  background: var(--ls-surface-muted);
  color: var(--ls-text-secondary);
}

.ls-file-item__title {
  margin: 0;
  font-size: var(--ls-fs-sm);
  font-weight: var(--ls-fw-semibold);
}

.ls-file-item__meta {
  margin-top: 2px;
  color: var(--ls-text-muted);
  font-size: var(--ls-fs-xs);
}

.ls-file-item__action {
  flex: 0 0 auto;
}


/* ==========================================================================
   31. SAFE AREAS / STICKY BOTTOM SURFACES
   ========================================================================== */

.ls-safe-bottom {
  padding-bottom: max(var(--ls-space-4), env(safe-area-inset-bottom));
}

.ls-sticky-bottom {
  position: sticky;
  bottom: 0;
  z-index: var(--ls-z-sticky);

  padding-bottom: max(var(--ls-space-3), env(safe-area-inset-bottom));
}

.ls-fixed-bottom {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--ls-z-sticky);

  padding-bottom: max(var(--ls-space-3), env(safe-area-inset-bottom));
}


/* ==========================================================================
   32. SCROLLBARS
   ========================================================================== */

.ls-scrollable {
  scrollbar-width: thin;
  scrollbar-color: var(--ls-scrollbar-thumb) var(--ls-scrollbar-track);
}

.ls-scrollable::-webkit-scrollbar {
  width: var(--ls-scrollbar-size);
  height: var(--ls-scrollbar-size);
}

.ls-scrollable::-webkit-scrollbar-track {
  background: var(--ls-scrollbar-track);
}

.ls-scrollable::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: var(--ls-radius-pill);
  background-clip: padding-box;
  background-color: var(--ls-scrollbar-thumb);
}

.ls-scrollable::-webkit-scrollbar-thumb:hover {
  background-color: var(--ls-scrollbar-thumb-hover);
}

.ls-scrollable--dark {
  scrollbar-color: var(--ls-scrollbar-thumb-dark) transparent;
}

.ls-scrollable--dark::-webkit-scrollbar-thumb {
  background-color: var(--ls-scrollbar-thumb-dark);
}

.ls-scrollable--dark::-webkit-scrollbar-thumb:hover {
  background-color: var(--ls-scrollbar-thumb-dark-hover);
}


/* ==========================================================================
   33. LOCALIZATION / CONTENT RESILIENCE
   ========================================================================== */

.ls-localized-control {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ls-localized-copy {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.ls-no-truncate {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

/* Avoid fixed-width text controls for translatable labels. */
.ls-btn:not(.ls-btn--icon),
.ls-chip,
.ls-tab,
.ls-segmented__item,
.ls-header-action,
.ls-player-control {
  max-width: 100%;
}

/* ==========================================================================
   34. PRINT / PDF-FRIENDLY MODE
   ========================================================================== */

@media print {
  @page {
    margin: var(--ls-print-margin);
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .ls-header,
  .ls-subnav,
  .ls-page-bar,
  .ls-toolbar,
  .ls-action-bar,
  .ls-report-aside,
  .ls-report-aside-backdrop,
  .ls-drawer,
  .ls-drawer-backdrop,
  .ls-modal-backdrop,
  .ls-toast-stack,
  .ls-tooltip,
  .ls-player__controls,
  .ls-nav-toggle,
  .ls-no-print {
    display: none !important;
  }

  .ls-container,
  .ls-reading,
  .ls-reading--narrow {
    width: 100% !important;
    max-width: none !important;
  }

  .ls-card,
  .ls-stat,
  .ls-box,
  .ls-media-card,
  .ls-summary-panel {
    box-shadow: none !important;
    break-inside: avoid;
  }

  .ls-section,
  .ls-section--compact,
  .ls-section--cinematic {
    padding-block: 12mm;
  }

  .ls-section--cinematic,
  .ls-card--dark,
  .ls-box--cinematic,
  .ls-report-aside__chapter {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ls-chart,
  .apexcharts-canvas {
    break-inside: avoid;
  }

  a[href]::after {
    content: none !important;
  }
}


/* ==========================================================================
   35. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
