/* ===== ¿Qué cocino? — estilos (base compartida) ===== */
:root {
  --paper: #f5f7fa;
  --sheet: #ffffff;
  --ink: #161a22;
  --ink-2: #4a5263;
  --line: #d6dbe4;
  --stamp: #c2410c;
  --stamp-soft: #fdeee4;
  --warn: #9a5b00;
  --warn-soft: #fff4de;
  --bad: #b3261e;
  --radius-lg: 18px;
  --radius-sm: 8px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12151c; --sheet: #1b1f28; --ink: #eef1f6; --ink-2: #a9b1c1;
    --line: #313847; --stamp: #ff9a62; --stamp-soft: #3a2216;
    --warn: #ffc15e; --warn-soft: #3a2d12; --bad: #ff8a80;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.6 var(--body);
}
img, svg { max-width: 100%; }
a { color: var(--stamp); }
:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(760px, 100% - 2rem); margin-inline: auto; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--sheet); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font: 700 1.15rem/1 var(--display); letter-spacing: -.01em; }
.logo svg { width: 30px; height: 30px; }
.tools-nav { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tools-nav::-webkit-scrollbar { display: none; }
@media (min-width: 521px) { .tools-nav { flex-wrap: wrap; overflow: visible; } }
.tools-nav a {
  text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .95rem;
  padding: .45rem .75rem; border-radius: 999px; white-space: nowrap; flex: none;
}
.tools-nav a:hover { color: var(--ink); background: var(--paper); }
.tools-nav a[aria-current="page"] { color: var(--stamp); background: var(--stamp-soft); }

/* hero + tool */
.hero { padding: 1.75rem 0 1rem; }
h1 {
  font: 800 clamp(2rem, 7vw, 3.1rem)/1.02 var(--display);
  letter-spacing: -.03em; margin: 0 0 .5rem; max-width: 16ch;
}
.lead { margin: 0 0 1.25rem; color: var(--ink-2); font-size: 1.08rem; max-width: 52ch; }

.tool-card {
  background: var(--sheet); border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg); padding: 1rem;
  box-shadow: 6px 6px 0 var(--stamp-soft);
  position: relative;
}
.tool-card [data-show] { display: none; }
.tool-card[data-state="idle"] [data-show~="idle"],
.tool-card[data-state="loading"] [data-show~="loading"],
.tool-card[data-state="ready"] [data-show~="ready"],
.tool-card[data-state="confirm"] [data-show~="confirm"],
.tool-card[data-state="working"] [data-show~="working"],
.tool-card[data-state="done"] [data-show~="done"],
.tool-card[data-state="error"] [data-show~="error"] { display: block; }
.tool-card.is-live .nojs { display: none; }
.nojs { margin: 0; padding: 1rem; color: var(--ink-2); }

.drop {
  display: grid; place-items: center; text-align: center; gap: .6rem;
  min-height: 220px; padding: 1.5rem 1rem; cursor: pointer;
  border: 2px dashed var(--stamp); border-radius: 12px;
  background: var(--stamp-soft); transition: background-color .15s, transform .15s;
}
.drop:hover, .drop.is-over { background: color-mix(in srgb, var(--stamp-soft) 70%, var(--stamp) 12%); }
.drop.is-over { transform: scale(.99); }
.drop svg { width: 46px; height: 46px; fill: var(--stamp); }
.drop__btn {
  display: inline-block; background: var(--stamp); color: #fff;
  font: 700 1.1rem/1 var(--body); padding: .95rem 1.4rem; border-radius: 999px;
}
.drop__sub { color: var(--ink-2); font-size: .93rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; cursor: pointer; text-decoration: none; text-align: center;
  font: 700 1.05rem/1.2 var(--body); padding: .95rem 1.4rem; border-radius: 999px;
  background: var(--stamp); color: #fff; width: 100%;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); width: auto; padding: .7rem 1.1rem; font-size: .95rem; }
.btn--big { font-size: 1.15rem; padding: 1.1rem 1.4rem; }
.link-btn { background: none; border: 0; color: var(--stamp); font: 600 .95rem var(--body); cursor: pointer; padding: .5rem; text-decoration: underline; text-underline-offset: 3px; }

.panel > * + * { margin-top: .9rem; }
.hint { margin: .35rem 0 0; color: var(--ink-2); font-size: .9rem; min-height: 1.4em; }
.hint--bad { color: var(--bad); font-weight: 600; }

/* lista de documentos (unir) */
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-height: 340px; overflow-y: auto; }
.doc {
  display: grid; grid-template-columns: 48px 1fr auto; gap: .75rem; align-items: center;
  padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet);
}
.doc__thumb { width: 48px; height: 62px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; display: block; }
.doc__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.doc__info { min-width: 0; display: grid; }
.doc__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc__meta { color: var(--ink-2); font-size: .85rem; }
.doc__actions { display: flex; gap: .15rem; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: var(--ink-2); }
.icon-btn:hover:not(:disabled) { background: var(--paper); }
.icon-btn:disabled { opacity: .25; cursor: default; }
.icon-btn--del:hover svg { fill: var(--bad); }
.doc__thumb--img img { object-fit: cover; object-position: center; }
.doc--result { grid-template-columns: 48px 1fr auto; }
a.icon-btn svg { fill: var(--stamp); }
.results { margin: 0 0 1.1rem; text-align: left; }
.results:empty { display: none; }
.add-more { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; color: var(--stamp); font-weight: 600; }

