:root {
  --jr-gm-blue: #1a73e8;
  --jr-gm-blue-bright: #4285f4;
  --jr-gm-blue-hover: #1765cc;
  --jr-gm-green: #1e8e3e;
  --jr-gm-green-bright: #34a853;
  --jr-gm-green-hover: #188038;
  --jr-gm-green-deep: #137333;
  --jr-gm-red: #d93025;
  --jr-gm-red-bright: #ea4335;
  --jr-gm-red-hover: #c5221f;
  --jr-gm-yellow: #f9ab00;
  --jr-gm-yellow-bright: #fbbc04;
  --jr-gm-purple: #9334e6;
  --jr-gm-teal: #007b83;
  --jr-gm-blue-d: #8ab4f8;
  --jr-gm-blue-d-hover: #aecbfa;
  --jr-gm-blue-d-mid: #669df6;
  --jr-gm-green-d: #81c995;
  --jr-gm-yellow-d: #fdd663;
  --jr-gm-red-d: #f28b82;
  --jr-gm-purple-d: #c58af9;
  --jr-gm-cyan-d: #78d9ec;
  --jr-gm-surface-light: #f8f9fa;
  --jr-gm-surface-light-elevated: #ffffff;
  --jr-gm-surface-light-2: #f1f3f4;
  --jr-gm-surface-light-3: #e8eaed;
  --jr-gm-surface-amoled: #000000;
  --jr-gm-surface-amoled-elevated: #121212;
  --jr-gm-surface-amoled-2: #1e1e1e;
  --jr-gm-surface-amoled-3: #2d2d2d;
  --jr-gm-blue-dark-surface: #131720;
  --jr-gm-blue-dark-elevated: #1a2233;
  --jr-gm-on-surface-light: #202124;
  --jr-gm-on-surface-variant-light: #5f6368;
  --jr-gm-outline-light: #5f6368;
  --jr-gm-on-surface-dark: #e8eaed;
  --jr-gm-on-surface-variant-dark: #9aa0a6;
  --jr-gm-outline-dark: #9aa0a6;
  --jr-gm-border-light: rgba(60, 64, 67, 0.12);
  --jr-gm-border-dark: rgba(232, 234, 237, 0.1);
  --jr-gm-blue-container: #e8f0fe;
  --jr-gm-green-container: #e6f4ea;
  --jr-gm-yellow-container: #fef7e0;
  --jr-ap-blue-d: #0a84ff;
  --jr-ap-green-d: #30d158;
  --jr-ap-red-d: #ff453a;
  --jr-ap-orange-d: #ff9f0a;
  --jr-ap-yellow-d: #ffd60a;
  --jr-ap-teal-d: #64d2ff;
  --jr-ap-purple-d: #bf5af2;
  --jr-ap-border-dark: rgba(235, 235, 245, 0.1);

  --jr-glass-blur: 22px;
  --jr-glass-blur-nav: 28px;
  --jr-glass-saturate: 200%;

  --jr-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --jr-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --jr-radius-xs: 6px;
  --jr-radius-sm: 10px;
  --jr-radius-md: 14px;
  --jr-radius-lg: 18px;
  --jr-radius-inner: 8px;
  --jr-control-h: 2.75rem;
  --jr-control-h-sm: 2.375rem;
  --jr-icon-btn: var(--jr-control-h);
  --jr-icon-btn-desk: 2.5rem;
  --jr-icon-font: 1.0625rem;
  /* Navbar min-height + safe-area; used as sticky offset for search dock */
  --jr-sticky-top: calc(3.25rem + env(safe-area-inset-top, 0px));
  --jr-sticky-gap: 0.75rem;
  --jr-gap-xs: 0.35rem;
  --jr-gap-sm: 0.5rem;
  --jr-gap-md: 0.75rem;
  --jr-block-gap: 1rem;
  --jr-block-gap-tight: 0.5rem;
  --jr-text-xs: 0.6875rem;
  --jr-text-sm: 0.8125rem;
  --jr-text-base: 0.9375rem;
  --jr-text-lg: 1.125rem;
  --jr-text-hero: clamp(1.75rem, 4.5vw, 2.5rem);
}

:root,
[data-bs-theme='light'] {
  color-scheme: light;
  --jr-accent: var(--jr-gm-red);
  --jr-accent-hover: var(--jr-gm-red-hover);
  --jr-accent-soft: rgba(217, 48, 37, 0.1);
  --jr-accent-ring: rgba(217, 48, 37, 0.24);
  --jr-accent-gradient: linear-gradient(135deg, var(--jr-gm-red-bright), var(--jr-gm-yellow));
  --jr-blue: var(--jr-gm-blue);
  --jr-blue-hover: var(--jr-gm-blue-hover);
  --jr-blue-soft: rgba(26, 115, 232, 0.12);
  --jr-blue-ring: rgba(26, 115, 232, 0.28);
  --jr-success: var(--jr-gm-green);
  --jr-success-soft: rgba(30, 142, 62, 0.12);
  --jr-danger: var(--jr-gm-red-hover);
  --jr-danger-soft: rgba(197, 34, 31, 0.1);
  --jr-warning: #e8710a;
  --jr-warning-soft: rgba(232, 113, 10, 0.12);
  --jr-purple: var(--jr-gm-purple);
  --jr-purple-soft: rgba(147, 52, 230, 0.12);
  --jr-surface: var(--jr-gm-surface-light-elevated);
  --jr-surface-muted: var(--jr-gm-blue-container);
  --jr-surface-elevated: var(--jr-gm-surface-light-elevated);
  --jr-surface-inset: var(--jr-gm-surface-light);
  --jr-glass: rgba(255, 255, 255, 0.85);
  --jr-glass-hover: var(--jr-gm-surface-light-elevated);
  --jr-glass-light: rgba(255, 255, 255, 0.65);
  --jr-glass-border: rgba(60, 64, 67, 0.1);
  --jr-glass-border-hover: rgba(26, 115, 232, 0.35);
  --jr-border: var(--jr-gm-border-light);
  --jr-border-subtle: var(--jr-gm-surface-light-3);
  --jr-text: var(--jr-gm-on-surface-light);
  --jr-text-secondary: var(--jr-gm-on-surface-variant-light);
  --jr-text-tertiary: var(--jr-gm-outline-light);
  --jr-shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.15);
  --jr-shadow-md: 0 2px 8px rgba(60, 64, 67, 0.12);
  --jr-shadow-card: 0 1px 3px rgba(60, 64, 67, 0.12), 0 0 0 1px var(--jr-border);
  --jr-shadow-card-hover: 0 4px 12px rgba(60, 64, 67, 0.16), 0 0 0 1px var(--jr-glass-border-hover);
  --jr-navbar-bg: rgba(232, 240, 254, 0.88);
  --jr-hero-glow-color: rgba(26, 115, 232, 0.08);
  --jr-body-gradient: radial-gradient(
    ellipse 80% 50% at 50% -10%,
    rgba(26, 115, 232, 0.06),
    transparent 55%
  );
  --jr-selection-bg: rgba(26, 115, 232, 0.25);
  --jr-stat-new: var(--jr-gm-blue);
  --jr-stat-update: var(--jr-gm-teal);
  --jr-stat-total: var(--jr-gm-on-surface-light);
  --jr-stat-wait: #e8710a;
  --jr-stat-skip: var(--jr-gm-red-hover);
  --jr-stat-confirm: var(--jr-gm-green-hover);
  --jr-stat-lastnew: var(--jr-gm-outline-light);
  --jr-stat-new-bg: rgba(26, 115, 232, 0.12);
  --jr-stat-update-bg: rgba(0, 123, 131, 0.12);
  --jr-stat-total-bg: rgba(32, 33, 36, 0.06);
  --jr-stat-confirm-bg: rgba(24, 128, 56, 0.12);
  --jr-stat-wait-bg: rgba(232, 113, 10, 0.12);
  --jr-stat-skip-bg: rgba(197, 34, 31, 0.12);
  --jr-stat-lastnew-bg: rgba(95, 99, 104, 0.12);
  --jr-stats-thead-bg: rgba(232, 240, 254, 0.72);
  --jr-stats-table-bg: linear-gradient(180deg, #f8f9fc 0%, var(--jr-gm-surface-light-elevated) 100%);
  --jr-stats-table-border: rgba(26, 115, 232, 0.14);
  --jr-meta-size-bg: rgba(26, 115, 232, 0.1);
  --jr-meta-size-text: #1967d2;
  --jr-meta-date-bg: rgba(30, 142, 62, 0.1);
  --jr-meta-date-text: var(--jr-gm-green-deep);
  --jr-meta-update-bg: rgba(232, 113, 10, 0.1);
  --jr-meta-update-text: #c26401;
  --jr-validation: #c26401;
  --jr-container-blue: var(--jr-gm-blue-container);
  --jr-container-green: var(--jr-gm-green-container);
  --jr-container-orange: var(--jr-gm-yellow-container);
  --jr-container-neutral: var(--jr-gm-surface-light-2);
  --jr-filter-group-bg: var(--jr-glass-light);
  --jr-filter-sheet-bg: var(--jr-glass);
}

[data-bs-theme='dark'] {
  color-scheme: dark;
  --jr-accent: var(--jr-ap-red-d);
  --jr-accent-hover: #ff6961;
  --jr-accent-soft: rgba(255, 69, 58, 0.14);
  --jr-accent-ring: rgba(255, 69, 58, 0.28);
  --jr-accent-gradient: linear-gradient(135deg, var(--jr-ap-red-d), var(--jr-ap-orange-d));
  --jr-blue: var(--jr-gm-blue-d);
  --jr-blue-hover: var(--jr-gm-blue-d-hover);
  --jr-blue-soft: rgba(138, 180, 248, 0.16);
  --jr-blue-ring: rgba(138, 180, 248, 0.32);
  --jr-success: var(--jr-gm-green-d);
  --jr-success-soft: rgba(129, 201, 149, 0.14);
  --jr-danger: var(--jr-gm-red-d);
  --jr-danger-soft: rgba(242, 139, 130, 0.14);
  --jr-warning: var(--jr-ap-orange-d);
  --jr-warning-soft: rgba(255, 159, 10, 0.14);
  --jr-purple: var(--jr-gm-purple-d);
  --jr-purple-soft: rgba(197, 138, 249, 0.14);
  --jr-surface: var(--jr-gm-surface-amoled-elevated);
  --jr-surface-muted: var(--jr-gm-surface-amoled);
  --jr-surface-elevated: var(--jr-gm-surface-amoled-2);
  --jr-surface-inset: rgba(30, 30, 30, 0.95);
  --jr-glass: rgba(18, 18, 18, 0.82);
  --jr-glass-hover: rgba(30, 30, 30, 0.94);
  --jr-glass-light: rgba(18, 18, 18, 0.58);
  --jr-glass-border: rgba(232, 234, 237, 0.09);
  --jr-glass-border-hover: rgba(138, 180, 248, 0.42);
  --jr-border: rgba(232, 234, 237, 0.08);
  --jr-border-subtle: rgba(232, 234, 237, 0.06);
  --jr-text: var(--jr-gm-on-surface-dark);
  --jr-text-secondary: var(--jr-gm-on-surface-variant-dark);
  --jr-text-tertiary: var(--jr-gm-outline-dark);
  --jr-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --jr-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.55);
  --jr-shadow-card: 0 2px 12px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--jr-border);
  --jr-shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--jr-glass-border-hover);
  --jr-navbar-bg: rgba(0, 0, 0, 0.78);
  --jr-hero-glow-color: rgba(138, 180, 248, 0.12);
  --jr-body-gradient: radial-gradient(
    ellipse 70% 45% at 50% -5%,
    rgba(138, 180, 248, 0.06),
    transparent 60%
  );
  --jr-selection-bg: rgba(138, 180, 248, 0.32);
  --jr-stat-new: #8ab4f8;
  --jr-stat-update: #78d9ec;
  --jr-stat-total: #e8eaed;
  --jr-stat-wait: #fdd663;
  --jr-stat-skip: #f28b82;
  --jr-stat-confirm: #81c995;
  --jr-stat-lastnew: #9aa0a6;
  --jr-stat-new-bg: rgba(138, 180, 248, 0.16);
  --jr-stat-update-bg: rgba(120, 217, 236, 0.14);
  --jr-stat-total-bg: rgba(232, 234, 237, 0.08);
  --jr-stat-confirm-bg: rgba(129, 201, 149, 0.16);
  --jr-stat-wait-bg: rgba(253, 214, 99, 0.14);
  --jr-stat-skip-bg: rgba(242, 139, 130, 0.16);
  --jr-stat-lastnew-bg: rgba(154, 160, 166, 0.12);
  --jr-stats-thead-bg: rgba(19, 23, 32, 0.88);
  --jr-stats-table-bg: linear-gradient(180deg, var(--jr-gm-blue-dark-elevated) 0%, var(--jr-gm-surface-amoled) 100%);
  --jr-stats-table-border: rgba(138, 180, 248, 0.14);
  --jr-meta-size-bg: rgba(138, 180, 248, 0.12);
  --jr-meta-size-text: var(--jr-gm-blue-d-mid);
  --jr-meta-date-bg: rgba(129, 201, 149, 0.12);
  --jr-meta-date-text: var(--jr-gm-green-d);
  --jr-meta-update-bg: rgba(255, 159, 10, 0.12);
  --jr-meta-update-text: var(--jr-ap-orange-d);
  --jr-validation: var(--jr-ap-orange-d);
  --jr-container-blue: rgba(138, 180, 248, 0.12);
  --jr-container-green: rgba(129, 201, 149, 0.12);
  --jr-container-orange: rgba(255, 159, 10, 0.12);
  --jr-container-neutral: rgba(154, 160, 166, 0.1);
  --jr-filter-group-bg: var(--jr-glass-light);
  --jr-filter-sheet-bg: var(--jr-glass);
}

