/* ==========================================================================
   PIAM · sitio público (piam.cl) · Sistema «Órbita en blanco» v2 · 26-oct-2026
   Fuente: el mockup aprobado por Martín el 23-oct
   (Desktop/Updates piam/sesion-2026-10-23/rediseno/v2/sistema.css + las 4 páginas).
   Claro y oscuro por la preferencia del sistema, sin botón (26-oct): los colores salen de los
   tokens de sitio.css (2b oscuro, 2c islas claras), nunca fijos. El logo es el sprite liviano
   static/logo-sitio.png. Sora (titulares) + Inter (texto) + IBM Plex Mono (rótulos) desde
   Google Fonts (ya en la CSP), nunca SF Pro.
   Guías (/como-licitar, /compra-agil): la composición de 40f6d66 (no tienen mockup; quedan como estaban).
   Cambiar este archivo = subir ?v= en _sitio_head.html (Cloudflare lo cachea).
   REGLA 375: toda caja con scroll lateral es position:relative (test_landing S14) y toda
   grilla usa minmax(0, …) (S15).
   ========================================================================== */

.sitio main { display: block; }
.sitio strong, .sitio b { font-weight: var(--p-semi); }
/* --- 25c. Titulares de sección del sitio (rótulo + H2 en dos tonos) ---------- */
.section-label, .rotulo-seccion {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--fuente-mono); font-size: var(--t-s-rotulo); line-height: var(--a-s-rotulo);
  font-weight: var(--p-medio); letter-spacing: .08em; text-transform: uppercase; color: var(--texto-3);
}
.section-label b { color: var(--tinta); font-weight: var(--p-medio); }
.section-title {
  font-family: var(--fuente-display); font-size: var(--t-s-h2); line-height: 1.08;
  letter-spacing: -.032em; font-weight: var(--p-medio); text-wrap: balance; color: var(--tinta);
}
.section-desc { color: var(--texto-2); max-width: var(--ancho-texto); }
.section-title .highlight, .page-title .highlight { color: var(--titular-2); }
.titulo-bloque { display: grid; gap: 18px; justify-items: start; margin-bottom: clamp(32px, 3.5vw, 56px); }
.titulo-bloque > * { min-width: 0; max-width: 100%; }
.titulo-bloque--centro { justify-items: center; text-align: center; }
.titulo-bloque--centro .section-label { justify-content: center; }
.titulo-bloque--centro .section-desc { margin-inline: auto; }
.lista-check { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lista-check > li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; min-width: 0; }
.lista-check .icono { width: 18px; height: 18px; margin-top: 5px; color: var(--verde); }
.lista-check strong { color: var(--tinta); }


/* --- 25k. CTA final (escena marino, una vez por página) --------------------------- */
.cierre__interior { display: grid; justify-items: center; gap: 24px; text-align: center; }
.cierre__interior > * { min-width: 0; max-width: 100%; }
.cierre__titulo { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4rem); line-height: 1.04; }
.cierre__titulo .linea { display: block; }
.cierre__texto { max-width: 40rem; color: var(--texto-2); }
.cierre__texto strong { color: var(--verde); }
.cierre__notas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 0; padding: 0; list-style: none; font-size: var(--t-s-nota); color: var(--texto-2); }
.cierre__notas li { display: inline-flex; align-items: center; gap: 8px; }
.cierre__notas .icono { width: 16px; height: 16px; color: var(--verde); }
.marino .boton--contorno { background-color: transparent; border-color: rgb(255 255 255 / .32); color: var(--tinta); box-shadow: none; }
.marino .boton--contorno:hover { border-color: rgb(255 255 255 / .6); color: var(--tinta); }
.marino .boton--lleno { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22), var(--sombra-1); }


