/* ==========================================================================
   ManaLinux — Modern Clean Editorial + 16-Bit SNES RPG Soul
   Calm charcoal-slate surfaces • Subtle gold & mana-teal accents • Zero visual clutter
   Let the handcrafted 16-bit SNES pixel art shine.
   ========================================================================== */

:root {
  /* Calm, modern neutral charcoal-slate (not blue, not noisy) */
  --bg: #0e1014;
  --surface: #15181f;
  --surface-hover: #1b1f29;
  --surface-inset: #101218;

  --border: #252a35;
  --border-strong: #363d4d;

  /* Subtle, refined SNES RPG accents */
  --gold: #eab308;
  --gold-soft: #fde047;
  --gold-muted: rgba(234, 179, 8, 0.16);

  --mana: #2dd4bf;
  --mana-soft: #5eead4;
  --mana-muted: rgba(45, 212, 191, 0.14);

  /* Crisp, comfortable reading contrast */
  --text: #f3f4f6;
  --text-body: #c9ced8;
  --text-muted: #8b93a5;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;

  --radius: 10px;
  --radius-sm: 7px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 65% 32% at 50% -5%, rgba(234, 179, 8, 0.055), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ml-skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--gold);
  color: #111318;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  z-index: 999;
}

.ml-skip:focus {
  left: 12px;
}

/* ==========================================================================
   1. CLEAN MODERN HEADER WITH SUBTLE 16-BIT BRAND CHARACTER
   ========================================================================== */
.ml-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(16, 18, 24, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.ml-topbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 28px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ml-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.ml-brand-mascot {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(234, 179, 8, 0.45);
  image-rendering: pixelated;
  background: #0d1017;
}

.ml-brand-title {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.ml-brand-mana {
  color: var(--mana-soft);
}

.ml-brand-linux {
  color: #f8e39a;
}

.ml-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.ml-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.14s ease, background 0.14s ease;
}

.ml-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.ml-nav-link.active {
  color: #fef08a;
  background: rgba(234, 179, 8, 0.12);
}

.ml-nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-inset);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease;
  flex-shrink: 0;
}

.ml-nav-search-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.ml-nav-search-btn kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ==========================================================================
   2. SLEEK FRAMED 16-BIT SANCTUARY HERO BANNER
   ========================================================================== */
.ml-welcome-wrap {
  max-width: 1360px;
  margin: 22px auto 26px;
  padding: 0 28px;
}

.ml-welcome {
  position: relative;
  isolation: isolate;
  min-height: 236px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(234, 179, 8, 0.34);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
  background:
    linear-gradient(
      90deg,
      #12141a 0%,
      rgba(18, 20, 26, 0.96) 35%,
      rgba(18, 20, 26, 0.78) 52%,
      rgba(18, 20, 26, 0.22) 70%,
      rgba(18, 20, 26, 0.04) 100%
    ),
    url("../img/banner-sanctuary.webp") right center / cover no-repeat;
  background-color: #12141a;
}

.ml-welcome-inner {
  position: relative;
  z-index: 1;
  padding: 34px 36px;
  max-width: 610px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ml-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--mana-soft);
}

.ml-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--gold);
}

.ml-welcome h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(27px, 2.7vw, 39px);
  font-weight: 700;
  line-height: 1.15;
  color: #faf7ef;
  letter-spacing: -0.015em;
}

.ml-welcome h1 span {
  color: var(--mana-soft);
}

.ml-welcome p {
  margin: 0;
  font-size: 15px;
  line-height: 1.58;
  color: var(--text-body);
  max-width: 520px;
}

.ml-welcome-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Modern Tactile Buttons (Clean, not shouty) */
.ml-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, border-color 0.14s ease, background 0.14s ease;
  text-align: center;
}

.ml-btn:hover {
  transform: translateY(-1px);
}

.ml-btn-gold {
  border: 1px solid rgba(254, 240, 138, 0.45);
  background: linear-gradient(180deg, #f3c13a 0%, #d99316 100%);
  color: #131009;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ml-btn-gold:hover {
  filter: brightness(1.06);
}

.ml-btn-ghost {
  border: 1px solid var(--border-strong);
  background: rgba(21, 24, 31, 0.82);
  color: var(--text);
}

.ml-btn-ghost:hover {
  border-color: rgba(234, 179, 8, 0.55);
  color: #fef08a;
}

/* ==========================================================================
   3. CLEAN 2-COLUMN EDITORIAL GRID (2.35fr MAIN + 1fr SIDEBAR)
   ========================================================================== */
.ml-home {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 28px 64px;
}

.ml-digest-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(300px, 1fr);
  gap: 28px;
  align-items: start;
}

.ml-main,
.ml-side {
  min-width: 0;
}

/* Shared Clean Card Surface (Subtle RPG corner accent on hover) */
.ml-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.14s ease;
}

