/*
Theme Name: Pico y Placa
Theme URI: https://pico-y-placa.com.co/
Description: Lightweight custom theme for pico-y-placa.com.co — Colombia only, es-CO. Checker-first, card-based, full dark mode. Implements the Pico y Placa Design System v1.0. Full changelog: THEME-ARCHITECTURE.md. v1.4.21: site favicon — the existing brand mark (pico-y-placa-favicon.png, navy rounded square + white traffic-light pill) bundled in assets/img/ with apple-touch-icon.png (180x180) + favicon.ico (16/32/48); icon links printed via wp_head only when no WordPress site icon is set.
Version: 1.4.21
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: pico-y-placa
*/

/* ========== 1. TOKENS (Design System §1) ========== */
:root {
  --blue-50: #EFF6FF; --blue-200: #BFDBFE;
  --blue-300: #93C5FD;   --blue-600: #2563EB; --blue-700: #1D4ED8; --blue-800: #1E40AF;   --amber-100: #FEF3C7; --amber-300: #FCD34D; --amber-500: #F59E0B;
  --amber-800: #92400E;
  --green-100: #DCFCE7; --green-300: #86EFAC;   --green-700: #15803D; --green-800: #166534;
  --red-100: #FEE2E2; --red-300: #FCA5A5; --red-500: #DC2626;
  --red-800: #991B1B;
  --gray-200: #E5E7EB;
      
  --bg: #F8FAFC; --bg-subtle: #F1F5F9;
  --surface: #FFFFFF; --surface-raised: #FFFFFF;
  --text: #0F172A; --text-muted: #64748B; --text-subtle: #94A3B8;
  --border: #E2E8F0; --border-strong: #CBD5E1;
  --primary: var(--blue-700); --primary-hover: var(--blue-800);
  --primary-text: #FFFFFF; --primary-subtle-bg: var(--blue-50); --primary-subtle-text: var(--blue-800);
  --success-bg: var(--green-100); --success-text: var(--green-800);   --danger-bg: var(--red-100); --danger-text: var(--red-800); --danger-solid: var(--red-500);
  --warning-bg: var(--amber-100); --warning-text: var(--amber-800); --warning-solid: var(--amber-500);
  --focus-ring: var(--blue-600);
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
  --shadow-md: 0 10px 30px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 20px 40px rgb(15 23 42 / 0.12);
  --shadow-button: 0 8px 20px rgb(37 99 235 / 0.25);

  --plate-yellow: #FACC15; --plate-yellow-light: #FDE047;
  --radius-md: 12px; --radius-lg: 20px; --radius-full: 999px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --container: 1200px; --header-h: 64px;
  --duration: 180ms; --ease: ease-out;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-xs: 0.8125rem; --text-sm: 0.875rem;
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.625rem);
  --text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.6rem + 1.1vw, 2.5rem);
  --leading-body: 1.6; --leading-heading: 1.2; --leading-tight: 1.1;
}

[data-theme="dark"] {
  --bg: #0F172A; --bg-subtle: #131C33;
  --surface: #1E293B; --surface-raised: #243349;
  --text: #F1F5F9; --text-muted: #94A3B8; --text-subtle: #64748B;
  --border: #334155; --border-strong: #475569;
  --primary: var(--blue-300); --primary-hover: #BFDBFE;
  --primary-text: #0F172A; --primary-subtle-bg: #172554; --primary-subtle-text: var(--blue-200);
  --success-bg: #052E16; --success-text: var(--green-300);   --danger-bg: #450A0A; --danger-text: var(--red-300); --danger-solid: var(--red-300);
  --warning-bg: #451A03; --warning-text: var(--amber-300); --warning-solid: var(--amber-300);
  --focus-ring: var(--blue-300);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.55);
}

/* Self-hosted Inter. NOTE (pre-install step): add inter-latin.woff2 and
   inter-latin-ext.woff2 to this theme's fonts/ directory. Until then the
   system stack below applies and nothing breaks. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF;
}

/* ========== 2. BASE ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--text-base); line-height: var(--leading-body);
}
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: var(--text-3xl); line-height: var(--leading-tight); margin: 0 0 var(--space-4); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--text-2xl); line-height: var(--leading-heading); margin: var(--space-8) 0 var(--space-4); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
h3 { font-size: var(--text-xl); line-height: var(--leading-heading); margin: var(--space-6) 0 var(--space-3); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
/* One heading family site-wide: Inter, weight 800, tight tracking, balanced
   wrapping — h1/h2/h3 differ only in size, never in font or treatment. */
p { margin: 0 0 var(--space-4); }
/* v1.4.17: long unbroken tokens (a bare official URL in FAQ copy) must
   wrap instead of forcing horizontal overflow on a 360px phone. */
