:root {
  --honey: #f5c518;
  --honey-deep: #d9960f;
  --dark: #2b2620;
  --cream: #fffaf0;
  --muted: #6b6355;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--dark);
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--cream);
  border-bottom: 1px solid rgba(43, 38, 32, 0.08);
}
nav .wordmark {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--dark);
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
nav a {
  text-decoration: none;
  color: var(--dark);
  font-size: 0.95rem;
}
nav a:hover { color: var(--honey-deep); }

.banner {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.12) 0px,
      rgba(255, 255, 255, 0.12) 2px,
      transparent 2px,
      transparent 18px
    ),
    linear-gradient(135deg, var(--honey) 0%, var(--honey-deep) 100%);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(43, 38, 32, 0.12);
}
img.bee {
  width: 140px;
  height: 140px;
}
.banner h1 {
  margin: 0.5rem 0 0;
  font-size: 2.5rem;
  letter-spacing: 0.02em;
  color: var(--dark);
}
.banner p.tagline {
  margin: 0.5rem 0 1.5rem;
  color: #4a4237;
  font-size: 1.1rem;
}
.btn {
  display: inline-block;
  background: var(--dark);
  color: var(--cream);
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.85; }

section {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
section h2 {
  font-size: 1.8rem;
  margin: 0 0 1.25rem;
}

.about {
  text-align: center;
}
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--honey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}
.about p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
  text-align: left;
}
.about ul {
  text-align: left;
  color: var(--muted);
  line-height: 1.8;
}

.contact {
  text-align: center;
  background: #fff6dd;
  border-radius: 16px;
  max-width: 700px;
}
.contact p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  nav ul { gap: 1rem; }
  .banner h1 { font-size: 2rem; }
}

nav a.active { color: var(--honey-deep); font-weight: 600; }

/* Homework page */
.page-header {
  padding: 2.5rem 1.5rem 2rem;
}
.page-header h1 {
  margin: 0;
  font-size: 2.2rem;
}
.page-header p {
  margin: 0.5rem 0 0;
  color: #4a4237;
  font-size: 1.05rem;
}
.homework { padding-top: 3rem; }
.homework .intro {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
  margin: 0 0 2rem;
}
.assignment {
  background: #fff;
  border: 1px solid rgba(43, 38, 32, 0.08);
  border-left: 5px solid var(--honey);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 4px rgba(43, 38, 32, 0.05);
}
.assignment .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.assignment .due {
  background: #fff6dd;
  color: var(--honey-deep);
  font-weight: 600;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
}
.assignment h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}
.assignment p,
.assignment li {
  color: var(--muted);
  line-height: 1.7;
}
.assignment ul,
.assignment ol { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.tips {
  background: #fff6dd;
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 2.5rem;
}
.tips h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.tips ul { margin: 0; padding-left: 1.25rem; color: var(--muted); line-height: 1.8; }

/* Input area */
.lock { text-align: center; }
.code-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0 1rem;
}
.code-form { flex-direction: column; }
.code-form label { font-weight: 600; margin-bottom: -0.4rem; }
.page-header .hello { font-size: 0.95rem; margin-top: 0.75rem; }
.page-header .hello a { color: var(--dark); font-weight: 600; }
.code-form input {
  font: inherit;
  font-size: 1.1rem;
  padding: 0.65rem 1rem;
  border: 2px solid rgba(43, 38, 32, 0.15);
  border-radius: 999px;
  min-width: 0;
  width: 220px;
  text-align: center;
  background: #fff;
  color: var(--dark);
}
.code-form input:focus { outline: 3px solid var(--honey); border-color: var(--honey-deep); }
.code-form .btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.code-error { color: #b3261e; font-weight: 600; }
.code-help { color: var(--muted); font-size: 0.95rem; }

.prose p, .prose li { color: var(--muted); line-height: 1.75; font-size: 1.05rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose .lead { color: var(--dark); font-size: 1.2rem; }
.prose strong { color: var(--dark); }
.hypothesis {
  background: #fff;
  border: 1px solid rgba(43, 38, 32, 0.08);
  border-left: 5px solid var(--honey);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.hypothesis h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.hypothesis p { margin: 0; }
.senses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}
.senses li {
  background: #fff6dd;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  line-height: 1.55;
}
.senses b { display: block; color: var(--dark); }
.howto {
  background: #fff6dd;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.howto h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.howto ol { margin: 0; padding-left: 1.25rem; }
.howto li { margin-bottom: 0.25rem; }
.unit-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border: 1px solid rgba(43, 38, 32, 0.1);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.unit-list li + li { border-top: 1px solid rgba(43, 38, 32, 0.08); }
.unit-list a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--dark);
}
.unit-list a:hover { background: #fffaf0; }
.unit-list .no {
  flex: none;
  min-width: 4.2rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--honey-deep);
}
.unit-list .ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.unit-list .ttl b { font-size: 1rem; line-height: 1.3; }
.unit-list .ttl small { color: var(--muted); font-size: 0.82rem; }
.unit-list .status {
  flex: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: #f3eee2;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.unit-list .status.done { color: #0e7a52; background: #ddf3e8; }
.unit-list .go { flex: none; font-size: 1.4rem; color: var(--muted); }
.unit-list .empty { padding: 1rem; color: var(--muted); }
@media (max-width: 480px) {
  .unit-list a { gap: 0.6rem; padding: 0.7rem 0.8rem; }
  .unit-list .no { min-width: 3.4rem; }
}
.bank-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
}
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(43, 38, 32, 0.15);
  background: #fff;
  color: var(--dark);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}
