/* ===================================================================
   NutriAnalítica — estilos
   1. Tokens · 2. Base · 3. Cabecera · 4. Hero · 5. Herramienta
   6. Resultados · 7. Contenido · 8. Pie · 9. Legal · 10. Impresión
   =================================================================== */

/* Fuentes alojadas en la propia web (sin Google Fonts: ningún dato del visitante sale a terceros). Licencia SIL OFL 1.1 */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("assets/fonts/bricolage-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("assets/fonts/bricolage-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #f6f5ef;
  --surface: #ffffff;
  --surface-2: #f1f2ec;
  --surface-3: #e9ebe3;
  --ink: #0c1f1a;
  --muted: #5d6c65;
  --faint: #8b9891;
  --line: #e4e6de;
  --line-2: #d6dad0;
  --accent: #0e7c66;
  --accent-2: #0a5c4c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f3ec;
  --lime: #c8f169;
  --good: #15935a;
  --good-soft: #e5f6ec;
  --bad: #e0453f;
  --bad-soft: #fdeceb;
  --mid: #c98a04;
  --mid-soft: #fdf4dc;
  --sev-0: #22a565; --sev-1: #9cc31f; --sev-2: #e6a300; --sev-3: #f2711c; --sev-4: #e0453f;
  --sev-1-soft: #f1f8dc; --sev-1-ink: #5f7d06; --sev-3-soft: #fdeee2;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --sh-1: 0 1px 2px rgba(12, 31, 26, .05);
  --sh-2: 0 1px 2px rgba(12, 31, 26, .04), 0 6px 16px -6px rgba(12, 31, 26, .08);
  --sh-3: 0 2px 4px rgba(12, 31, 26, .03), 0 24px 60px -18px rgba(12, 31, 26, .18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f0d;
    --surface: #111916;
    --surface-2: #17211d;
    --surface-3: #1e2a25;
    --ink: #e8f0ec;
    --muted: #9fb1a9;
    --faint: #6f8279;
    --line: #22302a;
    --line-2: #2c3c35;
    --accent: #34d3a6;
    --accent-2: #5ee4bd;
    --accent-ink: #04241c;
    --accent-soft: #10302a;
    --lime: #b6e85a;
    --good: #4fd88f;
    --good-soft: #10291c;
    --bad: #ff7b74;
    --bad-soft: #351615;
    --mid: #f5c04e;
    --mid-soft: #33270b;
    --sev-0: #4fd88f; --sev-1: #b9dc4a; --sev-2: #f5c04e; --sev-3: #ff9a52; --sev-4: #ff6b6b;
    --sev-1-soft: #263011; --sev-1-ink: #c9e66a; --sev-3-soft: #3a2010;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh-2: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 20px -8px rgba(0, 0, 0, .5);
    --sh-3: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 70px -20px rgba(0, 0, 0, .7);
  }
}

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.35rem); font-weight: 800; letter-spacing: -.03em; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
::selection { background: var(--lime); color: #0c1f1a; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.bg-deco {
  position: absolute; inset: 0 0 auto 0; height: 900px; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(600px 380px at 12% 8%, color-mix(in srgb, var(--lime) 38%, transparent), transparent 70%),
    radial-gradient(700px 420px at 92% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
}
.bg-deco::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  opacity: .5;
}

