/* ==========================================================================
   TerreNet — sistema de diseño "Mensura" (ronda 2, 2026-11-09)
   Spec: docs/2026-11-evolucion/03-SISTEMA-DE-DISENO.md
   Se carga último y se impone a los estilos heredados (modern.css, components.css…).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,100..900&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --tn-paper: #f3f5f1;
  --tn-surface: #ffffff;
  --tn-sunken: #eaeee8;
  --tn-ink: #15201a;
  --tn-ink-2: #3a4740;
  --tn-muted: #5e6b64;
  --tn-line: #dce3dd;
  --tn-line-strong: #bfcac2;
  --tn-brand: #18794e;
  --tn-brand-strong: #0f5c3a;
  --tn-brand-tint: #e5f1ea;
  --tn-hito: #b8431a;
  --tn-hito-tint: #f8e7df;
  --tn-rent: #1d4f91;
  --tn-rent-tint: #e7eef8;
  --tn-deep: #10291d;
  --tn-warn: #8a4b08;
  --tn-warn-tint: #fdf0e1;
  --tn-r1: 4px;
  --tn-r2: 6px;
  --tn-r3: 10px;
  --tn-radius: var(--tn-r3);
  --tn-radius-sm: var(--tn-r2);
  --tn-shadow: 0 1px 2px rgba(21, 32, 26, .06), 0 6px 20px rgba(21, 32, 26, .06);
  --tn-shadow-hover: 0 2px 4px rgba(21, 32, 26, .06), 0 12px 32px rgba(21, 32, 26, .10);
  --tn-shadow-float: 0 -1px 0 rgba(21, 32, 26, .06), 0 -8px 24px rgba(21, 32, 26, .08);
  --tn-font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tn-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --tn-ease: cubic-bezier(.2, .7, .2, 1);
  --tn-dur: 160ms;
  --tn-plot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cg fill='none' stroke='%2318794e' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M0 72h118l38-26h164M0 196h82l52 38h186M118 72v124M156 46V0M214 46v188M82 196v124M262 234v86M214 146h106M0 278h82M38 72V0M290 46V0'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--tn-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--tn-ink);
  background: var(--tn-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body button, body input, body select, body textarea { font-family: inherit; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #2f8f5f;
  outline-offset: 2px;
  border-radius: var(--tn-r1);
}

.tn-wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.tn-display, .tn-hero h1, .tn-lhero h1, .tn-section h2, .tn-detail-title {
  font-family: var(--tn-font);
  font-stretch: 88%;
  font-weight: 650;
  letter-spacing: -0.012em;
}
.tn-mono, .tn-measure, .tn-spec dd { font-family: var(--tn-mono); font-variant-numeric: tabular-nums; }
.tn-link { color: var(--tn-brand); font-weight: 600; text-decoration: none; }
.tn-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.tn-help { font-size: .875rem; color: var(--tn-muted); line-height: 1.45; }
.tn-eyebrow { font-size: .9rem; font-weight: 600; color: var(--tn-brand); margin: 0 0 .5rem; letter-spacing: 0; text-transform: none; }

.tn-measure {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 500; color: var(--tn-ink);
  padding: 2px 8px; border: 1px dashed var(--tn-line-strong); border-radius: var(--tn-r1); background: #fbfcfb;
  white-space: nowrap;
}
.tn-badge { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: var(--tn-r1); letter-spacing: 0; text-transform: none; }
.tn-badge--sale { background: var(--tn-brand-tint); color: var(--tn-brand-strong); }
.tn-badge--rent { background: var(--tn-rent-tint); color: var(--tn-rent); }
.tn-badge--state { background: var(--tn-warn-tint); color: var(--tn-warn); }

.tn-spec { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.tn-spec dt, .tn-spec dd { padding: 10px 0; border-bottom: 1px dotted var(--tn-line-strong); margin: 0; }
.tn-spec dt { color: var(--tn-ink-2); font-size: .95rem; }
.tn-spec dd { text-align: right; font-size: .95rem; font-weight: 500; color: var(--tn-ink); padding-left: 16px; }
.tn-spec dt .tn-help { display: block; margin-top: 2px; }

/* ---------- Header ---------- */
body .site-header {
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--tn-line);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body .site-header .brand { gap: 10px; text-decoration: none; }
body .site-header .brand-mark { width: 36px; height: 36px; background: transparent !important; box-shadow: none !important; border-radius: 0; }
body .brand-title { color: var(--tn-ink) !important; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; font-stretch: 92%; }
body .brand-subtitle { color: var(--tn-muted); font-size: .75rem; font-weight: 500; }
body .main-nav a:not(.btn) { color: var(--tn-ink-2); font-weight: 500; border-radius: var(--tn-r2); }
body .main-nav a:not(.btn):hover,
body .main-nav a.active { color: var(--tn-brand-strong); background: var(--tn-brand-tint); }

