:root {
  --ink: #16181d; --muted: #5a606c; --line: #e7e3db; --bg: #fbfaf6; --card: #fff;
  --accent: #e4572e; --max: 1120px; --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: inherit; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Cabecera */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.head-row { display: flex; align-items: center; justify-content: center; padding-top: 18px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: clamp(34px, 6vw, 52px); font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.logo svg { width: .9em; height: .9em; color: var(--accent); }
.logo b { color: var(--accent); font-weight: 900; }
.burger { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu > ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; padding-bottom: 8px; }
.has-sub { position: relative; }
.has-sub > a { display: block; padding: 8px 11px; text-decoration: none; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-radius: 8px; }
.has-sub > a:hover, .has-sub:focus-within > a { background: var(--ink); color: #fff; }
.sub-toggle { display: none; }
.sub { display: none; position: absolute; top: 100%; left: 0; min-width: 440px; columns: 2; column-gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px !important; box-shadow: 0 14px 34px rgba(22, 24, 29, .13); }
.sub.wide { min-width: 640px; columns: 3; }
.has-sub:nth-last-child(-n+6) .sub { left: auto; right: 0; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.sub li { break-inside: avoid; }
.sub a { display: block; padding: 7px 10px; border-radius: 8px; text-decoration: none; font-size: 15px; }
.sub a:hover { background: var(--bg); color: var(--accent); }

/* Contenido */
main { padding-top: 18px; padding-bottom: 56px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs span { margin: 0 2px; }
.hero { text-align: center; max-width: 780px; margin: 26px auto 34px; }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 16px; font-weight: 850; text-wrap: balance; }
.lead { font-size: 18px; color: var(--muted); margin: 0; text-wrap: pretty; }
.sec-title { font-size: 24px; letter-spacing: -.02em; margin: 44px 0 18px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.grid > li { display: flex; }
.card { display: flex; flex-direction: column; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(22, 24, 29, .11); }
.tile { display: grid; place-items: center; aspect-ratio: 16 / 10; color: rgba(255, 255, 255, .96); background: linear-gradient(135deg, hsl(var(--h) 55% 52%), hsl(calc(var(--h) + 26) 58% 36%)); }
.tile svg { width: 34%; height: auto; aspect-ratio: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .18)); }
.card h3 { margin: 14px 16px 4px; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; }
.card p { margin: 0 16px 16px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.pcard p { flex: 1; }
.btn { margin: 0 16px 16px; padding: 10px 14px; text-align: center; font-size: 15px; font-weight: 700; color: #fff; background: var(--ink); border-radius: 10px; }
.pcard:hover .btn { background: var(--accent); }
.note { margin: 20px auto 0; text-align: center; font-size: 14px; color: var(--muted); }

.prose { max-width: 760px; margin: 56px auto 0; }
.prose h2 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; margin: 40px 0 12px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.legal h1 { text-align: left; }
.related { max-width: 760px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--line); }
.related h2 { font-size: 18px; margin: 0 0 12px; }
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related a { display: block; padding: 7px 14px; font-size: 15px; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.related a:hover { border-color: var(--ink); }

/* Pie */
.site-foot { background: var(--ink); color: #c9ccd3; padding: 36px 0 28px; font-size: 14px; }
.site-foot a, .site-foot button { color: #fff; }
.foot-silos { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-silos a { text-decoration: none; font-weight: 600; }
.disclosure { max-width: 760px; margin: 0 0 16px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 10px; }
.foot-legal button { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.copy { margin: 0; color: #8d92a0; }

/* Cookies */
.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 720px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(22, 24, 29, .2); font-size: 14px; }
.cookies[hidden] { display: none; }
.cookies p { flex: 1 1 320px; margin: 0; }
.cookies div { display: flex; gap: 8px; }
.cookies button { padding: 9px 16px; font: inherit; font-weight: 700; border-radius: 10px; border: 1px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; }
.cookies .primary { background: var(--ink); color: #fff; }

/* Móvil */
@media (max-width: 860px) {
  .head-row { justify-content: space-between; padding-bottom: 14px; }
  .burger { display: block; padding: 9px 16px; font: inherit; font-size: 15px; font-weight: 700; background: var(--ink); color: #fff; border: 0; border-radius: 10px; cursor: pointer; }
  .menu { display: none; border-top: 1px solid var(--line); }
  .menu.open { display: block; }
  .menu > ul { display: block; padding-bottom: 10px; }
  .has-sub { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); }
  .has-sub > a { padding: 13px 4px; border-radius: 0; }
  .has-sub > a:hover, .has-sub:focus-within > a { background: none; color: inherit; }
  .sub-toggle { display: block; width: 48px; background: none; border: 0; cursor: pointer; }
  .sub-toggle::before { content: ""; display: block; width: 9px; height: 9px; margin: 0 auto; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
  .has-sub.open .sub-toggle::before { transform: rotate(-135deg); }
  .sub, .sub.wide, .has-sub:hover .sub, .has-sub:focus-within .sub { display: none; position: static; grid-column: 1 / -1; min-width: 0; columns: 1; border: 0; box-shadow: none; padding: 0 0 10px 8px !important; }
  .has-sub.open .sub { display: block; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card h3 { margin: 12px 12px 4px; font-size: 16px; }
  .card p { margin: 0 12px 12px; font-size: 14px; }
  .btn { margin: 0 12px 12px; }
}
@media (max-width: 420px) { .grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* Tarjetas de selección: banda de color más baja para que mande el texto */
.pcard .tile { aspect-ratio: 16 / 6.5; }
.pcard .tile svg { width: 20%; }

/* Tarjetas con foto generada */
.tile.has-img { background: #efece6; }
.tile.has-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pcard .tile.has-img { aspect-ratio: 16 / 10; }

/* Productos de Amazon (data/products.json) */
.tile.is-product { background: #fff; padding: 14px; }
.tile.is-product img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.tile.is-product { overflow: hidden; }
.product-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s; }
.product:hover { box-shadow: 0 12px 30px rgba(22, 24, 29, .1); }
.product-img { display: block; padding: 18px; background: #fff; border-bottom: 1px solid var(--line); }
.product-img img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.product-title { flex: 1; margin: 14px 16px 12px; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); text-decoration: none; }
.product-title:hover { color: var(--accent); }
.btn-amazon { margin: 0 16px 16px; padding: 11px 14px; text-align: center; font-size: 15px; font-weight: 700; color: #16181d; background: #ffd23f; border-radius: 10px; text-decoration: none; }
.btn-amazon:hover { background: #f7c21a; }
@media (max-width: 760px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-img { padding: 10px; }
  .product-title { margin: 10px 12px 10px; font-size: 14px; }
  .btn-amazon { margin: 0 12px 12px; font-size: 14px; padding: 10px; }
}
