/* ============================================================
   AuditBnB EN — editorial / data pages
   Sirve a /en/markets/* y /en/blog/*.

   Tokens replicados de /v2/shared/styles.css a propósito: estas páginas son
   estáticas y viven fuera del bundle de la app, así que no deben romperse
   cuando el CSS de producto cambie. Si los tokens de marca cambian, se
   actualizan en los dos lados — son 12 líneas.

   Dataviz: una sola serie (precio) => un solo tono para todas las barras.
   Nada de rampa de valor sobre categorías nominales. El valor SIEMPRE está
   como texto junto a su barra, así que ningún dato queda detrás de un hover.
   ============================================================ */

:root {
  --ink: #0E0F0C;
  --ink-2: #2A2B27;
  --muted: #6A6B65;
  --muted-2: #9A9B95;
  --line: #E8E6DF;
  --line-2: #D8D5CB;
  --bg: #FAF8F3;
  --bg-2: #F2EFE6;
  --card: #FFFFFF;
  --accent: #C74232;
  --accent-ink: #9F2E1E;
  --accent-soft: #FBE7DF;
  --good: #1F6F4A;
  --radius: 10px;
  --radius-lg: 16px;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-2);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------------------------------------------------------- chrome */
.stripe { height: 4px; background: var(--accent); }

nav.top { position: sticky; top: 0; z-index: 50; background: rgba(250,248,243,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
nav.top .inner { max-width: 980px; margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-serif); font-size: 21px; color: var(--ink); text-decoration: none; }
.logo-mark { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); }
.nav-cta { background: var(--ink); color: var(--bg); padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav-cta:hover { background: var(--ink-2); color: var(--bg); }

/* ---------------------------------------------------------- article */
main { max-width: 780px; margin: 0 auto; padding: 40px 24px 8px; }
main.wide { max-width: 980px; }

.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb .sep { color: var(--muted-2); margin: 0 7px; }

.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; }

h1 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(34px, 5.2vw, 52px); line-height: 1.06; letter-spacing: -.02em; color: var(--ink); margin: 0 0 16px; }
h1 em { font-style: italic; color: var(--accent); }

.lead { font-size: 20px; line-height: 1.5; color: var(--ink-2); margin: 0 0 28px; max-width: var(--measure); }
.lead strong { color: var(--ink); font-weight: 600; }

h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -.015em; color: var(--ink); margin: 52px 0 12px; scroll-margin-top: 80px; }
h3 { font-size: 19px; font-weight: 600; color: var(--ink); margin: 32px 0 8px; letter-spacing: -.005em; }
p { margin: 0 0 18px; max-width: var(--measure); }
ul, ol { margin: 0 0 20px; padding-left: 22px; max-width: var(--measure); }
li { margin-bottom: 7px; }
strong { color: var(--ink); font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

/* ---------------------------------------------------------- stat tiles
   Contrato del skill: label en sentence case, valor en SANS semibold
   (una serif en la cifra hero lee como decoración fuera de marca) y cifras
   proporcionales — tabular-nums sólo en columnas que se alinean. */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0 36px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile-val { font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); }
