/* ============================================================
   WolfieGuard Docs — main.css
   Dark theme, GitHub-inspired, CSS custom properties
   ============================================================ */

/* ----------------------------------------------------------
   1. Design tokens
   ---------------------------------------------------------- */
:root {
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --bg-elevated: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --code-bg: #161b22;
  --sidebar-w: 260px;
  --right-w: 220px;
  --header-h: 60px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  --radius: 8px;
  --transition: 0.2s ease;
}

/* ----------------------------------------------------------
   2. Reset + base
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
}

/* Alpine.js cloak — prevent flash of unhidden elements */
[x-cloak] {
  display: none !important;
}

/* ----------------------------------------------------------
   3. Site header
   ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
}

/* Hamburger — hidden on desktop, shown on mobile */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background var(--transition);
}

.hamburger:hover span {
  background: var(--text);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.logo-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.logo-docs {
  color: var(--text-muted);
  font-weight: 400;
}

/* Search trigger button */
.search-trigger {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  text-align: left;
}

.search-trigger:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.search-hint {
  flex: 1;
  text-align: left;
}

.search-kbd {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-sans);
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Header right: lang + github */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switcher {
  display: flex;
  gap: 2px;
}

.lang-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.lang-btn:hover {
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
}

.lang-btn.active {
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 500;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

.icon-btn:hover {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}

/* ----------------------------------------------------------
   4. Layout — 3-column grid
   ---------------------------------------------------------- */
.layout-container {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--right-w);
  min-height: calc(100vh - var(--header-h));
  max-width: 1400px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   5. Left sidebar
   ---------------------------------------------------------- */
.sidebar-left {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-left::-webkit-scrollbar {
  width: 4px;
}

.sidebar-left::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-left::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sidebar-inner {
  padding: 16px 0 40px;
}

.sidebar-logo {
  padding: 0 16px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo a {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.sidebar-logo-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.sidebar-logo a:hover {
  color: var(--accent);
}

/* Navigation tree */
.nav-tree {
  padding: 8px 0;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--transition);
}

.nav-section-title:hover {
  color: var(--text);
}

.nav-section-link {
  text-decoration: none;
  border-radius: 6px;
}

.nav-section-link:hover,
.nav-section-link.active {
  color: var(--accent);
  background: var(--sidebar-active-bg, rgba(99, 102, 241, 0.08));
}

.nav-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav-chevron.rotated {
  transform: rotate(90deg);
}

.nav-items {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
}

.nav-item {
  display: block;
  padding: 6px 20px 6px 28px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  border-left: 2px solid transparent;
  margin: 1px 0;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  line-height: 1.4;
}

.nav-item:hover {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}

.nav-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
  font-weight: 500;
}

/* Sidebar backdrop (mobile only) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(0, 0, 0, 0.5);
}

/* ----------------------------------------------------------
   6. Main content area
   ---------------------------------------------------------- */
.content-main {
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.content-inner {
  max-width: 720px;
  padding: 40px 48px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   7. Prose styles (article content)
   ---------------------------------------------------------- */
.prose {
  color: var(--text);
}

.prose .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.prose h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.prose h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 44px 0 12px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.prose h2:first-of-type {
  margin-top: 32px;
  padding-top: 32px;
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 8px;
  color: var(--text);
  line-height: 1.4;
}

.prose h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prose p {
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 16px;
}

.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(88, 166, 255, 0.3);
  transition: border-color var(--transition), color var(--transition);
}

.prose a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* Code — inline */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-elevated);
  color: #ffa657;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Code — block */
.prose pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 20px 0;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.prose pre::-webkit-scrollbar {
  height: 4px;
}

.prose pre::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.prose pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--text);
  font-size: 0.875rem;
}

/* ─── Chroma syntax highlighting (github-dark) ─── */
/* The .chroma stylesheet (chroma-github-dark.css) provides per-token colors;
   here we wrap them in our card chrome and add a language label. */
.highlight {
  position: relative;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.highlight pre,
.prose pre.chroma {
  margin: 0;
  padding: 16px 20px;
  background: #0d1117;       /* matches chroma-github-dark .chroma background */
  color: #e6edf3;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  line-height: 1.55;
  font-size: 0.875rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.highlight pre code,
.highlight code.chroma {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
  font-size: inherit;
}

/* Per-block language label, populated from data-lang via JS in app.js */
.highlight[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-bottom-left-radius: var(--radius);
  font-family: var(--font-sans);
  pointer-events: none;
  z-index: 1;
}

/* Blockquote */
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 20px 0;
  background: rgba(88, 166, 255, 0.05);
  color: var(--text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

.prose blockquote p {
  margin: 0;
  color: var(--text-muted);
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.prose thead {
  background: var(--bg-elevated);
}

.prose th {
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: top;
}

.prose tr:last-child td {
  border-bottom: none;
}

.prose tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Lists */
.prose ul,
.prose ol {
  padding-left: 24px;
  margin-bottom: 16px;
  line-height: 1.75;
}

.prose li {
  margin-bottom: 4px;
}

.prose li > ul,
.prose li > ol {
  margin-top: 4px;
  margin-bottom: 4px;
}

/* Horizontal rule */
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Images */
.prose img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 100%;
}

/* Strong / em */
.prose strong {
  font-weight: 600;
  color: var(--text);
}

.prose em {
  color: var(--text-muted);
  font-style: italic;
}

/* ----------------------------------------------------------
   8. Right sidebar
   ---------------------------------------------------------- */
.sidebar-right {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--bg-secondary);
  padding: 20px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-right::-webkit-scrollbar {
  width: 4px;
}

.sidebar-right::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sidebar-right-inner {
  padding-top: 8px;
}

.sidebar-right-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.6;
}

/* ----------------------------------------------------------
   TOC widget (right sidebar)
   ---------------------------------------------------------- */

.toc-widget {
  padding-top: 4px;
}

.toc-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 10px 0;
}

/* Hugo generates <nav id="TableOfContents"><ul><li>... */
.toc-content nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Second-level indent */
.toc-content nav ul ul {
  padding-left: 12px;
}

.toc-content nav ul li {
  margin: 0;
}

.toc-content nav ul li a {
  display: block;
  padding: 4px 0 4px 8px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.4;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  word-break: break-word;
}

.toc-content nav ul li a:hover {
  color: var(--text);
}

/* Active heading highlight — set via Alpine tocHighlight() */
.toc-content nav ul li a.toc-active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ----------------------------------------------------------
   9. Search modal
   ---------------------------------------------------------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  backdrop-filter: blur(4px);
}

.search-modal {
  width: 100%;
  max-width: 600px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  margin: 0 16px;
}

.search-modal-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.search-icon-sm {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text);
  font-family: var(--font-sans);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-close {
  padding: 3px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.search-close:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.search-results {
  max-height: 380px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  gap: 12px;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-secondary);
  text-decoration: none;
}

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.search-result-section {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
  white-space: nowrap;
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
}

.search-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ----------------------------------------------------------
   10. Breadcrumbs
   ---------------------------------------------------------- */
.breadcrumbs {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb-sep {
  color: var(--border);
  user-select: none;
}

.breadcrumb-current {
  color: var(--text);
}

/* ----------------------------------------------------------
   11. Page navigation (prev / next)
   ---------------------------------------------------------- */
.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page-nav-card {
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  display: block;
}

.page-nav-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
  text-decoration: none;
}

.page-nav-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.page-nav-next .page-nav-label {
  justify-content: flex-end;
}

.page-nav-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.page-nav-next .page-nav-title {
  text-align: right;
}

/* Cross-section transition: small section name above the page title.
   Only renders on the prev/next link that crosses into a different
   docs section, so the reader knows they're about to leave the current
   chapter. */
.page-nav-section {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.85;
}
.page-nav-next .page-nav-section {
  text-align: right;
}
.page-nav-cross {
  border-style: dashed;
}
.page-nav-cross:hover {
  border-style: solid;
}

/* ----------------------------------------------------------
   12. Section cards (list pages)
   ---------------------------------------------------------- */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.section-card {
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: block;
}

.section-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
  text-decoration: none;
  transform: translateY(-1px);
}

