/* Herramientas interactivas de michimimo (lista para un gato nuevo).
   Usa los colores y tipografías de styles.css; aquí solo lo propio de cada herramienta. */
:root {
  --ap-dia: #e8eef9;
  --ap-noche: #8f9fc6;
  --ap-fill: linear-gradient(90deg, #9a5530, #c98a5e);
}

/* ---------- Portada con imagen ---------- */
.ap-hero { position: relative; min-height: 420px; display: flex; align-items: flex-end; overflow: hidden; background: #0b1220; color: #fff; }
.ap-hero picture, .ap-hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-hero picture img { object-position: 60% 50%; }
.ap-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,13,26,.15) 0%, rgba(8,13,26,.55) 45%, rgba(8,13,26,.92) 100%); }
.ap-hero-text { position: relative; z-index: 1; padding-top: 7rem; padding-bottom: 2.75rem; max-width: 760px; margin-left: auto; margin-right: auto; }
@media (min-width: 960px) { .ap-hero { min-height: 520px; } .ap-hero-text { margin-left: max(1.25rem, calc((100vw - var(--container)) / 2)); } }
.ap-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.08; color: #fff; margin: .2rem 0 .8rem; }
.ap-hero p { color: rgba(255,255,255,.86); font-size: 1.08rem; max-width: 600px; margin-bottom: 1.4rem; }
.ap-eyebrow { color: #f3c48b; }
.ap-crumbs { font-size: .82rem; color: rgba(255,255,255,.7); margin-bottom: 1rem; }
.ap-crumbs a { color: rgba(255,255,255,.85); }

/* ---------- Simulador ---------- */
.ap-section { padding-top: 2.5rem; }
.ap-grid { display: grid; gap: 1.5rem; }
@media (min-width: 960px) { .ap-grid { grid-template-columns: 1.08fr .92fr; align-items: start; } .ap-result { position: sticky; top: 84px; } }
.ap-config, .ap-result { padding: 1.5rem; }
@media (min-width: 720px) { .ap-config, .ap-result { padding: 1.9rem; } }
.ap-step { display: flex; align-items: center; gap: .6rem; font-size: 1.18rem; margin: 0 0 .4rem; }
.ap-step span { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .9rem; flex-shrink: 0; }
.ap-config .ap-step:not(:first-child) { margin-top: 2rem; }
.ap-help { color: var(--ink-soft); font-size: .93rem; margin-bottom: 1rem; }

.ap-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.ap-chip { font: inherit; font-size: .88rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; transition: background .2s, border-color .2s, transform .15s; }
.ap-chip:hover { border-color: var(--accent); }
.ap-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.ap-chip:active { transform: scale(.97); }

.ap-group { border: 0; padding: 0; margin: 1.3rem 0 0; }
.ap-group legend { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .6rem; }
.ap-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 560px) { .ap-tiles { grid-template-columns: repeat(3, 1fr); } }
.ap-tile { position: relative; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; transition: border-color .2s, box-shadow .2s, background .2s; }
.ap-tile.is-on { border-color: var(--accent-2); background: #fffaf0; box-shadow: 0 6px 18px -10px rgba(255,176,32,.7); }
.ap-toggle { all: unset; box-sizing: border-box; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .55rem; width: 100%; padding: .7rem .75rem; cursor: pointer; border-radius: 14px; }
.ap-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ap-ico { grid-row: 1 / 3; width: 44px; height: 44px; align-self: center; mix-blend-mode: multiply; filter: grayscale(.9) opacity(.55); transition: filter .2s, transform .2s; }
.ap-toggle:hover .ap-ico { filter: grayscale(.3) opacity(.85); }
.ap-tile.is-on .ap-ico { filter: none; transform: scale(1.08); }
.ap-name { font-size: .86rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.ap-w { font-size: .75rem; color: var(--ink-mute); }
.ap-qty { display: none; align-items: center; justify-content: center; gap: .2rem; padding: 0 .5rem .55rem; }
.ap-tile.is-on .ap-qty { display: flex; }
.ap-qty button { font: inherit; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--ink); }
.ap-qty button:hover { border-color: var(--accent); color: var(--accent-ink); }
.ap-qty output { min-width: 1.6rem; text-align: center; font-weight: 700; font-size: .92rem; }

.ap-opts { display: grid; gap: 1.2rem; margin-top: .8rem; }
.ap-opt { display: grid; gap: .5rem; font-size: .93rem; font-weight: 600; }
.ap-opt input[type="time"] { font: inherit; font-weight: 600; font-size: 1.05rem; padding: .5rem .7rem; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: #fff; width: max-content; color: var(--ink); }
.ap-season { margin-top: .2rem; }

/* ---------- Resultado ---------- */
.ap-meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.ap-meters div { background: var(--bg-2); border-radius: var(--radius-sm); padding: .75rem .4rem; text-align: center; }
.ap-meters strong { display: block; font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
.ap-meters span { font-size: .72rem; color: var(--ink-mute); line-height: 1.2; display: block; margin-top: .2rem; }

.ap-reco { border-radius: 16px; padding: 1rem; background: linear-gradient(135deg, #3a2617, #5a3a22); color: #fff; display: grid; gap: .8rem; }
.ap-reco-label { font-size: .78rem; font-weight: 700; letter-spacing: .03em; color: #f3c48b; }
.ap-reco-body { display: flex; gap: .9rem; align-items: center; }
.ap-reco-body img { width: 84px; height: 84px; border-radius: 12px; object-fit: contain; background: #fff; flex-shrink: 0; }
.ap-reco-name { display: block; color: #fff; font-weight: 700; text-decoration: none; }
.ap-reco-name:hover { text-decoration: underline; }
.ap-reco-h { display: block; font-family: var(--display); font-size: 1.7rem; line-height: 1.15; color: #ffcf5c; }
.ap-reco-sub { display: block; font-size: .82rem; color: rgba(255,255,255,.78); }
.ap-reco-none { background: #fff4f2; color: var(--ink); border: 1px solid #f3c4bc; }
.ap-reco-none span { font-size: .88rem; color: var(--ink-soft); }

.ap-list-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; font-size: 1rem; margin: 1.4rem 0 .6rem; }
.ap-legend { font-size: .75rem; font-weight: 500; color: var(--ink-mute); display: inline-flex; align-items: center; gap: .35rem; }
.ap-legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; }
.ap-legend i.d { background: var(--ap-dia); border: 1px solid var(--line-2); } .ap-legend i.n { background: var(--ap-noche); margin-left: .4rem; } .ap-legend i.g { width: 2px; background: var(--ink); margin-left: .4rem; }
.ap-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.ap-row { display: grid; grid-template-columns: 48px 1fr auto; gap: .7rem; align-items: center; padding: .6rem; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.ap-row img { width: 48px; height: 48px; border-radius: 9px; object-fit: contain; background: #f2f5fb; }
.ap-row-main { min-width: 0; }
.ap-row-top { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.ap-row-name { font-size: .86rem; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-row-name:hover { text-decoration: underline; }
.ap-row-h { font-family: var(--display); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.ap-bar { position: relative; height: 12px; border-radius: 999px; margin: .35rem 0 .3rem; overflow: hidden; }
.ap-goal { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); opacity: .75; }
.ap-bar span { display: block; height: 100%; border-radius: 999px; background: var(--ap-fill); box-shadow: 0 0 10px rgba(255,176,32,.55); transition: width 1s var(--ease-out); }
.ap-row-sub { font-size: .74rem; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-row .btn { padding: .45rem .75rem; font-size: .78rem; }
.ap-row.is-short .ap-bar span { background: linear-gradient(90deg, #f0a43a, #f6c06d); box-shadow: none; }
.ap-row.is-short .ap-row-h { color: #a35c00; }
.ap-row.is-no { opacity: .62; }
.ap-row.is-no .ap-row-sub { color: var(--bad); white-space: normal; }
@media (max-width: 560px) {
  .ap-row { grid-template-columns: 40px 1fr; align-items: start; }
  .ap-row img { width: 40px; height: 40px; }
  .ap-row-top { flex-wrap: wrap; column-gap: .6rem; row-gap: 0; }
  .ap-row-name, .ap-row-sub { white-space: normal; }
  .ap-row .btn { grid-column: 2; justify-self: start; padding: .35rem .8rem; }
}

.ap-axis { position: relative; height: 2.4rem; margin: .5rem 0 0 calc(48px + 1.3rem); margin-right: 5.5rem; font-size: .7rem; color: var(--ink-mute); }
.ap-axis span { position: absolute; top: 0; transform: translateX(-50%); text-align: center; white-space: nowrap; line-height: 1.2; }
.ap-axis span:first-child { transform: none; }
.ap-axis small { display: block; font-size: .66rem; opacity: .8; }
@media (max-width: 560px) { .ap-axis { margin-left: calc(40px + 1.3rem); margin-right: .9rem; } }
.ap-empty { padding: 2rem 1rem; text-align: center; color: var(--ink-soft); background: #f4f7fd; border-radius: 12px; margin-top: 1rem; }

.ap-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.ap-share span { font-size: .85rem; color: var(--ink-soft); width: 100%; }
.ap-share .btn { padding: .5rem .95rem; font-size: .85rem; }
.ap-note { font-size: .76rem; color: var(--ink-mute); margin-top: .9rem; }

.ap-mini { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 40; max-width: calc(100vw - 32px); padding: .7rem 1.1rem; border-radius: 999px; background: #3a2617; color: #fff; font-size: .85rem; font-weight: 600; text-decoration: none; box-shadow: 0 10px 30px -8px rgba(16,24,43,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-mini[hidden] { display: none; }
@media (min-width: 960px) { .ap-mini { display: none !important; } }

/* ---------- Contenido ---------- */
.ap-article { padding: 1.6rem; }
@media (min-width: 720px) { .ap-article { padding: 2.4rem; } }
.ap-article h2 { margin-top: 2rem; }
.ap-article h2:first-child { margin-top: 0; }
.ap-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.ap-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
.ap-table th, .ap-table td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
.ap-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); }
.ap-table tbody tr:nth-child(odd) { background: var(--bg); }
.ap-figure { display: grid; gap: 1.5rem; align-items: center; margin: 2rem 0; }
@media (min-width: 960px) { .ap-figure { grid-template-columns: 1fr 1fr; } }
.ap-figure img { width: 100%; height: auto; border-radius: 16px; display: block; }
.ap-figure h2 { margin-top: 0; }
.ap-figure ol { padding-left: 1.2rem; display: grid; gap: .5rem; }
.ap-faq { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.ap-faq summary { font-weight: 600; cursor: pointer; }
.ap-faq p { margin-top: .6rem; color: var(--ink-soft); }
.ap-related-title { font-size: 1.4rem; margin-bottom: 1rem; }
.ap-related { display: grid; gap: .8rem; }
@media (min-width: 720px) { .ap-related { grid-template-columns: repeat(4, 1fr); } }
.ap-related a { padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); display: grid; gap: .25rem; transition: transform .2s var(--ease-out); }
.ap-related a:hover { transform: translateY(-3px); }
.ap-related strong { font-size: .95rem; }
.ap-related span { font-size: .8rem; color: var(--accent-ink); }

/* Bloque para enlazar las herramientas desde guías, categorías y portada */
.tool-cta { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: 1.1rem 1.3rem; margin: 1.5rem 0; border-radius: 16px; background: linear-gradient(135deg, #10182b, #1d2c52); color: #fff; text-decoration: none; }
.tool-cta-ico { font-size: 2rem; }
.tool-cta strong { display: block; color: #fff; }
.tool-cta span { font-size: .88rem; color: rgba(255,255,255,.8); }
.tool-cta:hover strong { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { .ap-bar span, .ap-tile, .ap-ico, .ap-related a { transition: none; } }


/* ---------- Lista para un gato nuevo ---------- */
.lg-grid { display: grid; gap: 1.5rem; }
.lg-grid > * { min-width: 0; }
@media (min-width: 960px) { .lg-grid { grid-template-columns: .8fr 1.2fr; align-items: start; } .lg-preguntas { position: sticky; top: 84px; } }
.lg-nota { font-size: .8rem; color: var(--ink-mute); margin-top: 1.2rem; }
.lg-acciones { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.lg-progreso { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin: -.2rem 0 1rem; }
.lg-progreso span { display: block; height: 100%; background: var(--ap-fill); border-radius: 99px; transition: width .5s var(--ease-out); }
.lg-etapa h3 { font-size: 1.05rem; margin: 1.4rem 0 .6rem; color: var(--accent-ink); }
.lg-etapa ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.lg-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .75rem .9rem; transition: background .2s, border-color .2s; }
.lg-item.is-hecho { background: #f3f5ee; border-color: rgba(107,125,90,.4); }
.lg-check { display: grid; grid-template-columns: auto auto 1fr auto; gap: .6rem; align-items: center; cursor: pointer; }
.lg-check input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent-2); margin: 0; }
.lg-ico { font-size: 1.3rem; }
.lg-nombre { font-weight: 600; }
.lg-item.is-hecho .lg-nombre { text-decoration: line-through; color: var(--ink-mute); }
.lg-coste { font-size: .82rem; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.lg-porque { font-size: .86rem; color: var(--ink-soft); margin: .35rem 0 0 calc(1.25rem + 1.3rem + 1.2rem); }
.lg-guia { font-weight: 600; white-space: nowrap; }
.lg-pick { display: grid; grid-template-columns: 48px 1fr auto; gap: .65rem; align-items: center; margin: .6rem 0 0 calc(1.25rem + 1.3rem + 1.2rem); padding: .5rem; background: var(--bg); border-radius: 10px; }
.lg-pick img { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 8px; }
.lg-pick a:not(.btn) { font-size: .84rem; font-weight: 600; color: var(--ink); }
.lg-pick small { display: block; font-size: .76rem; color: var(--ink-mute); }
.lg-pick .btn { padding: .4rem .75rem; font-size: .78rem; }
.lg-item.is-hecho .lg-pick { display: none; }
@media (max-width: 560px) {
  .lg-porque, .lg-pick { margin-left: 0; }
  .lg-pick { grid-template-columns: 40px 1fr; } .lg-pick img { width: 40px; height: 40px; } .lg-pick .btn { grid-column: 2; justify-self: start; }
}
@media print {
  .site-header, .site-footer, .ap-hero, .lg-preguntas, .ap-article, .ap-related, .ap-related-title, .cookie-banner, .lg-pick, .lg-guia, .ap-note, .skip-link { display: none !important; }
  .lg-grid { display: block; } .lg-lista { box-shadow: none; border: 0; }
  .lg-item { break-inside: avoid; }
}
