/* =============================================================
   1. Tokens
   Psicología del color: verde profundo (salud, calma, crecimiento) + terracota cálida (apetito, cercanía)
   sobre crema (limpieza sin frialdad clínica). Todos los pares texto/fondo cumplen contraste AA (≥ 4,5:1).
   ============================================================= */
:root {
  --bg: #FBF8F3;
  --surface: #FFFFFF;
  --surface-2: #F4F1EA;
  --ink: #1F2A24;
  --muted: #4F5D55;
  --line: #E3DED3;
  --primary: #1B6B57;
  --primary-dark: #14503F;
  --primary-ink: #FFFFFF;
  --primary-soft: #E3F1EA;
  --accent: #B5472F;
  --accent-soft: #FBE9E3;
  --sun: #E9A23B;
  --ok-bg: #E6F4EA; --ok-fg: #1E6B3A;
  --note-bg: #E7F0FB; --note-fg: #1F4F8F;
  --watch-bg: #FFF1DB; --watch-fg: #8A4B00;
  --alert-bg: #FCE8E4; --alert-fg: #9B2C22;
  --info-bg: #EEEBE4; --info-fg: #4F5D55;
  --shadow: 0 1px 2px rgba(31, 42, 36, .06), 0 8px 24px rgba(31, 42, 36, .07);
  --radius: 18px;
  --radius-sm: 12px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #121A16; --surface: #1B2620; --surface-2: #22302A; --ink: #E8F0EA; --muted: #A9B8AE; --line: #2C3A32;
    --primary: #5CC2A0; --primary-dark: #7AD3B5; --primary-ink: #0B1712; --primary-soft: #1D3329;
    --accent: #F0907A; --accent-soft: #3A211B;
    --ok-bg: #1B2B22; --ok-fg: #8FDDA8; --note-bg: #1A2636; --note-fg: #9CC4F5;
    --watch-bg: #33261A; --watch-fg: #F5C77E; --alert-bg: #341C19; --alert-fg: #F5A79D;
    --info-bg: #26302B; --info-fg: #A9B8AE;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
}

/* =============================================================
   2. Reset y base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--primary-dark); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; font-weight: 600; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 999; background: var(--primary); color: var(--primary-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.wrap { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: 16px; }
[hidden] { display: none !important; }

/* =============================================================
   3. Avisos y cabecera
   ============================================================= */
.sticky-top { position: sticky; top: 0; z-index: 50; }
.notice-bar { background: #FCEBC2; color: #5C3B00; border-bottom: 2px solid var(--sun); font-size: 13px; line-height: 1.35; }
:root[data-theme="dark"] .notice-bar { background: #3A2A0D; color: #F5C77E; }
.notice-bar .wrap { display: flex; gap: 10px; align-items: center; padding-block: 8px; }
.notice-bar svg { flex: none; width: 18px; height: 18px; }
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 22px; }
.brand svg { width: 34px; height: 34px; color: var(--primary); }
.nav { display: none; gap: 20px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--primary-dark); }
@media (min-width: 720px) { .nav { display: flex; } }

/* =============================================================
   4. Hero
   ============================================================= */
