/* Estilos que comparten todas las páginas de TODOEN1: colores, fuentes,
   campos, botones, preguntas frecuentes y pie. */
/* Colores: carbón y brasa. El ticket del resultado es siempre papel con tinta,
   en los dos temas. Para cambiar la paleta alcanza con tocar estos bloques. */
:root {
  --bg: #16120e;
  --line: rgba(243, 236, 226, 0.16);
  --campo: #261e16;
  --borde-campo: rgba(243, 236, 226, 0.34);
  --fg: #f3ece2;
  --muted: #b9ab9b;
  --accent: #f0a23a;
  --accent-fg: #1d1408;
  --danger: #ff8f80;
  --papel: #f6efdf;
  --tinta: #2a2018;
  --tinta-suave: #6b5d4f;
  --sello: #b3361e;
  --sombra-ticket: rgba(0, 0, 0, 0.45);
  --f-display: 'Outfit', 'Avenir Next', 'Segoe UI', sans-serif;
  --f-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --f-ticket: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
  caret-color: var(--accent);
  accent-color: var(--accent);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ebe3d5;
    --line: rgba(35, 26, 18, 0.2);
    --campo: #fbf7ee;
    --borde-campo: rgba(35, 26, 18, 0.38);
    --fg: #231a12;
    --muted: #665749;
    --accent: #a04a12;
    --accent-fg: #ffffff;
    --danger: #b3261e;
    --papel: #fcf8ee;
    --sombra-ticket: rgba(60, 40, 20, 0.28);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--accent) transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
