/* Cambio Físico — estilos */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f1f5f4;
  --text: #0f172a;
  --muted: #5b6474;
  --line: #e3e7ec;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e6f4f2;
  --accent-2: #f59e0b;
  --p: #2563eb;   /* proteína */
  --c: #f59e0b;   /* hidratos */
  --f: #db2777;   /* grasas */
  --ok: #15803d;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --danger: #b91c1c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0b1114; --surface: #121a1e; --surface-2: #172227; --text: #e8eef0; --muted: #9aa8ae; --line: #23323a; --accent: #2bb5a6; --accent-ink: #04201d; --accent-soft: #11302d; --warn-bg: #2a1d0c; --warn: #f5b25a; --ok: #4ade80; --danger: #f87171; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0b1114; --surface: #121a1e; --surface-2: #172227; --text: #e8eef0; --muted: #9aa8ae; --line: #23323a; --accent: #2bb5a6; --accent-ink: #04201d; --accent-soft: #11302d; --warn-bg: #2a1d0c; --warn: #f5b25a; --ok: #4ade80; --danger: #f87171; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 16px; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 1.15rem; }
.brand b { color: var(--accent); font-weight: 800; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .94rem; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--text); padding: 8px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* Hero */
.hero { padding: 36px 0 8px; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); font-weight: 800; max-width: 22ch; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 70ch; }
.steps { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.steps a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); padding: 7px 12px 7px 7px; border-radius: 999px; font-size: .9rem; font-weight: 500; }
.steps a:hover { border-color: var(--accent); }
.steps span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .8rem; font-weight: 700; }

/* Sections */
.section { padding: 48px 0; }
.section-tool { padding-top: 24px; }
.section.alt { background: var(--surface-2); }
.sec-head { max-width: 760px; margin-bottom: 20px; }
.sec-head h2 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 800; }
.sec-head p { color: var(--muted); }
.kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }

