/* ============================================================
   The Stash — Chemistry guides page (credential-locked)
   ============================================================ */

/* ---------- Gate / lock ---------- */
.chem-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  background: radial-gradient(120% 120% at 50% 0%, #0d1526 0%, #070c16 70%);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.chem-gate.open { display: flex; }
.chem-gate-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
  background: var(--bg-panel, #131b2e);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 18px;
  padding: 34px 30px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.chem-gate-card .lock { font-size: 2.6rem; line-height: 1; margin-bottom: 14px; }
.chem-gate-card h3 { font-size: 1.35rem; font-weight: 800; color: var(--ink, #e4eaf4); margin: 0 0 6px; }
.chem-gate-card p { font-size: 0.86rem; color: var(--ink-mute, #9aa7bd); margin: 0 0 22px; line-height: 1.55; }
.chem-gate-card .chem-accent { color: var(--accent, #3f9bff); }
.chem-login-err {
  display: none;
  background: rgba(239, 68, 68, 0.14);
  color: #ff9b9b;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  font-size: 0.82rem;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.chem-login-err.show { display: block; }
.chem-field { margin-bottom: 12px; text-align: left; }
.chem-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute, #9aa7bd);
  margin-bottom: 6px;
}
.chem-field input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  color: var(--ink, #e4eaf4);
  font-size: 0.95rem;
  padding: 10px 12px;
}
.chem-field input:focus { outline: none; border-color: var(--accent, #3f9bff); }
.chem-gate-card .btn { width: 100%; margin-top: 4px; }
.chem-gate-hint { margin-top: 16px; font-size: 0.72rem; color: var(--ink-mute, #9aa7bd); }

/* ---------- Body while locked ---------- */
body.chem-locked > main,
body.chem-locked > .site-header,
body.chem-locked > .site-footer { visibility: hidden; }

/* ---------- Guide selector (unlocked) ---------- */
.chem-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.chem-toolbar .btn { margin: 0; }
.chem-guides { min-height: 40vh; }
.chem-guides h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.chem-guides .chem-count { font-size: 0.85rem; color: var(--ink-mute, #9aa7bd); margin-bottom: 8px; }

.chem-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  z-index: 140;
  background: var(--bg-panel, #131b2e);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
  color: var(--ink, #e4eaf4);
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 10px 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.chem-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.chem-toast.err { border-color: rgba(239, 68, 68, 0.5); color: #ffb4b4; }
.chem-toast.ok { border-color: rgba(52, 211, 153, 0.5); color: #7de3b8; }

/* Guide article pages */
.chem-guide-wrap { max-width: 760px; }
.chem-guide-wrap h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.chem-guide-meta { font-size: 0.8rem; color: var(--ink-mute, #9aa7bd); margin-bottom: 18px; }
.chem-guide-body { line-height: 1.7; color: var(--ink-soft, #c7d0e0); }
.chem-guide-body p { margin: 0 0 14px; font-size: 0.95rem; }
.chem-guide-body h3 { margin: 22px 0 8px; font-size: 1.1rem; color: var(--ink, #e4eaf4); }
.chem-guide-body ul, .chem-guide-body ol { margin: 0 0 14px; padding-left: 20px; font-size: 0.95rem; }
.chem-guide-body li { margin-bottom: 6px; }
.chem-guide-body strong { color: var(--ink, #e4eaf4); }
.chem-guide-note {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.07);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft, #c7d0e0);
  margin: 18px 0;
}
.chem-guide-note strong { color: var(--amber, #fbbf24); }

/* Reuse calc card grid for guide cards */
.chem-guides .calc-card { cursor: default; }
.chem-guides .calc-card a.btn { text-decoration: none; margin-top: 10px; }