/* 19-reference.css — programming-language reference native view.
   Page-scoped (loaded via {% block extra_head %} in know/reference.html), so it
   ships without a Tailwind rebuild. Only the EN/中文 version-toggle pill lives
   here; everything else reuses the .learn-* classes from 06-landing.css. */

.langref-toggle-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.langref-toggle-btn:hover {
  color: #e2e8f0;
}
.langref-toggle-btn.is-active {
  background: rgba(34, 211, 238, 0.16);
  color: #67e8f9;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.3);
}
.langref-toggle-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.6);
}

/* Reading-reference fold titles wrap on phones instead of ending in an ellipsis ('Variables,
   types & operat…' at 360px): the template's `truncate` suits the wide row only. Know's own
   wrap rule (45-know.css) is not loaded on these pages. */
@media (max-width: 639px) {
  .know-topic-summary > .learn-topic-title { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
}

/* Code references wear .code-lesson (for the runnable examples), whose 42rem centred lesson
   column left the topic cards narrower than, and off the edge of, the header above them.
   Same edges as the grammar references. */
#site-main > section.code-lesson { max-width: none; margin-inline: 0; }
/* Version toggle: unselected languages read light, not grey, on the dark pill. */
html:not([data-theme="light"]) .langref-toggle-btn:not(.is-active) { color: #cbd5e1; }

/* ▼▼ LIGHT THEME — GENERATED by scripts/build_light_theme.py from the rules above. Do not edit by hand: run the builder. Hand tuning goes in 36-theme-light.css. ▼▼ */
html[data-theme="light"] .langref-toggle-btn{color:rgb(61 75 94)}
html[data-theme="light"] .langref-toggle-btn:hover{color:rgb(44 63 88)}
html[data-theme="light"] .langref-toggle-btn.is-active{color:rgb(2 111 126);box-shadow:inset 0px 0px 0px 1px rgb(14 158 180/0.51)}
html[data-theme="light"] .langref-toggle-btn:focus-visible{box-shadow:0px 0px 0px 2px rgb(14 158 180/0.55)}
/* ▲▲ LIGHT THEME END ▲▲ */
