:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #334155;
  --muted: #475569;
  --line: #cbd5e1;
  --line-2: #e2e8f0;
  --paper: #f8fafc;
  --desk: #e2e8f0;
  --white: #ffffff;
  --accent: #38bdf8;
  --strong: #2563eb;
  --strong-hover: #1d4ed8;
  --on-strong: #ffffff;
  --link: #2563eb;
  --ok: #166534; --ok-bg: #dcfce7;
  --warn: #9a3412; --warn-bg: #ffedd5; --warn-line: #ea580c;
  --sans: Archivo, 'Helvetica Neue', Helvetica, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--desk); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); }
button, select, input, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
code { font-family: var(--mono); font-size: .92em; background: var(--line-2); padding: 1px 5px; }
.mono { font-family: var(--mono); }
.muted { color: #94a3b8; }
.muted-ink { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; color: var(--link); }
.section-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin: 8px 0 12px; }
.note { font-size: 13px; color: var(--muted); }
.intro { font-size: 16px; color: var(--ink-3); max-width: 70ch; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 18px;
  background: var(--strong); color: var(--on-strong); border: 0; text-decoration: none; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--strong-hover); color: var(--on-strong); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); background: transparent; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 6px 0; color: var(--link); font-weight: 700; font-size: 14px; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, .node:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── top bar ─────────────────────────────────── */
