/* Memoria de Cuentas site. Same system as auditsampler.com ("producto" look): white pages, ink text, one accent
   for actions (green here: "cuadra"), Hanken Grotesk. One stylesheet for every page tools/build.mjs writes.
   --blue keeps its name from the shared base but holds the green accent. */

:root {
    --paper: #F3F6FA;
    --sheet: #FFFFFF;
    --ink: #0E1B2E;
    --text: #475467;
    --rule: #DCE2EA;
    --grid: #EDF0F4;
    --tick: #C3122F;
    --blue: #0B6B53;
    --blue-d: #08533F;
    --side: #14283F;
    --flag: #B45309;
    --ok: #1F7A4D;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    background: var(--sheet);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.cond { font-weight: 700; }
.muted { color: var(--text); }
h1, h2, h3 { letter-spacing: -.022em; line-height: 1.14; text-wrap: balance; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Buttons */
.btn {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    padding: 11px 20px;
    border: 1px solid var(--blue);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { background: var(--blue-d); border-color: var(--blue-d); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.big { padding: 14px 26px; font-size: 16.5px; }
.btn.ghost { background: var(--sheet); color: var(--ink); border-color: #C5CEDA; }
.btn.ghost:hover { border-color: var(--ink); background: var(--sheet); }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.light:hover { background: #E3F2EC; border-color: #E3F2EC; }

/* Nav (same markup on every page) */
.nav { background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.nav-inner { display: flex; align-items: center; height: 68px; gap: 28px; }
.logo { font-weight: 700; font-size: 18.5px; letter-spacing: -.015em; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo svg { width: 28px; height: 28px; flex: none; }
.nav-links { display: flex; gap: 26px; margin-left: 16px; font-size: 15.5px; font-weight: 500; color: var(--text); }
.nav-links a { text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.lang { position: relative; margin-left: auto; font-size: 13px; font-weight: 600; }
.lang summary { display: flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink); cursor: pointer; list-style: none; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.lang[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px; padding: 6px; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 10px 28px rgba(14, 27, 46, .12); z-index: 30; }
.lang-menu a { padding: 7px 10px; border-radius: 6px; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; }
.lang-menu a:hover { background: var(--paper); color: var(--ink); }
.lang-menu a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav-cta { padding: 9px 16px; font-size: 15px; }

/* ---------- Home ---------- */

/* Hero: text left, app window bleeding off the right edge with its PDF workpaper on top */
.home-hero { overflow: hidden; padding: 84px 0 0; }
.home-hero-inner { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 64px; align-items: center; }
h1 { font-size: 52px; font-weight: 700; line-height: 1.06; letter-spacing: -.03em; }
.lede { font-size: 19.5px; color: var(--text); margin: 24px 0 32px; max-width: 46ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { font-size: 14.5px; color: var(--text); margin-top: 20px; max-width: 46ch; }
.stage { position: relative; padding: 0 0 64px; }
.stage .win { width: 900px; }
.stage-cap { font-size: 13.5px; color: var(--text); padding: 6px 0 30px; text-align: right; }

/* App window (HTML recreation, demo data) */
.win { border: 1px solid #C4CEDA; border-radius: 10px; overflow: hidden; background: #fff; font-size: 13.5px; line-height: 1.5; box-shadow: 0 40px 80px -40px rgba(14, 27, 46, .55), 0 8px 24px -12px rgba(14, 27, 46, .2); }
.bar { height: 36px; background: #E9EEF3; display: flex; align-items: center; padding: 0 14px; gap: 7px; border-bottom: 1px solid #D2DAE1; color: var(--text); font-size: 12.5px; }
.bar i { width: 11px; height: 11px; border-radius: 50%; background: #C5CED6; }
.bar span { margin-left: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.body { display: grid; grid-template-columns: 200px 1fr; min-height: 440px; }
.side { background: var(--side); color: #B9C7D3; padding: 16px 0; }
.side h6 { font-size: 11.5px; font-weight: 600; color: #7F93A5; padding: 6px 18px; }
.side span { display: block; padding: 7px 18px; }
.side span.on { background: rgba(255, 255, 255, .08); color: #fff; border-left: 3px solid var(--tick); padding-left: 15px; }
.main { padding: 18px 22px; min-width: 0; }
.crumbs { color: var(--text); font-size: 12.5px; }
.main h4 { font-size: 18px; margin: 2px 0 14px; letter-spacing: -.01em; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: 6px; margin-bottom: 16px; }
.kpis div { padding: 10px 14px; border-right: 1px solid var(--rule); }
.kpis div:last-child { border: 0; }
.kpis small { display: block; color: var(--text); font-size: 12px; }
.kpis b { font-size: 18px; white-space: nowrap; }
.items { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.items th { text-align: left; font-weight: 600; color: var(--text); font-size: 12px; border-bottom: 1px solid var(--rule); padding: 6px 8px; }
.items td { padding: 8px; border-bottom: 1px solid #EEF2F5; white-space: nowrap; }
.items .r { text-align: right; }
.items .t { color: var(--tick); font-weight: 700; }
.items tr.flag td { background: #FFF7ED; }
.items tr.flag .t { color: var(--flag); }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; background: #E7F4EC; color: var(--ok); font-weight: 600; white-space: nowrap; }
tr.flag .tag { background: #FDECD7; color: var(--flag); }

/* PDF sheet over the window */
.pdf { position: absolute; left: -48px; bottom: 0; width: 268px; background: #fff; border: 1px solid #CFD7E0; padding: 18px 20px 16px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 28px 50px -22px rgba(14, 27, 46, .5); }
.pdf-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.pdf-head span { color: var(--tick); font-weight: 700; font-size: 15px; }
.pdf-title { font-weight: 600; margin: 10px 0 6px; }
.pdf dl div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--grid); }
.pdf dt { color: var(--text); }
.pdf dd { margin: 0; white-space: nowrap; }
.pdf dl .t { border-top: 1.5px solid var(--ink); border-bottom: 3px double var(--ink); font-weight: 700; margin-top: 4px; padding: 6px 0; }
.pdf dl .t dt { color: var(--ink); }
.pdf-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; color: var(--text); }
.pdf-sign b { display: block; color: var(--ink); font-size: 11.5px; }

/* Standards bar */
.standards { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper); }
.standards-inner { display: grid; grid-template-columns: 190px 1fr; gap: 32px; align-items: center; padding-top: 26px; padding-bottom: 26px; }
.standards p { font-size: 14.5px; color: var(--text); line-height: 1.4; }
.standards ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.standards li { padding: 4px 22px; border-left: 1px solid #CDD6E1; min-width: 0; }
.standards b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; }
.standards span { display: block; font-size: 13px; color: var(--text); line-height: 1.35; }

/* Sections */
.sec { padding: 88px 0; border-bottom: 1px solid var(--rule); }
.sec.alt { background: var(--paper); }
h2 { font-size: 32px; font-weight: 700; max-width: 26ch; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.intro { color: var(--text); max-width: 62ch; margin: 12px 0 40px; font-size: 18px; }
.sec-head { max-width: 760px; margin-bottom: 52px; }
.sec-head h2 { font-size: 40px; }
.sec-head p { color: var(--text); font-size: 19px; margin-top: 16px; max-width: 60ch; }

/* Feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 80px; align-items: center; padding: 56px 0; border-top: 1px solid var(--rule); }
.feature:last-child { padding-bottom: 0; }
.feature.flip .f-text { order: 2; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink); font-weight: 700; font-size: 15px; margin-bottom: 18px; }
.f-text h3 { font-size: 30px; max-width: 18ch; }
.f-text > p { color: var(--text); margin-top: 14px; max-width: 48ch; }
.checks { list-style: none; padding: 0; margin-top: 20px; }
.checks li { position: relative; padding: 5px 0 5px 28px; font-size: 16px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 6px; height: 11px; border: solid var(--blue); border-width: 0 2.2px 2.2px 0; transform: rotate(40deg); }
.checks a, .f-more a { color: var(--blue); text-underline-offset: 3px; }
.f-more { margin-top: 16px; font-size: 15.5px; color: var(--text); }
.f-visual { background: var(--paper); border-radius: 14px; padding: 44px; min-width: 0; }
.card { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; box-shadow: 0 20px 40px -28px rgba(14, 27, 46, .4); }
.card .items td, .card .items th { padding-left: 6px; padding-right: 6px; }
.progress { margin-top: 14px; font-size: 13px; color: var(--text); }
.progress i { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: linear-gradient(to right, var(--blue) var(--w), #E3E8EF var(--w)); }

/* Workpaper calculator (home, MUS guide, attribute guide) */
.wp { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; box-shadow: 0 20px 40px -28px rgba(14, 27, 46, .4); font-size: 14.5px; }
.wp-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; border-bottom: 2px solid var(--ink); padding: 14px 18px; }
.wp-head h2, .wp-head .wp-title { font-size: 15.5px; font-weight: 700; letter-spacing: 0; max-width: none; line-height: 1.35; }
.wp-head p { color: var(--text); font-size: 13px; }
.wp-head p.wp-title { color: var(--ink); }
.ref { font-size: 20px; font-weight: 700; color: var(--tick); align-self: center; white-space: nowrap; }
.wp table { width: 100%; border-collapse: collapse; }
.wp td { padding: 9px 18px; border-bottom: 1px solid var(--grid); }
.wp td:last-child { text-align: right; width: 44%; white-space: nowrap; }
.wp td.l { color: var(--text); }
.wp label { display: block; }
.wp input, .wp select {
    font: inherit;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    text-align: right;
    border: 1px solid #C5CEDA;
    border-radius: 6px;
    padding: 6px 10px;
    width: 100%;
    max-width: 170px;
    background: #fff;
    color: var(--ink);
}
.wp input:focus, .wp select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 107, 83, .16); }
.wp input[aria-invalid="true"] { border-color: var(--tick); }
.out td { background: #FAFBFD; }
.out td:last-child { font-weight: 600; }
.tk { color: var(--tick); font-weight: 700; margin-left: 6px; }
.total td { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--grid); font-weight: 700; font-size: 16px; background: var(--sheet); }
.total .n { font-size: 32px; letter-spacing: -.03em; line-height: 1.1; }
.formula { padding: 12px 18px; color: var(--text); font-size: 13px; border-bottom: 1px solid var(--grid); background: #FAFBFD; }
.formula .err { color: var(--tick); }
.sign { display: grid; grid-template-columns: 1fr 1fr 1.3fr; font-size: 12.5px; }
.sign div { padding: 10px 18px; border-right: 1px solid var(--grid); }
.sign div:last-child { border: 0; color: var(--text); }
.sign b { display: block; font-weight: 600; color: var(--ink); }
.sign .pending { color: var(--text); font-style: italic; }
.sign a { color: var(--blue); font-weight: 600; white-space: nowrap; }

/* Evaluation card */
.eval { padding: 24px 26px; }
.eval-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.eval-top span { font-weight: 600; font-size: 15px; }
.eval-top b { font-size: 32px; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.stack { position: relative; display: flex; height: 22px; margin: 44px 0 18px; background: #EEF1F5; border-radius: 4px; }
.stack i { height: 100%; }
.stack i:first-child { border-radius: 4px 0 0 4px; }
.a { background: #1E3A66; }
.b { background: #4F7BD9; }
.c { background: #A9C0EE; }
.stack em { position: absolute; top: -10px; bottom: -6px; border-left: 2px solid var(--tick); }
.stack em span { position: absolute; bottom: 100%; right: -4px; white-space: nowrap; font-style: normal; font-weight: 600; font-size: 12.5px; line-height: 1.6; color: var(--tick); }
.stack em span span { position: static; }
.legend { list-style: none; padding: 0; font-size: 14.5px; }
.legend li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--grid); color: var(--text); }
.legend i { width: 11px; height: 11px; border-radius: 2px; flex: none; }
.legend b { margin-left: auto; color: var(--ink); font-weight: 600; white-space: nowrap; }
.verdict { margin-top: 16px; font-size: 14.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.eval .src { font-size: 13px; color: var(--text); margin-top: 12px; }
.eval .src a { color: var(--blue); }

/* PDF page */
.paper { background: #fff; border: 1px solid #CFD7E0; max-width: 420px; margin: 0 auto; padding: 30px 32px 22px; font-size: 13.5px; box-shadow: 0 30px 50px -30px rgba(14, 27, 46, .55); }
.paper-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.paper-head b { display: block; font-size: 15px; }
.paper-head span { color: var(--text); font-size: 12.5px; }
.paper-head .ref { color: var(--tick); font-size: 20px; }
.paper h4 { font-size: 15px; margin: 16px 0 8px; }
.paper table { width: 100%; border-collapse: collapse; }
.paper td { padding: 5px 0; border-bottom: 1px solid var(--grid); color: var(--text); }
.paper td:last-child { text-align: right; color: var(--ink); white-space: nowrap; }
.paper tr.t td { border-top: 1.5px solid var(--ink); border-bottom: 3px double var(--ink); font-weight: 700; color: var(--ink); padding: 8px 0; }
.paper-lines { margin: 18px 0; display: grid; gap: 8px; }
.paper-lines i { height: 7px; background: #EEF1F5; border-radius: 2px; }
.paper-lines i:nth-child(2) { width: 88%; }
.paper-lines i:nth-child(3) { width: 61%; }
.paper-sign { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); }
.paper-sign div { padding: 8px 12px; color: var(--text); font-size: 12.5px; }
.paper-sign div + div { border-left: 1px solid var(--rule); }
.paper-sign b { display: block; color: var(--ink); }
.paper-sign em { display: block; }
.paper-foot { margin-top: 16px; font-size: 11.5px; color: #7B8798; text-align: center; }

/* Methods grid */
.methods { display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.methods a { padding: 26px 22px 28px; text-decoration: none; border-left: 1px solid var(--rule); min-width: 0; }
.methods a:first-child { border-left: 0; }
.methods a:hover { background: #FAFBFD; }
.methods a:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.s { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--blue); background: #E3F2EC; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.methods h3 { font-size: 18.5px; margin: 14px 0 8px; line-height: 1.2; text-wrap: wrap; }
.methods p { font-size: 14.5px; color: var(--text); line-height: 1.5; }
.methods b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }

/* Methodology: published factors */
.method-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 80px; align-items: start; margin-top: 72px; scroll-margin-top: 90px; }
.method-block h3 { font-size: 30px; }
.method-block > div > p { color: var(--text); margin-top: 14px; max-width: 50ch; }
.factors { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--sheet); border: 1px solid var(--rule); }
.factors th, .factors td { padding: 10px 16px; border-bottom: 1px solid var(--grid); text-align: right; }
.factors th:first-child, .factors td:first-child { text-align: left; }
.factors th { font-weight: 600; color: var(--text); font-size: 13.5px; border-bottom: 2px solid var(--ink); }
.biblio { margin-top: 28px; padding: 0; list-style: none; font-size: 14.5px; color: var(--text); }
.biblio li { padding: 8px 0; border-top: 1px solid var(--rule); }

/* Photo band */
.band { position: relative; border-bottom: 1px solid var(--rule); }
.band-photo { position: absolute; top: 0; bottom: 0; left: 0; width: 47%; overflow: hidden; background: var(--paper); }
.band-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.78); }
.band-inner { display: grid; grid-template-columns: 1fr 1fr; }
.band-text { grid-column: 2; padding: 104px 0 104px 64px; }
.band-text h2 { font-size: 36px; max-width: none; }
.band-text > p { color: var(--text); font-size: 18.5px; margin-top: 16px; max-width: 46ch; }

/* Security band */
.sec.dark { background: var(--ink); color: #fff; border-bottom: 0; }
.dark .sec-head p { color: #AEBBCB; }
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 48px; margin-bottom: 44px; }
.sec-grid > div { border-top: 1px solid rgba(255, 255, 255, .22); padding: 22px 0 30px; }
.sec-grid h3 { font-size: 19px; }
.sec-grid p { color: #AEBBCB; font-size: 15.5px; margin-top: 8px; }

/* Trial steps and platform cards */
.trial { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 80px; align-items: start; }
.trial h2 { font-size: 40px; }
.trial-steps { list-style: none; padding: 0; margin-top: 32px; counter-reset: s; }
.trial-steps li { counter-increment: s; position: relative; padding: 18px 0 18px 54px; border-top: 1px solid var(--rule); color: var(--text); }
.trial-steps li::before { content: counter(s); position: absolute; left: 0; top: 16px; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.trial-steps b { display: block; color: var(--ink); }
.dl { display: grid; gap: 14px; }
.dl-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid var(--rule); border-radius: 10px; padding: 24px 26px; background: #fff; box-shadow: 0 20px 40px -32px rgba(14, 27, 46, .45); }
.dl-row.muted { background: var(--paper); box-shadow: none; color: inherit; }
.dl-row p { font-size: 14.5px; color: var(--text); margin-top: 4px; }
.dl-note { font-size: 14.5px; color: var(--text); }
.dl-note a { color: var(--blue); font-weight: 600; }

/* Guide cards on the home */
.guide-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-cards a { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 24px 24px 26px; text-decoration: none; min-width: 0; }
.guide-cards a:hover { border-color: #9FB0C6; }
.guide-cards h3 { font-size: 18.5px; }
.guide-cards p { font-size: 15px; color: var(--text); margin-top: 8px; }
.more-guides { margin-top: 28px; font-size: 15px; color: var(--text); line-height: 1.8; max-width: 100ch; }
.more-guides a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: #A9B4C3; }
.more-guides .all { color: var(--blue); font-weight: 600; }

/* FAQ */
.faq { max-width: 868px; }
.faq.split { max-width: 1200px; display: grid; grid-template-columns: 340px 1fr; gap: 64px; }
.faq.split h2 { font-size: 36px; }
.faq-list { margin-top: 32px; }
.faq.split .faq-list { margin-top: 0; }
details { border-top: 1px solid var(--rule); padding: 18px 0; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { font-weight: 600; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--text); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--text); margin-top: 10px; max-width: 70ch; }
details p a { color: var(--blue); }

/* Access request / closing band (home form; a single button on the generated pages) */
.join { background: var(--ink); color: #fff; padding: 88px 0; }
.join-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.join-inner > * { min-width: 0; }
.join h2 { color: #fff; font-size: 36px; }
.join p { color: #AEBBCB; margin-top: 12px; max-width: 50ch; }
.join p a { color: #fff; }
.form-card { background: var(--sheet); color: var(--ink); padding: 28px; border-radius: 10px; }
.form-card label { font-weight: 600; font-size: 14.5px; display: block; margin-bottom: 6px; }
.form-card .row { display: flex; gap: 10px; }
.form-card input { flex: 1; min-width: 0; font: inherit; padding: 11px 12px; border: 1px solid #C5CEDA; border-radius: 8px; color: var(--ink); }
.form-card input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(11, 107, 83, .16); }
.form-card small { display: block; color: var(--text); margin-top: 12px; font-size: 13.5px; }
.form-card small.error { color: var(--tick); }
.form-card small.error:empty { display: none; }
.form-card small a { color: inherit; }
.form-card .check { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; }
.form-card .check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--blue); }
.form-card .check input:focus { box-shadow: none; }
.form-card .check input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.form-card .check label { display: block; margin: 0; font-weight: 400; font-size: 14.5px; line-height: 1.45; color: var(--ink); cursor: pointer; }
.join .success { color: var(--ink); margin: 0; font-weight: 600; }

/* Footer (same markup on every page) */
.footer { padding: 52px 0; color: var(--text); font-size: 15px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer p { margin-top: 12px; max-width: 36ch; }
.footer .copy { font-size: 13.5px; }
.footer h5 { color: var(--ink); font-size: 14.5px; margin-bottom: 10px; }
.footer ul { list-style: none; padding: 0; }
.footer li { padding: 3px 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Guide pages (content/pages/*.mjs, built by tools/build-pages.mjs) and the MUS guide ---------- */
.hero { padding: 64px 0 80px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.hero-inner { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: start; }
.hero-inner > * { min-width: 0; }
.hero-solo { grid-template-columns: 1fr; }
.hero-solo > div { max-width: 868px; }
h1.h1-long { font-size: 42px; line-height: 1.1; letter-spacing: -.025em; max-width: 20ch; }
.hero .lede { font-size: 18.5px; margin: 20px 0 24px; max-width: 52ch; }
.breadcrumb { font-size: 14.5px; color: var(--text); margin-bottom: 18px; }
.breadcrumb a { color: var(--blue); }
.note { font-size: 14.5px; color: var(--text); max-width: 46ch; }
.note a { color: var(--blue); }
.prose { max-width: 868px; }
.prose h2 { margin: 56px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 32px 0 8px; font-size: 20px; color: var(--ink); }
.prose p { color: var(--text); margin-top: 12px; max-width: 70ch; }
.prose p a, .prose li a, .prose td a, .prose dd a { color: var(--blue); text-underline-offset: 3px; }
.prose ul, .prose ol { color: var(--text); margin-top: 12px; padding-left: 22px; max-width: 70ch; }
.prose li { margin-top: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--ink); }
.prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }
.prose .factors { margin-top: 18px; }
.prose .factors th, .prose .factors td { text-align: right; }
.prose .factors th:first-child, .prose .factors td:first-child { text-align: left; }
.table-scroll { overflow-x: auto; }
.glossary dt { margin-top: 18px; color: var(--ink); font-weight: 600; scroll-margin-top: 90px; }
.glossary dd { margin: 4px 0 0; color: var(--text); max-width: 70ch; }
.az p { font-weight: 600; letter-spacing: .02em; }
.az a { color: var(--blue); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--grid); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
.formula-box { font-size: 20px; font-weight: 600; color: var(--ink) !important; background: var(--paper); border-left: 3px solid var(--tick); border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 16px 0 18px; }
.formula-box code { background: none; padding: 0; }
.callout { margin-top: 22px; padding: 16px 20px; border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; background: var(--paper); color: var(--text); max-width: 70ch; }
.callout b, .callout strong { color: var(--ink); }
.keyfacts { border: 1px solid var(--rule); border-radius: 10px; background: #fff; padding: 22px 24px; align-self: start; box-shadow: 0 20px 40px -32px rgba(14, 27, 46, .4); }
.keyfacts h2 { font-size: 15px; letter-spacing: 0; margin: 0 0 12px; }
.keyfacts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.keyfacts dt { color: var(--text); }
.keyfacts dd { margin: 0; color: var(--ink); font-weight: 600; }
.cards { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cards a { display: block; height: 100%; padding: 20px 22px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; color: var(--text); text-decoration: none; }
.cards a:hover { border-color: #9FB0C6; }
.cards b { display: block; color: var(--ink); margin-bottom: 6px; font-size: 17.5px; letter-spacing: -.01em; }
.cards span { font-size: 15px; }
.hub h2 { margin: 48px 0 0; }
.hub h2:first-child { margin-top: 0; }
.related-sec { padding: 64px 0; }
.all-guides { margin-top: 20px; }
.all-guides a { color: var(--blue); font-weight: 600; }
.defs, .steps { color: var(--text); padding-left: 20px; margin-top: 12px; max-width: 70ch; }
.defs li, .steps li { padding: 5px 0; }
.defs b { color: var(--ink); font-weight: 600; }
.source { font-size: 13.5px; }
.drivers td:first-child { white-space: normal; }

/* Download page */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.dl-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; min-width: 0; box-shadow: 0 20px 40px -32px rgba(14, 27, 46, .45); }
.dl-card h2 { margin: 0; }
.dl-card .note { max-width: none; }
.dl-muted { background: var(--paper); box-shadow: none; }
.dl-btn { font-size: 16px; }
.dl-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14.5px; width: 100%; }
.dl-facts dt { color: var(--text); }
.dl-facts dd { margin: 0; min-width: 0; }
.dl-facts .sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
    .home-hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
    h1 { font-size: 44px; }
    .standards-inner { grid-template-columns: 1fr; gap: 16px; }
    .standards li:first-child { border-left: 0; padding-left: 0; }
    .methods { grid-template-columns: repeat(3, 1fr); }
    .methods a { border-top: 1px solid var(--rule); margin-top: -1px; }
    .feature, .method-block { gap: 48px; }
    .f-visual { padding: 28px; }
}

@media (max-width: 960px) {
    .nav-links { display: none; }
    .hero { padding: 44px 0 60px; }
    .hero-inner, .join-inner { grid-template-columns: 1fr; gap: 40px; }
    h1.h1-long { font-size: 33px; max-width: none; }
    h2 { font-size: 27px; }
    .sec, .join { padding: 64px 0; }
    .wp td:last-child { width: 46%; }
    .sign { grid-template-columns: 1fr 1fr; }
    .sign div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--grid); }
    .form-card .row { flex-direction: column; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-inner > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
    body { font-size: 16.5px; }
    .wrap { padding-left: 16px; padding-right: 16px; }
    .nav-inner { height: 60px; gap: 12px; }
    .logo { font-size: 17px; gap: 8px; }
    .logo svg { width: 24px; height: 24px; }
    .nav-cta { padding: 8px 12px; font-size: 14px; }
    .home-hero { padding-top: 40px; }
    .home-hero-inner { grid-template-columns: 1fr; gap: 40px; }
    h1 { font-size: 36px; }
    .lede { font-size: 18px; margin: 18px 0 24px; }
    .cta .btn { flex: 1 1 100%; text-align: center; }
    .stage { padding-bottom: 20px; }
    .stage .win { width: 100%; }
    .pdf { display: none; }
    .body { grid-template-columns: 1fr; min-height: 0; }
    .side { display: none; }
    .main { overflow-x: auto; padding: 16px; }
    .main .items { min-width: 540px; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .kpis div:nth-child(2) { border-right: 0; }
    .kpis div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
    .stage-cap { text-align: left; }
    .standards ul { grid-template-columns: 1fr 1fr; gap: 16px 0; }
    .standards li { padding: 0 12px 0 0; border-left: 0; }
    .standards b { font-size: 17px; }
    .sec-head { margin-bottom: 32px; }
    .sec-head h2, .trial h2 { font-size: 30px; }
    .sec-head p { font-size: 17.5px; }
    .feature { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
    .feature.flip .f-text { order: 0; }
    .f-text h3, .method-block h3 { font-size: 25px; max-width: none; }
    .f-visual { padding: 16px; border-radius: 10px; }
    .card { padding: 14px; overflow-x: auto; }
    .card .items { min-width: 420px; }
    .eval { overflow-x: visible; padding: 18px 16px; }
    .eval-top b { font-size: 26px; }
    .paper { padding: 22px 20px 18px; }
    .methods { grid-template-columns: 1fr; }
    .methods a { border-left: 0; padding: 20px 18px 22px; }
    .method-block { grid-template-columns: 1fr; gap: 28px; margin-top: 48px; }
    .band-photo { position: static; width: 100%; height: 240px; }
    .band-inner { grid-template-columns: 1fr; }
    .band-text { grid-column: 1; padding: 44px 0 60px; }
    .band-text h2 { font-size: 28px; }
    .sec-grid { grid-template-columns: 1fr; margin-bottom: 28px; }
    .sec-grid > div { padding-bottom: 22px; }
    .btn.light { white-space: normal; text-align: center; display: block; }
    .trial { grid-template-columns: 1fr; gap: 36px; }
    .dl-row { flex-direction: column; align-items: stretch; padding: 20px; }
    .dl-row .btn { text-align: center; }
    .guide-cards { grid-template-columns: 1fr; }
    .faq.split { grid-template-columns: 1fr; gap: 20px; }
    .faq.split h2, .join h2 { font-size: 28px; }
}

@media (max-width: 560px) {
    .nav-cta { display: none; }
}
@media (max-width: 420px) {
    .wp td { padding: 8px 12px; }
    .wp input, .wp select { max-width: 140px; }
}

/* ---------- Memoria de Cuentas additions ---------- */
.okmark { color: var(--ok); font-style: normal; font-weight: 700; margin-left: 4px; }

/* Hero: a memoria page with the review panel over it */
.mc-stage { padding-bottom: 40px; }
.mc-stage .stage-cap { padding-top: 14px; }
.nav-cta { margin-left: auto; }
.doc { background: #fff; border: 1px solid #CFD7E0; border-radius: 4px; max-width: 540px; padding: 30px 34px 84px; font-size: 13.5px; line-height: 1.5; box-shadow: 0 40px 80px -40px rgba(14, 27, 46, .55), 0 8px 24px -12px rgba(14, 27, 46, .2); }
.doc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.doc-head b { font-size: 15px; }
.doc-head span { color: var(--text); font-size: 12.5px; }
.doc h4 { font-size: 15px; margin: 18px 0 6px; letter-spacing: -.01em; }
.doc-p { color: var(--text); }
.doc-t { width: 100%; border-collapse: collapse; margin-top: 8px; }
.doc-t th { font-size: 12px; color: var(--text); font-weight: 600; border-bottom: 1px solid var(--ink); padding: 4px 0; }
.doc-t td { padding: 5px 0; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.doc-t .r { text-align: right; padding-left: 14px; }
.doc-t tr.t td { border-top: 1.5px solid var(--ink); border-bottom: 3px double var(--ink); font-weight: 700; }
.doc-lines { display: grid; gap: 8px; margin-top: 10px; }
.doc-lines i { height: 7px; background: #EEF1F5; border-radius: 2px; }
.doc-lines i:nth-child(2) { width: 90%; }
.doc-lines i:nth-child(3) { width: 64%; }
.review { position: relative; margin: -64px -28px 0 auto; width: 350px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 30px 60px -28px rgba(14, 27, 46, .5); font-size: 13.5px; line-height: 1.4; overflow: hidden; }
.review-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.review-head span { color: var(--text); font-size: 12.5px; }
.review ul { list-style: none; padding: 0; }
.review li { position: relative; padding: 10px 16px 10px 40px; border-bottom: 1px solid var(--grid); }
.review li:last-child { border-bottom: 0; }
.review li b { display: block; font-weight: 600; }
.review li span { color: var(--text); font-size: 12.5px; }
.review li::before, .ck::before { position: absolute; left: 14px; top: 10px; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.review li.ok::before, .ck.ok::before { content: "✓"; background: #E7F4EC; color: var(--ok); }
.review li.chg::before { content: "Δ"; background: #E8EEF8; color: #1E3A66; }
.review li.warn::before, .ck.warn::before { content: "!"; background: #FDECD7; color: var(--flag); }
.review li.bad::before, .ck.bad::before { content: "✕"; background: #FBE3E6; color: var(--tick); }

/* Feature visuals */
.diff p { font-size: 14.5px; color: var(--ink); margin-top: 10px; line-height: 1.5; }
.diff .diff-h { font-weight: 700; margin-top: 0; }
.diff del { color: var(--tick); background: #FBE3E6; text-decoration-thickness: 1px; }
.diff ins { color: var(--ok); background: #E7F4EC; text-decoration: none; }
.diff .diff-n { font-size: 13px; color: var(--text); border-top: 1px solid var(--grid); padding-top: 10px; }
.checklist { padding: 8px 0; }
.ck { position: relative; padding: 10px 18px 10px 44px; font-size: 14.5px; border-bottom: 1px solid var(--grid); }
.ck:last-child { border-bottom: 0; }
.ck::before { left: 16px; top: 11px; }

/* Form extras */
.form-card .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.form-card .row.two input, .form-card select { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid #C5CEDA; border-radius: 8px; color: var(--ink); background: #fff; }
.form-card select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(11, 107, 83, .16); }
.form-card .opt { font-weight: 400; color: var(--text); }
.form-card button { margin-top: 18px; }
.form-card .form-lead { color: var(--ink); margin: 0 0 14px; }
.form-card input[aria-invalid="true"] { border-color: var(--tick); }

/* Guides: sources heading and model text blocks */
.sources-h { margin-top: 48px; font-size: 22px; }
.prose pre, .model-text { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.6; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; margin-top: 16px; max-width: 70ch; overflow-x: auto; }

@media (max-width: 1100px) {
    .review { width: auto; margin: -48px 12px 0 40px; }
}
@media (max-width: 860px) {
    .doc { padding: 20px 18px 24px; overflow-x: auto; }
    .review { margin: -40px 8px 0 24px; }
    .form-card .row.two { grid-template-columns: 1fr; }
}

/* Plazos calculator (in the guide body): long dates wrap on narrow screens instead of widening the page. */
#plazos-calc { margin: 8px 0 24px; max-width: 100%; }
@media (max-width: 640px) {
    #plazos-calc td:last-child { white-space: normal; width: 55%; }
    #plazos-calc input, #plazos-calc select { max-width: 100%; width: 100%; }
}

/* Quote form (/presupuesto/) */
.quote-form { border: 1px solid var(--rule); box-shadow: 0 20px 40px -28px rgba(14, 27, 46, .4); margin: 8px 0 24px; }
.quote-form fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.quote-form legend { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; padding: 0; }
.quote-form .check, .quote-form .radio { display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; }
.quote-form .radio input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--blue); }
.quote-form .radio label { display: block; margin: 0; font-weight: 400; cursor: pointer; }
.quote-form > label { margin-top: 14px; }
.quote-form textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid #C5CEDA; border-radius: 8px; color: var(--ink); resize: vertical; }
.quote-form textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(11, 107, 83, .16); }
.quote-form .error { color: var(--tick); font-weight: 600; margin: 0 0 14px; }
.quote-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-alt { margin-top: 14px; font-size: 14px; color: var(--text); }
@media (max-width: 640px) { .form-card .row.two { grid-template-columns: 1fr; } }