p, li, td, th { overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ========== 3. LAYOUT ========== */
.pyp-container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
@media (max-width: 767px) { .pyp-container { padding: 0 var(--space-4); } }
.pyp-header {
  height: var(--header-h); border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 4px rgb(15 23 42 / 0.05);
}
.pyp-header-inner { display: flex; align-items: center; gap: var(--space-5); height: 100%; position: relative; } /* v1.4.17: the mobile menu panel is absolute — it must anchor to the header on every page. On hub pages the header is static, so without this the panel anchored to the viewport and opened below the fold. */
.pyp-logo { font-weight: 800; font-size: var(--text-lg); color: var(--text); text-decoration: none; white-space: nowrap; letter-spacing: -0.02em; }
.pyp-nav { display: flex; align-items: center; gap: var(--space-5); list-style: none; margin: 0 0 0 auto; padding: 0; }
.pyp-nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.pyp-nav a:hover { color: var(--primary); }
/* Professional hover: top-level links grow a primary underline bar;
   current page (real WP menus) keeps the bar persistent. Dropdown items
   keep their own background hover — this rule never touches them. */
.pyp-nav > li > a { display: inline-block; position: relative; padding: 12px 2px; transition: color var(--duration) var(--ease); } /* v1.4.17: 44px tap target. */
.pyp-nav > li > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; border-radius: 2px; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform var(--duration) var(--ease); }
.pyp-nav > li > a:hover::after, .pyp-nav > li > a:focus-visible::after { transform: scaleX(1); }
.pyp-nav > li.current-menu-item > a, .pyp-nav > li.current_page_item > a { color: var(--primary); }
.pyp-nav > li.current-menu-item > a::after, .pyp-nav > li.current_page_item > a::after { transform: scaleX(1); }
.pyp-theme-toggle { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); min-width: 44px; min-height: 44px; cursor: pointer; }
.pyp-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; padding: var(--space-12) 0; }
.pyp-main { min-width: 0; }
.pyp-sidebar { display: flex; flex-direction: column; gap: var(--space-6); }
.pyp-footer { margin-top: var(--space-16); background: var(--surface); border-top: 1px solid var(--border); color: var(--text); }
.pyp-footer-main { padding: var(--space-12) 0 var(--space-8); }
.pyp-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-8); }
@media (min-width: 768px) and (max-width: 1023px) { .pyp-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767px) { .pyp-footer-grid { grid-template-columns: 1fr; gap: var(--space-6); } }
.pyp-footer-logo { font-size: var(--text-xl); font-weight: 800; color: var(--text); text-decoration: none; }
.pyp-footer-brand p { color: var(--text-muted); font-size: var(--text-sm); }
.pyp-footer-verified { display: inline-block; font-size: var(--text-sm); font-weight: 600; color: var(--primary); background: var(--primary-subtle-bg); border-radius: var(--radius-full); padding: 4px 12px; }
.pyp-footer h3 { color: var(--text); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 var(--space-3); }
.pyp-footer-sub { color: var(--text-muted); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin: var(--space-4) 0 var(--space-2); }
.pyp-footer-sub:first-of-type { margin-top: 0; }
.pyp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.pyp-footer a { display: block; padding: 10px 0; color: var(--text-muted); text-decoration: none; font-size: var(--text-sm); } /* v1.4.17: 44px tap target. */
.pyp-footer a:hover { color: var(--primary); text-decoration: underline; }
.pyp-footer-more { font-weight: 700; }
@media (max-width: 1023px) {
  .pyp-layout { grid-template-columns: 1fr; }
}

/* ========== 4. COMPONENTS (Design System §2) ========== */
/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-6); border-radius: var(--radius-full);
  font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
  transition: background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.btn-sm { min-height: 36px; padding: 0 var(--space-4); font-size: var(--text-sm); }
/* v1.4.17: small buttons are 44px on touch widths (Compartir, Ver decreto,
   mini-bar CTA) — desktop keeps 36px. */
@media (max-width: 767px) { .btn-sm { min-height: 44px; } }
.btn-lg { min-height: 52px; padding: 0 var(--space-8); font-size: var(--text-lg); }
.btn-primary { background: var(--primary); color: var(--primary-text); box-shadow: var(--shadow-button); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-button); color: var(--primary-text); }
.btn-secondary { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-danger { background: var(--danger-solid); color: #fff; }
[data-theme="dark"] .btn-danger { color: #0F172A; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn:active { transform: translateY(1px); }
@media (max-width: 767px) { .btn-block-mobile { width: 100%; } }

/* Inputs & selects */
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-weight: 600; margin-bottom: var(--space-2); }
.field input, .field select {
  width: 100%; min-height: 44px; padding: 0 var(--space-4);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  font: inherit; font-size: 1rem;
}
.field input:focus, .field select:focus { border-color: var(--focus-ring); outline: 2px solid var(--focus-ring); outline-offset: 0; }
.field select { appearance: none; background-repeat: no-repeat; background-position: right 12px center; }
.field .hint { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-1); }
.field .error-text { color: var(--danger-text); font-size: var(--text-sm); margin-top: var(--space-1); }
.field-error input, .field-error select { border-color: var(--danger-solid); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.card-sm { border-radius: var(--radius-md); padding: var(--space-4); }
a.card { color: var(--text); text-decoration: none; display: block; }
a.card:hover { box-shadow: var(--shadow-md); }
a.card h3 { color: var(--text); }
@media (max-width: 767px) { .card { padding: var(--space-4); } }

/* Badges — icon + text ALWAYS, never color alone */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 28px; padding: 0 var(--space-3); border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
}
.badge-sm { min-height: 24px; font-size: var(--text-xs); }
.badge-libre { background: var(--success-bg); color: var(--success-text); }
.badge-restringido { background: var(--danger-bg); color: var(--danger-text); }
.badge-pendiente { background: var(--warning-bg); color: var(--warning-text); }
.badge-sin { background: var(--primary-subtle-bg); color: var(--primary-subtle-text); }

/* Tables — plain system style; stacked cards on mobile */
.pyp-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.pyp-table caption { text-align: left; color: var(--text-muted); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.pyp-table th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--border-strong); padding: var(--space-3) var(--space-4); }
.pyp-table td { border-bottom: 1px solid var(--border); padding: var(--space-3) var(--space-4); }
.pyp-table td.num, .pyp-table th.num { text-align: right; }
.pyp-table-wrap { overflow-x: visible; }
@media (min-width: 768px) {
  .pyp-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
  .pyp-table-wrap .pyp-table th { background: #0F172A; color: #FFFFFF; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 0; }
}
@media (max-width: 767px) {
  .pyp-table thead { display: none; }
  .pyp-table tr { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: var(--space-4); padding: var(--space-3); }
  .pyp-table td { display: flex; justify-content: space-between; gap: var(--space-4); border-bottom: 0; padding: var(--space-2) 0; }
  .pyp-table td::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); }
}
/* Comparativa polish: zebra rows + bold city column (desktop rows and
   mobile cards alike) + a real gap above the footnote line below the table
   (paragraphs carry no top margin by default, so the note sat flush). */
.pyp-table tbody tr:nth-child(even) { background: var(--bg-subtle); }
.pyp-table td:first-child { font-weight: 700; }
.pyp-table-note { margin-top: var(--space-4); }

/* ---------- v1.4.17: .data-table responsive ---------- */
/* hoy / manana / semana / digit / rules tables all use .data-table, but the
   stacking CSS only covered .pyp-table — on a 360px phone 3–4 columns
   squeezed into 328px and the nowrap badges forced page-level horizontal
   scroll. Desktop treatment mirrors .pyp-table; on mobile the table stacks
   into labelled cards (every td already carries data-label). The monthly
   calendar is EXCLUDED from stacking — it is a grid, not a list — and
   scrolls inside .month-cal-wrap instead. */
