/*
 * Proposal E (D completa): Public site and Particular workspace styles.
 * Based on design/propuestas/e-completa/public.css + public-extra.css,
 * extended with production modal, auth, legal, error, and mobile menu styles.
 */
:root {
  --text-sm: 16px;
  --text-base: 18px;
  --text-lg: 21px;
  --text-xl: 26px;
  --text-2xl: 34px;
  --text-3xl: clamp(34px, 4.6vw, 52px);
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 40px;
  --sp-7: 64px;
  --r-control: 10px;
  --r-card: 18px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--text-base)/1.6 var(--font-body);
}
a {
  color: var(--plum);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}
a:hover { color: var(--plum-700); }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; }
.num { font-variant-numeric: lining-nums tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 0.9em; white-space: nowrap; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-2xl); line-height: 1.15; }
h2 { font-size: var(--text-xl); line-height: 1.25; }
h3 { font-size: var(--text-lg); line-height: 1.3; }
p { margin: 0; }
.muted { color: var(--ink-3); }
.mt { margin-top: var(--sp-5); }
.mt-s { margin-top: var(--sp-3); }
.mb-s { margin-bottom: var(--sp-3); }

/* ---------- Top bar (public + particular) ---------- */
.top {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 40;
}
.top-in, .topbar-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: nowrap;
}
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font: 500 20px var(--font-display);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}
.brand:hover { color: var(--plum); }
.top nav {
  margin-left: auto;
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: nowrap;
}
.top nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 9px;
  border-radius: var(--r-control);
  font-size: 15px;
  white-space: nowrap;
}
.top nav a:hover { background: var(--paper); color: var(--plum); }
.top nav a[aria-current="page"] { color: var(--plum); background: var(--plum-50); font-weight: 700; }
.top nav .btn { margin-left: 6px; padding: 0 16px; }
.top nav .btn:not(.btn-sec) { color: #fff; }
.top nav .btn.btn-sec { color: var(--plum); }
.top nav form { margin: 0; display: inline-flex; }

/* Mobile <details class="mobile-menu"> */
.mobile-menu {
  display: none;
  position: relative;
  margin-left: auto;
}
.mobile-menu summary {
  list-style: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(300px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 12px 32px rgba(29, 27, 22, 0.16);
  padding: 10px;
  display: grid;
  gap: 4px;
  z-index: 60;
}
.mobile-menu-panel a, .mobile-menu-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--r-control);
  color: var(--ink);
  text-decoration: none;
  font: 600 var(--text-sm)/1.3 var(--font-body);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.mobile-menu-panel a:hover, .mobile-menu-btn:hover { background: var(--plum-50); color: var(--plum); }
.mobile-menu-panel a.mobile-menu-cta { background: var(--plum); color: #fff; text-align: center; }
.mobile-menu-sep { height: 1px; background: var(--line-2); margin: 4px 0; }

/* ---------- Containers & Typography ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-7);
}
.wrap-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-7);
}
.wrap-auth {
  max-width: 520px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-7);
}
.read { max-width: 68ch; }
.sec { padding: var(--sp-7) 0 0; }
.sec > .in, .in { max-width: 1080px; margin: 0 auto; padding: 0 var(--sp-5); }
.sec h2 { font-size: var(--text-2xl); }
.sec .sub { color: var(--ink-2); max-width: 62ch; margin-top: var(--sp-2); }
.kick { display: block; color: var(--plum); font-weight: 700; font-size: var(--text-sm); margin-bottom: var(--sp-2); }

/* ---------- Buttons & Chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: var(--r-control);
  border: 2px solid var(--plum);
  background: var(--plum);
  color: #fff;
  font: 700 var(--text-base)/1.1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--plum-700); border-color: var(--plum-700); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sec { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn-sec:hover { background: var(--plum-50); color: var(--plum-700); border-color: var(--plum-700); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); padding: 0 12px; }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); border-color: transparent; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #891F1F; border-color: #891F1F; }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: var(--text-sm); }
.link-btn {
  background: none;
  border: 0;
  color: var(--plum);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  padding: 8px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: var(--text-sm);
  font-weight: 700;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip-draft { background: var(--line-2); color: var(--ink-2); }
.chip-active { background: var(--plum-50); color: var(--plum); }
.chip-ready { background: var(--ok-50); color: var(--ok); }
.chip-arch { color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.chip-demo { background: var(--warn-50); color: var(--warn); }
.chip-bad { background: var(--bad-50); color: var(--bad); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-5);
}
section + section { margin-top: var(--sp-6); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 700; margin-bottom: 6px; font-size: var(--text-sm); }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  border: 2px solid #B8AF9F;
  border-radius: var(--r-control);
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}
textarea { min-height: 132px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--plum);
  outline: none;
  box-shadow: 0 0 0 3px var(--plum-50);
}
.field { display: grid; gap: 2px; margin-bottom: var(--sp-4); }
.field-help, .help { font-size: 14px; color: var(--ink-3); margin-top: 4px; font-weight: 400; }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--bad); font-size: 14px; font-weight: 600; }
.chk {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  cursor: pointer;
}
.chk input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin-top: 3px;
  flex: none;
}

/* ---------- Hero with timeline protagonist ---------- */
.h-hero { padding: var(--sp-6) 0 0; }
.h-hero h1 {
  font-size: clamp(36px, 4.5vw, 58px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.025em;
  max-width: 22ch;
  text-wrap: balance;
}
.h-hero h1 b { font-weight: 600; color: var(--plum); }
.h-hero .lead { font-size: var(--text-lg); color: var(--ink-2); max-width: 60ch; margin-top: var(--sp-3); }
.h-stage {
  margin-top: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  box-shadow: 0 1px 2px rgba(29,27,22,.06), 0 18px 40px rgba(29,27,22,.08);
}
.h-stage .say { display: flex; justify-content: space-between; gap: var(--sp-3) var(--sp-5); flex-wrap: wrap; align-items: baseline; }
.h-stage .say p { font: 400 var(--text-xl)/1.3 var(--font-display); }
.h-stage .say b { color: var(--plum); font-weight: 600; }
.h-stage .tl-scroll { overflow-x: auto; margin-top: var(--sp-3); }
.h-stage svg.tl { min-width: 980px; }
.h-stage .after {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  border-top: 1px solid var(--line-2);
  margin-top: var(--sp-3);
  padding-top: var(--sp-4);
}
.h-stage .after p { font-size: var(--text-sm); color: var(--ink-2); }
.h-stage .after b { display: block; color: var(--ink); font-size: var(--text-base); }
.h-acts { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; margin-top: var(--sp-5); }
.h-acts .fresh { color: var(--ink-3); font-size: var(--text-sm); }
.sublinks { display: flex; gap: var(--sp-5); flex-wrap: wrap; margin-top: var(--sp-3); font-size: var(--text-sm); }

/* ---------- "Contanos con tus palabras" ---------- */
.situ {
  list-style: none;
  padding: 0;
  margin: var(--sp-5) 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}
.situ a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-1) var(--sp-4);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-4) var(--sp-5);
  color: var(--ink);
  text-decoration: none;
  min-height: 88px;
}
.situ a:hover { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.situ q { font: 400 var(--text-lg)/1.3 var(--font-display); quotes: "“" "”"; }
.situ small { grid-column: 1; color: var(--ink-3); font-size: var(--text-sm); }
.situ .go { grid-row: 1 / span 2; grid-column: 2; color: var(--plum); font-weight: 700; font-size: var(--text-sm); white-space: nowrap; }
.note-est { margin-top: var(--sp-3); font-size: var(--text-sm); color: var(--ink-3); }

/* ---------- Steps & Principles ---------- */
.p-steps { counter-reset: s; list-style: none; padding: 0; margin: var(--sp-4) 0 0; }
.p-steps li { counter-increment: s; padding: var(--sp-3) 0 var(--sp-3) 56px; position: relative; border-bottom: 1px solid var(--line-2); }
.p-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--plum-50);
  color: var(--plum);
  font: 600 20px/40px var(--font-display);
  text-align: center;
}
.princ { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); margin-top: var(--sp-5); }
.princ div { border-top: 2px solid var(--plum); padding-top: var(--sp-3); }
.princ b { display: block; font: 500 var(--text-lg)/1.3 var(--font-display); }
.princ p { color: var(--ink-2); margin-top: var(--sp-2); }

