@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013, U+2014, U+2018-201D, U+2026, U+20AC;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013, U+2014, U+2018-201D, U+2026, U+20AC;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013, U+2014, U+2018-201D, U+2026, U+20AC;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013, U+2014, U+2018-201D, U+2026, U+20AC;
}

:root {
  --bg: #f3f0e8;
  --paper: #fffcf7;
  --ink: #142028;
  --muted: #3a4c55;
  --line: #d4ddd8;
  --teal: #0e4f4a;
  --teal-ink: #083f3b;
  --amber: #6d3a06;
  --amber-bg: #f8f1e0;
  --danger: #7d2a1f;
  --danger-bg: #f8ebe7;
  --ok: #0e4f4a;
  --ok-bg: #e5f3f0;
  --focus: #0b3f86;
  --font: Inter, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(800px 360px at 100% -10%, #e4eef0 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  padding-bottom: 5.5rem;
}

img, svg { max-width: 100%; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.75rem; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.03em; }
h2 { font-size: 1.25rem; margin-top: 1.5rem; }

p { margin: 0 0 1rem; }

a { color: var(--teal-ink); }
a:hover { color: #062e2b; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  z-index: 30;
}
.skip:focus { top: 0.5rem; }

.wrap {
  width: min(52rem, calc(100% - 1.5rem));
  margin-inline: auto;
}

.banner {
  background: #142028;
  color: #f6f3ec;
}
.banner p { margin: 0; padding: 0.7rem 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 252, 247, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
  padding: 0.5rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}
.logo { width: 2rem; height: 2rem; }
.brand-frio { color: var(--teal); }

.nav-button,
button,
.btn {
  font: inherit;
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid var(--teal);
  background: var(--teal);
  color: #fff;
  padding: 0.45rem 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-button,
#modo-toggle,
#salir {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
button:disabled {
  background: #e7e2d8;
  color: #5c5348;
  border-color: #c9c2b6;
  cursor: not-allowed;
}

.nav {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}
.nav.is-open {
  display: flex;
  padding-bottom: 0.4rem;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav a[aria-current="page"] { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 0.2rem; }

html:not(.js) .nav { display: flex; }
html:not(.js) .nav-button { display: none; }

.cuenta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
#quien { color: var(--muted); font-size: 0.95rem; }
.sin-sesion .solo-sesion { display: none; }

main { padding: 1.25rem 0 2rem; }

.lead { font-size: 1.05rem; }

.notice, .fine { color: var(--muted); }
.fine { font-size: 0.95rem; }

label { display: block; font-weight: 600; margin: 0.8rem 0 0.3rem; }
.check, .choice { font-weight: 500; display: flex; gap: 0.6rem; align-items: flex-start; }
.check input, .choice input { margin-top: 0.35rem; width: 1.15rem; height: 1.15rem; flex: none; }

input, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b7c4be;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  min-height: 44px;
}
textarea { min-height: 6rem; }

form button, .actions { margin-top: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.status { min-height: 1.4em; color: var(--ink); }

.point-list, .stack { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.7rem; }
.point-link, .card {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: var(--ink);
}
.card { display: block; }
.point-link span:first-child { font-weight: 700; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  background: var(--ok-bg);
  color: var(--ok);
}
.pill.alarma { background: var(--danger-bg); color: var(--danger); }
.pill.mudo { background: var(--amber-bg); color: var(--amber); }

.chart { width: 100%; min-height: 220px; margin: 0.5rem 0 1rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font); }

table { width: 100%; border-collapse: collapse; background: var(--paper); margin-bottom: 1rem; }
th, td { text-align: left; padding: 0.45rem 0.55rem; border-bottom: 1px solid var(--line); }
caption { text-align: left; font-weight: 700; padding: 0.4rem 0; }

.steps { display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0; margin: 0 0 1rem; list-style: none; }
.steps li { padding: 0.25rem 0.5rem; border-radius: 999px; background: #e7e2d8; color: var(--muted); font-size: 0.92rem; }
.steps li[aria-current="step"] { background: var(--teal); color: #fff; }

.code {
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  background: var(--paper);
  border: 1px dashed var(--teal);
  border-radius: 12px;
  padding: 0.8rem;
  overflow-wrap: anywhere;
}

#alta-ejemplo {
  overflow-wrap: anywhere;
}

.facts { margin: 0 0 1rem; }
.facts div { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0.15rem 0 0; }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: var(--paper);
  border-top: 1px solid var(--line);
  z-index: 12;
}
.tabbar a {
  flex: 1;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.2rem;
}
.tabbar a[aria-current="page"] { color: var(--teal-ink); box-shadow: inset 0 -3px 0 var(--teal); }

@media (min-width: 62rem) {
  body { padding-bottom: 0; }
  .nav-button { display: none; }
  .nav, html:not(.js) .nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: 0.9rem;
  }
  .tabbar { display: none; }
  .header-inner { flex-wrap: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