.section-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ----------------------------------------------------------
   13. Footer
   ---------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 20px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-version {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-lang-link,
.footer-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-lang-link.active,
.footer-lang-link:hover,
.footer-link:hover {
  color: var(--text);
}

/* ----------------------------------------------------------
   14. Home page quick-start cards
   ---------------------------------------------------------- */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.home-card {
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.home-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.home-card-icon {
  font-size: 24px;
  margin-bottom: 12px;
  display: block;
}

.home-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.home-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ----------------------------------------------------------
   15. Callout / admonition blocks
   ---------------------------------------------------------- */
.callout {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 20px 0;
  border-left: 3px solid;
  font-size: 14px;
  line-height: 1.6;
}

.callout-note {
  background: rgba(88, 166, 255, 0.05);
  border-color: var(--accent);
  color: var(--text-muted);
}

.callout-warning {
  background: rgba(255, 166, 87, 0.05);
  border-color: #ffa657;
  color: var(--text-muted);
}

.callout-danger {
  background: rgba(255, 87, 87, 0.05);
  border-color: #ff5757;
  color: var(--text-muted);
}

.callout-tip {
  background: rgba(87, 212, 138, 0.05);
  border-color: #57d48a;
  color: var(--text-muted);
}

/* ----------------------------------------------------------
   16. Utility classes
   ---------------------------------------------------------- */
.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-blue {
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent);
  border: 1px solid rgba(88, 166, 255, 0.3);
}

.badge-green {
  background: rgba(87, 212, 138, 0.15);
  color: #57d48a;
  border: 1px solid rgba(87, 212, 138, 0.3);
}

.badge-orange {
  background: rgba(255, 166, 87, 0.15);
  color: #ffa657;
  border: 1px solid rgba(255, 166, 87, 0.3);
}

.badge-red {
  background: rgba(255, 87, 87, 0.15);
  color: #ff5757;
  border: 1px solid rgba(255, 87, 87, 0.3);
}

/* ----------------------------------------------------------
   17. Responsive — tablet (max 1200px)
   ---------------------------------------------------------- */
@media (max-width: 1200px) {
  .sidebar-right {
    display: none;
  }

  .layout-container {
    grid-template-columns: var(--sidebar-w) 1fr;
  }

  .content-inner {
    max-width: 760px;
    padding: 32px 32px;
  }
}

/* ----------------------------------------------------------
   18. Responsive — mobile (max 900px)
   ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .layout-container {
    grid-template-columns: 1fr;
  }

  .sidebar-left {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar-w));
    height: 100vh;
    z-index: 50;
    transition: left 0.3s ease;
    box-shadow: none;
    padding-top: var(--header-h);
  }

  .sidebar-left.sidebar-open {
    left: 0 !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

  .sidebar-backdrop {
    display: block;
  }

  .content-inner {
    padding: 24px 20px;
    max-width: 100%;
  }

  .search-trigger .search-hint {
    display: none;
  }

  .search-trigger .search-kbd {
    display: none;
  }

  .lang-switcher .lang-btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  .page-nav {
    grid-template-columns: 1fr;
  }

  .search-overlay {
    padding-top: 60px;
    align-items: flex-start;
  }
}

/* ----------------------------------------------------------
   19. Responsive — small mobile (max 480px)
   ---------------------------------------------------------- */
@media (max-width: 480px) {
  .prose h1 {
    font-size: 1.6rem;
  }

  .prose h2 {
    font-size: 1.25rem;
  }

  .content-inner {
    padding: 20px 16px;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ----------------------------------------------------------
   20. Print styles
   ---------------------------------------------------------- */
@media print {
  .site-header,
  .sidebar-left,
  .sidebar-right,
  .site-footer,
  .page-nav {
    display: none !important;
  }

  .layout-container {
    display: block;
  }

  .content-inner {
    max-width: 100%;
    padding: 0;
  }

  body {
    background: white;
    color: black;
  }
}
