/* Estilo Perk: lima eléctrico sobre papel crema.
   Lienzo blanco, tarjetas crema de 28 px, un único color de acción (lima), sin sombras ni degradados,
   solo pesos 400 y 500, y titulares con tracking negativo. */
:root {
  --lime: #beff50; --ink: #14140f; --parchment: #f5f5eb; --white: #ffffff;
  --ash: #d2d2c8; --graphite: #6e6e64; --charcoal: #30302a; --stone: #919183;
  --font: "OTSono", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-card: 28px; --r-inner: 18px; --r-input: 8px; --r-pill: 9999px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font); font-size: 16px; font-weight: 400; line-height: 1.5;
  padding-block: max(28px, env(safe-area-inset-top, 0px)) calc(48px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 960px; margin: 0 auto; display: grid; gap: 20px; }

/* Tipografía */
h1, h2, h3 { font-weight: 500; margin: 0; }
h1 { font-size: clamp(46px, 11.5vw, 90px); line-height: 0.92; letter-spacing: -0.03em; text-wrap: balance; }
h2 { font-size: 28px; line-height: 1.14; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
.lead { font-size: 20px; line-height: 1.3; color: var(--graphite); margin: 0; max-width: 52ch; }
.hint { color: var(--graphite); font-size: 14px; line-height: 1.43; margin: 0; }
.eyebrow, .pill { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.eyebrow { color: var(--graphite); display: block; margin-bottom: 4px; }
.title { min-width: 0; }

/* Cabecera */
header { display: grid; gap: 24px; padding-block: 24px 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%;
  background: var(--parchment); border-radius: var(--r-pill); padding: 8px 16px;
}
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); border: 1px solid var(--ink); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.run-note { margin: 0; color: var(--graphite); font-size: 14px; min-height: 1.5em; overflow-wrap: anywhere; }

/* Botones: el lima es el único relleno de acción */
button {
  font: inherit; font-size: 16px; font-weight: 500; line-height: 1; cursor: pointer;
  border-radius: var(--r-card); padding: 16px 24px; border: 1px solid var(--lime);
  background: var(--lime); color: var(--ink);
}
button:hover:not(:disabled) { background: #b0f23c; border-color: #b0f23c; }
button.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
button.ghost:hover:not(:disabled) { background: var(--ash); border-color: var(--ink); }
button.small { font-size: 14px; padding: 10px 18px; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Superficies: blanco → crema → lima → oscuro */
section { background: var(--parchment); border-radius: var(--r-card); padding: 40px; display: grid; gap: 16px; min-width: 0; }
section.feature { background: var(--lime); }
section.feature .hint, section.feature .meta { color: var(--ink); }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row.narrow { max-width: 420px; }
.stack { display: grid; gap: 14px; }
.stack.narrow { max-width: 420px; }
.stack input { width: 100%; }
.stack button { justify-self: start; }

/* Formularios */
input[type="text"], input[type="url"], input[type="password"], select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
  border: 1px solid var(--ash); border-radius: var(--r-input); padding: 13px 14px; min-width: 0; flex: 1 1 170px;
}
input::placeholder { color: var(--stone); }
input[type="text"]:focus, input[type="password"]:focus, select:focus { border-color: var(--ink); }
label.f { display: grid; gap: 6px; font-size: 14px; color: var(--graphite); }
label.f select, label.f input { color: var(--ink); }
label.check { display: flex; gap: 12px; align-items: center; font-size: 16px; flex-wrap: wrap; }
label.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.channels { display: grid; gap: 12px; }
.badge { font-size: 13px; color: var(--graphite); }
.badge.ok { color: var(--ink); }
.badge.ok::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--lime); border: 1px solid var(--ink); }
.saved { margin: 0; font-size: 13px; color: var(--graphite); min-height: 1.4em; }

/* Palabras clave */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; background: var(--white); border-radius: var(--r-pill); padding: 2px 4px 2px 8px; font-size: 15px; border: 1px solid var(--white); }
.chip.off { background: transparent; border: 1px dashed var(--stone); color: var(--graphite); }
.chip.off .t { text-decoration: line-through; }
.chip button { background: none; border: 0; color: inherit; padding: 8px 8px; font-size: 15px; font-weight: 400; border-radius: var(--r-pill); }
.chip button:hover:not(:disabled) { background: var(--parchment); }
.chip button.x { color: var(--graphite); font-size: 18px; padding: 4px 10px; }
.chip button.x:hover { color: var(--ink); }