[data-jr-glass='true'][data-bs-theme='light'] {
  --jr-glass-blur: 18px;
  --jr-glass-blur-nav: 24px;
  --jr-glass-saturate: 165%;
  --jr-glass: rgba(255, 255, 255, 0.56);
  --jr-glass-hover: rgba(255, 255, 255, 0.72);
  --jr-glass-light: rgba(232, 240, 254, 0.48);
  --jr-glass-border: rgba(60, 60, 67, 0.14);
  --jr-surface: var(--jr-glass);
  --jr-surface-elevated: var(--jr-glass);
  --jr-surface-inset: var(--jr-glass-hover);
  --jr-navbar-bg: var(--jr-glass-light);
  --jr-shadow-card: 0 4px 24px rgba(60, 64, 67, 0.1), 0 0 0 1px var(--jr-glass-border);
  --jr-shadow-card-hover: 0 8px 32px rgba(60, 64, 67, 0.14), 0 0 0 1px var(--jr-glass-border-hover);
  --jr-body-gradient:
    radial-gradient(ellipse 90% 55% at 50% -12%, rgba(26, 115, 232, 0.12), transparent 58%),
    radial-gradient(ellipse 55% 35% at 88% 92%, rgba(66, 133, 244, 0.06), transparent 52%);
  --jr-filter-group-bg: var(--jr-glass-light);
  --jr-filter-sheet-bg: var(--jr-glass);
}

[data-jr-glass='true'][data-bs-theme='dark'] {
  --jr-surface-muted: var(--jr-gm-surface-amoled);
  --jr-glass: rgba(10, 12, 18, 0.34);
  --jr-glass-hover: rgba(22, 26, 36, 0.48);
  --jr-glass-light: rgba(0, 0, 0, 0.22);
  --jr-glass-border: rgba(255, 255, 255, 0.14);
  --jr-surface: var(--jr-glass);
  --jr-surface-elevated: var(--jr-glass);
  --jr-surface-inset: var(--jr-glass);
  --jr-navbar-bg: var(--jr-glass-light);
  --jr-shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--jr-glass-border);
  --jr-shadow-card-hover: 0 14px 40px rgba(0, 0, 0, 0.38), 0 0 0 1px var(--jr-glass-border-hover);
  --jr-body-gradient:
    radial-gradient(ellipse 90% 55% at 50% -12%, rgba(138, 180, 248, 0.16), transparent 58%),
    radial-gradient(ellipse 55% 35% at 88% 92%, rgba(138, 180, 248, 0.07), transparent 52%);
  --jr-stats-table-bg: linear-gradient(
    180deg,
    rgba(26, 34, 51, 0.55) 0%,
    var(--jr-gm-surface-amoled) 100%
  );
  --jr-filter-group-bg: var(--jr-glass-light);
  --jr-filter-sheet-bg: var(--jr-glass);
}

[data-jr-glass='true'] .glass-card,
[data-jr-glass='true'] .stat-card,
[data-jr-glass='true'] .result-card,
[data-jr-glass='true'] .modal-content.glass-card {
  background: var(--jr-glass) !important;
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
  border-color: var(--jr-glass-border);
  box-shadow: var(--jr-shadow-card);
}

[data-jr-glass='true'] .glass-card:hover,
[data-jr-glass='true'] .stat-card:hover,
[data-jr-glass='true'] .result-card:hover {
  background: var(--jr-glass-hover) !important;
  border-color: var(--jr-glass-border-hover);
  box-shadow: var(--jr-shadow-card-hover);
}

[data-jr-glass='true'] .jr-navbar {
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur-nav));
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur-nav));
}

* {
  box-sizing: border-box;
}

html {
  /* iOS PWA: paint under status bar when viewport-fit=cover (body gradient alone is not enough) */
  background-color: var(--jr-surface-muted);
}

body {
  font-family: var(--jr-font-sans);
  font-size: var(--jr-text-base);
  line-height: 1.5;
  background: var(--jr-surface-muted);
  background-image: var(--jr-body-gradient);
  background-attachment: fixed;
  color: var(--jr-text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  /* Safe-area top lives on .jr-navbar, not here — avoids a black gap under the status bar in standalone */
  padding-top: 0;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (max-width: 767px) {
  body.jr-has-results {
    /* iOS: background-attachment:fixed breaks position:sticky */
    background-attachment: scroll;
  }
}

::selection {
  background: var(--jr-selection-bg);
  color: var(--jr-text);
}

.jr-app {
  position: relative;
  z-index: 1;
  max-width: 960px;
  --jr-page-gutter: 1rem;
}

@media (min-width: 576px) {
  .jr-app.px-sm-4,
  .container.jr-app {
    --jr-page-gutter: 1.5rem;
  }
}

.jr-app--wide {
  max-width: 1600px;
}

.jr-navbar.sticky-top {
  top: 0;
  z-index: 1020;
}

.jr-navbar {
  position: relative;
  /* Extends navbar bg into the notch; sticky-top uses top: 0 (see --jr-sticky-top for search offset) */
  padding-top: env(safe-area-inset-top, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  background: var(--jr-navbar-bg);
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur-nav));
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur-nav));
  border-bottom: 1px solid var(--jr-glass-border);
  box-shadow: var(--jr-shadow-sm);
  min-height: calc(3.25rem + env(safe-area-inset-top, 0px));
}

.jr-navbar .container {
  min-height: 3.25rem;
}

.jr-navbar .btn-jr-nav[aria-current="page"] {
  color: var(--jr-blue);
  background: var(--jr-blue-soft);
}

.jr-brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--jr-radius-inner);
  background: var(--jr-accent-gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  box-shadow: 0 2px 8px var(--jr-accent-ring);
  flex-shrink: 0;
}

.jr-brand-icon--stats {
  background: linear-gradient(135deg, var(--jr-gm-blue), var(--jr-gm-blue-bright));
  box-shadow: 0 2px 8px var(--jr-blue-ring);
}

.jr-brand-text {
  background: var(--jr-accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.jr-brand-text--stats {
  background: linear-gradient(90deg, var(--jr-gm-blue-bright), var(--jr-ap-teal-d));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-card {
  background: var(--jr-glass);
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
  border: 1px solid var(--jr-glass-border);
  border-radius: var(--jr-radius-lg);
  box-shadow: var(--jr-shadow-card);
  transition: border-color 0.15s var(--jr-ease), box-shadow 0.15s var(--jr-ease), background 0.15s var(--jr-ease);
}

.jr-stats-controls {
  border-color: var(--jr-stats-table-border);
}

.jr-skip-link {
  position: absolute;
  top: calc(0.5rem + env(safe-area-inset-top, 0px));
  left: calc(0.5rem + env(safe-area-inset-left, 0px));
  z-index: 1100;
  padding: 0.5rem 1rem;
  border-radius: var(--jr-radius-sm);
  background: var(--jr-surface-elevated);
  color: var(--jr-blue);
  font-weight: 600;
  font-size: var(--jr-text-sm);
  text-decoration: none;
  box-shadow: var(--jr-shadow-md);
}

.jr-skip-link:not(.visually-hidden-focusable) {
  transform: translateY(-140%);
  transition: transform 0.15s var(--jr-ease);
}

.jr-skip-link:not(.visually-hidden-focusable):focus,
.jr-skip-link:not(.visually-hidden-focusable):focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--jr-blue);
  outline-offset: 2px;
}

.jr-search-dock:focus-within,
.jr-search-header:focus-within {
  box-shadow: none;
}

.jr-stats-controls:focus-within {
  border-color: var(--jr-border);
  box-shadow: var(--jr-shadow-md), 0 0 0 3px var(--jr-blue-soft);
}

.modal-content.glass-card:focus-within {
  border-color: var(--jr-glass-border);
  box-shadow: var(--jr-shadow-card);
}

.jr-icon-wrap {
  width: 2rem;
  height: 2rem;
  border-radius: var(--jr-radius-inner);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9375rem;
}

.jr-icon-wrap--accent {
  background: var(--jr-accent-soft);
  color: var(--jr-accent);
}

.jr-icon-wrap--blue {
  background: var(--jr-blue-soft);
  color: var(--jr-blue);
}

.jr-icon-wrap--neutral {
  background: var(--jr-surface-inset);
  color: var(--jr-text-secondary);
  border: 1px solid var(--jr-border-subtle);
}

.jr-label {
  font-size: var(--jr-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jr-text-tertiary);
}

.btn-jr-primary {
  background: var(--jr-accent);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: var(--jr-text-sm);
  border-radius: var(--jr-radius-sm);
  padding: 0.625rem 1.25rem;
  min-height: var(--jr-control-h);
  transition: background 0.15s var(--jr-ease), transform 0.2s var(--jr-ease), box-shadow 0.2s var(--jr-ease);
  box-shadow: 0 2px 8px var(--jr-accent-ring);
}

.btn-jr-primary:hover,
.btn-jr-primary:focus {
  color: #fff;
  background: var(--jr-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--jr-accent-ring);
}

.btn-jr-primary:active {
  transform: scale(0.98);
}

.btn-jr-primary:disabled {
  opacity: 0.55;
  transform: none;
}

.btn-jr-blue {
  background: var(--jr-blue-soft);
  border: 1px solid color-mix(in srgb, var(--jr-blue) 18%, transparent);
  color: var(--jr-blue);
  font-weight: 600;
  font-size: var(--jr-text-sm);
  border-radius: var(--jr-radius-sm);
  padding: 0.5rem 1rem;
  min-height: var(--jr-control-h);
  transition: background 0.15s var(--jr-ease), color 0.15s, transform 0.15s, border-color 0.15s;
}

.btn-jr-blue:hover,
.btn-jr-blue:focus {
  color: #fff;
  background: var(--jr-blue);
  border-color: transparent;
}

.btn-jr-blue:active {
  transform: scale(0.98);
}

.btn-jr-blue:disabled {
  opacity: 0.55;
}

.btn-jr-ghost {
  background: var(--jr-surface-inset);
  border: 1px solid var(--jr-border-subtle);
  color: var(--jr-text-secondary);
  font-weight: 500;
  font-size: var(--jr-text-sm);
  border-radius: var(--jr-radius-sm);
  min-height: var(--jr-control-h);
  padding: 0.5rem 1rem;
  transition: all 0.15s var(--jr-ease);
}

.btn-jr-ghost:hover {
  border-color: var(--jr-border);
  color: var(--jr-text);
  background: var(--jr-glass-hover);
}

.btn-jr-ghost--compact {
  min-height: var(--jr-control-h-sm);
  padding: 0.375rem 0.85rem;
  font-size: 0.8125rem;
}

.btn-sm.btn-jr-ghost {
  min-height: var(--jr-control-h-sm);
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-jr-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1;
  border-radius: var(--jr-radius-sm);
  font-size: var(--jr-text-sm);
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  min-height: var(--jr-control-h);
  border: 1px solid transparent;
  background: transparent;
  color: var(--jr-text-secondary);
  text-decoration: none;
  transition: all 0.15s var(--jr-ease);
}

.btn-jr-nav i {
  font-size: var(--jr-icon-font);
  line-height: 1;
  display: block;
  opacity: 0.85;
}

.btn-jr-nav:hover {
  background: var(--jr-surface-inset);
  color: var(--jr-text);
  border-color: var(--jr-border-subtle);
}

.btn-jr-nav:hover i {
  opacity: 1;
}

.btn-jr-icon {
  width: var(--jr-icon-btn);
  height: var(--jr-icon-btn);
  min-height: var(--jr-icon-btn);
  min-width: var(--jr-icon-btn);
  padding: 0;
  line-height: 1;
  border-radius: var(--jr-radius-inner);
  border: 1px solid var(--jr-border-subtle);
  background: var(--jr-surface);
  color: var(--jr-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s, color 0.15s;
  box-shadow: none;
}

.btn-jr-icon i {
  display: block;
  font-size: var(--jr-icon-font);
  line-height: 1;
}

.btn-jr-icon:hover {
  transform: scale(1.03);
  background: var(--jr-surface-inset);
  color: var(--jr-text);
}

.jr-search-bar {
  --jr-search-bar-pad: 3px;
  --jr-search-bar-border: var(--jr-border);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: var(--jr-search-bar-pad) var(--jr-search-bar-pad) var(--jr-search-bar-pad) 0;
  border: 1px solid var(--jr-search-bar-border);
  border-radius: var(--jr-radius-md);
  background: var(--jr-surface-inset);
  box-shadow: inset 0 1px 2px color-mix(in srgb, var(--jr-text) 4%, transparent);
  transition:
    border-color 0.2s var(--jr-ease),
    box-shadow 0.2s var(--jr-ease);
}

.jr-search-bar:focus-within {
  --jr-search-bar-border: color-mix(in srgb, var(--jr-blue) 38%, var(--jr-border));
  box-shadow:
    inset 0 1px 2px color-mix(in srgb, var(--jr-text) 4%, transparent),
    0 0 0 3px color-mix(in srgb, var(--jr-blue-soft) 60%, transparent);
}

[data-bs-theme='dark'] .jr-search-bar {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}

[data-bs-theme='dark'] .jr-search-bar:focus-within {
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.18),
    0 0 0 3px color-mix(in srgb, var(--jr-blue-soft) 50%, transparent);
}

.jr-search-bar .jr-search-wrap {
  flex: 1;
  min-width: 0;
}

.jr-search-wrap {
  position: relative;
}

.jr-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--jr-text-tertiary);
  pointer-events: none;
  font-size: 1rem;
  transition: color 0.2s var(--jr-ease);
}

.jr-search-bar:focus-within .jr-search-icon {
  color: color-mix(in srgb, var(--jr-blue) 55%, var(--jr-text-tertiary));
}

