/* RustDocs Hub — premium developer reference portal
 * Dark-mode-first. Rust orange (#CE422B / #E36B36) on charcoal.
 * Inter for prose, JetBrains Mono for code. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --rust-orange:        #CE422B;
  --rust-orange-bright: #E36B36;
  --rust-orange-soft:   #F2A07A;
  --rust-orange-glow:   rgba(227, 107, 54, 0.18);

  --bg-deep:    #0E0F12;
  --bg-base:    #14161C;
  --bg-panel:   #1A1D25;
  --bg-elev:    #21252F;
  --bg-code:    #0B0C10;
  --bg-content: #F5F1EA;          /* warm off-white for callout cards in light surfaces */

  --line:       #2A2E3A;
  --line-soft:  rgba(255, 255, 255, 0.06);
  --line-strong: #3A3F4D;

  --text-primary:   #ECECEC;
  --text-secondary: #B7BAC4;
  --text-muted:     #7A8094;
  --text-faint:     #555968;
  --text-on-orange: #11141B;

  --kind-struct:    #E36B36;
  --kind-enum:      #C57BFF;
  --kind-trait:     #56C7C0;
  --kind-fn:        #FFB75A;
  --kind-macro:     #FF6E6E;
  --kind-type:      #8FBCFF;
  --kind-const:     #B8D472;
  --kind-primitive: #E0A0E0;
  --kind-module:    #9DA3B5;

  --shadow-card:  0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 32px rgba(0,0,0,0.32);
  --shadow-pop:   0 1px 0 rgba(255,255,255,0.06) inset, 0 18px 40px rgba(0,0,0,0.4);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Consolas, monospace;

  --w-sidebar: 280px;
  --w-content: 740px;
  --w-rail:    280px;
  --h-header:  60px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: 15.5px;
}

a { color: var(--rust-orange-bright); text-decoration: none; }
a:hover { color: var(--rust-orange-soft); text-decoration: underline; text-underline-offset: 2px; }

code, pre, kbd { font-family: var(--mono); font-feature-settings: "calt" 1, "liga" 1; }
code { font-size: 0.92em; }

h1, h2, h3, h4, h5 {
  font-family: var(--sans);
  letter-spacing: -0.012em;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text-primary);
}
h1 { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.45rem; font-weight: 700; margin-top: 2em; }
h3 { font-size: 1.12rem; font-weight: 600; margin-top: 1.6em; color: var(--text-primary); }
h4 { font-size: 0.95rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }

p { margin: 0 0 1em; color: var(--text-primary); }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin: 0.2em 0; }