/* Listas (webs, usuarios) */
.list { display: grid; }
.site, .person { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 16px 0; border-top: 1px solid var(--ash); min-width: 0; }
.site:first-child, .person:first-child { border-top: 0; padding-top: 0; }
.site .name, .person .name { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.site.off .name { color: var(--graphite); text-decoration: line-through; }
.site .url { grid-column: 1; font-size: 13px; color: var(--graphite); overflow-wrap: anywhere; }
.site .acts, .person .acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.person .when { grid-column: 1; font-size: 13px; color: var(--graphite); }
.person .pw { grid-column: 1 / -1; margin-top: 8px; }
.empty { color: var(--graphite); background: var(--white); border-radius: var(--r-inner); padding: 18px 20px; margin: 0; font-size: 15px; }

/* Gasolineras */
.stations { display: grid; gap: 12px; }
#fuel-results { gap: 12px; }
.station { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: start; background: var(--white); border-radius: var(--r-inner); padding: 20px; min-width: 0; }
.station .who { min-width: 0; }
.station .name { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.station .url { font-size: 13px; color: var(--graphite); overflow-wrap: anywhere; }
.station .prices { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: stretch; }
.price { display: grid; gap: 2px; align-content: start; background: var(--parchment); border-radius: 14px; padding: 12px 16px; min-width: 150px; flex: 1 1 150px; }
.price .k { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--graphite); }
.price .v { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.delta { width: fit-content; font-size: 12px; font-weight: 500; border-radius: var(--r-pill); padding: 3px 10px; margin-top: 4px; }
.delta.up { background: var(--ink); color: var(--lime); }
.delta.down { background: var(--lime); color: var(--ink); border: 1px solid var(--ink); }

/* Resumen */
.meta { font-size: 13px; color: var(--graphite); margin-bottom: 12px; }
.digest { background: var(--white); border-radius: var(--r-inner); padding: 24px; display: grid; gap: 22px; max-height: 75vh; overflow-y: auto; }
.digest h3 { font-size: 20px; }
.digest ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.digest li { font-size: 15px; line-height: 1.4; color: var(--graphite); }
.digest a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); overflow-wrap: anywhere; }
.digest a:hover { background: var(--lime); }
.digest .src { color: var(--stone); font-size: 13px; }
.digest .warn { color: var(--graphite); font-size: 14px; margin: 6px 0 0; }

/* Avisos y ayudas */
.err { background: var(--parchment); border-left: 4px solid var(--ink); border-radius: 0 var(--r-input) var(--r-input) 0; padding: 14px 18px; margin: 0; font-size: 14px; overflow-wrap: anywhere; }
details { background: var(--white); border-radius: var(--r-inner); padding: 16px 20px; }
summary { cursor: pointer; font-size: 16px; font-weight: 500; }
details[open] summary { margin-bottom: 12px; }
ol.steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; color: var(--graphite); font-size: 15px; overflow-wrap: anywhere; }
ol.steps b { color: var(--ink); font-weight: 500; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.two > div { background: var(--white); border-radius: var(--r-inner); padding: 22px; display: grid; gap: 6px; align-content: start; min-width: 0; }

/* Pie: la única isla oscura */
.foot { background: var(--ink); color: var(--parchment); border-radius: var(--r-card); padding: 40px; display: grid; gap: 10px; }
.foot .eyebrow { color: var(--ash); margin: 0; }
.foot p { margin: 0; font-size: 14px; color: var(--parchment); max-width: 60ch; }

@media (max-width: 560px) {
  section { padding: 24px; }
  .foot { padding: 28px 24px; }
  h2 { font-size: 26px; }
  .lead { font-size: 18px; }
  .station { padding: 16px; }
}
@media (prefers-reduced-motion: no-preference) { button { transition: background .15s, border-color .15s, opacity .15s; } }
