/* contadorGESTOR · hoja de estilo
   Diseño oscuro con acento ámbar de Gestor Público.
   Tipografías servidas localmente: la app no consulta Internet. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0a0a0b;
  --surface: #111113;
  --surface-deep: #0c0c0e;
  --input: #08080a;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f4f2;
  --text-2: #d8d8da;
  --text-3: #a0a0a6;
  --muted: #8e8e93;
  --muted-2: #7c7c82;
  --accent: #f5c518;
  --accent-hover: #ffd84d;
  --on-accent: #141308;
  --danger-bg: rgba(220, 80, 60, 0.12);
  --danger-line: rgba(220, 80, 60, 0.4);
  --danger-text: #f0a79a;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
input, select, textarea, button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(245, 197, 24, 0.3); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Encabezado ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 40px;
  background: var(--bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
  display: block;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16.5px; font-weight: 700; letter-spacing: -0.025em; }
.brand-text strong span { color: var(--accent); }
.brand-text small { font-size: 11.5px; color: var(--muted); font-weight: 500; }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14.5px;
  font-weight: 500;
}
.topbar-nav a { color: #b4b4b8; }
.topbar-nav a:hover { color: var(--text); }
.topbar-nav a.is-current { color: var(--accent); }

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid rgba(245, 197, 24, 0.35);
  background: transparent;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.ghost-button:hover { background: rgba(245, 197, 24, 0.1); border-color: var(--accent); }

.cta-button {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13.5px;
  font-weight: 700;
}
.cta-button:hover { background: var(--accent-hover); color: var(--on-accent); }

/* ---------- Estructura ---------- */

main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 40px 72px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ---------- Portada ---------- */

.hero { padding-bottom: 8px; }

.hero-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: flex-start;
  padding: 7px 14px;
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.eyebrow.plain {
  border: 0;
  padding: 0;
  letter-spacing: 0.14em;
  font-size: 11px;
}

.hero h1 {
  margin: 0;
  font-size: 60px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 span { color: var(--accent); }

.hero p {
  margin: 0;
  max-width: 52ch;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--text-3);
}

/* ---------- Rejilla de trabajo ---------- */

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.primary-column,
.side-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

/* ---------- Tarjetas ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* Sin esto, la tabla de la ruta impone su ancho mínimo a toda la página. */
  min-width: 0;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.card-title { display: flex; gap: 14px; }
.card-title > div { display: flex; flex-direction: column; gap: 5px; }

.section-number {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  padding-top: 4px;
}

.card h2 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -0.028em; }
.card-title p { margin: 0; font-size: 14px; color: var(--muted); }

.law-badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.25);
  padding: 6px 11px;
  border-radius: 7px;
  white-space: nowrap;
}

/* ---------- Formulario ---------- */

form { display: flex; flex-direction: column; gap: 24px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small { font-size: 12px; color: var(--muted-2); }

.field input,
.field select,
.field textarea {
  background: var(--input);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  color-scheme: dark;
  width: 100%;
}
.field textarea {
  font-family: var(--mono);
  font-size: 13.5px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: rgba(245, 197, 24, 0.5); }
.field select:disabled { opacity: 0.45; cursor: not-allowed; }

.mode-fieldset { margin: 0; padding: 0; border: 0; }

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mode-switch label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-deep);
  cursor: pointer;
}
.mode-switch label:has(input:checked) {
  border-color: rgba(245, 197, 24, 0.5);
  background: rgba(245, 197, 24, 0.08);
}
.mode-switch input {
  accent-color: var(--accent);
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex: none;
}
.mode-switch span { display: flex; flex-direction: column; gap: 3px; }
.mode-switch b { font-size: 14.5px; font-weight: 600; }
.mode-switch small { font-size: 12.5px; color: var(--muted); }

.advanced-options {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  padding: 14px 16px;
  background: var(--surface-deep);
}
.advanced-options summary {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style: none;
}
.advanced-options summary::-webkit-details-marker { display: none; }
.advanced-options summary span { font-size: 14px; font-weight: 600; color: var(--accent); }
.advanced-options summary small { font-size: 12.5px; color: var(--muted-2); }
.advanced-body { margin-top: 14px; }

.form-error {
  padding: 11px 14px;
  border-radius: 9px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger-text);
  font-size: 13.5px;
}
.form-error[hidden] { display: none; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.primary-button {
  padding: 13px 26px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -0.01em;
}
.primary-button:hover { background: var(--accent-hover); }

.form-actions .ghost-button {
  padding: 13px 22px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-2);
  font-size: 14.5px;
}
.form-actions .ghost-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

/* ---------- Resultado ---------- */

.result-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(245, 197, 24, 0.3);
  min-width: 0;
}

.result-main {
  background: var(--accent);
  color: var(--on-accent);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.72;
}