::selection { background: var(--rust-orange); color: #fff; }

/* ============ HEADER (sticky) ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--h-header);
  background: rgba(14, 15, 18, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: var(--w-sidebar) 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text-primary); text-decoration: none;
  font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--text-primary); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--rust-orange) 0%, var(--rust-orange-bright) 100%);
  color: var(--text-on-orange); font-weight: 800;
  border-radius: 8px; font-family: var(--mono);
  box-shadow: 0 4px 14px rgba(206, 66, 43, 0.45);
}
.brand-text { color: var(--text-primary); }
.brand-text strong { color: var(--rust-orange-bright); font-weight: 800; }

.search-form {
  display: flex; align-items: center; gap: 0;
  width: min(560px, 100%);
}
.search-form input[type=search] {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 0.92rem;
  padding: 9px 14px;
  border-radius: 8px 0 0 8px;
  height: 38px;
  outline: none;
  transition: border-color 120ms, background 120ms;
}
.search-form input[type=search]::placeholder { color: var(--text-muted); }
.search-form input[type=search]:focus {
  border-color: var(--rust-orange);
  background: var(--bg-elev);
  box-shadow: 0 0 0 3px var(--rust-orange-glow);
}
.search-form button {
  background: var(--rust-orange);
  color: var(--text-on-orange);
  font-weight: 600;
  font-family: var(--sans);
  border: 1px solid var(--rust-orange);
  padding: 0 18px;
  height: 38px;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 120ms;
}
.search-form button:hover { background: var(--rust-orange-bright); border-color: var(--rust-orange-bright); }
.browse-link {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rust-orange);
  color: var(--text-on-orange);
  font-weight: 600;
  font-family: var(--sans);
  border: 1px solid var(--rust-orange);
  padding: 0 18px;
  height: 38px;
  border-radius: 8px;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 120ms;
}
.browse-link:hover { background: var(--rust-orange-bright); border-color: var(--rust-orange-bright); text-decoration: none; }

.header-meta { display: flex; align-items: center; gap: 18px; }
.header-meta a { color: var(--text-secondary); font-size: 0.9rem; }
.header-meta a:hover { color: var(--rust-orange-bright); text-decoration: none; }

/* ============ APP LAYOUT (sidebar + content + rail) ============ */
.app {
  display: grid;
  grid-template-columns: var(--w-sidebar) minmax(0, 1fr) var(--w-rail);
  gap: 0;
  align-items: start;
  min-height: calc(100vh - var(--h-header));
}
.app.no-rail { grid-template-columns: var(--w-sidebar) minmax(0, 1fr); }
.app.full    { grid-template-columns: minmax(0, 1fr); }

/* ---------- LEFT SIDEBAR (module nav) ---------- */
.sidebar {
  position: sticky;
  top: var(--h-header);
  height: calc(100vh - var(--h-header));
  overflow-y: auto;
  padding: 22px 18px 80px 28px;
  border-right: 1px solid var(--line);
  background: var(--bg-base);
  font-size: 0.93rem;
}
.sidebar h4 {
  margin: 18px 0 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar ul { list-style: none; padding: 0; margin: 0 0 10px; }
.sidebar li { margin: 0; }
.sidebar a {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.91rem;
  transition: background 100ms, color 100ms;
}
.sidebar a:hover { background: var(--bg-elev); color: var(--text-primary); text-decoration: none; }
.sidebar a.active {
  background: var(--rust-orange-glow);
  color: var(--rust-orange-bright);
}
.sidebar .count {
  font-family: var(--mono);
  color: var(--text-faint);
  font-size: 0.8rem;
}
.sidebar a.active .count { color: var(--rust-orange-soft); }
.sidebar .module-tree {
  font-family: var(--mono);
  font-size: 0.88rem;
}
.sidebar .module-tree li { margin: 1px 0; }

/* ---------- MAIN CONTENT ---------- */
.content {
  padding: 32px 44px 80px;
  max-width: var(--w-content);
  width: 100%;
  margin: 0 auto;
}
.content.wide { max-width: 980px; }

.breadcrumb {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--rust-orange-bright); text-decoration: none; }
.breadcrumb .sep { color: var(--text-faint); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rust-orange-bright);
  font-weight: 600;
  margin-bottom: 10px;
}

.lede {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.4em;
}

/* ---------- RIGHT RAIL ---------- */
.rail {
  position: sticky;
  top: var(--h-header);
  height: calc(100vh - var(--h-header));
  overflow-y: auto;
  padding: 32px 28px 80px 12px;
  border-left: 1px solid var(--line);
  background: transparent;
  font-size: 0.9rem;
}
.rail h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 10px;
  font-weight: 600;
}
.rail .rail-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.rail .rail-card ul { list-style: none; padding: 0; margin: 0; }
.rail .rail-card li { margin: 6px 0; line-height: 1.4; }
.rail .rail-card a { color: var(--text-secondary); font-size: 0.88rem; }
.rail .rail-card a:hover { color: var(--rust-orange-bright); text-decoration: none; }
.rail .rail-card .meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-faint);
}

/* ============ HOME PAGE ============ */
.hero {
  padding: 56px 28px 36px;
  background:
    radial-gradient(900px 360px at 12% -10%, rgba(206, 66, 43, 0.16), transparent 60%),
    radial-gradient(700px 300px at 95% 10%, rgba(227, 107, 54, 0.10), transparent 70%),
    var(--bg-deep);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 14px 0 18px;
}
.hero h1 .accent { color: var(--rust-orange-bright); }
.hero p.lede { font-size: 1.13rem; color: var(--text-secondary); max-width: 56ch; margin-bottom: 26px; }
.hero .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  font-family: var(--sans); font-weight: 600; font-size: 0.94rem;
  border-radius: 8px;
  text-decoration: none; cursor: pointer;
  transition: transform 100ms, background 120ms, border-color 120ms;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--rust-orange);
  color: var(--text-on-orange);
}
.btn-primary:hover {
  background: var(--rust-orange-bright);
  text-decoration: none; color: var(--text-on-orange);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--rust-orange-bright);
  color: var(--rust-orange-bright);
  text-decoration: none;
}

