:root {
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e4e2dc;
  --paper: #fbfaf6;
  --card: #fff;
  --accent: #1a5fb4;
  --accent-ink: #0b3d7a;
  --flash: #fff4d6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.wordmark {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-size: 1.15rem;
}
.top nav { display: flex; gap: 1rem; align-items: center; font-size: 0.95rem; }
.inline { display: inline; margin: 0; }
.inline button {
  background: none; border: 0; color: var(--accent); cursor: pointer;
  font: inherit; padding: 0;
}

.hero {
  max-width: 42rem;
  margin: 4.5rem auto 3rem;
  padding: 0 1.2rem;
  text-align: center;
  flex: 1;
}
.brand {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: -0.045em;
  margin: 0 0 0.4rem;
  font-weight: 700;
}
.tag { color: var(--muted); margin: 0 0 1.8rem; }
.search {
  display: flex;
  border: 1px solid #d8d6cf;
  border-radius: 1.6rem;
  background: #fff;
  box-shadow: 0 1px 6px rgba(32,33,36,0.12);
  overflow: hidden;
}
.search:focus-within { box-shadow: 0 1px 8px rgba(32,33,36,0.2); }
.search input {
  flex: 1; border: 0; padding: 0.95rem 1.2rem; font-size: 1.15rem;
  outline: none; background: transparent;
}
.search button,
.search button[type="submit"] {
  border: 0;
  background: transparent;
  color: var(--accent-ink);
  padding: 0 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  border-radius: 0;
}
.hint { color: var(--muted); font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; margin: 1.2rem 0; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.75rem;
  color: var(--ink); background: #fff; font-size: 0.92rem;
}
.chip.on, .chip:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
.sorts { justify-content: flex-start; margin: 0.4rem 0 1rem; }
.sorts .chip.on { background: #e8f0fe; font-weight: 600; }

.page {
  max-width: 46rem;
  margin: 1.5rem auto 3rem;
  padding: 0 1.2rem;
  flex: 1;
}
.page.narrow { max-width: 32rem; }
.lede { font-size: 1.08rem; }
.crumbs { font-size: 0.9rem; color: var(--muted); }
h1 { letter-spacing: -0.03em; line-height: 1.2; }
h2 { font-size: 1.15rem; margin-top: 2rem; }

.rank { list-style: none; padding: 0; margin: 1.5rem 0; }
.rank li {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 0.8rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.pos { font-weight: 700; color: var(--muted); }
.score { letter-spacing: 0.08em; color: #c27a00; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0.15rem 0 0; }
.plain { list-style: none; padding: 0; }
.plain li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.country-grid { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; justify-content: center; }
.results { text-align: left; margin-top: 2rem; }
.results ul { list-style: none; padding: 0; }
.results li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }

.compose, .comment {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
label { display: block; font-weight: 600; margin: 0.8rem 0 0.3rem; }
textarea, select {
  width: 100%; font: inherit; padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: 0.4rem;
}
button[type="submit"], .btn {
  display: inline-block;
  margin-top: 0.9rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 0.4rem;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn.google { background: #1a73e8; }
.btn.apple { background: #111; }
.auth-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.check { font-weight: 400; display: flex; gap: 0.5rem; align-items: flex-start; }

.comment header { display: flex; gap: 0.7rem; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
.comment p { white-space: pre-wrap; margin: 0.5rem 0 0; }
.pager { display: flex; gap: 1rem; margin: 1rem 0; }
.scoreline { font-size: 1.1rem; }
.flash { background: var(--flash); margin: 0; padding: 0.6rem 1.2rem; text-align: center; }
.prose p { max-width: 40rem; }
.prose img, .post-body img { max-width: 100%; height: auto; }
.post-body { overflow-wrap: anywhere; }
.post-body iframe { max-width: 100%; }
.yt-embed {
  position: relative;
  width: 100%;
  max-width: 40rem;
  aspect-ratio: 16 / 9;
  margin: 1rem 0;
  background: #111;
  border-radius: 0.4rem;
  overflow: hidden;
}
.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-embed {
  position: relative;
  width: 100%;
  max-width: 40rem;
  aspect-ratio: 4 / 3;
  margin: 1rem 0;
  background: #e8e6e1;
  border-radius: 0.4rem;
  overflow: hidden;
}
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.page input[type="text"], .page input[type="password"] {
  width: 100%; font: inherit; padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: 0.4rem;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.suggest {
  text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 0.6rem; margin-top: 0.4rem; box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.suggest a { display: block; padding: 0.55rem 0.9rem; color: var(--ink); }
.suggest a:hover { background: #f3f2ee; text-decoration: none; }

.foot {
  margin-top: auto;
  padding: 1.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}
.foot p { margin: 0.3rem 0; }

.page.wide { max-width: 58rem; }
.page input[type="number"] {
  width: 100%; font: inherit; padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: 0.4rem;
}
.pf-sim h2 { margin-top: 0; }
.pf-sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1rem;
}
.pf-sim-out { margin: 0.8rem 0 0; }
.pf-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.pf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #fff;
}
.pf-table th, .pf-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.pf-table th:first-child, .pf-table td:first-child { white-space: normal; min-width: 12rem; }
.pf-table th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.pf-bank { display: flex; gap: 0.55rem; align-items: flex-start; }
.pf-bank img {
  width: 28px; height: 28px; border-radius: 0.3rem; object-fit: contain;
  background: #f3f2ee; flex-shrink: 0;
}
.pf-cell { display: flex; flex-direction: column; gap: 0.1rem; }
.pf-cell .meta { margin: 0; font-size: 0.78rem; }
.pf-links { margin-top: 0.25rem; }
.plazos .chips { justify-content: flex-start; }
@media (max-width: 40rem) {
  .pf-sim-grid { grid-template-columns: 1fr; }
}