/* ---------- 3. Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.22rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo b { font-weight: 800; color: var(--accent); }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2)); color: var(--lime);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 12px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a { font-size: .9rem; font-weight: 500; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 99px; transition: color .2s, background .2s; }
.header-nav a:hover { color: var(--ink); background: var(--surface-2); }
.header-nav .nav-pill { color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
@media (max-width: 640px) { .header-nav a:not(.nav-pill) { display: none; } }

/* ---------- 4. Hero ---------- */
.hero { padding: 24px 0 12px; }
@media (max-width: 480px) { .trust { gap: 4px 16px; } .trust li { font-size: .82rem; } .trust b { font-size: 1.05rem; } .hero-copy { margin-bottom: 18px; } }
@media (min-width: 900px) { .hero { padding-top: 56px; } }
.hero-copy { max-width: 760px; margin-bottom: 26px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px;
  font-size: .8rem; font-weight: 600; letter-spacing: .01em; color: var(--accent-2);
  background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line);
  padding: 6px 12px 6px 10px; border-radius: 99px; box-shadow: var(--sh-1);
}
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.hero h1 { font-size: clamp(2.15rem, 6.4vw, 4.1rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; margin-bottom: .32em; }
.hl { position: relative; white-space: nowrap; background: linear-gradient(transparent 62%, var(--lime) 62%, var(--lime) 92%, transparent 92%); padding: 0 .06em; }
@media (prefers-color-scheme: dark) { .hl { background: none; color: var(--lime); } }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 40em; margin-bottom: 18px; }
.t-hero { color: var(--good); }
.t-villain { color: var(--bad); }
.trust { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 0; }
.trust li { display: flex; align-items: baseline; gap: 6px; font-size: .9rem; color: var(--muted); }
.trust li + li { padding-left: 22px; border-left: 1px solid var(--line-2); }
.trust b { font-family: var(--display); font-size: 1.2rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
@media (max-width: 480px) { .trust li + li { padding-left: 0; border-left: 0; } }

/* ---------- 5. Herramienta ---------- */
.tool-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 16px;
}
.tool-card::before {
  content: ""; position: absolute; inset: -1px -1px auto -1px; height: 4px; border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, var(--accent), var(--lime), var(--accent));
}
@media (min-width: 900px) { .tool-card { padding: 28px; } }

.tool-grid { display: grid; gap: 18px; }
.tool-side { display: contents; }
.side-upload { order: 1; }
.tool-main { order: 2; min-width: 0; }
.side-action { order: 3; }
@media (min-width: 900px) {
  .tool-grid { grid-template-columns: 360px minmax(0, 1fr); gap: 32px; align-items: start; }
  .tool-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 88px; }
  .tool-main { padding-left: 32px; border-left: 1px solid var(--line); }
}

.step-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; font-family: var(--display); font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; }
.step-label > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: .82rem; font-family: var(--font); }
.step-label small { font-family: var(--font); font-weight: 500; font-size: .82rem; color: var(--faint); letter-spacing: 0; }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 18px; padding: 26px 16px 20px; text-align: center; cursor: pointer;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect x='1' y='1' width='calc(100%25 - 2px)' height='calc(100%25 - 2px)' rx='17' fill='none' stroke='%2334b38f' stroke-width='1.6' stroke-dasharray='7 7'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 40%, var(--surface)));
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.dropzone:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--accent) 55%, transparent); }
.dropzone.over { transform: scale(1.015); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.dropzone:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.dz-icon {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; margin-bottom: 6px;
  background: var(--surface); color: var(--accent); box-shadow: var(--sh-2);
  transition: transform .3s var(--ease);
}
.dropzone:hover .dz-icon { transform: translateY(-3px) rotate(-4deg); }
.dz-title { font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; color: var(--ink); }
.dz-sub { font-size: .9rem; color: var(--muted); }
.dz-sub u { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.dz-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.dz-tags span { font-size: .72rem; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--line); padding: 2px 9px; border-radius: 99px; }

.progress { display: none; margin-top: 14px; }
.tool-card[data-state="reading"] .progress { display: block; }
.tool-card[data-state="reading"] .dropzone { opacity: .55; pointer-events: none; }
.progress-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--lime)); transition: width .3s var(--ease); }
.progress p { margin: 8px 0 0; font-size: .86rem; color: var(--muted); }