.hero-stats {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 24px;
  display: flex; gap: 22px; flex-wrap: wrap;
}
.hero-stats strong { color: var(--rust-orange-bright); font-weight: 600; }

.hero-search {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}
.hero-search h4 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.hero-search .quick-types {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: 12px;
}
.hero-search .quick-types a {
  font-family: var(--mono); font-size: 0.78rem;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text-secondary);
  text-decoration: none;
}
.hero-search .quick-types a:hover {
  border-color: var(--rust-orange);
  color: var(--rust-orange-bright);
  background: var(--rust-orange-glow);
  text-decoration: none;
}

/* Featured module grid on home */
.section { padding: 42px 28px; max-width: 1200px; margin: 0 auto; }
.section h2 {
  font-size: 1.55rem;
  margin-bottom: 20px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.section h2 .more {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 14px;
}
.module-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: transform 120ms, border-color 120ms;
  display: block;
  text-decoration: none;
}
.module-card:hover {
  border-color: var(--rust-orange);
  background: var(--bg-elev);
  transform: translateY(-2px);
  text-decoration: none;
}
.module-card .name {
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--rust-orange-bright);
  margin-bottom: 4px;
}
.module-card .blurb {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.45;
}
.module-card .stat {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.featured-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.featured-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rust-orange);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: block;
  text-decoration: none;
  color: var(--text-primary);
}
.featured-card:hover { background: var(--bg-elev); text-decoration: none; }
.featured-card .kind {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.featured-card .name {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rust-orange-bright);
  margin: 4px 0 4px;
}
.featured-card .path {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.featured-card .summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* ============ ITEM PAGE ============ */
.item-header { margin-bottom: 24px; }
.item-header .crumb-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.kind-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
}
.kind-badge.struct { color: var(--kind-struct); border-color: rgba(227, 107, 54, 0.4); }
.kind-badge.enum   { color: var(--kind-enum);   border-color: rgba(197, 123, 255, 0.4); }
.kind-badge.trait  { color: var(--kind-trait);  border-color: rgba(86, 199, 192, 0.4); }
.kind-badge.fn     { color: var(--kind-fn);     border-color: rgba(255, 183, 90, 0.4); }
.kind-badge.macro  { color: var(--kind-macro);  border-color: rgba(255, 110, 110, 0.4); }
.kind-badge.type   { color: var(--kind-type);   border-color: rgba(143, 188, 255, 0.4); }
.kind-badge.constant { color: var(--kind-const); border-color: rgba(184, 212, 114, 0.4); }
.kind-badge.primitive { color: var(--kind-primitive); border-color: rgba(224, 160, 224, 0.4); }
.kind-badge.module { color: var(--kind-module); border-color: var(--line-strong); }

.item-title {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 6px 0 10px;
  word-break: break-word;
}
.item-title .scope { color: var(--text-muted); font-weight: 500; }
.item-title .ident { color: var(--rust-orange-bright); }

.item-summary {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0 0 18px;
  line-height: 1.55;
}

.signature {
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rust-orange);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
  margin: 0 0 24px;
}

/* Code blocks */
pre.code-block {
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-primary);
  overflow-x: auto;
  margin: 12px 0 8px;
}
pre.code-block code { color: inherit; font-size: inherit; }
.code-caption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 22px;
  padding-left: 4px;
  font-style: italic;
  line-height: 1.5;
}

.callout {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rust-orange-soft);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 0.94rem;
  color: var(--text-secondary);
}
.callout strong { color: var(--text-primary); }