.jr-search-input {
  padding-left: 2.65rem;
  padding-right: 2.25rem;
  min-height: calc(var(--jr-control-h) - var(--jr-search-bar-pad) * 2);
  height: 100%;
  border: none;
  border-radius: calc(var(--jr-radius-md) - var(--jr-search-bar-pad));
  background: transparent;
  font-size: 1rem;
  transition: background 0.15s var(--jr-ease);
  -webkit-appearance: none;
  appearance: none;
}

.jr-search-input::-webkit-search-cancel-button,
.jr-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.jr-search-input:focus,
.jr-search-input.form-control:focus,
.jr-stats-controls .jr-search-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
  background: transparent;
}

.jr-search-submit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  align-self: center;
  line-height: 1;
  border: none;
  border-radius: calc(var(--jr-radius-md) - var(--jr-search-bar-pad) - 1px);
  min-width: var(--jr-icon-btn);
  width: var(--jr-icon-btn);
  min-height: calc(var(--jr-control-h) - var(--jr-search-bar-pad) * 2 - 2px);
  height: calc(var(--jr-control-h) - var(--jr-search-bar-pad) * 2 - 2px);
  padding: 0;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--jr-accent) 26%, transparent);
  transition:
    background 0.15s var(--jr-ease),
    box-shadow 0.15s var(--jr-ease),
    filter 0.15s var(--jr-ease),
    transform 0.15s var(--jr-ease);
}

.jr-search-submit.btn-jr-primary:hover {
  transform: none;
  filter: brightness(1.05);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--jr-accent) 34%, transparent);
}

.jr-search-submit.btn-jr-primary:focus,
.jr-search-submit.btn-jr-primary:focus-visible {
  transform: none;
  box-shadow:
    0 1px 4px color-mix(in srgb, var(--jr-accent) 26%, transparent),
    0 0 0 2px color-mix(in srgb, var(--jr-accent) 40%, transparent);
}

.jr-search-submit.btn-jr-primary:active {
  transform: scale(0.98);
  filter: brightness(0.96);
}

.jr-search-submit #submitButtonText {
  display: none;
}

.jr-search-submit__icon {
  display: block !important;
  font-size: var(--jr-icon-font);
  line-height: 1;
}

@media (min-width: 768px) {
  body:not(.jr-has-results) .jr-search-bar {
    --jr-search-bar-pad: 4px;
  }

  body:not(.jr-has-results) .jr-search-submit {
    width: auto;
    min-width: 6.25rem;
    padding: 0 1.15rem;
  }

  body:not(.jr-has-results) .jr-search-submit #submitButtonText {
    display: inline;
    font-weight: 600;
    font-size: var(--jr-text-sm);
  }

  body:not(.jr-has-results) .jr-search-submit__icon {
    display: none !important;
  }
}

.jr-search-error {
  margin-top: 0.5rem;
  font-size: var(--jr-text-sm);
  font-weight: 500;
  color: var(--jr-validation);
  text-align: center;
}

.jr-search-clear {
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: var(--jr-icon-btn);
  height: var(--jr-icon-btn);
  min-width: var(--jr-icon-btn);
  min-height: var(--jr-icon-btn);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: var(--jr-radius-inner);
  text-decoration: none;
  z-index: 2;
}

.jr-search-clear i {
  display: block;
  font-size: 0.9375rem;
  line-height: 1;
}

.jr-search-clear:hover {
  background: var(--jr-glass-hover);
  color: var(--jr-text) !important;
}

.collapse-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--jr-ease), opacity 0.2s var(--jr-ease);
  opacity: 0;
}

.collapse-content.show {
  max-height: 2400px;
  opacity: 1;
}

@media (min-width: 768px) {
  #filterContainer.show {
    max-height: 1800px;
  }
}

.jr-filter-panel__inner {
  padding: 0.75rem;
  background: var(--jr-filter-group-bg);
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(8px);
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(8px);
  border: 1px solid var(--jr-glass-border);
  border-radius: var(--jr-radius-md);
}

.jr-filter-bar {
  margin: 0;
  flex: 0 0 auto;
}

.jr-filter-toggle {
  width: auto;
  min-height: var(--jr-control-h-sm);
  padding: 0.4rem 0.75rem;
  gap: 0.5rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.jr-filter-label {
  font-size: var(--jr-text-sm);
  font-weight: 500;
  color: var(--jr-text-secondary);
  margin-bottom: 0.35rem;
}

#filterContainer .filter-input {
  background: var(--jr-surface-inset);
  border-color: var(--jr-border-subtle);
  color: var(--jr-text);
}

#filterContainer .filter-input:focus {
  border-color: var(--jr-blue);
  box-shadow: 0 0 0 3px var(--jr-blue-soft);
}

.jr-filter-reset.has-active-filters {
  color: var(--jr-blue);
  background: var(--jr-blue-soft);
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--jr-blue-ring);
}

.jr-filter-toggle--active {
  color: var(--jr-blue) !important;
  background: var(--jr-blue-soft) !important;
  border-color: color-mix(in srgb, var(--jr-blue) 25%, transparent) !important;
}

.jr-filter-toggle[aria-expanded='true'] {
  color: var(--jr-text);
  background: var(--jr-surface-elevated);
  border-color: var(--jr-border);
  box-shadow: var(--jr-shadow-sm);
}

#filterToggleIcon {
  transition: transform 0.2s var(--jr-ease);
  color: var(--jr-text-tertiary);
}

.jr-filter-toggle[aria-expanded='true'] #filterToggleIcon {
  color: var(--jr-blue);
}

@media (prefers-reduced-motion: reduce) {
  .collapse-content {
    transition: none;
  }
}

.jr-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.125rem;
  padding: 0.1875rem;
  background: var(--jr-surface-inset);
  border-radius: var(--jr-radius-sm);
  border: 1px solid var(--jr-border-subtle);
}

.jr-segmented .form-check {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.jr-segmented .form-check-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  min-height: 2.125rem;
  border-radius: var(--jr-radius-inner);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--jr-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  margin: 0;
}

.jr-segmented .form-check-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.jr-segmented .form-check-input:checked + .form-check-label {
  background: var(--jr-blue-soft);
  color: var(--jr-blue);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--jr-blue) 22%, transparent);
  font-weight: 600;
}

.jr-results-section {
  margin-top: 0;
}

.jr-search-header.mb-3 {
  margin-bottom: var(--jr-block-gap) !important;
}

.jr-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.125rem 0.75rem;
}

.result-title[aria-disabled="true"] {
  color: var(--jr-text-secondary);
  cursor: default;
  text-decoration: none;
}

#resultsDiv > .state-card {
  margin-top: 0.25rem;
}

#resultsDiv:not(:empty) {
  margin-top: 0.25rem;
}

.jr-load-more:not(:has(.jr-spinner)) {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.jr-page-footer {
  margin-top: 2.5rem;
  padding-top: 0.25rem;
}

.jr-page-footer__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.jr-page-footer__start {
  justify-self: start;
}

.jr-page-footer__center {
  justify-self: center;
}

.jr-page-footer__end {
  justify-self: end;
}

.jr-page-footer__api {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.jr-page-footer__api:hover {
  color: var(--jr-text) !important;
}

@media (max-width: 575.98px) {
  .jr-page-footer__row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .jr-page-footer__start,
  .jr-page-footer__center,
  .jr-page-footer__end {
    justify-self: center;
  }
}

@media (min-width: 768px) {
  body.jr-has-results .jr-results-toolbar {
    padding: 0.35rem 0.25rem 0.75rem;
    border-bottom: 1px solid var(--jr-border-subtle);
    margin-bottom: 0.35rem;
  }

  body.jr-has-results #resultsDiv:not(:empty) {
    margin-top: 0.25rem;
  }

  .jr-view-toggle {
    min-height: var(--jr-control-h-sm);
    padding: 0.4rem 0.8rem;
    font-size: 0.8125rem;
  }

  body:not(.jr-results-list) #resultsDiv:not(:empty) {
    display: grid;
    gap: 0.5rem;
  }
}

.jr-results-toolbar__text {
  font-size: var(--jr-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jr-text-tertiary);
  font-variant-numeric: tabular-nums;
}

.jr-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.jr-results-list .result-card--list {
  margin-bottom: var(--jr-gap-sm);
}

.jr-results-list .result-card--list .result-card__head {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 1rem 0.7rem;
  border-bottom: none;
}

.jr-results-list .result-card--list .result-card__title-row {
  flex: 1 1 12rem;
  min-width: 0;
}

.jr-results-list .result-card--list .result-title {
  font-size: 0.875rem;
}

.jr-results-list .result-card--list .result-card__meta--inline {
  flex: 1 1 100%;
  order: 3;
  padding: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--jr-text-secondary);
}

@media (min-width: 768px) {
  .jr-results-list .result-card--list .result-card__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.35rem 0.75rem;
    padding: 0.55rem 0.95rem 0.5rem;
  }

  .jr-results-list .result-card--list .result-card__title-row {
    grid-column: 1;
    grid-row: 1;
    flex: none;
    max-width: none;
    order: unset;
    min-width: 0;
    align-items: center;
  }

  .jr-results-list .result-card--list .result-card__actions {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    order: unset;
    flex: none;
    gap: 0.35rem;
    align-self: center;
  }

  .jr-results-list .result-card--list .result-card__meta--inline {
    grid-column: 1 / -1;
    grid-row: 2;
    order: unset;
    flex: none;
    min-width: 0;
    padding: 0.1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  .jr-results-list .result-card--list .result-card__meta--inline .result-meta-row {
    /* Flatten rows so chips flow inline in compact list view */
    display: contents;
  }

  .jr-results-list .result-card--list .result-meta-row + .result-meta-row {
    margin-top: 0;
  }

  .jr-results-list .result-card--list .result-title {
    font-size: 0.875rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }

  .jr-results-list .result-card--list .meta-chip {
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
  }

  .jr-results-list .result-card--list .meta-stat {
    font-size: 0.75rem;
  }

  .jr-results-list .result-card--list {
    margin-bottom: 0.35rem;
  }

  .jr-results-list .result-card--list:hover {
    transform: translateX(2px);
  }
}

.jr-results-list .result-card--list .result-card__actions .btn-magnet,
.jr-results-list .result-card--list .result-card__actions .btn-action {
  width: var(--jr-icon-btn);
  height: var(--jr-icon-btn);
  min-width: var(--jr-icon-btn);
  min-height: var(--jr-icon-btn);
}

.result-card {
  border-radius: var(--jr-radius-md);
  overflow: hidden;
  border: 1px solid var(--jr-glass-border);
  background: var(--jr-glass);
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(12px);
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(12px);
  box-shadow: var(--jr-shadow-card);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--jr-ease), background 0.2s;
  margin-bottom: var(--jr-gap-sm);
  opacity: 1;
}

.result-card:not(.result-card--list) {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
}

.result-card:not(.result-card--list) .result-card__head {
  grid-column: 1;
  grid-row: 1;
  border-bottom: none;
  padding-bottom: 0.45rem;
}

.result-card:not(.result-card--list) .result-card__meta {
  grid-column: 1;
  grid-row: 2;
  border-top: 1px solid var(--jr-border-subtle);
  padding-top: 0.5rem;
  padding-bottom: 0.45rem;
}

.result-card:not(.result-card--list) .result-card__actions {
  grid-column: 1;
  grid-row: 3;
  padding: 0.55rem 0.8rem 0.65rem;
  border-top: 1px solid var(--jr-border-subtle);
}

.result-title--card {
  overflow: visible;
  display: block;
  word-break: break-word;
}

@media (min-width: 768px) {
  .result-card:not(.result-card--list) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }

  .result-card:not(.result-card--list) .result-card__head {
    grid-column: 1;
    grid-row: 1;
    padding: 0.65rem 0.75rem 0.45rem 0.95rem;
    border-bottom: none;
    align-items: center;
  }

  .result-card:not(.result-card--list) .result-card__title-row {
    align-items: center;
  }

  .result-card:not(.result-card--list) .result-card__actions {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0.65rem 0.85rem 0.65rem 0.35rem;
    border-top: none;
    border-left: 1px solid var(--jr-border-subtle);
  }

  .result-card:not(.result-card--list) .result-card__actions .btn-magnet,
  .result-card:not(.result-card--list) .result-card__actions .btn-action {
    width: var(--jr-icon-btn-desk, 2.5rem);
    height: var(--jr-icon-btn-desk, 2.5rem);
    min-width: var(--jr-icon-btn-desk, 2.5rem);
    min-height: var(--jr-icon-btn-desk, 2.5rem);
  }

  .result-card:not(.result-card--list) .result-card__meta {
    grid-column: 1;
    grid-row: 2;
    padding: 0.45rem 0.95rem 0.6rem;
    border-top: 1px solid var(--jr-border-subtle);
  }

  .result-card:not(.result-card--list) .result-card__meta .result-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.65rem;
  }

  .result-card:not(.result-card--list) .result-card__meta .result-meta-row + .result-meta-row {
    margin-top: 0.35rem;
  }

  .result-title--card {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .result-card__actions .btn-magnet,
  .result-card__actions .btn-action {
    width: var(--jr-icon-btn-desk, 2.5rem);
    height: var(--jr-icon-btn-desk, 2.5rem);
    min-width: var(--jr-icon-btn-desk, 2.5rem);
    min-height: var(--jr-icon-btn-desk, 2.5rem);
  }

  .jr-results-list .result-card--list .result-card__actions .btn-magnet,
  .jr-results-list .result-card--list .result-card__actions .btn-action {
    width: var(--jr-icon-btn-desk, 2.5rem);
    height: var(--jr-icon-btn-desk, 2.5rem);
    min-width: var(--jr-icon-btn-desk, 2.5rem);
    min-height: var(--jr-icon-btn-desk, 2.5rem);
  }
}