.result-main h2 {
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}

/* Intl es-CL entrega "jueves, 3 de abril": solo la inicial va en mayuscula. */
.result-main h2::first-letter { text-transform: uppercase; }

.result-main p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  opacity: 0.8;
  max-width: 60ch;
}

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.result-actions button {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(20, 19, 8, 0.4);
  background: transparent;
  color: var(--on-accent);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.result-actions button:hover { background: rgba(20, 19, 8, 0.1); }

.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.result-metrics div {
  background: var(--surface);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.result-metrics small { font-size: 12px; color: var(--muted); }
.result-metrics strong { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }

/* ---------- Ruta ---------- */

.route-card { padding: 26px 0 20px; gap: 18px; }
.route-card .card-heading { padding: 0 28px; }

.route-filter {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 9px;
  background: var(--input);
  border: 1px solid var(--line);
}
.route-filter button {
  padding: 7px 13px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  background: transparent;
  color: var(--text-3);
}
.route-filter button:hover { color: var(--text); }
.route-filter button.is-active { background: var(--accent); color: var(--on-accent); }

.table-wrap { max-height: 460px; overflow: auto; min-width: 0; }

.route-card table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.route-card thead tr {
  position: sticky;
  top: 0;
  background: var(--surface-deep);
  z-index: 1;
}

.route-card th {
  text-align: left;
  padding: 11px 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.route-card th:first-child { padding-left: 28px; }
.route-card th:last-child { padding-right: 28px; padding-left: 20px; }
.route-card th.num { text-align: right; }

.route-card td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}
.route-card td:first-child {
  padding-left: 28px;
  font-family: var(--mono);
  font-size: 13px;
  color: #e4e4e6;
  white-space: nowrap;
}
.route-card td:nth-child(2) { color: var(--text-3); text-transform: capitalize; }
.route-card td:nth-child(4) {
  text-align: right;
  font-family: var(--mono);
  color: var(--accent);
}
.route-card td:last-child { padding-right: 28px; padding-left: 20px; }

.status-pill {
  display: inline-flex;
  padding: 3.5px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill.counted { background: var(--accent); color: var(--on-accent); }
.status-pill.excluded { background: rgba(255, 255, 255, 0.07); color: #b4b4b8; }

.empty-cell {
  text-align: center;
  padding: 34px 28px !important;
  color: var(--muted-2);
  font-size: 14px;
}

.table-note { margin: 0; padding: 0 28px; font-size: 12.5px; color: var(--muted-2); }

/* ---------- Calendario ---------- */

.calendar-card { gap: 18px; }
.calendar-card h2 { font-size: 19px; letter-spacing: -0.026em; }

.year-picker select {
  background: var(--input);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color-scheme: dark;
}

.calendar-list {
  display: flex;
  flex-direction: column;
  max-height: 340px;
  overflow: auto;
}

.calendar-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.calendar-item:last-child { border-bottom: 0; }

.calendar-date {
  display: flex;
  gap: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  min-width: 54px;
  flex: none;
}
.calendar-date small { text-transform: lowercase; }

.calendar-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.calendar-copy b {
  font-size: 13.5px;
  font-weight: 500;
  color: #d0d0d4;
}
.calendar-copy small {
  font-size: 11px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-tag {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.28);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: lowercase;
  vertical-align: middle;
}

/* ---------- Reglas ---------- */

.rules-card { gap: 16px; }
.rules-card h2 { font-size: 19px; letter-spacing: -0.026em; }

.rules-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rules-list li { display: flex; gap: 13px; }
.rules-list li > span {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.rules-list li > div { display: flex; flex-direction: column; gap: 3px; }
.rules-list b { font-size: 14px; font-weight: 600; }
.rules-list small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.source-link { font-size: 13.5px; font-weight: 600; }

/* ---------- Cobertura ---------- */

.coverage-card {
  background: var(--surface-deep);
  border-color: rgba(245, 197, 24, 0.22);
  gap: 14px;
}
.coverage-card h2 { font-size: 19px; letter-spacing: -0.026em; }
.coverage-card > p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

.coverage-status { display: flex; align-items: center; gap: 10px; }
.coverage-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.16);
  flex: none;
}
.coverage-status span { display: flex; flex-direction: column; }
.coverage-status small { font-size: 11px; color: var(--muted); }
.coverage-status b { font-size: 13.5px; font-weight: 600; }

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.coverage-grid div {
  background: var(--surface);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.coverage-grid small { font-size: 11px; color: var(--muted); }
.coverage-grid b { font-size: 15px; font-weight: 700; }

.sources-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.sources-details ul {
  margin: 12px 0 0;
  padding: 0 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sources-details li { font-size: 12.5px; color: var(--muted); }
.sources-details a { font-size: 12.5px; }

/* ---------- Pie ---------- */

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 32px 40px;
  display: flex;
  gap: 24px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1320px;
  margin: 0 auto;
}
.footer-brand { font-size: 15px; font-weight: 700; letter-spacing: -0.025em; }
.footer-brand span { color: var(--accent); }
footer p {
  margin: 0;
  max-width: 70ch;
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

/* ---------- Aviso flotante ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--accent);
  color: var(--on-accent);
  padding: 11px 20px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Adaptación a pantallas menores ---------- */

@media (max-width: 1180px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 48px; }
}

@media (max-width: 900px) {
  .topbar-nav { display: none; }
  main { padding: 32px 20px 56px; }
  .topbar { padding: 14px 20px; }
  footer { padding: 28px 20px; }
  .hero h1 { font-size: 38px; }
  .hero p { font-size: 16px; }
  .form-grid,
  .mode-switch { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 22px; }
  .route-card { padding: 22px 0 18px; }
  .route-card .card-heading,
  .table-note { padding: 0 22px; }
  .route-card th:first-child,
  .route-card td:first-child { padding-left: 22px; }
  .route-card th:last-child,
  .route-card td:last-child { padding-right: 22px; }
  .card-heading { flex-direction: column; align-items: stretch; }
  .result-main h2 { font-size: 30px; }
}

@media (max-width: 560px) {
  .cta-button { display: none; }
  .result-metrics,
  .coverage-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Impresión ---------- */

@media print {
  .topbar,
  .route-filter,
  .form-actions,
  .result-actions,
  .advanced-options,
  .toast,
  .skip-link { display: none !important; }

  html, body { background: #fff; color: #111; }
  main { padding: 0; max-width: none; gap: 20px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .card,
  .coverage-card { background: #fff; border-color: #ccc; break-inside: avoid; }
  .card h2,
  .hero h1 { color: #111; }
  .hero h1 span,
  .section-number,
  .eyebrow { color: #8a6d00; }
  .result-main { background: #fff; color: #111; border-bottom: 1px solid #ccc; }
  .result-metrics div { background: #fff; }
  .result-metrics strong,
  .card-title p,
  .table-note { color: #333; }
  .table-wrap,
  .calendar-list { max-height: none; overflow: visible; }
  .route-card td,
  .route-card th { color: #333; }
  .status-pill.counted { background: #eee; color: #111; }
  .status-pill.excluded { background: #fff; color: #555; border: 1px solid #ccc; }
}


/* --- Navegacion del pie, agregada al publicar en gestorpublico.cl --- */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin: 10px 0 4px;
}
.footer-nav a {
  color: inherit;
  opacity: .78;
  text-decoration: none;
  font-size: .86rem;
}
.footer-nav a:hover,
.footer-nav a:focus-visible { opacity: 1; text-decoration: underline; }

/* --- Contenido propio: guia, preguntas frecuentes y llamada a la accion --- */
.prosa { display: flex; flex-direction: column; gap: 16px; max-width: 74ch; }
.prosa p { margin: 0; font-size: 16px; line-height: 1.62; color: var(--text-3); }
.prosa strong { color: var(--text); font-weight: 700; }
.prosa h3 {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}
.prosa-lista { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.prosa-lista li { font-size: 16px; line-height: 1.58; color: var(--text-3); }
.prosa-lista li::marker { color: var(--accent); font-weight: 700; }
.prosa-nota {
  border-left: 2px solid rgba(245, 197, 24, 0.4);
  padding-left: 14px;
  font-size: 15px !important;
}

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.012);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-family: var(--mono);
  flex: none;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  margin: 12px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-3);
  max-width: 72ch;
}

.cta-card {
  gap: 22px;
  border-color: rgba(245, 197, 24, 0.3);
  background:
    linear-gradient(180deg, rgba(245, 197, 24, 0.055), rgba(245, 197, 24, 0)) ,
    var(--surface);
}
.cta-card h2 { margin: 10px 0 0; font-size: 25px; font-weight: 800; letter-spacing: -0.03em; }
.cta-card p { margin: 12px 0 0; font-size: 16.5px; line-height: 1.58; color: var(--text-3); max-width: 68ch; }
.cta-acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-acciones a { text-decoration: none; }

/* En el telefono la app escondia el boton de contacto y el menu: quien
   llegaba desde Google se quedaba con una calculadora sin ningun camino
   visible hacia los cursos. Se conserva el boton, mas compacto. */
@media (max-width: 560px) {
  .cta-button { display: inline-flex; padding: 8px 13px; font-size: 12.5px; }
  .topbar { gap: 10px; }
  .cta-card h2 { font-size: 21px; }
  .cta-acciones a { flex: 1 1 100%; justify-content: center; text-align: center; }
}
