:root {
  --navy: #082a3c;
  --navy-2: #113f50;
  --teal: #1d786f;
  --teal-soft: #d9efea;
  --pond: #eaf6f1;
  --amber: #d98b2b;
  --coral: #ed4a4f;
  --cream: #fffaf0;
  --ink: #1f2f35;
  --muted: #607078;
  --line: #cbdad7;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(8, 42, 60, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fbf9 0, #eef6f3 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.hero {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #173e43 url("assets/iguales-y-diferentes-salto-al-estanque.png") center 49% / cover no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 25, 38, .82), rgba(4, 25, 38, .28) 60%, rgba(4, 25, 38, .08));
}

.hero__content {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  color: white;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.hero h1 {
  max-width: 720px;
  margin: 6px 0 8px;
  font-size: clamp(2.7rem, 7vw, 5.5rem);
  line-height: .95;
  letter-spacing: -.045em;
}

.hero__content > p:last-child {
  max-width: 650px;
  margin: 18px 0 0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.5;
}

.eyebrow {
  margin: 0;
  color: #ffe7a7;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px max(20px, calc((100vw - 1180px) / 2));
  color: white;
  background: rgba(8, 42, 60, .97);
  box-shadow: 0 8px 22px rgba(8, 42, 60, .15);
}

.brand { text-decoration: none; font-weight: 800; }
.topbar__actions { display: flex; align-items: center; gap: 14px; }
.nav-link { text-decoration: none; opacity: .9; }
.brand[aria-disabled="true"], .nav-link[aria-disabled="true"] { pointer-events: none; cursor: default; }
.local-badge {
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  font-size: .78rem;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 34px auto 70px;
}

.page-heading { margin: 0 0 24px; }
.page-heading h2 { margin: 0 0 8px; color: var(--navy); font-size: clamp(1.8rem, 4vw, 3rem); }
.page-heading p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.6; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 18px; }

.card {
  padding: 24px;
  border: 1px solid rgba(29, 120, 111, .16);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.card h3 { margin: 0 0 8px; color: var(--navy); }
.card p { color: var(--muted); line-height: 1.55; }
.card--pond { background: linear-gradient(145deg, #f9fffc, #e5f5ef); }

.form-grid { display: grid; gap: 15px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 7px; color: var(--navy); font-size: .9rem; font-weight: 750; }

input, select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #b9cbc7;
  border-radius: 12px;
  color: var(--ink);
  background: white;
  outline: none;
}

input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(29,120,111,.12); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
}

.btn--primary { color: white; background: var(--teal); }
.btn--primary:hover { background: #17675f; }
.btn--secondary { color: var(--navy); background: var(--teal-soft); }
.btn--ghost { color: var(--navy); border: 1px solid var(--line); background: white; }
.btn--danger { color: #8c2227; background: #ffe8e9; }
.btn:disabled { cursor: not-allowed; opacity: .45; }

.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.helper { margin: 7px 0 0; color: var(--muted); font-size: .84rem; }
.notice {
  padding: 13px 15px;
  border-left: 4px solid var(--amber);
  border-radius: 10px;
  color: #5c461d;
  background: #fff3d9;
  line-height: 1.5;
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 26px; }
.stat { padding: 16px; border-radius: 18px; background: white; border: 1px solid var(--line); }
.stat strong { display: block; color: var(--navy); font-size: 1.8rem; }
.stat span { color: var(--muted); font-size: .84rem; }

.room-card { position: relative; }
.room-card__status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #6c5b25;
  background: #fff3c8;
  font-size: .75rem;
  font-weight: 800;
}
.room-card__status.complete { color: #165d50; background: #daf2e9; }
.room-card ul { min-height: 55px; padding-left: 18px; color: var(--muted); }

.section-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 36px 0 15px; }
.section-title h3 { margin: 0; color: var(--navy); font-size: 1.5rem; }
.section-title p { margin: 3px 0 0; color: var(--muted); }

.venn-scroll { overflow-x: auto; padding: 4px 2px 18px; }
.venn {
  position: relative;
  min-width: 760px;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid rgba(29,120,111,.2);
  border-radius: 28px;
  background: radial-gradient(circle at 50% 48%, rgba(255,255,255,.92), rgba(228,244,238,.85));
  box-shadow: var(--shadow);
}

.venn::before, .venn::after {
  content: "";
  position: absolute;
  top: 55px;
  width: 49%;
  height: 355px;
  border: 4px solid rgba(29, 120, 111, .64);
  border-radius: 50%;
  background: rgba(110, 195, 174, .13);
}
.venn::before { left: 10%; }
.venn::after { right: 10%; border-color: rgba(217, 139, 43, .68); background: rgba(255, 196, 112, .12); }

.venn__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr .9fr 1fr;
  gap: 12px;
  min-height: 470px;
  padding: 32px 8% 28px;
}

.venn__zone { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.venn__zone h4 { margin: 0 0 4px; color: var(--navy); text-align: center; font-size: 1.05rem; }
.venn__zone small { min-height: 22px; color: var(--muted); text-align: center; }
.venn__notes { display: flex; flex: 1; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px; padding: 28px 4px; }
.note {
  position: relative;
  max-width: 180px;
  padding: 9px 27px 9px 11px;
  border: 1px solid rgba(8,42,60,.14);
  border-radius: 12px;
  color: var(--navy);
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 14px rgba(8,42,60,.1);
  font-size: .82rem;
  line-height: 1.3;
}
.note--summary { padding-right: 11px; }
.note button { position: absolute; top: 3px; right: 4px; width: 22px; height: 22px; border: 0; color: #7b393c; background: transparent; font-weight: 900; }
.empty-note { align-self: center; color: #7a8a8b; font-size: .82rem; text-align: center; }

.entry-panel { margin-top: 20px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segment { position: relative; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span { display: block; padding: 10px 7px; border: 1px solid var(--line); border-radius: 10px; text-align: center; background: white; }
.segment input:checked + span { color: white; border-color: var(--teal); background: var(--teal); }

.completion {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--pond);
  font-weight: 700;
}
.completion input { width: auto; accent-color: var(--teal); }

.room-link { word-break: break-all; color: var(--teal); font-size: .82rem; }
.theme-list { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-chip { padding: 7px 10px; border-radius: 999px; color: var(--navy); background: var(--teal-soft); font-size: .82rem; }

.readonly-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 14px 17px;
  border: 1px solid rgba(29,120,111,.22);
  border-radius: 16px;
  color: var(--navy);
  background: var(--teal-soft);
}
.readonly-banner strong { display: block; }
.readonly-banner span { color: var(--muted); font-size: .86rem; }

footer { padding: 28px 20px; color: #d8e8e5; text-align: center; background: var(--navy); }
footer p { margin: 0; font-size: .86rem; }

@media (max-width: 760px) {
  .hero { min-height: 285px; background-position: 53% 50%; }
  .hero__overlay { background: linear-gradient(90deg, rgba(4,25,38,.84), rgba(4,25,38,.35)); }
  .topbar { align-items: flex-start; }
  .local-badge { display: none; }
  .grid-2, .form-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .shell { width: min(100% - 22px, 1180px); margin-top: 24px; }
  .card { padding: 19px; border-radius: 19px; }
  .section-title { align-items: start; flex-direction: column; }
}