.file-chip { margin: 0; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; display: grid; }
.file-chip__name { font-weight: 700; overflow-wrap: anywhere; }
.file-chip__meta { color: var(--ink-2); font-size: .9rem; }

/* grilla de páginas (rotar / quitar) */
.pages { list-style: none; margin: 0; padding: .25rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; max-height: 420px; overflow-y: auto; }
.pg {
  position: relative; width: 100%; aspect-ratio: 3 / 4; display: grid; place-items: center;
  padding: .4rem .4rem 1.5rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--paper); cursor: pointer; font: inherit; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.pg:hover { border-color: var(--stamp); }
.pg__img { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.pg__img canvas { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgb(0 0 0 / .18); background: #fff; transform: rotate(var(--r, 0deg)) scale(var(--s, 1)); transition: transform .2s; }
.pg__num { position: absolute; bottom: .25rem; left: 0; right: 0; text-align: center; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.pg__badge { position: absolute; top: .3rem; right: .3rem; font-size: .75rem; font-weight: 700; color: #fff; background: var(--stamp); border-radius: 999px; padding: 0 .4rem; }
.pg__badge:empty { display: none; }
.pg[aria-pressed="true"] { border-color: var(--stamp); background: var(--stamp-soft); }
[data-tool="quitar"] .pg[aria-pressed="true"] { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--sheet)); }
[data-tool="quitar"] .pg[aria-pressed="true"] canvas { opacity: .3; }
[data-tool="quitar"] .pg[aria-pressed="true"]::after {
  content: ""; position: absolute; inset: 30% 30% 38%; background:
    linear-gradient(45deg, transparent 44%, var(--bad) 44% 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, var(--bad) 44% 56%, transparent 56%);
}
@media (prefers-reduced-motion: reduce) { .pg__img canvas { transition: none; } }
.toolbar { display: flex; gap: .4rem; flex-wrap: wrap; }
.toolbar .btn--ghost { padding: .5rem .85rem; font-size: .9rem; }

/* opciones */
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 700; margin-bottom: .45rem; padding: 0; }
.choices { display: grid; gap: .45rem; }
.choice { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--stamp); background: var(--stamp-soft); }
.choice input { margin-top: .3rem; accent-color: var(--stamp); width: 1.1rem; height: 1.1rem; }
.choice strong { display: block; }
.choice span span { color: var(--ink-2); font-size: .9rem; }
.field-label { display: block; font-weight: 700; margin-bottom: .35rem; }
.text-input {
  width: 100%; font: 500 1.05rem var(--body); padding: .8rem .9rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--sheet); color: var(--ink);
}
.text-input[aria-invalid="true"] { border-color: var(--bad); }

/* progreso */
.progress-box { padding: 2.5rem 1rem; text-align: center; }
progress { width: 100%; height: 12px; appearance: none; border: 0; border-radius: 999px; background: var(--stamp-soft); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--stamp-soft); }
progress::-webkit-progress-value { background: var(--stamp); border-radius: 999px; transition: width .2s; }
progress::-moz-progress-bar { background: var(--stamp); }
.progress-box p { margin: .9rem 0 0; color: var(--ink-2); }

