/* Sistema visual del Área de Inversores (propuesta de Marketing 22/10/2026). Fuente autoalojada: CSP font-src 'self'. */
@font-face { font-family: "Kumbh Sans"; src: url("assets/KumbhSans-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Kumbh Sans"; src: url("assets/KumbhSans-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F; }
:root {
  color-scheme: light;
  --bg: #f8f6f1; --surface: #ffffff; --surface-soft: #faf8f3;
  --text: #222222; --body: #4d4d4d; --muted: #67625a; --border: #ebe6dc;
  --gold: #e1b551; --gold-2: #f9d37c; --gold-text: #7a5a14; --gold-soft: #f8eed5;
  --button-text: #2a2414; --green: #2a6d49; --green-bg: #e6f2ea; --info: #38557e; --info-bg: #e9eef6;
  --dark: #191919; --dark-text: #d9d4c8;
  --radius: 24px; --shadow: 0 18px 50px #3c30140f; --focus: #7a5a14;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414; --surface: #1f1f1f; --surface-soft: #262626;
  --text: #f3f1ec; --body: #d4d0c8; --muted: #b5afa4; --border: #34322e;
  --gold: #e1b551; --gold-2: #f9d37c; --gold-text: #f2cd78; --gold-soft: #33291a;
  --button-text: #2a2414; --green: #a8d8b9; --green-bg: #1e3328; --info: #b7c8e4; --info-bg: #1f2836;
  --dark: #0b0b0b; --dark-text: #d9d4c8;
  --shadow: 0 18px 50px #00000040; --focus: #f9d37c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--body); font: 15px/1.5 "Kumbh Sans", "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
button, select { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong, dd { color: var(--text); }
h1 { font-size: clamp(34px, 3.6vw, 52px); font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
h1 em, h2 em { font-style: normal; font-weight: 300; }
h2 { font-size: 28px; font-weight: 800; line-height: 1.15; }
h3 { font-size: 19px; font-weight: 700; }
.preview-bar { text-align: center; padding: 7px 18px; background: var(--dark); color: var(--gold-2); font-size: 12px; letter-spacing: .14em; font-weight: 600; }
.preview-bar span { padding: 0 7px; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 32px; padding: 14px max(40px, calc((100% - 1280px) / 2 + 40px)); background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { width: 150px; height: 44px; display: flex; align-items: center; overflow: hidden; flex-shrink: 0; }
.brand img { width: 186px; max-width: none; height: 55px; margin-left: -21px; }
.logo-dark, [data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.sidebar { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; }
.top-nav { display: flex; gap: 6px; flex: 1; }
.top-nav a { padding: 10px 18px; border-radius: 999px; font-size: 15px; color: var(--muted); white-space: nowrap; }
.top-nav a:hover { color: var(--text); background: var(--surface-soft); }
.top-nav a[aria-current] { background: var(--gold-soft); color: var(--text); font-weight: 700; }
.sidebar-bottom { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.account { display: flex; align-items: center; gap: 10px; }
.account strong { display: block; font-size: 14px; font-weight: 700; }
.account div > span { display: block; color: var(--muted); font-size: 13px; }
/* Con sesión, la cabecera prioriza el menú: solo avatar y salir. */
.account div { display: none; }
.sidebar:not([hidden]) ~ .header-actions .website-link { display: none; }
.demo-session-tools { position: relative; }
.demo-session-tools summary { white-space: nowrap; }
.demo-session-tools[open] button { position: absolute; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow); }
.avatar { display: grid; place-items: center; height: 42px; width: 42px; border-radius: 50%; background: var(--dark); color: var(--gold-2); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.sidebar-bottom .text-button { font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.sidebar:not([hidden]) + .header-actions { margin-left: 0; }
.website-link { font-size: 14px; color: var(--muted); white-space: nowrap; }
.website-link span { margin-left: 6px; }
.theme-toggle { background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 9px 15px; display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; flex-shrink: 0; color: var(--text); }
.theme-toggle > span:first-child { font-size: 16px; line-height: 1; }
.tabbar { display: none; }

main { min-width: 0; max-width: 1280px; width: 100%; margin: 0 auto; padding: 44px 40px 70px; }
.eyebrow { display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--gold-text); }
.page-heading, .hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 30px; }
.page-heading h1, .hello h1 { margin: 12px 0 10px; }
.page-heading p, .hello p { font-size: 17px; }
.sample-date, .updated { flex-shrink: 0; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Avisos */
.alert-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--surface); border: 1px solid #f0dca8; border-left: 6px solid var(--gold); border-radius: 18px; padding: 18px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.alert-card.soft { border-color: var(--border); border-left-color: var(--muted); }
.alert-card strong { font-size: 16px; }
.alert-card p { font-size: 14px; margin-top: 2px; }
.feedback, .demo-code { padding: 14px 18px; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 14px; font-size: 14px; overflow-wrap: anywhere; background: var(--surface); }
.access-card .feedback, .access-card .demo-code { margin-top: 18px; margin-bottom: 0; }
.feedback[role="alert"] { border-color: var(--gold-text); border-left: 6px solid var(--gold-text); }
.demo-code { background: var(--gold-soft); color: var(--gold-text); }
.demo-code strong { font-size: 16px; color: inherit; }
.demo-code p { font-size: 13px; margin-top: 6px; }

/* KPIs */
.metrics { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 18px; margin: 10px 0 38px; }
.metric { background: var(--surface); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.metric.featured { background: var(--dark); color: var(--dark-text); }
.metric-label { font-size: 14px; color: var(--muted); }
.metric.featured .metric-label { color: #b9b2a2; }
.metric strong { font-size: clamp(26px, 2.4vw, 36px); font-weight: 800; letter-spacing: -.01em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric.featured strong { color: #ffffff; }
.metric-note, .metric a { font-size: 13px; }
.metric-note b { color: var(--green); }
.metric.featured .metric-note b { color: var(--gold-2); }
.metric a { color: var(--gold-text); font-weight: 700; margin-top: auto; }

/* Proyectos */
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-bottom: 16px; flex-wrap: wrap; }
.section-heading > a { font-size: 14px; font-weight: 700; color: var(--gold-text); }
.project-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 18px; }
.project-art { position: relative; overflow: hidden; background: #e8e2d3; min-height: 200px; max-height: 320px; }
.project-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 58%; display: block; }
.art-caption { position: absolute; left: 14px; bottom: 12px; font-size: 11px; letter-spacing: .08em; color: #343c43; background: #f7f3e6; padding: 4px 8px; border-radius: 6px; }
.project-body { padding: 22px 26px; min-width: 0; container-type: inline-size; }
.project-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.project-body h3 { margin: 10px 0 2px; font-size: 21px; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; color: var(--gold-text); background: var(--gold-soft); width: fit-content; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill.pill-ok { color: var(--green); background: var(--green-bg); }
.pill.pill-info { color: var(--info); background: var(--info-bg); }
.pill.review-pill { color: var(--muted); background: var(--surface-soft); border: 1px solid var(--border); }
.muted { color: var(--muted); }
dl { margin: 0; }
dt { font-size: 13px; color: var(--muted); }
dd { margin: 3px 0 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.project-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.contract-table { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.contract-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 14.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.contract-row:first-child { border-top: 0; }
.contract-head { background: var(--surface-soft); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; padding: 9px 16px; }
.contract-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contract-name strong { font-weight: 800; overflow-wrap: anywhere; }
.contract-name small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.contract-name .pill { margin-top: 3px; font-size: 12px; padding: 3px 10px; line-height: 1.3; }
.text-button { border: 0; background: none; color: var(--gold-text); padding: 0; font-size: 14px; font-weight: 700; white-space: nowrap; }
.text-button span { margin-left: 6px; }
button:disabled { cursor: not-allowed; color: var(--muted); }
.field-hint { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 12px; }
.investment-list .project-card { margin-bottom: 20px; }
.count { font-size: 14px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; margin-left: 8px; font-weight: 600; vertical-align: 4px; }

/* Lateral */
.next-steps { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.next-steps h2 { font-size: 22px; margin: 12px 0 6px; }
.next-steps > p { font-size: 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.timeline { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid var(--border); padding-top: 20px; }
.timeline li { display: flex; gap: 13px; position: relative; padding-bottom: 20px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; top: 32px; bottom: 4px; width: 2px; left: 15px; background: var(--border); }
.timeline li > span { width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--border); border-radius: 50%; flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.timeline .complete > span { background: var(--gold); border-color: var(--gold); color: var(--button-text); }
.timeline strong { display: block; font-size: 14px; padding-top: 4px; }
.timeline p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.note-banner { display: flex; align-items: center; gap: 15px; background: var(--surface); border-radius: 18px; padding: 18px 22px; margin-top: 26px; box-shadow: var(--shadow); }
.note-symbol { width: 28px; height: 28px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-text); border-radius: 50%; flex-shrink: 0; font-weight: 800; }
.note-banner strong { font-size: 14px; }
.note-banner p { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Acceso */
.access-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 80px; max-width: 1120px; margin: 20px auto; align-items: center; }
.access-story h1 { font-size: clamp(44px, 4.8vw, 64px); line-height: 1.05; margin: 20px 0; }
.access-story h1 em { font-weight: 300; color: var(--gold-text); }
.intro { color: var(--body); font-size: 17px; max-width: 420px; }
.access-illustration { margin-top: 28px; }
.access-illustration img { width: 100%; height: 220px; object-fit: cover; object-position: center 56%; border-radius: var(--radius); display: block; }
.access-illustration span { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; }
.access-card { padding: 38px; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); min-width: 0; }
.small-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-text); font-weight: 800; margin-bottom: 24px; font-size: 22px; }
.access-card h2 { font-size: 32px; margin: 10px 0 12px; }
.access-card > p { font-size: 15px; overflow-wrap: anywhere; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; border: 1.5px solid var(--gold); padding: 12px 22px; font-size: 15px; font-weight: 700; line-height: 1.3; text-align: center; }
.primary-button { background: var(--gold); color: var(--button-text); }
.primary-button:hover { background: #ecc46b; }
.primary-button:disabled { background: var(--surface-soft); border-color: var(--border); color: var(--muted); }
.secondary-button { background: var(--surface); border-color: var(--text); color: var(--text); padding: 10px 18px; font-size: 14px; }
.secondary-button:hover { background: var(--surface-soft); }
.access-card .primary-button { width: 100%; justify-content: space-between; }
.access-card .demo-explanation { font-size: 13px; margin-top: 18px; line-height: 1.6; color: var(--muted); }
.login-form { display: grid; gap: 10px; margin-top: 24px; }
.login-form label, .demo-scenarios label { font-size: 14px; font-weight: 700; color: var(--text); }
.login-form input { width: 100%; min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font-size: 16px; }
.login-form input[readonly] { background: var(--surface-soft); color: var(--muted); }
.login-form input::placeholder { color: var(--muted); opacity: 1; }
.login-form .primary-button { margin-top: 10px; }
.access-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; margin-top: 20px; }
.demo-scenarios { margin-top: 18px; }
.demo-scenarios summary, .demo-session-tools summary { color: var(--muted); font-size: 13px; }
.demo-scenarios label { display: block; margin: 15px 0 8px; }
.demo-scenarios select { width: 100%; }
.demo-session-tools { border: 0; padding: 0; }
.demo-session-tools button { margin-top: 8px; text-align: left; }
.loading-state { max-width: 660px; margin: 80px auto; }
.loading-state h1 { margin: 16px 0; }

/* Documentos */
.documents-panel { background: var(--surface); border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); }
.filter { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.contract-filter { margin-bottom: 10px; }
select { border: 1px solid var(--border); border-radius: 999px; background: var(--surface); padding: 9px 14px; max-width: 100%; font-size: 14px; color: var(--text); }
.document-group { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-text); margin: 22px 0 4px; overflow-wrap: anywhere; }
.document-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.document-name { flex: 1; min-width: 0; }
.document-name h3 { font-size: 15px; overflow-wrap: anywhere; }
.document-name p { color: var(--muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.document-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--gold-soft); display: grid; place-items: center; color: var(--gold-text); font-size: 11px; font-weight: 800; flex-shrink: 0; }
.empty-state { text-align: center; padding: 55px 15px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty-state > span { font-size: 32px; color: var(--gold-text); }
.empty-state h1, .empty-state h2 { font-size: 22px; margin: 12px 0; }
.empty-state p, .footnote { color: var(--muted); font-size: 13px; }
.empty-state .secondary-button, .empty-state .primary-button { margin-top: 20px; }
.footnote { margin-top: 18px; }

/* Ayuda */
.faq { background: var(--surface); border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); }
.faq h2 { margin-bottom: 14px; font-size: 24px; }
.faq > p { font-size: 15px; margin-top: 12px; }
.help-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); gap: 28px; }
details { border-bottom: 1px solid var(--border); padding: 18px 0; }
summary { font-size: 15px; cursor: pointer; font-weight: 700; color: var(--text); }
details p { color: var(--body); font-size: 14px; margin-top: 12px; padding-right: 10px; }
.help-card { background: var(--dark); color: var(--dark-text); padding: 28px; border-radius: var(--radius); align-self: start; }
.help-card h2 { color: #ffffff; font-size: 24px; margin: 14px 0; }
.help-card .eyebrow { color: var(--gold-2); }
.help-card > p { font-size: 14px; margin-bottom: 20px; }
.help-card .secondary-button { background: var(--gold); border-color: var(--gold); color: var(--button-text); }
.help-card .footnote { color: #b9b2a2; margin-bottom: 0; }

/* Detalle del contrato */
dialog { border: 0; border-radius: 28px; padding: 30px 32px; background: var(--surface); color: var(--body); max-width: 720px; width: calc(100% - 32px); max-height: calc(100dvh - 40px); box-shadow: var(--shadow); }
dialog::backdrop { background: #101010b3; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.icon-button { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 50%; width: 40px; height: 40px; font-size: 23px; line-height: 1; color: var(--text); }
dialog h2 { font-size: 28px; line-height: 1.2; overflow-wrap: anywhere; }
dialog h3 { font-size: 17px; margin-top: 24px; }
dialog p { margin-top: 12px; font-size: 14px; }
dialog .primary-button { margin-top: 22px; }
.contract-steps { list-style: none; padding: 0; margin: 24px 0 8px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.contract-steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 3px; background: var(--border); }
.contract-steps li { text-align: center; position: relative; padding: 0 4px; display: flex; flex-direction: column; align-items: center; }
.contract-steps li > span[aria-hidden] { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px; background: var(--surface); border: 2px solid var(--border); font-weight: 800; color: var(--muted); position: relative; }
.contract-steps .done > span[aria-hidden] { background: var(--gold); border-color: var(--gold); color: var(--button-text); }
.contract-steps .current > span[aria-hidden] { background: var(--dark); border-color: var(--dark); color: var(--gold-2); box-shadow: 0 0 0 5px var(--gold-soft); }
.contract-steps strong { font-size: 13px; line-height: 1.25; }
.contract-steps small { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.net-highlight { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--gold-soft); border-radius: 16px; padding: 16px 18px; margin-top: 20px; }
.net-highlight span { font-weight: 700; color: var(--text); }
.net-highlight strong { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin: 18px 0 8px; }
.detail-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.detail-facts dt { font-size: 14px; }
.detail-facts dd { font-size: 15px; text-align: right; }
.plan-list { padding-left: 20px; font-size: 14px; }
.plan-list li + li { margin-top: 8px; }
.document-stamp { display: block; font-size: 11px; color: var(--gold-text); margin: 0 0 15px; letter-spacing: .1em; font-weight: 700; }
.sample-document { border: 1px solid var(--border); padding: 25px; margin-top: 20px; border-radius: 16px; background: var(--bg); }
.document-preview { display: block; width: 100%; height: 55vh; min-height: 240px; border: 1px solid var(--border); border-radius: 12px; background: white; margin-top: 12px; }
.document-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* Titularidad */
.ownership-panel { max-width: 820px; padding: 28px 30px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow-wrap: anywhere; }
.ownership-panel h2 { font-size: 24px; margin-bottom: 8px; }
.ownership-panel p { margin-top: 10px; }
.ownership-panel .login-form { margin-top: 24px; }
.ownership-panel input[type="file"] { width: 100%; min-width: 0; max-width: 100%; }
.ownership-panel .consent-field { display: flex; align-items: flex-start; gap: 12px; line-height: 1.6; font-weight: 400; }
.ownership-panel .consent-field input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 3px; }

.skip-link { position: fixed; top: -100px; left: 15px; padding: 12px 20px; background: var(--surface); color: var(--text); z-index: 20; border: 2px solid var(--focus); border-radius: 12px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript { padding: 30px; text-align: center; }
.qa-page { padding: 16px; }
.qa-page h1 { font-size: 20px; letter-spacing: 0; }
.qa-page p { font-size: 13px; margin: 5px 0 10px; }
.qa-page output { display: block; margin: 8px 0; font-size: 13px; }
.qa-frames { display: flex; gap: 8px; align-items: flex-start; }
.qa-frames iframe { flex-shrink: 0; }

@media (max-width: 1150px) {
  .site-header { gap: 18px; padding: 12px 24px; }
  .website-link { display: none; }
  main { padding: 32px 24px 60px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: 1fr 1fr; }
  .access-layout { gap: 40px; }
  .help-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .top-nav, .sidebar-bottom .account { display: none; }
  .tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9; justify-content: space-around; background: var(--dark); border-radius: 22px; padding: 8px; box-shadow: 0 10px 30px #00000040; }
  .tabbar a { display: grid; justify-items: center; gap: 3px; color: #bdb6a6; font-size: 12px; padding: 4px 6px; border-radius: 14px; min-width: 64px; }
  .tabbar a[aria-current] { color: var(--gold-2); font-weight: 700; }
  .tabbar svg { display: block; }
  .with-sidebar main { padding-bottom: 120px; }
  .project-card { grid-template-columns: 1fr; }
  .project-art { min-height: 150px; height: 150px; }
}
@media (max-width: 600px) {
  .preview-bar { font-size: 10px; letter-spacing: .08em; padding: 7px 9px; }
  .site-header { padding: 10px 16px; gap: 10px; }
  .brand { width: 118px; height: 36px; }
  .brand img { width: 146px; height: 43px; margin-left: -16px; }
  .theme-toggle { padding: 8px 11px; font-size: 12px; gap: 6px; }
  .theme-toggle #theme-label { display: none; }
  .sidebar { justify-content: flex-end; }
  .sidebar-bottom { gap: 8px; min-width: 0; }
  .sidebar-bottom .demo-session-tools { display: none; }
  #leave-demo { white-space: normal; text-align: right; max-width: 120px; font-size: 13px; line-height: 1.2; }
  .avatar { width: 34px; height: 34px; font-size: 12px; }
  main { padding: 24px 16px 40px; }
  h1 { font-size: 34px; }
  h2 { font-size: 22px; }
  .page-heading, .hello { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 22px; }
  .page-heading p, .hello p { font-size: 15px; }
  .sample-date, .updated { white-space: normal; }
  .alert-card { flex-direction: column; align-items: stretch; padding: 16px; }
  .metrics { gap: 12px; margin-bottom: 28px; }
  .metric { padding: 18px; border-radius: 20px; }
  .metric.featured { grid-column: 1 / -1; }
  .metric strong { font-size: 22px; }
  .project-body { padding: 18px; }
  .project-facts { grid-template-columns: 1fr 1fr; }
  .contract-head { display: none; }
  .contract-row { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .contract-row .contract-name { grid-column: 1 / -1; }
  .contract-row [data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .contract-row > span:last-child { grid-column: 1 / -1; }
  .access-layout { display: flex; flex-direction: column; gap: 26px; margin: 4px auto 20px; }
  .access-story h1 { font-size: 42px; margin: 16px 0; }
  .intro { font-size: 15px; }
  .access-illustration, .small-mark { display: none; }
  .access-card { width: 100%; padding: 26px 22px; border-radius: 24px; }
  .access-card h2 { font-size: 27px; }
  .documents-panel, .faq, .ownership-panel { padding: 20px 18px; }
  .documents-panel .section-heading { display: block; }
  .filter { margin-top: 12px; align-items: flex-start; flex-direction: column; gap: 6px; }
  .filter select { width: 100%; }
  .document-row { flex-wrap: wrap; }
  .document-row .secondary-button { margin-left: 56px; }
  .document-name { flex-basis: calc(100% - 60px); }
  dialog { padding: 22px 18px; border-radius: 22px; }
  dialog h2 { font-size: 23px; }
  .contract-steps { grid-template-columns: 1fr; gap: 10px; }
  .contract-steps::before { display: none; }
  .contract-steps li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; text-align: left; align-items: center; }
  .contract-steps li > span[aria-hidden] { margin: 0; grid-row: span 2; }
  .contract-steps small { grid-column: 2; margin: 0; }
  .detail-facts { grid-template-columns: 1fr; }
  .net-highlight strong { font-size: 20px; }
}
@media (max-width: 360px) {
  .project-facts, .metrics { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

/* Con sesión iniciada, el selector de tema queda como icono (conserva su aria-label). */
.sidebar:not([hidden]) ~ .header-actions #theme-label { display: none; }

/* Si la tarjeta es estrecha (lateral o tablet), cada contrato pasa a ficha de dos columnas. */
@container (max-width: 520px) {
  .contract-head { display: none; }
  .contract-row { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .contract-row .contract-name { grid-column: 1 / -1; }
  .contract-row [data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .contract-row > span:last-child { grid-column: 1 / -1; }
}

/* ===== Fase 2: fotos de obra, página de proyecto y contacto (maqueta 02 de Marketing) ===== */
.primary-button.small, .secondary-button.small { padding: 9px 16px; font-size: 14px; }
.project-card { grid-template-columns: 210px minmax(0, 1fr); }
.project-art { min-height: 230px; max-height: none; }
.project-art img { position: absolute; inset: 0; object-position: center; }
.project-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; flex-wrap: wrap; }
.project-foot .text-button { color: var(--text); }
.overview-side { display: grid; gap: 18px; }
.side-card { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.contact-person { display: flex; gap: 14px; align-items: center; margin: 14px 0 16px; }
.contact-person strong { display: block; }
.contact-person span { display: block; font-size: 13.5px; }
.contact-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-text); display: grid; place-items: center; flex-shrink: 0; }
.promo-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 270px; display: flex; align-items: flex-end; color: #ffffff; background: var(--dark); }
.promo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, #10101000 0%, #1010108c 45%, #101010eb 100%); }
.promo-card > div { position: relative; z-index: 2; padding: 24px; }
.promo-card .eyebrow { color: var(--gold-2); }
.promo-card h3 { color: #ffffff; font-size: 22px; margin: 6px 0 14px; }

.crumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumb a { color: var(--gold-text); font-weight: 700; }
.project-hero { position: relative; border-radius: 28px; overflow: hidden; min-height: 360px; display: flex; align-items: flex-end; margin-bottom: 30px; background: var(--dark); }
.project-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #101010d1, #1010101a 70%), linear-gradient(0deg, #10101099, #10101000 55%); }
.project-hero .art-caption { z-index: 2; top: 16px; bottom: auto; left: auto; right: 16px; }
.hero-inner { position: relative; z-index: 2; width: 100%; padding: 36px 40px; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; color: #eeeeee; }
.hero-inner .eyebrow { color: var(--gold-2); }
.hero-inner h1 { color: #ffffff; font-size: clamp(32px, 3.4vw, 48px); margin: 10px 0 0; overflow-wrap: anywhere; }
.hero-figures { display: flex; gap: 12px; flex-shrink: 0; }
.hero-figures > div { background: #101010a6; backdrop-filter: blur(8px); border: 1px solid #ffffff33; border-radius: 18px; padding: 12px 18px; min-width: 150px; }
.hero-figures dt { font-size: 12.5px; color: #dddddd; }
.hero-figures dd { color: #ffffff; font-size: 21px; }
.contract-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin: 4px 0 18px; }
.contract-card { position: relative; background: var(--surface); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); border: 2px solid transparent; min-width: 0; }
.contract-card.selected { border-color: var(--gold); }
.contract-card.locked { background: var(--surface-soft); box-shadow: none; border: 1px dashed var(--border); }
.selected-tag { position: absolute; top: -12px; right: 22px; background: var(--gold); color: var(--button-text); font-size: 12px; font-weight: 800; border-radius: 999px; padding: 3px 12px; }
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-row .muted { font-size: 13px; }
.contract-card h3 { font-size: 20px; margin: 10px 0 0; overflow-wrap: anywhere; }
.card-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; margin: 16px 0; }
.card-facts dt { font-size: 12.5px; }
.card-facts dd { font-size: 16px; overflow-wrap: anywhere; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; font-size: 14px; }
.card-foot strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.card-link { margin-top: 12px; }
.total-bar { display: flex; gap: 34px; align-items: center; flex-wrap: wrap; background: var(--dark); color: #cfc8b8; border-radius: 20px; padding: 16px 26px; margin-bottom: 34px; font-size: 14px; }
.total-bar b { display: block; color: #ffffff; font-size: 19px; font-variant-numeric: tabular-nums; }
.total-bar .total-net b { color: var(--gold-2); }
.total-label { font-weight: 800; color: var(--gold-2); letter-spacing: .12em; font-size: 12px; text-transform: uppercase; margin-right: auto; }
.contract-tabs { display: flex; gap: 6px; overflow-x: auto; }
.contract-tab { border: 0; padding: 13px 22px; border-radius: 18px 18px 0 0; background: var(--gold-soft); font-weight: 700; color: var(--muted); font-size: 15px; white-space: nowrap; }
.contract-tab small { font-weight: 500; margin-left: 6px; }
.contract-tab.on { background: var(--surface); color: var(--text); }
.contract-panel { background: var(--surface); border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); margin-bottom: 34px; overflow-wrap: anywhere; }
.contract-panel.with-tabs { border-top-left-radius: 0; }
.contract-panel h2 { font-size: 23px; }
.contract-panel > .muted { margin-top: 6px; font-size: 14px; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; margin: 26px 0 8px; }
.panel-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; min-width: 0; }
.money-list { margin-top: 12px; }
.money-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.money-list dt { font-size: 15px; color: var(--body); }
.money-list dd { margin: 0; font-size: 15px; text-align: right; white-space: nowrap; }
.money-list .negative dd { color: #a5483b; }
[data-theme="dark"] .money-list .negative dd { color: #f0a497; }
.money-list .negative dd::before { content: "− "; }
.money-list .money-total { border-bottom: 0; background: var(--gold-soft); margin: 10px -12px 0; padding: 14px 12px; border-radius: 14px; }
.money-list .money-total dt { font-weight: 700; color: var(--text); }
.money-list .money-total dd { font-size: 22px; font-weight: 800; }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.doc-list { list-style: none; padding: 0; margin: 8px 0 0; }
.doc-list li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list li > div { flex: 1; min-width: 0; }
.doc-list strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.doc-list small { font-size: 13px; color: var(--muted); }
.panel-subtitle { margin-top: 22px; }
.contract-panel .detail-facts { margin-top: 10px; }
.panel-actions { margin-top: 18px; }
.contact-band { display: flex; align-items: center; gap: 22px; background: var(--surface); border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow); }
.contact-band > div:not(.button-row) { flex: 1; min-width: 0; }
.contact-band p { font-size: 14.5px; margin-top: 4px; }
.contact-band .button-row { margin-top: 0; }
.access-illustration img { height: 260px; }

@media (max-width: 1150px) {
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .panel-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .project-card { grid-template-columns: 1fr; }
  .project-art { min-height: 190px; height: 190px; }
  .contact-band { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .project-hero { min-height: 320px; border-radius: 22px; }
  .hero-inner { padding: 22px 18px; gap: 16px; }
  .hero-figures { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .hero-figures > div { min-width: 0; padding: 10px 12px; }
  .hero-figures > div:last-child { grid-column: 1 / -1; }
  .hero-figures dd { font-size: 17px; }
  .contract-cards { grid-template-columns: minmax(0, 1fr); }
  .card-facts { grid-template-columns: 1fr 1fr; }
  .total-bar { gap: 14px; padding: 16px 18px; }
  .total-label { width: 100%; }
  .contract-tab small { display: none; }
  .contract-panel { padding: 20px 16px; }
  .panel-card { padding: 18px 16px; }
  .money-list .money-total dd { font-size: 20px; }
  .doc-list li { flex-wrap: wrap; }
  .doc-list li .secondary-button { margin-left: auto; }
  .contact-band { padding: 20px 18px; }
}

/* ===== Pulido visual (auditoría 28/10) ===== */
/* Importes: nunca se parten; las columnas se adaptan al dato. */
dd, .contract-row [data-label], .card-foot strong, .total-bar b, .hero-figures dd { font-variant-numeric: tabular-nums; }
.card-facts dd, .contract-row [data-label="Aportación"], .card-foot strong, .project-facts dd, .hero-figures dd { white-space: nowrap; }
/* Columnas en rem y última de ancho fijo: cada fila es su propia rejilla y la cabecera usa otra letra. */
.contract-row { grid-template-columns: minmax(7rem, 1.5fr) minmax(7.2rem, 1fr) minmax(6.6rem, .8fr) minmax(5.4rem, .8fr) 8.5rem; }
.contract-row > span:last-child { text-align: right; }
.contract-row > span:last-child .text-button { white-space: normal; text-align: right; }
/* Si no caben los importes completos, cada contrato pasa a ficha (va después para no quedar anulado). */
@container (max-width: 680px) {
  .contract-head { display: none; }
  .contract-row { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .contract-row .contract-name { grid-column: 1 / -1; }
  .contract-row [data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .contract-row > span:last-child { grid-column: 1 / -1; text-align: left; }
}
@container (min-width: 400px) and (max-width: 680px) {
  .contract-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.contract-name .pill { max-width: 100%; }
.card-facts { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
.contract-cards.single { grid-template-columns: minmax(0, 1fr); }
.contract-cards.single .card-facts { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
/* "Recibirás": la etiqueta conserva su ancho y el valor baja de línea si hace falta. */
.money-list > div { flex-wrap: wrap; }
.money-list dt { flex: 1 1 10em; }
.money-list dd { flex: 0 0 auto; margin-left: auto; }
.contact-person span + span { font-size: 13px; color: var(--muted); }
/* Ayuda con preguntas frecuentes y contacto al lado. */
.help-layout .side-card { align-self: start; }
.help-layout .faq details:first-of-type { border-top: 1px solid var(--border); }
/* Modo oscuro: la tarjeta destacada y el contacto mantienen contraste. */
[data-theme="dark"] .metric.featured { background: #2a2417; border: 1px solid #5c4a22; }
[data-theme="dark"] .contact-icon { background: #3a2f1b; color: var(--gold-2); box-shadow: inset 0 0 0 1px #5c4a22; }
@media (max-width: 600px) {
  .metric:last-child { grid-column: 1 / -1; }
  /* Portada: la foto se ve entera y las cifras van debajo. */
  .project-hero { display: block; min-height: 0; background: var(--dark); }
  .project-hero > img { position: relative; height: 210px; }
  .project-hero::before { inset: 0 0 auto 0; height: 210px; background: linear-gradient(0deg, #101010b3, #10101000 60%); }
  .hero-inner { position: static; padding: 16px; }
  .hero-inner > div:first-child { position: absolute; z-index: 2; left: 16px; right: 16px; top: 0; height: 210px; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 14px; }
  .hero-inner h1 { font-size: 30px; }
  .hero-figures > div { background: #ffffff14; backdrop-filter: none; }
  .project-hero .art-caption { top: 12px; right: 12px; }
  .contract-cards.single .card-facts, .card-facts { grid-template-columns: 1fr 1fr; }
}
