*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--coin);
  outline-offset: 2px;
}

/* Encabezado */
.top {
  background: var(--ink);
  color: var(--bone);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.02em;
  text-decoration: none;
  min-width: 0;
  min-height: 44px;
}
.brand-name { overflow-wrap: anywhere; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-left: auto; }
.top nav a, .linklike {
  color: var(--bone);
  background: none;
  border: 0;
  font: inherit;
  padding: 10px 4px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.top form { margin: 0; }

main { width: 100%; max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: clamp(26px, 6vw, 34px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.02em; overflow-wrap: anywhere; }
h2 { font-size: 20px; margin: 24px 0 8px; }
.lead { color: var(--text-2); margin: 0 0 16px; }

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 0 var(--line);
}
.card.narrow { max-width: 460px; margin: 0 auto; }

/* Formularios */
.field { margin-bottom: 16px; min-width: 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid #9aa89f;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.field.has-error input, .field.has-error select { border-color: var(--coral); }
.hint { margin: 6px 0 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.error { margin: 6px 0 0; color: var(--coral); font-size: 14px; font-weight: 600; }
.alert {
  background: #fbe4dc;
  color: #7d2410;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-weight: 600;
}
.notice {
  background: #fff4cc;
  color: #5c4300;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--coin);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.alt { margin: 16px 0 0; text-align: center; color: var(--text-2); }
.alt a { display: inline-block; padding: 12px 6px; min-height: 44px; }

/* Inicio */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.stat { background: var(--paper); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 0 var(--line); }
.stat b { display: block; font-size: 28px; line-height: 1.1; }
.stat span { color: var(--text-2); font-size: 14px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li {
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.muted { color: var(--text-2); font-size: 14px; }
.link-box {
  background: var(--ink);
  color: var(--bone);
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 16px;
}
.link-box .hint { color: var(--mist); }
.link-box code { display: block; overflow-wrap: anywhere; word-break: break-all; font-size: 14px; margin-top: 6px; user-select: all; }

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .btn { width: auto; }
  .card.narrow .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