.result-card:hover {
  border-color: var(--jr-glass-border-hover);
  box-shadow: var(--jr-shadow-card-hover);
  background: var(--jr-glass-hover);
  transform: none;
}

.result-card__head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--jr-border-subtle);
}

.result-card__title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.result-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--jr-text);
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: none;
  line-height: 1.35;
}

@media (min-width: 768px) {
  .result-card__head {
    padding: 0.7rem 0.95rem;
  }

  .result-title {
    font-size: 0.9375rem;
  }
}

.result-title:hover {
  color: var(--jr-blue);
}

.result-card__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
  align-items: center;
}

.result-card__actions .btn-magnet,
.result-card__actions .btn-action {
  width: var(--jr-icon-btn);
  height: var(--jr-icon-btn);
  min-height: var(--jr-icon-btn);
  min-width: var(--jr-icon-btn);
}

.btn-magnet {
  background: var(--jr-blue-soft);
  color: var(--jr-blue);
  border: 1px solid transparent;
  border-radius: var(--jr-radius-inner);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

.btn-magnet:hover {
  color: #fff;
  background: var(--jr-blue);
  box-shadow: 0 2px 6px var(--jr-blue-ring);
}

.btn-magnet:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-action {
  padding: 0;
  line-height: 1;
  border-radius: var(--jr-radius-inner);
  border: 1px solid transparent;
  background: var(--jr-surface-inset);
  color: var(--jr-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-copy-magnet {
  background: var(--jr-warning-soft);
  color: var(--jr-warning);
}

.btn-copy-hash {
  background: var(--jr-success-soft);
  color: var(--jr-success);
}

.btn-send-to-tor {
  background: var(--jr-purple-soft);
  color: var(--jr-purple);
}

.btn-copy-magnet:hover {
  background: var(--jr-warning);
  color: #fff;
  border-color: transparent;
}

.btn-copy-hash:hover {
  background: var(--jr-success);
  color: #fff;
  border-color: transparent;
}

.btn-send-to-tor:hover {
  background: var(--jr-purple);
  color: #fff;
  border-color: transparent;
}

.btn-filter-tracker {
  width: var(--jr-icon-btn);
  height: var(--jr-icon-btn);
  min-height: var(--jr-icon-btn);
  min-width: var(--jr-icon-btn);
  padding: 0;
  border-radius: var(--jr-radius-inner);
  border: 1px solid var(--jr-border-subtle);
  background: var(--jr-surface-inset);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-filter-tracker:hover {
  border-color: var(--jr-blue);
  background: var(--jr-blue-soft);
}

.btn-filter-tracker.tracker-btn--active {
  border-color: var(--jr-blue);
  background: var(--jr-blue-soft);
  color: var(--jr-blue);
  box-shadow: 0 0 0 2px var(--jr-blue-soft);
}

.btn-action:hover {
  color: #fff;
}

.btn-action:active,
.btn-magnet:active {
  transform: scale(0.94);
}

.btn-send-to-tor.is-loading { cursor: wait; opacity: 0.7; }
.btn-send-to-tor.is-sent {
  background: var(--jr-success) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.result-card__meta {
  padding: 0.5rem 0.85rem;
  font-size: 0.6875rem;
  color: var(--jr-text-secondary);
}

@media (min-width: 768px) {
  .result-card__meta {
    padding: 0.55rem 1rem;
    font-size: 0.75rem;
  }
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--jr-radius-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  font-size: 0.8125rem;
}

.meta-chip i {
  font-size: 0.875rem;
  opacity: 0.92;
  flex-shrink: 0;
}

.meta-chip__value {
  letter-spacing: -0.01em;
}

.meta-chip--size {
  background: var(--jr-meta-size-bg);
  color: var(--jr-meta-size-text);
}

.meta-chip--date {
  background: var(--jr-meta-date-bg);
  color: var(--jr-meta-date-text);
}

.meta-chip--update {
  background: var(--jr-meta-update-bg);
  color: var(--jr-meta-update-text);
}

.meta-chip--sm {
  padding: 0.15rem 0.4rem;
  font-size: 0.6875rem;
}

.meta-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.meta-stat i {
  font-size: 0.875rem;
  flex-shrink: 0;
}

.meta-stat--seeds {
  color: var(--jr-success);
}

.meta-stat--peers {
  color: color-mix(in srgb, var(--jr-danger) 78%, var(--jr-text-secondary));
}

.result-meta-item--tracker strong {
  color: var(--jr-text);
  font-weight: 600;
}

.result-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.result-meta-row + .result-meta-row {
  margin-top: 0.4rem;
}

.result-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--jr-radius-xs);
  border: 1px solid;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.quality-badge--default {
  background: var(--jr-surface-inset);
  color: var(--jr-text-secondary);
  border-color: var(--jr-border);
}

.quality-badge--4k {
  background: var(--jr-purple-soft);
  color: var(--jr-purple);
  border-color: transparent;
}

.quality-badge--1080 {
  background: var(--jr-success-soft);
  color: var(--jr-success);
  border-color: transparent;
}

.quality-badge--720 {
  background: var(--jr-blue-soft);
  color: var(--jr-blue);
  border-color: transparent;
}

.quality-badge--sd {
  background: var(--jr-surface-inset);
  color: var(--jr-text-secondary);
  border-color: var(--jr-border);
}

.state-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--jr-radius-lg);
}

.state-card--help {
  background: var(--jr-blue-soft);
  border: 1px solid var(--jr-border-subtle);
}

.state-card--help i {
  color: var(--jr-blue);
}

.state-card--empty {
  background: var(--jr-surface);
  border: 1px solid var(--jr-border-subtle);
}

.jr-spinner {
  width: 3.5rem;
  height: 3.5rem;
  border: 3px solid var(--jr-border-subtle);
  border-top-color: var(--jr-accent);
  border-radius: 50%;
  animation: jr-spin 0.7s linear infinite;
}

.jr-spinner--sm {
  width: 2.5rem;
  height: 2.5rem;
  border-width: 2px;
}

.jr-spinner--inline {
  width: 1.75rem;
  height: 1.75rem;
  border-width: 2px;
}

.jr-load-more {
  min-height: 2.5rem;
}

@keyframes jr-spin {
  to { transform: rotate(360deg); }
}

.stat-card {
  background: var(--jr-glass);
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(12px);
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(12px);
  border: 1px solid var(--jr-glass-border);
  border-radius: var(--jr-radius-md);
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: var(--jr-shadow-card);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.stat-card:hover {
  border-color: var(--jr-glass-border-hover);
  box-shadow: var(--jr-shadow-card-hover);
  background: var(--jr-glass-hover);
}

.stat-number {
  font-variant-numeric: tabular-nums;
}

.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 576px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stats-grid--wide {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 576px) {
  .stats-grid--wide { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .stats-grid--wide { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
  .stats-grid--wide { grid-template-columns: repeat(5, 1fr); }
}

.aggregate-card {
  padding: 1rem 1.05rem 1.05rem;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--jr-blue) 10%, var(--jr-glass)),
    color-mix(in srgb, var(--jr-stat-update) 8%, var(--jr-glass))
  );
  border: 1px solid var(--jr-stats-table-border);
  border-radius: var(--jr-radius-md);
  box-shadow: var(--jr-shadow-card);
}

.aggregate-card__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.aggregate-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--jr-radius-inner);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--jr-blue), var(--jr-stat-update));
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--jr-blue) 35%, transparent);
}

.aggregate-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--jr-text);
  margin: 0;
  letter-spacing: -0.01em;
}

.aggregate-stat {
  text-align: left;
  padding: 0.8rem 0.85rem;
  border-radius: var(--jr-radius-sm);
  background: var(--jr-glass-light);
  border: 1px solid var(--jr-glass-border);
  height: 100%;
}

.aggregate-stat.stat-stat-new {
  border-color: color-mix(in srgb, var(--jr-stat-new) 35%, var(--jr-glass-border));
  background: var(--jr-stat-new-bg);
}

.aggregate-stat.stat-stat-update {
  border-color: color-mix(in srgb, var(--jr-stat-update) 35%, var(--jr-glass-border));
  background: var(--jr-stat-update-bg);
}

.aggregate-stat.stat-stat-total {
  border-color: color-mix(in srgb, var(--jr-stat-total) 22%, var(--jr-glass-border));
  background: var(--jr-stat-total-bg);
}

.aggregate-stat.stat-stat-confirm {
  border-color: color-mix(in srgb, var(--jr-stat-confirm) 35%, var(--jr-glass-border));
  background: var(--jr-stat-confirm-bg);
}

.aggregate-stat.stat-stat-wait {
  border-color: color-mix(in srgb, var(--jr-stat-wait) 35%, var(--jr-glass-border));
  background: var(--jr-stat-wait-bg);
}

.aggregate-stat.stat-stat-skip {
  border-color: color-mix(in srgb, var(--jr-stat-skip) 35%, var(--jr-glass-border));
  background: var(--jr-stat-skip-bg);
}

.aggregate-stat.stat-stat-new .stat-number { color: var(--jr-stat-new); }
.aggregate-stat.stat-stat-update .stat-number { color: var(--jr-stat-update); }
.aggregate-stat.stat-stat-total .stat-number { color: var(--jr-stat-total); }
.aggregate-stat.stat-stat-confirm .stat-number { color: var(--jr-stat-confirm); }
.aggregate-stat.stat-stat-wait .stat-number { color: var(--jr-stat-wait); }
.aggregate-stat.stat-stat-skip .stat-number { color: var(--jr-stat-skip); }

.aggregate-stat__label {
  font-size: var(--jr-text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--jr-text-secondary);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.aggregate-stat .stat-number {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 700;
}

.jr-hero--stats {
  margin-bottom: var(--jr-block-gap) !important;
}

.jr-hero--stats .jr-hero-title {
  color: var(--jr-text);
}

.jr-stats-controls {
  margin-bottom: var(--jr-block-gap);
}

#viewContainer {
  margin-top: 0;
}

.jr-stat-counter {
  background: var(--jr-stat-new-bg);
  border: 1px solid color-mix(in srgb, var(--jr-stat-new) 32%, var(--jr-glass-border));
  border-radius: var(--jr-radius-md);
}

.jr-stat-counter__value {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  line-height: 1.1;
  color: var(--jr-stat-new);
}

.jr-stat-counter__label {
  letter-spacing: 0.08em;
}

.jr-stats-toolbar #lastUpdate {
  padding: 0.25rem 0.5rem;
  border-radius: var(--jr-radius-xs);
  background: var(--jr-surface-inset);
  font-variant-numeric: tabular-nums;
  color: var(--jr-text-secondary);
  font-size: var(--jr-text-sm);
  gap: 0.35rem;
}

.jr-stats-toolbar #lastUpdate i {
  flex-shrink: 0;
}

.stats-table__tracker {
  min-width: 9rem;
}

.stats-table__tracker .stats-tracker__name {
  font-size: var(--jr-text-sm);
}

#statsTable tbody td {
  font-size: var(--jr-text-sm);
  padding: 0.7rem 0.85rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--jr-border-subtle);
}

#statsTable tbody td .stat-number {
  font-weight: inherit;
}

.stats-td--lastnew {
  color: var(--jr-text-secondary);
  font-size: var(--jr-text-xs);
}

#statsTable tbody tr:nth-child(even) {
  background: rgba(128, 128, 128, 0.03);
}

[data-bs-theme='dark'] #statsTable tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

#statsTable tbody tr:hover {
  background: color-mix(in srgb, var(--jr-stat-new) 10%, transparent) !important;
}

.stat-stat-new { color: var(--jr-stat-new); }
.stat-stat-update { color: var(--jr-stat-update); }
.stat-stat-total { color: var(--jr-stat-total); }
.stat-stat-wait { color: var(--jr-stat-wait); }
.stat-stat-skip { color: var(--jr-stat-skip); }
.stat-stat-confirm { color: var(--jr-stat-confirm); }
.stat-stat-lastnew { color: var(--jr-stat-lastnew); }

.stat-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 2.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--jr-radius-xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.stat-value--new {
  color: var(--jr-stat-new);
  background: var(--jr-stat-new-bg);
}

.stat-value--update {
  color: var(--jr-stat-update);
  background: var(--jr-stat-update-bg);
}

.stat-value--total {
  color: var(--jr-stat-total);
  background: var(--jr-stat-total-bg);
  font-weight: 700;
}

.stat-value--confirm {
  color: var(--jr-stat-confirm);
  background: var(--jr-stat-confirm-bg);
}

.stat-value--wait {
  color: var(--jr-stat-wait);
  background: var(--jr-stat-wait-bg);
}

.stat-value--skip {
  color: var(--jr-stat-skip);
  background: var(--jr-stat-skip-bg);
}

.stat-value--lastnew {
  color: var(--jr-stat-lastnew);
  background: var(--jr-stat-lastnew-bg);
  font-weight: 600;
  font-size: var(--jr-text-xs);
}

.jr-stats-table .stat-value,
#statsTable .stat-value {
  background: transparent !important;
  padding: 0;
  min-width: 0;
  border-radius: 0;
  justify-content: flex-end;
}

.jr-stats-table .stat-value--new,
.jr-stats-table .stat-value--update,
#statsTable .stat-value--new,
#statsTable .stat-value--update {
  font-weight: 600;
}

.jr-stats-table .stat-value--total,
#statsTable .stat-value--total {
  font-weight: 700;
}