.filter.on { background: var(--dark); color: var(--cream); border-color: var(--dark); }
#unitSearch {
  font: inherit;
  border: 1px solid rgba(43, 38, 32, 0.15);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  min-width: 0;
  flex: 0 1 220px;
  background: #fff;
  color: var(--dark);
}
.empty { color: var(--muted); }
.photo-credit { font-size: 0.56rem !important; color: var(--muted); margin-top: 1rem; }
.refs { font-size: 0.92rem; }
.refs li { margin-bottom: 0.4rem; }

/* Clubs */
.muted { color: var(--muted); }
.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.club-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(43, 38, 32, 0.1);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--dark);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.club-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(43, 38, 32, 0.12); }
.club-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #fff6dd; }
.club-body { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.8rem 1rem 1rem; position: relative; }
.club-body .emoji { position: absolute; right: 0.9rem; top: -1.4rem; font-size: 1.8rem; background: #fff; border-radius: 50%; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.club-body b { font-size: 1.15rem; }
.club-body small { color: var(--honey-deep); font-weight: 700; }
.club-body i { color: var(--muted); }
.club-body .meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }

/* Nav dropdown */
nav .has-menu { position: relative; }
nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: -0.75rem;
  flex-direction: column;
  gap: 0;
  min-width: 11rem;
  padding: 0.4rem 0;
  margin-top: 0.4rem;
  background: #fff;
  border: 1px solid rgba(43, 38, 32, 0.08);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(43, 38, 32, 0.12);
}
nav .submenu::before {
  content: "";
  position: absolute;
  top: -0.6rem;
  left: 0;
  right: 0;
  height: 0.6rem;
}
nav .has-menu:hover .submenu,
nav .has-menu:focus-within .submenu { display: flex; }
nav .submenu a {
  display: block;
  padding: 0.5rem 0.9rem;
  white-space: nowrap;
}
nav .submenu a:hover { background: #fff6dd; }

/* Phones: the name on one line, the menu on the next, so all links fit */
@media (max-width: 560px) {
  nav { flex-direction: column; gap: 0.2rem; padding: 0.55rem 0.5rem 0.45rem; }
  nav > ul { gap: 0; flex-wrap: nowrap; }
  nav > ul > li > a { padding: 0.25rem 0.45rem; font-size: 0.85rem; white-space: nowrap; }
  nav .submenu { left: -0.5rem; }
}
