/* ==========================================================================
   Estratégica Lex — sistema de diseño
   Minimalista, editorial, orientado a producto (law tech).
   ========================================================================== */

/* ---- Tipografía ---------------------------------------------------------- */
@font-face {
  font-family: "Inter var";
  src: url("../fonts/inter-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-var.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-2: #fbfbf9;
  --ink: #111113;
  --ink-2: #3a3a40;
  --muted: #74747c;
  --faint: #9a9aa1;
  --line: #e5e5df;
  --line-2: #d3d3cb;
  --accent: #8a1226;
  --accent-2: #6c0d1d;
  --accent-soft: #f6eef0;
  --ok: #1f6b4a;
  --radius: 12px;
  --radius-sm: 8px;
  --sans: "Inter var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow-sm: 0 1px 2px rgba(17, 17, 19, 0.04);
  --shadow: 0 1px 2px rgba(17, 17, 19, 0.04), 0 12px 32px -12px rgba(17, 17, 19, 0.14);
  --header: 66px;
  --pad: clamp(20px, 4vw, 40px);
  --sect: clamp(56px, 7.2vw, 104px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Base --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 1, "cv11" 1;
}

img, svg, picture { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 550;
  letter-spacing: -0.028em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 1.6rem + 3.1vw, 4.15rem); letter-spacing: -0.038em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.7rem); }
h3 { font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.22rem); letter-spacing: -0.016em; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 600; }
small { font-size: 0.8125rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

::selection { background: #e9d3d8; color: #3d0912; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- Utilidades de layout ----------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--pad);
}
.wrap--narrow { max-width: 860px; }
.wrap--wide { max-width: 1320px; }

.section { padding-block: var(--sect); }
.section--tight { padding-block: clamp(44px, 6vw, 72px); }
.section--line { border-top: 1px solid var(--line); }

.stack > * + * { margin-top: var(--stack, 16px); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.lead {
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.14rem);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 56ch;
}
.muted { color: var(--muted); }
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

p.mobile-only { display: none; }
@media (max-width: 900px) { p.mobile-only { display: block; } }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---- Botones ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.006em;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease), transform 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }

.btn--accent { background: var(--accent); }
.btn--accent:hover { background: var(--accent-2); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}
.btn--ghost:hover { background: #fff; border-color: var(--ink); }

.btn--sm { height: 38px; padding: 0 14px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s var(--ease);
}
.link:hover { border-color: currentColor; }
.link svg { width: 14px; height: 14px; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header);
  background: rgba(247, 247, 244, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(247, 247, 244, 0.94);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand img { width: 52px; height: auto; flex: none; }
.brand-text { display: grid; gap: 1px; line-height: 1; }
.brand-name {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav a {
  padding: 8px 11px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.nav a:hover { background: #ecece7; color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.nav-cta { display: none; }
.nav a[aria-current="page"]::after {
  content: "";
  display: block;
  height: 2px;
  margin: 6px auto -8px;
  width: 14px;
  background: var(--accent);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 10px 0 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}
.search-trigger:hover { border-color: var(--ink); color: var(--ink); }
.search-trigger svg { width: 15px; height: 15px; flex: none; }
.search-trigger kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--faint);
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(48px, 6vw, 84px) clamp(40px, 5vw, 68px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 .thin {
  color: var(--muted);
  font-weight: 350;
}
.hero .lead { margin-top: 22px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* Panel de búsqueda (producto) */
.search-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-panel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.search-panel-bar svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.search-panel-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
.search-panel-bar input::placeholder { color: var(--faint); }
.search-panel-bar input:focus { outline: none; }
.search-panel-bar .kbd {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
}
.search-panel-body { padding: 8px; min-height: 214px; }
.panel-label {
  padding: 8px 10px 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.panel-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  transition: background 0.14s var(--ease);
}
.panel-item:hover, .panel-item:focus-visible { background: var(--surface-2); }
.panel-item .tag {
  flex: none;
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 3px 6px;
}
.panel-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.panel-item small { color: var(--muted); font-size: 11.5px; }
.search-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}
.search-panel-foot a { color: var(--ink); font-weight: 500; }
.empty-hint {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.hero-note {
  position: absolute;
  right: -6px;
  top: -14px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 0 8px;
}
.search-panel-wrap { position: relative; }

/* ---- Áreas / marquee ---------------------------------------------------- */
.areas {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 16px;
  overflow: hidden;
}
.areas-track {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 10px;
}
.areas-track span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.areas-track span + span::before { content: "·"; margin-right: 22px; color: var(--line-2); }

/* ---- Sección: cabecera -------------------------------------------------- */
.sect-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(28px, 3vw, 44px);
}
.sect-head .eyebrow { margin-bottom: 14px; }
.sect-head p { margin: 12px 0 0; max-width: 52ch; }
.sect-head .link { margin-bottom: 6px; flex: none; }

/* ---- Tarjetas de herramientas ------------------------------------------ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tools-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.tool-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tool-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
}
.tool-icon svg { width: 18px; height: 18px; }
.tool-card h3 { margin-top: 2px; }
.tool-card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.tool-card .tool-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.tool-card .tool-foot svg { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.tool-card:hover .tool-foot svg { transform: translateX(3px); color: var(--accent); }
.tool-card--wide { grid-column: span 3; flex-direction: row; align-items: center; gap: 28px; }
.tool-card--wide .tool-main { flex: 1; display: grid; gap: 8px; }
.tool-card--wide .tool-foot { border: 0; padding: 0; margin: 0; }

/* ---- Biblioteca (filas) ------------------------------------------------- */
.doc-list { border-top: 1px solid var(--line); }
.doc-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 140px 92px 20px;
  align-items: center;
  gap: 18px;
  padding: 17px 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.16s var(--ease), padding 0.16s var(--ease);
}
a.doc-row:hover { background: var(--surface); padding-inline: 14px 10px; }
.doc-row--blog { grid-template-columns: 92px minmax(0, 1fr) 72px; }
.doc-type {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 4px 7px;
  justify-self: start;
  white-space: nowrap;
}
.doc-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.35;
}
.doc-title small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-materia { font-size: 13px; color: var(--muted); }
.doc-date { font-family: var(--mono); font-size: 11px; color: var(--faint); text-align: right; }
.doc-row .chev { color: var(--line-2); transition: transform 0.2s var(--ease), color 0.2s var(--ease); }
a.doc-row:hover .chev { color: var(--accent); transform: translateX(2px); }

/* ---- Banda oscura (buscador) ------------------------------------------- */
.band-dark {
  background: #131316;
  color: #f2f2ef;
  border-radius: 18px;
  padding: clamp(28px, 4vw, 56px);
  position: relative;
  overflow: hidden;
}
.band-dark h2 { color: #fff; max-width: 22ch; }
.band-dark .eyebrow { color: #9b9b9f; }
.band-dark .eyebrow::before { background: #d9a4ae; }
.band-dark p { color: #b4b4b8; }
.band-dark .link { color: #fff; }
.band-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.mock-search {
  border: 1px solid #2c2c31;
  border-radius: 12px;
  background: #1a1a1e;
  overflow: hidden;
}
.mock-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid #2c2c31;
  font-size: 13.5px;
  color: #8c8c92;
}
.mock-search-bar svg { width: 16px; height: 16px; flex: none; }
.mock-search-bar .cursor { width: 1px; height: 15px; background: #d9a4ae; }
.mock-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; border-bottom: 1px solid #2c2c31; }
.mock-chips span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid #33333a;
  border-radius: 999px;
  color: #a9a9af;
}
.mock-chips span.on { background: #f2f2ef; color: #131316; border-color: #f2f2ef; }
.mock-results { padding: 8px; display: grid; gap: 2px; }
.mock-results .r {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 6px;
}
.mock-results .r.hi { background: #222228; }
.mock-results b { font-weight: 500; font-size: 12.5px; color: #e8e8e4; }
.mock-results i { font-style: normal; font-size: 11px; color: #7e7e85; }
.band-dark .btn--ghost { border-color: #3a3a41; color: #f2f2ef; }
.band-dark .btn--ghost:hover { background: #1f1f24; border-color: #6a6a72; }

/* ---- Firma / foto ------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.figure-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #ecece6;
  aspect-ratio: 3 / 2;
}
.figure-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}
.figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.02);
}
.figure-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.stat { padding: 16px 16px 0 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat b {
  display: block;
  font-size: clamp(1.35rem, 1.9vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Perfil ------------------------------------------------------------- */
.profile {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: start;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 88px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.profile h3 { font-size: 1.18rem; }
.profile .role { margin: 5px 0 12px; font-size: 13px; color: var(--accent); }
.profile p { font-size: 14px; color: var(--ink-2); margin-bottom: 0; }
.creds { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.creds li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}
.creds li::before { content: "—"; color: var(--line-2); }

/* ---- CTA / contacto ----------------------------------------------------- */
.cta {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(30px, 4.5vw, 56px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.cta-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.cta-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.cta-list li:last-child { border-bottom: 1px solid var(--line); }
.cta-list .k {
  flex: none;
  width: 66px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.cta-list .v { min-width: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.cta-list a.v:hover { color: var(--accent); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 48px 84px;
  margin-top: clamp(40px, 6vw, 80px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 32px;
}
.site-footer h4 {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer li { margin: 0; }
.site-footer a, .site-footer address {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.site-footer a:hover { color: var(--accent); }
.footer-brand p { margin: 14px 0 0; font-size: 13px; color: var(--muted); max-width: 30ch; }
.footer-bottom {
  display: flex;
  padding-right: 118px;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.footer-bottom a:hover { color: var(--ink); }

/* ---- Páginas internas --------------------------------------------------- */
.page-head {
  padding-block: clamp(36px, 5vw, 64px) clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span[aria-current] { color: var(--ink-2); }
.page-head h1 { max-width: 30ch; }
.page-head .lead { margin-top: 16px; }

/* Buscador / biblioteca: layout de dos columnas */
.browse {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding-block: clamp(24px, 3vw, 36px) var(--sect);
}
.facets { position: sticky; top: calc(var(--header) + 20px); display: grid; gap: 24px; }
.facet-group h4 { margin-bottom: 10px; }
.facet-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; }
.facet-list li { margin: 0; }
.facet-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  margin-inline: -8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.facet-btn:hover { background: #ecece7; color: var(--ink); }
.facet-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.facet-btn .n {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}
.facet-btn[aria-pressed="true"] .n { color: rgba(255, 255, 255, 0.6); }

.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 46px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.searchbar:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 19, 0.06);
}
.searchbar svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
}
.searchbar input:focus { outline: 0; }
.searchbar .clear {
  border: 0;
  background: none;
  color: var(--faint);
  cursor: pointer;
  padding: 4px;
  display: none;
}
.searchbar .clear:hover { color: var(--ink); }
.searchbar.has-value .clear { display: block; }

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  font-size: 12.5px;
  color: var(--muted);
}
.result-meta select {
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 6px 8px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11.5px;
  color: var(--ink-2);
}
.chip button {
  border: 0;
  background: none;
  color: var(--faint);
  cursor: pointer;
  line-height: 1;
  padding: 2px;
  font-size: 13px;
}
.chip button:hover { color: var(--accent); }

.results { list-style: none; padding: 0; margin: 0; }
.result {
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
}
.result:hover .result-title { color: var(--accent); }
.result-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.result-title {
  display: block;
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  transition: color 0.14s var(--ease);
}
.result-snippet {
  margin: 5px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 78ch;
}
.result-snippet mark { background: #f3e2c6; color: inherit; padding: 0 1px; border-radius: 2px; }
.result-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
}
.badge--accent { color: var(--accent); background: var(--accent-soft); border-color: #edd9dd; }

/* ---- Documento ---------------------------------------------------------- */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-block: clamp(28px, 4vw, 48px) var(--sect);
}
.prose { max-width: 68ch; font-size: 15.5px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  font-size: 1.32rem;
  color: var(--ink);
  margin-top: 2.1em;
  letter-spacing: -0.02em;
}
.prose h3 { margin-top: 1.7em; color: var(--ink); font-size: 1.02rem; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: 0.45em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); border-bottom: 1px solid #e6c9cf; }
.prose a:hover { border-color: var(--accent); }
.prose blockquote {
  margin: 1.6em 0;
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.45;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 1.4em 0; }
.prose table code { white-space: nowrap; font-size: .88em; }
.table-scroll { overflow-x: auto; margin: 1.4em 0; }
.table-scroll table { margin: 0; min-width: 620px; }
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

@media (max-width: 620px) {
  .table-scroll { overflow: visible; }
  .table-scroll table { min-width: 0; }
  .prose table thead { display: none; }
  .prose table, .prose table tbody, .prose table tr, .prose table td { display: block; width: 100%; }
  .prose table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .prose table tr:last-child { border-bottom: 0; }
  .prose table td {
    position: relative;
    display: block;
    padding: 3px 0 3px 96px;
    border: 0;
  }
  .prose table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 3px;
    width: 84px;
    font-family: var(--mono);
    font-size: 8.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--faint);
  }
}
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.doc-aside { position: sticky; top: calc(var(--header) + 20px); display: grid; gap: 18px; }
.aside-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.aside-card h4 { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.meta-list { display: grid; gap: 10px; margin: 0; }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; text-align: right; color: var(--ink); }
.notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #ecdfc4;
  background: #fdf8ee;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.55;
  color: #6b5626;
}
.notice svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

/* ---- Herramientas ------------------------------------------------------- */
.tool-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tool-nav::-webkit-scrollbar { display: none; }
.tool-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px 12px;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.tool-nav-item .n {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--faint);
}
.tool-nav-item:hover { color: var(--ink); }
.tool-nav-item.is-active {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--accent);
}
.tool-nav-item.is-active .n { color: var(--accent); }
.tool-nav-more {
  margin-left: auto;
  padding: 9px 0 12px 16px;
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}
.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
  padding-block: clamp(24px, 3vw, 40px) var(--sect);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}
.panel + .panel { margin-top: 14px; }
.panel h2 { font-size: 1.35rem; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label:not(.check), .field-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.field .hint { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 19, 0.06);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.checks { display: grid; gap: 8px; }
.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.check:hover { border-color: var(--line-2); background: var(--surface-2); }
.check input { margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.check span { line-height: 1.45; }

/* Wizard */
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; }
.step-dot {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.step-dot i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font-style: normal;
  font-size: 10px;
}
.step-dot.is-active { color: var(--ink); }
.step-dot.is-active i { border-color: var(--ink); background: var(--ink); color: #fff; }
.step-dot.is-done i { background: var(--accent-soft); border-color: #e8cfd4; color: var(--accent); }
.step-line { flex: 1; height: 1px; background: var(--line); }
.options { display: grid; gap: 8px; }
.option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.option:hover { border-color: var(--ink); }
.option[aria-pressed="true"] { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink); }
.option b { display: block; font-size: 14px; font-weight: 500; }
.option small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.wizard-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }

/* Resultado */
.result-hero {
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #faf7f2, #fff);
  border: 1px solid #e9ddd0;
}
.result-hero .eyebrow { margin-bottom: 10px; }
.result-hero h2 { margin-bottom: 8px; }
.result-block { margin-top: 18px; }
.result-block h3 { font-size: 12px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-weight: 500; }
.summary-box {
  position: relative;
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 11.5px;
}
/* Contador de días hábiles */
.dh-total { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dh-total b {
  font-size: clamp(2.5rem, 5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}
.dh-total span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.dh-range { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.dh-range em { font-style: normal; color: var(--muted); }
.dh-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.dh-table th, .dh-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.dh-table th:first-child, .dh-table td:first-child { width: 52%; }
.dh-table tbody tr:last-child td { border-bottom: 0; }
.dh-table th {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  background: var(--surface-2);
}
.dh-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dh-table tfoot td { font-weight: 500; background: var(--surface-2); border-bottom: 0; }
.dh-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-x: auto; }
.dh-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: 13px; color: var(--ink-2); }
.dh-note { font-size: 12px; margin: 14px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 700px) {
  .dh-table { font-size: 12px; }
  .dh-table th, .dh-table td { padding: 8px; }
  .dh-table th { font-size: 8.5px; letter-spacing: 0.06em; }
}

.doc-output {
  padding: 28px 30px;
  overflow-wrap: anywhere;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.65;
  color: #1a1a1a;
  white-space: pre-wrap;
  min-height: 420px;
}
.doc-output .doc-head { text-align: center; font-family: var(--sans); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.contact-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-card {
  display: grid;
  gap: 6px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease);
}
a.contact-card:hover { border-color: var(--ink); transform: translateY(-1px); }
.contact-card .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.contact-card .v { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.contact-card small { color: var(--muted); font-size: 12px; }
.form-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.form-embed iframe { display: block; width: 100%; border: 0; height: 920px; background: #fff; }
.form-embed-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}
.map-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.office-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.office-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 118px;
  background:
    linear-gradient(90deg, rgba(17,17,19,.055) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(0deg, rgba(17,17,19,.055) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(90% 130% at 18% 0%, #f4efe7, #e9e9e2);
}
.office-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(255,255,255,.45)); }
.office-visual svg {
  position: relative; z-index: 1;
  width: 40px; height: 40px; padding: 9px;
  color: var(--accent); background: #fff; border-radius: 50%;
  box-shadow: 0 4px 14px rgba(17,17,19,.14);
}
.office-body { padding: 18px 20px 20px; }
.office-body h3 { font-size: 13px; margin-bottom: 8px; }
.office-body p { font-size: 13.5px; line-height: 1.55; margin: 0 0 6px; }
.office-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; filter: grayscale(1) contrast(0.95); }

/* ---- Command palette ---------------------------------------------------- */
.palette {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  padding: min(12vh, 120px) 16px 16px;
  background: rgba(17, 17, 19, 0.35);
  backdrop-filter: blur(3px);
}
.palette.is-open { display: block; }
.palette-panel {
  width: min(660px, 100%);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.palette-input { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 17px; height: 17px; color: var(--faint); flex: none; }
.palette-input input {
  flex: 1;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--ink);
}
.palette-input input:focus { outline: 0; }
.palette-input .esc {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 5px;
}
.palette-results { max-height: min(56vh, 460px); overflow-y: auto; padding: 8px; }
.palette-group-label {
  padding: 9px 10px 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.palette-item[aria-selected="true"], .palette-item:hover { background: var(--surface-2); color: var(--ink); }
.palette-item .tag {
  flex: none;
  width: 62px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.palette-item span.t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .enter { font-family: var(--mono); font-size: 9px; color: var(--faint); }
.palette-foot {
  display: flex;
  gap: 16px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.palette-empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---- WhatsApp flotante -------------------------------------------------- */
.wa-float {
  position: fixed;
  right: clamp(14px, 3vw, 26px);
  bottom: clamp(14px, 3vw, 26px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}
.wa-float:hover { background: #000; transform: translateY(-2px); }

.wa-float svg { width: 17px; height: 17px; }

/* ---- Revelado ----------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1100px) {
  .header-cta { display: none; }
  .header-inner { gap: 14px; }
  .nav { margin-left: 0; gap: 0; }
  .nav a { padding: 8px 8px; font-size: 13.5px; }
  .header-actions .search-trigger span { display: none; }
  .header-actions .search-trigger { padding: 0 9px; }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 24ch; }
  .search-panel-wrap { max-width: 720px; }
}

@media (max-width: 1080px) {
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-card--wide { grid-column: span 2; }
  .tool-shell { grid-template-columns: minmax(0, 1fr); }
  .tool-shell > aside { position: static !important; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-aside { position: static; }
  .profile { grid-template-columns: 64px minmax(0, 1fr); }
  .profile .creds-col { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .search-panel-wrap { order: 2; }
  .hero h1 { max-width: 22ch; }
  .band-grid { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .figure { max-width: 460px; }
  .cta { grid-template-columns: minmax(0, 1fr); }
  .browse { grid-template-columns: minmax(0, 1fr); }
  .facets {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin-inline: calc(var(--pad) * -1);
    padding-inline: var(--pad);
  }
  .facet-group { min-width: 0; }
  .facet-group .facet-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .facet-group .facet-list li { flex: none; }
  .facet-btn { border: 1px solid var(--line-2); margin: 0; background: var(--surface); }
  .doc-row { grid-template-columns: 78px minmax(0, 1fr) 20px; }
  .doc-row .doc-materia, .doc-row .doc-date { display: none; }
  .doc-row--blog { grid-template-columns: 78px minmax(0, 1fr); }
  .nav, .header-actions .search-trigger span { display: none; }
}

@media (max-width: 780px) {
  .header-cta { display: none; }
  .areas-track {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 18px;
  }
  .areas-track span { white-space: nowrap; }
  .areas-track span + span::before { content: none; }
  .nav {
    display: none;
    position: fixed;
    inset: var(--header) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--pad) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 15px; }
  .nav-cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin-top: 10px;
    background: var(--accent);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 500;
  }
  .nav-cta { display: none; }
.nav a[aria-current="page"]::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions .search-trigger { padding: 0 9px; }
  .header-actions .search-trigger kbd { display: none; }
  .search-trigger span { display: none; }
  .contact-grid, .contact-grid--three { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 12px 0; border-left: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; padding-top: 16px; }
  .profile { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .tool-card--wide { flex-direction: column; align-items: flex-start; gap: 16px; }
  .doc-output { padding: 20px; font-size: 14.5px; }
}

@media (max-width: 560px) {
  :root { --pad: 18px; }
  .wa-float { width: 44px; padding: 0; justify-content: center; }
  .wa-float span { display: none; }
  .brand img { width: 42px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-card--wide { grid-column: span 1; }
  .btn { height: 44px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .sect-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .brand-sub { display: none; }
  .result-meta { flex-direction: column; align-items: flex-start; }
  .form-embed iframe { height: 1080px; }
}

/* ---- Impresión ---------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .wa-float, .banner-beta, .breadcrumb, .doc-aside,
  .palette, .skip-link, .print-hide { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .wrap, .doc-layout { max-width: none; padding: 0; display: block; }
  .doc-output { border: 0; padding: 0; min-height: 0; }
  .prose { max-width: none; }
  a { color: #000; text-decoration: underline; }
}


/* ---- Expedientes -------------------------------------------------------- */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.seg button {
  border: 0;
  background: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.search-panel-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px 9px;
}
.search-panel-tabs .kbd {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
}

.exp-list { border-top: 1px solid var(--line); }
.exp-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 118px 96px 16px;
  align-items: center;
  gap: 18px;
  padding: 15px 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.16s var(--ease), padding 0.16s var(--ease);
}
a.exp-row:hover { background: var(--surface); padding-inline: 14px 10px; }
.exp-num {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.exp-main strong {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.exp-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs { font-family: var(--serif); font-style: italic; color: var(--muted); }
.exp-status {
  justify-self: start;
  padding: 4px 7px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.exp-status[data-state="open"] { color: var(--accent); border-color: #e8cfd4; background: var(--accent-soft); }
.exp-status[data-state="sentencia"] { color: #1f4d3d; border-color: #c9ded4; background: #eef6f1; }
.exp-status[data-state="closed"] { color: var(--muted); background: var(--surface-2); }
.exp-status[data-state="paused"] { color: #7a5a1a; border-color: #e8dcc0; background: #fbf4e4; }
.exp-status--lg { padding: 7px 12px; font-size: 9.5px; margin-top: 6px; }
.exp-date { font-family: var(--mono); font-size: 10.5px; color: var(--faint); text-align: right; }
.exp-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.meta-grid > div {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.meta-grid dt {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.meta-grid dd { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--ink); }

.mini-head {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.last-acuerdo {
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
}
.last-acuerdo p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item {
  position: relative;
  margin-left: 5px;
  padding: 0 0 22px 26px;
  border-left: 1px solid var(--line);
}
.tl-item:last-child { padding-bottom: 2px; border-left-color: transparent; }
.tl-dot {
  position: absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
}
.tl-item:first-child .tl-dot { background: var(--accent); border-color: var(--accent); }
.tl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.tl-head time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.tl-item p { margin: 0; font-size: 13.8px; line-height: 1.6; color: var(--ink-2); }

.official-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.official-card {
  display: grid;
  gap: 6px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.official-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.official-card .k {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.official-card strong { font-size: 15px; font-weight: 550; letter-spacing: -0.015em; }
.official-card small { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.official-card .link { margin-top: 8px; font-size: 12.5px; }

@media (max-width: 900px) {
  .exp-row {
    grid-template-columns: 88px minmax(0, 1fr) 16px;
    grid-template-areas: "num main chev" "num status chev";
    gap: 6px 14px;
    padding-block: 14px;
  }
  .exp-row .exp-num { grid-area: num; align-self: start; padding-top: 2px; }
  .exp-row .exp-main { grid-area: main; }
  .exp-row .chev { grid-area: chev; }
  .exp-row .exp-status { grid-area: status; display: inline-flex; justify-self: start; margin-top: 3px; }
  .exp-row .exp-date { display: none; }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .official-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .meta-grid { grid-template-columns: minmax(0, 1fr); }
  .exp-title-row { flex-direction: column; gap: 10px; }
  .search-panel-tabs .kbd { display: none; }
}


/* ---- Historial de expediente -------------------------------------------- */
.historial-box {
  max-width: 780px;
  padding: clamp(22px, 3.5vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.historial-form > label { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 500; }
.historial-row { display: flex; gap: 8px; }
.historial-row input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.historial-row input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,17,19,.06); }
.historial-row input[aria-invalid="true"] { border-color: var(--accent); background: #fdf3f4; }
.historial-status { min-height: 1.2em; margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.historial-status.is-error { color: var(--accent); }
.historial-status.is-ok { color: var(--ok); }
@media (max-width: 560px) {
  .historial-row { flex-direction: column; }
  .historial-row input { flex: none; width: 100%; height: 52px; }
  .historial-row .btn { width: 100%; }
}

/* ---- Planos catastrales -------------------------------------------------- */
.plano-shell {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 18px;
  align-items: start;
  padding-block: clamp(24px, 3vw, 40px) var(--sect);
}
.plano-form { display: grid; gap: 14px; }
.plano-form .panel h2 { font-size: 1.15rem; }
.plano-side { position: sticky; top: calc(var(--header) + 18px); display: grid; gap: 12px; min-width: 0; }
.plano-preview-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.plano-preview {
  min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; box-shadow: var(--shadow-sm); overflow: auto;
}
.plano-preview svg { width: 100%; height: auto; display: block; }
[data-summary] { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--sans); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); }
[data-summary] b { color: var(--ink); font-weight: 600; }

.side-head, .side-row {
  display: grid;
  grid-template-columns: 44px 78px minmax(150px, 1fr) minmax(96px, 1fr) 26px;
  gap: 6px;
  align-items: center;
}
.side-head {
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
.side-row { padding: 7px 0; border-bottom: 1px solid var(--line); }
.side-row input, .side-row select {
  width: 100%; height: 32px; padding: 0 6px;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--surface); font-family: inherit; font-size: 12px; color: var(--ink);
}
.side-row input:focus, .side-row select:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 2px rgba(17,17,19,.06); }
.side-n { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.side-bearing { display: flex; align-items: center; gap: 2px; }
.side-bearing input { width: 38px; text-align: center; padding: 0 2px; }
.side-bearing select { width: 44px; padding: 0 2px; }
.side-bearing span { font-size: 10px; color: var(--muted); }
.side-del { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 17px; line-height: 1; }
.side-del:hover { color: var(--accent); }
.side-row.is-error input, .side-row.is-error select { border-color: var(--accent); background: #fdf3f4; }
.plan-error { border-color: #edd9dd; background: var(--accent-soft); color: var(--accent); }
.review-list { display: grid; gap: 8px; margin: 10px 0 0; }
.review-list div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.review-list dt { color: var(--muted); }
.review-list dd { margin: 0; text-align: right; color: var(--ink); }
.review-note { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin: 10px 0 0; }
.review-details { margin-top: 12px; font-size: 11.5px; }
.review-details summary { cursor: pointer; color: var(--ink-2); }
.review-details table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.review-details th { text-align: left; padding: 4px 3px; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); font-weight: 500; }
.review-details td { padding: 4px 3px; border-bottom: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.review-details tr:last-child td { border-bottom: 0; }

.dictamen { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.dictamen-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: 8px; font-size: 13px;
}
.dictamen-head .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dictamen-head span:last-child { margin-left: auto; font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.dictamen-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 12px 0 0; padding: 0; }
.dictamen-list div { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.dictamen-list dt { color: var(--muted); }
.dictamen-list dd { margin: 0; color: var(--ink); }
.dictamen-note { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin: 10px 0 0; }

/* ---- Días hábiles -------------------------------------------------------- */
.dias-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dias-date { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.dias-note { font-size: 12px; color: var(--muted); margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.dias-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dias-details { margin-top: 12px; font-size: 12.5px; }
.dias-details summary { cursor: pointer; color: var(--ink-2); }
.dias-details ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); max-height: 220px; overflow: auto; }

@media (max-width: 1100px) {
  .plano-shell { grid-template-columns: minmax(0, 1fr); }
  .plano-side { position: static; }
}
@media (max-width: 700px) {
  .plano-preview svg { width: 720px; max-width: none; min-width: 720px; }
  .tool-nav { flex-wrap: wrap; overflow: visible; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
  .tool-nav-item { padding-bottom: 9px; }
  .tool-nav-more { margin-left: 0; padding: 6px 0 9px; }
  .side-head { display: none; }
  .side-row { grid-template-columns: 38px minmax(0, 1fr) 26px; gap: 6px 8px; }
  .side-n { grid-row: 1 / span 3; align-self: start; padding-top: 9px; }
  .side-del { grid-column: 3; grid-row: 1; }
  .side-row > input[type="number"], .side-bearing, .side-row > input[type="text"] { grid-column: 2; }
  .dictamen-list { grid-template-columns: 1fr; }
}

@media print {
  @page { size: letter portrait; margin: 0; }
  .page-head, .plano-form, .plano-preview-head, .dictamen, .plano-side > .notice { display: none !important; }
  .plano-shell { display: block; padding: 0; }
  .plano-preview { border: 0; padding: 0; box-shadow: none; }
  .plano-preview svg { width: 100%; height: auto; }
}