/* resultado: el sello */
.done { text-align: center; padding: 1rem .5rem .5rem; }
.stamp {
  display: inline-block; margin: .25rem 0 1rem;
  font: 800 2.4rem/1 var(--display); letter-spacing: -.02em; color: var(--stamp);
  border: 4px double var(--stamp); border-radius: 12px; padding: .35rem 1.1rem .45rem;
  transform: rotate(-6deg);
}
@media (prefers-reduced-motion: no-preference) {
  .tool-card[data-state="done"] .stamp { animation: sellar .42s cubic-bezier(.2, 1.6, .4, 1) both; }
}
@keyframes sellar { from { opacity: 0; transform: rotate(-6deg) scale(1.9); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
.saving { display: block; font: 800 2rem/1 var(--display); color: var(--ink); margin-bottom: .25rem; }
.saving:empty { display: none; }
.tip { margin: 1.1rem auto .25rem; max-width: 34ch; display: grid; gap: .15rem; }
.tip a { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--stamp); text-underline-offset: 4px; }
.tip span { color: var(--ink-2); font-size: .88rem; }
.done__note { color: var(--ink-2); margin: 0 0 1.1rem; }

/* confirmación y error */
.notice { padding: 1rem; border-radius: 12px; background: var(--warn-soft); color: var(--ink); }
.notice strong { color: var(--warn); }
.notice p { margin: .3rem 0 0; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.row .btn { width: auto; flex: 1 1 200px; }
.error-box { text-align: center; padding: 2rem 1rem; }
.error-box p { margin: 0 0 1rem; font-weight: 600; color: var(--bad); }

.privacy { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0 0; color: var(--ink-2); font-size: .93rem; }
.privacy svg { flex: none; width: 20px; height: 20px; fill: var(--stamp); margin-top: .15rem; }

/* publicidad */
.ad-slot {
  min-height: 110px; margin: 2rem 0; display: grid; place-items: center;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--ink-2); font-size: .8rem;
}

/* contenido */
.content { padding-bottom: 2rem; }
.content h2 { font: 700 1.6rem/1.15 var(--display); letter-spacing: -.02em; margin: 2.5rem 0 .75rem; }
.content p, .content li { max-width: 68ch; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: paso; }
.steps li { counter-increment: paso; display: grid; grid-template-columns: 2.2rem 1fr; gap: .75rem; }
.steps li::before {
  content: counter(paso); display: grid; place-items: center; width: 2.2rem; height: 2.2rem;
  border-radius: 50%; border: 1.5px solid var(--ink); font: 700 1rem var(--display);
}
.steps strong { display: block; }
details { border-bottom: 1px solid var(--line); padding: .9rem 0; }
summary { cursor: pointer; font-weight: 700; list-style-position: outside; }
details p { margin: .6rem 0 0; color: var(--ink-2); }
.more-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.more-tools a {
  display: block; padding: 1rem; border: 1.5px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink); background: var(--sheet);
}
.more-tools a:hover { border-color: var(--stamp); }
.more-tools strong { display: block; font-family: var(--display); font-size: 1.1rem; }
.more-tools span { color: var(--ink-2); font-size: .9rem; }

.site-foot { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; color: var(--ink-2); font-size: .9rem; }
.site-foot nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }

.legal h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); max-width: none; }
.todo { background: var(--warn-soft); padding: 0 .25rem; border-radius: 4px; }

