/* RideWattly Battery Pack Builder — premium UI, mobile-first, no frameworks */

:root {
  color-scheme: light;
  --rwb-font: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --rwb-mono: "JetBrains Mono", ui-monospace, monospace;
  --rwb-radius: 18px;
  --rwb-radius-sm: 12px;
  --rwb-blur: 18px;

  --rwb-bg0: #f4f6fb;
  --rwb-bg1: #eef2ff;
  --rwb-text: #0b1220;
  --rwb-muted: #5b6477;
  --rwb-line: rgba(15, 23, 42, 0.08);
  --rwb-card: rgba(255, 255, 255, 0.72);
  --rwb-card-strong: rgba(255, 255, 255, 0.9);
  --rwb-shadow: 0 18px 50px rgba(2, 6, 23, 0.12);
  --rwb-shadow-soft: 0 10px 30px rgba(2, 6, 23, 0.08);
  --rwb-glow: 0 0 0 1px rgba(99, 102, 241, 0.12);

  --rwb-a: #6366f1;
  --rwb-b: #22c55e;
  --rwb-c: #06b6d4;
  --rwb-warn: #f59e0b;
  --rwb-danger: #ef4444;

  --rwb-gradient: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(34, 197, 94, 0.85));
  --rwb-hero: radial-gradient(900px 420px at 10% 0%, rgba(99, 102, 241, 0.35), transparent 60%),
    radial-gradient(700px 380px at 90% 10%, rgba(6, 182, 212, 0.28), transparent 55%),
    linear-gradient(180deg, var(--rwb-bg1), var(--rwb-bg0));

  --rwb-focus: 0 0 0 3px rgba(99, 102, 241, 0.35);
  --rwb-sticky-h: 64px;
}

body.dark {
  color-scheme: dark;
  --rwb-bg0: #070b14;
  --rwb-bg1: #0b1220;
  --rwb-text: #e8edf7;
  --rwb-muted: #9aa4b2;
  --rwb-line: rgba(255, 255, 255, 0.08);
  --rwb-card: rgba(15, 23, 42, 0.55);
  --rwb-card-strong: rgba(15, 23, 42, 0.72);
  --rwb-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  --rwb-shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.35);
  --rwb-glow: 0 0 0 1px rgba(99, 102, 241, 0.22);
  --rwb-hero: radial-gradient(900px 420px at 10% 0%, rgba(99, 102, 241, 0.35), transparent 60%),
    radial-gradient(700px 380px at 90% 10%, rgba(34, 197, 94, 0.18), transparent 55%),
    linear-gradient(180deg, #0b1220, #070b14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--rwb-font);
  color: var(--rwb-text);
  background: var(--rwb-hero);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 14px;
  background: #fff;
  color: #000;
  border-radius: 10px;
  z-index: 10000;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  outline: none;
  box-shadow: var(--rwb-focus);
}

.glass {
  background: var(--rwb-card);
  border: 1px solid var(--rwb-line);
  box-shadow: var(--rwb-shadow-soft), var(--rwb-glow);
  backdrop-filter: blur(var(--rwb-blur));
  -webkit-backdrop-filter: blur(var(--rwb-blur));
}

.rwb-app {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}
@media (max-width: 1023px) {
  .rwb-app {
    padding-bottom: 120px;
  }
}

.rwb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--rwb-radius);
  margin-bottom: 16px;
}

.rwb-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.rwb-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--rwb-gradient);
  color: #fff;
  font-size: 22px;
  box-shadow: var(--rwb-shadow-soft);
}

.rwb-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rwb-muted);
  font-weight: 700;
}

.rwb-title {
  margin: 2px 0 0;
  font-size: clamp(20px, 3.4vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.rwb-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rwb-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.rwb-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--rwb-shadow-soft);
}
.rwb-icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--rwb-focus);
}

.rwb-theme {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
}

.rwb-theme__label {
  font-size: 13px;
  color: var(--rwb-muted);
  font-weight: 600;
}

