/* ==========================================================================
   VERDADES FINANCIERAS DURAS — Editorial newsprint reckoning
   --------------------------------------------------------------------------
     A financial broadsheet that doesn't lie.
       · LIGHT  → salmon paper, claret ink, FT-style editorial
       · DARK   → midnight ledger, parchment text, amber-gold accent
   ========================================================================== */

/* ---------- DARK · midnight ledger (default) ---------- */
:root {
  --bg-primary:    #0c0a09;
  --bg-secondary:  #14110f;
  --bg-card:       #1a1714;
  --bg-input:      #0c0a09;
  --text-primary:  #f2e9d8;
  --text-secondary:#a39882;
  --text-muted:    #6b6253;
  --accent:        #ffb627;            /* amber-gold */
  --accent-2:      #c1440e;            /* burnt orange */
  --accent-hover:  #ffd166;
  --danger:        #c1440e;
  --success:       #6a994e;
  --warning:       #e9c46a;
  --border:        #2a241f;
  --rule:          #3a322a;            /* heavier rule line */
  --shadow:        rgba(0, 0, 0, 0.55);
  --paper-tint:    rgba(255, 182, 39, 0.04);
  --radius:        0px;
  --radius-lg:     2px;
  --font-display:  'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body:     'Newsreader', Georgia, 'Times New Roman', serif;
  --font-mono:     'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

/* ---------- LIGHT · salmon paper ---------- */
body.light {
  --bg-primary:    #fff1e5;            /* FT salmon */
  --bg-secondary:  #fbe7d3;
  --bg-card:       #fff7ec;
  --bg-input:      #ffffff;
  --text-primary:  #1a1610;
  --text-secondary:#4a4136;
  --text-muted:    #8b7d6b;
  --accent:        #990f3d;            /* claret */
  --accent-2:      #c8102e;            /* warm red */
  --accent-hover:  #6e0a2c;
  --danger:        #c8102e;
  --success:       #2e6f40;
  --warning:       #b8860b;
  --border:        rgba(26, 22, 16, 0.18);
  --rule:          rgba(26, 22, 16, 0.35);
  --shadow:        rgba(26, 22, 16, 0.06);
  --paper-tint:    rgba(153, 15, 61, 0.05);
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY & PAPER
   ========================================================================== */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "onum", "tnum" off;
  background: var(--bg-primary);
  color: var(--text-primary);
  /* subtle paper grain — a single SVG noise inline, no extra request */
  background-image:
    radial-gradient(circle at 20% 10%, var(--paper-tint), transparent 60%),
    radial-gradient(circle at 80% 90%, var(--paper-tint), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

::selection { background: var(--accent); color: var(--bg-primary); }

/* ==========================================================================
   HEADER · MASTHEAD
   ========================================================================== */
.header {
  position: relative;
  background: transparent;
  border: none;
  padding: 1.4rem clamp(1rem, 4vw, 3rem) 2rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

/* top + bottom hairline rules with a centered trim */
.header::before,
.header::after {
  content: "";
  position: absolute;
  left: clamp(1rem, 4vw, 3rem);
  right: clamp(1rem, 4vw, 3rem);
  height: 1px;
  background: var(--rule);
}
.header::before { top: 3.4rem; }
.header::after  { display: none; }

.masthead-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 clamp(5rem, 8vw, 6.5rem) 1rem 0;   /* keep clear of the toggle */
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.masthead-edition::before { content: "§ "; color: var(--accent); }
.masthead-tag::after { content: " ●"; color: var(--accent); margin-left: 0.3rem; }

.header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--text-primary);
  margin: 0.2rem auto 0.6rem;
  max-width: 16ch;
}

.header h1 em {
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 80;
}

.header p,
#header-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
  margin-top: 0.5rem;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

#header-subtitle .quote-mark {
  font-family: var(--font-display);
  font-size: 1.4em;
  line-height: 0;
  vertical-align: -0.25em;
  color: var(--accent);
  margin: 0 0.05em;
}

.header-author {
  font-family: var(--font-mono) !important;
  font-style: normal !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  margin-top: 1rem !important;
}
.header-author a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.header-author a:hover { color: var(--accent); }

/* Theme toggle — repositioned, editorial styling */
.theme-toggle {
  position: absolute !important;
  top: 1.1rem !important;
  right: clamp(1rem, 4vw, 3rem) !important;
  width: auto !important;
  height: auto !important;
  padding: 0.35rem 0.7rem !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: 1px solid var(--rule) !important;
  color: var(--text-secondary) !important;
  font-family: var(--font-mono) !important;
  opacity: 1 !important;
  z-index: 10;
}
.theme-toggle:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--paper-tint) !important;
}
.theme-icon { font-size: 0.95rem !important; }

