/* /ask.html — Ask v2 (diseño de Codex aprobado 03/10, portado por el hilo chat). Móvil primero (390 px), escritorio centrado a 760 px, claro/oscuro, RTL con propiedades lógicas.
   Sin fuentes externas: tipografía del sistema. Nombres de clases/ids heredados de site/ask.css donde existen. */
:root {
  --bg: #f6f3ec; --bg-glass: rgba(246, 243, 236, .86); --surface: #fffefb; --ink: #1b1d1c; --muted: #5a5e5c; --line: #e4dfd3;
  --accent: #0f6b57; --accent-strong: #0b5546; --accent-ink: #ffffff; --accent-soft: #e4efe8; --accent-line: #b9d4c8;
  --user: #e2ede6; --warn: #fdf0c8; --warn-ink: #573a00; --warn-line: #d9a93a; --focus: #0f6b57;
  --sk: #ece8de; --sk-hi: #f6f3ec;
  --radius: 18px; --shadow: 0 1px 2px rgba(60, 45, 15, .05), 0 6px 22px rgba(60, 45, 15, .06); --shadow-sm: 0 1px 2px rgba(60, 45, 15, .05);
  --nav-h: 57px; --composer-h: 132px;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141513; --bg-glass: rgba(20, 21, 19, .86); --surface: #1d1f1d; --ink: #ecebe6; --muted: #a9aca7; --line: #303330;
    --accent: #5cc6a8; --accent-strong: #84d8bf; --accent-ink: #0b1f19; --accent-soft: #1b322b; --accent-line: #2f5a4c;
    --user: #22342d; --warn: #3b3114; --warn-ink: #f6e6b5; --warn-line: #9a7a25; --focus: #84d8bf;
    --sk: #262926; --sk-hi: #30332f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45); --shadow-sm: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
html[lang="ur"] body { font-family: "Noto Nastaliq Urdu", var(--body); }
html[lang="ur"] :is(.lede, .answer, .hero-context, .suggest-sub, .mic-note p) { line-height: 1.95; }
a { color: var(--accent); }
button, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 760px; margin-inline: auto; padding-inline: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- barra ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: var(--bg-glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid transparent; transition: border-color .2s; }
body.has-thread .nav { border-bottom-color: var(--line); }
.nav-row { display: flex; align-items: center; gap: 8px; min-height: 56px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.mark { width: 26px; height: 26px; flex: none; }
.mark rect { fill: var(--accent); }
.mark path { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.beta-tag { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.nav-spacer { flex: 1; }
.lang-host { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding-inline: 11px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: .03em; }
.lang-host .ico { width: 18px; height: 18px; color: var(--muted); }
.lang-host select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.lang-host:hover { border-color: var(--accent-line); }
.lang-host:has(select:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
@supports not selector(:has(*)) { .lang-host:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; } }

.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn.small { width: 32px; height: 32px; }
.icon-btn.small .ico { width: 18px; height: 18px; }
#new-chat { border: 1px solid var(--line); background: var(--surface); width: 40px; height: 40px; color: var(--ink); }

/* ---------- pantalla inicial ---------- */
.ask { display: flex; flex-direction: column; gap: 18px; padding-block: 24px 40px; }
.intro h1 { margin: 8px 0 8px; font-size: clamp(31px, 8.6vw, 48px); line-height: 1.07; font-weight: 780; letter-spacing: -0.028em; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); font-size: 17px; }
html[dir="rtl"] :is(.intro h1, .beta-tag, .logo) { letter-spacing: 0; }

.examples { display: flex; flex-direction: column; gap: 14px; }
.suggest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 116px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); text-align: start; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.suggest:hover { border-color: var(--accent-line); box-shadow: var(--shadow); transform: translateY(-1px); }
.suggest-ico { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.suggest-title { font-size: 15px; font-weight: 700; line-height: 1.25; }
.suggest-sub { font-size: 13px; line-height: 1.35; color: var(--muted); }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 12px; margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); text-align: center; }
.trust-label { flex-basis: 100%; font-weight: 650; }
.trust-item { white-space: nowrap; }
.trust a { color: var(--muted); text-underline-offset: 2px; }

.browse h2 { margin: 10px 0 10px; color: var(--muted); font-size: 12.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
html[dir="rtl"] .browse h2 { letter-spacing: 0; }
.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.topics a { display: flex; align-items: center; gap: 10px; height: 100%; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.25; text-decoration: none; transition: border-color .15s; }
.topics a:hover { border-color: var(--accent-line); }
.topics .ico { width: 20px; height: 20px; color: var(--accent); }
@media (min-width: 720px) { .topics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- compositor ---------- */
.composer { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.box { display: flex; align-items: flex-end; gap: 2px; min-height: 60px; padding: 7px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow); }
#q { flex: 1; min-width: 0; min-height: 44px; max-height: 160px; padding: 10px 6px; border: 0; background: transparent; resize: none; font-size: 17px; line-height: 1.4; color: var(--ink); }
#q::placeholder { color: var(--muted); opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#q:focus-visible { outline: none; }
.send-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: background-color .15s; }
.send-btn:hover { background: var(--accent-strong); }
.send-btn .ico { stroke-width: 2.2; }
.ai-notice { margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.4; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.ai-notice a { color: inherit; text-underline-offset: 2px; }
.mic-note { display: flex; align-items: flex-start; gap: 10px; padding: 10px 6px 10px 12px; padding-inline: 12px 6px; border: 1px solid var(--accent-line); border-radius: 14px; background: var(--accent-soft); font-size: 14px; line-height: 1.45; }
.mic-note > .ico { width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }
.mic-note p { flex: 1; margin: 0; }
.mic-note .icon-btn { margin-block: -5px; color: var(--ink); }

/* Conversación: título/sugerencias fuera, compositor fijo con blur y safe-area; el hilo reserva su alto real (--composer-h, por ResizeObserver). */
.ask.has-thread { gap: 0; padding-block: 16px 0; }
.ask.has-thread .composer { position: fixed; inset-inline: 0; bottom: 0; z-index: 25; gap: 6px; padding: 10px 16px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg-glass); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
.ask.has-thread .composer > * { width: 100%; max-width: 728px; margin-inline: auto; }
.ask.has-thread .box { min-height: 56px; box-shadow: var(--shadow-sm); }

/* ---------- hilo ---------- */
.thread { display: flex; flex-direction: column; gap: 32px; }
.thread:empty { display: none; }
.ask.has-thread .thread { padding-bottom: calc(var(--composer-h) + 16px); }
.msg { display: flex; flex-direction: column; gap: 12px; max-width: 100%; scroll-margin-top: calc(var(--nav-h) + 12px); }
.msg.enter { animation: rise .28s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.msg.user { align-self: flex-end; max-width: 85%; }
.msg.user .bubble { padding: 10px 15px; border-radius: 20px; border-end-end-radius: 6px; background: var(--user); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.assistant { gap: 14px; }
.who { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; font-weight: 650; }
.who .mark { width: 22px; height: 22px; }
.lang-note { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 12.5px; }
.lang-note .ico { width: 16px; height: 16px; }

/* 1) tarjeta respuesta */
.card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.hero-card { padding: 18px 18px 17px; background: linear-gradient(165deg, var(--accent-soft) 0%, var(--surface) 58%); }
.hero-card.historical { border-inline-start: 5px solid var(--warn-line); background: var(--surface); }
.hist { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 5px 11px 5px 9px; padding-inline: 9px 11px; border: 1px solid var(--warn-line); border-radius: 999px; background: var(--warn); color: var(--warn-ink); font-size: 12.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
html[dir="rtl"] .hist { letter-spacing: 0; }
.hist .ico { width: 16px; height: 16px; stroke-width: 2.2; }
.hero-kicker { margin: 0 0 6px; color: var(--muted); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.hero-kicker strong { color: var(--ink); }
.hero-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin: 0; line-height: 1.04; }
.hero-value .amt { font-size: clamp(42px, 12vw, 60px); font-weight: 780; letter-spacing: -0.03em; font-variant-numeric: tabular-nums lining-nums; }
.hero-value .cur { color: var(--accent); font-size: .4em; font-weight: 750; letter-spacing: .02em; }
.hero-value .per { color: var(--muted); font-size: 18px; font-weight: 600; }
.hero-sub { margin: 10px 0 0; font-size: 16px; font-weight: 650; }
.hero-context { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* 2) texto corto */
.answer { max-width: 62ch; margin: 0; font-size: 16.5px; line-height: 1.55; overflow-wrap: anywhere; }

/* 3) tarjeta de datos */
.card h3 { margin: 0; padding: 14px 16px 2px; font-size: 15px; font-weight: 750; }
.card .caption { margin: 0; padding: 0 16px 10px; color: var(--muted); font-size: 13px; }
.card ol { margin: 0; padding: 0; list-style: none; }
.card li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.card .label { min-width: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.card .label a { color: inherit; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 3px; }
.card .label a:hover { color: var(--accent); text-decoration-color: currentColor; }
.card .value { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.card .value .cur { color: var(--muted); font-size: .8em; font-weight: 650; }
.card .value.unknown { color: var(--muted); font-weight: 500; }
.card .note { grid-column: 1; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.card .per { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 12px; text-align: end; white-space: nowrap; }
.card .more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px; padding: 12px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--accent); font-size: 14px; font-weight: 700; cursor: pointer; }
.card .more:hover { background: var(--accent-soft); }
.card .more .ico { width: 18px; height: 18px; transition: transform .2s; }
.card .more[aria-expanded="true"] .ico { transform: rotate(180deg); }

/* 4) fuente */
.source { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.source-pill { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-size: 13px; line-height: 1.4; text-decoration: none; transition: border-color .15s; }
.source-pill:hover { border-color: var(--accent); }
.source-pill > .ico { width: 18px; height: 18px; color: var(--accent); }
.source-pill > .ext { width: 14px; height: 14px; color: var(--muted); }
.source-pill strong { font-weight: 750; }
.hist-inline { padding: 0 6px; border-radius: 6px; background: var(--warn); color: var(--warn-ink); font-weight: 750; }
.source-more summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 2px 4px; color: var(--muted); font-size: 13px; cursor: pointer; list-style: none; }
.source-more summary::-webkit-details-marker { display: none; }
.source-more summary .ico { width: 16px; height: 16px; }
.source-more summary:hover { color: var(--ink); }
.source-more dl { margin: 6px 0 0; padding: 4px 14px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 13px; line-height: 1.45; }
.source-more dt { margin-top: 9px; color: var(--muted); font-size: 12px; font-weight: 650; }
.source-more dd { margin: 1px 0 0; overflow-wrap: anywhere; }
@media (min-width: 560px) {
  .source-more dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; padding: 12px 14px; }
  .source-more dt, .source-more dd { margin: 0; }
}

/* 5) seguimientos y 6) comparación completa */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--surface); color: var(--accent); font-size: 14px; font-weight: 650; line-height: 1.3; text-align: start; cursor: pointer; transition: background-color .15s; }
.chip:hover { background: var(--accent-soft); }
.full { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 40px; color: var(--accent); font-size: 15px; font-weight: 700; text-decoration: none; }
.full:hover { text-decoration: underline; text-underline-offset: 3px; }
.full .ico { width: 18px; height: 18px; stroke-width: 2.2; }

/* Carga: esqueleto de la tarjeta respuesta + estado */
.status { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 14px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.skeleton { padding: 18px; }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--sk) 25%, var(--sk-hi) 50%, var(--sk) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.sk-kicker { width: 55%; height: 14px; }
.sk-value { width: 62%; height: 48px; margin-top: 12px; border-radius: 12px; }
.sk-sub { width: 40%; height: 14px; margin-top: 14px; }
.sk-lines { display: flex; flex-direction: column; gap: 10px; }
.sk-lines .sk { height: 12px; }
.sk-lines .sk:nth-child(2) { width: 92%; }
.sk-lines .sk:nth-child(3) { width: 68%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (min-width: 720px) {
  .ask { padding-top: 48px; gap: 22px; }
  .lede { font-size: 18px; }
  .suggest { min-height: 124px; padding: 16px; }
  .hero-card { padding: 22px 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .suggest:hover { transform: none; }
}

/* Director review: a collapsed answer should keep its amount and dated source together.
   Compact the conversation, retaining the large number and the comfortable initial screen. */
.ask.has-thread { padding-top: 10px; }
.has-thread .thread { gap: 16px; }
.has-thread .msg { scroll-margin-top: 0; } /* html already reserves the sticky nav. */
.has-thread .msg.assistant { gap: 8px; }
.has-thread .who { font-size: 12px; }
.has-thread .who .mark { width: 18px; height: 18px; }
.has-thread .bubble { font-size: 14.5px; line-height: 1.4; }
.has-thread .hero-card { padding: 13px 15px; }
.has-thread .hero-kicker { font-size: 13px; line-height: 1.3; margin-bottom: 5px; }
.has-thread .hero-sub { margin-top: 6px; font-size: 15px; }
.has-thread .hero-context { margin-top: 2px; font-size: 13px; line-height: 1.4; }
.has-thread .hist { margin-bottom: 8px; padding: 4px 8px; font-size: 11.5px; }
.has-thread .answer { font-size: 14.5px; line-height: 1.4; }
.has-thread .card h3 { padding: 9px 14px 5px; font-size: 13px; line-height: 1.3; }
.has-thread .card .caption { padding: 0 14px 6px; font-size: 12px; line-height: 1.35; }
.has-thread .card li { padding: 8px 14px; gap: 1px 10px; }
.has-thread .card .label, .has-thread .card .value { font-size: 14px; line-height: 1.35; }
.has-thread .card .note, .has-thread .card .per { font-size: 11.5px; line-height: 1.35; }
.has-thread .card .more { min-height: 36px; padding: 8px; font-size: 13px; }
.has-thread .source { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: start; gap: 6px; }
.has-thread .source-pill { width: 100%; padding: 7px 10px; font-size: 12.5px; line-height: 1.35; }
.has-thread .source-more:not([open]) summary { font-size: 0; width: 28px; min-height: 36px; padding: 3px; }
.has-thread .source-more:not([open]) summary .ico { width: 20px; height: 20px; }
.has-thread .source-more[open] { grid-column: 1 / -1; }
.has-thread .chips { gap: 6px; }
.has-thread .chip { min-height: 36px; padding: 6px 10px; font-size: 13.5px; }
.has-thread .full { min-height: 28px; font-size: 14px; }
#q:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-radius: 10px; }

/* ---------- porte a producción (hilo chat): piezas que el prototipo no tenía ---------- */
.badge { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--warn); color: var(--warn-ink); font-size: 14px; }
.error { margin: 0; padding: 10px 12px; border: 1px solid var(--warn-line); border-radius: 12px; background: var(--warn); color: var(--warn-ink); font-size: 14px; }
.card .notice { margin: 0 14px 10px; padding: 6px 10px; border-radius: 10px; background: var(--warn); color: var(--warn-ink); font-size: 13px; }
.card .paused { margin: 8px 16px 14px; font-size: 14px; }
.card .paused strong { display: inline-block; margin-inline-end: 6px; padding: 1px 8px; border-radius: 999px; background: var(--warn); color: var(--warn-ink); font-size: 12px; }
.hero-delta { margin: 6px 0 0; color: var(--muted); font-size: 14px; font-weight: 650; }
.fallback-link { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.photo-preview { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.photo-preview img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.msg.user img { max-width: 180px; max-height: 180px; border-radius: 14px; align-self: flex-end; object-fit: cover; }
.status.after-text::before { display: none; }

/* Tabla completa desplegada («Show all»): fuente + período arriba, filtro mínimo, encabezados ordenables (table-sort.mjs). */
.table-wrap { border-top: 1px solid var(--line); }
.table-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 14px; }
.table-source { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.table-source .hist-inline { margin-inline-end: 4px; }
.table-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.table-filter select { min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.full-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.full-table th, .full-table td { padding: 8px 12px; border-top: 1px solid var(--line); text-align: start; vertical-align: top; }
.full-table th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.full-table td.num, .full-table th.num { text-align: end; white-space: nowrap; }
.full-table td a { color: inherit; text-underline-offset: 3px; }
.full-table tr[hidden] { display: none; }
.table-count { margin: 0; padding: 6px 14px 10px; color: var(--muted); font-size: 12px; }
@media (max-width: 560px) {
  .full-table .minor { display: none; }
  .full-table { font-size: 12.5px; }
  .full-table th, .full-table td { padding: 7px 8px; }
}

/* Consentimiento (como las alertas: casilla sin marcar, enlace a privacidad). */
.consent { position: fixed; inset: 0; z-index: 40; display: grid; place-items: end center; padding: 16px; background: rgba(0, 0, 0, .45); }
.consent-card { width: 100%; max-width: 520px; padding: 18px; border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.consent-card h2 { margin: 0 0 8px; font-size: 18px; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.consent-check input { min-width: 20px; min-height: 20px; margin-top: 3px; accent-color: var(--accent); }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.btn.ghost { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
@media (min-width: 640px) { .consent { place-items: center; } }

/* Encabezados ordenables: ask.mjs llama a enhanceTable() directo (las tablas aparecen después de la carga), así que el <style>
   que table-sort.mjs inyecta sólo en enhanceAll() no está; mismas reglas, acotadas a la tabla desplegada. */
.full-table th[data-sort] { padding: 0; }
.full-table .ts-btn { all: unset; box-sizing: border-box; display: flex; gap: 6px; align-items: center; justify-content: inherit; width: 100%;
  padding: 8px 12px; cursor: pointer; font: inherit; color: inherit; text-align: inherit; }
.full-table th.num .ts-btn { justify-content: flex-end; }
.full-table .ts-btn:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
.full-table .ts-ind { font-size: .75em; opacity: .55; }
.full-table th[aria-sort="ascending"] .ts-ind, .full-table th[aria-sort="descending"] .ts-ind { opacity: 1; color: var(--accent); }
@media (max-width: 560px) { .full-table .ts-btn { padding: 7px 8px; } }