.hero { padding-block: 34px 8px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin-top: 10px; font-size: clamp(32px, 6.4vw, 54px); line-height: 1.08; max-width: 18ch; }
.hero h1 .hl { color: var(--primary); background: linear-gradient(transparent 68%, color-mix(in srgb, var(--sun) 55%, transparent) 68%); }
.hero p.lead { margin-top: 16px; font-size: clamp(17px, 2.4vw, 21px); color: var(--muted); max-width: 60ch; }
.hero p.lead strong { color: var(--ink); }
.hero-points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; max-width: 60ch; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.hero-points svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--primary); }
.hero-cta { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hero-cta .btn { min-height: 58px; padding-inline: 30px; font-size: 18px; background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.hero-cta .btn:hover { background: #973A25; }
.hero-cta small { color: var(--muted); font-size: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--primary-soft); color: var(--primary-dark); padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.badge svg { width: 16px; height: 16px; }
.bridge { border: 2px solid var(--primary); background: var(--primary-soft); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.bridge h3 { font-size: 22px; }
.bridge p { margin-top: 8px; }

.hero h1 { max-width: 26ch; font-size: clamp(32px, 6.4vw, 54px); line-height: 1.08; }
.benefits { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 8px; max-width: 60ch; }
.benefits li { position: relative; padding-left: 30px; font-weight: 600; }
.benefits li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 22px; }
.btn-lg { min-height: 60px; padding: 14px 28px; font-size: 19px; }
.cta-row .btn-primary, .final-cta .btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.cta-row .btn-primary:hover, .final-cta .btn-primary:hover { background: #973A25; color: #fff; }
.cta-note { font-size: 14.5px; color: var(--muted); font-weight: 600; }
.pains { padding-left: 22px; margin: 10px 0 14px; }
.pains li + li { margin-top: 6px; }
.promise ul { list-style: none; padding: 0; }
.promise li + li { margin-top: 8px; }
.final-cta { text-align: center; padding-block: 34px; margin-top: 10px; background: var(--primary-soft); border-radius: 24px; max-width: 1008px; }
.final-cta h2 { font-size: clamp(26px, 4vw, 34px); }
.final-cta p { margin-top: 10px; }
.final-cta .hint { font-weight: 500; }

/* =============================================================
   5. Tarjeta de la herramienta
   ============================================================= */
.tool-card { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 18px 16px 22px; }
@media (min-width: 720px) { .tool-card { padding: 28px 32px 32px; } }
.stepper { display: flex; gap: 8px; margin-bottom: 18px; list-style: none; padding: 0; counter-reset: st; }
.stepper li { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.stepper li::before { content: ""; height: 6px; border-radius: 999px; background: var(--line); }
.stepper li[aria-current="step"] { color: var(--primary-dark); }
.stepper li[aria-current="step"]::before, .stepper li.done::before { background: var(--primary); }
.stepper li.done { color: var(--primary-dark); }
.panel h2 { font-size: clamp(24px, 4vw, 30px); }
.panel .sub { color: var(--muted); margin-top: 6px; }
.stack > * + * { margin-top: 16px; }

.dropzone { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 16px; border: 2px dashed var(--primary); border-radius: var(--radius); background: var(--primary-soft); cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease); }
.dropzone:hover, .dropzone.drag { background: color-mix(in srgb, var(--primary-soft) 70%, var(--primary) 12%); }
.dropzone svg { width: 46px; height: 46px; color: var(--primary); }
.dropzone strong { font-size: 19px; }
.dropzone small { color: var(--muted); font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border-radius: 14px; font-weight: 700; font-size: 17px; text-decoration: none; transition: transform .15s var(--ease), background .2s; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-dark); }
:root[data-theme="dark"] .btn-primary:hover { background: var(--primary-dark); color: var(--primary-ink); }
.btn-ghost { background: transparent; color: var(--primary-dark); border: 2px solid var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-text { min-height: 44px; padding: 8px 10px; color: var(--primary-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; align-items: center; }
.actions .grow { flex: 1 1 auto; }

.progress { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); }
.progress p { font-weight: 600; }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s var(--ease); }
.file-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 15px; }
.file-list button { color: var(--accent); font-weight: 700; min-height: 40px; padding: 0 8px; }

.msg { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15.5px; display: flex; gap: 10px; align-items: flex-start; }
.msg svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.msg.info { background: var(--note-bg); color: var(--note-fg); }
.msg.warn { background: var(--watch-bg); color: var(--watch-fg); }
.msg.err { background: var(--alert-bg); color: var(--alert-fg); }
.msg.good { background: var(--ok-bg); color: var(--ok-fg); }

/* Formularios */
.field { display: grid; gap: 6px; }
label, .label { font-weight: 700; font-size: 15px; }
.hint { font-size: 14px; color: var(--muted); font-weight: 500; }
input[type="number"], input[type="text"], select, textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.grid3 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 46px; padding: 8px 16px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 15.5px; background: var(--surface); }
.pill input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.pill input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.pill input:checked + span::before { content: "✓"; margin-right: 6px; font-weight: 800; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--primary); }
.check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.goal-grid { display: grid; gap: 10px; }
@media (min-width: 720px) { .goal-grid { grid-template-columns: 1fr 1fr; } }
.goal { display: flex; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.goal:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.goal input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--primary); }
.goal b { display: block; font-size: 16px; line-height: 1.3; }
.goal small { display: block; color: var(--muted); font-size: 14px; }
.goal .tag { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 800; color: var(--accent); }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { font-weight: 800; font-size: 17px; margin-bottom: 8px; padding: 0; }