/* Minimal Category Badges */
.ml-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ml-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: rgba(234, 179, 8, 0.12);
  color: #f8d866;
  border: 1px solid rgba(234, 179, 8, 0.28);
}

.ml-badge.mana {
  background: rgba(45, 212, 191, 0.11);
  color: var(--mana-soft);
  border-color: rgba(45, 212, 191, 0.28);
}

.ml-badge.neutral {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-body);
  border-color: var(--border);
}

/* ==========================================================================
   4. FLAGSHIP FEATURED GUIDE CARD (CLEAN SPLIT WITH SUBTLE GOLD TOP EDGE)
   ========================================================================== */
.ml-feature {
  display: grid;
  grid-template-columns: 44% minmax(0, 1fr);
  gap: 22px;
  padding: 12px;
  min-height: 248px;
  border-top: 2px solid rgba(234, 179, 8, 0.7);
}

.ml-feature:hover {
  border-color: rgba(234, 179, 8, 0.55);
}

.ml-thumb {
  display: block;
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background: #0c0e13;
  border: 1px solid var(--border);
  min-height: 222px;
}

.ml-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.ml-feature:hover .ml-thumb img,
.ml-guide:hover .ml-thumb img {
  transform: scale(1.025);
}

.ml-feature-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 12px 6px 0;
  min-width: 0;
}

.ml-feature h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.18;
  color: #faf7ef;
}

.ml-feature h2 a:hover {
  color: #fde68a;
}

.ml-feature p {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.54;
  color: var(--text-body);
}

.ml-feature-foot {
  width: 100%;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ml-meta-line {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   5. QUEST BOARD HEADER & 2-COLUMN HORIZONTAL GUIDE CARDS
   ========================================================================== */
.ml-guides {
  margin-top: 26px;
  scroll-margin-top: 86px;
}

.ml-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.ml-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: #faf7ef;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ml-section-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--gold);
  display: inline-block;
}

.ml-section-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.ml-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ml-guide-grid:has(> :only-child) {
  grid-template-columns: 1fr;
}

.ml-guide-grid:has(> :only-child) .ml-guide {
  grid-template-columns: 36% minmax(0, 1fr);
}

.ml-guide {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  gap: 14px;
  padding: 9px;
  min-height: 142px;
  position: relative;
}

.ml-guide:hover {
  border-color: rgba(234, 179, 8, 0.5);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.ml-guide .ml-thumb {
  min-height: 122px;
}

.ml-guide-body {
  min-width: 0;
  padding: 2px 6px 32px 0;
  display: flex;
  flex-direction: column;
}

.ml-guide .ml-badge {
  align-self: flex-start;
  font-size: 9.5px;
  margin-bottom: 6px;
}

.ml-guide h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.24;
  color: #faf7ef;
}

.ml-guide h3 a:hover {
  color: #fde68a;
}

.ml-guide p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ml-card-arrow {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-inset);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  transition: all 0.14s ease;
}

.ml-guide:hover .ml-card-arrow {
  border-color: rgba(234, 179, 8, 0.7);
  background: rgba(234, 179, 8, 0.15);
  color: #fde68a;
}

/* ==========================================================================
   6. CLEAN COLLAPSIBLE FILTERABLE GUIDE ARCHIVE
   ========================================================================== */
.ml-library {
  margin-top: 26px;
}

.ml-library summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.ml-library summary::-webkit-details-marker {
  display: none;
}

.ml-library-title {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #faf7ef;
}

.ml-library-sub {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ml-library-count {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-inset);
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
}

.ml-library-body {
  padding: 16px 18px 18px;
}

.ml-filter-bar {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ml-filter-pill {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-inset);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.ml-filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.ml-filter-pill.active {
  border-color: rgba(234, 179, 8, 0.55);
  background: rgba(234, 179, 8, 0.14);
  color: #fde68a;
}

.ml-library-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ml-lib-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-inset);
  transition: border-color 0.14s ease, background 0.14s ease;
}

.ml-lib-row:hover {
  border-color: rgba(234, 179, 8, 0.48);
  background: var(--surface-hover);
}

.ml-lib-row img {
  width: 74px;
  height: 50px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.ml-lib-row strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 2px;
}

.ml-lib-row small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
}

.ml-lib-row .ml-next {
  color: var(--text-muted);
  font-size: 15px;
}

.ml-lib-row:hover .ml-next {
  color: var(--gold);
}

/* ==========================================================================
   7. STREAMLINED RIGHT SIDEBAR (BREATHABLE, QUIET, MODERN)
   ========================================================================== */
.ml-side {
  display: grid;
  gap: 20px;
}

.ml-side-heading {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #faf7ef;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ml-side-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.ml-box {
  padding: 18px;
}

.ml-finder-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #faf7ef;
}