.topbar {
  background: var(--ink); color: #e2e8f0; display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 22px; padding: 0 28px; min-height: 56px; border-bottom: 3px solid var(--accent);
}
.brand { font-family: var(--mono); font-weight: 600; letter-spacing: 0.16em; font-size: 13px; color: #e2e8f0; text-decoration: none; padding: 16px 0; }
.brand span { color: var(--accent); }
.mainnav { display: flex; flex-wrap: wrap; gap: 2px; }
.mainnav a { color: #cbd5e1; text-decoration: none; font-weight: 600; font-size: 14px; padding: 0 12px; min-height: 56px; display: inline-flex; align-items: center; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.mainnav a:hover { color: #fff; }
.mainnav a[aria-current="page"] { color: #fff; border-bottom-color: #fff; }
.crumb { display: inline-flex; gap: 10px; align-items: center; color: #64748b; margin-left: auto; }
.crumb a { color: #fff; font-weight: 700; text-decoration: none; }

.time-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 28px; background: #fef3c7; color: #713f12; border-bottom: 1px solid #fcd34d; }
.time-banner .mono { font-size: 11px; letter-spacing: .12em; }
.time-banner a:not(.btn) { color: #713f12; font-weight: 700; }
.time-banner .btn { background: #713f12; color: #fff; }

/* ── home / pages ─────────────────────────────── */
.home { width: 100%; max-width: 1240px; margin: 0 auto; padding: 40px 28px 64px; display: flex; flex-direction: column; gap: 26px; }
.home-head { display: flex; flex-direction: column; gap: 8px; border-bottom: 2px solid var(--ink); padding-bottom: 18px; }
.home-head h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 900; letter-spacing: -0.04em; line-height: 0.95; }
.home-head p { color: var(--muted); max-width: 62ch; font-size: 17px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 24px; }

.book { display: flex; color: #f8fafc; background: var(--ink); min-height: 400px; box-shadow: 0 2px 4px rgba(15,23,42,.12), 0 20px 50px rgba(15,23,42,.18); transition: transform .15s ease, box-shadow .15s ease; }
.book:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(15,23,42,.14), 0 28px 60px rgba(15,23,42,.24); }
.book-spine { width: 14px; flex: none; background: var(--book-accent); }
.book-body { flex: 1; min-width: 0; padding: 28px 32px 24px; display: flex; flex-direction: column; gap: 10px; }
.book-top { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.14em; color: var(--book-accent); }
.book-client { margin-top: 18px; color: #94a3b8; font-size: 14px; }
.book h2 { font-size: 52px; line-height: .95; font-weight: 900; letter-spacing: -0.04em; }
.book h2 a { color: inherit; text-decoration: none; }
.book p { color: #cbd5e1; font-size: 16px; max-width: 36ch; }
.book-parts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.book-parts a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; font-size: 13px; color: #e2e8f0; text-decoration: none; box-shadow: inset 0 0 0 1px #334155; }
.book-parts a:hover { box-shadow: inset 0 0 0 1px var(--book-accent); color: #fff; }
.book-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.book-phase { display: flex; justify-content: space-between; font-size: 13px; color: #cbd5e1; }
.book-open { align-self: flex-start; margin-top: 4px; font-weight: 700; color: var(--book-accent); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.bar { height: 6px; background: var(--ink-2); }
.bar > div { height: 6px; background: var(--accent); }

/* ── cover / dashboard ────────────────────────── */
.cover-wrap { flex: 1; display: flex; justify-content: center; padding: 32px 28px; }
.spread { display: flex; flex-wrap: wrap; width: 100%; max-width: 1240px; box-shadow: 0 2px 4px rgba(15,23,42,.12), 0 24px 60px rgba(15,23,42,.18); }
.cover { flex: 1 1 400px; min-width: 0; background: var(--ink); color: #f8fafc; padding: 44px 44px 36px; display: flex; flex-direction: column; gap: 28px; }
.cover-top { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.14em; color: var(--accent); }
.cover-title { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.cover h1 { font-size: clamp(52px, 7vw, 76px); line-height: .92; font-weight: 900; letter-spacing: -0.04em; }
.cover-title p { font-size: 18px; color: #cbd5e1; max-width: 30ch; }
.cover-site { color: var(--accent); font-family: var(--mono); font-size: 13px; text-decoration: none; }
.cover-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.cover-phase { display: flex; justify-content: space-between; font-size: 13px; color: #cbd5e1; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; background: var(--ink-2); margin-top: 14px; }
.facts > div { background: var(--ink); padding: 12px 12px 12px 0; display: flex; flex-direction: column; gap: 2px; }
.facts > div + div { padding-left: 12px; }
.facts .mono:first-child { font-size: 11px; color: #64748b; }
.index { flex: 1.3 1 480px; min-width: 0; background: var(--paper); padding: 40px 40px 32px; display: flex; flex-direction: column; gap: 18px; }
.index-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.index-head h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.part { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 108px; transition: border-color .12s, transform .12s; }
.part:hover { border-color: var(--ink); transform: translateY(-2px); }
.part .num { font-size: 12px; color: var(--link); font-weight: 600; }
.part strong { font-size: 18px; letter-spacing: -0.01em; }
.part span:last-child { font-size: 13px; color: var(--muted); }

/* ── chapter layout ──────────────────────────── */
.book-layout { flex: 1; display: flex; flex-wrap: wrap; width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px 28px; align-items: flex-start; }
.toc { flex: 1 1 210px; max-width: 240px; background: var(--ink); color: #cbd5e1; padding: 16px 0; position: sticky; top: 16px; }
.toc a { display: flex; align-items: center; gap: 10px; padding: 0 18px; min-height: 42px; text-decoration: none; font-size: 14px; color: #cbd5e1; border-left: 3px solid transparent; }
.toc a .mono { font-size: 12px; width: 22px; }
.toc a:hover { color: #fff; }
.toc a[aria-current="page"] { background: var(--ink-2); color: #fff; font-weight: 700; border-left-color: var(--accent); }
.toc .toc-back { font-size: 11px; letter-spacing: 0.14em; color: var(--accent); min-height: 32px; margin-bottom: 6px; }
.page { flex: 999 1 640px; min-width: 0; min-height: 760px; background: var(--paper); padding: 32px 40px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 2px 4px rgba(15,23,42,.08), 0 18px 40px rgba(15,23,42,.12); }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; border-bottom: 2px solid var(--ink); padding-bottom: 14px; }
.page-head h1 { margin-top: 4px; font-size: clamp(30px, 4vw, 40px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; }
.pager { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.pager-prev { font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* tags & pills */
.tag { align-self: flex-start; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; background: var(--line-2); color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .tag { font-size: 11px; padding: 5px 10px; }
.t-avance { color: #1d4ed8; background: #dbeafe; }
.t-decision { color: #6d28d9; background: #ede9fe; }
.t-reunion { color: #0f766e; background: #ccfbf1; }
.t-entrega { color: #166534; background: #dcfce7; }
.t-agente { color: #9d174d; background: #fce7f3; }
.t-revision { color: #854d0e; background: #fef9c3; }
.t-cobro { color: #155e75; background: #cffafe; }
.t-pendiente { color: #9a3412; background: #ffedd5; }
.pill { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 4px 10px; white-space: nowrap; background: var(--line-2); color: var(--ink-3); }
.p-ok, .p-pagado { color: var(--ok); background: var(--ok-bg); }
.p-rev, .p-pendiente { color: var(--warn); background: var(--warn-bg); }
.empty { border: 2px dashed var(--line); padding: 32px 26px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.empty p { color: var(--muted); font-size: 16px; max-width: 56ch; }
.empty.wide { grid-column: 1 / -1; }

/* segmented / filters */
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--white); align-self: flex-start; }
.seg.wrap { gap: 0; }
.seg button { background: transparent; border: 0; padding: 8px 14px; min-height: 40px; font-weight: 600; font-size: 14px; color: var(--ink-3); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; }

/* ── calendar ─────────────────────────────────── */
.timeline-wrap { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.cal-col { flex: 1 1 300px; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.calendar { background: var(--white); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.cal-head { display: flex; gap: 6px; align-items: center; }
.cal-head select { flex: 1; min-width: 0; min-height: 40px; border: 1px solid var(--line); background: var(--white); padding: 6px 8px; font-weight: 700; }
.icon-btn { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 20px; }
.icon-btn:hover { border-color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal-dow { font-size: 10.5px; color: #64748b; padding-bottom: 2px; }
.cal-day { position: relative; min-height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 13px; background: #f1f5f9; color: var(--ink); text-decoration: none; }
.cal-day:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-day small { font-size: 9.5px; line-height: 1; }
.cal-day.future { color: #94a3b8; }
.cal-day.lo { background: #bfdbfe; font-weight: 700; }
.cal-day.mid { background: #60a5fa; color: #fff; font-weight: 700; }
.cal-day.hi { background: #1d4ed8; color: #fff; font-weight: 700; }
.cal-day.today { outline: 2px dashed var(--ink); outline-offset: -2px; }
.cal-day.sel { background: #f59e0b; color: #111; font-weight: 800; box-shadow: 0 0 0 2px #111; }
.cal-day .dots { position: absolute; bottom: 4px; display: flex; gap: 2px; }
.cal-day .dots i { width: 6px; height: 6px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.snapshot { background: var(--ink); color: #e2e8f0; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.snapshot .kicker { color: var(--accent); font-size: 11px; }
.snap-head { display: flex; flex-direction: column; gap: 2px; }
.snap-head strong { font-size: 22px; font-weight: 900; }
.snapshot .muted-ink { color: #94a3b8; }
.snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #334155; }
.snap-grid a { background: var(--ink); padding: 10px; display: flex; flex-direction: column; gap: 2px; color: #fff; text-decoration: none; min-height: 64px; }
.snap-grid a:hover { background: var(--ink-2); }
.snap-grid a span { font-size: 12px; color: #94a3b8; }
.snapshot .pager-prev { color: var(--accent); min-height: 36px; }
.hint-box { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.hint-box .kicker { color: var(--link); }
.timeline { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.tl-day { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; scroll-margin-top: 20px; }
.tl-day.is-sel .tl-date { border-top-color: #f59e0b; }
.tl-date { display: flex; flex-direction: column; border-top: 3px solid var(--ink); padding-top: 6px; color: var(--ink); text-decoration: none; }
.tl-date span:first-child { font-size: 38px; font-weight: 900; line-height: 1; }
.tl-date .mono { font-size: 11px; color: var(--muted); }
.tl-entries { display: flex; flex-direction: column; gap: 8px; }
.entry { background: var(--white); border: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.entry h3 { font-size: 16px; font-weight: 700; }
.entry p { font-size: 14px; color: var(--muted); }
.entry-link { text-decoration: none; color: var(--ink); box-shadow: inset 4px 0 0 var(--book-accent); }
.entry-link:hover { border-color: var(--ink); }
.entry-proj { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); }

/* ── reviews ──────────────────────────────────── */
.review-stats { display: flex; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.review-stats > div { background: var(--white); padding: 8px 14px; display: flex; flex-direction: column; }
.review-stats .mono { font-size: 22px; font-weight: 600; }
.review-stats span:last-child { font-size: 12px; color: var(--muted); }
.s-ok { color: var(--ok); } .s-rev { color: var(--warn); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { background: transparent; color: var(--ink-3); border: 0; padding: 10px 14px; min-height: 44px; font-weight: 700; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.doc-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 14px; background: #eff6ff; border: 1px solid #bfdbfe; font-size: 14px; color: #1e3a8a; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.review { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--line); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.review.r-ok { border-top-color: var(--ok); } .review.r-rev { border-top-color: var(--warn-line); }
.review-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.review .code { font-size: 12px; font-weight: 600; color: var(--link); }
.review h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.review > p { font-size: 14px; color: var(--ink-3); }
dl { margin: 0; }
.review dl, .card dl, .conn dl, .agent dl, .infra dl, .flow-detail dl { border-top: 1px solid var(--line-2); }
.review dl div, .card dl div, .conn dl div, .agent dl div, .flow-detail dl div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
dt { font-size: 11px; color: #64748b; text-transform: uppercase; padding-top: 2px; }
dd { margin: 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.review-actions button { background: var(--white); padding: 8px 12px; min-height: 44px; font-weight: 700; border: 1.5px solid; }
.review-actions button:disabled { opacity: .45; cursor: not-allowed; }
.b-ok { border-color: var(--ok); color: var(--ok); } .b-rev { border-color: var(--warn); color: var(--warn); }
.b-ok[aria-pressed="true"] { background: var(--ok); color: #fff; }
.b-rev[aria-pressed="true"] { background: var(--warn); color: #fff; }

/* ── designs ──────────────────────────────────── */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 20px; }
.design { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; }
.design-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--line-2); border: 0; padding: 0; border-bottom: 1px solid var(--line); }
.design-thumb iframe { position: absolute; left: 0; top: 0; width: 300%; height: 300%; border: 0; transform: scale(.3334); transform-origin: 0 0; pointer-events: none; }
.design-zoom { position: absolute; right: 10px; bottom: 10px; background: var(--ink); color: #fff; font-size: 11px; letter-spacing: .1em; padding: 6px 10px; }
.design-thumb:hover .design-zoom { background: var(--strong); }
.design-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.design-body h3 { font-size: 22px; font-weight: 800; }
.design-body p { color: var(--muted); }

/* ── pricing ──────────────────────────────────── */
.price-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.price-top section { padding: 18px; display: flex; flex-direction: column; gap: 6px; background: var(--white); border: 1px solid var(--line); }
.price-total { background: var(--ink) !important; color: #e2e8f0; border-color: var(--ink) !important; }
.price-total .kicker { color: var(--accent); font-size: 11px; }
.price-total strong { font-size: clamp(28px, 4vw, 38px); color: #fff; font-weight: 600; letter-spacing: -0.02em; }
.price-total .muted-ink { color: #94a3b8; }
.price-rate label { display: flex; flex-direction: column; gap: 4px; }
.price-rate strong { font-size: 26px; font-weight: 600; }
.price-rate input[type=range] { width: 100%; accent-color: var(--strong); min-height: 32px; }
.range-ends { display: flex; justify-content: space-between; color: var(--muted); }
.price-monthly strong { font-size: 26px; font-weight: 600; }
.phases { display: flex; flex-direction: column; gap: 6px; }
.phase { background: var(--white); border: 1px solid var(--line); }
.phase summary { list-style: none; display: grid; grid-template-columns: minmax(0, 2fr) minmax(80px, 1.4fr) 56px 110px; gap: 14px; align-items: center; padding: 14px 16px; cursor: pointer; min-height: 56px; }
.phase summary::-webkit-details-marker { display: none; }
.phase summary::after { content: none; }
.phase-name { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.phase-name strong { font-size: 16px; }
.phase-name strong::before { content: '▸ '; color: var(--muted); }
.phase[open] .phase-name strong::before { content: '▾ '; }
.phase-bar { height: 10px; background: var(--line-2); }
.phase-bar i { display: block; height: 10px; background: var(--strong); }
.phase.done .phase-bar i { background: var(--ok); }
.phase-h { color: var(--muted); text-align: right; }
.phase-amt { text-align: right; font-weight: 600; }

.phase-sum { display: flex; justify-content: space-between; padding: 14px 16px; font-weight: 800; border-top: 2px solid var(--ink); }
.price-bottom { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.price-bottom > section { flex: 999 1 460px; min-width: 0; }
.infra { flex: 1 1 280px; background: var(--white); border: 1px solid var(--line); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.infra .section-title { margin-top: 0; font-size: 17px; }
.infra dl div { padding: 8px 0; border-bottom: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.infra dt { font-size: 13px; color: var(--ink); text-transform: none; font-weight: 700; }
.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay { background: var(--white); border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--line); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pay.s-pendiente { box-shadow: inset 4px 0 0 var(--warn-line); }
.pay.s-pagado { box-shadow: inset 4px 0 0 var(--ok); }
.pay-n { font-size: 20px; font-weight: 600; color: #94a3b8; width: 32px; }
.pay-t { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pay-t strong { font-size: 16px; font-weight: 800; }
.pay-t span { font-size: 13px; color: var(--muted); }
.pay-t .pay-via { color: var(--ok); font-weight: 600; }
.pay-btn { flex: 0 0 auto; }
@media (max-width: 560px) { .pay-btn { flex: 1 1 100%; } }
.pay-msg { margin: 6px 0 0; font-size: 14px; color: var(--ink); word-break: break-word; }
.pay-msg:empty { display: none; }
.pay-banner { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; margin: 0 0 12px; background: var(--white); border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--line); }
.pay-banner.ok { background: var(--ok-bg); border-color: transparent; box-shadow: inset 4px 0 0 var(--ok); }
.pay-banner.warn { background: var(--warn-bg); border-color: transparent; box-shadow: inset 4px 0 0 var(--warn-line); }
.pay-banner span { font-size: 14px; color: var(--muted); }
.pay-amount { font-size: 15px; min-width: 110px; text-align: right; font-weight: 600; }

/* ── connections ──────────────────────────────── */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; align-items: start; }
.conn { background: var(--white); border: 1px solid var(--line); padding: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.conn > p, .conn-more, .conn .card-link { padding: 0 16px; }
.conn > p { color: var(--muted); font-size: 14px; }
.conn-head { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); padding: 14px 16px; min-height: 64px; }
.conn-dot { width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 4px #f1f5f9; }
.conn.t-ok .conn-dot { background: #16a34a; box-shadow: 0 0 0 4px #dcfce7; }
.conn.t-warn .conn-dot { background: #ea580c; box-shadow: 0 0 0 4px #ffedd5; }
.conn.t-ok .pill { color: var(--ok); background: var(--ok-bg); }
.conn.t-warn .pill { color: var(--warn); background: var(--warn-bg); }
.conn-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.conn-t strong { font-size: 17px; }
.conn-t .mono { font-size: 11.5px; color: var(--muted); }
.conn-more { display: none; flex-direction: column; gap: 6px; }
.conn.open .conn-more { display: flex; }
.card-link { font-weight: 700; font-size: 14px; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }

/* ── flow diagram ─────────────────────────────── */
.flow-wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: stretch; }
.flow { flex: 999 1 560px; min-width: 0; width: 100%; height: auto; background: var(--white); border: 1px solid var(--line); background-image: radial-gradient(#e2e8f0 1px, transparent 1px); background-size: 18px 18px; color: #94a3b8; }
.edge { fill: none; stroke: #94a3b8; stroke-width: 2; transition: stroke .15s, stroke-width .15s; }
.edge.on { stroke: var(--ink); stroke-width: 3; color: var(--ink); }
.node { cursor: pointer; transition: opacity .15s; }
.node rect { fill: var(--white); stroke: var(--ink); stroke-width: 1.5; }
.node .nt { font: 700 15px var(--sans); fill: var(--ink); }
.node .ns { font: 500 11px var(--mono); fill: #475569; }
.node.n-src rect { fill: #e0f2fe; } .node.n-core rect { fill: #f8fafc; } .node.n-agent rect { fill: #fce7f3; } .node.n-check rect { fill: #fef9c3; } .node.n-out rect { fill: #dcfce7; }
.node:hover rect, .node.on rect { stroke-width: 3; }
.node.on rect { stroke: var(--strong); }
.node.dim { opacity: .35; }
.flow-detail { flex: 1 1 240px; background: var(--ink); color: #e2e8f0; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.flow-detail .kicker { color: var(--accent); font-size: 11px; }
.flow-detail h3 { font-size: 22px; font-weight: 900; color: #fff; }
.flow-detail p { color: #cbd5e1; }
.flow-detail dl div { border-bottom-color: #1e293b; }
.flow-detail dt { color: #94a3b8; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; display: inline-block; border: 1.5px solid var(--ink); }
.lg.n-src { background: #e0f2fe; } .lg.n-core { background: #f8fafc; } .lg.n-agent { background: #fce7f3; } .lg.n-check { background: #fef9c3; } .lg.n-out { background: #dcfce7; }

/* ── agents ───────────────────────────────────── */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; align-items: start; }
.agent { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; }
.agent-head { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; background: var(--ink); color: #fff; border: 0; padding: 16px; min-height: 72px; }
.agent-head > span:last-child { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.agent-head strong { font-size: 20px; font-weight: 900; }
.agent-ico { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; background: #1e293b; color: var(--accent); flex: none; }
.agent.lv-2 .agent-ico, .agent.lv-3 .agent-ico { background: #be185d; color: #fff; }
.agent.lv-2 .pill { color: #9d174d; background: #fce7f3; }
.agent-pipe { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; padding: 16px; }
.pipe-in, .pipe-out { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: #f1f5f9; font-size: 14px; }
.pipe-in .mono, .pipe-out .mono { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); }
.pipe-out { background: #dcfce7; }
.pipe-arrow { align-self: center; font-size: 22px; color: var(--muted); }
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 0 16px 16px; }
.levels span { font-family: var(--mono); font-size: 10px; text-align: center; padding: 6px 2px; background: var(--line-2); color: #64748b; }
.levels span.on { background: var(--ink); color: #fff; }
.agent.lv-2 .levels span.on:nth-child(3) { background: #be185d; }
.agent-more { display: none; padding: 0 16px 16px; }
.agent.open .agent-more { display: block; }

/* ── deliverables (bento) ─────────────────────── */
.bento { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); grid-auto-flow: dense; gap: 12px; }
.deliv { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; transition: box-shadow .2s; }
.deliv-face { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; background: transparent; border: 0; padding: 16px; min-height: 150px; color: var(--ink); }
.deliv-face:hover { background: #f8fafc; }
.deliv-face strong { font-size: 17px; line-height: 1.2; }
.deliv-face .mono { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.deliv-ico { width: 34px; height: 34px; color: var(--link); }
.deliv-more { display: none; padding: 0 16px 16px; flex-direction: column; gap: 12px; }
.deliv-more p { color: var(--ink-3); }
.deliv-lock { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--line); border-left: 4px solid var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.deliv-lock.admin { border-left-color: var(--line); background: var(--white); color: var(--ink-3); }
.deliv-lock-ico { font-size: 20px; line-height: 1.2; }
.deliv-lock div { display: flex; flex-direction: column; gap: 2px; }
.deliv-lock strong { font-size: 16px; }
.deliv-lock .deliv-pay { align-self: flex-start; margin-top: 8px; }
.deliv.is-locked .deliv-ico { opacity: .45; }
.design-lockthumb { display: grid; place-items: center; background: var(--line-2); font-size: 40px; cursor: default; }
.grant-box { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--white); }
.grant-out { display: flex; flex-direction: column; gap: 8px; }
.grant-link { font: inherit; font-family: var(--mono); font-size: 12px; padding: 8px 10px; border: 1px solid var(--line); width: 100%; }
.deliv.open { grid-column: span 2; grid-row: span 2; box-shadow: 0 0 0 2px var(--ink), 0 16px 40px rgba(15,23,42,.16); }
.deliv.open .deliv-face { min-height: 0; }
.deliv.open .deliv-more { display: flex; }
.deliv-preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--line-2); border: 1px solid var(--line); }
.deliv-preview iframe { position: absolute; left: 0; top: 0; width: 300%; height: 300%; border: 0; transform: scale(.3334); transform-origin: 0 0; pointer-events: none; }

/* ── threads ──────────────────────────────────── */
.threads { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.th-side { flex: 1 1 240px; max-width: 290px; display: flex; flex-direction: column; gap: 12px; }
.search input, .sort select, .th-new input, .th-new select, .th-new textarea { width: 100%; border: 1px solid var(--line); background: var(--white); padding: 10px 12px; min-height: 44px; }
.th-filters, .th-topics { display: flex; flex-direction: column; gap: 2px; }
.th-filters button, .th-topics button { display: flex; justify-content: space-between; text-align: left; background: transparent; border: 0; padding: 8px 10px; min-height: 40px; font-weight: 600; color: var(--ink-3); }
.th-filters button[aria-pressed="true"], .th-topics button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sort { display: flex; flex-direction: column; gap: 6px; }
.th-new summary { list-style: none; cursor: pointer; }
.th-new summary::-webkit-details-marker { display: none; }
.th-new form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; background: var(--white); border: 1px solid var(--line); padding: 14px; }
.th-new label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.th-new label.check { flex-direction: row; align-items: center; gap: 8px; }
.th-new label.check input { width: 18px; height: 18px; min-height: 0; }
.th-list { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.thread { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: start; background: var(--white); border: 1px solid var(--line); padding: 12px 14px 12px 8px; }
.thread.is-pending { box-shadow: inset 4px 0 0 var(--warn-line); }
.star { width: 44px; height: 44px; background: transparent; border: 0; font-size: 22px; color: #94a3b8; }
.star[aria-pressed="true"] { color: #d97706; }
.thread-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.thread-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.thread h3 { font-size: 16px; font-weight: 800; }
.thread p { font-size: 14px; color: var(--muted); }
.pend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); min-height: 44px; }
.pend input { width: 18px; height: 18px; accent-color: var(--warn-line); }

/* cards & layers */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.card { background: var(--white); border: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.card p { font-size: 14px; color: var(--muted); }
.layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.layers li { display: grid; grid-template-columns: 130px 150px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 20px; background: var(--ink); color: #e2e8f0; margin-left: calc(var(--depth) * 18px); border-left: 4px solid var(--accent); }
.layer-role { font-size: 11px; letter-spacing: .12em; color: var(--accent); }
.layers strong { font-size: 20px; font-weight: 900; color: #fff; }
.layers li span:last-child { color: #cbd5e1; font-size: 14px; }

/* ── proposals / finance ──────────────────────── */
.prop-list { display: flex; flex-direction: column; gap: 14px; }
.prop { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; background: var(--white); border: 1px solid var(--line); box-shadow: inset 6px 0 0 var(--book-accent); padding: 20px 22px 20px 28px; }
.prop-main { display: flex; flex-direction: column; gap: 6px; }
.prop-main h2 { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.prop-main p { color: var(--muted); }
.prop-side { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.prop-side strong { font-size: 24px; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kpis > div { background: var(--white); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.kpis > div:first-child { background: var(--ink); color: #e2e8f0; }
.kpis > div:first-child .kicker { color: var(--accent); }
.kpis strong { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.kpis span:last-child { font-size: 13px; color: var(--muted); }
.kpis > div:first-child span:last-child { color: #94a3b8; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); }
.fin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.fin-table th, .fin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.fin-table th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.fin-table .num { text-align: right; }
.pay-bars { display: flex; flex-direction: column; gap: 6px; }
.pay-bar { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) 110px; gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); padding: 10px 14px; }
.pb-label { display: flex; flex-direction: column; }
.pb-track { height: 12px; background: var(--line-2); }
.pb-track i { display: block; height: 12px; background: #94a3b8; }
.pay-bar.s-pendiente .pb-track i { background: var(--warn-line); }
.pay-bar.s-pagado .pb-track i { background: var(--ok); }
.pb-amt { text-align: right; font-weight: 600; }

/* ── viewer ───────────────────────────────────── */
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(2,6,23,.82); display: flex; flex-direction: column; padding: 16px; gap: 0; }
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 10px 14px; }
.viewer-bar .btn.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px #475569; }
.viewer iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* ── phone ───────────────────────────────────── */
@media (max-width: 760px) {
  .topbar { padding: 0 12px; gap: 0 10px; }
  .brand { padding: 12px 0 4px; flex-basis: 100%; }
  .mainnav { overflow-x: auto; flex-wrap: nowrap; flex-basis: 100%; }
  .mainnav a { min-height: 44px; padding: 0 10px; white-space: nowrap; }
  .crumb { margin-left: 0; padding: 0 0 10px; }
  .time-banner { padding: 10px 16px; }
  .home { padding: 28px 16px 48px; }
  .book h2 { font-size: 42px; }
  .book-body { padding: 22px 20px; }
  .cover-wrap, .book-layout { padding: 16px; }
  .cover, .index { padding: 26px 20px; }
  .toc { position: static; max-width: none; flex-basis: 100%; display: flex; overflow-x: auto; padding: 0; }
  .toc a { flex: none; border-left: 0; border-bottom: 3px solid transparent; padding: 0 14px; min-height: 48px; }
  .toc a[aria-current="page"] { border-bottom-color: var(--accent); }
  .toc .toc-back { margin: 0; }
  .page { padding: 22px 16px; min-height: 0; }
  .cal-col { max-width: none; }
  .tl-day { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .tl-date span:first-child { font-size: 30px; }
  .layers li { grid-template-columns: 1fr; gap: 4px; margin-left: 0; }
  .phase summary { grid-template-columns: minmax(0, 1fr) auto; }
  .phase-bar, .phase-h { display: none; }
  .pay-amount { text-align: left; min-width: 0; }
  .deliv.open { grid-column: 1 / -1; grid-row: auto; }
  .th-side { max-width: none; }
  .pay-bar { grid-template-columns: 1fr auto; }
  .pb-track { grid-column: 1 / -1; grid-row: 2; }
  .agent-pipe { grid-template-columns: 1fr; }
  .pipe-arrow { transform: rotate(90deg); justify-self: center; }
  .viewer { padding: 0; }
}

.iva-check { flex-direction: row !important; align-items: center; gap: 8px !important; font-size: 14px; min-height: 36px; }
.iva-check input { width: 18px; height: 18px; accent-color: var(--strong); }
.phase.bonus .phase-bar i { background: #94a3b8; }
.phase-amt s { color: #94a3b8; font-weight: 400; margin-right: 6px; }
.optional { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }

.phase-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; overflow-x: auto; }
.phase-why { color: var(--ink-3); font-size: 14px; background: #f1f5f9; padding: 10px 12px; }
.tasks { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.tasks th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tasks td { padding: 7px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.tasks td.mono { font-size: 12.5px; color: var(--link); }
.tasks .num { text-align: right; white-space: nowrap; }
.tasks td.num.mono { color: var(--ink); }
.tasks tfoot td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; }
.basis { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.basis h3 { font-size: 16px; font-weight: 800; margin: 0 0 8px; }
.basis-main { flex: 999 1 460px; min-width: 0; background: var(--white); border: 1px solid var(--line); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.basis-main ol, .basis-main ul, .basis-side ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-3); font-size: 14px; }
.basis-side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.basis-side > div { background: var(--white); border: 1px solid var(--line); padding: 14px 16px; }
.ok-list li::marker { content: '✓  '; color: var(--ok); }
.no-list li::marker { content: '✕  '; color: var(--warn); }

/* ── modos: botones de barra, portada pública, bienvenida, avisos ── */
.top-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; margin: 8px 0; color: #e2e8f0; background: transparent; border: 1px solid #334155; text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; }
.top-btn:hover { border-color: #94a3b8; color: #fff; }
.topbar .top-btn + .top-btn { margin-left: -12px; }
.client-crumb { margin-left: 0; }
.client-crumb a { font-size: 16px; }

.landing { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px 64px; display: flex; flex-direction: column; gap: 40px; }
.hero { padding: 72px 0 24px; display: flex; flex-direction: column; gap: 18px; border-bottom: 2px solid var(--ink); }
.hero .kicker { color: var(--strong); }
.hero h1 { font-size: clamp(48px, 9vw, 112px); font-weight: 900; letter-spacing: -0.05em; line-height: .9; }
.hero p { font-size: clamp(17px, 2vw, 21px); color: var(--ink-3); max-width: 56ch; padding-bottom: 28px; }
.pitch { display: flex; flex-direction: column; gap: 22px; }
.pitch-head { display: flex; flex-direction: column; gap: 10px; max-width: 72ch; }
.pitch-head .kicker { color: var(--strong); }
.pitch-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; }
.pitch-head p { font-size: 17px; color: var(--ink-3); }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.pillar { background: var(--paper); padding: 22px 20px 24px; display: flex; flex-direction: column; gap: 8px; transition: background .15s; }
.pillar:hover { background: var(--white); }
.pillar .mono { font-size: 12px; color: var(--strong); font-weight: 600; }
.pillar h3 { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.pillar p { color: var(--muted); font-size: 15px; }
.steps-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; counter-reset: st; }
.steps-line li { counter-increment: st; background: var(--ink); color: #e2e8f0; padding: 18px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.steps-line li::before { content: counter(st, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--accent); }
.steps-line strong { font-size: 20px; color: #fff; }
.steps-line span { font-size: 14px; color: #94a3b8; }
.client-door { background: var(--white); border: 1px solid var(--line); box-shadow: inset 6px 0 0 var(--strong); padding: 24px 28px; }
.client-door h2 { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.client-door p { color: var(--muted); max-width: 64ch; }
.site-foot { margin-top: auto; display: flex; justify-content: space-between; padding: 18px 28px; color: #64748b; font-size: 13px; border-top: 1px solid var(--line); }
.site-foot a { color: #64748b; }

.ready { padding: 24px 28px; background: var(--line-2); display: flex; justify-content: center; }
.ready-in { width: 100%; max-width: 1184px; background: var(--white); border: 2px solid var(--accent); box-shadow: 0 12px 32px rgba(15,23,42,.10); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.ready-in h2 { margin: 0; font-size: 28px; line-height: 1.1; }
.ready-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: rs; }
.ready-steps li { counter-increment: rs; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; background: var(--line-2); }
.ready-steps li::before { content: counter(rs); font-family: var(--mono); font-weight: 700; width: 28px; height: 28px; display: grid; place-items: center; background: var(--ink); color: #fff; border-radius: 50%; }
.ready-steps strong { font-size: 16px; }
.ready-steps span { color: var(--ink-3); font-size: 14px; }
.ready-prompt { width: 100%; font: 12px/1.45 var(--mono); padding: 8px 10px; border: 1px solid var(--line); background: var(--white); resize: vertical; }
.ready-sha { margin: 0; color: var(--ink-3); word-break: break-all; }
@media (max-width: 860px) { .ready-steps { grid-template-columns: 1fr; } .ready { padding: 16px 16px 0; } }
.welcome { background: var(--ink); color: #e2e8f0; border-bottom: 1px solid #1e293b; }
.welcome-in { max-width: 1240px; margin: 0 auto; padding: 32px 28px 8px; display: flex; flex-direction: column; gap: 10px; }
.welcome .kicker { color: var(--accent); }
.welcome h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; color: #fff; max-width: 24ch; }
.welcome p { color: #94a3b8; max-width: 70ch; font-size: 16px; padding-bottom: 20px; }
.pitch-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 28px 56px; }
.pitch.compact .pitch-head h2 { font-size: 26px; }

.contact-dlg { align-items: center; justify-content: center; }
.contact-card { width: 100%; max-width: 480px; background: var(--paper); color: var(--ink); padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.contact-card h2 { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; }
.contact-card p { color: var(--ink-3); }
.ct-channels { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ct-channels label { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 6px; text-align: center; background: var(--white); border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; cursor: pointer; }
.ct-channels label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.ct-channels input { accent-color: var(--accent); }
.ct-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.ct-field input { font: inherit; font-size: 17px; padding: 12px; min-height: 50px; border: 1.5px solid var(--line); background: var(--white); }
.ct-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.ct-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--strong); flex: none; }

@media (max-width: 760px) {
  .landing { padding: 0 16px 48px; }
  .hero { padding-top: 40px; }
  .welcome-in, .pitch-wrap { padding-left: 16px; padding-right: 16px; }
  .ct-channels { grid-template-columns: 1fr; }
  .top-btn { margin: 4px 0 10px; }
  .topbar .top-btn + .top-btn { margin-left: 6px; }
}

.pillars.dark { background: #334155; border-color: #334155; margin-top: 8px; }
.pillars.dark .pillar { background: var(--ink); }
.pillars.dark .pillar:hover { background: var(--ink-2); }
.pillars.dark .pillar .mono { color: var(--accent); }
.pillars.dark .pillar h3 { color: #fff; }
.pillars.dark .pillar p { color: #94a3b8; }
.welcome h1 { max-width: 30ch; }
.welcome .welcome-note { color: #cbd5e1; padding: 6px 0 26px; border-top: 0; }

/* ═════ Tema claro (estilo menú con acordeón y círculos de color) ═════ */
:root {
  --ink: #1b1340; --ink-2: #2b2160; --ink-3: #3d3470; --muted: #5d5683;
  --line: #ddd6f5; --line-2: #ece8fb; --paper: #faf9ff; --desk: #ffffff;
  --accent: #7b4dff; --strong: #6c3df4; --strong-hover: #5a2fd8; --link: #6c3df4;
  --yellow: #f3dc3a; --lav: #efeaff;
}
body { background: #fff; }
.wm { font-family: var(--sans); font-size: 20px; letter-spacing: .32em; font-weight: 300; color: var(--ink); }
.wm b { font-weight: 800; }
.brand { font-family: var(--sans); letter-spacing: normal; font-size: inherit; color: var(--ink); }
.brand span { color: inherit; }

/* barra superior (panel y cliente) */
.topbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.mainnav a { color: var(--ink-3); }
.mainnav a:hover { color: var(--strong); }
.mainnav a[aria-current="page"] { color: var(--strong); border-bottom-color: var(--strong); }
.crumb { color: #a39cc9; } .crumb a { color: var(--ink); }
.top-btn { color: var(--ink); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 16px; }
.top-btn:hover { border-color: var(--strong); color: var(--strong); }

/* oscuros → lavanda claro */
.book, .cover, .toc, .snapshot, .flow-detail, .welcome, .layers li, .kpis > div:first-child, .price-total { background: var(--lav) !important; color: var(--ink) !important; }
.book, .cover { border-radius: 24px; overflow: hidden; box-shadow: 0 8px 30px rgba(108,61,244,.12); }
.book p, .cover-title p, .book-phase, .cover-phase, .toc a, .layers li span:last-child, .flow-detail p, .welcome p, .welcome .welcome-note { color: var(--muted) !important; }
.facts > div, .snap-grid a { background: transparent !important; color: var(--ink) !important; }
.book-parts a { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 999px; }
.toc a { border-left-color: transparent; } .toc a[aria-current="page"], .toc a:hover { color: var(--strong) !important; border-left-color: var(--strong); }
.welcome h1 { color: var(--ink); } .welcome .kicker { color: var(--strong); } .welcome { border-bottom: 0; }
.layers li { border-left-color: var(--strong); border-radius: 14px; }
.agent-head, .viewer-bar { background: var(--ink) !important; border-radius: 14px 14px 0 0; }
.agent-ico { background: var(--yellow); color: var(--ink); border-radius: 50%; }
.steps-line li { background: var(--lav); color: var(--ink); border-radius: 18px; }
.steps-line { gap: 10px; background: none; border: 0; }
.pillars, .pillars.dark { background: none; border: 0; gap: 14px; }
.pillar, .pillars.dark .pillar { background: var(--lav); border-radius: 22px; }
.pillars.dark .pillar h3 { color: var(--ink); } .pillars.dark .pillar p { color: var(--muted); } .pillars.dark .pillar .mono { color: var(--strong); }
.pillar:nth-child(2) { background: #fff6bf; } .pillar:nth-child(3) { background: #d9f4ef; } .pillar:nth-child(4) { background: #ffe4ec; }
.btn, .btn.small { border-radius: 999px; }
.part, .client-door, .hint-box { border-radius: 18px; }
.client-door { box-shadow: none; background: var(--yellow); border: 0; }
.client-door p { color: var(--ink-3); }
.tabs button[aria-selected="true"], .seg button[aria-pressed="true"], .th-filters button[aria-pressed="true"], .th-topics button[aria-pressed="true"] { background: var(--strong); }
.home-head, .page-head { border-bottom-color: var(--line); }
.kicker { color: var(--strong); }

/* portada pública */
.pub-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; position: sticky; top: 0; background: #fff; z-index: 20; }
.menu-btn { border: 1.5px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; min-height: 42px; padding: 0 22px; font-weight: 700; }
.menu-btn:hover { background: var(--ink); color: #fff; }
.chip { align-self: flex-start; background: var(--lav); color: var(--strong); font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 999px; }
.hero { border-bottom: 0; padding: 48px 0 8px; }
.hero h1 { font-size: clamp(44px, 9vw, 104px); letter-spacing: -.045em; }
.hero h1 em { font-style: normal; color: var(--strong); }
.hero p { padding-bottom: 8px; }
.dots { display: flex; gap: 10px; padding-bottom: 20px; }
.dots i { width: 54px; height: 54px; border-radius: 50%; display: block; }
.pitch-head .kicker { color: var(--strong); }

/* menú desplegable */
.menu { position: fixed; inset: 0; background: #fff; z-index: 50; overflow-y: auto; }
.menu-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; }
.menu-x { background: none; border: 0; color: var(--ink); padding: 8px; }
.menu-body { max-width: 560px; margin: 0 auto; padding: 8px 22px 60px; display: flex; flex-direction: column; }
.acc-main, .acc-sub { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; text-align: left; }
.acc-main { font-size: 26px; font-weight: 800; color: var(--strong); padding: 16px 0 10px; text-decoration: none; letter-spacing: -.02em; }
.acc-main[aria-expanded="false"], .acc-main.link { color: var(--ink); }
.acc-sub { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8d86ae; padding: 16px 0 10px; }
[aria-expanded="true"] > svg { transform: rotate(180deg); }
.svc { list-style: none; margin: 0; padding: 0 0 6px; display: flex; flex-direction: column; gap: 14px; }
.svc li { display: flex; align-items: center; gap: 16px; font-size: 18px; font-weight: 700; }
.dot { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.feat { background: var(--yellow); border-radius: 22px; padding: 22px; margin: 18px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.feat .tag { align-self: flex-start; background: var(--strong); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.feat h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; } .feat p { color: var(--ink-3); }
.how { margin: 0; padding: 0 0 8px; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.how li { display: flex; flex-direction: column; } .how span { color: var(--muted); }

/* acceso en la portada */
.hero { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 28px 0 8px; }
.hero-text { display: flex; flex-direction: column; gap: 16px; }
.hero h1 { font-size: clamp(38px, 8vw, 72px); line-height: .98; }
.hero p { max-width: 52ch; font-size: clamp(16px, 2vw, 19px); }
.dots i { width: 36px; height: 36px; }
.access { background: var(--lav); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 12px; align-self: start; }
.access label { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.access input { min-height: 52px; font-size: 18px; padding: 0 20px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); width: 100%; }
.access input:hover { border-color: var(--strong); }
.access .btn { min-height: 52px; font-size: 16px; }
.access[data-state="error"] input { border-color: #c2183f; background: #fff5f8; }
.access[data-state="ok"] input { border-color: #1a8a5a; }
.access-msg { min-height: 20px; font-size: 14px; font-weight: 600; }
.access[data-state="error"] .access-msg { color: #c2183f; } .access[data-state="ok"] .access-msg { color: #1a8a5a; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 420px); gap: 64px; padding: 64px 0 16px; align-items: center; } .access { padding: 30px; } .pub-top { padding: 18px 40px; } }
@media (prefers-reduced-motion: no-preference) { .access .btn, .access input { transition: background .15s, border-color .15s; } }

/* portada: servicios y proceso (sin decoración) */
.dots, .dot, .feat { display: none !important; }
.svc li a { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 700; }
.svc li a:hover { color: var(--strong); }
.svc { gap: 0; }
.services ol, .process ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.services li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.services .mono { color: var(--strong); font-size: 13px; padding-top: 4px; }
.services h3 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; } .services p { color: var(--muted); max-width: 60ch; }
.process ol { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; border-top: 0; }
.process li { display: flex; flex-direction: column; gap: 4px; border-top: 3px solid var(--strong); padding-top: 10px; }
.process span { color: var(--muted); }
.process { scroll-margin-top: 80px; }
@media (min-width: 900px) { .services li { grid-template-columns: 80px 360px 1fr; } .services li > div { display: contents; } }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── Cobros · lo que puede generar (assets/revenue.js) ── */
.rev { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--ink); }
.rev-lead { max-width: 70ch; color: var(--ink-3); }
.rev-h { font-size: 17px; font-weight: 800; margin-top: 10px; }
.rev-tab-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); }
.rev-tab { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.rev-tab th, .rev-tab td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.rev-tab thead th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rev-tab td strong { display: block; }
.rev-tab td span.small { display: block; margin-top: 2px; }
.rev-tab .num { text-align: right; white-space: nowrap; }
.rev-tab .rev-group th { background: var(--paper); font-size: 13px; color: var(--ink); letter-spacing: .02em; text-transform: none; }
.rev-tab .rev-sub td { font-weight: 800; border-top: 1.5px solid var(--ink); }
.rev-years { min-width: 420px; }
.rev-sc-note { margin-top: -4px; }
.rev-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.rev-kpis section { background: var(--white); border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.rev-kpis section:first-child { background: var(--ink); color: #fff; border-color: var(--ink); }
.rev-kpis section:first-child .kicker { color: var(--accent); }
.rev-kpis .kicker { font-size: 11px; }
.rev-kpis strong { font-size: 22px; }
.rev-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
@media (max-width: 980px) { .rev-body { grid-template-columns: minmax(0, 1fr); } }
.rev-fig { margin: 0; background: var(--white); border: 1px solid var(--line); padding: 12px; }
.rev-chart { width: 100%; height: auto; display: block; font-family: var(--sans); font-size: 12px; }
.rev-grid line { stroke: var(--line-2); }
.rev-grid text, .rev-x text { fill: var(--muted); }
.rev-zero { stroke: var(--ink-3); stroke-width: 1.2; }
.rev-line { fill: none; stroke: #94a3b8; stroke-width: 2; opacity: .7; }
.rev-line.on { stroke: var(--strong); stroke-width: 3.5; opacity: 1; }
.rev-end { fill: #94a3b8; font-size: 12px; font-weight: 600; }
.rev-end.on { fill: var(--strong); font-weight: 800; }
.rev-pb { fill: var(--white); stroke: var(--strong); stroke-width: 3; }
.rev-pb-t { fill: var(--ink); font-weight: 700; font-size: 13px; }
.rev-inv { fill: var(--muted); font-size: 12px; }
.rev-ctl { background: var(--white); border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.rev-ctl h4 { font-size: 15px; font-weight: 800; }
.rev-sl { display: flex; flex-direction: column; gap: 4px; }
.rev-sl > span:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.rev-sl input { width: 100%; accent-color: var(--strong); min-height: 28px; }
.rev-basis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.rev-basis section { background: var(--white); border: 1px solid var(--line); padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.rev-basis h4 { font-size: 15px; font-weight: 800; }
.rev-basis ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
/* Cobros · decisión de dominio del cliente */
.domain-pick { margin-top: 10px; border-top: 1px solid var(--line-2); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.domain-pick h3 { margin: 0; font-size: 15px; }
.domain-pick ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.domain-pick li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.domain-pick li > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.domain-pick li.is-picked { border-color: var(--ink); background: #f8fafc; }
.domain-pick .btn { min-height: 34px; padding: 4px 12px; flex: none; }
/* Cobros en modo anticipo: el desglose completo queda plegado para el panel */
.admin-full { margin-top: 18px; border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; }
.admin-full > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.advance-extra { margin-top: 18px; }