.rwb-switch {
  position: relative;
  width: 52px;
  height: 30px;
  display: inline-block;
}
.rwb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.rwb-switch__ui {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid var(--rwb-line);
  transition: background 0.2s ease, transform 0.15s ease;
}
.rwb-switch__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.18);
  transition: transform 0.2s ease;
}
body.dark .rwb-switch__ui {
  background: rgba(34, 197, 94, 0.18);
}
.rwb-switch input:checked + .rwb-switch__ui::after {
  transform: translateX(22px);
}

.rwb-hero {
  padding: 16px 18px;
  border-radius: var(--rwb-radius);
  margin-bottom: 16px;
}

.rwb-lead {
  margin: 0 0 12px;
  color: var(--rwb-muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 78ch;
}

.rwb-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.rwb-chip-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rwb-muted);
}

.rwb-chip {
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
  color: inherit;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.rwb-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--rwb-shadow-soft);
  border-color: rgba(99, 102, 241, 0.35);
}
.rwb-chip:focus-visible {
  outline: none;
  box-shadow: var(--rwb-focus);
}

.rwb-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 1024px) {
  .rwb-layout {
    grid-template-columns: minmax(280px, 340px) minmax(360px, 1fr) minmax(280px, 360px);
    align-items: start;
  }
}

.rwb-panel {
  padding: 16px;
  border-radius: var(--rwb-radius);
}

.rwb-panel__title {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.rwb-subtitle {
  margin: 14px 0 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rwb-muted);
  font-weight: 800;
}
.rwb-subtitle--inline {
  margin: 0;
}

.rwb-field {
  margin-bottom: 12px;
}
.rwb-field label {
  display: block;
  font-size: 12px;
  color: var(--rwb-muted);
  margin-bottom: 6px;
  font-weight: 700;
}

.rwb-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
  color: inherit;
  font-size: 15px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.05s ease;
}
.rwb-input:focus-visible {
  box-shadow: var(--rwb-focus);
  border-color: rgba(99, 102, 241, 0.45);
}
.rwb-input--hidden {
  display: none;
  margin-top: 8px;
}
.rwb-input--hidden.is-on {
  display: block;
}

.rwb-range-val {
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  font-family: var(--rwb-mono);
  font-size: 13px;
  color: var(--rwb-muted);
}

.rwb-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--rwb-muted);
}

.rwb-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rwb-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 520px) {
  .rwb-grid3 {
    grid-template-columns: 1fr;
  }
  .rwb-grid2 {
    grid-template-columns: 1fr;
  }
}

.rwb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.rwb-actions--tight {
  margin-top: 0;
}

.rwb-btn {
  appearance: none;
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
  color: inherit;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.rwb-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--rwb-shadow-soft);
}
.rwb-btn:focus-visible {
  outline: none;
  box-shadow: var(--rwb-focus);
}
.rwb-btn--primary {
  border: 0;
  color: #fff;
  background: var(--rwb-gradient);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.25);
}
.rwb-btn--ghost {
  background: transparent;
}
.rwb-btn--small {
  padding: 10px 12px;
  border-radius: 12px;
}

.rwb-divider {
  height: 1px;
  background: var(--rwb-line);
  margin: 14px 0;
}

.rwb-center {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rwb-viz-card {
  overflow: hidden;
}

.rwb-viz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rwb-badge {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--rwb-line);
  color: var(--rwb-muted);
}

.rwb-svg-wrap {
  border-radius: var(--rwb-radius-sm);
  border: 1px solid var(--rwb-line);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.06), transparent);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.rwb-svg-host {
  min-height: 220px;
  padding: 10px;
}

.rwb-svg-host svg {
  width: 100%;
  height: auto;
  max-height: min(52vh, 520px);
  display: block;
}

.rwb-viz-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--rwb-muted);
  line-height: 1.45;
}

.rwb-assistant .rwb-table-wrap {
  margin-top: 12px;
}

.rwb-table-wrap {
  overflow-x: auto !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--rwb-radius-sm);
  border: 1px solid var(--rwb-line);
}

