/* Calculadoras para insertar en otras webs (/widget/…). Independiente de site.css: siempre en claro (la web que
   la inserta puede ser clara aunque el sistema esté en oscuro), compacta y sin nada que dependa de la página que la acoge. */
@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --surface: #fffdf8; --ink: #14211d; --muted: #56635e; --line: #e1dbcc;
  --brand: #0d6b57; --strong: #0b4a3d; --on-strong: #ffffff; --on-strong-muted: #b9d6cc;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: transparent; height: 100%; }
body { font: 15px/1.45 "Bricolage", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); }
.w { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; overflow: hidden; min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.w > * { margin-top: 0 !important; }
.w h1 { margin: 0; font-size: 1.05rem; font-weight: 750; letter-spacing: -0.015em; line-height: 1.25; }
.campos { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.campos.dos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
label, .label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input[type="number"] { width: 100%; font: inherit; font-size: 1.05rem; font-weight: 600; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); min-height: 42px; }
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg label { margin: 0; padding: 9px 14px; font-size: 0.95rem; color: var(--ink); cursor: pointer; min-height: 42px; display: flex; align-items: center; }
.seg label + label { border-left: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--brand); color: #fff; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: -2px; }
.res { margin-top: 12px; background: var(--strong); color: var(--on-strong); border-radius: 12px; padding: 12px 14px; }
.res .et { font-size: 0.8rem; color: var(--on-strong-muted); }
.res .big { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.res .big .cts { font-size: 0.55em; }
.res .sub { font-size: 0.82rem; color: var(--on-strong-muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.pie { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 0.8rem; }
.pie a { color: var(--brand); font-weight: 600; text-underline-offset: 0.18em; }
.pie .marca { color: var(--muted); font-weight: 500; text-decoration: none; }
.pie .marca b { color: var(--ink); }
