/* Aguja Verde · sistema visual común (27-oct-2026)
   Se carga después del estilo propio de cada página y unifica marca, tipografía, botones,
   tarjetas, recuadros, tablas y la sección de compra. No cambia texto. */
:root{
  --av-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  --av-r:14px;
  --av-ink:var(--ink,#16181C); --av-paper:var(--paper,#FBF9F4); --av-card:var(--card,#FFFFFF); --av-card-2:var(--card-2,#F4F1EA);
  --av-brand:var(--brand,#C43C12); --av-brand-line:var(--brand-line,#F5C9B8); --av-brand-wash:var(--brand-wash,#FDEFE9);
  --av-rule:var(--rule,#E4DFD4); --av-ink-2:var(--ink-2,#565C66); --av-ink-3:var(--ink-3,#6B7178); --av-on-brand:var(--on-brand,#FFFFFF);
  --av-green:#1F7A4D; --av-shade:rgba(22,24,28,.10);
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--av-green:#34D399;--av-shade:rgba(0,0,0,.45)}}
:root[data-theme="dark"]{--av-green:#34D399;--av-shade:rgba(0,0,0,.45)}

/* ---------- Marca: la aguja del manómetro en verde ---------- */
html body a.logo, html body .logo > a, html body a.brandmark, html body .site-header .logo-text{
  position:relative; display:inline-flex; align-items:center; padding-left:32px; min-height:24px;
  color:var(--av-ink); font-weight:800; letter-spacing:-.015em; text-decoration:none; white-space:nowrap;
}
html body a.logo::before, html body .logo > a::before, html body a.brandmark::before, html body .site-header .logo-text::before{
  content:""; position:absolute; left:0; top:50%; width:24px; height:24px; margin-top:-12px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5a10.5 10.5 0 1 0 0 21a10.5 10.5 0 0 0 0-21zm0 2a8.5 8.5 0 1 1 0 17a8.5 8.5 0 0 1 0-17zM12 10a2 2 0 1 0 0 4a2 2 0 0 0 0-4z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5a10.5 10.5 0 1 0 0 21a10.5 10.5 0 0 0 0-21zm0 2a8.5 8.5 0 1 1 0 17a8.5 8.5 0 0 1 0-17zM12 10a2 2 0 1 0 0 4a2 2 0 0 0 0-4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
html body a.logo::after, html body .logo > a::after, html body a.brandmark::after, html body .site-header .logo-text::after{
  content:""; position:absolute; left:0; top:50%; width:24px; height:24px; margin-top:-12px; background:var(--av-green);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11.3 11.3l5.6-5.2 1 1-5.2 5.6z'/%3E%3Cpath d='M5.2 15.6a7.2 7.2 0 0 1 2-8.2l1.1 1.2a5.6 5.6 0 0 0-1.6 6.4z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11.3 11.3l5.6-5.2 1 1-5.2 5.6z'/%3E%3Cpath d='M5.2 15.6a7.2 7.2 0 0 1 2-8.2l1.1 1.2a5.6 5.6 0 0 0-1.6 6.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
html body a.brandmark .glyph, html body .site-header .logo-mark{display:none}
html body a.brandmark b, html body a.brandmark b i, html body .site-header .logo-text span{color:inherit;font-style:normal;font-weight:800}
html body .site-header{position:sticky;top:env(safe-area-inset-top,0px);z-index:100;
  background:color-mix(in srgb,var(--av-paper) 70%,transparent);border-bottom:1px solid var(--av-rule);
  -webkit-backdrop-filter:blur(16px) saturate(1.8);backdrop-filter:blur(16px) saturate(1.8);color:var(--av-ink)}
html body .site-header .back-link, html body .nav-back, html body .header-title, html body > header nav a{color:var(--av-ink-2)}

/* ---------- Tipografía ---------- */
html body h1{font-weight:800;letter-spacing:-.035em;line-height:1.05;text-wrap:balance}
html body h2{font-weight:800;letter-spacing:-.025em;line-height:1.15;text-wrap:balance}
html body h3{letter-spacing:-.012em;text-wrap:balance}
html body main article h2, html body main > article h2, html body .article-content h2{border-left:0;padding-left:0;margin-top:2.75rem}
html body .article-header h1, html body main article > h1{font-size:clamp(2rem,4.8vw,3.1rem)}
html body .article-meta, html body .article-date, html body time.article-date{font-family:var(--av-mono);font-size:.78rem;letter-spacing:0;text-transform:none}
html body table td, html body table th{font-variant-numeric:tabular-nums}

/* ---------- Botones ---------- */
html body a.cta-button, html body .cta-buttons a, html body a.cta, html body .btn-calc,
html body form.capture button, html body .lead-capture-top button, html body form button[type="submit"]{
  border-radius:12px; font-weight:700; letter-spacing:-.005em;
  transition:transform .15s ease, filter .2s ease, background-color .2s, border-color .2s;
}
html body a.cta-button:hover, html body .cta-buttons a:hover, html body a.cta:hover, html body .btn-calc:hover,
html body form button[type="submit"]:hover{filter:brightness(1.06)}
html body a.cta-button:active, html body .cta-buttons a:active, html body a.cta:active, html body .btn-calc:active,
html body form button[type="submit"]:active{transform:scale(.97)}

/* ---------- Tarjetas ---------- */
html body .article-card, html body .post, html body .card, html body .panel, html body .related-card, html body .stat-card{border-radius:var(--av-r)}
html body .articles-grid{gap:18px}
html body .article-card h3{font-weight:800;letter-spacing:-.02em}

/* ---------- Recuadros del artículo: un borde fino de color, sin franja lateral ---------- */
html body .highlight-box, html body .warning-box, html body .info-box, html body .success-box, html body .intro-box, html body .formula-box{
  border-left-width:1px; border-radius:12px;
}
html body .highlight-box{border:1px solid var(--av-brand-line)}

/* ---------- Sección de compra del artículo: el momento de comprar, en tinta ---------- */
html body .cta-section{
  background:var(--av-ink); color:var(--av-paper); border:1px solid var(--av-ink); border-radius:20px;
  padding:clamp(1.6rem,4vw,2.6rem); text-align:left; box-shadow:0 30px 60px -40px var(--av-shade);
}
html body .cta-section h2, html body .cta-section h3{color:var(--av-paper);border:0;padding:0;margin-top:0}
html body .cta-section p, html body .cta-section li{color:color-mix(in srgb,var(--av-paper) 80%,transparent)}
html body .cta-section .price-tag{color:var(--av-paper);font-family:var(--av-mono);font-weight:800;letter-spacing:-.03em}
html body .cta-section .cta-buttons{flex-direction:row;flex-wrap:wrap;justify-content:flex-start;gap:10px}
html body .cta-section a.cta-button, html body .cta-section .cta-buttons a{background:var(--av-brand);color:var(--av-on-brand);border:1px solid var(--av-brand)}
html body .cta-section a.cta-button.secondary, html body .cta-section .cta-buttons a + a{
  background:transparent;color:var(--av-paper);border:1px solid color-mix(in srgb,var(--av-paper) 35%,transparent)}
html body .cta-section .payhip-alt, html body .cta-section .payhip-alt a, html body .cta-section .substack-cta, html body .cta-section .substack-cta a{color:color-mix(in srgb,var(--av-paper) 72%,transparent);text-align:left}
html body .cta-section a:not(.cta-button):not([class]){color:var(--av-paper)}

/* ---------- Portada ---------- */
.av-hero{padding-block:clamp(32px,6vw,80px) clamp(24px,4vw,48px)}
.av-hero > .wrap{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:clamp(28px,5vw,64px);align-items:center}
.av-hero h1{font-size:clamp(2.4rem,6.2vw,4.6rem);line-height:.98;letter-spacing:-.04em;margin:16px 0 0}
.av-hero h1 em{font-style:normal;color:var(--av-brand)}
.av-hero .av-lede{font-size:clamp(1.02rem,1.6vw,1.15rem);color:var(--av-ink-2);max-width:56ch;margin:22px 0 0}
.av-hero .av-cta-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}
.av-btn{display:inline-flex;align-items:center;gap:8px;text-decoration:none;font-weight:700;border-radius:12px;padding:13px 20px;border:1px solid transparent;transition:transform .15s ease,filter .2s,border-color .2s}
.av-btn:active{transform:scale(.97)}
.av-btn-brand{background:var(--av-brand);color:var(--av-on-brand)}
.av-btn-brand:hover{filter:brightness(1.06)}
.av-btn-ghost{background:var(--av-card);color:var(--av-ink);border-color:var(--av-rule)}
.av-btn-ghost:hover{border-color:var(--av-brand-line)}
.av-hero .ladder{margin-top:26px;background:none;border:0;padding:0}
.av-hero .ladder .wrap{padding:0;max-width:none;margin:0}
.av-eyebrow{font-weight:700;font-size:.76rem;letter-spacing:.12em;text-transform:uppercase;color:var(--av-brand)}
.av-calc{background:var(--av-card);border:1px solid var(--av-rule);border-radius:20px;box-shadow:0 30px 60px -36px var(--av-shade);overflow:hidden;min-width:0}
.av-calc-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid var(--av-rule);background:var(--av-card-2)}
.av-calc-head span{font-weight:700;font-size:.74rem;letter-spacing:.1em;text-transform:uppercase;color:var(--av-ink-3)}
.av-calc-head .live{display:inline-flex;align-items:center;gap:6px;color:var(--av-green)}
.av-calc-head .live i{width:7px;height:7px;border-radius:50%;background:var(--av-green);animation:av-pulse 2.4s infinite}
@keyframes av-pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--av-green) 55%,transparent)}70%{box-shadow:0 0 0 7px transparent}100%{box-shadow:0 0 0 0 transparent}}
.av-calc-body{padding:20px 18px 18px;display:grid;gap:18px}
.av-field > label, .av-field > .lbl{display:block;font-weight:700;font-size:.76rem;letter-spacing:.06em;text-transform:uppercase;color:var(--av-ink-3);margin-bottom:8px}
.av-area{display:flex;align-items:center;gap:12px}
.av-area input[type=number]{width:120px;font:700 1.35rem var(--av-mono);color:var(--av-ink);background:var(--av-paper);border:1px solid var(--av-rule);border-radius:10px;padding:8px 12px}
.av-area .u{font:700 1rem var(--av-mono);color:var(--av-ink-2)}
.av-area input[type=range]{flex:1;min-width:0;accent-color:var(--av-brand)}
.av-seg{display:grid;grid-template-columns:repeat(3,1fr);background:var(--av-paper);border:1px solid var(--av-rule);border-radius:12px;padding:4px;gap:4px}
.av-seg button{border:0;background:transparent;color:var(--av-ink-2);font:600 .95rem inherit;font-family:inherit;padding:9px 6px;border-radius:9px;cursor:pointer;transition:background-color .2s,color .2s}
.av-seg button[aria-pressed="true"]{background:var(--av-card);color:var(--av-ink);box-shadow:0 1px 0 var(--av-rule),0 4px 12px -6px var(--av-shade)}
.av-out{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--av-rule);border-radius:14px;overflow:hidden}
.av-out > div{padding:14px 12px;display:grid;gap:4px;min-width:0;align-content:start}
.av-out > div + div{border-left:1px solid var(--av-rule)}
.av-out b{font:800 clamp(1.45rem,3.4vw,2.05rem)/1 var(--av-mono);letter-spacing:-.03em;color:var(--av-ink)}
.av-out > div:first-child b{color:var(--av-brand)}
.av-out small{font-size:.78rem;line-height:1.3;color:var(--av-ink-3)}
.av-clause{display:inline-block;justify-self:start;font:700 .68rem var(--av-mono);color:var(--av-brand);background:var(--av-brand-wash);border:1px solid var(--av-brand-line);border-radius:6px;padding:2px 6px}
.av-calc-foot{display:flex;justify-content:space-between;align-items:center;gap:8px 12px;flex-wrap:wrap;font-size:.84rem;color:var(--av-ink-3)}
.av-calc-foot a{color:var(--av-brand);font-weight:700;text-decoration:none}
.av-calc-foot a:hover{text-decoration:underline}
.av-bump{animation:av-bump .35s cubic-bezier(.2,.7,.2,1)}
@keyframes av-bump{from{transform:translateY(6px);opacity:.3}to{transform:none;opacity:1}}