.data-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.data-table th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--border-strong); padding: var(--space-3) var(--space-4); }
.data-table td { border-bottom: 1px solid var(--border); padding: var(--space-3) var(--space-4); }
.data-table tbody tr:nth-child(even) { background: var(--bg-subtle); }
.month-cal-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 767px) {
  .data-table:not(.month-cal) thead { display: none; }
  .data-table:not(.month-cal) tr { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: var(--space-4); padding: var(--space-3); }
  .data-table:not(.month-cal) td { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); border-bottom: 0; padding: var(--space-2) 0; }
  .data-table:not(.month-cal) td::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); flex: none; }
  .data-table:not(.month-cal) td:empty { display: none; }
  .month-cal { min-width: 560px; }
  .month-cal th, .month-cal td { font-size: 0.75rem; padding: 6px 4px; text-align: center; }
}

/* Homepage: centered section headings (user request), modest sizes kept. */
body.pyp-home .pyp-main > h2, body.pyp-home .pyp-main section h2 { text-align: center; }
body.pyp-home .pyp-main > h2 + p.muted, body.pyp-home .pyp-main section > h2 + p.muted { text-align: center; }

/* City cards — "Restricciones por ciudad" (front page, v1.4.8). Separate
   section, modest type: city 1.05rem, plate digits reuse .cat-plate sizes,
   meta 0.85rem. The plate reuses the theme's own .cat-plate component;
   restricted plates get the red variant (reference signal), libre/pending
   keep the standard plate with SIN RESTRICCIÓN / PENDIENTE. */
.pyp-city-section { margin: var(--space-12) 0; }
.pyp-city-sub { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.pyp-city-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 1023px) { .pyp-city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pyp-city-grid { grid-template-columns: 1fr; } }
.city-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.city-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.city-name { font-size: 1.05rem; font-weight: 700; margin: 0; }
.city-dept { font-size: 0.85rem; color: var(--text-muted); margin: 2px 0 0; }
.city-badge { flex: none; }
.cat-plate.plate-restricted { background: linear-gradient(180deg, #F87171, #B91C1C); box-shadow: 0 4px 12px rgb(220 38 38 / 0.25); }
.cat-plate.plate-restricted .cat-plate-digits { color: #FFFFFF; }
.cat-plate.plate-restricted .cat-plate-strip { color: #FEE2E2; }
.city-count-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-top: var(--space-4); font-size: 0.85rem; }
.city-count-label { color: var(--text-muted); }
.city-countdown { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.city-schedule { color: var(--text-muted); font-size: var(--text-sm); margin: var(--space-3) 0 0; text-align: center; }
.city-countdown.is-urgent { color: var(--danger-solid); }
.city-progress { height: 8px; background: var(--bg-subtle); border-radius: var(--radius-full); overflow: hidden; margin-top: var(--space-2); }
.city-progress-bar { display: block; height: 100%; background: var(--warning-solid); border-radius: inherit; transition: width 1s linear, background var(--duration) var(--ease); }
.city-progress-bar.is-urgent { background: var(--danger-solid); }
.city-foot { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); font-size: 0.85rem; }
.city-foot-vehicle { color: var(--text-muted); }
.city-detail-link { color: var(--primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.city-detail-link:hover { text-decoration: underline; }
.pyp-more-cities { margin-top: var(--space-8); text-align: center; }
.pyp-more-label { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin: 0; }
.pyp-more-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-3); }
.pyp-more-pill { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 12px 18px; font-weight: 600; font-size: 0.9rem; color: var(--text); text-decoration: none; } /* v1.4.17: 44px tap target. */
.pyp-more-pill:hover { border-color: var(--primary); color: var(--primary); }

/* Accordions (FAQs) — plain content, no decorative box */
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  background: none; border: 0; padding: var(--space-4) 0; cursor: pointer;
  font: inherit; font-size: 1.0625rem; font-weight: 600; color: var(--text); text-align: left;
}
.faq-q[aria-expanded="true"] { color: var(--primary); }
.faq-q .chev { transition: transform var(--duration) var(--ease), background var(--duration) var(--ease), color var(--duration) var(--ease); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary-subtle-bg); color: var(--primary); font-size: 0.875rem; }
.faq-q[aria-expanded="true"] .chev { transform: rotate(180deg); background: var(--primary); color: var(--primary-text); }
.faq-a { padding: 0 0 var(--space-4); }
.faq-a[hidden] { display: none; }

/* Tabs */
.tablist { display: flex; gap: var(--space-2); border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  padding: var(--space-3) var(--space-4); font: inherit; font-size: 1rem; color: var(--text-muted); white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tabpanel { padding-top: var(--space-6); }
.tabpanel[hidden] { display: none; }

/* 7-day calendar strip — professional: equal grid columns on desktop,
   scroll-snap row on mobile; status is a pill (icon + text, never color alone). */
.strip-subtitle { font-weight: 700; font-size: var(--text-lg); margin-bottom: var(--space-3); }
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-3); padding: 2px; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; }
.day-strip::-webkit-scrollbar { display: none; }
@media (max-width: 767px) { .day-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-2); } }
.day-cell {
  flex: 1 0 128px; min-height: 148px; padding: var(--space-4) var(--space-2);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-1);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  text-align: center; cursor: pointer; font: inherit; color: var(--text);
  box-shadow: var(--shadow-sm); transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