.rwb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rwb-table th,
.rwb-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--rwb-line);
  text-align: left;
  vertical-align: middle;
}
.rwb-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rwb-muted);
  background: rgba(99, 102, 241, 0.06);
  position: sticky;
  top: 0;
  z-index: 1;
}
.rwb-table tr:last-child td {
  border-bottom: 0;
}
.rwb-table--compact td {
  font-variant-numeric: tabular-nums;
  font-family: var(--rwb-mono);
  font-size: 12px;
}

.rwb-mini-btn {
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
  color: inherit;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
  font-size: 12px;
}
.rwb-mini-btn:hover {
  filter: brightness(1.03);
}

.rwb-est-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rwb-results-panel {
  position: sticky;
  top: 12px;
}

.rwb-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 1023px) {
  .rwb-results-panel {
    position: relative;
    top: auto;
  }
}

.rwb-stat {
  padding: 12px;
  border-radius: var(--rwb-radius-sm);
  border: 1px solid var(--rwb-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12));
}
body.dark .rwb-stat {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.12));
}

.rwb-stat--mini {
  padding: 10px;
}
.rwb-stat--compact {
  padding: 10px;
}

.rwb-stat__k {
  display: block;
  font-size: 11px;
  color: var(--rwb-muted);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.rwb-num {
  display: block;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-family: var(--rwb-mono);
}

.rwb-range-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  .rwb-range-cards {
    grid-template-columns: 1fr;
  }
}

.rwb-stress {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--rwb-radius-sm);
  border: 1px solid var(--rwb-line);
  background: rgba(6, 182, 212, 0.06);
}
.rwb-stress__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rwb-pill {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
}
.rwb-stress__bar {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--rwb-line);
  background: rgba(2, 6, 23, 0.06);
}
body.dark .rwb-stress__bar {
  background: rgba(255, 255, 255, 0.06);
}
.rwb-stress__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.95), rgba(245, 158, 11, 0.95), rgba(239, 68, 68, 0.95));
  transition: width 0.35s ease;
  filter: saturate(1.1);
}

.rwb-stress.is-safe .rwb-pill {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
}
.rwb-stress.is-mid .rwb-pill {
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
}
body.dark .rwb-stress.is-mid .rwb-pill {
  color: #fdba74;
}
.rwb-stress.is-hot .rwb-pill {
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
}
body.dark .rwb-stress.is-hot .rwb-pill {
  color: #fecaca;
}

.rwb-legacy-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.rwb-export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 420px) {
  .rwb-export-grid {
    grid-template-columns: 1fr;
  }
}

.rwb-embed {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--rwb-radius);
}
.rwb-embed-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}
@media (max-width: 640px) {
  .rwb-embed-row {
    grid-template-columns: 1fr;
  }
}

.rwb-textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
  color: inherit;
  font-family: var(--rwb-mono);
  font-size: 12px;
}

.rwb-similar {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--rwb-radius);
}
.rwb-similar-list {
  margin: 0;
  padding-left: 18px;
  color: var(--rwb-muted);
}

.rwb-seo {
  max-width: 900px;
  margin: 28px auto 0;
  padding: 0 8px 24px;
  color: var(--rwb-muted);
}
.rwb-seo h2,
.rwb-seo h3 {
  color: var(--rwb-text);
}
.rwb-seo h2 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
}
.rwb-faq details {
  border: 1px solid var(--rwb-line);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--rwb-card-strong);
  margin: 10px 0;
}
.rwb-faq summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--rwb-text);
}
.rwb-faq p {
  margin: 10px 0 0;
  line-height: 1.55;
}