@media (max-width: 520px) {
  .site-head .wrap { padding: .5rem 0; }
  .tools-nav { width: calc(100% + 1rem); margin-right: -1rem; padding-right: 2rem; -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
  .tools-nav a { padding: .4rem .6rem; }
  .hero { padding-top: 1.1rem; }
  .drop { min-height: 190px; }
  .tool-card { padding: .75rem; box-shadow: 4px 4px 0 var(--stamp-soft); }
}

/* comparar documentos */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.side { display: grid; gap: .35rem; min-width: 0; }
.side.is-over .compare__text { border-color: var(--stamp); background: var(--stamp-soft); }
.side__head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.file-link { color: var(--stamp); font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.compare__text { min-height: 220px; resize: vertical; font-size: .95rem; line-height: 1.5; }
.side__info { margin: 0; min-height: 1.3em; color: var(--ink-2); font-size: .85rem; overflow-wrap: anywhere; }
.compare__opts { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: center; margin: .6rem 0 .9rem; font-size: .93rem; }
.compare__opts input { accent-color: var(--stamp); width: 1.05rem; height: 1.05rem; vertical-align: -2px; }
.diff-stats { margin: .25rem 0 .75rem; font: 700 1.1rem/1.3 var(--display); }
.diff-legend { margin: .75rem 0 .5rem; display: flex; gap: .75rem; font-size: .88rem; }
.diff {
  margin: 0; max-height: 60vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 400 .97rem/1.65 var(--body); padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}
.diff:empty { display: none; }
.diff ins, .diff-legend ins { background: #d6f5df; color: #0b5a26; text-decoration: none; border-radius: 3px; }
.diff del, .diff-legend del { background: #fde0de; color: #8c1d15; border-radius: 3px; }
@media (prefers-color-scheme: dark) {
  .diff ins, .diff-legend ins { background: #123d24; color: #9ff0b8; }
  .diff del, .diff-legend del { background: #4a1916; color: #ffb4ab; }
}
.diff .chg.is-current { outline: 2px solid var(--stamp); outline-offset: 2px; border-radius: 3px; }
.diff .gap { display: block; color: var(--ink-2); font-size: .85rem; text-align: center; padding: .15rem 0; }
.toolbar .btn--ghost[aria-pressed="true"] { border-color: var(--stamp); background: var(--stamp-soft); color: var(--stamp); }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } .compare__text { min-height: 96px; } .compare__opts { margin: .4rem 0 .6rem; } }

/* guías de trámites */
.guide__bar { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.guide__count { font: 700 1.05rem/1.3 var(--display); }
.guide__actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.guide__actions .btn--ghost { padding: .5rem .85rem; font-size: .9rem; }
.steps-check { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; counter-reset: paso; }
.step { counter-increment: paso; border: 1.5px solid var(--line); border-radius: 12px; background: var(--sheet); }
.step.is-done { border-color: var(--stamp); background: var(--stamp-soft); }
.step > label { display: grid; grid-template-columns: 1.6rem 1fr; gap: .7rem; padding: .85rem .95rem; cursor: pointer; }
.step input { width: 1.3rem; height: 1.3rem; margin-top: .15rem; accent-color: var(--stamp); }
.step__title { display: block; font-weight: 700; font-size: 1.02rem; }
.step__title::before { content: counter(paso) ". "; color: var(--stamp); }
.step.is-done .step__title { text-decoration: line-through; text-decoration-color: var(--stamp); }
.step__when { display: inline-block; margin: .3rem 0 .2rem; font-size: .82rem; font-weight: 700; color: var(--stamp); background: var(--stamp-soft); border-radius: 999px; padding: .1rem .6rem; }
.step.is-done .step__when { background: var(--sheet); }
.step__body { display: block; color: var(--ink-2); font-size: .95rem; }
.step__body a { font-weight: 600; }
.guide__note { margin: .9rem 0 0; font-size: .88rem; color: var(--ink-2); }
.sources { font-size: .92rem; }
.sources li { margin-bottom: .3rem; }
.updated { color: var(--ink-2); font-size: .9rem; margin: -.25rem 0 1rem; }
.foot-guides { margin: 0 0 .5rem; }
@media print {
  .site-head, .site-foot, .ad-slot, .guide__actions, .privacy, .content, .tip { display: none !important; }
  body { background: #fff; }
  .tool-card { box-shadow: none; border: 0; padding: 0; }
  .step { break-inside: avoid; }
}

/* calculadoras */
.wrap--wide { width: min(1040px, 100% - 2rem); }
.calc__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.calc__note { margin: 0 0 .5rem; color: var(--ink-2); font-size: .88rem; }
.calc__group { margin-bottom: 1rem; }
.calc__group legend { font: 700 1.05rem var(--display); margin-bottom: .5rem; }
.calc__fields { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem .9rem; }
.field { display: grid; gap: .25rem; align-content: start; }
.field__label { font-weight: 600; font-size: .93rem; }
.field__box { position: relative; display: block; }
.field__box .text-input { padding-right: 2.6rem; }
.field__unit { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-weight: 600; font-size: .9rem; pointer-events: none; }
.field__hint { color: var(--ink-2); font-size: .8rem; line-height: 1.35; }
textarea.text-input { resize: vertical; font-size: .95rem; }
.calc__result { position: sticky; top: 1rem; border-radius: 14px; background: var(--stamp-soft); padding: 1.1rem; display: grid; gap: .5rem; }
.res__label { margin: 0; font-weight: 700; color: var(--stamp); text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; }
.res__big { margin: 0; font: 800 clamp(2.2rem, 6vw, 3rem)/1 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.res__sub { margin: 0; color: var(--ink-2); font-size: .92rem; min-height: 1.2em; }
.res__list { margin: .4rem 0 0; display: grid; gap: .1rem; }
.res__list div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid color-mix(in srgb, var(--stamp) 18%, transparent); font-size: .95rem; }
.res__list dt { color: var(--ink-2); }
.res__list dd { margin: 0; font-weight: 700; white-space: nowrap; }
.res__actions { display: grid; gap: .5rem; margin-top: .4rem; }
.res__actions .btn--ghost { width: 100%; background: var(--sheet); }
.res__more { background: var(--sheet); border-radius: 10px; padding: .6rem .8rem; border: 1px solid var(--line); }
.res__more summary { font-size: .9rem; }
.res__more .field { margin-top: .6rem; }
.calc .tip { margin: .4rem auto 0; text-align: center; }
.sticky-total { display: none; }
@media (max-width: 800px) {
  .calc__grid { grid-template-columns: 1fr; }
  .calc__result { position: static; }
  .sticky-total {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
    background: var(--stamp); color: #fff; box-shadow: 0 -4px 16px rgb(0 0 0 / .15);
  }
  .sticky-total span { font-weight: 600; font-size: .9rem; }
  .sticky-total strong { font: 800 1.35rem/1 var(--display); }
  body { padding-bottom: 4rem; }
}
@media (max-width: 520px) { .calc__fields { grid-template-columns: 1fr; } }

/* mensaje para cobrar y comparar presupuestos */
.field--wide { margin-top: .7rem; }
select.text-input { appearance: auto; }
.msg { font: 400 .98rem/1.55 var(--body); min-height: 260px; background: var(--sheet); }
.res__big--text { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.15; }
.ranking { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .55rem; }
.rank { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; padding: .6rem .7rem; border-radius: 10px; background: var(--sheet); }
.rank--top { outline: 2px solid var(--stamp); }
.rank__name { font-weight: 700; }
.rank__score { font-weight: 800; font-family: var(--display); }
.rank__bar { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.rank__bar span { display: block; height: 100%; background: var(--stamp); border-radius: 999px; }
.rank__meta { grid-column: 1 / -1; color: var(--ink-2); font-size: .85rem; }
.range { width: 100%; accent-color: var(--stamp); }
.opt legend { font-size: 1rem; }

/* ¿Qué cocino? */
.cook__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.25rem; align-items: start; }
.cook__side { position: sticky; top: 1rem; }
.cook__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.cook__count { font-weight: 700; }
.chips__group { margin-bottom: .8rem; }
.chips__title { margin: 0 0 .35rem; font-weight: 700; font-size: .85rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.chips__list { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { border: 1.5px solid var(--line); background: var(--sheet); color: var(--ink); border-radius: 999px; padding: .42rem .8rem; font: 600 .92rem var(--body); cursor: pointer; }
.chip:hover { border-color: var(--stamp); }
.chip[aria-pressed="true"] { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.cook__filters { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .6rem 0; font-size: .93rem; }
.cook__filters input { accent-color: var(--stamp); }
.summary { font: 700 1.1rem/1.35 var(--display); margin: 0 0 .7rem; }
.recs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.rec details { border: 1.5px solid var(--line); border-radius: 12px; background: var(--sheet); }
.rec details[open] { border-color: var(--stamp); }
.rec summary { list-style: none; cursor: pointer; padding: .75rem .9rem; display: grid; gap: .2rem; }
.rec summary::-webkit-details-marker { display: none; }
.rec__name { font-weight: 700; font-size: 1.05rem; }
.rec__meta { color: var(--ink-2); font-size: .85rem; }
.badge { justify-self: start; font-size: .8rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--paper); color: var(--ink-2); }
.badge--ok { background: var(--stamp-soft); color: var(--stamp); }
.rec__body { padding: 0 .9rem .9rem; }
.rec__h { margin: .3rem 0 .3rem; font-weight: 700; }
.rec__ing { list-style: none; padding: 0; margin: 0 0 .6rem; display: grid; gap: .15rem; font-size: .95rem; }
.rec__ing .is-have span { color: var(--stamp); font-weight: 800; }
.rec__ing .is-miss { color: var(--ink-2); }
.rec__ing .is-miss span { color: var(--bad); font-weight: 800; }
.rec__ing .is-opt { color: var(--ink-2); }
.rec__steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; font-size: .95rem; }
.book h3 { font: 700 1.15rem var(--display); margin: 1.4rem 0 .3rem; }
.book .meta { color: var(--ink-2); font-size: .9rem; margin: 0 0 .3rem; }
.cook__jump { display: none; }
@media (max-width: 800px) {
  .cook__grid { grid-template-columns: 1fr; } .cook__side { position: static; scroll-margin-top: .5rem; }
  .cook__jump:not([hidden]) { display: block; position: fixed; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 20;
    border: 0; border-radius: 999px; padding: .9rem 1rem; background: var(--stamp); color: #fff; font: 700 1.05rem var(--body); box-shadow: 0 6px 20px rgb(0 0 0 / .25); cursor: pointer; }
  body { padding-bottom: 5rem; }
}