.choice-title { font-size: 22px; margin: 6px 0 12px; }
.choices { display: grid; gap: 12px; }
@media (min-width: 720px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { display: flex; align-items: center; gap: 16px; text-align: left; padding: 20px 18px; min-height: 96px; border-radius: var(--radius); background: var(--primary); color: var(--primary-ink); transition: transform .15s var(--ease), background .2s; }
.choice:hover:not([disabled]) { background: var(--primary-dark); transform: translateY(-2px); }
.choice svg { width: 40px; height: 40px; flex: none; }
.choice b { display: block; font-size: 19px; line-height: 1.25; }
.choice small { display: block; font-size: 14.5px; opacity: .92; margin-top: 2px; }
.choice[disabled] { background: var(--surface-2); color: var(--muted); border: 2px dashed var(--line); cursor: not-allowed; }
.choice + .choice:not([disabled]) { background: var(--accent); color: #fff; }
.choice + .choice:not([disabled]):hover { background: #973A25; }

/* Tabla de confirmación / entrada manual */
.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.row .name { font-weight: 700; }
.row .src { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.row .inputs { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.row .inputs.noconv { grid-template-columns: 1fr auto; }
.row .unit-static { font-weight: 700; color: var(--muted); padding: 0 6px; }
.row button.del { color: var(--accent); font-weight: 800; min-height: 44px; padding: 0 10px; }
@media (min-width: 720px) {
  .row { grid-template-columns: minmax(180px, 1.1fr) 2fr; align-items: center; }
}
details.more { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 14px; background: var(--surface-2); }
details.more > summary { cursor: pointer; font-weight: 700; padding: 12px 0; min-height: 48px; }
details.more[open] > summary { margin-bottom: 8px; }
.group-title { font-family: var(--serif); font-size: 19px; margin: 18px 0 8px; color: var(--primary-dark); }

/* =============================================================
   6. Resultados
   ============================================================= */
.disclaimer { border: 2px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; }
.disclaimer strong { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 14.5px; }
.disclaimer svg { width: 20px; height: 20px; flex: none; }
.disclaimer p { margin-top: 4px; font-size: 14px; line-height: 1.5; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 6px; margin: 18px 0 0; }
.tab { flex: 1 1 auto; text-align: center; padding: 10px 14px; min-height: 48px; border-radius: 999px; font-weight: 700; font-size: 15.5px; border: 2px solid transparent; color: var(--muted); background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--primary); color: var(--primary-ink); }
.tabpanel { margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 14px; border-radius: var(--radius-sm); background: var(--primary-soft); }
.stat b { display: block; font-family: var(--serif); font-size: 28px; line-height: 1.1; color: var(--primary-dark); }
.stat span { font-size: 14px; color: var(--muted); font-weight: 600; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px; }
.card + .card { margin-top: 12px; }
.card h3 { font-size: 20px; }
.card h4 { font-size: 17px; }
.card ul { padding-left: 20px; margin-top: 6px; }
.card li + li { margin-top: 4px; }
.pattern { border-left: 6px solid var(--note-fg); }
.pattern.watch { border-left-color: var(--watch-fg); }
.pattern.alert { border-left-color: var(--alert-fg); }
.section-title { font-size: 24px; margin: 26px 0 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.status svg { width: 18px; height: 18px; flex: none; }
.status.ok { background: var(--ok-bg); color: var(--ok-fg); }
.status.note { background: var(--note-bg); color: var(--note-fg); }
.status.watch { background: var(--watch-bg); color: var(--watch-fg); }
.status.alert { background: var(--alert-bg); color: var(--alert-fg); }
.status.info { background: var(--info-bg); color: var(--info-fg); }

.marker { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px; }
.marker + .marker { margin-top: 12px; }
.marker.ok { border-left: 6px solid var(--ok-fg); }
.marker.note { border-left: 6px solid var(--note-fg); }
.marker.watch { border-left: 6px solid var(--watch-fg); }
.marker.alert { border-left: 6px solid var(--alert-fg); }
.marker.info { border-left: 6px solid var(--info-fg); }
.marker-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; align-items: baseline; }
.marker-head h4 { font-size: 19px; }
.value { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1; }
.value small { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--muted); }
.rangebar { position: relative; display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin: 14px 0 8px; }
.rangebar i { display: block; height: 100%; }
.rangebar i.ok { background: #6FBF8B; } .rangebar i.note { background: #7FAEE6; } .rangebar i.watch { background: #E9B25F; } .rangebar i.alert { background: #DB7B6D; } .rangebar i.info { background: #BDB8AC; }
.pointer { position: relative; height: 10px; }
.pointer::after { content: ""; position: absolute; left: var(--pos, 50%); top: 0; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 10px solid var(--ink); transform: translateX(-50%); }
.marker .line { font-size: 15.5px; margin-top: 4px; }
.marker .line b { font-weight: 800; }
.marker details { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 4px; }
/* El expansor de cada valor se ve y se comporta como un botón, para que se note que se puede pulsar. */
.marker summary {
  cursor: pointer; font-weight: 700; font-size: 15.5px; min-height: 44px;
  display: inline-flex; align-items: center; gap: 8px; width: auto;
  color: var(--primary-dark); background: var(--primary-soft);
  border: 1.5px solid var(--primary); border-radius: 999px;
  padding: 10px 16px; margin: 8px 0 2px; list-style: none;
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.marker summary::-webkit-details-marker { display: none; }
.marker summary::marker { content: ""; }
.marker summary::after { content: "▾"; font-size: 13px; line-height: 1; transition: transform .15s var(--ease); }
.marker details[open] > summary::after { transform: rotate(180deg); }
.marker summary:hover { background: var(--primary); color: var(--primary-ink); }
.marker summary:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.marker .body > * + * { margin-top: 10px; }
.book-note { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.book-note cite { display: block; font-style: normal; font-size: 13.5px; font-weight: 800; color: var(--muted); margin-bottom: 2px; }
.src-list { font-size: 14px; color: var(--muted); }
.src-list a { overflow-wrap: anywhere; }

/* Plan */
.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.day-tab { flex: none; min-height: 46px; padding: 8px 16px; border-radius: 12px; font-weight: 700; background: var(--surface-2); border: 2px solid transparent; }
.day-tab[aria-selected="true"], .day-tab[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.meal { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px; }
.meal + .meal { margin-top: 12px; }
.meal .slot { font-size: 13.5px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.meal h4 { font-size: 20px; margin-top: 2px; }
.meal ul { list-style: none; padding: 0; margin-top: 10px; display: grid; gap: 4px; }
.meal li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--line); padding-bottom: 4px; font-size: 15.5px; }
.meal li span:last-child { font-weight: 700; white-space: nowrap; }
.macros { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.tipline { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.two-col { display: grid; gap: 12px; }
@media (min-width: 720px) { .two-col { grid-template-columns: 1fr 1fr; } }
.shop-cat h4 { margin-top: 12px; }
.shop-cat ul { list-style: none; padding: 0; margin-top: 6px; }
.shop-cat li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); padding: 3px 0; }
.day-total { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--primary-soft); font-weight: 700; color: var(--primary-dark); }

/* =============================================================
   7. Secciones de contenido, anuncios, footer
   ============================================================= */
.ad-slot { min-height: 100px; margin-block: 28px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--muted); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
/* Bandas de fondo alternadas: cada bloque de la página se distingue del anterior al desplazarse. */
.band { background: var(--bg); }
.band-alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.band > .content { padding-block: 30px 38px; }
.band > .final-cta { padding-block: 10px; }

.content { padding-block: 12px 24px; }
.content h2 { font-size: clamp(26px, 4vw, 34px); margin: 34px 0 12px; }
.content p + p { margin-top: 12px; }
.steps3 { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 720px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.step3 { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step3 .n { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-family: var(--serif); font-weight: 700; font-size: 20px; margin-bottom: 10px; }
.step3 h3 { font-size: 20px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 2px 16px; }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 52px; }
.faq details p { padding-bottom: 14px; color: var(--muted); }
.site-footer { margin-top: 30px; border-top: 1px solid var(--line); background: var(--surface-2); padding-block: 26px 40px; font-size: 15px; color: var(--muted); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.site-footer p + p { margin-top: 8px; }
.legal main { padding-block: 24px 40px; }
.legal h1 { font-size: clamp(30px, 5vw, 40px); }
.legal h2 { font-size: 24px; margin: 28px 0 8px; }
.legal p, .legal ul { margin-top: 10px; }
.legal ul { padding-left: 22px; }
.legal table { border-collapse: collapse; width: 100%; margin-top: 12px; font-size: 15px; }
.legal th, .legal td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }

/* =============================================================
   8. Movimiento reducido y sin JS
   ============================================================= */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .bar > i { transition: none; } }
.js-only { display: none; }
.js .js-only { display: block; }
.js .no-js-only { display: none; }

/* =============================================================
   9. Impresión (guardar como PDF)
   ============================================================= */
@media print {
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F4F1EA; --ink: #1F2A24; --muted: #4F5D55; --line: #E3DED3;
    --primary: #1B6B57; --primary-dark: #14503F; --primary-ink: #FFFFFF; --primary-soft: #E3F1EA;
    --accent: #B5472F; --accent-soft: #FBE9E3;
    --ok-bg: #E6F4EA; --ok-fg: #1E6B3A; --note-bg: #E7F0FB; --note-fg: #1F4F8F;
    --watch-bg: #FFF1DB; --watch-fg: #8A4B00; --alert-bg: #FCE8E4; --alert-fg: #9B2C22;
    --info-bg: #EEEBE4; --info-fg: #4F5D55; --shadow: none;
  }
  html, body { background: #fff !important; color: #000; }
  body { font-size: 12pt; }
  .sticky-top, .notice-bar, .site-header, .hero, .stepper, .tabs, .day-tabs, .actions, .ad-slot, .content, .band, .site-footer .links, .no-print, .btn { display: none !important; }
  .tool-card { border: 0; box-shadow: none; padding: 0; }
  .tabpanel[hidden], .day-panel[hidden] { display: block !important; }
  /* Cada pestaña empieza en una hoja nueva y lleva su propio título, para que no se mezclen. */
  .tabpanel { break-before: page; page-break-before: always; }
  #tp-resumen { break-before: auto; page-break-before: auto; }
  .tabpanel[data-print-title]::before {
    content: attr(data-print-title);
    display: block; font-family: var(--serif); font-size: 19pt; font-weight: 700;
    margin: 0 0 14px; padding-bottom: 6px; border-bottom: 2px solid #000;
  }
  .tabpanel > *:first-child, .tabpanel .section-title:first-child { margin-top: 0; }
  .marker details:not([open]) > .body { display: block; }
  .marker, .meal, .card { break-inside: avoid; }
  .print-head { display: block !important; }
  a { color: #000; }
}
.print-head { display: none; margin-bottom: 12px; }

/* Botones de acento en modo oscuro: texto oscuro sobre salmón para mantener contraste AA */
:root[data-theme="dark"] .hero-cta .btn, :root[data-theme="dark"] .choice + .choice:not([disabled]) { color: #2A0F08; }
:root[data-theme="dark"] .hero-cta .btn:hover, :root[data-theme="dark"] .choice + .choice:not([disabled]):hover { background: #F5A895; color: #2A0F08; }

/* Inicio / empezar de nuevo y selector de tema */
.nav { display: flex; gap: 6px 20px; align-items: center; }
.nav .nav-opt { display: none; }
@media (min-width: 720px) { .nav .nav-opt { display: inline; } }
.nav a.nav-home { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-dark); font-weight: 800; padding: 8px 12px; border-radius: 999px; background: var(--primary-soft); }
.nav a.nav-home:hover { background: var(--primary); color: var(--primary-ink); }
.nav a.nav-home svg { width: 16px; height: 16px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.theme-toggle:hover { background: var(--primary-soft); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.site-header .right { display: flex; align-items: center; gap: 12px; }
html { scroll-padding-top: 130px; }
#herramienta { scroll-margin-top: 120px; }
.brand { white-space: nowrap; }
.nav a.nav-home { white-space: nowrap; }
@media (max-width: 480px) {
  .site-header .wrap { gap: 6px; }
  .site-header .right { gap: 6px; }
  .brand { font-size: 19px; gap: 6px; }
  .brand svg { width: 26px; height: 26px; }
  .nav a.nav-home { font-size: 13px; padding: 7px 10px; }
  .notice-bar { font-size: 12px; }
}

/* Plan de 7 días: 14 y 30 visibles pero desactivados */
.pill.pill-off { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.pill.pill-off input { cursor: not-allowed; }
.pill.pill-off span { opacity: .55; border-style: dashed; }
/* Botón pendiente de habilitar: se ve apagado y lleva la etiqueta "Próximamente" al lado. */
.soon-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn[disabled] { opacity: .55; cursor: not-allowed; border-style: dashed; }
.btn[disabled]:hover { background: var(--surface); color: var(--ink); }

.soon { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }

/* Anuncios: bloques en el flujo (nunca superpuestos ni fijos), con etiqueta y altura reservada */
.ad-slot { display: none; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-style: solid; margin: 44px auto; padding: 8px 8px 12px; min-height: 130px; max-width: 760px; }
.ad-slot::before { content: "Publicidad"; display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad-slot--rect { min-height: 290px; max-width: 360px; }

/* Continuar plan guardado */
.resume { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-top: 16px; padding: 16px 18px; border: 2px solid var(--primary); border-radius: var(--radius); background: var(--primary-soft); }
.resume strong { display: block; color: var(--primary-dark); }
.resume span { display: block; font-size: 15px; color: var(--muted); }
.resume-actions { display: flex; gap: 8px; align-items: center; }

/* Mi semana */
.hoy-head h3 { font-size: clamp(22px, 3.4vw, 28px); }
.hoy-head p { color: var(--muted); margin-top: 2px; }
.prog { margin-top: 14px; height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s var(--ease); }
.prog-label { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; color: var(--muted); margin-top: 6px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.cal-day { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 76px; padding: 8px 2px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; }
.cal-day small { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.cal-day b { font-size: 20px; line-height: 1.1; }
.cal-day i { font-style: normal; font-size: 12px; color: var(--muted); }
.cal-day.today { border-color: var(--accent); }
.cal-day.done { background: var(--ok-bg); }
.cal-day.done i { color: var(--ok-fg); }
.cal-day[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); }
.cal-day.done[aria-pressed="true"] { background: var(--ok-bg); border-color: var(--primary); }
.badge-today { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; vertical-align: middle; }
:root[data-theme="dark"] .badge-today { color: #2A0F08; }
.mealrow { margin-top: 12px; }
.done-check { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; margin-bottom: 8px; border-radius: 12px; background: var(--surface-2); font-weight: 700; cursor: pointer; }
.done-check input { width: 24px; height: 24px; accent-color: var(--primary); flex: none; }
.done-check.on { background: var(--ok-bg); color: var(--ok-fg); }
.savebox { margin-top: 16px; }
.savebox p + p { margin-top: 8px; }
.habit-today { margin-top: 16px; }

body.ads-on .ad-slot { display: block; }
.ad-slot[hidden] { display: none !important; }

/* Aviso de cookies: compacto, no bloquea la página, dos botones del mismo tamaño */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70; max-width: 760px; margin-inline: auto; padding: 16px 18px; background: var(--surface); color: var(--ink); border: 2px solid var(--primary); border-radius: var(--radius); box-shadow: var(--shadow); }
.consent h2 { font-size: 17px; margin-bottom: 4px; }
.consent p { font-size: 13.5px; line-height: 1.45; }
.consent .btn { font-size: 15px; min-height: 44px; padding-block: 8px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.consent-actions .btn { flex: 1 1 200px; justify-content: center; }
@media print { .consent { display: none !important; } }

/* Guías */
.legal .crumbs { font-size: 14px; color: var(--muted, inherit); margin: 0 0 6px; }
.legal .lead { font-size: 19px; line-height: 1.55; }
.legal h3 { font-size: 18px; margin: 16px 0 4px; }
.legal .note-blue { background: var(--note-bg); color: var(--note-fg); padding: 12px 14px; border-radius: 12px; }
.legal .cta-box { margin: 32px 0 8px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; }
.legal .cta-box .btn { margin-top: 8px; }
.legal .pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.legal .disc { margin-top: 24px; font-size: 15px; }