/* Card + forms */
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
@media (max-width: 560px) { .tool-card { padding: 16px; border-radius: 14px; } }
.grid-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.grid-form.inner { margin-top: 12px; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: 1 / -1; }
@media (max-width: 760px) { .grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-3, .span-4 { grid-column: 1 / -1; } .span-2 { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span, .field legend { font-size: .86rem; font-weight: 600; color: var(--text); padding: 0; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
input[type=number], input[type=text], input[type=search], input[type=date], input[type=time], select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.unit { position: relative; }
.unit input { padding-right: 52px; }
.unit i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: .88rem; pointer-events: none; }
.field.check { flex-direction: row; align-items: center; gap: 10px; font-size: .95rem; }
.field.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; font-weight: 400; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg label, .chips label { position: relative; cursor: pointer; }
.seg input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; padding: 6px 8px; text-align: center; font-size: .95rem; }
.seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.seg input:focus-visible + span, .chips input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .92rem; font-weight: 500; }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips.days span { min-width: 44px; justify-content: center; font-weight: 700; }
.times { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.times label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 500; color: var(--muted); }
.times .mm span { display: flex; align-items: center; gap: 6px; }
.times .mm input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
@media (max-width: 760px) { .times { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
details.more { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: .98rem; border-radius: 10px; padding: 10px 18px; min-height: 44px; cursor: pointer; border: 1.5px solid transparent; text-decoration: none; transition: transform .08s, background .15s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn-ghost { background: transparent; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-lg { padding: 13px 24px; font-size: 1.05rem; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: .86rem; }
.btn-link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 6px; font-size: .88rem; }
.btn-link:hover { background: var(--accent-soft); }
.privacy { font-size: .88rem; color: var(--muted); margin: 12px 4px 0; }

/* Results */
.result { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 22px; }
.scen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 680px) { .scen { grid-template-columns: 1fr; } }
.scen article { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); }
.scen article.on { border-color: var(--accent); background: var(--accent-soft); }
.scen h3 { font-size: .9rem; color: var(--muted); font-weight: 600; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .04em; }
.scen .big { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.scen .big small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.scen p { margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); vertical-align: middle; margin-left: 6px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.kpi b { display: block; font-size: 1.25rem; }
.kpi span { font-size: .8rem; color: var(--muted); }
.macros { margin: 18px 0 8px; }
.macros h3 { font-size: 1.05rem; }
.mbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 8px 0 12px; }
.mbar i { display: block; height: 100%; }
.mbar .p { background: var(--p); } .mbar .c { background: var(--c); } .mbar .f { background: var(--f); }
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mgrid div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.mgrid b { font-size: 1.3rem; display: block; }
.mgrid span { font-size: .82rem; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dot.p { background: var(--p); } .dot.c { background: var(--c); } .dot.f { background: var(--f); }
.note { border-radius: 12px; padding: 12px 14px; font-size: .92rem; margin: 12px 0; background: var(--accent-soft); }
.note.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.note.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.note p:last-child { margin: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Food calc */
.food-form { display: grid; grid-template-columns: 2.4fr 1fr 1.2fr 1.3fr auto; gap: 12px; align-items: end; }
@media (max-width: 860px) { .food-form { grid-template-columns: 1fr 1fr; } .food-search { grid-column: 1 / -1; } .food-form .btn { grid-column: 1 / -1; } }
.food-search { position: relative; }
.suggest { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 300px; overflow: auto; }
.suggest li { padding: 9px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: .94rem; }
.suggest li small { color: var(--muted); white-space: nowrap; }
.suggest li[aria-selected=true], .suggest li:hover { background: var(--accent-soft); }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr.meal-row td { background: var(--surface-2); font-weight: 700; }
tr.total td { font-weight: 800; border-bottom: 0; font-size: 1rem; }
.rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.rm:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 6px 0 4px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.empty { text-align: center; color: var(--muted); padding: 22px 8px 6px; font-size: .95rem; }

/* Diet */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .sum { margin-right: auto; font-size: .92rem; color: var(--muted); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.tabs button { flex: none; font: inherit; font-weight: 600; font-size: .92rem; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 8px 14px; cursor: pointer; text-align: center; line-height: 1.25; }
.tabs button small { display: block; font-weight: 500; font-size: .74rem; color: var(--muted); }
.tabs button[aria-selected=true] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.tabs button[aria-selected=true] small { color: inherit; opacity: .85; }
.day-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; }
.day-head h3 { margin: 0; font-size: 1.25rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill.train { background: color-mix(in srgb, var(--accent-2) 18%, var(--surface)); color: color-mix(in srgb, var(--accent-2) 70%, var(--text)); }
.meals { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
@media (max-width: 400px) { .meals { grid-template-columns: 1fr; } }
.meal { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; }
.meal.train-ev { background: color-mix(in srgb, var(--accent-2) 10%, var(--surface)); border-style: dashed; justify-content: center; }
.meal-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 4px; }
.meal-top .when { font-size: .78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.meal h4 { font-size: 1rem; margin: 2px 0 8px; }
.meal ul { list-style: none; padding: 0; margin: 0 0 10px; font-size: .9rem; }
.meal li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.meal li span:last-child { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.meal .mm { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--muted); }
.meal .mm b { color: var(--text); }
.meal .badge { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent-2) 20%, var(--surface)); color: color-mix(in srgb, var(--accent-2) 70%, var(--text)); }
.day-total { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .92rem; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.shop { margin-top: 18px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.shop-grid h4 { font-size: .9rem; margin: 0 0 6px; color: var(--accent); }
.shop-grid ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.shop-grid li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dotted var(--line); }

/* Training */
.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.wk div { text-align: center; border-radius: 10px; padding: 8px 4px; background: var(--surface-2); font-size: .78rem; color: var(--muted); }
.wk div b { display: block; font-size: .95rem; color: var(--text); }
.wk div.on { background: var(--accent); color: var(--accent-ink); }
.wk div.on b { color: var(--accent-ink); }
.wk div.cardio { background: color-mix(in srgb, var(--accent-2) 22%, var(--surface)); }
@media (max-width: 480px) { .wk div { font-size: .66rem; padding: 6px 2px; } }
.session { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.session h4 { font-size: 1.05rem; margin: 0 0 4px; }
.session .sub { font-size: .86rem; color: var(--muted); margin-bottom: 10px; }
.ex-name { font-weight: 600; }
.ex-note { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .cols2 { grid-template-columns: 1fr; } }
.box { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.box h4 { margin: 0 0 8px; font-size: 1rem; }
.box ul, .box ol { margin: 0; padding-left: 20px; font-size: .92rem; }
.box li { margin-bottom: 4px; }

/* Progress */
.prog-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 760px) { .prog-form { grid-template-columns: 1fr 1fr; } .prog-form .btn { grid-column: 1 / -1; } }
.chart { width: 100%; height: auto; margin-top: 18px; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }

/* Guide */
.how { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 28px; }
@media (max-width: 960px) { .how { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } }
.how article { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.how .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 8px; }
.how h3 { font-size: 1rem; margin-bottom: 4px; }
.how p { font-size: .9rem; color: var(--muted); margin: 0; }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.prose h3 { font-size: 1.12rem; margin-top: 1.2em; }
.prose h3:first-child { margin-top: 0; }
.prose p { color: color-mix(in srgb, var(--text) 85%, var(--muted)); font-size: .97rem; }
.sources { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.sources h3 { font-size: 1.05rem; }
.sources ul { padding-left: 18px; margin: 0; font-size: .86rem; color: var(--muted); }
.sources li { margin-bottom: 8px; }
.tips { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.tips ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.tips li { break-inside: avoid; margin-bottom: 10px; font-size: .95rem; }
@media (max-width: 760px) { .tips ol { columns: 1; } }
.help { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .help { grid-template-columns: 1fr; } }
.help > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.help .warn-box { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.help .warn-box strong { color: var(--warn); }
.help p { margin: 6px 0 0; font-size: .93rem; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 0 16px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 24px 14px 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 11px; font-size: 1.3rem; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); padding-bottom: 6px; }

/* Ads (placeholders) */
.ad-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px dashed color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 12px; background: repeating-linear-gradient(45deg, transparent, transparent 10px, color-mix(in srgb, var(--muted) 6%, transparent) 10px, color-mix(in srgb, var(--muted) 6%, transparent) 20px); color: var(--muted); text-align: center; }
.ad-slot span { font-weight: 800; letter-spacing: .2em; font-size: .95rem; }
.ad-slot small { font-size: .74rem; }
.ad-leaderboard { min-height: 100px; margin: 22px auto 0; max-width: 970px; }
.ad-incontent { min-height: 250px; margin: 8px auto 40px; max-width: 760px; }
.ad-pop { border: 0; border-radius: 18px; padding: 22px; width: min(360px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center; }
.ad-pop::backdrop { background: rgba(10, 15, 20, .55); }
.ad-pop .pop-ok { font-weight: 700; margin: 0 0 12px; }
.ad-pop-slot { min-height: 250px; margin-bottom: 14px; }
.pop-x, .toast-x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.pop-x:hover, .toast-x:hover { background: var(--line); }
.ad-toast { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: min(320px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; animation: toastIn .35s ease-out; }
.ad-toast-slot { min-height: 100px; margin-right: 30px; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ad-toast { animation: none; } }

.snack { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(100px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: .92rem; z-index: 60; transition: transform .25s; pointer-events: none; max-width: calc(100vw - 32px); }
.snack.show { transform: translateX(-50%) translateY(0); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 32px 0 20px; margin-top: 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer-inner p { color: var(--muted); font-size: .9rem; max-width: 46ch; margin: 8px 0 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: flex-start; }
.footer-inner nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.footer-inner nav a:hover { color: var(--accent); }
.copy { font-size: .82rem; color: var(--muted); margin-top: 20px; }

/* Legal pages */
.legal { padding: 40px 0 60px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }
.legal .todo { background: var(--warn-bg); color: var(--warn); padding: 2px 6px; border-radius: 6px; }

/* Print: only the result being printed */
@media print {
  body.printing > *:not(main), body.printing main > *:not(.print-target), body.printing .print-target .sec-head p, body.printing .print-target form, body.printing .print-target .privacy, body.printing .no-print, body.printing .ad-slot { display: none !important; }
  body.printing .print-target .result { display: block !important; border: 0; margin: 0; padding: 0; }
  body.printing .tool-card { box-shadow: none; border: 0; padding: 0; }
  body.printing .tab-panel { display: block !important; break-inside: avoid-page; margin-bottom: 18px; }
  body.printing .tabs { display: none; }
  body { background: #fff; color: #000; }
}

/* Vista previa embebida: sin impresión */
.embed [data-act=print] { display: none; }

.legal-data { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.legal-data th { width: 30%; background: var(--surface-2); text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); }
