:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --navy: #082f49;
  --navy-mid: #0c4a6e;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --success: #16a34a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container { max-width: 760px; margin: 0 auto; padding: 0 14px; }

/* TOP NAVBAR */
.top-nav {
  background: var(--navy);
  color: #ffffff;
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 54px; }
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
}
.site-logo { width: 32px; height: 32px; flex-shrink: 0; }
.brand-dot { color: #38bdf8; }
.unit-toggle { display: flex; background: rgba(255,255,255,0.12); border-radius: 8px; padding: 3px; }
.unit-toggle button {
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.78rem;
}
.unit-toggle button.active { background: #ffffff; color: var(--navy); }

/* HERO & AD SLOT */
.hero-sub {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #ffffff;
  padding: 16px 0 22px;
  margin-bottom: 14px;
}
.hero-sub h1 { font-size: 1.38rem; font-weight: 800; line-height: 1.25; }
.hero-sub p { color: #bae6fd; font-size: 0.88rem; margin-top: 4px; }

.ad-slot { margin-bottom: 14px; }
.ad-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  padding: 9px 14px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.82rem;
}
.ad-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
/* CARDS & INPUTS */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.card-header { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.step-badge {
  background: var(--primary);
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}
.card h2 { font-size: 1.05rem; font-weight: 700; }

label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
input, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
  color: var(--text);
}
input:focus, select:focus { outline: none; border-color: var(--primary); }

.dim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.full-span { grid-column: 1 / -1; }

.result-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
}
.result-big { font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.bold-line { font-weight: 700; font-size: 0.95rem; }
.mt-4 { margin-top: 4px; }
.muted-small { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

/* COLLAPSIBLE BOXES & LINKS */
details.collapse-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
details.collapse-card > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
details.collapse-card > summary::-webkit-details-marker { display: none; }
.collapse-title { display: flex; align-items: center; gap: 9px; }
.collapse-title h2 { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.collapse-arrow { font-size: 0.95rem; font-weight: 800; color: var(--primary); transition: transform 0.2s ease; }
details.collapse-card[open] > summary .collapse-arrow { transform: rotate(180deg); }
.collapse-body { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

.species-links-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.species-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--navy);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
}
.species-pill:hover { background: #e0f2fe; border-color: var(--primary); }

.faq-item { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary { font-weight: 700; font-size: 0.9rem; cursor: pointer; color: var(--text); }
.faq-item p { font-size: 0.84rem; color: var(--muted); margin-top: 6px; line-height: 1.5; }

footer { text-align: left; padding: 18px 4px 36px; font-size: 0.78rem; color: var(--muted); line-height: 1.55; }
footer h3 { font-size: 0.85rem; color: var(--text); margin: 12px 0 4px; }

@media (max-width: 560px) {
  .dim-grid { grid-template-columns: 1fr; }
  .sub-grid { grid-template-columns: 1fr; }
}