.stat-card__metric--new { background: var(--jr-stat-new-bg); border-radius: var(--jr-radius-inner); padding: 0.45rem 0.55rem; }
.stat-card__metric--update { background: var(--jr-stat-update-bg); border-radius: var(--jr-radius-inner); padding: 0.45rem 0.55rem; }
.stat-card__metric--total { background: var(--jr-stat-total-bg); border-radius: var(--jr-radius-inner); padding: 0.45rem 0.55rem; }
.stat-card__metric--confirm { background: var(--jr-stat-confirm-bg); border-radius: var(--jr-radius-inner); padding: 0.45rem 0.55rem; }
.stat-card__metric--wait { background: var(--jr-stat-wait-bg); border-radius: var(--jr-radius-inner); padding: 0.45rem 0.55rem; }
.stat-card__metric--skip { background: var(--jr-stat-skip-bg); border-radius: var(--jr-radius-inner); padding: 0.45rem 0.55rem; }
.stat-card__metric--lastnew { background: var(--jr-stat-lastnew-bg); border-radius: var(--jr-radius-inner); padding: 0.45rem 0.55rem; }

.stat-card__metric[class*='stat-card__metric--'] .stat-value {
  background: transparent;
  padding: 0;
  min-width: 0;
}

.stat-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem 0.7rem;
  font-size: 0.8125rem;
}

.stat-card__metrics--full {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card__metric {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.stat-card__metric--wide {
  grid-column: 1 / -1;
}

.stat-card__metric-label {
  display: block;
  color: var(--jr-text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card__metrics .stat-number {
  font-size: var(--jr-text-base);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-card__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--jr-border-subtle);
}

.jr-stats-toolbar {
  gap: 0.5rem;
  padding-top: 0.75rem;
  margin-top: 0.125rem;
  border-top: 1px solid var(--jr-border-subtle);
}

#aggregateHost:not(:empty) {
  margin-bottom: var(--jr-block-gap-tight);
}

.jr-aggregate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--jr-block-gap-tight);
}

@media (min-width: 768px) {
  .jr-aggregate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--jr-block-gap-tight);
  }
}

@media (min-width: 992px) {
  .jr-aggregate-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.jr-stats-toolbar .btn-jr-nav,
.jr-stats-toolbar #homeLink {
  min-height: var(--jr-control-h);
  padding: 0.5rem 0.85rem;
  font-size: var(--jr-text-sm);
  font-weight: 500;
  white-space: nowrap;
  gap: 0.4rem;
}

.jr-stats-toolbar .btn-jr-nav i,
.jr-stats-toolbar #homeLink i {
  font-size: 1rem;
  opacity: 0.85;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .jr-stats-controls .jr-label {
    font-size: var(--jr-text-sm);
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
  }

  .jr-stats-controls .row.g-3 {
    margin-bottom: 1.125rem !important;
  }

  .jr-stats-toolbar {
    gap: 0.625rem;
    padding-top: 0.875rem;
  }

  .jr-stats-toolbar .btn-jr-nav,
  .jr-stats-toolbar #homeLink {
    padding: 0.55rem 1rem;
    font-size: var(--jr-text-base);
    font-weight: 500;
    gap: 0.5rem;
    border-radius: var(--jr-radius-inner);
  }

  .jr-stats-toolbar .btn-jr-nav i,
  .jr-stats-toolbar #homeLink i {
    font-size: 1.125rem;
    opacity: 0.92;
  }

  .jr-stats-toolbar #lastUpdate {
    font-size: var(--jr-text-sm);
    font-weight: 500;
    padding: 0.45rem 0.8rem;
    gap: 0.45rem;
    color: var(--jr-text-secondary);
  }

  .jr-stats-toolbar #lastUpdate i {
    font-size: 1.0625rem;
    opacity: 0.85;
  }

  .jr-stat-counter__label {
    font-size: var(--jr-text-sm);
  }

  .jr-aggregate-grid {
    gap: var(--jr-block-gap);
  }

  .aggregate-card__title {
    font-size: 1.0625rem;
  }

  .aggregate-stat__label {
    font-size: var(--jr-text-sm);
    margin-bottom: 0.35rem;
  }

  .jr-hero--stats-compact .jr-hero-title {
    font-size: 1.375rem;
  }

  .jr-hero--stats-compact .jr-hero-sub {
    font-size: var(--jr-text-sm);
  }

  .jr-navbar .btn-jr-nav {
    padding: 0.5rem 0.95rem;
    font-size: var(--jr-text-base);
    gap: 0.45rem;
  }

  .jr-navbar .btn-jr-nav i {
    font-size: 1.0625rem;
  }

  .jr-navbar .btn-jr-icon i {
    font-size: 1.125rem;
  }
}

.stats-tracker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.stats-tracker--compact {
  gap: 0.5rem;
}

.stats-tracker__icon {
  flex-shrink: 0;
}

.stats-tracker__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.stats-tracker__name {
  color: var(--jr-text);
  line-height: 1.25;
  word-break: break-word;
}

.stats-tracker__slug {
  color: var(--jr-text-tertiary);
  font-size: var(--jr-text-xs);
  line-height: 1.2;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stats-list-item {
  padding: 1rem 1rem 1.05rem;
  border-radius: var(--jr-radius-md);
}

.stats-list-item__head {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--jr-border-subtle);
}

.stats-list-item .stats-tracker__icon {
  width: 2.5rem;
  height: 2.5rem;
}

.stats-list-item .stats-tracker__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stats-list-item .stat-card__metrics {
  gap: 0.55rem 0.75rem;
}

.stats-list-item .stat-card__metric {
  padding: 0.55rem 0.65rem;
  border-radius: var(--jr-radius-inner);
  border: 1px solid var(--jr-border-subtle);
}

.stats-list-item .stat-card__metric--lastnew {
  border-color: color-mix(in srgb, var(--jr-stat-lastnew) 28%, var(--jr-glass-border));
}

.stats-list-item .stat-card__metric-label {
  font-size: 0.625rem;
}

.stats-list-item .stat-card__metrics .stat-number {
  font-size: 1rem;
}

.btn-jr-fab {
  background: var(--jr-surface-elevated);
  border: 1px solid var(--jr-border-subtle);
  color: var(--jr-text-secondary);
  box-shadow: var(--jr-shadow-md);
}

.btn-jr-fab:hover,
.btn-jr-fab:focus {
  background: var(--jr-surface-inset);
  color: var(--jr-text);
  border-color: var(--jr-border);
  transform: translateY(-2px);
}

#backToTop.btn-jr-fab {
  box-shadow: var(--jr-shadow-md);
}

.jr-search-sticky {
  position: relative;
  z-index: 1;
}

.jr-search-form {
  position: relative;
}

.jr-search-form-body {
  /* Scroll/sticky boundary: search block + .jr-results-section are siblings here */
  position: relative;
}

.jr-search-block {
  position: relative;
}

.jr-search-pin-group {
  position: relative;
}

.jr-search-dock-wrap {
  position: relative;
  z-index: 1;
}

.jr-search-header {
  overflow: visible;
}

body:not(.jr-has-results) .jr-search-block {
  background: var(--jr-glass);
  border: 1px solid var(--jr-glass-border);
  border-radius: var(--jr-radius-lg);
  box-shadow: var(--jr-shadow-card);
}

body:not(.jr-has-results) .jr-search-pin-group,
body:not(.jr-has-results) .jr-search-filters-shell.glass-card {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

[data-jr-glass='true'] body:not(.jr-has-results) .jr-search-block {
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
}

.jr-search-dock {
  padding: 0.875rem 0.875rem 0.75rem;
}

.jr-search-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.625rem 0.875rem 0.75rem;
  border-top: 1px solid var(--jr-border-subtle);
}

.jr-search-toolbar .jr-search-extras {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.jr-search-toolbar .jr-sort-row {
  margin-bottom: 0 !important;
}

#filterContainer {
  padding: 0 0.875rem 0.875rem;
}

#filterContainer .jr-filter-panel__inner {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .jr-search-dock {
    padding: 1rem 1rem 0.75rem;
  }

  .jr-search-toolbar {
    flex-wrap: nowrap;
    gap: 0.75rem;
    padding: 0.5rem 1rem 0.75rem;
  }

  .jr-search-toolbar .jr-sort-row {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
  }

  .jr-search-toolbar .jr-segmented {
    flex: 1 1 auto;
    min-width: 0;
  }

  .jr-search-toolbar .jr-sort-row__footer {
    margin-left: auto;
    flex: 0 0 auto;
    gap: 0.5rem;
  }

  .jr-exact-switch {
    min-height: 2rem;
    padding: 0.2rem 0.55rem;
  }

  .jr-exact-switch .form-check-label {
    font-size: 0.8125rem;
  }

  #clearSearchStorage {
    min-height: 2rem;
    padding: 0.35rem 0.65rem;
  }

  #filterContainer {
    padding: 0 1rem 1rem;
  }

  body:not(.jr-has-results) .jr-search-input {
    min-height: calc(3rem - var(--jr-search-bar-pad) * 2);
    font-size: 1.0625rem;
  }

  body:not(.jr-has-results) .jr-search-submit {
    min-height: calc(3rem - var(--jr-search-bar-pad) * 2 - 2px);
    height: calc(3rem - var(--jr-search-bar-pad) * 2 - 2px);
  }
}

body.jr-has-results .jr-search-pin-group {
  position: static;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

body.jr-has-results .jr-search-filters-shell {
  margin-bottom: 0 !important;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

body.jr-has-results .jr-search-filters-shell.glass-card {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body.jr-has-results .jr-search-dock-wrap {
  position: static;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

body.jr-has-results .jr-search-header {
  position: static;
  margin: 0 !important;
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overflow: visible;
}

body.jr-has-results .jr-search-toolbar {
  padding: 0.625rem 0 0;
  margin: 0;
  border-top: 1px solid var(--jr-border-subtle);
  gap: 0.625rem;
  background: transparent;
  border-radius: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body.jr-has-results #filterContainer {
  padding: 0;
  margin-top: 0.5rem;
}

body.jr-has-results #filterContainer.show {
  border-top: 1px solid var(--jr-border-subtle);
  padding-top: 0.625rem;
}

body.jr-has-results .jr-search-submit {
  min-height: calc(2.625rem - var(--jr-search-bar-pad) * 2 - 2px);
  height: calc(2.625rem - var(--jr-search-bar-pad) * 2 - 2px);
}

@media (max-width: 767px) {
  body.jr-has-results .jr-search-block {
    /* Unwrap block so pin-group sticky is bounded by .jr-search-form-body (incl. results), not the short block */
    display: contents;
  }

  body.jr-has-results .jr-search-pin-group {
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--jr-sticky-top) + var(--jr-sticky-gap));
    z-index: 1010;
    margin: 0 0 0.5rem;
    padding: 0.625rem 0.75rem 0.5rem;
    background: var(--jr-glass);
    border: 1px solid var(--jr-glass-border);
    border-radius: var(--jr-radius-lg);
    box-shadow: var(--jr-shadow-card);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  [data-jr-glass='true'] body.jr-has-results .jr-search-pin-group {
    -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
    backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
  }

  body.jr-has-results .jr-search-filters-shell {
    margin-bottom: 0.625rem !important;
  }

  body.jr-has-results .jr-search-header {
    padding: 0;
    background: var(--jr-glass) !important;
    border: 1px solid var(--jr-glass-border) !important;
    border-radius: var(--jr-radius-lg) !important;
    box-shadow: var(--jr-shadow-sm) !important;
    overflow: hidden;
  }

  [data-jr-glass='true'] body.jr-has-results .jr-search-header {
    -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
    backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
  }

  body.jr-has-results .jr-search-toolbar {
    padding: 0.625rem 0.875rem 0.75rem;
    border-top: none;
  }

  body.jr-has-results #filterContainer {
    padding: 0 0.875rem 0.875rem;
    margin-top: 0;
  }

  body.jr-has-results .jr-filter-toggle__short {
    display: inline !important;
  }

  body.jr-has-results .jr-filter-toggle__long {
    display: none !important;
  }

  body.jr-has-results .jr-segmented {
    padding: 0.125rem;
    background: var(--jr-surface-inset);
  }

  body.jr-has-results .jr-exact-switch {
    background: var(--jr-surface-inset);
  }

  body.jr-has-results .jr-results-toolbar {
    padding: 0.5rem 0.125rem 0.75rem;
  }

  body.jr-has-results .result-card {
    margin-bottom: 0.625rem;
  }

  body.jr-has-results .result-card:not(.result-card--list) .result-card__head {
    padding: 0.65rem 0.75rem 0.45rem;
  }

  body.jr-has-results .result-card:not(.result-card--list) .result-card__meta {
    padding: 0.5rem 0.75rem 0.55rem;
  }

  body.jr-has-results .result-card:not(.result-card--list) .result-card__actions {
    padding: 0.55rem 0.75rem 0.65rem;
    gap: 0.375rem;
  }

  body.jr-has-results .result-card__actions .btn-magnet,
  body.jr-has-results .result-card__actions .btn-action {
    height: 2.375rem;
    min-height: 2.375rem;
  }

  body.jr-has-results .result-card:not(.result-card--list) .result-card__actions .btn-magnet,
  body.jr-has-results .result-card:not(.result-card--list) .result-card__actions .btn-action {
    height: 2.375rem;
    min-height: 2.375rem;
  }
}

@media (min-width: 768px) {
  body.jr-has-results .jr-search-block {
    /* Whole search+filters card; sticks while results scroll (parent = .jr-search-form-body) */
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--jr-sticky-top) + var(--jr-sticky-gap));
    z-index: 1010;
    margin: 0 0 0.875rem;
    padding: 0.75rem 0.875rem 0.625rem;
    background: var(--jr-glass);
    border: 1px solid var(--jr-glass-border);
    border-radius: var(--jr-radius-lg);
    box-shadow: var(--jr-shadow-card);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  [data-jr-glass='true'] body.jr-has-results .jr-search-block {
    -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
    backdrop-filter: saturate(var(--jr-glass-saturate)) blur(var(--jr-glass-blur));
  }
}

.jr-has-results .jr-search-dock {
  padding: 0;
}