/* --- 25l. Cabecera de las páginas internas (planes, buscador, contacto, guías) --- */
.page-wrap { width: min(100% - 2 * var(--margen-pagina), var(--ancho-sitio)); margin-inline: auto; padding-block: clamp(40px, 3vw + 16px, 72px) var(--ritmo); }
.page-wrap--angosta { width: min(100% - 2 * var(--margen-pagina), 58rem); }
.page-header { display: grid; gap: 20px; justify-items: center; text-align: center; margin-bottom: clamp(36px, 4vw, 56px); }
.page-header > * { min-width: 0; max-width: 100%; }
.page-header .section-label { justify-content: center; }
.page-title { font-family: var(--fuente-display); font-size: clamp(2.125rem, 1.1rem + 3vw, 3.5rem); line-height: 1.05; letter-spacing: -.04em; font-weight: var(--p-semi); text-wrap: balance; color: var(--tinta); }
.page-sub { max-width: 40rem; font-size: var(--t-s-entrada); line-height: var(--a-s-entrada); letter-spacing: var(--tr-s-entrada); color: var(--texto-2); }
.page-sub strong { color: var(--tinta); }
@media (max-width: 40em) { .page-sub { font-size: 1.125rem; line-height: 1.65; } }
.cta-final { display: grid; justify-items: center; gap: 18px; margin-top: clamp(48px, 5vw, 80px); padding: clamp(40px, 5vw, 72px) clamp(20px, 4vw, 56px); border-radius: var(--r-2xl); text-align: center; }
.cta-final > * { min-width: 0; max-width: 100%; }
.cta-final h2 { font-family: var(--fuente-display); font-size: clamp(1.75rem, 1.1rem + 2vw, 2.75rem); line-height: 1.08; letter-spacing: -.032em; font-weight: var(--p-medio); text-wrap: balance; }
.cta-final p { max-width: 36rem; color: var(--texto-2); }
.cta-final .btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.cta-final .btns > * { min-width: 0; }


