:root {
  color-scheme: light;
  --paper: #e5e3dd;
  --surface: #efede8;
  --surface-2: #e9e7e1;
  --stock: #cbc9be;
  --ink: #333333;
  --ink-2: #5a5754;
  --muted: #786f63;
  --line: rgba(42, 42, 42, 0.18);
  --line-soft: rgba(42, 42, 42, 0.1);
  --gold: #c1b28b;
  --accent: #7a603c;
  --accent-soft: #f0ecdf;
  --clay: #ccad97;
  --ok: #4a6146;
  --ok-soft: #e5ebe2;
  --warn: #9a5e3a;
  --warn-soft: #f5e9e0;
  --stop: #8e2f26;
  --stop-soft: #f6e6e2;
  --shadow: none;
  --serif: "Times Now", Georgia, serif;
  --rotulo: "Basis Grotesque", Arial, sans-serif;
}
/* Las letras de piensalegal.com, servidas desde /static. */
@font-face {
  font-family: "Times Now";
  src: url("/static/TimesNow-SemiLight.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Times Now";
  src: url("/static/TimesNow-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Basis Grotesque";
  src: url("/static/BasisGrotesquePro-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
img {
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent);
}
[hidden] {
  display: none !important;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* ============ barra ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(229, 227, 221, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  min-height: 84px;
  padding: 12px clamp(16px, 3vw, 30px);
}
/* En la barra caben varios (el backoffice trae seis): más compactos. */
.topbar .btn {
  min-height: 36px;
  padding: 0 14px;
}
.topbar .logo {
  width: 190px;
  height: auto;
  display: block;
}
@media (max-width: 560px) {
  .topbar {
    min-height: 72px;
  }
  .topbar .logo {
    width: 152px;
  }
  .topbar .eyebrow {
    display: none;
  }
}
.eyebrow {
  font-family: var(--rotulo);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.topbar .spacer {
  flex: 1;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  padding: 0 20px;
  font-family: var(--rotulo);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  min-height: 52px;
  padding: 0 24px;
}
.btn.primary:hover {
  background: #293a36;
  border-color: #293a36;
  transform: translateY(-2px);
}
.btn.mini {
  min-height: 32px;
  padding: 0 12px;
  font-size: 9.5px;
}
.btn .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  margin-right: 7px;
  vertical-align: 1px;
}
.btn.on .dot {
  background: var(--ok);
}
.tabs {
  display: none;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.tabs button {
  border: 0;
  background: var(--surface);
  padding: 7px 15px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.tabs button[aria-selected="true"] {
  background: var(--ink);
  color: var(--surface);
}

/* ============ layout ============ */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: clamp(16px, 2.2vw, 26px);
  padding: clamp(16px, 2.2vw, 26px);
  align-items: start;
  max-width: 1620px;
  margin: 0 auto;
}
@media (max-width: 1120px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .tabs {
    display: flex;
  }
  .pane[data-pane] {
    display: none;
  }
  .pane.is-active {
    display: block;
  }
}
.col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.right {
  position: sticky;
  top: 78px;
}
@media (max-width: 1120px) {
  .right {
    position: static;
  }
}

/* ============ tarjetas ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
}
.card > header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--gold);
}
.card > header .ord {
  font-family: var(--rotulo);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.14em;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.card > header h2 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.card > header .hint {
  margin-left: auto;
  font-family: var(--rotulo);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============ campos ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.f {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.f.wide {
  grid-column: 1/-1;
}
label, .lab {
  font-family: var(--rotulo);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #665b43;
}
label .req {
  color: var(--stop);
}
/* Casillas de aceptación (aviso de privacidad, términos): son una frase, no la
   etiqueta de un campo. */
label.consent {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
}
label.consent a {
  color: var(--accent);
}
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(42, 42, 42, 0.35);
  border-radius: 0;
  padding: 10px 2px;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea {
  resize: vertical;
  min-height: 68px;
  line-height: 1.45;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent);
}
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.help b {
  color: var(--ink-2);
  font-weight: 600;
}

.seg {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  border: 1px solid rgba(42, 42, 42, 0.35);
  border-radius: 0;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
}
.seg input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.seg label {
  padding: 9px 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-2);
  cursor: pointer;
  background: transparent;
  border-right: 1px solid rgba(42, 42, 42, 0.35);
  transition: background 0.15s, color 0.15s;
}
.seg label:last-of-type {
  border-right: 0;
}
.seg label:hover {
  background: var(--surface-2);
}
.seg input:checked + label {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.seg input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.cond {
  border-left: 2px solid var(--gold);
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============ combobox municipio ============ */
.combo {
  position: relative;
}
.combo-list {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  top: calc(100% + 3px);
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 262px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 2px;
  box-shadow: 0 12px 32px -16px rgba(51, 51, 51, 0.5);
}
.combo-list li {
  padding: 7px 10px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.combo-list li .d {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.combo-list li[aria-selected="true"], .combo-list li:hover {
  background: var(--accent-soft);
}
.combo-list li.none {
  color: var(--muted);
  cursor: default;
  font-style: italic;
}
.combo-list li.none:hover {
  background: transparent;
}
.resolved {
  font-size: 12px;
  color: var(--ok);
  display: flex;
  gap: 6px;
  align-items: center;
}
.resolved.bad {
  color: var(--stop);
}

/* ============ hijos ============ */
.kid {
  border: 1px solid var(--line);
  border-left: 2px solid var(--clay);
  background: var(--surface-2);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.kid .kh {
  display: flex;
  align-items: center;
  gap: 10px;
}
.kid .kh .lab {
  margin-right: auto;
}
.badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 2px;
}
.badge.minor {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 35%, transparent);
}
.badge.adult {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--line);
}

/* ============ opinión ============ */
.op {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.op-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.5;
}
.op-row .k {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  width: 86px;
  flex: none;
  padding-top: 3px;
}
.op-row .v strong {
  font-weight: 600;
}
.op-row .v em {
  font-style: italic;
  color: var(--muted);
}
.flags {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flag {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-left-width: 2px;
}
.flag .ic {
  font-weight: 700;
  font-size: 12px;
  flex: none;
  padding-top: 1px;
  width: 12px;
  text-align: center;
}
.flag.stop {
  background: var(--stop-soft);
  color: var(--stop);
  border-color: color-mix(in srgb, var(--stop) 25%, transparent);
  border-left-color: var(--stop);
}
.flag.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 25%, transparent);
  border-left-color: var(--warn);
}
.flag.info {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  border-left-color: var(--gold);
}
.flag.ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 25%, transparent);
  border-left-color: var(--ok);
}
/* Supuestos de la opinión: el texto del despacho según las respuestas. */
.supuestos {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sup-cab {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.supuesto {
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.6;
}
.supuesto summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.supuesto p {
  margin: 10px 0 0;
}
.supuesto .punto {
  padding-left: 14px;
}
.supuesto .nota {
  color: var(--muted);
  font-size: 12.5px;
}
/* La carta de la opinión: la misma del PDF, con la forma del machote. Va en
   papel blanco también en el tema oscuro, porque el logotipo del membrete es
   oscuro y la carta se lee como el documento que es. */
.carta {
  color-scheme: light;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: "Times New Roman", Times, "EB Garamond", serif;
  font-size: 15px;
  line-height: 1.45;
  color: #1e1e1e;
  min-width: 0;
  overflow-wrap: anywhere;
}
.carta .hoja {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(20px, 5vw, 56px);
}
.carta p {
  margin: 0 0 13px;
}
.carta .membrete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.carta .membrete img {
  height: 32px;
  width: auto;
}
.carta address {
  font-style: normal;
  font-size: 11px;
  line-height: 1.35;
  color: #444;
}
.carta address small {
  font-size: 8px;
  letter-spacing: 0.08em;
  margin-right: 6px;
}
.carta .just,
.carta .suelto,
.carta ol p {
  text-align: justify;
  hyphens: auto;
}
.carta .firma {
  margin-top: 26px;
}
.carta .centro {
  text-align: center;
}
.carta section + section {
  margin-top: 8px;
}
.carta h3 {
  font: inherit;
  font-weight: 700;
  display: flex;
  margin: 0 0 13px;
}
.carta h3 .marca {
  width: 3.2em;
  flex: none;
}
.carta .suelto {
  padding-left: 2.4em;
}
.carta ol {
  list-style: none;
  margin: 0 0 4px;
  padding: 0 0 0 1.8em;
}
.carta ol > li {
  display: flex;
  gap: 0.6em;
}
.carta ol > li > .marca {
  width: 1.4em;
  flex: none;
}
.carta ol > li > div {
  min-width: 0;
}
.carta .tit {
  font-weight: 700;
}
.carta .letra {
  display: flex;
  gap: 0.6em;
}
.carta .letra .marca {
  flex: none;
}
.carta ul {
  margin: 0 0 13px;
  padding-left: 1.4em;
}
@media (max-width: 560px) {
  .carta {
    font-size: 14.5px;
  }
  .carta .suelto,
  .carta ol {
    padding-left: 0;
  }
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  font-size: 11.5px;
  padding: 3px 9px;
  background: var(--stop-soft);
  color: var(--stop);
  border: 1px solid color-mix(in srgb, var(--stop) 22%, transparent);
}

/* ============ documento ============ */
.doc-card {
  position: relative;
  overflow: hidden;
}
.doc-wrap {
  max-height: calc(100vh - 210px);
  overflow: auto;
  position: relative;
}
@media (max-width: 1120px) {
  .doc-wrap {
    max-height: none;
  }
}
.watermark {
  position: absolute;
  right: -70px;
  top: 40px;
  width: 340px;
  height: 340px;
  color: var(--ink);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
.doc {
  position: relative;
  z-index: 1;
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  padding: clamp(22px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 68ch;
  margin: 0 auto;
}
.doc .t-center {
  text-align: center;
}
.doc .t-title {
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 16px;
}
.doc .t-parties {
  text-align: center;
  font-weight: 500;
}
.doc .t-head {
  font-weight: 600;
}
.doc .t-sec {
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 13px;
  margin-top: 10px;
  color: var(--accent);
}
.doc .t-p {
  text-align: justify;
  hyphens: auto;
}
.doc .t-sign {
  text-align: center;
  margin-top: 26px;
  font-weight: 600;
}
.doc .t-rule {
  border: 0;
  border-top: 1px solid var(--ink);
  width: 260px;
  max-width: 70%;
  margin: 36px auto 0;
}
.doc mark {
  background: color-mix(in srgb, var(--clay) 55%, transparent);
  color: var(--ink);
  padding: 0 3px;
}
.doc table {
  border-collapse: collapse;
  width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12.5px;
}
.doc th, .doc td {
  border: 1px solid var(--line);
  padding: 7px 9px;
  text-align: left;
}
.doc th {
  background: var(--surface-2);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
.tscroll {
  overflow-x: auto;
}

/* ============ pie del sitio ============ */
.sitio-pie {
  margin-top: 48px;
  background: var(--ink);
  color: var(--paper);
  padding: 54px clamp(16px, 3vw, 30px) 28px;
}
.sitio-pie-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.sitio-pie .logo {
  width: 152px;
  height: auto;
  display: block;
}
.sitio-pie-main > p {
  color: #aab5b1;
  font-size: 13px;
}
.sitio-pie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 12px;
}
.sitio-pie-links a {
  color: var(--paper);
  text-decoration: none;
}
.sitio-pie-links a:hover {
  color: var(--clay);
}
.sitio-pie-bottom {
  padding-top: 26px;
  color: #71807b;
  font-size: 10px;
}
@media (max-width: 900px) {
  .sitio-pie-main {
    grid-template-columns: 1fr;
  }
}

/* ============ pie ============ */
.foot {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.foot strong {
  color: var(--ink-2);
  font-weight: 600;
}
.foot mark {
  background: color-mix(in srgb, var(--clay) 45%, transparent);
  color: var(--ink-2);
  padding: 0 3px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--surface);
  padding: 10px 18px;
  border-radius: 2px;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 90;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ============ impresión ============ */
@media print {
  .topbar, .foot, .toast, .pane[data-pane="form"], .card > header, .watermark {
    display: none !important;
  }
  .pane[data-pane="doc"] {
    display: block !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .shell {
    display: block;
    padding: 0;
    max-width: none;
  }
  .right {
    position: static;
  }
  .card {
    border: 0;
    box-shadow: none;
    background: #fff;
  }
  .card:first-child {
    display: none;
  }
  .doc-wrap {
    max-height: none;
    overflow: visible;
  }
  .doc {
    max-width: none;
    padding: 0;
    font-size: 12pt;
    line-height: 1.55;
    color: #000;
    gap: 11px;
  }
  .doc .t-sec {
    color: #000;
  }
  .doc mark {
    background: transparent;
    border-bottom: 1px dashed #000;
  }
  @page {
    margin: 2.5cm;
  }
}

/* ============================================================
   Añadidos de la app: embudo, expediente y backoffice
   ============================================================ */

/* ---- pasos del embudo ---- */
.pasos {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 22px;
  flex-wrap: wrap;
}
.paso {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--rotulo);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.paso .n {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-size: 10.5px;
  background: var(--surface);
}
.paso.on {
  color: var(--accent);
}
.paso.on .n {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.paso.hecho .n {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
}
.paso + .paso::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--line);
  margin-right: 7px;
}

/* ---- precio y llamada a la acción ---- */
.precio {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 16px;
}
.precio .monto {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 300;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--ink);
}
.precio .nota {
  font-size: 12.5px;
  color: var(--muted);
}
.cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}
.incluye {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.incluye li {
  display: flex;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.incluye li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex: none;
}
.incluye.no {
  margin-top: 8px;
}
.incluye.no li::before {
  content: "•";
  color: var(--muted);
}

/* ---- documentos ---- */
.docs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doc-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
}
.doc-row.ok {
  border-color: var(--ok);
  background: var(--ok-soft);
}
.doc-row .est {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}
.doc-row.ok .est {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--paper);
}
.doc-row .nom {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.doc-row .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}
.doc-row .arch {
  font-size: 12px;
  color: var(--ok);
  margin-top: 4px;
  word-break: break-all;
}
.doc-row input[type="file"] {
  display: none;
}
.barra {
  height: 3px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 7px;
}
.barra i {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.2s;
}

/* ---- backoffice ---- */
.admin {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 22px 60px;
}
.tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.tabla th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 11px 13px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tabla td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.tabla tr:last-child td {
  border-bottom: none;
}
.tabla tbody tr:hover {
  background: var(--surface-2);
}
.tabla a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.tabla a:hover {
  text-decoration: underline;
}
.tabla .vacio {
  text-align: center;
  color: var(--muted);
  padding: 34px;
  font-style: italic;
}
.et {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
.et.pagado {
  background: var(--accent-soft);
  border-color: var(--gold);
  color: var(--accent);
}
.et.en_captura, .et.documentos_completos {
  background: var(--warn-soft);
  border-color: var(--warn);
  color: var(--warn);
}
.et.en_revision {
  background: var(--surface-2);
}
.et.listo, .et.presentado {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
}
.et.lead {
  opacity: 0.75;
}
.filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 16px;
}
.filtros input[type="search"] {
  width: auto;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 8px 11px;
  font-size: 14px;
}
.login {
  max-width: 340px;
  margin: 14vh auto;
  padding: 0 20px;
}
.error {
  background: var(--stop-soft);
  border: 1px solid var(--stop);
  color: var(--stop);
  padding: 10px 13px;
  border-radius: 3px;
  font-size: 13px;
  margin-bottom: 14px;
}
.aviso {
  background: var(--accent-soft);
  border: 1px solid var(--gold);
  color: var(--ink-2);
  padding: 11px 14px;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.liga-copiar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.liga-copiar code {
  flex: 1;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 2px;
  word-break: break-all;
  font-family: ui-monospace, Menlo, monospace;
}
.campo-error, input.campo-error, select.campo-error, textarea.campo-error {
  border-color: var(--stop) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--stop) 22%, transparent) !important;
}

/* ---- ruta del proceso ---- */
.ruta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.paso-ruta {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}
.paso-ruta:first-child {
  border-top: 0;
}
.paso-ruta .est {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}
.paso-ruta.hecho .est {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--paper);
}
.paso-ruta.on .est {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.paso-ruta .txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.paso-ruta .nom {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}
.paso-ruta.hecho .nom,
.paso-ruta.on .nom {
  color: var(--ink);
}
.paso-ruta.on .nom {
  font-weight: 600;
}
.paso-ruta .sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
/* El detalle sólo se lee en el paso vigente; el resto queda de una línea. */
.paso-ruta:not(.on):not(.hecho) .sub {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.paso-ruta .quien {
  font-style: italic;
}
.paso-ruta .btn.mini {
  align-self: flex-start;
  margin-top: 5px;
}

/* En el backoffice cada paso lleva su casilla a la derecha. */
.ruta.admin .paso-ruta {
  grid-template-columns: 24px minmax(0, 1fr) auto;
}
.ruta.admin .marca {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.ruta.admin .marca input {
  width: auto;
  margin: 0;
}

/* ---- envío del cuestionario ---- */
#q2 {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.envio {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 4px 0 26px;
}
.envio .help {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

/* Resumen de lo enviado: consultable, nunca editable. */
.recap {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  padding: 13px 15px;
  margin: 0 0 26px;
}
.recap > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.recap[open] > summary {
  margin-bottom: 14px;
}
.recap .help {
  margin: 14px 0 0;
}

@media (max-width: 560px) {
  .card > header h2 {
    font-size: 21px;
  }
}