.jr-has-results .jr-search-input {
  font-size: 0.9375rem;
}

.jr-has-results .jr-search-submit {
  border: none;
}

.jr-has-results .jr-segmented .form-check-label {
  padding: 0.35rem 0.65rem;
  min-height: 1.875rem;
  font-size: 0.8125rem;
}

.jr-has-results .jr-filter-toggle {
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  background: var(--jr-surface-inset);
  border: 1px solid var(--jr-border-subtle);
  border-radius: var(--jr-radius-sm);
}

@media (max-width: 767px) {
  body.jr-has-results {
    padding-top: 0;
  }
}

@media (min-width: 768px) {
  body.jr-has-results .jr-search-bar {
    --jr-search-bar-pad: 3px;
  }

  body.jr-has-results .jr-search-input {
    min-height: calc(2.625rem - var(--jr-search-bar-pad) * 2);
    font-size: 0.9375rem;
  }

  body.jr-has-results .jr-search-submit {
    min-height: calc(2.625rem - var(--jr-search-bar-pad) * 2 - 2px);
    height: calc(2.625rem - var(--jr-search-bar-pad) * 2 - 2px);
    width: auto;
    min-width: 5.75rem;
    padding: 0 1rem;
  }

  body.jr-has-results .jr-search-submit #submitButtonText {
    display: inline;
    font-weight: 600;
    font-size: var(--jr-text-sm);
  }

  body.jr-has-results .jr-search-submit__icon {
    display: none !important;
  }

  body.jr-has-results .jr-search-toolbar .jr-sort-row {
    gap: 0.5rem;
  }

  body.jr-has-results .jr-segmented {
    padding: 0.125rem;
    background: var(--jr-surface-inset);
  }

  body.jr-has-results .jr-exact-switch {
    min-height: 2rem;
    padding: 0.2rem 0.55rem;
    background: var(--jr-surface-inset);
  }

  body.jr-has-results #clearSearchStorage {
    min-height: 2rem;
    padding: 0.35rem 0.65rem;
    color: var(--jr-text-secondary);
  }
}

.jr-has-results .jr-search-extras .jr-sort-row {
  margin-bottom: 0 !important;
}

.jr-has-results #jrHero {
  display: none;
}

.jr-has-results .jr-hero {
  margin-bottom: 0;
}

.jr-has-results .jr-hero-glow {
  display: none;
}

.jr-has-results .jr-hero-title {
  font-size: 1.125rem;
  margin-bottom: 0 !important;
}

.jr-has-results .jr-hero-sub {
  display: none;
}

.jr-has-results .jr-hero .mb-3 {
  margin-bottom: 0 !important;
}

@media (min-width: 768px) {
  body.jr-has-results .container.jr-app {
    padding-top: 1.25rem;
  }
}

.tracker-icon--fallback {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.85;
}

#statsTable,
.jr-stats-table {
  border-radius: var(--jr-radius-md);
  overflow: visible;
  border: 1px solid var(--jr-stats-table-border);
  background: var(--jr-stats-table-bg);
  box-shadow: var(--jr-shadow-md);
}

.jr-stats-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.jr-stats-scroll-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--jr-text-secondary);
  border-top: 1px solid var(--jr-border-subtle);
}

.jr-stats-scroll-hint i {
  font-size: 0.875rem;
  opacity: 0.75;
}

.jr-stats-table__scroll .table {
  min-width: 720px;
}

.jr-stats-table__scroll .table thead tr:first-child th:first-child {
  border-top-left-radius: calc(var(--jr-radius-md) - 1px);
}

.jr-stats-table__scroll .table thead tr:first-child th:last-child {
  border-top-right-radius: calc(var(--jr-radius-md) - 1px);
}

#statsTable thead,
.jr-stats-table thead {
  background: var(--jr-stats-thead-bg);
}

.stats-th {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stats-th--tracker {
  color: var(--jr-text-secondary);
}

.stats-th--lastnew { color: var(--jr-stat-lastnew); }
.stats-th--new { color: var(--jr-stat-new); }
.stats-th--update { color: var(--jr-stat-update); }
.stats-th--total { color: var(--jr-stat-total); }
.stats-th--confirm { color: var(--jr-stat-confirm); }
.stats-th--wait { color: var(--jr-stat-wait); }
.stats-th--skip { color: var(--jr-stat-skip); }

.stats-td {
  white-space: nowrap;
}

#tablePagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--jr-stats-table-border);
  background: var(--jr-stats-thead-bg);
  font-size: 0.875rem;
  color: var(--jr-text-secondary);
}

.jr-panel {
  border-radius: var(--jr-radius-md);
}

.jr-badge {
  border-radius: var(--jr-radius-xs);
  font-weight: 600;
  font-size: var(--jr-text-xs);
  background: var(--jr-accent-soft);
  color: var(--jr-accent);
  border: none;
  padding: 0.2em 0.5em;
}

#backToTop {
  position: fixed;
  bottom: var(--jr-fab-offset, calc(1.25rem + env(safe-area-inset-bottom, 0)));
  right: calc(1rem + env(safe-area-inset-right, 0));
  z-index: 1040;
  width: var(--jr-icon-btn);
  height: var(--jr-icon-btn);
  min-width: var(--jr-icon-btn);
  min-height: var(--jr-icon-btn);
  padding: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--jr-radius-sm);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.15s;
}

#backToTop i {
  display: block;
  font-size: var(--jr-icon-font);
  line-height: 1;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

#backToTop.btn-jr-fab:hover {
  transform: translateY(-2px);
}

.btn-action .jr-spinner--sm,
.btn-magnet .jr-spinner--sm {
  width: 1.125rem;
  height: 1.125rem;
  border-width: 2px;
  border-top-color: currentColor;
}

.form-control,
.form-select {
  background-color: var(--jr-surface-inset);
  border-color: var(--jr-border);
  color: var(--jr-text);
  border-radius: var(--jr-radius-sm);
  transition: border-color 0.15s var(--jr-ease), box-shadow 0.15s var(--jr-ease);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--jr-surface);
  border-color: var(--jr-accent);
  box-shadow: 0 0 0 3px var(--jr-accent-ring);
  color: var(--jr-text);
}

.form-control::placeholder {
  color: var(--jr-text-tertiary);
}

.form-label {
  color: var(--jr-text-secondary);
}

.form-check-input:checked {
  background-color: var(--jr-blue);
  border-color: var(--jr-blue);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px var(--jr-blue-soft);
}
.form-check.form-switch .form-check-input {
  width: 2.25rem;
  height: 1.375rem;
  margin-top: 0.15rem;
  cursor: pointer;
  background-color: var(--jr-border);
  border-color: transparent;
  transition: background-color 0.2s var(--jr-ease);
}

.form-check.form-switch .form-check-input:checked {
  background-color: var(--jr-blue);
  border-color: transparent;
}

.form-check.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 3px var(--jr-blue-soft);
}

.form-check.form-switch .form-check-label {
  cursor: pointer;
  padding-top: 0.125rem;
}

#statsTable thead th,
.jr-stats-table thead th {
  background: var(--jr-stats-thead-bg);
  border-bottom: 1px solid var(--jr-stats-table-border);
  font-size: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
  padding: 0.8rem 0.85rem;
  vertical-align: bottom;
}

[data-jr-glass='true'] #statsTable thead th,
[data-jr-glass='true'] .jr-stats-table thead th {
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(12px);
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(12px);
}

#statsTable thead th.stats-th--tracker {
  color: var(--jr-text-secondary);
}

#statsTable thead th.stats-th--lastnew,
.jr-stats-table thead th.stats-th--lastnew { color: var(--jr-stat-lastnew); }

#statsTable thead th.stats-th--new,
.jr-stats-table thead th.stats-th--new { color: var(--jr-stat-new); }

#statsTable thead th.stats-th--update,
.jr-stats-table thead th.stats-th--update { color: var(--jr-stat-update); }

#statsTable thead th.stats-th--total,
.jr-stats-table thead th.stats-th--total { color: var(--jr-stat-total); }

#statsTable thead th.stats-th--confirm,
.jr-stats-table thead th.stats-th--confirm { color: var(--jr-stat-confirm); }

#statsTable thead th.stats-th--wait,
.jr-stats-table thead th.stats-th--wait { color: var(--jr-stat-wait); }

#statsTable thead th.stats-th--skip,
.jr-stats-table thead th.stats-th--skip { color: var(--jr-stat-skip); }

#statsTable tbody tr {
  transition: background-color 0.15s var(--jr-ease);
}

#statsTable .table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: transparent;
  margin-bottom: 0;
}

.text-secondary {
  color: var(--jr-text-secondary) !important;
}

.text-body {
  color: var(--jr-text);
}

.alert-danger {
  background: rgba(197, 34, 31, 0.08);
  border: 1px solid var(--jr-border-subtle);
  color: var(--jr-danger);
}

[data-bs-theme='dark'] .alert-danger {
  background: rgba(242, 139, 130, 0.1);
  color: var(--jr-danger);
}

.jr-sort-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.jr-sort-row__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.jr-exact-switch {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: var(--jr-control-h);
  padding: 0.35rem 0.75rem;
  border-radius: var(--jr-radius-sm);
  background: var(--jr-surface-inset);
  border: 1px solid var(--jr-border-subtle);
  flex: 1 1 12rem;
}

.jr-exact-switch .form-check-label {
  font-size: var(--jr-text-sm);
  font-weight: 500;
  color: var(--jr-text-secondary);
  margin: 0;
  cursor: pointer;
}

.jr-exact-switch .form-check-input {
  margin: 0;
  flex-shrink: 0;
}

.jr-search-extras {
  padding-top: 0;
}

#filterContainer.show {
  border-top: 1px solid var(--jr-border-subtle);
  margin-top: 0.25rem;
  padding-top: 0.75rem;
}

body.jr-has-results .jr-results-section {
  margin-top: 0;
}

body.jr-has-results .jr-results-toolbar {
  padding-top: 0.125rem;
}

@media (min-width: 768px) {
  .jr-sort-row {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .jr-sort-row__footer {
    margin-left: auto;
    flex: 0 1 auto;
  }

  .jr-exact-switch {
    flex: 0 1 auto;
  }
}

.jr-stats-controls .jr-search-input {
  border-radius: var(--jr-radius-sm);
  border-right: 1px solid var(--jr-border);
  background: var(--jr-glass-light);
}

.jr-stats-controls .jr-search-input:focus {
  background: var(--jr-surface);
}

@media (max-width: 767px) {
  .jr-search-submit {
    width: var(--jr-icon-btn);
    min-width: var(--jr-icon-btn);
    padding: 0;
  }

  .jr-search-submit #submitButtonText {
    display: none;
  }

  .jr-search-submit__icon {
    display: inline-block !important;
  }
}