@media (max-width: 767px) { .day-cell { scroll-snap-align: start; flex-basis: 100px; min-height: 138px; padding: var(--space-3) var(--space-1); } .day-cell .num { font-size: var(--text-xl); } .day-cell .st { font-size: 0.6875rem; padding: 3px 6px; } }
.day-cell:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.day-cell:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.day-cell.today { border: 2px solid var(--primary); background: var(--primary-subtle-bg); }
.day-cell .wd { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.day-cell .today-badge { font-size: var(--text-xs); font-weight: 700; color: var(--primary-text); background: var(--primary); border-radius: var(--radius-full); padding: 2px 10px; }
.day-cell .num { font-size: var(--text-2xl); font-weight: 800; line-height: 1.1; }
.day-cell .mon { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); margin-top: calc(-1 * var(--space-1)); }
.day-cell .st { display: inline-flex; align-items: center; font-size: var(--text-xs); font-weight: 700; border-radius: var(--radius-full); padding: 4px 10px; margin-top: var(--space-1); white-space: nowrap; background: var(--bg-subtle); color: var(--text-muted); }
.day-cell.libre .st { background: var(--success-bg); color: var(--success-text); }
.day-cell.restringido .st { background: var(--danger-bg); color: var(--danger-text); }
.day-cell.pendiente .st { background: var(--warning-bg); color: var(--warning-text); }

/* Result card — icon + headline + detail + source, never color alone */
.result-card { border-radius: var(--radius-lg); padding: var(--space-6); border: 1px solid var(--border); }
.result-card .rc-head { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-xl); font-weight: 700; margin: 0 0 var(--space-3); }
.result-card .rc-detail { margin: 0 0 var(--space-2); }
.result-card .rc-fine { font-weight: 600; }
.result-card .rc-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
.result-libre { background: var(--success-bg); color: var(--success-text); border-color: transparent; }
.result-restringido { background: var(--danger-bg); color: var(--danger-text); border-color: transparent; }
.result-pendiente { background: var(--warning-bg); color: var(--warning-text); border-color: transparent; }
.result-sin { background: var(--primary-subtle-bg); color: var(--primary-subtle-text); border-color: transparent; }
.result-card .btn { color: inherit; }
.result-libre .btn-primary, .result-restringido .btn-primary, .result-pendiente .btn-primary { background: var(--primary); color: var(--primary-text); }

/* Toasts */
.toast {
  position: fixed; right: var(--space-6); bottom: var(--space-6); z-index: 100;
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--surface-raised); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-4); box-shadow: var(--shadow-lg); max-width: 360px;
}
@media (max-width: 767px) { .toast { left: var(--space-4); right: var(--space-4); bottom: 66px; max-width: none; } }

/* Skeleton loader */
.skeleton { background: var(--gray-200); border-radius: 8px; position: relative; overflow: hidden; }
[data-theme="dark"] .skeleton { background: #334155; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.35), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Breadcrumbs */
.breadcrumbs { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-4); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-2); color: var(--text-subtle); }
.breadcrumbs [aria-current="page"] { color: var(--text-muted); }

/* Ad slots — reserved heights, zero CLS */
.ad-slot {
  background: var(--bg-subtle); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: var(--text-xs); text-align: center; width: 100%;
}
.ad-hero-below { min-height: 90px; }
.ad-mid { min-height: 90px; }
.ad-sidebar-top { min-height: 250px; }
.ad-sidebar-tall { min-height: 600px; }
.ad-sticky-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  min-height: 50px; max-height: 100px; border-radius: 0; border: 0; border-top: 1px solid var(--border);
  background: var(--surface); display: none;
}
@media (max-width: 767px) {
  .ad-hero-below { min-height: 100px; }
  .ad-mid { min-height: 250px; }
  body.has-sticky-ad { padding-bottom: 50px; }
  .ad-sticky-bottom { display: flex; }
}
@media (min-width: 768px) { .ad-sticky-bottom { display: none !important; } }

/* Checker form layout — professional: one aligned row on desktop
   (fields are label + control only, so the button lines up with the inputs),
   two columns on tablet, stacked with a full-width CTA on mobile. */
.pyp-checker-body { padding: var(--space-6); }
.pyp-checker-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(170px, 0.75fr) auto; gap: var(--space-4); align-items: end; }
.pyp-checker-form .field { margin-bottom: 0; }
.pyp-checker-form .field input, .pyp-checker-form .field select { min-height: 52px; font-size: 1rem; }
.pyp-checker-form #pyp-digit { text-align: center; font-weight: 700; font-size: 1.125rem; }
.pyp-checker-form button[type="submit"] { min-height: 52px; padding: 0 var(--space-8); }
.pyp-checker-form #pyp-origin-wrap { grid-column: span 2; }
@media (max-width: 899px) and (min-width: 768px) { .pyp-checker-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767px) { .pyp-checker-form { grid-template-columns: 1fr; } .pyp-checker-form #pyp-origin-wrap { grid-column: auto; } }
.pyp-checker-privacy { margin-top: var(--space-4); background: var(--primary-subtle-bg); border-left: 3px solid var(--primary); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: var(--space-3) var(--space-4); color: var(--text); font-size: var(--text-sm); }
.pyp-checker-result { margin-top: var(--space-6); min-height: 120px; }
.pyp-checker-result:empty { display: none; }

/* Reference-style header: live Bogotá clock, divider, pill CTA, and the
   "Más ciudades" dropdown (desktop panel + mobile nested list). The
   desktop panel hangs from the bar's bottom edge: 64px bar, ~24px link
   row centered (top 20px) + 20px clearance = 64px. */
.pyp-header-clock { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 128px; text-align: right; }
.pyp-header-divider { width: 1px; height: 28px; background: var(--border); flex: none; }
.pyp-header-cta { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-full); border: 1.5px solid var(--primary); color: var(--primary); background: transparent; font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.pyp-header-cta:hover { background: var(--primary); color: var(--primary-text); }
.pyp-nav-more { position: relative; }
.pyp-nav-more summary { list-style: none; cursor: pointer; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 4px; padding: 12px 2px; } /* v1.4.17: 44px tap target. */
.pyp-nav-more summary::-webkit-details-marker { display: none; }
.pyp-nav-more summary::after { content: "▾"; font-size: 0.75em; display: inline-block; transition: transform var(--duration) var(--ease); }
.pyp-nav-more details[open] summary::after { transform: rotate(180deg); }
.pyp-nav-more details[open] summary { color: var(--primary); }
.pyp-nav-more summary:hover { color: var(--primary); }
.pyp-nav .pyp-nav-more-list { display: none; }
.pyp-nav .pyp-nav-more details[open] .pyp-nav-more-list { display: block; position: absolute; top: calc(100% + 20px); right: 0; min-width: 200px; list-style: none; margin: 0; padding: var(--space-2) 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); z-index: 60; }
.pyp-nav .pyp-nav-more-list li a { display: block; padding: 12px var(--space-4); color: var(--text); text-decoration: none; font-weight: 500; white-space: nowrap; } /* v1.4.17: 44px tap target. */
.pyp-nav .pyp-nav-more-list li a:hover { color: var(--primary); background: var(--bg-subtle); }
.pyp-mobile-list .pyp-nav-more summary { font-weight: 600; color: var(--text); padding: var(--space-2) 0; }
.pyp-mobile-list .pyp-nav-more-list { list-style: none; margin: 0; padding-left: var(--space-4); }
.pyp-mobile-list .pyp-nav-more-list li { padding: var(--space-2) 0; }
.pyp-mobile-nav { display: none; }
.pyp-mobile-nav summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); font-size: 1.25rem; }
.pyp-mobile-nav summary::-webkit-details-marker { display: none; }
.pyp-mobile-list { list-style: none; margin: 0; padding: var(--space-2) 0 var(--space-4); }
.pyp-mobile-list li { padding: var(--space-2) var(--space-4); }
.pyp-mobile-list a { color: var(--text); text-decoration: none; font-weight: 600; display: block; padding: 12px 0; } /* v1.4.17: 44px tap target. */
.pyp-mobile-list a:hover, .pyp-mobile-list a:focus-visible { background: var(--bg-subtle); color: var(--primary); border-radius: var(--radius-md); }
.pyp-mobile-list .pyp-nav-more summary:hover { color: var(--primary); }
.pyp-mobile-nav summary:hover { border-color: var(--primary); color: var(--primary); }
.pyp-mobile-nav[open] .pyp-mobile-list { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); z-index: 60; }
@media (max-width: 1099px) {
  .pyp-mobile-nav { display: block; }
  .pyp-nav { display: none; }
  .pyp-header-clock { margin-left: auto; }
}
@media (max-width: 767px) {
  .pyp-header-inner { gap: var(--space-3); }
  .pyp-header-clock, .pyp-header-divider, .pyp-header-cta { display: none; }
  .pyp-theme-toggle { margin-left: auto; }
}