/* Reference index — alphabetical chunks */
.alpha-bar {
  display: flex; flex-wrap: wrap; gap: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 0 0 22px;
  font-family: var(--mono);
}
.alpha-bar a {
  display: inline-block;
  padding: 4px 9px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-radius: 4px;
}
.alpha-bar a:hover { background: var(--bg-elev); color: var(--rust-orange-bright); text-decoration: none; }
.alpha-bar a.current { background: var(--rust-orange); color: var(--text-on-orange); }
.alpha-bar a.disabled { color: var(--text-faint); pointer-events: none; }

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.index-grid .row {
  display: flex; align-items: center;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-panel);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--text-primary);
}
.index-grid .row:hover { background: var(--bg-elev); text-decoration: none; }
.index-grid .row .name { color: var(--rust-orange-bright); margin-right: auto; padding-right: 10px; }
.index-grid .row .mod  { color: var(--text-muted); font-size: 0.78rem; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 28px 0;
  font-family: var(--mono);
}
.pagination a, .pagination span {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
}
.pagination a:hover { border-color: var(--rust-orange); color: var(--rust-orange-bright); text-decoration: none; }
.pagination .current { background: var(--rust-orange); color: var(--text-on-orange); border-color: var(--rust-orange); }

/* See Also / Related */
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  list-style: none; padding: 0; margin: 0;
}
.related-list li {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 0.86rem;
}
.related-list li a { color: var(--rust-orange-bright); display: block; }
.related-list li a .kind {
  font-size: 0.72rem; color: var(--text-muted); margin-left: 6px;
  font-family: var(--mono);
}

/* PBN block in rail */
.pbn-block {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.pbn-block h4 {
  margin: 0 0 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.pbn-block .pbn-blurb {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin: 0 0 10px;
  line-height: 1.4;
}
.pbn-block ul { list-style: none; padding: 0; margin: 0; }
.pbn-block li {
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
}
.pbn-block li:first-child { border-top: 0; }
.pbn-block li a {
  color: var(--text-secondary);
  font-size: 0.86rem;
  display: block;
  line-height: 1.4;
}
.pbn-block li a:hover { color: var(--rust-orange-bright); text-decoration: none; }
.pbn-block li small {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  display: block;
  margin-top: 2px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-base);
  margin-top: 48px;
  padding: 36px 28px 28px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-inner h4 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.footer-inner ul { list-style: none; padding: 0; margin: 0; }
.footer-inner li { margin: 4px 0; }
.footer-inner a { color: var(--text-secondary); font-size: 0.88rem; }
.footer-inner a:hover { color: var(--rust-orange-bright); text-decoration: none; }
.footer-bottom {
  max-width: 1200px; margin: 22px auto 0; padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: var(--text-faint);
}

/* Article / tutorial bodies */
.article-body p { margin-bottom: 1.05em; }
.article-body h2 { margin-top: 1.6em; }
.article-body h3 { margin-top: 1.4em; }
.article-body code:not(pre code) {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.86em;
  color: var(--rust-orange-soft);
}
.article-body blockquote {
  margin: 18px 0;
  padding: 6px 16px;
  border-left: 3px solid var(--rust-orange);
  color: var(--text-secondary);
  background: var(--bg-panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Search results */
.search-result {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.search-result h3 { margin: 0 0 4px; font-size: 1.05rem; font-family: var(--mono); }
.search-result .path {
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px;
}
.search-result p { margin: 0; color: var(--text-secondary); font-size: 0.92rem; }

/* 404 */
.not-found { text-align: center; padding: 80px 20px; }
.not-found h1 { font-size: 5rem; color: var(--rust-orange); margin: 0; font-family: var(--mono); }
.not-found p { color: var(--text-secondary); }

/* Utility */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.muted { color: var(--text-muted); }

/* Responsive */
@media (max-width: 1280px) {
  .app { grid-template-columns: var(--w-sidebar) minmax(0, 1fr); }
  .rail { display: none; }
  .header-inner { grid-template-columns: 1fr 1fr auto; gap: 18px; padding: 0 20px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .header-inner { grid-template-columns: auto 1fr; }
  .header-inner .search-form { display: none; }
  .header-inner .browse-link { display: none; }
  .content { padding: 24px 20px 60px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero { padding: 36px 20px 24px; }
  .section { padding: 28px 20px; }
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .index-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
}