.ml-finder p {
  margin: 0 0 11px;
  font-size: 13px;
  color: var(--text-muted);
}

.ml-finder input[type="search"] {
  display: block;
  width: 100%;
  height: 38px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-inset);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
}

.ml-finder input[type="search"]::placeholder {
  color: #6b7280;
}

.ml-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}

.ml-chip {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-inset);
  color: var(--text-body);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}

.ml-chip:hover {
  border-color: rgba(234, 179, 8, 0.55);
  color: #fde68a;
}

.ml-finder .ml-btn {
  width: 100%;
  min-height: 36px;
  font-size: 13.5px;
}

/* Start Here List */
.ml-link-box {
  padding: 4px 16px;
}

.ml-start-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.14s ease;
}

.ml-start-link:last-child {
  border-bottom: 0;
}

.ml-start-link:hover {
  color: #fde68a;
}

.ml-start-dot {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--mana);
  flex-shrink: 0;
}

.ml-start-link .ml-next {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 15px;
}

.ml-start-link:hover .ml-next {
  color: var(--gold);
}

/* Sleek "At the ManaLinux Desk" Card (Subtle SNES Status Flavor) */
.ml-desk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.ml-desk-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid rgba(234, 179, 8, 0.45);
  image-rendering: pixelated;
  background: #0d1017;
  flex-shrink: 0;
}

.ml-desk-head strong {
  display: block;
  font-size: 14px;
  color: #faf7ef;
}

.ml-desk-head small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ml-stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ml-stat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.ml-stat-label {
  color: var(--text-muted);
}

.ml-stat-val {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.ml-mp-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.ml-mp-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--mana-soft);
  margin-bottom: 5px;
}

.ml-mp-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-inset);
  border: 1px solid var(--border);
  overflow: hidden;
}

.ml-mp-fill {
  height: 100%;
  width: 92%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d9488 0%, #2dd4bf 100%);
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.ml-footer {
  border-top: 1px solid var(--border);
  background: #0b0d11;
  padding: 36px 28px 30px;
}

.ml-footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(160px, 1fr));
  gap: 28px;
  align-items: start;
}

.ml-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ml-footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(234, 179, 8, 0.35);
  image-rendering: pixelated;
}

.ml-footer-tagline {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 420px;
}

.ml-footer-col h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text);
}

.ml-footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.ml-footer-col a:hover {
  color: #fde68a;
}

.ml-footer-bottom {
  max-width: 1360px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ml-preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.32);
  color: #fde68a;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

/* ==========================================================================
   9. SEARCH MODAL (CTRL+K)
   ========================================================================== */
.ml-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(7, 8, 12, 0.76);
  backdrop-filter: blur(5px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 9vh 16px 20px;
  z-index: 200;
}

.ml-modal-bg.open {
  display: flex;
}

.ml-modal {
  width: 100%;
  max-width: 560px;
  padding: 16px;
}

.ml-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ml-modal-head strong {
  font-family: var(--font-display);
  font-size: 16px;
  color: #faf7ef;
}

.ml-modal-close {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 5px;
  padding: 3px 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
}

.ml-modal-input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-inset);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 12px;
}

.ml-search-results {
  display: grid;
  gap: 7px;
  max-height: 50vh;
  overflow-y: auto;
}

.ml-search-hit {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-inset);
}

.ml-search-hit:hover {
  border-color: rgba(234, 179, 8, 0.5);
  background: var(--surface-hover);
}

.ml-search-hit strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.ml-search-hit small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* ==========================================================================
   10. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1080px) {
  .ml-digest-grid {
    grid-template-columns: 1fr;
  }
  .ml-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .ml-topbar-inner {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .ml-nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .ml-welcome-wrap,
  .ml-home {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ml-welcome {
    background:
      linear-gradient(180deg, rgba(18, 20, 26, 0.90) 0%, rgba(18, 20, 26, 0.80) 100%),
      url("../img/banner-sanctuary.webp") right center / cover no-repeat;
  }
  .ml-welcome-inner {
    padding: 24px 20px;
  }
  .ml-feature {
    grid-template-columns: 1fr;
  }
  .ml-feature .ml-thumb {
    min-height: 200px;
  }
  .ml-guide-grid,
  .ml-library-list,
  .ml-side,
  .ml-footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .ml-guide {
    grid-template-columns: 1fr;
  }
  .ml-guide .ml-thumb {
    min-height: 165px;
  }
}

/* ==========================================================================
   11. ARTICLE & INNER PAGE TEMPLATES (PROSE, TOC, TRIAGE, TABS, CODE COPY)
   ========================================================================== */
.ml-reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--mana), var(--gold));
  z-index: 250;
  transition: width 0.08s linear;
}

.ml-page-shell {
  max-width: 1360px;
  margin: 24px auto 64px;
  padding: 0 28px;
}