/* --- 25p. Guías (/como-licitar, /compra-agil): lectura larga -------------------- */
.guia .page-header { margin-bottom: 8px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; width: 100%; max-width: 48rem; margin: 12px auto 0; border-radius: var(--r-l); overflow: hidden; background: var(--filete); box-shadow: 0 0 0 1px var(--filete); }
.stat-row > * { min-width: 0; }
.stat { display: grid; gap: 8px; padding: 22px 18px; background: var(--superficie); text-align: left; }
.stat .num { font-family: var(--fuente-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1; letter-spacing: -.04em; font-weight: var(--p-medio); color: var(--tinta); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .lbl { font-size: var(--t-s-nota); line-height: var(--a-s-nota); color: var(--texto-2); }
.toc { margin: clamp(36px, 4vw, 56px) 0 8px; padding: 24px 26px; border-radius: var(--r-l); background: var(--fondo); box-shadow: 0 0 0 1px var(--filete); }
.toc h2 { margin-bottom: 14px; font-family: var(--fuente-mono); font-size: var(--t-s-rotulo); line-height: var(--a-s-rotulo); font-weight: var(--p-medio); letter-spacing: .08em; text-transform: uppercase; color: var(--texto-3); }
.toc ol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 28px; margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc ol li { counter-increment: toc; min-width: 0; }
.toc ol li a { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--tinta); font-weight: var(--p-medio); text-decoration: none; }
.toc ol li a::before { content: counter(toc, decimal-leading-zero); flex: none; font-family: var(--fuente-mono); font-size: var(--t-pie); color: var(--texto-3); }
.toc ol li a:hover { color: var(--azul); }
.guia-section { padding-top: clamp(32px, 3vw, 48px); margin-top: clamp(32px, 3vw, 48px); border-top: 1px solid var(--filete); scroll-margin-top: 96px; }
.guia-section:first-of-type { border-top: 0; }
.sec-num { display: inline-block; margin-bottom: 12px; font-family: var(--fuente-mono); font-size: var(--t-s-rotulo); font-weight: var(--p-medio); letter-spacing: .08em; color: var(--texto-3); }
.guia-section h2 { margin-bottom: 14px; font-family: var(--fuente-display); font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.375rem); line-height: 1.1; letter-spacing: -.032em; font-weight: var(--p-medio); text-wrap: balance; }
.guia-section .lead { margin-bottom: 22px; font-size: var(--t-s-entrada); line-height: var(--a-s-entrada); letter-spacing: var(--tr-s-entrada); color: var(--texto-2); }
.guia-section h3 { margin: 26px 0 8px; font-size: var(--t-s-h4); line-height: var(--a-s-h4); font-weight: var(--p-semi); }
.guia-section p { margin-bottom: 14px; color: var(--texto-2); }
.guia-section strong { color: var(--tinta); }
.guia-section ul { display: grid; gap: 10px; margin: 4px 0 18px; padding: 0; list-style: none; }
.guia-section ul li { position: relative; padding-left: 24px; color: var(--texto-2); }
.guia-section ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--tinta); }
.guia-section a.enlace { font-weight: var(--p-semi); }
.dato, .aviso { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; padding: 16px 18px; border-radius: var(--r-m); background: var(--fondo); box-shadow: inset 2px 0 0 var(--tinta), 0 0 0 1px var(--filete); color: var(--tinta); }
.dato > *, .aviso > * { min-width: 0; }
.dato b { color: var(--tinta); }
.aviso { box-shadow: inset 2px 0 0 var(--plazo), 0 0 0 1px var(--filete); }
.aviso.tip { box-shadow: inset 2px 0 0 var(--verde), 0 0 0 1px var(--filete); }
.dato .ic, .aviso .ic { display: none; }   /* el emoji-ícono se reemplaza por el filete de color (tinta = dato, ámbar = ojo, verde = consejo) */
.pasos { margin: 8px 0 18px; counter-reset: paso; }
.paso { position: relative; margin-bottom: 16px; padding: 2px 0 2px 52px; counter-increment: paso; }
.paso::before { content: counter(paso, decimal-leading-zero); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--filete-fuerte); font-family: var(--fuente-mono); font-size: var(--t-pie); color: var(--tinta); }
.paso h3 { margin: 0 0 4px; }
.paso p { margin: 0; }
.tipo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; margin: 18px 0; border-radius: var(--r-l); overflow: hidden; background: var(--filete); box-shadow: 0 0 0 1px var(--filete); }
.tipo-grid > * { min-width: 0; }
.tipo { padding: 18px 20px; background: var(--superficie); }
.tipo.destacado { background: var(--fondo); box-shadow: inset 0 2px 0 var(--tinta); }
.tipo .nom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: var(--p-semi); color: var(--tinta); }
.tipo .chip { min-height: 22px; background: var(--verde-tinte); color: var(--verde); font-family: var(--fuente-mono); font-size: var(--t-micro); letter-spacing: .04em; text-transform: uppercase; }
.tipo p { margin: 0; font-size: var(--t-s-nota); line-height: var(--a-s-nota); }
.comp-scroll { position: relative; margin: 18px 0; overflow-x: auto; contain: inline-size; border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--filete); }
:is(.comp-scroll, .sub-timeline, .plans-grid) .visualmente-oculto { top: 0; left: 0; }
table.comp { width: 100%; min-width: 32.5rem; border-collapse: separate; border-spacing: 0; background: var(--superficie); font-size: var(--t-s-nota); line-height: 1.5; }
table.comp th, table.comp td { padding: 13px 16px; border-bottom: 1px solid var(--filete); text-align: left; vertical-align: top; }
table.comp thead th { background: var(--fondo); font-weight: var(--p-semi); color: var(--tinta); }
table.comp th[scope=row] { font-family: var(--fuente-mono); font-size: var(--t-pie); font-weight: var(--p-medio); color: var(--texto-2); white-space: nowrap; }
table.comp tr:last-child td, table.comp tr:last-child th { border-bottom: 0; }
table.comp td strong { color: var(--tinta); }
table.comp .col-ca { background: var(--fondo); }
.cta-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 34px 0; padding: 22px 26px; border-radius: var(--r-l); background: var(--fondo); box-shadow: 0 0 0 1px var(--filete); }
.cta-inline > * { min-width: 0; }
.cta-inline .txt { flex: 1 1 20rem; }
.cta-inline .txt b { display: block; margin-bottom: 4px; font-size: var(--t-s-h4); color: var(--tinta); }
.cta-inline .txt span { color: var(--texto-2); }
.cta-inline > a { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--r-pildora); background: var(--azul-relleno); color: var(--sobre-azul); font-weight: var(--p-semi); text-decoration: none; white-space: nowrap; box-shadow: var(--sombra-1), inset 0 1px 0 rgb(255 255 255 / .16); }
.cta-inline > a:hover { background: var(--azul-relleno-hover); color: var(--sobre-azul); }
.faq { margin: 8px 0 0; border-top: 1px solid var(--filete); }
.faq details { border-bottom: 1px solid var(--filete); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 0; font-size: 1.125rem; font-weight: var(--p-semi); letter-spacing: -.014em; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 16px; height: 16px; background: var(--texto-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--mov-medio) var(--curva);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 0 20px; max-width: var(--ancho-texto); color: var(--texto-2); }
.fuente-nota { max-width: 42rem; margin: 34px auto 0; font-size: var(--t-s-nota); line-height: var(--a-s-nota); color: var(--texto-2); text-align: center; }
@media (max-width: 40em) { .stat-row, .toc ol, .tipo-grid { grid-template-columns: minmax(0, 1fr); } }