/* ==========================================================================
   NAV · SECCIONES (centered, numbered, ruled)
   ========================================================================== */
.tool-nav {
  counter-reset: nav;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  background: transparent;
  border-bottom: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  padding: 0.4rem clamp(0.5rem, 3vw, 2rem);
  margin: 0 auto;
  overflow: visible;
}

.tool-nav::-webkit-scrollbar { display: none; }

.nav-item {
  counter-increment: nav;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  transition: color 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.nav-item::before {
  content: counter(nav, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  align-self: flex-start;
  margin-top: 0.1rem;
  transition: color 0.2s ease;
}

.nav-item .nav-icon { display: none; }      /* ditch the emojis — too "AI" */
.nav-item .nav-label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background: transparent;
}
.nav-item:hover::before { color: var(--accent); }

.nav-item.active {
  color: var(--text-primary);
  background: transparent;
  border-bottom-color: var(--accent);
}
.nav-item.active::before { color: var(--accent); }
.nav-item.active .nav-label { font-style: normal; font-weight: 600; }

/* ==========================================================================
   TOOL INTRO · big editorial display
   ========================================================================== */
.tool-section { animation: tool-fade 0.45s ease both; }
@keyframes tool-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.tool-intro {
  text-align: left;
  margin: 0 auto 2rem;          /* center the block in any container */
  max-width: 38rem;
  padding: 0.5rem 0 1.3rem;
  border-bottom: 1px solid var(--rule);
}

/* Sidebar-layout tools place the intro outside the centered grid; give it
   the same horizontal breathing room as the grid so it feels grounded. */
.tool-section > .tool-intro {
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
  max-width: calc(38rem + 2 * clamp(1rem, 4vw, 2.5rem));
}

.tool-intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  position: relative;
}

.tool-intro h2::before {
  content: "—";
  display: block;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.tool-intro p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   CARDS · hairline broadsheet
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.4rem 1.4rem 1.5rem;
  box-shadow: none;
  position: relative;
}

.card + .card { margin-top: 1rem; }

.card-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card-title::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ==========================================================================
   FORMS · editorial inputs
   ========================================================================== */
.form-group label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

input[type="number"],
input[type="text"],
select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0.65rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.2s, background 0.2s;
}
input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 0 var(--accent);
}

/* Toggle pills → editorial tabs */
.toggle-group {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 2px;
}
.toggle-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.55rem 0.8rem;
  border-radius: 0;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.toggle-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  font-weight: 600;
}
.toggle-btn:hover:not(.active) {
  background: var(--paper-tint);
  color: var(--text-primary);
}

/* Slider */
input[type="range"] {
  height: 2px;
  background: var(--rule);
  border-radius: 0;
}
input[type="range"]::-webkit-slider-thumb {
  width: 14px; height: 14px;
  border-radius: 0;
  background: var(--accent);
  border: none;
  transform: rotate(45deg);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 0;
  background: var(--accent);
  border: none;
  transform: rotate(45deg);
}
.slider-value {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Add button */
.btn-add {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px dashed var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  padding: 0.7rem 1rem;
  margin-top: 0.8rem;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-add:hover {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--paper-tint);
}

/* Salary / total amounts → tabular numbers, big serif */
.salary-result .amount,
.total-bar .amount,
.amount {
  font-family: var(--font-display);
  font-feature-settings: "tnum", "lnum";
  font-variant-numeric: tabular-nums lining-nums;
}

/* ==========================================================================
   LAYOUT · let it breathe
   ========================================================================== */
.layout-sidebar,
.layout-centered {
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  gap: 2rem;
}

/* ==========================================================================
   FOOTER · colophon
   ========================================================================== */
.footer {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
}
.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer-more { margin-top: 0.6rem; }

/* ==========================================================================
   PORTADA · newspaper front page
   ========================================================================== */
.portada {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 4rem;
}

/* Top strip — masthead-meta echo */
.portada-strip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}
.portada-strip-l::before { content: "§ "; color: var(--accent); }
.portada-strip-r::after  { content: " ●"; color: var(--accent); }

/* Generic story-card reset (overrides default <button> chrome) */
.story-card {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: block;
  width: 100%;
  position: relative;
  transition: opacity 0.25s ease;
}
.story-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.story-kicker,
.story-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.story-num { color: var(--text-muted); letter-spacing: 0.18em; }

.story-headline {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.0;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  font-variation-settings: "opsz" 144, "SOFT" 40;
  transition: color 0.2s;
}
.story-headline em {
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 80;
}

.story-dek {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  max-width: 56ch;
}

.story-cta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding: 0 0 2px;
  transition: background 0.2s, color 0.2s, padding 0.2s;
}