.rwb-footer {
  margin-top: 18px;
  padding: 0 8px 10px;
  color: var(--rwb-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* Modal */
.rwb-modal[hidden] {
  display: none;
}
.rwb-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: end center;
  padding: 14px;
}
@media (min-width: 720px) {
  .rwb-modal {
    place-items: center;
  }
}
.rwb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(6px);
}
.rwb-modal__dialog {
  position: relative;
  width: min(560px, 100%);
  border-radius: var(--rwb-radius);
  padding: 16px;
  animation: rwb-pop 0.22s ease-out;
}
.rwb-modal__dialog--wide {
  width: min(980px, 100%);
}
@keyframes rwb-pop {
  from {
    transform: translateY(10px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.rwb-modal__x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.rwb-modal__title {
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.rwb-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.rwb-build-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(58vh, 560px);
  overflow: auto;
}
.rwb-build-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
}
.rwb-build-item__meta {
  min-width: 0;
}
.rwb-build-item__name {
  font-weight: 900;
  letter-spacing: -0.01em;
}
.rwb-build-item__date {
  margin-top: 4px;
  font-size: 12px;
  color: var(--rwb-muted);
}
.rwb-build-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Compare */
.rwb-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
@media (max-width: 820px) {
  .rwb-compare--desktop {
    display: none;
  }
}
.rwb-compare-swipe {
  display: none;
  margin-top: 10px;
}
@media (max-width: 820px) {
  .rwb-compare-swipe {
    display: block;
  }
}
.rwb-swipe-track {
  display: flex;
  width: 100%;
  overflow: hidden;
  border-radius: var(--rwb-radius-sm);
  border: 1px solid var(--rwb-line);
  touch-action: pan-y;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform;
}
.rwb-swipe-panel {
  flex: 0 0 100%;
  padding: 10px;
  background: var(--rwb-card-strong);
}
.rwb-swipe-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.rwb-swipe-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid var(--rwb-line);
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.rwb-swipe-dot.is-active {
  background: rgba(99, 102, 241, 0.85);
  border-color: rgba(99, 102, 241, 0.35);
}

.win-a,
.win-b {
  outline: 2px solid rgba(34, 197, 94, 0.35);
  outline-offset: 2px;
  border-radius: 10px;
}
.win-b {
  outline-color: rgba(99, 102, 241, 0.45);
}
.tie {
  opacity: 0.85;
}

/* Sticky mobile summary */
.rwb-sticky-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 8000;
  border-radius: 16px;
  padding: 10px 10px;
  display: none;
}
@media (max-width: 1023px) {
  .rwb-sticky-bar {
    display: block;
  }
}
.rwb-sticky-bar__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  font-variant-numeric: tabular-nums;
  font-family: var(--rwb-mono);
  font-size: 13px;
}
.rwb-sticky-bar__k {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rwb-muted);
  font-weight: 900;
}

/* Toasts */
.rwb-toast-host {
  position: fixed;
  right: 12px;
  bottom: calc(var(--rwb-sticky-h) + 12px);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
@media (min-width: 1024px) {
  .rwb-toast-host {
    bottom: 16px;
  }
}
.rwb-toast {
  pointer-events: none;
  min-width: 220px;
  max-width: min(92vw, 420px);
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--rwb-line);
  background: var(--rwb-card-strong);
  box-shadow: var(--rwb-shadow);
  color: inherit;
  font-weight: 700;
  font-size: 13px;
  animation: rwb-toast-in 0.22s ease-out;
}
@keyframes rwb-toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Tooltips (native title still works; we add data-tip styling via attribute selector not possible for dynamic - use title) */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}















#tool-container:fullscreen {
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  
}





body.dark .rwb-table,
body.dark .rwb-table th,
body.dark .rwb-table td {
  color: #e5e7eb !important;
  border: none;
}



body.dark .rwb-table {
  background: #020617 !important;
}

body.dark .rwb-table thead th {
  background: #0f172a !important;
  color: #f9fafb !important;
}

body.dark .rwb-table tbody td {
  background: transparent !important;
}


body.dark .rwb-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03) !important;
}

body.dark .rwb-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.12) !important;
}

body.dark .rwb-table button {
  background: #1e293b !important;
  color: #e5e7eb !important;
  border: 1px solid #334155 !important;
}



.rwb-table {
  width: max-content;
  min-width: 100%;
}