.av-viewer{background:var(--av-card);border:1px solid var(--av-rule);border-radius:20px;overflow:hidden;box-shadow:0 40px 80px -50px var(--av-shade);margin-top:28px}
.av-tabs{display:flex;gap:4px;padding:10px;border-bottom:1px solid var(--av-rule);background:var(--av-card-2);overflow-x:auto;scrollbar-width:none}
.av-tabs::-webkit-scrollbar{display:none}
.av-tabs button{flex:0 0 auto;border:1px solid transparent;background:transparent;color:var(--av-ink-2);font:600 .9rem inherit;font-family:inherit;padding:8px 14px;border-radius:10px;cursor:pointer;white-space:nowrap}
.av-tabs button[aria-selected="true"]{background:var(--av-card);border-color:var(--av-rule);color:var(--av-ink)}
.av-tabs button small{font:700 .7rem var(--av-mono);color:var(--av-ink-3);margin-left:6px}
.av-pane{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
.av-pane[hidden]{display:none}
.av-pane .stage{padding:20px;border-right:1px solid var(--av-rule);min-width:0;background:var(--av-paper)}
.av-pane .side{padding:24px;display:grid;align-content:start;gap:12px;min-width:0}
.av-pane .side h3{font-size:1.3rem;font-weight:800;margin:0}
.av-pane .side p{margin:0;color:var(--av-ink-2)}
.av-pane .side .av-btn{justify-self:start}
.av-paper-img{display:block;width:100%;max-width:560px;margin:0 auto;border-radius:10px;border:1px solid var(--av-rule);box-shadow:0 24px 50px -30px var(--av-shade);background:#fff;aspect-ratio:1/1;object-fit:cover;object-position:top;height:auto}
.av-sheet{overflow-x:auto;border:1px solid var(--av-rule);border-radius:10px;background:var(--av-card)}
.av-sheet .t{padding:12px 14px 2px;font-weight:800;font-size:.95rem;color:#2563EB}
.av-sheet .s{padding:0 14px 10px;font-size:.75rem;color:var(--av-ink-3)}
.av-sheet table{border-collapse:collapse;font-size:.8rem;min-width:640px;width:100%;margin:0}
.av-sheet th{background:#2563EB;color:#fff;font-weight:700;font-size:.72rem;padding:8px 10px;text-align:left;white-space:nowrap;border:0}
.av-sheet td{padding:8px 10px;border:0;border-top:1px solid var(--av-rule);white-space:nowrap;color:var(--av-ink)}
.av-sheet tr:nth-child(even) td{background:var(--av-card-2)}
.av-pill{display:inline-block;font-weight:800;font-size:.66rem;letter-spacing:.06em;padding:3px 8px;border-radius:999px}
.av-pill.ok{color:var(--av-green);background:color-mix(in srgb,var(--av-green) 12%,transparent)}
.av-pill.bad{color:#B3261E;background:rgba(179,38,30,.10)}
.av-sheetbar{display:flex;gap:2px;margin-top:12px;overflow-x:auto;scrollbar-width:none}
.av-sheetbar span{flex:0 0 auto;font-size:.72rem;font-weight:600;color:var(--av-ink-3);border:1px solid var(--av-rule);border-top:0;border-radius:0 0 6px 6px;padding:5px 10px;background:var(--av-card)}
.av-sheetbar span.on{color:var(--av-ink);background:var(--av-paper)}
.av-note{font-size:.78rem;color:var(--av-ink-3);margin:10px 2px 0}

/* Catálogo de la portada en cuadrícula modular */
#catalogo .cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
#catalogo .cards > .card{grid-column:span 2}
#catalogo .cards > .card:first-child{grid-column:span 4;grid-row:span 2}
#catalogo .cards > .card:last-child{grid-column:span 6}
#english .cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#english .cards > .card:last-child{grid-column:span 2}
html body .card .amount .n, html body .card .amount, html body .ladder .amt{font-family:var(--av-mono);letter-spacing:-.03em}

@media (max-width:900px){
  .av-hero > .wrap{grid-template-columns:minmax(0,1fr)}
  .av-pane{grid-template-columns:minmax(0,1fr)}
  .av-pane .stage{border-right:0;border-bottom:1px solid var(--av-rule)}
  #catalogo .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  #catalogo .cards > .card, #catalogo .cards > .card:first-child{grid-column:span 1;grid-row:auto}
  #catalogo .cards > .card:first-child, #catalogo .cards > .card:last-child{grid-column:span 2}
}
@media (max-width:600px){
  #catalogo .cards, #english .cards{grid-template-columns:minmax(0,1fr)}
  #catalogo .cards > .card, #catalogo .cards > .card:first-child, #catalogo .cards > .card:last-child, #english .cards > .card:last-child{grid-column:span 1}
  .av-out b{font-size:1.4rem}
  .av-area input[type=number]{width:96px;font-size:1.15rem}
}
@media (prefers-reduced-motion:reduce){
  .av-calc-head .live i, .av-bump{animation:none}
  html body a.cta-button, html body .av-btn{transition:none}
}

/* ---------- Ajustes de la portada sobre el estilo anterior ---------- */
html body .av-hero{background:var(--av-paper);color:var(--av-ink);padding-top:clamp(32px,6vw,80px);padding-bottom:clamp(24px,4vw,48px)}
html body .av-hero > .wrap{max-width:1180px}
html body .av-hero h1{color:var(--av-ink)}
html body .av-hero .badge{background:var(--av-brand-wash);border-color:var(--av-brand-line);color:var(--av-brand)}
html body .av-hero .av-lede b{color:var(--av-ink);font-weight:600}
html body .av-btn-ghost{background:var(--av-card);color:var(--av-ink);border:1px solid var(--av-rule)}
html body .av-btn-brand{background:var(--av-brand);color:var(--av-on-brand)}
html body .av-hero .ladder .wrap{display:flex;flex-wrap:wrap;gap:8px;padding:0}
html body .av-hero .ladder a{display:flex;align-items:baseline;gap:8px;padding:7px 14px;border:1px solid var(--av-rule);border-radius:999px;background:var(--av-card);transition:border-color .2s,transform .15s}
html body .av-hero .ladder a:last-child{border-right:1px solid var(--av-rule)}
html body .av-hero .ladder a:hover{border-color:var(--av-brand-line);background:var(--av-card)}
html body .av-hero .ladder a:active{transform:scale(.97)}
html body .av-hero .ladder .amt{font-size:.95rem;display:inline;font-family:var(--av-mono)}
html body .av-hero .ladder .lbl{display:inline;margin:0;font-size:.84rem;letter-spacing:0;text-transform:none;font-weight:500;color:var(--av-ink-2)}
html body a.brandmark b{font-family:inherit;font-size:1.08rem;letter-spacing:-.015em;text-transform:none}
html body a.brandmark{gap:0}
html body .strip{letter-spacing:.08em}

/* ---------- Calculadora (tools): encabezado claro como el resto del sitio ---------- */
html body .site-header .logo-text{display:inline-block;line-height:24px}
html body .hero:has(.hero-badge){background:var(--av-paper);color:var(--av-ink);border-bottom:1px solid var(--av-rule)}
html body .hero:has(.hero-badge) h1{color:var(--av-ink);font-size:clamp(2rem,5vw,3.2rem)}
html body .hero:has(.hero-badge) p{color:var(--av-ink-2)}
html body .hero:has(.hero-badge) .hero-badge{background:var(--av-brand-wash);border:1px solid var(--av-brand-line);color:var(--av-brand)}
html body > main > p.top{color:var(--av-brand)}