::selection { background: var(--accent); color: var(--accent-fg); }
main { max-width: 560px; margin: 0 auto; padding: clamp(28px, 8vw, 64px) 16px 0; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
input, select, button { font: inherit; color: inherit; }
button:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- portada ---------- */
h1 { font-size: clamp(2.5rem, 11.5vw, 4.2rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
/* la segunda línea del título va cambiando: las frases están apiladas en un
   hueco que tapa lo que sobra; la que toca sube desde abajo y la anterior se
   va por arriba */
.rw { display: block; position: relative; height: 1.2em; overflow: hidden; color: var(--accent); }
.rw span { position: absolute; left: 0; top: 0; line-height: 1.2; white-space: nowrap; transform: translateY(110%); }
.rw .is-on { transform: none; transition: transform 0.6s cubic-bezier(0.6, 0, 0.2, 1); }
.rw .is-out { transform: translateY(-110%); transition: transform 0.6s cubic-bezier(0.6, 0, 0.2, 1); }
.subtitulo { margin-top: 14px; color: var(--muted); font-size: 1.1rem; max-width: 26rem; }

/* ---------- secciones ---------- */
.bloque { margin-top: clamp(40px, 10vw, 56px); }
.bloque h2 { font-size: 1.6rem; font-weight: 600; }
.pista { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
ul.lista { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

/* los campos donde se escribe: caja clara, bien distinta del fondo */
input[type="text"] {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 10px 14px;
  background: var(--campo);
  border: 1.5px solid var(--borde-campo);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
input[type="text"][aria-invalid="true"] { border-color: var(--danger); }
input::placeholder { color: var(--muted); opacity: 0.8; }
.fila { display: flex; align-items: center; gap: 10px; }

/* ---------- botones pastilla ---------- */
.pill {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: transparent;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
select.pill {
  appearance: none;
  -webkit-appearance: none;
  max-width: 10.5em;
  padding-right: 30px;
  text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
/* los botones se "llenan" de izquierda a derecha al pasar el mouse */
button.pill {
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent) 24%, transparent));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.28s ease-out, border-color 0.22s, transform 0.22s;
}
button.pill:active { transform: scale(0.97); }
button.pill[aria-expanded="true"], button.pill.parcial { border-color: var(--accent); color: var(--accent); }
@media (hover: hover) {
  button.pill:hover { background-size: 100% 100%; border-color: var(--accent); transform: translateY(-2px); }
}
.agregar { margin-top: 14px; font-weight: 600; }

/* ---------- contenido ---------- */
.contenido p { color: var(--muted); margin-top: 10px; }
.contenido ul { color: var(--muted); margin: 10px 0 0; padding-left: 20px; }
.faq { margin-top: 14px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  transition: color 0.25s, padding 0.25s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem var(--f-display); line-height: 1; transition: transform 0.25s, color 0.25s; }
.faq h3 { font-size: 1.12rem; font-weight: 600; }
.faq details[open] summary { color: var(--fg); padding-left: 10px; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { margin: 0 0 18px; padding-left: 10px; }

.pie { margin-top: clamp(64px, 16vw, 110px); padding: 0 16px 40px; text-align: center; }
.refran {
  font: 700 clamp(2.1rem, 10vw, 4rem) / 1 var(--f-display);
  letter-spacing: -0.03em;
  color: color-mix(in srgb, var(--fg) 20%, transparent);
  text-wrap: balance;
}

/* ---------- nombre del sitio y navegación ---------- */
.marca { display: inline-block; font: 700 1.05rem var(--f-display); letter-spacing: 0.06em; color: var(--fg); text-decoration: none; margin-bottom: clamp(24px, 7vw, 44px); }
.marca span { color: var(--accent); }
.pie nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; font-size: 0.92rem; }
.pie a { color: var(--muted); text-underline-offset: 4px; }
.pie a:hover { color: var(--accent); }

/* texto solo para lectores de pantalla */
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- lista de enlaces a otras herramientas ("Seguí con") ---------- */
.herramientas { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.herramientas li { border-bottom: 1px solid var(--line); }
.herramientas a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; color: inherit; text-decoration: none; transition: padding 0.25s; }
.herramientas strong { display: block; font: 600 1.4rem var(--f-display); }
.herramientas span { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 2px; }
.herramientas a::after { content: "→"; font: 400 1.5rem var(--f-display); color: var(--muted); transition: transform 0.25s, color 0.25s; }
.herramientas a:hover, .herramientas a:focus-visible { padding-left: 10px; }
.herramientas a:hover::after, .herramientas a:focus-visible::after { color: var(--accent); transform: translateX(4px); }
.herramientas a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- páginas de texto (privacidad) y página no encontrada ---------- */
.texto h2 { font-size: 1.25rem; }
.texto .bloque { margin-top: 32px; }
.texto a { color: var(--accent); text-underline-offset: 4px; }
.fecha { color: var(--muted); font-size: 0.92rem; margin-top: 10px; }
.volver { display: inline-flex; align-items: center; margin-top: 28px; text-decoration: none; color: var(--fg); font-weight: 600; }

/* ---------- opciones para elegir (una o varias) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips[hidden] { display: none; }
.chip {
  min-height: 46px;
  padding: 0 18px;
  border: 1.5px solid var(--borde-campo);
  border-radius: 999px;
  background: var(--campo);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: transparent; }
@media (hover: hover) { .chip:hover { border-color: var(--accent); } }

/* ---------- cantidad: menos, número, más ---------- */
.cantidades { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.cantidades li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; background: var(--campo); border: 1.5px solid var(--borde-campo); border-radius: 16px; }
.cantidades strong { display: block; font-weight: 600; }
.cantidades small { display: block; color: var(--muted); font-size: 0.85rem; }
.cant { display: flex; align-items: center; gap: 4px; }
.cant button { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--borde-campo); background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; transition: border-color 0.2s, transform 0.2s; }
.cant button:active { transform: scale(0.92); }
.cant button:disabled { opacity: 0.3; cursor: default; }
@media (hover: hover) { .cant button:hover:not(:disabled) { border-color: var(--accent); } }
.cant output { min-width: 2.4ch; text-align: center; font: 700 1.5rem var(--f-display); font-variant-numeric: tabular-nums; }