.tool-msg { margin: 14px 0 0; padding: 11px 14px; border-radius: 12px; font-size: .9rem; line-height: 1.45; background: var(--surface-2); border: 1px solid var(--line); }
.msg-ok { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.msg-warn { background: var(--mid-soft); border-color: color-mix(in srgb, var(--mid) 30%, transparent); }
.msg-error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }

.side-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 18px 0 12px; }
.side-or { font-size: .88rem; font-weight: 600; color: var(--muted); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; padding: 6px 12px; border-radius: 99px; transition: background .2s, border-color .2s; }
.link-btn svg { color: var(--accent); }
.link-btn:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

.seg { border: 0; padding: 4px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2); border-radius: 14px; border: 1px solid var(--line); }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; text-align: center; padding: 9px 10px; border-radius: 10px; font-size: .9rem; font-weight: 600; color: var(--muted); transition: all .2s var(--ease); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.micro { font-size: .78rem; color: var(--faint); margin: 8px 2px 0; line-height: 1.45; }

.tool-main { container-type: inline-size; }
.markers { display: grid; gap: 14px; }
@container (min-width: 600px) { .markers { grid-template-columns: 1fr 1fr; } }
.mgroup { border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px 6px; margin: 0; min-width: 0; background: var(--surface); transition: border-color .2s; }
.mgroup:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 9%, transparent); }
.mgroup legend { float: left; width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px 0 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink); }
.mgroup legend + * { clear: both; }
.g-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.g-count { margin-left: auto; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--faint); background: var(--surface-2); padding: 2px 8px; border-radius: 99px; }

.mrow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name input" "gauge chip";
  column-gap: 12px; row-gap: 8px; align-items: center; padding: 12px 0; border-top: 1px dashed var(--line); cursor: text;
}
.mgroup legend + .mrow { border-top: 0; }
.mname { grid-area: name; font-size: .92rem; font-weight: 600; line-height: 1.3; }
.mref { display: block; font-weight: 400; color: var(--faint); font-size: .74rem; margin-top: 2px; }
.minput { grid-area: input; position: relative; display: flex; align-items: center; }
.minput input {
  width: 128px; padding: 10px 60px 10px 10px; border: 1px solid var(--line-2); border-radius: 11px;
  background: var(--surface-2); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600;
  font-variant-numeric: tabular-nums; text-align: right; transition: border-color .2s, background .2s, box-shadow .2s;
}
.minput input::placeholder { color: var(--faint); font-weight: 400; }
.minput input:hover { border-color: var(--faint); }
.minput input:focus { outline: 0; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.minput input.invalid { border-color: var(--bad); }
.munit { position: absolute; right: 10px; font-size: .7rem; font-weight: 600; color: var(--faint); pointer-events: none; }
.mgauge { grid-area: gauge; }
.mrow .chip { grid-area: chip; justify-self: end; }
.mrow .chip:empty { visibility: hidden; }
.from-pdf .minput input { border-color: color-mix(in srgb, var(--good) 60%, transparent); background: var(--good-soft); }
.from-pdf .mname::after { content: "del PDF"; margin-left: 6px; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--good); vertical-align: 1px; }

.gauge { position: relative; display: block; height: 6px; }
.g-track { position: absolute; inset: 0; border-radius: 99px; opacity: .55; }
.g-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
.g-dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: left .35s var(--ease), background .35s; }
.gauge.g-opt .g-dot { background: var(--sev-0); }
.gauge.g-watch .g-dot { background: var(--sev-1); }
.gauge.g-mild .g-dot { background: var(--sev-2); }
.gauge.g-high .g-dot { background: var(--sev-3); }
.gauge.g-very .g-dot { background: var(--sev-4); }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-opt { background: var(--good-soft); color: var(--good); }
.chip-watch { background: var(--sev-1-soft); color: var(--sev-1-ink); }
.chip-mild { background: var(--mid-soft); color: var(--sev-2); }
.chip-high { background: var(--sev-3-soft); color: var(--sev-3); }
.chip-very { background: var(--bad-soft); color: var(--sev-4); }