.tile-val .unit { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.tile-lbl { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.35; }
@media (max-width: 700px) { .tiles { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- data tables
   La tabla ES la vista de tabla del gráfico: cada barra lleva su valor como
   texto en la celda de al lado, nunca sólo en la barra. */
.figure { margin: 26px 0 34px; }
.figure-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.figure-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; max-width: var(--measure); }
.figure-note { font-size: 13px; color: var(--muted); margin-top: 10px; max-width: var(--measure); }

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.data thead th { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data td.key { font-weight: 500; color: var(--ink); }
table.data td.muted { color: var(--muted); font-size: 13.5px; }
/* Deltas ("+34.2% vs la mediana de la ciudad"). Deliberadamente NEUTROS: verde
   y rojo son tokens de estado y aquí no hay bueno ni malo — un ZIP más caro no
   es un problema, es un dato. Pintarlos de estado le decía al host que su zona
   cara era una alerta. El signo ya lleva la dirección; el color no debe opinar. */
.pos, .neg { color: var(--ink); font-weight: 600; }

/* Barra dentro de celda: una serie, un tono. Tope 14px de grosor, extremo
   de dato redondeado 4px y arranque cuadrado en la línea base. */
td.bar-cell { width: 34%; min-width: 120px; padding-right: 16px; }
.bar-track { position: relative; height: 14px; background: var(--bg-2); border-radius: 2px; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 2px 4px 4px 2px; }

/* Tira de percentiles: rango p10–p90 con la caja p25–p75 y la mediana.
   El anillo de 2px en color de superficie deja la mediana legible sobre la caja. */
.range { margin: 22px 0 8px; }
.range-track { position: relative; height: 42px; }
.range-line { position: absolute; top: 20px; height: 2px; background: var(--line-2); left: 0; right: 0; border-radius: 1px; }
.range-box { position: absolute; top: 12px; height: 18px; background: var(--accent-soft); border-radius: 3px; }
.range-median { position: absolute; top: 8px; width: 3px; height: 26px; background: var(--accent); border-radius: 2px; box-shadow: 0 0 0 2px var(--bg); }
.range-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.range-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.range-legend b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------- callouts */
.callout { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 28px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-weight: 600; color: var(--ink); margin-bottom: 6px; }

.cta { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; margin: 40px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-text { flex: 1; min-width: 250px; }
.cta-title { font-family: var(--font-serif); font-size: 22px; line-height: 1.2; color: var(--ink); margin-bottom: 5px; }
.cta-sub { font-size: 14px; color: var(--muted); line-height: 1.5; }
.cta-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.cta-btn:hover { background: var(--accent-ink); color: #fff; }

/* ---------------------------------------------------------- faq */
.faq { margin: 52px 0 0; padding: 26px 28px; background: var(--bg-2); border-radius: var(--radius-lg); }
.faq h2 { margin: 0 0 14px; font-size: 26px; }
.faq details { border-bottom: 1px solid var(--line-2); padding: 12px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { font-size: 15.5px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { font-size: 15px; margin: 10px 0 0; }

/* ---------------------------------------------------------- cards / index */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 28px 0 40px; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: inherit; }
.card:hover { border-color: var(--line-2); background: #fff; color: inherit; }
.card-eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 7px; }
.card-title { font-family: var(--font-serif); font-size: 21px; line-height: 1.2; color: var(--ink); margin-bottom: 6px; }
.card-sub { font-size: 14px; color: var(--muted); line-height: 1.45; }
.card-stat { font-size: 13px; color: var(--ink-2); margin-top: 10px; font-variant-numeric: tabular-nums; }
.card-stat b { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .card-grid, .card-grid.three { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- source box */
.source { margin: 52px 0 0; padding: 20px 22px; background: var(--bg-2); border-radius: var(--radius); font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.source dt { font-weight: 600; color: var(--ink-2); margin-top: 10px; }
.source dt:first-child { margin-top: 0; }
.source dd { margin: 2px 0 0; }
.source a { color: var(--accent-ink); }

/* ---------------------------------------------------------- footer */
footer.site { background: var(--bg-2); border-top: 1px solid var(--line); margin-top: 72px; padding: 44px 24px 34px; }
.footer-inner { max-width: 980px; margin: 0 auto; }
.footer-tagline { font-family: var(--font-serif); font-size: 18px; color: var(--ink-2); max-width: 46ch; margin-bottom: 20px; line-height: 1.35; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13.5px; margin-bottom: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-small { font-size: 12.5px; color: var(--muted-2); }

@media (max-width: 700px) {
  body { font-size: 16px; }
  main { padding: 28px 20px 8px; }
  .cta { flex-direction: column; align-items: flex-start; }
  table.data { font-size: 13.5px; }
  table.data th, table.data td { padding: 9px 9px; }
  td.bar-cell { display: none; }  /* la barra es redundante: el valor va como texto */
}
