/* ══════════════════════════════════════
   Cheatsheet styles — shared by phonetics
   and declensions pages
   ══════════════════════════════════════ */

/* ── Extra variables for cheatsheet pages ── */
:root {
  --ipa: #e8c87a;
  --example-word: #8cb8d0;
  --shadow: 0 2px 20px rgba(0,0,0,0.3);
}

/* ── Navigation tabs ── */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,17,24,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 1rem;
  flex-wrap: wrap;
}
.nav-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-btn:hover { color: var(--text); border-color: var(--border); }
.nav-btn.active {
  color: var(--accent-ice);
  border-color: var(--accent-ice);
  background: rgba(110,184,215,0.08);
}

/* ── Layout ── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Sections (tab content) ── */
.section {
  display: none;
  animation: fadeIn 0.35s ease;
}
.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #fff;
}
.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}
.card h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card h3 .tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── Tags ── */
.tag-rule { background: rgba(110,184,215,0.15); color: var(--accent-ice); }
.tag-exc  { background: rgba(212,123,94,0.15);  color: var(--accent-fire); }
.tag-note { background: rgba(155,142,196,0.15); color: var(--accent-purple); }
.tag-tip  { background: rgba(122,191,142,0.15); color: var(--accent-green); }

/* ── IPA & example words ── */
.ipa {
  font-family: var(--mono);
  color: var(--ipa);
  font-size: 0.92em;
  background: rgba(232,200,122,0.07);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.word {
  font-family: var(--mono);
  color: var(--example-word);
  font-weight: 500;
}
.examples {
  margin-top: 0.6rem;
  padding: 0.7rem 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  border-left: 3px solid var(--border-accent);
  font-size: 0.88rem;
  line-height: 1.8;
}

/* ── Rule items ── */
.rule-item {
  margin-bottom: 0.5rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--border);
  font-size: 0.92rem;
}
.rule-item.long  { border-left-color: var(--accent-green); }
.rule-item.short { border-left-color: var(--accent-fire); }

/* ── Search ── */
.search-wrap {
  margin-bottom: 1.5rem;
  position: relative;
}
.search-wrap input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-wrap input::placeholder { color: var(--text-dim); }
.search-wrap input:focus { border-color: var(--accent-ice); }
.search-wrap .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ── Collapsibles ── */
.collapsible-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}
.collapsible-header::before {
  content: '\25B8';
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.collapsible-header.open::before { transform: rotate(90deg); }
.collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.collapsible-body.open {
  max-height: 2000px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .container { padding: 1rem 0.75rem; }
  .card { padding: 1rem; }
  .nav-btn { font-size: 0.75rem; padding: 0.35rem 0.65rem; }
}

/* ── Print ── */
@media print {
  .nav-bar, .search-wrap, .back-link { display: none; }
  .section { display: block !important; page-break-inside: avoid; }
  body { background: #fff; color: #111; }
  .card { border: 1px solid #ccc; background: #f9f9f9; }
}
