/* ═══════════════════════════════════════════════════════════════════════
   Web Tools Suite — Global Design Tokens & Universal Styles
   ═══════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  --bg:           #f1f5f9;        /* clean slate light background */
  --panel:        #ffffff;
  --panel-card:   #ffffff;
  --line:         #e2e8f0;
  --line-strong:  #cbd5e1;
  --text:         #0f172a;
  --muted:        #64748b;
  --accent:       #2563eb;        /* royal blue */
  --accent-dark:  #1d4ed8;
  --accent-soft:  #eff6ff;
  --accent-border:#bfdbfe;
  --tg-left:      #2563eb;        /* Telegram left border */
  --tg-site:      #2563eb;        /* site_name color */
  --tg-url:       #2563eb;        /* URL link color (blue) */
  --tg-preview-bg:rgba(0, 0, 0, 0.035); /* slightly tinted preview block */
  --btn-bg:          var(--tg-preview-bg); /* dim preview section color */
  --btn-bg-hover:    var(--line);
  --btn-text:        var(--text);          /* corresponding text color */
  --chip-bg:         var(--tg-preview-bg);
  --chip-bg-hover:   var(--line);
  --chip-text:       var(--text);          /* corresponding text color */
  --chip-badge-bg:   rgba(0, 0, 0, 0.07);
  --lb-backdrop:     rgba(15, 23, 42, 0.65);
  --danger:       #ef4444;
  --hl:           #fef08a;
  --shadow-sm:    0 1px 3px rgba(15,23,42,.07);
  --shadow-md:    0 4px 14px rgba(15,23,42,.12);
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 12px;
}
:root[data-theme="dark"] {
  --bg:           #0b0f19;        /* deep midnight slate theme */
  --panel:        #111827;        /* slate panel */
  --panel-card:   #0f1626;        /* slightly darker outside card */
  --line:         #1f293d;        /* slate border */
  --line-strong:  #2d3b55;
  --text:         #f1f5f9;
  --muted:        #8b9bb4;
  --accent:       #3b82f6;        /* vibrant blue */
  --accent-dark:  #2563eb;
  --accent-soft:  rgba(59, 130, 246, 0.16);
  --accent-border:rgba(59, 130, 246, 0.4);
  --tg-left:      #60a5fa;        /* Telegram preview left border */
  --tg-site:      #60a5fa;        /* site_name color */
  --tg-url:       #60a5fa;        /* link color (blue) */
  --tg-preview-bg:rgba(255, 255, 255, 0.055); /* slightly lighter inside preview */
  --btn-bg:          var(--tg-preview-bg); /* dim preview section color */
  --btn-bg-hover:    rgba(255, 255, 255, 0.1);
  --btn-text:        var(--text);          /* corresponding text color */
  --chip-bg:         var(--tg-preview-bg);
  --chip-bg-hover:   rgba(255, 255, 255, 0.1);
  --chip-text:       var(--text);          /* corresponding text color */
  --chip-badge-bg:   rgba(255, 255, 255, 0.12);
  --lb-backdrop:     rgba(0, 0, 0, 0.88);
  --danger:       #ef4444;
  --hl:           #1e3a5f;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.35);
  --shadow-md:    0 6px 18px rgba(0,0,0,.5);
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { height:100%; }
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 'Inter', system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Scrollbars */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--line-strong); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--muted); }
* { scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }

/* ── App Layout & Modern Navigation ────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
  min-height: 48px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  flex-shrink: 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  letter-spacing: -.01em;
  transition: color .15s;
}
.nav-brand:hover { color: var(--accent); }
.nav-crumb-trail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.nav-crumb-sep {
  color: var(--muted);
  width: 14px;
  height: 14px;
  user-select: none;
  opacity: .7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-crumb-sep svg {
  width: 14px;
  height: 14px;
}
.nav-crumb-current {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Universal Button System (Borderless, slightly dim tone) ──── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .14s ease;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  box-sizing: border-box;
}
.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--text);
}
.btn:active {
  transform: scale(.98);
}
.btn-primary {
  background: var(--tg-url);
  color: #fff !important;
  border: 0;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff !important;
}
.btn-ghost {
  background: var(--btn-bg);
  border: 0;
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--btn-bg-hover);
  color: var(--text);
}
.btn-sm {
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: var(--r-sm);
}
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-bg);
  border: 0;
  color: var(--text);
}
.btn-icon:hover {
  background: var(--btn-bg-hover);
  color: var(--text);
}

/* ── Universal Lucide & SVG Icon Precision Sizing ─────────────── */
.lucide,
svg.lucide,
i[data-lucide] {
  width: 14px;
  height: 14px;
  stroke-width: 2px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Standard Buttons: compact 13px icons */
.btn svg,
.btn svg.lucide,
.btn .lucide {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Small Buttons: 12px icons */
.btn-sm svg,
.btn-sm svg.lucide,
.btn-sm .lucide {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Icon Buttons & Theme Toggle: 15px */
.btn-icon svg,
.btn-icon svg.lucide,
.btn-icon .lucide,
#themeIcon {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Search Box icon */
.search-box svg,
.search-box svg.lucide,
.search-box .search-icon {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Nav Crumb separator */
.nav-crumb-sep svg,
.nav-crumb-sep svg.lucide,
.nav-crumb-sep.lucide {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Form Inputs & Clear Button */
.input-wrap .input-icon,
.input-wrap svg.input-icon,
.input-wrap .input-icon.lucide {
  width: 14px !important;
  height: 14px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}
.input-clear-btn svg,
.input-clear-btn svg.lucide,
.input-clear-btn .lucide {
  width: 11px !important;
  height: 11px !important;
  stroke-width: 2.5px;
  flex-shrink: 0;
}

/* Custom Checkbox mark */
.checkbox-box svg,
.checkbox-box svg.lucide,
.checkbox-box .lucide {
  width: 10px !important;
  height: 10px !important;
  stroke-width: 3px;
  flex-shrink: 0;
}

/* 3-dots Menu Button & Dropdown Items */
.tg-dots-btn svg,
.tg-dots-btn svg.lucide,
.tg-dots-btn .lucide {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}
.tg-menu-item svg,
.tg-menu-item svg.lucide,
.tg-menu-item .lucide {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Lightbox & Scroll to Top */
#lb-bar .btn svg,
#lb-bar .btn svg.lucide {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0;
}
#scrollTopBtn svg,
#scrollTopBtn svg.lucide {
  width: 14px !important;
  height: 14px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Card Action ("Open Tool ->") */
.tc-action svg,
.tc-action svg.lucide {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2.5px;
  flex-shrink: 0;
}

/* Hop next row "Redirects to:" */
.hop-next-tag svg,
.hop-next-tag svg.lucide {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Hop connector text */
.hop-connector-text svg,
.hop-connector-text svg.lucide {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Accordion Toggle Chevron */
.toggle-arrow svg,
.toggle-arrow svg.lucide {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Hero card close button */
.hero-close-btn svg,
.hero-close-btn svg.lucide {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* ── View Container ────────────────────────────────────────────── */
.view-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ── Universal Tool Workspace & Panel Layout ────────────────────── */
#tool-view {
  padding: 0;
  margin: 0;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tool-pane {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tool-workspace {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 44px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
  gap: 8px;
}
.panel-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.panel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Universal Segmented Pill Controls ──────────────────────────── */
.seg-group {
  display: inline-flex;
  align-items: center;
  background: var(--btn-bg);
  border: 0;
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 2px;
  user-select: none;
  box-sizing: border-box;
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: calc(var(--r-sm) - 1px);
  background: transparent;
  color: var(--btn-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .14s ease;
  user-select: none;
  box-sizing: border-box;
  outline: none;
}
.seg-btn:hover:not(.active):not(.on) {
  background: var(--btn-bg-hover);
  color: var(--text);
}
.seg-btn:active {
  transform: scale(.98);
}
.seg-btn.active,
.seg-btn.on {
  background: var(--tg-url);
  color: #fff !important;
  font-weight: 600;
  border: 0;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
  cursor: default;
}
.seg-btn.active:hover,
.seg-btn.on:hover {
  background: var(--accent-dark);
  color: #fff !important;
}


/* ── Universal Lightbox (Theme Compliant) ───────────────────────── */
#lb {
  position: fixed;
  inset: 0;
  background: var(--lb-backdrop);
  backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  z-index: 9999;
}
#lb.open { display:flex; }
#lb-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  flex-shrink: 0;
  z-index: 10;
}
#lb-bar .sp { flex:1; }
#lb-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--tg-url);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s;
}
#lb-title:hover {
  text-decoration: underline;
  opacity: .85;
}
#lb-body {
  flex: 1;
  overflow: auto;
  display: flex;
  padding: 24px;
  min-height: 0;
  box-sizing: border-box;
}
#lb-body:not(.natural) {
  align-items: center;
  justify-content: center;
}
#lb-body.natural {
  align-items: flex-start;
  justify-content: flex-start;
}
#lb-body img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
}
#lb-body.natural img {
  max-width: none;
  max-height: none;
  margin: auto;
  flex-shrink: 0;
}

/* ── Universal Scroll-to-top Button ─────────────────────────────── */
#scrollTopBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--panel);
  border: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s, background .15s, color .15s;
}
#scrollTopBtn:hover {
  background: var(--accent);
  color: #fff;
}
#scrollTopBtn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Universal Form Controls (Borderless, Theme Consistent) ────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.flex-1 {
  flex: 1;
  min-height: 180px;
}
.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}
.form-label .req {
  color: var(--danger);
  font-weight: 700;
  margin-left: 2px;
}
.form-label .opt {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
  margin-left: 4px;
}
.form-label-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-icon {
  position: absolute;
  left: 10px;
  color: var(--muted);
  pointer-events: none;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  background: var(--btn-bg);
  border: 0 !important;
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: box-shadow .14s ease, background .14s ease;
  box-sizing: border-box;
}
.form-input:focus {
  background: var(--btn-bg);
  box-shadow: 0 0 0 2px var(--tg-url);
}
.form-input::placeholder {
  color: var(--muted);
  opacity: .7;
}
.input-clear-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.input-clear-btn:hover {
  color: var(--text);
}
.input-prefix-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--btn-bg);
  border: 0 !important;
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: box-shadow .14s ease;
  box-sizing: border-box;
}
.input-prefix-wrap:focus-within {
  box-shadow: 0 0 0 2px var(--tg-url);
}
.input-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 34px;
  background: var(--btn-bg-hover);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  border: 0;
  user-select: none;
}
.form-input.has-prefix {
  border: 0 !important;
  background: transparent;
  padding: 0 10px;
  height: 34px;
  border-radius: 0;
}
.form-input.has-prefix:focus {
  box-shadow: none;
}
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--btn-bg);
  border: 0 !important;
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: box-shadow .14s ease;
  box-sizing: border-box;
}
.form-textarea:focus {
  box-shadow: 0 0 0 2px var(--tg-url);
}
.form-textarea::placeholder {
  color: var(--muted);
  opacity: .7;
}