/* v1.1.0 additions: digit grid (page-templates/digit.php) + header city selector */
.digit-btn { min-height: 64px; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: var(--text-2xl); font-weight: 700; cursor: pointer; }
.digit-btn[aria-pressed="true"] { background: var(--primary); color: var(--primary-text); border-color: transparent; }
.pyp-header-city select { min-height: 40px; padding: 0 var(--space-3); background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-md); font: inherit; font-size: 0.95rem; }
@media (max-width: 767px) { .pyp-header-city { display: none; } }

/* Step 4b: Restricciones por categoría — cards + live countdown.
   All colors come from the design-system tokens; state colors reuse the
   semantic palette (danger/amber/success) so dark mode works unchanged.
   Countdown uses tabular-nums; card min-height + fixed rows = no CLS. */
.pyp-categories { margin: var(--space-8) 0; }
.pyp-cat-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.pyp-cat-head h2 { margin: 0; }
.pyp-cat-pill { margin: 0; padding: var(--space-2) var(--space-3); border-radius: 999px; font-size: var(--text-sm); font-weight: 600; }
.pyp-cat-pill.pill-active { background: #FEE2E2; color: #991B1B; }
.pyp-cat-pill.pill-none { background: #DCFCE7; color: #166534; }
[data-theme="dark"] .pyp-cat-pill.pill-active { background: #7F1D1D; color: #FECACA; }
[data-theme="dark"] .pyp-cat-pill.pill-none { background: #14532D; color: #BBF7D0; }

.category-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
@media (min-width: 768px) { .category-grid { grid-template-columns: 1fr 1fr; } }

.category-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--plate-yellow); border-radius: var(--radius-lg); padding: var(--space-4); min-height: 360px; box-shadow: var(--shadow-md); }

.cat-head { display: flex; align-items: center; gap: var(--space-3); }
.cat-icon { flex: 0 0 48px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); }
.cat-icon svg { width: 34px; height: 34px; }
.cat-icon--particulares { background: rgba(29, 78, 216, 0.12); color: #1D4ED8; }
.cat-icon--motos { background: rgba(245, 158, 11, 0.16); color: #B45309; }
.cat-icon--taxis { background: rgba(22, 163, 74, 0.12); color: #15803D; }
.cat-icon--especial { background: rgba(220, 38, 38, 0.10); color: #DC2626; }
.cat-icon--carga { background: rgba(75, 85, 99, 0.14); color: #4B5563; }
[data-theme="dark"] .cat-icon--particulares { color: #93C5FD; }
[data-theme="dark"] .cat-icon--motos { color: #FCD34D; }
[data-theme="dark"] .cat-icon--taxis { color: #86EFAC; }
[data-theme="dark"] .cat-icon--especial { color: #FCA5A5; }
[data-theme="dark"] .cat-icon--carga { color: #D1D5DB; }
.cat-titles { flex: 1; min-width: 0; }
.cat-title { margin: 0; font-size: var(--text-lg); }
.cat-sub { margin: 0; color: var(--text-muted); font-size: var(--text-sm); }
.cat-badge { flex-shrink: 0; font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.is-active .cat-badge { color: #DC2626; }
.is-upcoming .cat-badge { color: #92400E; }
.is-libre .cat-badge { color: #15803D; }
.is-finished .cat-badge, .is-pending .cat-badge { color: var(--text-muted); }
[data-theme="dark"] .is-active .cat-badge { color: #FCA5A5; }
[data-theme="dark"] .is-upcoming .cat-badge { color: #FCD34D; }
[data-theme="dark"] .is-libre .cat-badge { color: #86EFAC; }

.cat-label { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); }
.cat-plate { position: relative; background: linear-gradient(180deg, var(--plate-yellow-light), var(--plate-yellow)); border: 2px solid #111827; border-radius: var(--radius-md); padding: var(--space-3) var(--space-3) 0; text-align: center; min-height: 104px; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 6px 16px rgb(250 204 21 / 0.35); }
.cat-plate::after { content: ""; position: absolute; inset: 6px; border: 1px solid #111827; border-radius: 6px; pointer-events: none; }
.cat-plate .screw { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #E5E7EB, #6B7280); z-index: 1; }
.cat-plate .screw.tl { top: 4px; left: 4px; }
.cat-plate .screw.tr { top: 4px; right: 4px; }
.cat-plate .screw.bl { bottom: 22px; left: 4px; }
.cat-plate .screw.br { bottom: 22px; right: 4px; }
.cat-plate-digits { color: #111827; font-weight: 800; letter-spacing: 0.18em; line-height: 1.2; }
.cat-plate-digits.plate-lg { font-size: 2.5rem; }
.cat-plate-digits.plate-md { font-size: 2rem; }
.cat-plate-digits.plate-sm { font-size: 1.35rem; letter-spacing: 0.10em; }
.cat-plate-strip { display: block; margin: var(--space-2) calc(-1 * var(--space-3)) 0; background: #111827; color: #FEF9C3; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.35em; padding: 3px 0; }
.cat-plate-free { color: #15803D; font-weight: 800; font-size: 1.5rem; letter-spacing: 0.06em; }
.cat-plate-pending { color: #6B7280; font-weight: 800; font-size: 1.5rem; letter-spacing: 0.06em; }
.cat-plate-all { color: #111827; font-weight: 800; font-size: 1.75rem; letter-spacing: 0.12em; padding: 2px 14px; border: 2px solid #111827; border-radius: 999px; }
.plate-muted { opacity: 0.55; }

.cat-count-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--space-4); min-height: 28px; }
.cat-count-label { color: var(--text-muted); font-size: var(--text-sm); }
.cat-countdown { font-weight: 700; font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.cat-progress { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: var(--space-2); }
.cat-progress-bar { display: block; height: 100%; background: #DC2626; transition: width 1s linear; }
.is-upcoming .cat-progress-bar { background: #F59E0B; }
.is-libre .cat-progress-bar, .is-finished .cat-progress-bar, .is-pending .cat-progress-bar { background: #9CA3AF; }
.cat-divider { border: none; border-top: 1px solid var(--border); margin: var(--space-4) 0 var(--space-3); }
.cat-schedule { margin: 0; font-size: var(--text-sm); min-height: 20px; }
.cat-regimes { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.cat-regime-btn.is-selected { background: var(--primary); color: var(--primary-text); border-color: transparent; }
.cat-stale { margin: var(--space-3) 0 0; padding: var(--space-2) var(--space-3); background: #FEF3C7; color: #92400E; border-radius: var(--radius-md); font-size: var(--text-sm); }
[data-theme="dark"] .cat-stale { background: #78350F; color: #FDE68A; }
.cat-skeleton { min-height: 360px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); animation: cat-pulse 1.6s ease-in-out infinite; }
@keyframes cat-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  .cat-skeleton { animation: none; }
  .cat-progress-bar { transition: none; }
}

/* ---------- Phase B: city hub (v1.2.0) ---------- */
/* Hub pages are single-column: the grid collapses to one column and the
   sticky header becomes static — the mini-bar is the only sticky element. */
body.pyp-hub .pyp-layout { grid-template-columns: 1fr; }
body.pyp-hub .pyp-header { position: static; }
/* v1.4.17: the header is static on hub pages, so the sticky mini-bar and
   the sticky desktop TOC must dock at the viewport top — top: 64px left a
   64px dead strip above them when stuck. */
body.pyp-hub .hub-minibar { top: 0; }
body.pyp-hub .hub-toc-desktop { top: var(--space-4); }

/* Hero: blue gradient, white text (works in both themes). */
.hub-hero { background: linear-gradient(135deg, #1E3A8A, #4F46E5); color: #fff; border-radius: var(--radius-lg); padding: var(--space-6); margin: var(--space-6) 0; }
.hub-hero h1 { color: #fff; margin-top: 0; font-weight: 800; letter-spacing: -0.02em; }
.hub-hero .hub-meta { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.hub-hero .hub-meta .btn { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.hub-summary { font-size: var(--text-lg); font-weight: 600; }
.hub-hero .pyp-breadcrumbs a { color: #DBEAFE; }
.hub-hero .pyp-breadcrumbs { color: #BFDBFE; }

/* Hero checker card (inside the gradient: light card, dark text). */
.hub-checker-card { margin-top: var(--space-6); }
#hub-checker-form { display: grid; grid-template-columns: 1fr 160px auto; gap: var(--space-4); align-items: end; }
#hub-checker-form .hub-check-row { display: flex; gap: var(--space-4); align-items: center; }
#hub-checker-form .hub-save { display: flex; gap: var(--space-2); align-items: center; white-space: nowrap; }
@media (max-width: 767px) { #hub-checker-form { grid-template-columns: 1fr; } }
.hub-checker-result { margin-top: var(--space-4); }
.hub-checker-result:empty { display: none; }

/* Mi placa banner: reserved height (76px min) so JS personalization never
   shifts layout; state tints use icon + text, never color alone. */
.hub-banner { display: flex; gap: var(--space-4); align-items: flex-start; min-height: 76px; margin-top: var(--space-6); padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.hub-banner-icon { font-size: var(--text-xl); line-height: 1.2; }
.hub-banner-line { font-weight: 700; margin: 0 0 var(--space-1); }
.hub-banner-sub { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }
.hub-banner[data-banner-state="restricted-active"] { background: var(--danger-bg); color: var(--danger-text); border-color: transparent; }
.hub-banner[data-banner-state="restricted-active"] .hub-banner-sub { color: var(--danger-text); }
.hub-banner[data-banner-state="libre"] { background: var(--success-bg); color: var(--success-text); border-color: transparent; }
.hub-banner[data-banner-state="libre"] .hub-banner-sub { color: var(--success-text); }

/* Sticky mini-bar: 48px, docks below the sticky 64px header. */
.hub-minibar { position: sticky; top: 64px; z-index: 50; display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; min-height: 48px; padding: var(--space-2) var(--space-4); background: var(--surface); border-bottom: 1px solid var(--border); }
.hub-minibar-city { font-weight: 700; }
.hub-minibar-countdown { font-variant-numeric: tabular-nums; font-weight: 700; margin-left: auto; min-width: 80px; text-align: right; }
.hub-minibar .btn { margin-left: 0; }
@media (max-width: 767px) { .hub-minibar-countdown { margin-left: 0; } }

/* While the mini-bar is stuck, the sticky bottom ad hides (no double bars). */
body.has-stuck-minibar .ad-sticky-bottom { display: none !important; }

/* Hub grid: first 3 cards on mobile, the rest behind "Ver todas". */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 767px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-grid .hub-extra { display: none; }
  .hub-grid.show-all .hub-extra, .pyp-hub-categories.show-all .hub-extra { display: block; }
}
@media (min-width: 768px) { .hub-show-all { display: none; } }
.hub-show-all { margin-top: var(--space-4); }

/* Libre strip + chips. */
.hub-libre { margin-top: var(--space-4); }
.hub-libre-toggle { background: none; border: none; padding: 10px 0; font: inherit; color: var(--text-muted); cursor: pointer; text-align: left; } /* v1.4.17: 44px tap target. */
.hub-libre-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.hub-chip { display: inline-block; padding: var(--space-1) var(--space-3); border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: var(--text-sm); }

/* Timeline: 24h track, striped restriction windows, "Ahora" marker. */
.hub-timeline { margin: var(--space-8) 0; }
.tl-bar { position: relative; height: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: visible; margin-top: var(--space-4); }
.tl-window { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #DC2626 0 8px, #EF4444 8px 16px); }
.tl-now { position: absolute; top: -6px; bottom: -6px; width: 2px; background: #111827; }
[data-theme="dark"] .tl-now { background: #F9FAFB; }
.tl-now-label { position: absolute; top: -18px; left: -14px; font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.tl-hours { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-2); }
.tl-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }

/* Tomorrow card + reminders + info + program. */
.hub-tomorrow-card { margin-bottom: var(--space-6); }
.hub-tomorrow-date { font-weight: 700; }
.hub-tomorrow-rows { margin: 0; padding-left: var(--space-5); }
.hub-tomorrow-rows li { margin-bottom: var(--space-2); }
.hub-reminders { margin: var(--space-8) 0; }
.hub-info, .hub-program { margin: var(--space-8) 0; }

/* Editorial: 720px column, TOC sticky on desktop, <details> on mobile. */
.hub-editorial { margin: var(--space-8) 0; }
.hub-editorial-body { max-width: 720px; font-size: 17px; line-height: 1.7; }
.hub-editorial-body .hub-quick { font-size: 17px; }
.hub-toc-mobile { margin-bottom: var(--space-6); }
.hub-toc-mobile summary { cursor: pointer; font-weight: 700; padding: 12px 0; } /* v1.4.17: 44px tap target. */
.hub-toc-desktop { display: none; }
@media (min-width: 1024px) {
  .hub-editorial-inner { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
  .hub-toc-mobile { display: none; }
  .hub-toc-desktop { display: block; position: sticky; top: 64px; }
  .hub-toc-desktop ul { padding-left: var(--space-4); }
}

/* Related cities + footer disclaimer bar + header hub extras. */
.hub-related { margin: var(--space-8) 0; }
.hub-related ul { display: grid; grid-template-columns: 1fr; gap: var(--space-2); padding-left: var(--space-5); }
@media (min-width: 768px) { .hub-related ul { grid-template-columns: 1fr 1fr; } }
/* Nav-like lists never show bullets (same class of bug as .pyp-nav):
   TOC (mobile + desktop), related cities, tomorrow rows. Content lists
   (decrees, editorial prose) keep their bullets. */
.hub-toc-mobile ul, .hub-toc-desktop ul, .hub-related ul, .hub-tomorrow-rows { list-style: none; margin: 0; padding: 0; }
.pyp-header-hub { display: flex; gap: var(--space-3); align-items: center; margin-left: auto; }
.pyp-header-cities { position: relative; }
.pyp-header-cities summary { cursor: pointer; font-weight: 600; list-style: none; }
.pyp-header-cities ul { position: absolute; right: 0; top: 100%; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-2) 0; margin: var(--space-2) 0 0; list-style: none; min-width: 180px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.pyp-header-cities ul a { display: block; padding: var(--space-2) var(--space-4); }
.pyp-header-clock { font-variant-numeric: tabular-nums; font-size: var(--text-sm); white-space: nowrap; }
@media (max-width: 767px) { .pyp-header-clock { display: none; } }

/* Dismissible ad close button (all slots, incl. the hub sticky bottom). */
.ad-slot { position: relative; }
.ad-close { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; line-height: 1; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }

/* Midnight notice + toast. */
.hub-midnight-notice { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-4); background: #FEF3C7; color: #92400E; border-radius: var(--radius-md); margin: var(--space-6) 0; }
.hub-midnight-notice[hidden] { display: none; }
.hub-midnight-notice p { margin: 0; flex: 1 1 240px; }
[data-theme="dark"] .hub-midnight-notice { background: #78350F; color: #FDE68A; } /* v1.4.17: same dark treatment as .cat-stale. */
.hub-toast { position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%) translateY(16px); z-index: 100; background: #111827; color: #F9FAFB; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: calc(100vw - 32px); text-align: center; }
.hub-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .hub-toast { transition: none; }
}

/* ---------- v1.3.0 restyle: reference look (light, navy hero, pill buttons) ----------
   Style tokens + layout patterns only — no competitor text, icons, or assets.
   All copy and all restriction data stay the theme's own verified content. */

/* Front-page hero: navy-to-indigo gradient band, centred, translucent badge. */
.pyp-hero { background: linear-gradient(135deg, #1E3A8A, #4F46E5); color: #fff; border-radius: var(--radius-lg); padding: var(--space-12) var(--space-6); text-align: center; position: relative; overflow: hidden; margin-bottom: var(--space-8); }
.pyp-hero::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgb(255 255 255 / 0.07); top: -220px; right: -110px; pointer-events: none; }
.pyp-hero::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgb(255 255 255 / 0.06); bottom: -200px; left: -90px; pointer-events: none; }
.pyp-hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.pyp-hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid rgb(255 255 255 / 0.35); background: rgb(255 255 255 / 0.12); color: #DBEAFE; font-size: var(--text-sm); font-weight: 600; }
.pyp-hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; }
.pyp-hero h1 { color: #fff; font-size: clamp(2.25rem, 1.8rem + 2.2vw, 3.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: var(--space-6) 0 var(--space-4); }
@media (max-width: 480px) { .pyp-hero h1 { font-size: 1.7rem; line-height: 1.2; text-wrap: balance; } }
.pyp-hero-accent { color: #93C5FD; }
.pyp-hero-sub { color: #DBEAFE; font-size: var(--text-lg); max-width: 640px; margin: 0 auto var(--space-8); }
.pyp-hero-ctas { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.btn-hero-primary { background: #fff; color: #1D4ED8; box-shadow: 0 8px 20px rgb(0 0 0 / 0.25); }
.btn-hero-primary:hover { background: #EFF6FF; color: #1D4ED8; }
.btn-hero-secondary { background: rgb(255 255 255 / 0.12); color: #fff; border-color: rgb(255 255 255 / 0.5); }
.btn-hero-secondary:hover { background: rgb(255 255 255 / 0.2); color: #fff; border-color: #fff; }
#pyp-checker, #hoy-colombia { scroll-margin-top: 84px; }

/* Checker card: gradient header band, white body, small caps labels. */
.card-checker { padding: 0; overflow: hidden; }
.pyp-checker-head { background: linear-gradient(135deg, #1D4ED8, #4F46E5); color: #fff; padding: var(--space-8) var(--space-6) var(--space-6); text-align: center; }
.pyp-checker-head h2 { color: #fff; margin: 0; font-size: var(--text-2xl); text-align: center; overflow-wrap: break-word; }
.pyp-checker-accent { display: block; width: 56px; height: 4px; margin: var(--space-4) auto; background: var(--plate-yellow); border-radius: 999px; }
.pyp-checker-head p { color: #DBEAFE; margin: 0; font-size: var(--text-sm); text-align: center; }
.pyp-checker-body { padding: var(--space-6); }
.pyp-checker-form .field label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

/* Stats pill row (values computed from the verified seed — never invented). */
.pyp-stats-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-6) 0; }
.pyp-stat-pill { display: inline-flex; align-items: center; gap: var(--space-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-full); box-shadow: var(--shadow-sm); padding: var(--space-2) var(--space-4); font-size: var(--text-sm); font-weight: 700; color: var(--text); }
.pyp-stat-pill .num { color: var(--primary); }

/* Today grid: 3 columns on desktop, yellow top accent, title + pill header row. */
.pyp-today-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
@media (min-width: 768px) { .pyp-today-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .pyp-today-grid { grid-template-columns: 1fr 1fr 1fr; } }
.pyp-city-card { border-top: 4px solid var(--plate-yellow); box-shadow: var(--shadow-md); }
.pyp-city-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.pyp-city-head h3 { margin-top: 0; }
.pyp-city-head .badge { flex-shrink: 0; }

/* Footer: pale bottom bar for the legal disclaimer. */
.pyp-footer-bar { background: var(--bg-subtle); border-top: 1px solid var(--border); padding: var(--space-6) 0; }
.pyp-footer-bar p { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
.pyp-footer-bar p:last-child { margin-bottom: 0; }
.pyp-footer-bar strong { color: var(--text); }

/* ---------- v1.4.0: full-width homepage (no sidebar) + explainer ---------- */
.pyp-layout-full { grid-template-columns: 1fr; }
.pyp-validity-note { color: var(--text-muted); font-size: var(--text-sm); margin: var(--space-4) 0 0; }

/* v1.4.17: "Consulta por ciudad y día" (H4 crawl links) had no CSS at all —
   raw bullets + 40px browser indent. Pills now, same pattern as .pyp-more-pills. */
.pyp-day-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.pyp-day-links li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.pyp-day-links a { display: inline-block; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface); color: var(--text); font-weight: 600; font-size: var(--text-sm); text-decoration: none; }
.pyp-day-links a:hover { border-color: var(--primary); color: var(--primary); }
.pyp-explainer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); margin: var(--space-8) 0; }
@media (min-width: 768px) and (max-width: 899px) { .pyp-explainer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .pyp-explainer-grid { grid-template-columns: 1fr 1fr 1fr; } }
/* Info cards (explainer + verificación): eyebrow pill + title + text, equal
   heights via grid stretch, calm look — no hover gimmicks on content cards. */
.pyp-info-card { display: flex; flex-direction: column; gap: var(--space-2); }
.pyp-info-card .eyebrow { align-self: flex-start; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); background: var(--primary-subtle-bg); border-radius: var(--radius-full); padding: 4px 12px; }
.pyp-info-card h3 { margin: 0; }
.pyp-info-card p { margin: 0; }
/* Cross-city vehicle category cards (homepage #categorias): buttons that
   act as checker shortcuts; count in primary blue, note muted. */
.pyp-vehicle-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); margin: var(--space-6) 0 var(--space-8); }
@media (min-width: 768px) and (max-width: 1023px) { .pyp-vehicle-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .pyp-vehicle-grid { grid-template-columns: repeat(4, 1fr); } }
.pyp-vehicle-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.pyp-vehicle-card:hover { border-color: var(--primary); }
.pyp-vehicle-icon { font-size: 2rem; line-height: 1; margin-bottom: var(--space-2); }
.pyp-vehicle-card:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pyp-vehicle-name { font-weight: 700; font-size: var(--text-lg); }
.pyp-vehicle-count { font-weight: 700; color: var(--primary); font-size: var(--text-sm); }
.pyp-vehicle-note { color: var(--text-muted); font-size: var(--text-sm); }

/* City archive grid — 1 / 2 / 3 columns, cards with dept + today line */
.pyp-archive-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 768px) { .pyp-archive-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .pyp-archive-grid { grid-template-columns: repeat(3, 1fr); } }
.pyp-archive-card h3 { margin-top: 0; margin-bottom: 0; }
.pyp-archive-dept { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-1); margin-bottom: var(--space-3); }
.pyp-archive-line { color: var(--text-muted); font-size: var(--text-sm); }