/* ---------- Quick Calculator ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--sp-5); margin-top: var(--sp-5); align-items: start; }
.calc form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); align-items: end; }
.calc form .full { grid-column: 1 / -1; }
.verdict { border-radius: var(--r-card); padding: var(--sp-4) var(--sp-5); background: var(--warn-50); color: var(--ink); }
.verdict.ok { background: var(--ok-50); }
.verdict.ok b { color: var(--ok); }
.verdict b { color: var(--warn); }
.res-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  margin-top: var(--sp-3);
  background: var(--surface);
}
.res-kpis div { padding: var(--sp-3) var(--sp-4); }
.res-kpis div + div { border-left: 1px solid var(--line); }
.res-kpis dt { color: var(--ink-3); font-size: var(--text-sm); }
.res-kpis dd { margin: 0; font: 500 var(--text-xl)/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.vias { margin-top: var(--sp-4); }
.vias h3 { font-size: var(--text-lg); }
.via { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-1) var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line-2); }
.via b { font-weight: 700; }
.via span { color: var(--ink-2); font-size: var(--text-sm); }
.via .st { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.cta-demo {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--sp-4);
  background: var(--plum-50);
  border-radius: var(--r-card);
  padding: var(--sp-4) var(--sp-5);
}

/* ---------- Features, Letter Preview, Regimens ---------- */
.feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-6); margin-top: var(--sp-5); }
.feats div { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line-2); }
.feats b { display: block; font-weight: 700; }
.feats p { color: var(--ink-2); margin-top: 4px; }