/* ── Universal Theme Checkbox (Zero Borders, Telegram Theme) ──── */
.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  position: relative;
}
.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.checkbox-box {
  width: 16px;
  height: 16px;
  background: var(--btn-bg);
  border: 0 !important;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--tr-fast), transform var(--tr-fast);
  color: #ffffff;
}
.custom-checkbox:hover .checkbox-box {
  background: var(--btn-hover);
}
.custom-checkbox input[type="checkbox"]:checked + .checkbox-box {
  background: var(--tg-url);
}
.custom-checkbox input[type="checkbox"]:focus-visible + .checkbox-box {
  box-shadow: 0 0 0 2px var(--tg-accent-soft);
}
.checkbox-box svg,
.checkbox-box i {
  display: none;
  width: 11px;
  height: 11px;
  stroke: #ffffff;
  stroke-width: 3px;
}
.custom-checkbox input[type="checkbox"]:checked + .checkbox-box svg,
.custom-checkbox input[type="checkbox"]:checked + .checkbox-box i {
  display: block;
}

/* ── Universal 3-Dot Menu & Dropdown Popup (Telegram Theme) ───────── */
.tg-dots-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 0 !important;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .13s ease, color .13s ease;
  user-select: none;
  outline: none;
}
.tg-dots-btn:hover {
  background: var(--btn-bg-hover);
  color: var(--text);
}
.tg-dots-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.tg-dots-btn * {
  pointer-events: none;
}
.sh-dots-wrap .tg-menu,
.history-card-actions .tg-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 999;
  background: var(--panel);
  border: 0 !important;
  border-radius: var(--r);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  min-width: 175px;
  padding: 5px 0;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.sh-dots-wrap .tg-menu.open,
.history-card-actions .tg-menu.open {
  display: flex !important;
}
.history-card-actions .tg-menu.open-up {
  top: auto !important;
  bottom: calc(100% + 4px) !important;
}
.tg-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin: 1px 4px;
  border-radius: 6px;
  width: calc(100% - 8px);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 0 !important;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
  white-space: nowrap;
  box-sizing: border-box;
  outline: none;
}
.tg-menu-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.tg-menu-item.danger {
  color: var(--danger);
}
.tg-menu-item.danger:hover {
  background: #fff1f1;
  color: var(--danger);
}
:root[data-theme="dark"] .tg-menu-item.danger:hover {
  background: #3a1a1a;
}
.tg-menu-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: block;
}

/* ── Universal Toast ───────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #111827;
  color: #fff;
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all .22s ease;
  z-index: 99999;
  white-space: nowrap;
  border: 0;
}
#toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ── Universal Bottom Stats Card System ────────────────────────── */
.tracker-stats-card,
.shortener-stats-card {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 8px;
  background: var(--btn-bg);
  border-radius: var(--r-sm);
  border: 0;
  flex-shrink: 0;
}
.stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  flex: 1;
  min-width: 0;
}
.stats-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.2;
}
.stats-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  line-height: 1.2;
}
.stats-sep {
  width: 1px;
  height: 22px;
  background: var(--line);
  flex-shrink: 0;
}

/* ── Global Responsive Base ────────────────────────────────────── */
@media (max-width: 850px) {
  body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .app-header {
    padding: 0 12px;
    height: 46px;
    min-height: 46px;
  }
  .nav-brand { font-size: 14px; }
  .nav-crumb-trail { font-size: 13px; gap: 6px; }
  .nav-crumb-current { font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
  .view-container {
    height: auto;
    min-height: calc(100vh - 46px);
    overflow: visible;
  }
}