.story-card:hover .story-headline { color: var(--accent); }
.story-card:hover .story-cta {
  background: var(--accent);
  color: var(--bg-primary);
  border-bottom-color: transparent;
  padding: 2px 6px;
}

/* ---- Lead story ---- */
.story-lead {
  position: relative;
  padding: 2.2rem 0 2.5rem;
  border-bottom: 3px double var(--rule);
  margin-bottom: 0;
}
.story-lead::before {
  content: "Nº 01";
  position: absolute;
  top: 1.4rem;
  right: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}
.story-lead .story-headline {
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  max-width: 18ch;
  margin-bottom: 1.1rem;
}
.story-lead .story-dek {
  font-size: 1.15rem;
  max-width: 60ch;
}

/* ---- Featured stories (2-up) ---- */
.story-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.story-features > .story {
  padding: 2rem 0;
  position: relative;
}
.story-features > .story:first-child {
  padding-right: 2rem;
  border-right: 1px solid var(--rule);
}
.story-features > .story:last-child {
  padding-left: 2rem;
}
.story-features .story-headline {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  max-width: 14ch;
}

/* ---- Briefs section divider label ---- */
.briefs-label {
  position: relative;
  text-align: center;
  margin: 2.5rem 0 0.5rem;
}
.briefs-label span {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-primary);
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}
.briefs-label::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--rule);
}

/* ---- Briefs grid ---- */
.story-briefs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2rem;
  row-gap: 0;
}
.story-briefs > .story {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: none;
}
.story-briefs .story-headline {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.1;
  margin-bottom: 0.6rem;
  font-variation-settings: "opsz" 36, "SOFT" 30;
}
.story-briefs .story-dek {
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* Foot caption */
.portada-foot {
  text-align: center;
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portada-foot span { color: var(--accent); margin: 0 0.6rem; }

/* The portada is the front page; suppress the section's animation duplication
   on initial load — it inherits .tool-section { animation: tool-fade } already */

/* The header h1 is now a return-home link */
.header h1 {
  cursor: pointer;
  user-select: none;
}
.header h1:hover em { color: var(--accent-hover); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .tool-intro h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }

  .story-briefs { grid-template-columns: repeat(2, 1fr); column-gap: 1.5rem; }
}

@media (max-width: 600px) {
  html { font-size: 15px; }

  .header { padding: 1rem 1rem 1.5rem; }
  .header::before { top: 3rem; }
  .masthead-meta {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    padding: 0 3.4rem 0.7rem 0;
    margin-bottom: 1.2rem;
  }
  .header h1 {
    font-size: clamp(2rem, 11vw, 3rem);
    letter-spacing: -0.03em;
    max-width: 12ch;
  }
  #header-subtitle { font-size: 0.95rem; max-width: 28ch; }
  .header-author { font-size: 0.62rem !important; letter-spacing: 0.18em; }

  .theme-toggle {
    top: 0.7rem !important;
    right: 0.8rem !important;
    padding: 0.3rem 0.55rem !important;
  }

  /* nav: stay centered but allow horizontal scroll if it can't fit */
  .tool-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding: 0.2rem 0.5rem;
  }
  .nav-item {
    scroll-snap-align: start;
    padding: 0.7rem 0.7rem;
    flex-shrink: 0;
  }
  .nav-item .nav-label { font-size: 0.85rem; }
  .nav-item::before { font-size: 0.6rem; }

  .layout-sidebar,
  .layout-centered { padding: 1.2rem 1rem; gap: 1.2rem; }
  .card { padding: 1.1rem; }
  .tool-intro { padding-bottom: 1rem; margin-bottom: 1.2rem; }

  input[type="number"],
  input[type="text"],
  select { font-size: 16px; }      /* prevent iOS auto-zoom */
}

@media (max-width: 600px) {
  .portada { padding: 1rem 1rem 3rem; }
  .portada-strip {
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-align: left;
  }
  .story-lead { padding: 1.5rem 0 1.8rem; }
  .story-lead::before { display: none; }
  .story-lead .story-headline { max-width: none; }

  .story-features { grid-template-columns: 1fr; }
  .story-features > .story:first-child {
    padding: 1.6rem 0;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .story-features > .story:last-child { padding: 1.6rem 0 0.5rem; }
  .story-features .story-headline { max-width: none; }

  .story-briefs { grid-template-columns: 1fr; column-gap: 0; }

  .briefs-label { margin-top: 1.8rem; }
}

@media (max-width: 380px) {
  .masthead-tag { display: none; }
  .nav-item { padding: 0.6rem 0.55rem; gap: 0.3rem; }
  .nav-item .nav-label { font-size: 0.8rem; }
}

/* Touch */
@media (pointer: coarse) {
  input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; }
  input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; }
  input[type="range"] { height: 4px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