.p-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7); align-items: center; }
.letter {
  background: #fff;
  aspect-ratio: 210 / 297;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 26px;
  transform: rotate(1.4deg);
  box-shadow: 0 1px 2px rgba(29,27,22,.12), 0 20px 44px rgba(29,27,22,.18);
  font-size: 10px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line-2);
}
.letter .lh { display: flex; gap: 8px; align-items: center; color: var(--ink-3); }
.letter .lh i { width: 22px; height: 22px; border-radius: 50%; background: var(--plum); display: inline-block; }
.letter .lt { font: 400 17px/1.2 var(--font-display); }
.letter .lt b { color: var(--plum); font-weight: 600; }
.letter .lr span { display: block; height: 6px; margin: 7px 0; border-radius: 2px; background: var(--line-2); }
.letter .lr span:nth-child(3n) { width: 70%; }

.regs { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; padding: 0; margin: var(--sp-4) 0 0; }
.regs li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 14px; font-size: var(--text-sm); }

/* ---------- Prices, FAQ, Contact, Legal Footer ---------- */
.tabs { display: inline-flex; border: 2px solid var(--plum); border-radius: var(--r-control); overflow: hidden; margin-top: var(--sp-4); }
.tabs a { padding: 10px 18px; text-decoration: none; color: var(--plum); font-weight: 700; font-size: var(--text-sm); }
.tabs a[aria-current="page"] { background: var(--plum); color: #fff; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-5); }
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.plan .btn, .plan form { margin-top: auto; align-self: flex-start; }
.plan.main { border: 2px solid var(--plum); }
.plan .p { font: 500 var(--text-2xl)/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.plan ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); font-size: var(--text-sm); }
.plan .rib { justify-self: start; }

.faq { margin-top: var(--sp-4); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: var(--sp-4) 0; font: 500 var(--text-lg)/1.3 var(--font-display); min-height: 44px; }
.faq details p { padding: 0 0 var(--sp-4); color: var(--ink-2); max-width: 68ch; }