/* Guías con color (Martín 26-oct: «que no sea tan monótono»): los fondos grises pasan a azul suave (#EEF3FC,
   el de las filas del Premium en el panel) con filete azulado, y los datos y avisos llevan su filete en azul.
   texto-2 sobre --fondo-azul 6,43:1 (oscuro 7,87). */
.toc, .dato, .aviso, .tipo.destacado, table.comp thead th, table.comp .col-ca, .cta-inline { background: var(--fondo-azul); }
.toc, .cta-inline { box-shadow: 0 0 0 1px var(--filete-azul); }
.dato, .aviso { box-shadow: inset 3px 0 0 var(--azul), 0 0 0 1px var(--filete-azul); }
.tipo.destacado { box-shadow: inset 0 2px 0 var(--azul); }
/* «Empieza aquí»: el tinte verde sobre --fondo-azul baja a 4,35:1; la chip va sobre la superficie con filete
   verde (verde sobre superficie 5,40:1 · oscuro 9,65) */
.tipo.destacado .chip { background: var(--superficie); box-shadow: inset 0 0 0 1px var(--verde-tinte); }

/* Plan móvil (26-oct), ítems 14 y 18. Teléfono: la tabla «Compra Ágil vs. licitación» apila cada fila (el concepto
   arriba y las dos columnas debajo; «Licitación pública» quedaba fuera de la pantalla sin pista; compra_agil.html
   lleva roles ARIA porque Safari pierde la semántica de tabla al cambiar el display). La cabecera de la guía se
   alinea a la izquierda y cada cifra va en una fila con su etiqueta (eran 3 cajas de 120 px). */
@media (max-width: 40em) {
  .comp-scroll { overflow: clip; contain: none; }          /* sigue position:relative (S14) */
  table.comp, table.comp thead, table.comp tbody { display: block; min-width: 0; }
  table.comp tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  table.comp thead th:first-child { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* oculta a la vista, no al lector */
  table.comp thead th { padding: 12px 14px; }
  table.comp th[scope=row] { grid-column: 1 / -1; padding: 14px 14px 6px; border-bottom: 0; white-space: normal; background: var(--superficie); }
  table.comp td { padding: 6px 14px 14px; }
  .stat { grid-template-columns: minmax(8.25rem, max-content) minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 14px 16px; }
  .stat .num { font-size: 1.375rem; white-space: nowrap; overflow-wrap: normal; }   /* «US$17.643M» en una línea */
  .guia .page-header { justify-items: start; text-align: left; }
  .guia .page-header .section-label { justify-content: flex-start; }
}