@media (max-width: 767px) {
  body {
    background-attachment: scroll;
    overflow-x: clip;
  }

  .container.jr-app {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .jr-navbar__actions {
    gap: 0.25rem !important;
  }

  .jr-navbar .d-flex.gap-2 {
    gap: 0.35rem !important;
  }

  .jr-navbar .btn-jr-nav,
  .jr-navbar .btn-jr-icon {
    color: var(--jr-text);
  }

  .jr-navbar .btn-jr-nav i,
  .jr-navbar .btn-jr-icon i {
    opacity: 1;
    font-size: 1.125rem;
  }

  .jr-stats-toolbar .btn-jr-nav,
  .jr-stats-toolbar #homeLink {
    color: var(--jr-text);
  }

  .jr-stats-toolbar .btn-jr-nav i,
  .jr-stats-toolbar #homeLink i {
    opacity: 1;
    font-size: 1.125rem;
  }

  .jr-navbar .btn-jr-nav .btn-jr-nav__label,
  .jr-stats-toolbar .btn-jr-nav .btn-jr-nav__label,
  .jr-stats-toolbar #homeLink .btn-jr-nav__label {
    display: none;
  }

  .btn-jr-nav {
    padding: 0.45rem 0.55rem;
    min-width: var(--jr-icon-btn);
  }

  .jr-hero-title {
    font-size: 1.625rem;
  }

  body:not(.jr-has-results) .jr-hero--search .jr-hero-glow {
    width: 200px;
    height: 200px;
    filter: blur(36px);
    opacity: 0.55;
  }

  body:not(.jr-has-results) .jr-hero--search .mb-3 {
    margin-bottom: 0.5rem !important;
  }

  body:not(.jr-has-results) .jr-hero--search .jr-hero-title {
    font-size: 1.5rem;
  }

  body:not(.jr-has-results) .jr-hero--search .jr-hero-sub {
    font-size: 0.8125rem;
    line-height: 1.45;
    padding-inline: 0.5rem;
  }

  body:not(.jr-has-results) .jr-hero {
    margin-bottom: 1.25rem !important;
  }

  html.jr-standalone body:not(.jr-has-results) #jrHero {
    /* Installed PWA: hero duplicates the search card on a narrow screen */
    display: none;
  }

  .jr-has-results .jr-hero {
    margin-bottom: 0.75rem !important;
  }

  .jr-hero--stats {
    display: block;
    margin-bottom: 0.75rem !important;
  }

  .jr-hero--stats-compact .jr-hero-title {
    font-size: 1.125rem;
  }

  .jr-search-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem 0.75rem;
  }

  .jr-filter-toggle {
    width: 100%;
  }

  .jr-filter-panel__inner {
    padding: 0.875rem;
  }

  #filterContainer {
    padding: 0 0.875rem 0.875rem;
  }

  .jr-sort-row {
    gap: 0.875rem;
  }

  .jr-sort-row .jr-segmented {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem;
    padding: 0.25rem;
  }

  .jr-segmented .form-check {
    width: 100%;
    min-width: 0;
  }

  .jr-segmented .form-check-label {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0.35rem;
    font-size: 0.8125rem;
    min-height: 2.5rem;
  }

  .jr-sort-row__footer {
    width: 100%;
    padding-top: 0.125rem;
    gap: 0.875rem;
  }

  .jr-exact-switch {
    flex: 1 1 auto;
    min-width: 0;
  }

  .jr-sort-row #clearSearchStorage {
    flex-shrink: 0;
    min-height: var(--jr-control-h);
  }

  .jr-sort-row .form-switch {
    width: auto;
    padding-left: 0;
  }

  .jr-results-toolbar {
    padding: 0.625rem 0.125rem 1rem;
  }

  #resultsDiv:not(:empty) {
    margin-top: 0.375rem;
  }

  #resultsDiv > .state-card {
    padding: 1.75rem 1rem;
  }

  body:not(.jr-has-results) .jr-search-dock {
    padding: 0.75rem 0.75rem 0.625rem;
  }

  body:not(.jr-has-results) .jr-results-section {
    margin-top: 0.5rem;
  }

  .jr-results-list .result-card--list .result-card__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.65rem 0.85rem 0.75rem;
  }

  .jr-results-list .result-card--list .result-card__title-row {
    flex: none;
    width: 100%;
  }

  .jr-results-list .result-card--list .result-title {
    font-size: 0.8125rem;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
  }

  .jr-results-list .result-card--list .result-card__actions {
    width: 100%;
    margin-left: 0;
    padding: 0.55rem 0 0.2rem;
    border-top: 1px solid var(--jr-border-subtle);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .jr-results-list .result-card--list .result-card__actions .btn-magnet,
  .jr-results-list .result-card--list .result-card__actions .btn-action {
    width: 100%;
    min-width: 0;
    height: var(--jr-icon-btn);
    min-height: var(--jr-icon-btn);
  }

  .result-card {
    margin-bottom: 0.75rem;
  }

  .result-card:not(.result-card--list) .result-card__head {
    padding: 0.8rem 0.9rem 0.55rem;
  }

  .result-card:not(.result-card--list) .result-card__meta {
    padding: 0.65rem 0.9rem 0.7rem;
  }

  .result-card:not(.result-card--list) .result-card__actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.7rem 0.85rem 0.9rem;
  }

  .result-card:not(.result-card--list) .result-card__actions .btn-magnet,
  .result-card:not(.result-card--list) .result-card__actions .btn-action {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: var(--jr-icon-btn);
    min-height: var(--jr-icon-btn);
  }

  .result-meta-row + .result-meta-row {
    margin-top: 0.5rem;
  }

  .result-meta-row {
    gap: 0.45rem 0.65rem;
  }

  .result-card__meta,
  .jr-results-list .result-card--list .result-card__meta--inline {
    font-size: 0.8125rem;
  }

  .meta-chip,
  .meta-stat {
    gap: 0.4rem;
    font-size: 0.8125rem;
  }

  .meta-chip--sm {
    font-size: 0.75rem;
  }

  .result-title {
    font-size: 0.8125rem;
  }

  .jr-stats-controls {
    padding: 0.875rem !important;
  }

  .jr-stats-controls .row.g-3 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
    margin-bottom: 0.85rem !important;
  }

  .jr-stats-controls .jr-stat-counter {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  .jr-stats-toolbar {
    gap: 0.5rem !important;
    row-gap: 0.55rem !important;
    padding-top: 0.75rem !important;
    margin-top: 0.25rem !important;
  }

  .jr-stats-toolbar .btn-jr-nav,
  .jr-stats-toolbar #homeLink {
    padding: 0.5rem 0.7rem;
  }

  .jr-stats-toolbar #lastUpdate {
    margin-top: 0.25rem;
    padding: 0.35rem 0.55rem;
    width: 100%;
    justify-content: flex-end;
    margin-left: 0 !important;
  }

  .aggregate-card {
    padding: 1.05rem 0.95rem 1rem;
  }

  .aggregate-card__head {
    margin-bottom: 0.95rem;
  }

  .jr-aggregate-grid {
    gap: var(--jr-block-gap-tight);
  }

  .aggregate-card__title {
    font-size: 0.9375rem;
  }

  .aggregate-stat {
    padding: 0.75rem 0.8rem;
  }

  .aggregate-stat__label {
    margin-bottom: 0.4rem;
  }

  .aggregate-stat .stat-number {
    font-size: 1.125rem;
  }

  .stats-list {
    gap: 0.875rem;
  }

  .stats-list-item {
    padding: 1.05rem 0.95rem 1rem;
  }

  .stats-list-item__head {
    margin-bottom: 0.9rem;
    padding-bottom: 0.8rem;
  }

  .stats-list-item .stat-card__metrics {
    gap: 0.65rem 0.7rem;
  }

  .stats-list-item .stat-card__metric {
    padding: 0.65rem 0.72rem;
  }

  .stats-list.stats-list--wide .stat-card__metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 0.55rem;
  }

  .stats-list.stats-list--wide .stat-card__metric--wide {
    grid-column: 1 / -1;
  }

  #aggregateHost:not(:empty) {
    margin-bottom: var(--jr-block-gap);
  }

  .jr-stats-table__scroll {
    position: relative;
  }

  .jr-stats-table__scroll::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2rem;
    background: linear-gradient(to left, color-mix(in srgb, var(--bs-body-bg) 90%, transparent), transparent);
    pointer-events: none;
    z-index: 4;
  }

  .jr-stats-scroll-hint {
    display: flex;
  }

  #statsTable thead th.stats-th--tracker,
  #statsTable tbody td.stats-table__tracker {
    position: sticky;
    left: 0;
    z-index: 2;
  }

  #statsTable thead th.stats-th--tracker {
    z-index: 3;
    background: var(--jr-stats-thead-bg);
    box-shadow: 2px 0 8px -2px rgba(0, 0, 0, 0.1);
  }

  #statsTable tbody td.stats-table__tracker {
    background-color: var(--bs-body-bg);
    box-shadow: 2px 0 8px -2px rgba(0, 0, 0, 0.06);
  }

  #statsTable tbody tr:nth-child(even) td.stats-table__tracker {
    background-color: color-mix(in srgb, var(--bs-body-bg) 96%, rgba(128, 128, 128, 0.06));
  }

  [data-bs-theme='dark'] #statsTable tbody tr:nth-child(even) td.stats-table__tracker {
    background-color: color-mix(in srgb, var(--bs-body-bg) 96%, rgba(255, 255, 255, 0.04));
  }

  #statsTable tbody tr:hover td.stats-table__tracker {
    background-color: color-mix(in srgb, var(--jr-stat-new) 10%, var(--bs-body-bg)) !important;
  }
}

@media (max-width: 640px) {
  .form-control,
  .form-select {
    font-size: 16px;
  }

  #submitButton,
  #filterToggle,
  #clearSearchStorage,
  .jr-navbar .btn-jr-nav,
  .jr-stats-toolbar .btn-jr-nav,
  .jr-stats-toolbar #homeLink,
  #paginationPrev,
  #paginationNext {
    min-height: 44px;
  }

}

.tap-target:not(.btn-action):not(.btn-magnet):not(.btn-filter-tracker):not(.btn-jr-icon):not(.jr-search-submit):not(.jr-search-clear):not(#backToTop) {
  min-height: 44px;
  min-width: 44px;
}

.btn-action > i,
.btn-magnet > i,
.btn-filter-tracker > i,
.btn-jr-icon > i {
  display: block;
  font-size: var(--jr-icon-font);
  line-height: 1;
  pointer-events: none;
}

button, a.magneto, .btn-copy-magnet {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

*:focus-visible {
  outline: 2px solid var(--jr-blue);
  outline-offset: 2px;
}

.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

#refreshIcon.spinner {
  display: inline-block;
  animation: jr-spin 0.8s linear infinite;
}

.jr-hero-glow {
  width: 280px;
  height: 280px;
  background: var(--jr-hero-glow-color);
  filter: blur(48px);
  opacity: 0.65;
  z-index: -1;
}

.jr-hero-title {
  letter-spacing: -0.03em;
  font-size: var(--jr-text-hero);
}

.jr-hero-sub {
  font-size: var(--jr-text-sm);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.modal-content.glass-card {
  box-shadow: var(--jr-shadow-md);
}

.modal-backdrop.show {
  opacity: 0.65;
}

#resultsDiv {
  min-height: 0;
}


.jr-skeleton {
  border-radius: var(--jr-radius-inner);
  background: linear-gradient(
    90deg,
    var(--jr-surface-inset) 0%,
    color-mix(in srgb, var(--jr-text) 6%, var(--jr-surface-inset)) 50%,
    var(--jr-surface-inset) 100%
  );
  background-size: 200% 100%;
  animation: jr-skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes jr-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.jr-skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.jr-skeleton-card {
  padding: 0.75rem 0.85rem;
  border-radius: var(--jr-radius-md);
  border: 1px solid var(--jr-border-subtle);
  background: var(--jr-glass-light);
}

.jr-skeleton--title {
  height: 1rem;
  width: 88%;
  margin-bottom: 0.55rem;
}

.jr-skeleton--line {
  height: 0.75rem;
  width: 62%;
  margin-bottom: 0.55rem;
}

.jr-skeleton-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.jr-skeleton--chip {
  display: block;
  height: 1.35rem;
  width: 4.5rem;
  border-radius: var(--jr-radius-xs);
}

.jr-skeleton-stats {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 100%;
}

.jr-skeleton-stats--inline {
  max-width: 28rem;
}

.jr-skeleton--aggregate {
  height: 5.5rem;
  border-radius: var(--jr-radius-md);
}

.jr-skeleton--stat-row {
  height: 3.25rem;
  border-radius: var(--jr-radius-sm);
}

.jr-hero--stats-compact .jr-hero-title {
  font-size: 1.25rem;
  margin-bottom: 0.15rem !important;
}

.jr-hero--stats-compact .jr-hero-sub {
  font-size: 0.8125rem;
}

.jr-segmented .form-check-input:focus-visible + .form-check-label {
  outline: 2px solid var(--jr-blue);
  outline-offset: 2px;
}

.jr-navbar .container {
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
}

@media (prefers-reduced-transparency: reduce) {
  [data-jr-glass='true'] .glass-card,
  [data-jr-glass='true'] .stat-card,
  [data-jr-glass='true'] .result-card,
  [data-jr-glass='true'] .jr-navbar,
  [data-jr-glass='true'] .modal-content.glass-card,
  [data-jr-glass='true'] .jr-filter-panel__inner,
  .jr-has-results .jr-search-dock-wrap,
  body.jr-has-results .jr-search-pin-group,
  body.jr-has-results .jr-search-block {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: var(--jr-surface-elevated) !important;
  }

  .jr-skeleton {
    animation: none;
    background: var(--jr-surface-inset);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .jr-skeleton {
    animation: none !important;
  }
}

.jr-toast-host {
  position: fixed;
  bottom: var(--jr-toast-offset, calc(1rem + env(safe-area-inset-bottom, 0px)));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1090;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  width: min(24rem, calc(100vw - 2rem));
}

.jr-toast {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--jr-radius-md, 0.75rem);
  background: var(--jr-surface-elevated);
  border: 1px solid var(--jr-glass-border);
  box-shadow: var(--jr-shadow-md);
  color: var(--jr-text);
  font-size: var(--jr-text-sm, 0.875rem);
  text-align: center;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.jr-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.jr-toast--success {
  border-color: rgba(30, 142, 62, 0.35);
  background: color-mix(in srgb, var(--jr-success-soft) 40%, var(--jr-surface-elevated));
}

.jr-toast--error {
  border-color: rgba(197, 34, 31, 0.35);
  background: color-mix(in srgb, var(--jr-danger-soft) 40%, var(--jr-surface-elevated));
}

.jr-toast--warning {
  border-color: rgba(232, 113, 10, 0.35);
  background: color-mix(in srgb, var(--jr-warning-soft) 40%, var(--jr-surface-elevated));
}

.jr-install-banner {
  position: fixed;
  bottom: var(--jr-install-offset, calc(1rem + env(safe-area-inset-bottom, 0px)));
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 1085;
  width: min(28rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

body.jr-has-install-banner {
  --jr-toast-offset: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  --jr-fab-offset: calc(5.5rem + env(safe-area-inset-bottom, 0));
}

.jr-install-banner--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.jr-install-banner__actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

.jr-shortcuts-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
}

.jr-shortcuts-list dt {
  margin: 0;
}

.jr-shortcuts-list dd {
  margin: 0;
  color: var(--jr-text-secondary);
  font-size: var(--jr-text-sm);
}

.jr-shortcuts-list kbd {
  display: inline-block;
  min-width: 1.75rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.8em;
  font-family: inherit;
  text-align: center;
  border-radius: 0.35rem;
  border: 1px solid var(--jr-border);
  background: var(--jr-surface-inset);
  box-shadow: 0 1px 0 var(--jr-border-subtle);
}

.jr-offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: var(--jr-text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--jr-warning);
  background: var(--jr-warning-soft);
  border: 1px solid rgba(232, 113, 10, 0.22);
}

.jr-offline-inline__panel--online .jr-offline-badge {
  color: var(--jr-success);
  background: var(--jr-success-soft);
  border-color: rgba(30, 142, 62, 0.28);
}

.jr-offline-badge__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  animation: jr-offline-pulse 1.8s ease-in-out infinite;
}

.jr-offline-inline__panel--online .jr-offline-badge__dot {
  animation: none;
}

@keyframes jr-offline-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.jr-offline-hero {
  position: relative;
  text-align: center;
  margin-bottom: 1.5rem;
}

.jr-offline-hero__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background: var(--jr-hero-glow-color);
  filter: blur(40px);
  opacity: 0.7;
  z-index: -1;
  pointer-events: none;
}

.jr-offline-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  color: var(--jr-text-secondary);
  background: var(--jr-surface-inset);
  border: 1px solid var(--jr-border-subtle);
}