.ml-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ml-breadcrumbs a:hover {
  color: #fde68a;
}

.ml-article-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(290px, 1fr);
  gap: 28px;
  align-items: start;
}

.ml-article-card {
  padding: 32px 34px;
}

.ml-article-head {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.ml-article-head h1 {
  margin: 10px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.18;
  color: #faf7ef;
}

.ml-article-subtitle {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.58;
  color: var(--text-body);
}

.ml-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.ml-article-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 0 0 24px;
}

/* On This Page TOC */
.ml-toc {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-left: 3px solid var(--mana);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 24px;
}

.ml-toc summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--mana-soft);
}

.ml-toc ul {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.ml-toc a {
  color: var(--text-body);
}

.ml-toc a:hover {
  color: #fde68a;
}

/* Article Prose */
.ml-prose {
  font-size: 16px;
  line-height: 1.72;
  color: var(--text-body);
}

.ml-prose h2 {
  margin: 34px 0 14px;
  padding: 8px 14px;
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.10), transparent 80%);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.28;
  color: #faf7ef;
  scroll-margin-top: 86px;
}

.ml-prose h3 {
  margin: 24px 0 10px;
  font-family: var(--font-display);
  font-size: 18.5px;
  color: #fde68a;
}

.ml-prose p {
  margin: 0 0 16px;
}

.ml-prose a:not(.ml-btn) {
  color: var(--mana-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ml-prose a:not(.ml-btn):hover {
  color: #fde68a;
}

.ml-prose a.ml-btn-gold {
  color: #131009;
  text-decoration: none;
}

.ml-prose a.ml-btn-gold:hover {
  color: #131009;
}

.ml-prose ul,
.ml-prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.ml-prose li {
  margin-bottom: 7px;
}

.ml-prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-inset);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fde68a;
}

.ml-prose pre {
  margin: 0;
  padding: 16px;
  padding-top: 34px;
  background: #0b0d12;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}

.ml-prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: #e5e7eb;
  font-size: 13.5px;
  line-height: 1.6;
}

.ml-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 18px 0;
}

.ml-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14.5px;
}

.ml-prose th,
.ml-prose td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.ml-prose th {
  background: var(--surface-inset);
  color: #faf7ef;
  font-weight: 600;
}

/* 1-Click Copy Code Blocks */
.ml-code-wrap {
  position: relative;
  margin: 18px 0;
}

.ml-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: var(--surface);
  color: var(--text-body);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.ml-copy-btn:hover {
  border-color: var(--gold);
  color: #fde68a;
}

/* Callout Boxes (10-Sec Triage, Tip, Warning, Danger) */
.ml-callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--mana);
  background: var(--surface-inset);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 20px 0;
}

.ml-callout-head {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 8px;
  color: var(--mana-soft);
}

.ml-callout.triage {
  border-left-color: var(--mana);
  background: rgba(45, 212, 191, 0.06);
}

.ml-callout.warning {
  border-left-color: var(--gold);
  background: rgba(234, 179, 8, 0.06);
}

.ml-callout.warning .ml-callout-head {
  color: #fde68a;
}

.ml-callout.danger {
  border-left-color: #f87171;
  background: rgba(248, 113, 113, 0.07);
}

.ml-callout.danger .ml-callout-head {
  color: #fca5a5;
}

.ml-callout-body > :last-child {
  margin-bottom: 0;
}

/* Platform Switcher Tabs */
.ml-tabs {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-inset);
  margin: 20px 0;
  overflow: hidden;
}

.ml-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.ml-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ml-tab-btn.active {
  background: var(--surface);
  color: #fde68a;
  border-color: rgba(234, 179, 8, 0.45);
}

.ml-tab-panel {
  padding: 16px 18px;
  display: none;
}

.ml-tab-panel.active {
  display: block;
}

.ml-tab-panel > :last-child {
  margin-bottom: 0;
}

/* Related Guides & Spec Table */
.ml-related {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.ml-related h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 20px;
  color: #faf7ef;
}

.ml-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 24px;
}

.ml-spec-item {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.ml-spec-item span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--mana-soft);
  margin-bottom: 4px;
}

.ml-spec-item strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.ml-contact-box {
  background: var(--surface-inset);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.ml-empty-state {
  padding: 28px 24px;
  text-align: center;
}

.ml-empty-state h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  color: #faf7ef;
}

.ml-empty-state p {
  margin: 0 auto 16px;
  max-width: 540px;
  color: var(--text-muted);
  font-size: 14.5px;
}

@media (max-width: 1080px) {
  .ml-article-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .ml-page-shell {
    padding: 0 16px;
  }
  .ml-article-card {
    padding: 22px 18px;
  }
  .ml-spec-grid {
    grid-template-columns: 1fr;
  }
}