.side-action {
  position: relative; z-index: 5;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--sh-3);
}
.tool-card.has-values .side-action { position: sticky; bottom: 10px; }
@media (min-width: 900px) { .tool-card.has-values .side-action, .side-action { position: static; background: var(--surface-2); box-shadow: none; padding: 16px; } }
.count { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: .84rem; color: var(--muted); }
.count b { font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.count-bar { flex: 1; height: 4px; margin-left: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.count-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s var(--ease); }
.privacy { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: .78rem; color: var(--muted); }
.privacy svg { color: var(--good); }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden;
  border-radius: 14px; border: 0; padding: 12px 20px; font: inherit; font-weight: 700; letter-spacing: -.005em; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transition: transform .7s var(--ease);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 28px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary svg { transition: transform .25s var(--ease); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-big { width: 100%; font-size: 1.05rem; padding: 15px 20px; }
.btn:focus-visible, .link-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- 6. Resultados ---------- */
.results {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 20px; scroll-margin-top: 80px;
}
@media (min-width: 900px) { .results { padding: 36px; } }
.results.reveal > * { animation: rise .6s var(--ease) both; }
.results.reveal > *:nth-child(2) { animation-delay: .06s; }
.results.reveal > *:nth-child(3) { animation-delay: .12s; }
.results.reveal > *:nth-child(4) { animation-delay: .18s; }
.results.reveal > *:nth-child(n+5) { animation-delay: .24s; }
.results.reveal .food { animation: rise .5s var(--ease) both; animation-delay: calc(.3s + var(--i, 0) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.kicker { margin: 0 0 6px; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.res-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.res-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: .15em; }
.res-date { color: var(--faint); margin: 0; font-size: .86rem; }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--good); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray .8s var(--ease); }
.ring-n { font-family: var(--display); font-weight: 800; font-size: 15px; fill: var(--ink); }
.ring-l { font-size: 6.5px; font-weight: 600; fill: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.res-stats { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .res-stats { grid-template-columns: repeat(4, 1fr); } }
.res-stats li { padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.res-stats b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.res-stats span { font-size: .82rem; color: var(--muted); font-weight: 500; }
.st-hero b { color: var(--good); }
.st-villain b { color: var(--bad); }
.st-mixed b { color: var(--mid); }

.res-block { margin-bottom: 30px; }
.block-title { font-size: 1.08rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.block-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.res-markers { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 560px) { .res-markers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .res-markers { grid-template-columns: repeat(3, 1fr); } }
.rmk { padding: 14px 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1); }
.rmk-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rmk-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); color: var(--muted); flex: none; }
.rmk-name { font-size: .86rem; font-weight: 600; flex: 1; min-width: 0; line-height: 1.25; }
.rmk-val { margin: 0 0 12px; font-size: .84rem; color: var(--muted); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.rmk-val b { font-family: var(--display); font-size: 1.6rem; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rmk-val small { margin-left: auto; color: var(--faint); font-size: .74rem; }
.rmk-watch .rmk-ico { background: var(--sev-1-soft); color: var(--sev-1-ink); }
.rmk-mild .rmk-ico { background: var(--mid-soft); color: var(--sev-2); }
.rmk-high .rmk-ico { background: var(--sev-3-soft); color: var(--sev-3); }
.rmk-very .rmk-ico { background: var(--bad-soft); color: var(--sev-4); }
.rmk-detail { margin: 10px 0 0; font-size: .76rem; color: var(--muted); }
.lv { margin-left: auto; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lv i { display: block; width: 64px; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.lv b { display: block; height: 100%; width: calc(var(--lv, .5) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--sev-1), var(--sev-2) 45%, var(--sev-3) 75%, var(--sev-4)); background-size: calc(100% / var(--lv, .5)) 100%; }
.lv-watch { color: var(--sev-1-ink); }
.lv-mild, .lv-mid { color: var(--sev-2); }
.lv-high { color: var(--sev-4); }

.res-tips { display: grid; gap: 12px; }
@media (min-width: 720px) { .res-tips { grid-template-columns: 1fr 1fr; } }
.tip { padding: 16px; border-radius: var(--r); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); }
.tip-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tip-emoji { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; font-size: 1.3rem; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.tip h4 { font-size: 1.02rem; margin: 0; }
.tip small { display: block; font-size: .76rem; color: var(--faint); line-height: 1.35; }
.tip p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.55; }

.res-nav {
  position: sticky; top: 72px; z-index: 4; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -6px 18px; padding: 6px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 16px;
}
.res-nav::-webkit-scrollbar { display: none; }
.res-nav a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; font-size: .86rem; font-weight: 600; text-decoration: none; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); transition: transform .2s var(--ease), background .2s; }
.res-nav a:hover { transform: translateY(-1px); }
.res-nav b { font-size: .74rem; padding: 1px 7px; border-radius: 99px; background: var(--surface); }
.rn-hero b { color: var(--good); }
.rn-villain b { color: var(--bad); }
.rn-mixed b { color: var(--mid); }

.res-sec { margin-bottom: 34px; scroll-margin-top: 140px; }
.sec-title { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sec-emoji { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 15px; font-size: 1.55rem; }
.res-hero .sec-emoji { background: var(--good-soft); }
.res-villain .sec-emoji { background: var(--bad-soft); }
.res-mixed .sec-emoji { background: var(--mid-soft); }
.sec-title h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 2px; }
.sec-title .sub { margin: 0; color: var(--muted); font-size: .9rem; }

.foods { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 600px) { .foods { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .foods { grid-template-columns: 1fr 1fr 1fr; } }
.food {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.food:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.food::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; }
.food-hero::before { background: var(--good); }
.food-villain::before { background: var(--bad); }
.food-mixed::before { background: var(--mid); }
.food-hero:hover { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.food-villain:hover { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.food-mixed:hover { border-color: color-mix(in srgb, var(--mid) 40%, var(--line)); }
.femoji { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; font-size: 1.6rem; line-height: 1; }
.food-hero .femoji { background: var(--good-soft); }
.food-villain .femoji { background: var(--bad-soft); }
.food-mixed .femoji { background: var(--mid-soft); }
.fbody { min-width: 0; flex: 1; }
.ftop { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.food h4 { font-family: var(--font); font-size: .95rem; font-weight: 700; letter-spacing: -.01em; margin: 2px 0 0; line-height: 1.3; }
.fmeter { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.fmeter small { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 8px; height: 8px; border-radius: 3px; background: var(--surface-3); }
.m-hero i.on { background: var(--good); }
.m-villain i.on { background: var(--bad); }
.m-mixed i.on { background: var(--mid); }
.pills { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.pill { font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.why { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.45; }
.why b { color: var(--ink); font-weight: 600; }
.why-pro b { color: var(--good); }
.why-con b { color: var(--bad); }
.why + .why { margin-top: 4px; }
.food-empty { color: var(--muted); font-size: .92rem; padding: 14px; border-radius: var(--r); background: var(--surface-2); }

.res-allok { display: flex; gap: 16px; align-items: flex-start; background: var(--good-soft); border-radius: var(--r); padding: 20px; margin-bottom: 20px; }
.allok-emoji { font-size: 2rem; }
.res-allok p { margin: 0; color: var(--muted); }
.res-consult { display: flex; gap: 10px; background: var(--mid-soft); border-radius: var(--r); padding: 14px 16px; font-size: .9rem; }
.res-disclaimer { font-size: .8rem; color: var(--faint); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.res-actions { display: flex; gap: 10px; flex-wrap: wrap; }


/* ---------- 7. Contenido ---------- */
.content { padding: 24px 0 64px; }
.sec-head { margin-bottom: 22px; max-width: 720px; }
.sec-head h2 { margin: 0; }
.steps { list-style: none; padding: 0; margin: 0 0 64px; display: grid; gap: 14px; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-1); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.steps li:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.step-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.step-n { position: absolute; top: 14px; right: 20px; font-family: var(--display); font-size: 3.4rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--surface-3); }
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }

.seo { margin-bottom: 8px; }
.seo-lead { font-size: clamp(1.05rem, 1.7vw, 1.22rem); line-height: 1.6; max-width: 48em; color: var(--ink); }
.seo-grid { display: grid; gap: 14px; margin-top: 26px; }
@media (min-width: 860px) { .seo-grid { grid-template-columns: repeat(3, 1fr); } }
.seo-grid > div { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.seo-grid h3 { font-size: 1.1rem; }
.seo-grid p { margin: 0; color: var(--muted); font-size: .93rem; }
.seo-grid b { color: var(--ink); }

.faq { max-width: 820px; margin-top: 64px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--line-2); box-shadow: var(--sh-2); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6v12M6 12h12' stroke='%230e7c66' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

.more { margin-top: 64px; }
.more-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .more-grid { grid-template-columns: repeat(3, 1fr); } }
.more-grid a { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.more-grid a:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.more-emoji { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--surface-2); font-size: 1.3rem; margin-bottom: 10px; }
.more-grid b { font-family: var(--display); font-size: 1.06rem; letter-spacing: -.01em; }
.soon { color: var(--faint); font-size: .82rem; }
.arrow { position: absolute; top: 22px; right: 22px; color: var(--faint); transition: transform .3s var(--ease), color .3s; }
.more-grid a:hover .arrow { transform: translateX(4px); color: var(--accent); }

/* ---------- 8. Pie ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: .86rem; color: var(--muted); }
.footer-in { display: grid; gap: 18px; padding: 32px 0; }
@media (min-width: 760px) { .footer-in { grid-template-columns: 1.4fr 1fr auto; align-items: center; } }
.footer-brand p { margin: 10px 0 0; max-width: 34em; }
.footer-in nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-in nav a { color: var(--muted); text-decoration: none; }
.footer-in nav a:hover { color: var(--ink); }
.copy { margin: 0; color: var(--faint); }

/* ---------- 9. Legal ---------- */
.legal { padding: 40px 0 64px; max-width: 46em; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.04em; }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.todo { background: var(--mid-soft); padding: 0 4px; border-radius: 4px; }

/* ---------- 10. Impresión: solo el plan ---------- */
@media print {
  body { background: #fff; color: #000; }
  .bg-deco, .site-header, .site-footer, .hero-copy, .tool-card, .content, .res-actions, .res-nav { display: none !important; }
  .results { box-shadow: none; border: 0; padding: 0; margin: 0; }
  .results.reveal > *, .results.reveal .food { animation: none !important; }
  .food, .tip, .rmk { break-inside: avoid; box-shadow: none; }
}
.more-n { display: inline-block; font-size: .7rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 0 6px; border-radius: 99px; cursor: help; }
.trend { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 1px 7px 1px 6px; border-radius: 99px; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; vertical-align: 2px; color: #7a3d00; background: linear-gradient(90deg, #ffe7b3, #ffd1e0); white-space: nowrap; }
.trend::before { content: "🔥"; font-size: .7rem; letter-spacing: 0; }
.calc-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; vertical-align: 2px; color: var(--accent); background: var(--accent-soft); }
.calc-tag[hidden] { display: none; }
@media (prefers-color-scheme: dark) { .trend { color: #ffd9a0; background: linear-gradient(90deg, #4a2c08, #4a1530); } }
.trending { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; }
.trending span { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--sh-1); }
.trending .trending-label { background: none; border: 0; box-shadow: none; padding-left: 0; color: var(--muted); }
.micro-c { text-align: center; margin-top: 4px; }
.chip-check { background: var(--bad-soft); color: var(--bad); }