/* ---------- Botones ---------- */
body .btn {
  min-height: 44px; border-radius: var(--tn-r2); font-weight: 600; letter-spacing: 0; text-transform: none;
  transition: background-color var(--tn-dur) var(--tn-ease), border-color var(--tn-dur) var(--tn-ease), color var(--tn-dur) var(--tn-ease);
  transform: none;
}
body .btn:hover { transform: none; }
body .btn-sm { min-height: 40px; }
body .btn-cta,
body .btn-primary { background: var(--tn-brand); border: 1px solid var(--tn-brand); color: #fff; box-shadow: none; background-image: none; }
body .btn-cta:hover,
body .btn-primary:hover { background: var(--tn-brand-strong); border-color: var(--tn-brand-strong); color: #fff; }
body .btn-cta:active,
body .btn-primary:active { background: #0b4a2e; }
body .btn-secondary { background: var(--tn-surface); color: var(--tn-ink); border: 1px solid var(--tn-line-strong); box-shadow: none; }
body .btn-secondary:hover { border-color: var(--tn-ink-2); color: var(--tn-ink); background: var(--tn-surface); }
body .btn-ghost { color: var(--tn-ink-2); background: transparent; border: 1px solid transparent; }
body .btn-ghost:hover { background: var(--tn-brand-tint); color: var(--tn-brand-strong); }
body .btn[disabled], body .btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Campos ---------- */
body input[type="text"], body input[type="email"], body input[type="password"], body input[type="number"],
body input[type="tel"], body input[type="search"], body input[type="url"], body select, body textarea { border-radius: var(--tn-r2); }
body form input:invalid:not(:focus):placeholder-shown,
body form select:invalid:not(:focus) { border-color: var(--tn-line-strong); box-shadow: none; }

/* ==========================================================================
   HOME
   ========================================================================== */
body .hero.tn-hero {
  position: relative; background: var(--tn-paper); color: var(--tn-ink);
  padding: 56px 0 48px; min-height: 0; border-bottom: 1px solid var(--tn-line); overflow: hidden;
}
body .hero.tn-hero::before, body .hero.tn-hero::after { display: none; }
body .tn-hero__inner {
  position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center;
}
body .tn-hero__copy { max-width: none; margin: 0; text-align: left; }
body .tn-hero__copy h1 { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.02; color: var(--tn-ink); margin: 0 0 16px; text-shadow: none; }
body .tn-hero__lead { font-size: 1.125rem; line-height: 1.55; color: var(--tn-ink-2); margin: 0 0 20px; max-width: 46ch; }
.tn-hero__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0 0 28px; padding: 0; }
.tn-hero__facts li { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 600; color: var(--tn-ink); }
.tn-hero__facts li::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: var(--tn-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.tn-hero__plan { position: relative; margin: 0; }
.tn-hero__plan svg { display: block; width: 100%; height: auto; }
.tn-hero__plan figcaption { margin-top: 8px; font-family: var(--tn-mono); font-size: .75rem; color: var(--tn-muted); text-align: right; }

body .hero-search.tn-search {
  background: var(--tn-surface); border: 1px solid var(--tn-line); border-radius: var(--tn-r3); box-shadow: var(--tn-shadow);
  padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--tn-ink); max-width: none; width: 100%; overflow: hidden;
}
.tn-search__tabs { display: flex; border-bottom: 1px solid var(--tn-line); padding: 0 8px; }
.tn-search__tab {
  appearance: none; background: none; border: 0; cursor: pointer; padding: 14px 14px 12px; min-height: 48px;
  font-size: .98rem; font-weight: 600; color: var(--tn-muted); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tn-search__tab:hover { color: var(--tn-ink); }
.tn-search__tab[aria-selected="true"] { color: var(--tn-ink); border-bottom-color: var(--tn-brand); }
.tn-search__body { padding: 16px; }
.tn-search__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; gap: 12px; align-items: end; }
.tn-search__main .tn-field--op { display: none; }
.tn-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
body .tn-search label, body .tn-search .tn-field label { font-size: .82rem; font-weight: 600; color: var(--tn-ink-2); text-transform: none; letter-spacing: 0; margin: 0; text-align: left; }
body .tn-search input, body .tn-search select {
  width: 100%; min-height: 48px; padding: 10px 12px; font-size: 1rem; color: var(--tn-ink);
  background: var(--tn-surface); border: 1px solid var(--tn-line-strong); border-radius: var(--tn-r2); box-shadow: none;
}
body .tn-search input:focus, body .tn-search select:focus { border-color: var(--tn-brand); box-shadow: 0 0 0 3px rgba(24, 121, 78, .18); outline: none; }
body .tn-search input::placeholder { color: #84918a; }
body .tn-search__submit { min-height: 48px; padding: 0 24px; white-space: nowrap; font-size: 1rem; }
.tn-search__more { margin-top: 12px; border-top: 1px solid var(--tn-line); padding-top: 4px; }
.tn-search__more > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; color: var(--tn-brand-strong); }
.tn-search__more > summary::-webkit-details-marker { display: none; }
.tn-search__more > summary::before {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform var(--tn-dur) var(--tn-ease); margin-right: 2px;
}
.tn-search__more[open] > summary::before { transform: rotate(45deg); }
.tn-search__hint { font-weight: 400; color: var(--tn-muted); font-size: .875rem; }
.tn-search__extra { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.tn-search__tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
body .btn-mobile-filters { display: none !important; }

.tn-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.tn-quick span { font-size: .875rem; color: var(--tn-muted); margin-right: 4px; }
.tn-quick a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: var(--tn-r2);
  border: 1px solid var(--tn-line-strong); background: var(--tn-surface); color: var(--tn-ink); font-size: .9rem; font-weight: 500; text-decoration: none;
}
.tn-quick a:hover { border-color: var(--tn-brand); color: var(--tn-brand-strong); }

/* ---------- Resultados / catálogo ---------- */
body .results-wrapper { background: transparent; padding: 32px 32px 56px; max-width: 1264px; margin: 0 auto; }
body .tn-results-head { margin-bottom: 12px; padding: 0; background: none; border: 0; }
body .tn-results-head .results-header-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
body .tn-results-head h2 { font-size: 1.6rem; font-stretch: 88%; font-weight: 650; margin: 0 0 2px; color: var(--tn-ink); }
body .tn-results-head p, body #results-count-text { color: var(--tn-muted); margin: 0; padding: 0; font-size: .95rem; }
.tn-results-head__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tn-sort { display: flex; align-items: center; gap: 8px; }
.tn-sort label { font-size: .875rem; color: var(--tn-muted); font-weight: 500; }
.tn-sort select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--tn-line-strong); border-radius: var(--tn-r2); background: var(--tn-surface); color: var(--tn-ink); font-size: .95rem; }
body .view-toggle { background: var(--tn-surface); border: 1px solid var(--tn-line-strong); border-radius: var(--tn-r2); padding: 3px; box-shadow: none; gap: 2px; }
body .view-toggle__btn { min-height: 38px; border-radius: var(--tn-r1); color: var(--tn-ink-2); border: 0 !important; background: transparent; box-shadow: none; font-weight: 600; }
body .view-toggle__btn.active { background: var(--tn-ink); color: #fff; }
body .view-toggle__btn.active svg { stroke: #fff; }

.tn-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.tn-chip {
  appearance: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  min-height: 40px; padding: 0 14px; border-radius: var(--tn-r2);
  border: 1px solid var(--tn-line-strong); background: var(--tn-surface); color: var(--tn-ink); font-size: .92rem; font-weight: 500;
  transition: background-color var(--tn-dur) var(--tn-ease), border-color var(--tn-dur) var(--tn-ease);
}
.tn-chip:hover { border-color: var(--tn-ink-2); }
.tn-chip[aria-pressed="true"] { background: var(--tn-ink); border-color: var(--tn-ink); color: #fff; }
.tn-chip[aria-pressed="true"]::before { content: "✓"; font-weight: 700; }
@media (pointer: coarse) { .tn-chip { min-height: 44px; } }

body .results { gap: 24px; }

/* ---------- Tarjeta de terreno ---------- */
body .card {
  container-type: inline-size; position: relative; background: var(--tn-surface);
  border: 1px solid var(--tn-line); border-radius: var(--tn-r3); box-shadow: none; overflow: hidden;
  transition: border-color var(--tn-dur) var(--tn-ease), box-shadow var(--tn-dur) var(--tn-ease);
}
body .card:hover { border-color: var(--tn-line-strong); box-shadow: var(--tn-shadow-hover); transform: none; }
body .card .card-image { aspect-ratio: 4 / 3; height: auto; width: 100%; object-fit: cover; background: var(--tn-sunken); display: block; }
body .card:hover .card-image { transform: none; }
body .card-body { padding: 14px 16px 14px; gap: 4px; display: flex; flex-direction: column; }
body .card-header-row { display: block; order: 1; }
body .card .pill {
  position: absolute; left: 12px; top: calc(75cqw - 38px); z-index: 2;
  font-size: .75rem; font-weight: 600; letter-spacing: 0; text-transform: capitalize; line-height: 1;
  padding: 6px 9px; border-radius: var(--tn-r1); border: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
body .card .badge-venta { background: var(--tn-surface); color: var(--tn-brand-strong); }
body .card .badge-alquiler { background: var(--tn-surface); color: var(--tn-rent); }
body .card .price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0; order: 0; }
body .card .price { font-size: 1.45rem; font-weight: 700; color: var(--tn-ink) !important; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
body .card .price-m2-badge { background: transparent; border: 0; padding: 0; color: var(--tn-muted); font-family: var(--tn-mono); font-size: .78rem; font-weight: 400; }
body .card .price-m2-value { color: var(--tn-muted); font-weight: 500; }
body .card-title {
  font-size: .98rem; font-weight: 500; line-height: 1.35; color: var(--tn-ink-2); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body .card .card-location { order: 2; color: var(--tn-ink); font-size: .95rem; font-weight: 600; }
body .card .meta { order: 3; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
body .card .meta > span {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--tn-mono); font-size: .8rem; font-weight: 500; color: var(--tn-ink); font-variant-numeric: tabular-nums;
  padding: 2px 8px; border: 1px dashed var(--tn-line-strong); border-radius: var(--tn-r1); background: #fbfcfb;
}
body .card .card-body > *:not(.price-row):not(.card-header-row):not(.card-location):not(.meta):not(.card-footer) { order: 4; }
body .card .card-footer { order: 9; border-top: 1px solid var(--tn-line); padding-top: 10px; margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
body .card .card-vendor-avatar__name { color: var(--tn-muted); font-size: .85rem; }
body .card .card-vendor-avatar__placeholder { background: var(--tn-sunken); color: var(--tn-ink-2); font-weight: 600; }
body .card .link-detalle, body .card .link-detalle-primary {
  background: transparent; border: 0; box-shadow: none; color: var(--tn-brand-strong);
  font-weight: 600; padding: 10px 2px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: .92rem;
}
body .card .link-detalle svg { display: none; }
body .card .link-detalle::after { content: "→"; transition: transform var(--tn-dur) var(--tn-ease); }
body .card:hover .link-detalle::after { transform: translateX(3px); }
body .card .link-detalle:hover { text-decoration: underline; text-underline-offset: 3px; background: transparent; }
body .card .btn-favorite, body .card .btn-compare, body .card .btn-share {
  width: 40px; height: 40px; background: rgba(255, 255, 255, .95); border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16); color: var(--tn-ink); border-radius: var(--tn-r2);
}
@media (pointer: coarse) { body .card .btn-favorite, body .card .btn-compare, body .card .btn-share { width: 44px; height: 44px; } }

body .pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; background: transparent; box-shadow: none; border: 0; padding: 32px 0 0; margin: 0; }
body .pagination .pagination-btn {
  min-width: 44px; min-height: 44px; padding: 0 12px; margin: 0; background: var(--tn-surface); color: var(--tn-ink);
  border: 1px solid var(--tn-line-strong); border-radius: var(--tn-r2); font-weight: 600; width: auto; flex: none; box-shadow: none;
}
body .pagination .pagination-btn:hover:not([disabled]) { border-color: var(--tn-ink-2); }
body .pagination .pagination-btn.active, body .pagination .pagination-btn.active[disabled] { background: var(--tn-ink); color: #fff; border-color: var(--tn-ink); opacity: 1; }
body .pagination .pagination-btn[disabled]:not(.active) { opacity: .45; cursor: default; }

body .empty-state { background: var(--tn-surface); border: 1px dashed var(--tn-line-strong); border-radius: var(--tn-r3); }
body .empty-state__icon { color: var(--tn-muted); }

/* ---------- Secciones de la home ---------- */
.tn-section { padding: 72px 0; }
.tn-section h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.08; margin: 0 0 14px; color: var(--tn-ink); }
.tn-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.tn-section__head h2 { margin: 0; }
.tn-section__lead { color: var(--tn-ink-2); font-size: 1.05rem; max-width: 58ch; margin: 0 0 24px; }

.tn-explain { background: var(--tn-surface); border-top: 1px solid var(--tn-line); border-bottom: 1px solid var(--tn-line); }
.tn-explain__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.tn-explain__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tn-explain__list li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; }
.tn-explain__list b { font-family: var(--tn-mono); font-weight: 500; font-size: .85rem; color: var(--tn-hito); border: 1px dashed currentColor; border-radius: var(--tn-r1); padding: 4px 0; text-align: center; }
.tn-explain__list h3 { font-size: 1.05rem; margin: 0 0 2px; color: var(--tn-ink); }
.tn-explain__list p { margin: 0; color: var(--tn-ink-2); font-size: .95rem; }
.tn-explain figure { margin: 0; }
.tn-explain figcaption { font-family: var(--tn-mono); font-size: .75rem; color: var(--tn-muted); margin-top: 8px; }

.tn-publish { background: var(--tn-deep); color: #dfe9e3; position: relative; overflow: hidden; }
.tn-publish h2 { color: #fff; }
.tn-publish .tn-eyebrow { color: #9fdcbb; }
.tn-publish p { color: #c7d6cd; font-size: 1.06rem; line-height: 1.6; max-width: 52ch; }
.tn-publish__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.tn-publish__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
body .tn-publish .btn-cta { background: #fff; color: var(--tn-deep); border-color: #fff; }
body .tn-publish .btn-cta:hover { background: #e5f1ea; border-color: #e5f1ea; color: var(--tn-deep); }
body .tn-publish .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
body .tn-publish .btn-secondary:hover { border-color: #fff; color: #fff; }
.tn-steps { list-style: none; counter-reset: tn-step; margin: 0 0 0 15px; padding: 0; border-left: 1px dashed rgba(255, 255, 255, .3); }
.tn-steps li { counter-increment: tn-step; position: relative; padding: 4px 0 26px 36px; }
.tn-steps li:last-child { padding-bottom: 2px; }
.tn-steps li::before {
  content: counter(tn-step); position: absolute; left: -16px; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tn-deep); border: 1px solid #9fdcbb; color: #9fdcbb; font-family: var(--tn-mono); font-weight: 500; font-size: .9rem;
}
.tn-steps h3 { color: #fff; font-size: 1.1rem; margin: 2px 0 4px; }
.tn-steps p { margin: 0; font-size: .97rem; color: #c7d6cd; }

.tn-places { background: var(--tn-paper); }
.tn-places__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tn-places__list a {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px; border: 1px solid var(--tn-line); border-radius: var(--tn-r3);
  text-decoration: none; color: var(--tn-ink); background: var(--tn-surface); transition: border-color var(--tn-dur) var(--tn-ease);
}
.tn-places__list a:hover { border-color: var(--tn-ink-2); }
.tn-places__list strong { font-size: 1.1rem; font-stretch: 92%; }
.tn-places__list span { color: var(--tn-muted); font-size: .9rem; }

.tn-guides { background: var(--tn-surface); border-top: 1px solid var(--tn-line); }
.tn-guides__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.tn-guides__list a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 0; border-top: 1px solid var(--tn-line); color: var(--tn-ink); text-decoration: none; }
.tn-guides__list a:hover strong { color: var(--tn-brand-strong); text-decoration: underline; text-underline-offset: 3px; }
.tn-guides__list strong { font-size: 1.05rem; line-height: 1.35; font-weight: 600; }
.tn-guides__tag { font-size: .85rem; font-weight: 500; color: var(--tn-muted); letter-spacing: 0; text-transform: none; }

.tn-faq { background: var(--tn-paper); border-top: 1px solid var(--tn-line); }
.tn-faq__wrap { max-width: 820px; }
.tn-faq details { border-bottom: 1px solid var(--tn-line); }
.tn-faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; min-height: 44px; position: relative; font-weight: 600; font-size: 1.08rem; color: var(--tn-ink); }
.tn-faq summary::-webkit-details-marker { display: none; }
.tn-faq summary::after { content: "+"; position: absolute; right: 6px; top: 13px; font-size: 1.5rem; color: var(--tn-brand); font-weight: 400; }
.tn-faq details[open] summary::after { content: "–"; }
.tn-faq details p { margin: 0 0 18px; color: var(--tn-ink-2); line-height: 1.65; max-width: 65ch; }
.tn-faq__more { margin-top: 18px; }

/* ---------- Footer ---------- */
body .site-footer { background: var(--tn-deep); color: #b6c6bc; }
body .site-footer a { color: #e1ebe5; text-decoration: none; }
body .site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
body .site-footer .footer-heading, body .site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: 0; text-transform: none; font-weight: 600; }
body .site-footer .footer-tagline { color: #a3b4aa; }
body .site-footer .footer-links a { display: block; padding: 6px 0; }
body .site-footer .footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); color: #8fa298; }

/* ---------- Barra inferior mobile ---------- */
.tn-tabbar { display: none; }
@media (max-width: 760px) {
  .tn-tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 850;
    background: rgba(255, 255, 255, .98); border-top: 1px solid var(--tn-line); box-shadow: var(--tn-shadow-float);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tn-tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 54px; color: var(--tn-ink-2); text-decoration: none; font-size: .75rem; font-weight: 600; border-radius: var(--tn-r2);
  }
  .tn-tabbar a svg { width: 22px; height: 22px; }
  .tn-tabbar a[aria-current="page"] { color: var(--tn-brand-strong); }
  .tn-tabbar a[aria-current="page"] svg { stroke-width: 2.4; }
  body.tn-has-tabbar { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  body.tn-has-tabbar .scroll-top-btn, body.tn-has-tabbar #sticky-mobile-cta { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  body .tn-hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .tn-hero__plan { display: none; }
}
@media (max-width: 960px) {
  .tn-wrap, body .tn-hero__inner { padding: 0 24px; }
  .tn-search__extra { grid-template-columns: 1fr 1fr; }
  .tn-publish__grid, .tn-explain__grid { grid-template-columns: 1fr; gap: 32px; }
  .tn-places__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-guides__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .tn-wrap, body .tn-hero__inner { padding: 0 16px; }
  body .hero.tn-hero { padding: 24px 0; }
  body .tn-hero__copy h1 { font-size: 2.15rem; margin-bottom: 10px; }
  body .tn-hero__lead { font-size: 1.02rem; margin-bottom: 14px; }
  .tn-hero__facts { gap: 6px 14px; margin-bottom: 18px; }
  .tn-hero__facts li { font-size: .88rem; }
  .tn-search__body { padding: 12px; }
  .tn-search__main { grid-template-columns: 1fr; gap: 10px; }
  body .tn-search__submit { width: 100%; justify-content: center; }
  .tn-search__extra { grid-template-columns: 1fr; }
  .tn-search__tools .btn { width: 100%; justify-content: center; }
  .tn-quick { flex-wrap: nowrap; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
  .tn-quick::-webkit-scrollbar { display: none; }
  .tn-quick a, .tn-quick span { flex: none; }
  body .results-wrapper { padding: 24px 16px 40px; }
  .tn-results-head__tools { width: 100%; justify-content: space-between; }
  .tn-chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .tn-chips::-webkit-scrollbar { display: none; }
  .tn-chip { flex: none; }
  .tn-section { padding: 48px 0; }
  .tn-places__list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tn-places__list a { padding: 14px; }
  .tn-guides__list { grid-template-columns: 1fr; }
  body .pagination .pagination-btn:first-child, body .pagination .pagination-btn:last-child { order: 10; flex: 1 1 calc(50% - 6px); }
}

/* ---------- Accesibilidad ---------- */
body .skip-link { background: var(--tn-ink); color: #fff; padding: 10px 14px; border-radius: var(--tn-r2); font-weight: 600; }
.tn-free-note {
  display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px; padding: 10px 12px;
  background: var(--tn-brand-tint); color: var(--tn-brand-strong); border-radius: var(--tn-r2);
  font-size: .95rem; font-weight: 500; line-height: 1.45;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

/* ---------- Iteración home (QA visual) ---------- */
body .tn-hero__inner { align-items: end; row-gap: 28px; }
.tn-hero__search { grid-column: 1 / -1; min-width: 0; }
body .tn-hero__copy, .tn-hero__plan { min-width: 0; }
.tn-hero__facts { margin-bottom: 0; }
.tn-hero__plan { align-self: center; }
@media (min-width: 1101px) {
  .tn-search__main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; }
}
/* Operación sobre la foto: texto de oración (el JS lo escribe en mayúsculas) */
body .card .pill { text-transform: lowercase; }
body .card .pill::first-letter { text-transform: uppercase; }
/* Servicios: lista con tilde, sin cajas */
body .card .services { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; order: 4; }
body .card .service-chip {
  display: inline-flex; align-items: center; gap: 5px; background: none !important; border: 0 !important; padding: 0 !important;
  color: var(--tn-ink-2) !important; font-size: .86rem; font-weight: 500; min-height: 0; box-shadow: none !important; border-radius: 0;
}
body .card .service-chip svg { display: none; }
body .card .service-chip::before { content: "✓"; color: var(--tn-brand); font-weight: 700; }
body .results-header p#results-count-text, body #results-count-text { padding-left: 0 !important; margin-left: 0 !important; text-indent: 0 !important; }
body .results-header-row > div { padding-left: 0 !important; }
/* Chat de Tidio: arriba de la barra inferior en mobile */
@media (max-width: 760px) {
  body.tn-has-tabbar #tidio-chat-iframe { bottom: calc(64px + env(safe-area-inset-bottom)) !important; }
}

/* Header en tablet: sin subtítulo y enlaces en una línea */
body .main-nav a, body .main-nav .btn { white-space: nowrap; }
@media (max-width: 1100px) {
  body .site-header .brand-subtitle { display: none; }
  body .main-nav { gap: 2px; }
  body .main-nav a:not(.btn) { padding-left: 10px; padding-right: 10px; }
}

/* ==========================================================================
   Filtros técnicos (modal) — claro, explicado, con filas grandes
   ========================================================================== */
body .tech-modal.tn-tech .tech-modal__backdrop { background: rgba(16, 41, 29, .55); backdrop-filter: none; }
body .tech-modal.tn-tech .tech-modal__container {
  background: var(--tn-surface); color: var(--tn-ink); border: 1px solid var(--tn-line); border-radius: var(--tn-r3);
  box-shadow: 0 24px 64px rgba(16, 41, 29, .28); width: min(880px, calc(100vw - 32px)); max-height: min(88vh, 900px);
  display: flex; flex-direction: column; overflow: hidden;
}
body .tn-tech .tech-modal__header {
  background: var(--tn-surface); color: var(--tn-ink); border-bottom: 1px solid var(--tn-line);
  padding: 20px 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
body .tn-tech .tech-modal__title { color: var(--tn-ink); font-size: 1.5rem; font-weight: 650; font-stretch: 90%; margin: 0; }
body .tn-tech .tech-modal__subtitle { color: var(--tn-muted); margin: 4px 0 0; font-size: .95rem; }
body .tn-tech .tech-modal__close {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none; border-radius: var(--tn-r2);
  background: var(--tn-surface); color: var(--tn-ink); border: 1px solid var(--tn-line-strong);
}
body .tn-tech .tech-modal__body { display: block; overflow-y: auto; padding: 8px 24px 16px; background: var(--tn-surface); }
.tn-tech__section { border: 0; border-bottom: 1px solid var(--tn-line); margin: 0; padding: 18px 0 20px; min-width: 0; }
.tn-tech__section:last-child { border-bottom: 0; }
.tn-tech__section legend { font-size: 1.08rem; font-weight: 650; color: var(--tn-ink); padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.tn-tech__section legend + * { clear: both; }
.tn-tech__sub { margin: 16px 0 8px; font-size: .92rem; font-weight: 600; color: var(--tn-ink-2); }
.tn-tech__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.tn-tech__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tn-tech__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tn-tech__field label { font-size: .9rem; font-weight: 600; color: var(--tn-ink-2); text-transform: none; letter-spacing: 0; }
body .tn-tech input[type="text"], body .tn-tech input[type="number"], body .tn-tech select {
  width: 100%; min-height: 46px; padding: 10px 12px; font-size: 1rem; color: var(--tn-ink);
  background: var(--tn-surface); border: 1px solid var(--tn-line-strong); border-radius: var(--tn-r2); box-shadow: none;
}
body .tn-tech input:focus, body .tn-tech select:focus { border-color: var(--tn-brand); box-shadow: 0 0 0 3px rgba(24, 121, 78, .18); outline: none; }
.tn-unit { position: relative; display: flex; align-items: center; }
.tn-unit input { padding-right: 44px !important; font-family: var(--tn-mono); }
.tn-unit span { position: absolute; right: 12px; color: var(--tn-muted); font-family: var(--tn-mono); font-size: .9rem; pointer-events: none; }
.tn-tech .tn-help { margin: 0; }
.tn-tech__checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tn-check {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--tn-line-strong); border-radius: var(--tn-r2); background: var(--tn-surface); color: var(--tn-ink); font-weight: 500;
}
.tn-check input { width: 20px; height: 20px; accent-color: var(--tn-brand); flex: none; margin: 0; }
.tn-check:has(input:checked) { border-color: var(--tn-brand); background: var(--tn-brand-tint); }
.tn-check:has(input:focus-visible) { outline: 3px solid #2f8f5f; outline-offset: 2px; }
body .tn-tech .tech-modal__footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px;
  border-top: 1px solid var(--tn-line); background: var(--tn-surface);
}
body .tn-tech .tech-modal__filter-count { color: var(--tn-muted); font-size: .92rem; margin-left: auto; }
body .tn-tech .tech-modal__filter-count.has-filters { color: var(--tn-brand-strong); font-weight: 600; }
body .tn-tech .tech-modal__btn--primary { min-height: 48px; padding: 0 24px; }
@media (max-width: 700px) {
  body .tech-modal.tn-tech .tech-modal__container { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  body .tn-tech .tech-modal__header { padding: 16px; }
  body .tn-tech .tech-modal__body { padding: 0 16px 16px; flex: 1; }
  .tn-tech__grid, .tn-tech__grid--3, .tn-tech__checks { grid-template-columns: 1fr; }
  .tn-tech__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  body .tn-tech .tech-modal__footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  body .tn-tech .tech-modal__filter-count { display: none; }
  body .tn-tech .tech-modal__btn--primary { flex: 1; justify-content: center; }
}
@media (max-width: 1023px) {
  body.tn-has-tabbar #tidio-chat iframe, body.tn-has-tabbar iframe[id^="tidio"], body.tn-has-tabbar iframe[title*="Tidio"],
  body:has(.mobile-bottom-bar) #tidio-chat iframe, body:has(.mobile-bottom-bar) iframe[id^="tidio"], body:has(.mobile-bottom-bar) iframe[title*="Tidio"] {
    bottom: calc(68px + env(safe-area-inset-bottom)) !important;
  }
}
@media (max-width: 760px) { .tn-tabbar.tn-tabbar--chat { padding-right: 76px; } }

/* Estado vacío del buscador y filtros activos */
body #results .empty-state, body .results .empty-state { border: 0; background: transparent; padding: 0; }
body .empty-state {
  max-width: 560px; margin: 8px auto; padding: 32px 24px !important; text-align: center;
  background: var(--tn-surface) !important; border: 1px dashed var(--tn-line-strong) !important; border-radius: var(--tn-r3) !important; box-shadow: none !important;
}
body .empty-state .empty-state { border: 0 !important; padding: 0 !important; margin: 0 auto; }
body .empty-state__icon { color: var(--tn-muted); font-size: 0; margin-bottom: 8px; }
body .empty-state__icon svg { display: inline-block; }
body .empty-state__title { font-size: 1.3rem !important; font-weight: 650 !important; font-stretch: 90%; color: var(--tn-ink) !important; }
body .empty-state__text { color: var(--tn-ink-2) !important; }
body .empty-state__hint { background: none !important; border: 0 !important; color: var(--tn-muted) !important; font-style: normal !important; padding: 0 !important; }
body .empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
body .active-filters-pills { background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; justify-content: flex-start !important; gap: 8px; }
body .active-filters-pills > * { border-radius: var(--tn-r2) !important; }
body .active-filters-pills .filter-pill, body .active-filters-pills [class*="pill"]:not(.active-filters-pills) {
  background: var(--tn-brand-tint) !important; border: 1px solid var(--tn-brand) !important; color: var(--tn-brand-strong) !important; min-height: 36px;
}
body .results-wrapper:has(.empty-state:not(.hidden)) #pagination { display: none !important; }

/* Accesibilidad: ajustes de la auditoría final */
body .link-login, body a.link-login { color: var(--tn-brand-strong) !important; font-weight: 600; }
body .site-footer p, body footer .footer-bottom p { color: #b6c6bc; }
body .nav-toggle { min-width: 44px; min-height: 44px; }
@media (pointer: coarse) { .tn-quick a { min-height: 44px; } }
/* Evita scroll horizontal por elementos de 100vw (clip no rompe position: sticky) */
html, body { overflow-x: clip; }

/* Vistos recientemente */
body .recently-viewed-section { margin-bottom: 24px; }
body .recently-viewed-header h2, body .recently-viewed-header h3 { font-size: 1.15rem; font-weight: 650; color: var(--tn-ink); }
body .recently-viewed-card { border: 1px solid var(--tn-line) !important; border-radius: var(--tn-r3) !important; box-shadow: none !important; background: var(--tn-surface); overflow: hidden; }
body .recently-viewed-card:hover { border-color: var(--tn-line-strong) !important; transform: none !important; }
body .rv-badge { text-transform: lowercase !important; letter-spacing: 0 !important; border-radius: var(--tn-r1) !important; background: var(--tn-surface) !important; color: var(--tn-brand-strong) !important; font-weight: 600; }
body .rv-badge::first-letter { text-transform: uppercase; }
body .rv-price { color: var(--tn-ink) !important; font-weight: 700; }
body .rv-meta { font-family: var(--tn-mono); color: var(--tn-muted); }
body .rv-location::before { content: none !important; }
body .rv-no-image { background: var(--tn-sunken); color: var(--tn-muted); font-size: .8rem; display: grid; place-items: center; }
body .btn-clear-history { min-width: 44px; min-height: 44px; border-radius: var(--tn-r2); }
body .results-header, body .results-header-row > div, body #results-count-text, body .tn-results-head h2 { text-align: left !important; }

/* ==========================================================================
   HERO v3 — más impacto: promesa propia, producto a la vista, filtros técnicos visibles
   ========================================================================== */
body .hero.tn-hero--v3 { padding: 56px 0 40px; background: var(--tn-paper); }
body .tn-hero--v3 .tn-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 56px; align-items: center; }
.tn-hero__kicker { margin: 0 0 14px; font-size: .95rem; font-weight: 600; color: var(--tn-brand-strong); }
body .tn-hero--v3 .tn-hero__copy h1 { font-size: clamp(2.5rem, 1.2rem + 4.2vw, 4.4rem); line-height: .98; font-stretch: 84%; letter-spacing: -0.02em; margin: 0 0 20px; }
body .tn-hero--v3 .tn-hero__lead { font-size: 1.15rem; max-width: 44ch; margin-bottom: 24px; }
.tn-hero__paths { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 24px; }
body .tn-hero__go { min-height: 52px; padding: 0 24px; font-size: 1.05rem; }
.tn-hero__sell { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: baseline; color: var(--tn-ink-2); text-decoration: none; font-size: 1rem; padding: 10px 0; }
.tn-hero__sell strong { color: var(--tn-brand-strong); }
.tn-hero__sell:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* Panel visual: plano nocturno + ficha flotante */
.tn-hero__visual { position: relative; margin: 0; padding: 0 0 64px; }
.tn-hero__visual-plan {
  display: block; width: 100%; height: auto; border-radius: var(--tn-r3);
  background: var(--tn-deep); box-shadow: 0 20px 48px rgba(16, 41, 29, .22);
}
.tn-hero__sheet {
  position: absolute; left: -28px; bottom: 0; width: min(300px, 70%);
  background: var(--tn-surface); border: 1px solid var(--tn-line); border-radius: var(--tn-r3);
  box-shadow: 0 16px 40px rgba(16, 41, 29, .18); padding: 16px 18px 14px;
}
.tn-hero__sheet-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 4px; font-weight: 650; font-stretch: 90%; font-size: 1.05rem; color: var(--tn-ink); }
.tn-hero__sheet-tag { font-family: var(--tn-mono); font-size: .72rem; font-weight: 500; color: var(--tn-hito); border: 1px dashed currentColor; border-radius: var(--tn-r1); padding: 2px 6px; }
.tn-hero__sheet .tn-spec dt, .tn-hero__sheet .tn-spec dd { padding: 7px 0; font-size: .88rem; }
.tn-hero__sheet .tn-spec dd { font-family: var(--tn-mono); }
.tn-hero__sheet-note { margin: 10px 0 0; font-size: .82rem; color: var(--tn-muted); }
.tn-hero__visual figcaption { position: absolute; right: 0; bottom: 6px; font-family: var(--tn-mono); font-size: .72rem; color: var(--tn-muted); text-align: right; max-width: 55%; }

/* Fila de filtros técnicos dentro del buscador */
.tn-search__tech { margin-top: 14px; padding: 14px; background: var(--tn-paper); border: 1px dashed var(--tn-line-strong); border-radius: var(--tn-r2); }
.tn-search__tech-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; color: var(--tn-ink); font-size: .95rem; }
.tn-search__tech-label span { font-family: var(--tn-mono); font-size: .72rem; color: var(--tn-hito); border: 1px dashed currentColor; border-radius: var(--tn-r1); padding: 2px 6px; }
.tn-search__tech-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tn-mini {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px 0 12px;
  border: 1px solid var(--tn-line-strong); border-radius: var(--tn-r2); background: var(--tn-surface); cursor: text;
}
.tn-mini span { font-size: .9rem; font-weight: 500; color: var(--tn-ink-2); white-space: nowrap; }
body .tn-search .tn-mini input {
  width: 56px; min-height: 0; height: 34px; padding: 0 4px; border: 0; border-bottom: 1px dashed var(--tn-line-strong); border-radius: 0;
  font-family: var(--tn-mono); font-size: .95rem; text-align: right; background: transparent;
}
body .tn-search .tn-mini input:focus { box-shadow: none; border-bottom-color: var(--tn-brand); }
.tn-mini em { font-style: normal; font-family: var(--tn-mono); color: var(--tn-muted); font-size: .85rem; }
.tn-mini:focus-within { border-color: var(--tn-brand); box-shadow: 0 0 0 3px rgba(24, 121, 78, .15); }
.tn-search__tech .tn-chip { min-height: 44px; }
.tn-search__tech-all {
  appearance: none; background: none; border: 0; cursor: pointer; min-height: 44px; padding: 0 6px;
  color: var(--tn-brand-strong); font-weight: 600; font-size: .95rem;
}
.tn-search__tech-all:hover { text-decoration: underline; text-underline-offset: 3px; }
body .tn-hero--v3 .tn-search__more > summary { font-size: .95rem; }

@media (max-width: 1100px) {
  body .tn-hero--v3 .tn-hero__inner { grid-template-columns: 1fr; }
  .tn-hero__visual { display: block; max-width: 560px; padding-bottom: 72px; }
  .tn-hero__sheet { left: 16px; }
}
@media (max-width: 760px) {
  body .hero.tn-hero--v3 { padding: 24px 0 24px; }
  body .tn-hero--v3 .tn-hero__copy h1 { font-size: 2.45rem; line-height: 1.0; }
  body .tn-hero--v3 .tn-hero__lead { font-size: 1.02rem; }
  .tn-hero__paths { gap: 6px 16px; margin-bottom: 16px; }
  body .tn-hero__go { width: 100%; justify-content: center; }
  .tn-hero__visual { display: none; }
  .tn-search__tech { padding: 12px; }
  .tn-search__tech-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px 4px; scrollbar-width: none; }
  .tn-search__tech-row::-webkit-scrollbar { display: none; }
  .tn-search__tech-row > * { flex: none; }
}
body .hero .tn-hero__kicker { color: var(--tn-brand-strong) !important; opacity: 1 !important; text-shadow: none !important; }
body .hero .tn-hero__lead, body .hero .tn-hero__sell { text-shadow: none !important; }
@media (max-width: 760px) {
  .tn-search__tech-row { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .tn-search__tech-row .tn-mini { justify-content: space-between; }
  .tn-search__tech-row .tn-chip { justify-content: center; }
  .tn-search__tech-row .tn-chip:nth-of-type(3) { grid-column: span 1; }
  .tn-search__tech-all { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 760px) {
  .tn-search__tech-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tn-search__tech-row .tn-mini { min-width: 0; padding: 0 8px 0 10px; gap: 6px; }
  .tn-search__tech-row .tn-mini span { font-size: .85rem; }
  body .tn-search .tn-search__tech-row .tn-mini input { width: 40px; flex: 1 1 auto; min-width: 28px; }
}
/* Ficha técnica: la etiqueta nunca queda aplastada por un valor larguísimo */
.tn-spec { grid-template-columns: minmax(40%, 1fr) minmax(0, auto); }
.tn-spec dd { overflow-wrap: anywhere; }

/* Hero: panel "Recién publicados" (terrenos reales) sobre el plano */
.tn-hero__visual--live { padding: 0; }
.tn-hero__visual--live .tn-hero__visual-plan { min-height: 440px; object-fit: cover; }
.tn-hero__live {
  position: absolute; left: 24px; right: 24px; bottom: 24px;
  background: var(--tn-surface); border-radius: var(--tn-r3); border: 1px solid var(--tn-line);
  box-shadow: 0 18px 44px rgba(16, 41, 29, .25); padding: 14px 14px 10px;
}
.tn-hero__live-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 650; font-stretch: 90%; font-size: 1.02rem; color: var(--tn-ink); }
.tn-hero__live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tn-brand); box-shadow: 0 0 0 4px var(--tn-brand-tint); }
.tn-hero__live-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tn-live a, .tn-live--skel { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px; border-radius: var(--tn-r2); text-decoration: none; color: var(--tn-ink); }
.tn-live a:hover { background: var(--tn-paper); }
.tn-live__img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--tn-r1); background: var(--tn-sunken); display: block; }
.tn-live__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tn-live__txt strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tn-live__m2 { align-self: flex-start; font-family: var(--tn-mono); font-size: .75rem; padding: 0 6px; border: 1px dashed var(--tn-line-strong); border-radius: var(--tn-r1); color: var(--tn-ink); }
.tn-live__loc { font-size: .85rem; color: var(--tn-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-live--skel .tn-live__txt i { display: block; height: 10px; border-radius: 3px; background: var(--tn-sunken); width: 60%; }
.tn-live--skel .tn-live__txt i:first-child { width: 40%; height: 14px; }
.tn-hero__live-all { display: inline-flex; min-height: 40px; align-items: center; padding: 0 6px; margin-top: 2px; color: var(--tn-brand-strong); font-weight: 600; text-decoration: none; }
.tn-hero__live-all:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .tn-live--skel .tn-live__img, .tn-live--skel .tn-live__txt i { animation: tnPulse 1.4s ease-in-out infinite; }
  @keyframes tnPulse { 50% { opacity: .55; } }
}
/* Iteración: tres tarjetas con foto en fila, el plano visible arriba */
.tn-hero__visual--live .tn-hero__visual-plan { min-height: 480px; }
.tn-hero__live { left: 20px; right: 20px; bottom: 20px; padding: 14px; }
.tn-hero__live-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tn-live a, .tn-live--skel { grid-template-columns: 1fr; gap: 6px; padding: 0; align-items: start; }
.tn-live a:hover { background: transparent; }
.tn-live a:hover .tn-live__img { opacity: .9; }
.tn-live__img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.tn-live__txt strong { font-size: .98rem; }
.tn-live__loc { font-size: .78rem; }
.tn-hero__live-head { justify-content: space-between; }
.tn-hero__live-all { margin-top: 6px; }
@media (max-width: 1100px) { .tn-hero__visual--live { display: block; max-width: none; } }
.tn-hero__live-head { justify-content: flex-start !important; }

/* Enlaces de contenido (sin clase): verde de marca con buen contraste, subrayados para distinguirlos del texto */
body main p a:not([class]), body article p a:not([class]), body main td a:not([class]), body main dd a:not([class]), body .tn-help a:not([class]) { color: var(--tn-brand-strong); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body main p a:not([class]):hover, body article p a:not([class]):hover { text-decoration-thickness: 2px; }

/* El panel de recién publicados es para desktop/tablet; en mobile el listado está justo debajo */
@media (max-width: 760px) { body .tn-hero__visual, body .tn-hero__visual--live { display: none !important; } }
.tn-live__link, .tn-live__link:hover { text-decoration: none; color: var(--tn-ink); }

/* ==========================================================================
   HERO v4 — "Mosaico de terrenos": collage de fotos reales detrás, buscador al centro
   ========================================================================== */
body .hero.tn-hero.tn-hero--mosaic { background: var(--tn-deep); color: #fff; padding: 64px 0 52px; border-bottom: 0; overflow: hidden; isolation: isolate; }
.tn-hero__mosaic {
  position: absolute; inset: -60px; z-index: 0; pointer-events: none;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 190px; gap: 8px;
  transform: rotate(-4deg) scale(1.08); opacity: 0; transition: opacity .7s ease;
}
.tn-hero__mosaic.is-ready { opacity: .9; }
.tn-hero__mosaic span { display: block; background: #1d3a2c center / cover no-repeat; border-radius: 8px; }
body .hero.tn-hero.tn-hero--mosaic::after {
  display: block; content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 62% 72% at 50% 46%, rgba(16, 41, 29, .9) 0%, rgba(16, 41, 29, .68) 58%, rgba(16, 41, 29, .38) 100%);
}
body .tn-hero--mosaic .tn-hero__inner { z-index: 1; display: block; max-width: 1000px; text-align: center; }
body .tn-hero--mosaic .tn-hero__copy { text-align: center; margin: 0 auto 28px; }
body .hero.tn-hero--mosaic .tn-hero__kicker { color: #9fdcbb !important; margin-bottom: 14px; }
body .tn-hero--mosaic .tn-hero__copy h1 { color: #fff; font-size: clamp(2.5rem, 1.3rem + 3.8vw, 4.5rem); line-height: .98; max-width: 15ch; margin: 0 auto 18px; }
body .tn-hero--mosaic .tn-hero__lead { color: #d6e3db; max-width: 52ch; margin: 0 auto; font-size: 1.12rem; }
body .tn-hero--mosaic .tn-hero__search { text-align: left; }
body .tn-hero--mosaic .hero-search.tn-search { border: 0; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
body .tn-hero--mosaic .tn-quick { justify-content: center; }
body .tn-hero--mosaic .tn-quick span { color: #c7d6cd; }
body .tn-hero--mosaic .tn-quick a { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); color: #fff; }
body .tn-hero--mosaic .tn-quick a:hover { background: #fff; border-color: #fff; color: var(--tn-deep); }
body .hero.tn-hero--mosaic .tn-hero__sell { display: flex; justify-content: center; margin-top: 14px; color: #fff !important; }
body .tn-hero--mosaic .tn-hero__sell strong { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
body .tn-hero--mosaic a:focus-visible, body .tn-hero--mosaic button:focus-visible { outline: 3px solid #9fdcbb; outline-offset: 2px; }
@media (max-width: 760px) {
  body .hero.tn-hero.tn-hero--mosaic { padding: 32px 0 28px; }
  .tn-hero__mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 120px; }
  body .tn-hero--mosaic .tn-hero__copy { margin-bottom: 20px; }
  body .tn-hero--mosaic .tn-hero__copy h1 { font-size: 2.4rem; }
  body .tn-hero--mosaic .tn-hero__lead { font-size: 1rem; }
  body .tn-hero--mosaic .tn-quick { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .tn-hero__mosaic { transition: none; } }
body .hero.tn-hero--mosaic .tn-hero__kicker { text-align: center; max-width: none; margin-left: auto; margin-right: auto; }