.jr-offline-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.375rem, 4vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--jr-text);
}

.jr-offline-hero__lead {
  margin: 0;
  font-size: var(--jr-text-sm);
  line-height: 1.55;
  color: var(--jr-text-secondary);
  max-width: 22rem;
  margin-inline: auto;
}

.jr-offline-tips {
  margin-bottom: 1.5rem;
  padding: 1rem 1.125rem;
  border-radius: var(--jr-radius-md);
  background: var(--jr-surface-inset);
  border: 1px solid var(--jr-border-subtle);
}

.jr-offline-tips__title {
  margin: 0 0 0.75rem;
  font-size: var(--jr-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jr-text-tertiary);
}

.jr-offline-tips__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.jr-offline-tips__item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: var(--jr-text-sm);
  line-height: 1.45;
  color: var(--jr-text-secondary);
  text-align: left;
}

.jr-offline-tips__marker {
  flex-shrink: 0;
  width: 0.375rem;
  height: 0.375rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--jr-blue);
}

.jr-offline-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

@media (min-width: 400px) {
  .jr-offline-actions {
    flex-direction: row;
  }

  .jr-offline-actions__primary,
  .jr-offline-actions__secondary {
    flex: 1;
  }
}

.jr-offline-actions__primary,
.jr-offline-actions__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  gap: 0.5rem;
}

.jr-offline-actions__spinner {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .jr-offline-badge__dot {
    animation: none !important;
  }

  .jr-offline-hero__glow {
    filter: none;
    opacity: 0.35;
  }
}

html.jr-offline .jr-navbar::after {
  content: 'Офлайн';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(50%);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--jr-warning-soft);
  color: var(--jr-warning);
  border: 1px solid rgba(232, 113, 10, 0.25);
}

.jr-offline-inline {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(3.5rem + env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px))
    calc(1rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--jr-bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(var(--jr-glass-saturate)) blur(12px);
  backdrop-filter: saturate(var(--jr-glass-saturate)) blur(12px);
  overflow-y: auto;
}

html.jr-offline-inline-active .jr-offline-inline {
  display: flex;
}

.jr-offline-inline__panel {
  width: 100%;
  max-width: 28rem;
  margin: auto;
  padding: 1.5rem 1.25rem;
}

@media (min-width: 576px) {
  .jr-offline-inline__panel {
    padding: 2rem 1.75rem;
  }
}

@media (prefers-contrast: more) {
  :root,
  [data-bs-theme='light'] {
    --jr-text-tertiary: #3c4043;
    --jr-glass-border: rgba(60, 64, 67, 0.22);
    --jr-border: rgba(60, 64, 67, 0.28);
  }

  [data-bs-theme='dark'] {
    --jr-text-tertiary: #bdc1c6;
    --jr-glass-border: rgba(255, 255, 255, 0.22);
    --jr-border: rgba(255, 255, 255, 0.28);
  }

  .glass-card,
  .jr-navbar {
    border-width: 1.5px;
  }
}

/* Settings page */
.jr-settings-page .jr-inline-code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: rgba(26, 115, 232, 0.1);
  color: inherit;
}

.jr-settings-panel {
  border-color: var(--jr-stats-table-border);
  overflow: hidden;
  position: relative;
}

.jr-settings-panel--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bs-body-bg) 72%, transparent);
  backdrop-filter: blur(1px);
}

.jr-settings-panel--loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 21;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  border: 0.2em solid var(--jr-border-subtle);
  border-top-color: var(--jr-accent);
  border-radius: 50%;
  animation: jr-settings-spin 0.7s linear infinite;
}

@keyframes jr-settings-spin {
  to { transform: rotate(360deg); }
}

.jr-settings-panel__head {
  padding: 1rem 1.25rem 0;
  border-bottom: 1px solid var(--jr-stats-table-border);
  background: linear-gradient(
    180deg,
    var(--jr-accent-soft) 0%,
    transparent 100%
  );
}

.jr-settings-panel__body {
  padding: 1.25rem;
}

.jr-settings-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.jr-settings-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.jr-settings-unsaved {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  background: rgba(251, 188, 5, 0.15);
  color: var(--bs-warning-text-emphasis, #997404);
  border: 1px solid rgba(251, 188, 5, 0.35);
}

.jr-settings-unsaved .bi-circle-fill {
  font-size: 0.45rem;
  vertical-align: middle;
}

[data-bs-theme='dark'] .jr-settings-unsaved {
  color: #fbbc05;
}

.jr-settings-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.85rem;
}

.jr-settings-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.08);
  border: 1px solid var(--jr-stats-table-border);
}

.jr-settings-meta-chip code {
  font-size: 0.85em;
  color: inherit;
}

.jr-settings-format {
  width: auto;
  min-width: 6.5rem;
}

.jr-settings-raw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: rgba(128, 128, 128, 0.06);
  border: 1px solid var(--jr-stats-table-border);
}

.jr-settings-raw-toolbar .btn-jr-ghost {
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
}

.jr-config-editor {
  min-height: 28rem;
  max-height: min(72vh, 52rem);
  resize: vertical;
  font-size: 0.8125rem;
  line-height: 1.5;
  tab-size: 2;
  background: var(--jr-gm-surface-light-elevated, rgba(255, 255, 255, 0.6));
  border-color: var(--jr-stats-table-border);
  color: var(--bs-body-color);
  border-radius: 0.5rem;
}

[data-bs-theme='dark'] .jr-config-editor {
  background: rgba(19, 23, 32, 0.72);
}

.jr-config-editor:focus {
  border-color: var(--jr-accent);
  box-shadow: 0 0 0 0.2rem var(--jr-accent-ring);
}

.jr-brand-icon--settings {
  background: linear-gradient(135deg, #34a853 0%, #1a73e8 100%);
}

.jr-settings-mode-tabs {
  border-bottom: 0;
  gap: 0.35rem;
}

.jr-settings-mode-tabs .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  color: var(--bs-secondary-color);
  transition: background 0.15s ease, color 0.15s ease;
}

.jr-settings-mode-tabs .nav-link:hover {
  color: var(--bs-body-color);
  background: rgba(128, 128, 128, 0.1);
}

.jr-settings-mode-tabs .nav-link.active {
  background: var(--jr-accent);
  color: #fff;
}

.jr-settings-form-root {
  display: grid;
  gap: 1rem;
}

.jr-settings-nav-wrap {
  position: relative;
  margin: -0.25rem -0.25rem 0;
  padding: 0.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 1rem,
    #000 calc(100% - 1rem),
    transparent
  );
}

.jr-settings-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  padding-bottom: 0.15rem;
  border-bottom: 0;
}

.jr-settings-nav .nav-link {
  flex: 0 0 auto;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--bs-secondary-color);
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.jr-settings-nav .nav-link:hover {
  color: var(--bs-body-color);
  background: rgba(128, 128, 128, 0.1);
  border-color: var(--jr-stats-table-border);
}

.jr-settings-nav .nav-link.active {
  color: var(--jr-accent);
  background: var(--jr-accent-soft);
  border-color: color-mix(in srgb, var(--jr-accent) 35%, transparent);
}

.jr-settings-tab-content {
  padding-top: 0.25rem;
}

.jr-settings-section-desc {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.85rem;
  padding-left: 0.15rem;
}

.jr-settings-fields-card {
  padding: 1rem 1.1rem 0.25rem;
  border-radius: 0.65rem;
  border: 1px solid var(--jr-stats-table-border);
  background: rgba(128, 128, 128, 0.04);
}

[data-bs-theme='dark'] .jr-settings-fields-card {
  background: rgba(255, 255, 255, 0.02);
}

.jr-settings-field .form-label {
  margin-bottom: 0.35rem;
}

.jr-settings-field .form-control,
.jr-settings-field .form-select {
  font-size: 0.875rem;
}

.jr-settings-field--secret .form-control {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.02em;
}

.jr-settings-field--bool {
  min-height: 4.5rem;
}

.jr-settings-switch .form-check-input {
  width: 2.5em;
  height: 1.25em;
}

.jr-settings-switch .form-check-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.jr-settings-checkbox-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.jr-settings-checkbox-grid .jr-settings-checkbox-tile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  margin: 0;
  border-radius: 0.45rem;
  border: 1px solid var(--jr-stats-table-border);
  background: rgba(128, 128, 128, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
  min-height: 100%;
  user-select: none;
}

.jr-settings-checkbox-grid .form-check-input {
  float: none;
  margin: 0;
  flex-shrink: 0;
}

.jr-settings-field--sync-trackers .jr-settings-checkbox-grid .jr-settings-checkbox-tile:has(.form-check-input:checked) {
  border-color: color-mix(in srgb, var(--jr-blue) 45%, transparent);
  background: var(--jr-blue-soft);
}

.jr-settings-field--sync-trackers .jr-settings-checkbox-grid .form-check-input:checked {
  background-color: var(--jr-blue);
  border-color: var(--jr-blue);
}

.jr-settings-field--disable-trackers .jr-settings-checkbox-grid .jr-settings-checkbox-tile:has(.form-check-input:checked) {
  border-color: color-mix(in srgb, var(--jr-warning) 45%, transparent);
  background: var(--jr-warning-soft);
}

.jr-settings-field--disable-trackers .jr-settings-checkbox-grid .form-check-input:checked {
  background-color: var(--jr-warning);
  border-color: var(--jr-warning);
}

.jr-settings-checkbox-grid .form-check-label {
  font-size: 0.8125rem;
  cursor: pointer;
  line-height: 1.25;
  margin: 0;
}

.jr-settings-trackers-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.jr-settings-tracker-search {
  flex: 1 1 14rem;
  max-width: 22rem;
}

.jr-settings-tracker-search .jr-search-input {
  min-height: 2.25rem;
  padding-left: 2.25rem;
  font-size: 0.875rem;
  border: 1px solid var(--jr-stats-table-border);
  border-radius: 0.45rem;
  background: rgba(128, 128, 128, 0.04);
}

.jr-settings-tracker-search .jr-search-icon {
  left: 0.75rem;
  font-size: 0.875rem;
}

.jr-settings-tracker-search:focus-within .jr-search-icon {
  color: var(--jr-accent);
}

.jr-settings-trackers {
  --bs-accordion-border-color: var(--jr-stats-table-border);
  --bs-accordion-btn-padding-x: 1rem;
  --bs-accordion-btn-padding-y: 0.75rem;
  --bs-accordion-body-padding-x: 1rem;
  --bs-accordion-body-padding-y: 0.85rem;
}

.jr-settings-trackers .accordion-item {
  border-radius: 0.5rem !important;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--jr-stats-table-border);
  background: rgba(128, 128, 128, 0.03);
}

.jr-settings-trackers .accordion-item:last-child {
  margin-bottom: 0;
}

.jr-settings-tracker-item--hidden {
  display: none;
}

.jr-settings-trackers .accordion-button {
  font-size: 0.9rem;
  font-weight: 500;
  gap: 0.5rem;
  box-shadow: none !important;
}

.jr-settings-trackers .accordion-button:not(.collapsed) {
  background: var(--jr-accent-soft);
  color: inherit;
}

.jr-settings-tracker-title {
  flex-shrink: 0;
}

.jr-settings-tracker-host {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--bs-secondary-color);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.12);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jr-settings-tracker-badge {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--bs-success);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(52, 168, 83, 0.12);
  margin-left: auto;
  flex-shrink: 0;
}

.jr-settings-tracker-host-readonly {
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed var(--jr-stats-table-border);
  margin-bottom: 0.25rem;
}

.jr-settings-readonly-value {
  padding: 0.35rem 0.55rem;
  border-radius: 0.35rem;
  background: rgba(128, 128, 128, 0.08);
  word-break: break-all;
}

.jr-settings-validation {
  padding: 0 1.25rem 1rem;
}

.jr-settings-validation:empty {
  padding: 0;
}

.jr-settings-loading {
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jr-settings-denied {
  border-color: rgba(234, 67, 53, 0.35);
}

.jr-settings-denied__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  font-size: 1.25rem;
  color: var(--bs-danger);
  background: rgba(234, 67, 53, 0.12);
  flex-shrink: 0;
}

.jr-navbar .btn-jr-nav.jr-nav-needs-key {
  color: var(--bs-danger);
  box-shadow: 0 0 0 1px rgba(234, 67, 53, 0.45);
  animation: jr-nav-needs-key-pulse 2s ease-in-out infinite;
}

@keyframes jr-nav-needs-key-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(234, 67, 53, 0.45); }
  50% { box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.25); }
}

.jr-settings-diff-modal .modal-body {
  padding-top: 0.5rem;
}

.jr-settings-diff-summary {
  color: var(--bs-secondary-color);
}

.jr-settings-diff-wrap {
  border: 1px solid var(--jr-stats-table-border);
  border-radius: 0.5rem;
  max-height: min(50vh, 24rem);
}

.jr-diff-table {
  margin-bottom: 0;
}

.jr-diff-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bs-body-bg);
  border-bottom-width: 1px;
}

.jr-diff-table code {
  font-size: 0.75rem;
  word-break: break-all;
}

.jr-diff-table td {
  vertical-align: top;
  max-width: 14rem;
  word-break: break-word;
  font-size: 0.8125rem;
}

.jr-diff-row--added td:last-child {
  color: var(--bs-success);
}

.jr-diff-row--removed td:nth-child(2) {
  color: var(--bs-danger);
}

.jr-diff-row--changed td:last-child {
  color: var(--bs-primary);
}

@media (max-width: 575.98px) {
  .jr-settings-panel__head,
  .jr-settings-panel__body {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .jr-settings-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .jr-settings-toolbar__actions {
    justify-content: flex-end;
  }

  .jr-settings-nav-wrap {
    mask-image: none;
  }
}