.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--sp-6); margin-top: var(--sp-5); align-items: start; }
.contact form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.contact form .full { grid-column: 1 / -1; }
.channels { list-style: none; padding: 0; margin: var(--sp-4) 0 0; display: grid; gap: var(--sp-3); }
.channels li { display: grid; gap: 2px; }
.channels small { color: var(--ink-3); }

.legal {
  margin-top: var(--sp-7);
  background: var(--ink);
  color: #E9E3D8;
  padding: var(--sp-6) 0 var(--sp-5);
  font-size: var(--text-sm);
}
.legal a { color: #fff; }
.legal .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-6); }
.legal h2 { font: 500 var(--text-lg) var(--font-display); color: #fff; margin-bottom: var(--sp-2); }
.legal ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.legal .arr a { font-weight: 700; text-decoration-thickness: 2px; }
.legal .aviso {
  border-top: 1px solid #4A443B;
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  align-items: center;
  color: #CFC7B8;
}
.legal .prov { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; flex-wrap: nowrap; }
.legal .prov img { height: 20px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }

/* ---------- Particular Case & Lista ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.hello h1 { font-size: var(--text-3xl); line-height: 1.08; }
.hello p { font-size: var(--text-lg); color: var(--ink-2); margin-top: var(--sp-2); max-width: 52ch; }
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); list-style: none; padding: 0; margin: 0; }
.case-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-5); display: grid; gap: var(--sp-3); }
.case-card .top-row { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: center; }
.case-card h3 a { color: var(--ink); text-decoration: none; }
.case-card h3 a:hover { text-decoration: underline; }
.case-card .what { color: var(--ink-2); font-size: var(--text-sm); }
.case-card .acts { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.case-card .meta { font-size: var(--text-sm); color: var(--ink-3); }
.toolbar { display: flex; gap: var(--sp-3); align-items: end; flex-wrap: wrap; margin-bottom: var(--sp-4); }
.toolbar .field { flex: 1; min-width: 240px; margin-bottom: 0; }
.start { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-5); align-items: center; background: var(--plum-50); border-radius: var(--r-card); padding: var(--sp-5); }
.start ol { margin: var(--sp-2) 0 0; padding-left: 1.2em; color: var(--ink-2); }

.crumb { font-size: var(--text-sm); color: var(--ink-3); margin-bottom: var(--sp-4); }
.demo-banner {
  background: var(--warn-50);
  color: var(--warn);
  border-radius: var(--r-control);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--sp-4);
  font-size: var(--text-sm);
}
.steps-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); list-style: none; padding: 0; margin: 0 0 var(--sp-4); counter-reset: st; }
.steps-strip li { counter-increment: st; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-control); padding: var(--sp-2) var(--sp-3); font-size: var(--text-sm); display: flex; gap: var(--sp-2); align-items: center; }
.steps-strip li::before { content: counter(st); width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--line-2); color: var(--ink-2); font-weight: 700; display: grid; place-items: center; }
.steps-strip li.done::before { content: "✓"; background: var(--ok-50); color: var(--ok); }
.steps-strip li.now { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.guide-bar { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-5); font-size: var(--text-sm); color: var(--ink-2); }
.case-head { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; align-items: center; }
.case-head .meta { color: var(--ink-3); font-size: var(--text-sm); }

.answer { padding: var(--sp-5) 0 var(--sp-4); }
.answer .who { font-size: var(--text-lg); color: var(--ink-2); margin-bottom: var(--sp-2); }
.estim {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 14px;
  margin-bottom: var(--sp-3);
}
.estim::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--ink-3); }
.answer .big {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.02em;
  max-width: 26ch;
  text-wrap: balance;
}
.answer .big b { font-weight: 600; color: var(--plum); }
.answer .plain { font-size: var(--text-lg); color: var(--ink-2); margin-top: var(--sp-3); max-width: 60ch; }
.answer .acts { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap; }
.calc-meta { margin-top: var(--sp-3); font-size: var(--text-sm); color: var(--ink-3); }

.sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.sum.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sum div { padding: var(--sp-4) var(--sp-5); border-right: 1px solid var(--line); }
.sum div:last-child { border-right: 0; }
.sum dt { color: var(--ink-3); font-size: var(--text-sm); }
.sum dd { margin: 0; font: 500 clamp(20px, 2vw, 24px)/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.sum dd.warn { color: var(--warn); }
.sum dd.ok { color: var(--ok); }
.sum dd small { display: block; font: 400 14px/1.4 var(--font-body); color: var(--ink-3); margin-top: 2px; }

.laws { margin-top: var(--sp-4); }
.laws summary { cursor: pointer; color: var(--plum); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.laws ul { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; padding: 0; margin: var(--sp-2) 0 0; }
.laws li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 12px; font-size: var(--text-sm); }

.load { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); counter-reset: ld; margin-top: var(--sp-4); }
.load button, .load a {
  counter-increment: ld;
  display: grid;
  gap: 2px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-3) var(--sp-4);
  text-decoration: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.load button:hover, .load a:hover { border-color: var(--plum); }
.load b::before { content: counter(ld) ". "; color: var(--plum); }
.load small { color: var(--ink-3); font-size: 14px; }

.ribbon-card { padding: var(--sp-5) var(--sp-5) var(--sp-4); }
.ribbon-card .tl-scroll { overflow-x: auto; }
.ribbon-card svg.tl { min-width: 760px; }
.story-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-4); flex-wrap: wrap; }
.story { list-style: none; margin: var(--sp-5) 0 0; padding: 0; border-left: 2px solid var(--line); }
.story li { position: relative; padding: 0 0 var(--sp-4) var(--sp-6); display: grid; grid-template-columns: 9.5em 1fr auto; gap: var(--sp-2) var(--sp-4); align-items: baseline; }
.story li::before { content: ""; position: absolute; left: -8px; top: 8px; width: 14px; height: 14px; border-radius: 3px; background: var(--surface); border: 2px solid var(--ink-3); }
.story li.dep::before { background: var(--tl-dep); border-color: var(--tl-dep); }
.story li.aut::before { background: repeating-linear-gradient(45deg, var(--tl-aut) 0 3px, #F2D3A6 3px 6px); border-color: var(--tl-aut); }
.story li.mono::before { background: var(--tl-mono); border-color: var(--tl-mono); }
.story li.casas::before { background: repeating-linear-gradient(90deg, var(--tl-casas) 0 3px, #A9D1B0 3px 6px); border-color: var(--tl-casas); }
.story li.mora::before { background: var(--plum-50); border-color: var(--tl-mora); }
.story li.gap-ok::before { background: repeating-linear-gradient(-45deg, var(--tl-gap-ok) 0 1.5px, #fff 1.5px 5px); border-color: var(--tl-gap-ok); }
.story li.gap-bad::before { background: repeating-linear-gradient(-45deg, var(--tl-gap-bad) 0 1.5px, #fff 1.5px 5px); border-color: var(--tl-gap-bad); }
.story .when { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: var(--text-sm); }
.story .dur { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.story .gap-ok .what b { color: var(--ok); }

.options { display: grid; gap: var(--sp-4); margin-top: var(--sp-4); }
.option { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-3) var(--sp-5); align-items: center; }
.option.rec { border: 2px solid var(--plum); }
.option .res { font: 500 var(--text-xl) var(--font-display); text-align: right; font-variant-numeric: tabular-nums; }
.option .res small { display: block; font: 400 var(--text-sm) var(--font-body); color: var(--ink-3); }
.option p { color: var(--ink-2); }
.option .tag { color: var(--plum); font-weight: 700; font-size: var(--text-sm); }
.option form { margin-top: var(--sp-2); }
.applied { display: flex; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; align-items: center; background: var(--ok-50); color: var(--ok); border-radius: var(--r-control); padding: var(--sp-3) var(--sp-4); }

.pay { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-6); align-items: center; margin-top: var(--sp-3); }
.pay .neto b { display: block; font: 500 46px/1.05 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pay .neto small { color: var(--ink-3); }
details.more { margin-top: var(--sp-4); border-top: 1px solid var(--line-2); padding-top: var(--sp-3); }
details.more summary { cursor: pointer; color: var(--plum); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
dl.pairs { display: grid; grid-template-columns: 1fr auto; margin: 0; }
dl.pairs dt, dl.pairs dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
dl.pairs dd { text-align: right; font-variant-numeric: tabular-nums; }
dl.pairs .tot { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.neg { color: var(--bad); }
.hint { background: var(--warn-50); color: var(--warn); border-radius: var(--r-control); padding: var(--sp-3) var(--sp-4); margin-top: var(--sp-4); font-size: var(--text-sm); }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-3); align-items: end; margin-top: var(--sp-4); border-top: 1px solid var(--line-2); padding-top: var(--sp-4); }

table { width: 100%; border-collapse: collapse; }
.table-scroll { overflow-x: auto; }
.t-jobs th { text-align: left; color: var(--ink-3); font-weight: 700; font-size: var(--text-sm); padding: 10px; border-bottom: 2px solid var(--line); }
.t-jobs td { padding: 14px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t-jobs tr.tramo-hl td { background: var(--plum-50); }
.t-jobs .r { text-align: right; }
.t-jobs .acts { white-space: nowrap; text-align: right; }
.t-jobs .extra { display: block; font-size: 14px; color: var(--ink-3); }
.t-jobs .flag { display: inline-block; font-size: 13px; background: var(--warn-50); color: var(--warn); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.t-jobs .flag.n { background: var(--line-2); color: var(--ink-2); }
.t-jobs select { min-height: 40px; width: auto; font-size: 14px; padding: 0 8px; }
.toggle { width: 44px; height: 26px; border-radius: 13px; border: 0; background: var(--plum); position: relative; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.toggle[aria-pressed="false"] { background: #B8AF9F; }
.toggle[aria-pressed="false"]::after { right: auto; left: 4px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); align-items: start; }
.grid-2 > .card, .grid-2 > .panel { margin-top: 0; }
.checks { list-style: none; padding: 0; margin: var(--sp-3) 0 0; }
.checks li { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line-2); }
.checks label { font-weight: 400; display: flex; gap: var(--sp-3); align-items: flex-start; margin: 0; font-size: var(--text-base); }
.checks input[type="checkbox"] { width: 22px; min-height: 22px; height: 22px; margin-top: 3px; flex: none; }
.checks small { display: block; color: var(--ink-3); font-size: 14px; }
.req { list-style: none; padding: 0; margin: var(--sp-3) 0 0; }
.req li { display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-2); padding: 6px 0; }
.req .y { color: var(--ok); font-weight: 700; }
.req .n { color: var(--bad); font-weight: 700; }
.req .q { color: var(--warn); font-weight: 700; }
details.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 0 var(--sp-5); }
details.acc + details.acc { margin-top: var(--sp-3); }
details.acc summary { cursor: pointer; padding: var(--sp-4) 0; font: 500 var(--text-lg)/1.3 var(--font-display); min-height: 52px; }
details.acc > div { padding-bottom: var(--sp-4); }
.foot-legal { margin-top: var(--sp-6); font-size: var(--text-sm); color: var(--ink-3); }

/* ---------- Native <dialog> modals ---------- */
dialog.dlg, dialog.login-dlg {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow: 0 24px 60px rgba(29, 27, 22, 0.28);
}
dialog.dlg-wide { width: min(920px, calc(100vw - 24px)); }
dialog.login-dlg { width: min(460px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(29, 27, 22, 0.56); backdrop-filter: blur(2px); }
.dlg-head, .login-dlg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line-2);
}
.dlg-head h2, .login-dlg-head h2 { font: 500 var(--text-xl) var(--font-display); }
.dlg-body, .login-dlg-inner { padding: var(--sp-5); }
.login-dlg-inner { padding: 0; }
.login-dlg-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.login-kicker { font-size: 13px; font-weight: 700; color: var(--plum); text-transform: uppercase; letter-spacing: 0.04em; }
.dlg-close, .login-close {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.dlg-close:hover, .login-close:hover { background: var(--plum-50); color: var(--plum); }
.dlg-grid-fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.dlg-grid-fields .full { grid-column: 1 / -1; }
.dlg-foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--line-2);
  background: var(--paper);
}
.login-dlg-foot {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-2);
  font-size: var(--text-sm);
}
.terms-scroll {
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  padding: var(--sp-4);
  background: var(--paper);
  font-size: var(--text-sm);
}
.terms-progress { height: 5px; background: var(--line-2); width: 100%; }
.terms-progress-fill { height: 100%; width: 0; background: var(--plum); transition: width 0.12s linear; }
.terms-end-marker {
  margin-top: var(--sp-4);
  padding: var(--sp-3);
  border-top: 2px dashed var(--line);
  text-align: center;
  font-weight: 700;
  color: var(--plum);
}
.terms-status { font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
.terms-status.ok { background: var(--ok-50); color: var(--ok); }
.terms-status.pending { background: var(--warn-50); color: var(--warn); }
.terms-hint { font-size: 14px; color: var(--ink-3); }
.terms-hint.ready { color: var(--ok); font-weight: 700; }

/* Registration account type cards */
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.role-card {
  display: grid;
  gap: 4px;
  padding: var(--sp-4);
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  cursor: pointer;
  font-weight: 400;
}
.role-card input[type="radio"] { width: auto; min-height: 0; margin: 0 0 4px; }
.role-card strong { font-family: var(--font-display); font-size: var(--text-lg); color: var(--ink); }
.role-card span { font-size: 14px; color: var(--ink-2); }
.role-card.selected { border-color: var(--plum); background: var(--plum-50); }
.is-hidden { display: none; }

/* Callout tones */
.box-ok { background: var(--ok-50); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: var(--r-card); padding: var(--sp-4); }
.box-warn { background: var(--warn-50); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: var(--r-card); padding: var(--sp-4); }
.box-plum { background: var(--plum-50); border: 1px solid var(--plum-200); border-radius: var(--r-card); padding: var(--sp-4); }
.svg-guide { width: 100%; height: auto; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); display: block; }
.a4-sample { max-width: 820px; margin: var(--sp-5) auto 0; border-top: 4px solid var(--plum); }
.a4-sample-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: var(--sp-3); margin-bottom: var(--sp-4); }
.err-acts { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; margin-top: var(--sp-5); }
.text-center { text-align: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

/* ---------- Legal prose & Error pages ---------- */
.prose h1 { margin-bottom: var(--sp-3); }
.prose h2 { margin-top: var(--sp-5); margin-bottom: var(--sp-2); color: var(--plum); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: var(--sp-3); }
.prose ul, .prose ol { padding-left: 1.4em; color: var(--ink-2); }
.prose li { margin: 6px 0; }
.err-box {
  max-width: 600px;
  margin: var(--sp-7) auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-6);
}
.err-code { font: 600 54px/1 var(--font-display); color: var(--plum); }
.err-id { font-family: var(--font-mono); font-size: 14px; color: var(--ink-3); margin-top: var(--sp-3); }

@media (max-width: 1120px) {
  .top nav a[href*="#como"], .top nav a[href*="#contacto"] { display: none; }
}
@media (max-width: 860px) {
  .top nav { display: none; }
  .mobile-menu { display: block; }
  .situ, .princ, .calc, .calc form, .feats, .plans, .contact, .contact form,
  .legal .cols, .h-stage .after, .grid-2, .load, .sum, .sum.four, .cases,
  .pay, .start, .option, .p-cols, .dlg-grid-fields {
    grid-template-columns: 1fr;
  }
  .steps-strip { grid-template-columns: 1fr 1fr; }
  .res-kpis { grid-template-columns: 1fr; }
  .res-kpis div + div { border-left: 0; border-top: 1px solid var(--line); }
  .sum div, .sum.four div { border-right: 0; border-bottom: 1px solid var(--line); }
  .story li { grid-template-columns: 1fr; padding-left: var(--sp-5); }
  .sec { padding-top: var(--sp-6); }
}
