/* DotNet AI Hub — site stylesheet (no external dependencies) */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f6fb;
  --bg-elev: #ffffff;
  --bg-hover: #f0edfd;
  --text: #1a1c28;
  --text-soft: #3f4459;
  --muted: #62677d;
  --border: #e2e4ee;
  --border-strong: #cfd3e3;
  --brand: #512bd4;
  --brand-strong: #3d1fb0;
  --brand-soft: #f0ebff;
  --link: #4a28c4;
  --accent: #0891b2;
  --inline-code-bg: #f1eff9;
  --inline-code-text: #3b2a8f;
  --shadow: 0 1px 2px rgba(20, 20, 50, 0.05), 0 4px 16px rgba(20, 20, 50, 0.06);
  --shadow-hover: 0 2px 4px rgba(20, 20, 50, 0.06), 0 10px 28px rgba(60, 40, 160, 0.12);
  --tip: #0f766e;
  --tip-bg: #ecfdf8;
  --note: #1d4ed8;
  --note-bg: #eff5ff;
  --warn: #b45309;
  --warn-bg: #fff8eb;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f16;
    --bg-soft: #141722;
    --bg-elev: #181c29;
    --bg-hover: #1f1a38;
    --text: #e8eaf3;
    --text-soft: #c1c6d8;
    --muted: #979db4;
    --border: #272c3d;
    --border-strong: #353b52;
    --brand: #a08bff;
    --brand-strong: #bcadff;
    --brand-soft: #211b3f;
    --link: #b8a6ff;
    --accent: #22d3ee;
    --inline-code-bg: #232842;
    --inline-code-text: #d7ccff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(80, 60, 200, 0.25);
    --tip: #5eead4;
    --tip-bg: #0f2724;
    --note: #93b4ff;
    --note-bg: #131d36;
    --warn: #fcd34d;
    --warn-bg: #2a2110;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d0f16;
  --bg-soft: #141722;
  --bg-elev: #181c29;
  --bg-hover: #1f1a38;
  --text: #e8eaf3;
  --text-soft: #c1c6d8;
  --muted: #979db4;
  --border: #272c3d;
  --border-strong: #353b52;
  --brand: #a08bff;
  --brand-strong: #bcadff;
  --brand-soft: #211b3f;
  --link: #b8a6ff;
  --accent: #22d3ee;
  --inline-code-bg: #232842;
  --inline-code-text: #d7ccff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(80, 60, 200, 0.25);
  --tip: #5eead4;
  --tip-bg: #0f2724;
  --note: #93b4ff;
  --note-bg: #131d36;
  --warn: #fcd34d;
  --warn-bg: #2a2110;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); margin: 0.2em 0 0.4em; }
button, input { font: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 860px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px;
  background: var(--brand); color: #fff; border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.count {
  display: inline-block; min-width: 1.6em; padding: 0 0.45em; border-radius: 999px; font-size: 0.75rem;
  line-height: 1.6; text-align: center; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border);
  font-weight: 600; vertical-align: middle;
}
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; }
.brand:hover { color: var(--text); }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-size: 1.1rem; letter-spacing: -0.02em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  display: inline-block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-soft);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.submenu-toggle { display: none; }
.menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 320px; padding: 10px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.nav-item.has-menu:hover .menu, .nav-item.has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: none; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 2px; }
.menu li a {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-size: 0.92rem;
}
.menu li a .count { margin-left: auto; }
.menu li a:hover { background: var(--bg-hover); color: var(--brand); }
.menu-all { display: block; margin-top: 6px; padding: 8px 10px; border-top: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.nav-search input {
  width: 180px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font-size: 0.9rem;
}
.nav-search input:focus { border-color: var(--brand); background: var(--bg); }
.theme-toggle, .menu-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); cursor: pointer;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--brand); }
.theme-icon { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(90deg, var(--text) 50%, transparent 50%); border: 2px solid var(--text); }
.menu-toggle { display: none; margin-left: auto; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; content: "";
}
.menu-icon::before { position: absolute; top: -6px; }
.menu-icon::after { position: absolute; top: 6px; }

@media (max-width: 1080px) {
  .menu-toggle { display: inline-grid; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px 18px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav-open .site-nav { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-item { flex-wrap: wrap; }
  .nav-link { flex: 1; padding: 10px 12px; }
  .submenu-toggle {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border);
    border-radius: 10px; background: var(--bg-elev); color: var(--text); cursor: pointer;
  }
  .submenu-toggle::before { content: "+"; font-weight: 700; }
  .submenu-open .submenu-toggle::before { content: "–"; }
  .menu {
    position: static; width: 100%; min-width: 0; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; display: none; margin: 4px 0 8px;
  }
  .nav-item.has-menu:hover .menu { display: none; }
  .nav-item.submenu-open .menu, .nav-item.submenu-open:hover .menu { display: block; }
  .nav-search input { width: 100%; }
  .theme-toggle { align-self: flex-start; }
}
@media (min-width: 1081px) and (max-width: 1240px) { .nav-search input { width: 130px; } }

/* ---------- Breadcrumbs & page headers ---------- */
.breadcrumbs ol { list-style: none; margin: 20px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.875rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text-soft); max-width: 44ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-header { padding: 8px 0 12px; max-width: 900px; }
.page-header h1 { margin-top: 0.15em; }
.eyebrow { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.eyebrow a { text-decoration: none; }
.lead { font-size: 1.15rem; color: var(--text-soft); margin: 0 0 0.6em; }
.section-title { font-size: 1.35rem; margin: 2.2rem 0 1rem; }
.intro { max-width: 860px; margin-bottom: 1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(34, 211, 238, 0.35), transparent 60%),
              linear-gradient(135deg, #2a1380 0%, #512bd4 48%, #0e5f86 100%);
}
.hero-inner { padding: 64px 16px 56px; }
@media (min-width: 720px) { .hero-inner { padding: 84px 24px 72px; } }
.hero h1 { color: #fff; max-width: 900px; font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); letter-spacing: -0.02em; }
.hero-lead { font-size: 1.2rem; max-width: 760px; color: rgba(255, 255, 255, 0.9); margin: 0 0 1.6rem; }
.hero-search { display: flex; gap: 8px; max-width: 640px; }
.hero-search input {
  flex: 1; min-width: 0; padding: 14px 18px; border-radius: 12px; border: 0; font-size: 1.05rem;
  color: #1a1c28; background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
.hero-search button, .search-form button {
  padding: 0 22px; border: 0; border-radius: 12px; background: #0b0d18; color: #fff; font-weight: 700; cursor: pointer;
}
.hero-search button:hover { background: #22d3ee; color: #0b0d18; }
.stats { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 12px 36px; }
.stats li { display: flex; flex-direction: column; }
.stats strong { font-size: 1.9rem; line-height: 1.1; }
.stats span { color: rgba(255, 255, 255, 0.82); font-size: 0.92rem; }

/* ---------- Home blocks ---------- */
.home-block { margin: 44px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; font-size: 1.5rem; }
.block-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: -12px; }
.section-card {
  display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow);
  text-decoration: none; color: var(--text); border-top: 4px solid var(--brand);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.section-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--text); }
.section-card-interview-questions { border-top-color: #0891b2; }
.section-card-ai-news { border-top-color: #db2777; }
.section-icon { font-size: 1.8rem; }
.section-name { font-size: 1.2rem; font-weight: 800; }
.section-desc { color: var(--text-soft); font-size: 0.95rem; }
.section-count { margin-top: auto; color: var(--brand); font-weight: 700; font-size: 0.92rem; }
.about-block { max-width: 900px; }

/* ---------- Cards & grids ---------- */
.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-title { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.card-title a::after { content: ""; }
.card-desc { margin: 0; color: var(--text-soft); font-size: 0.93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin: auto 0 0; color: var(--muted); font-size: 0.84rem; }
.cat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cat-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon name" "icon count" "desc desc";
  column-gap: 12px; row-gap: 2px; padding: 16px; border-radius: var(--radius); text-decoration: none;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cat-card:hover { border-color: var(--brand); background: var(--bg-hover); color: var(--text); }
.cat-icon { grid-area: icon; font-size: 1.6rem; line-height: 1; align-self: center; }
.cat-name { grid-area: name; font-weight: 700; line-height: 1.3; }
.cat-count { grid-area: count; color: var(--muted); font-size: 0.85rem; }
.cat-desc { grid-area: desc; margin-top: 8px; color: var(--text-soft); font-size: 0.9rem; }
.cat-grid-compact .cat-card { grid-template-areas: "icon name" "icon count"; }

/* chips, badges, tags */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft);
  font-size: 0.82rem; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.5;
}
button.chip { font-family: inherit; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip-active, .chip[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-active:hover { color: #fff; }
.chip-active .count { background: rgba(255, 255, 255, 0.2); color: #fff; border-color: transparent; }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.02em; background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border);
}
.badge-beginner { background: #e8f8ef; color: #166534; border-color: #bbe8cc; }
.badge-intermediate { background: #e9f1ff; color: #1e40af; border-color: #c4d7fb; }
.badge-advanced { background: #fff2e5; color: #9a3412; border-color: #f7d2b0; }
.badge-senior { background: #f0ebff; color: #4c1d95; border-color: #d9ccfc; }
.badge-lead { background: #e6fafa; color: #115e59; border-color: #b4e9e5; }
.badge-architect { background: #ffe9ef; color: #9f1239; border-color: #f8c6d3; }
.badge-section { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
:root[data-theme="dark"] .badge-beginner, :root[data-theme="dark"] .badge-intermediate, :root[data-theme="dark"] .badge-advanced,
:root[data-theme="dark"] .badge-senior, :root[data-theme="dark"] .badge-lead, :root[data-theme="dark"] .badge-architect {
  background: var(--bg-soft); border-color: var(--border-strong); color: var(--text-soft);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-beginner, :root:not([data-theme="light"]) .badge-intermediate,
  :root:not([data-theme="light"]) .badge-advanced, :root:not([data-theme="light"]) .badge-senior,
  :root:not([data-theme="light"]) .badge-lead, :root:not([data-theme="light"]) .badge-architect {
    background: var(--bg-soft); border-color: var(--border-strong); color: var(--text-soft);
  }
}
.tag-list, .tag-cloud { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 0.82rem; font-weight: 600; text-decoration: none;
}
.tag:hover { background: var(--brand); color: #fff; }
.tag-lg { font-size: 0.95rem; padding: 6px 14px; }

/* filters */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 18px; }
.filter-bar input, .search-form input {
  flex: 1 1 260px; min-width: 0; max-width: 520px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text);
}
.filter-bar input:focus, .search-form input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.empty-note { color: var(--muted); padding: 12px 0; }
.month-group { margin-bottom: 28px; }
.month-title { font-size: 1.1rem; margin: 22px 0 12px; color: var(--text-soft); text-transform: none; }
.cat-blocks { display: grid; gap: 8px; }
.cat-block h2 { font-size: 1.25rem; margin: 26px 0 10px; display: flex; align-items: center; gap: 10px; }
.cat-block h2 a { color: var(--text); text-decoration: none; }
.cat-block h2 a:hover { color: var(--brand); }
.article-list { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; }
.article-list li a { font-weight: 600; text-decoration: none; }
.article-list li a:hover { text-decoration: underline; }
.list-desc { display: block; color: var(--muted); font-size: 0.9rem; }
.cat-nav { margin: 40px 0 24px; }
.cat-nav h2 { font-size: 1.1rem; margin-bottom: 12px; }

/* ---------- Article layout ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 1080px) { .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; } }
.article { min-width: 0; max-width: 860px; }
.article-header { margin-bottom: 18px; }
.article-header h1 { margin: 12px 0 10px; }
.article-desc { font-size: 1.15rem; color: var(--text-soft); margin: 0 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--muted); font-size: 0.9rem; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.meta-item a { color: var(--muted); }
.sidebar { display: none; }
@media (min-width: 1080px) { .sidebar { display: block; } }
.sidebar-inner { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding: 20px 4px 20px 0; scrollbar-width: thin; }
.toc-title, .side-title { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.side-title a { color: var(--muted); text-decoration: none; }
.toc ol { list-style: none; margin: 0 0 24px; padding: 0; border-left: 2px solid var(--border); }
.toc li a {
  display: block; padding: 5px 10px 5px 12px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--text-soft); text-decoration: none; font-size: 0.88rem; line-height: 1.4;
}
.toc li a:hover { color: var(--brand); }
.toc li a.active { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.toc-q { display: inline-block; min-width: 2.2em; font-weight: 800; color: var(--brand); font-size: 0.8rem; }
.side-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-box li a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-soft); text-decoration: none; font-size: 0.88rem; line-height: 1.4; }
.side-box li a:hover { background: var(--bg-hover); color: var(--brand); }
.side-box li.current a { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.toc-mobile { margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.toc-mobile summary { cursor: pointer; padding: 12px 16px; font-weight: 700; }
.toc-mobile .toc { padding: 0 16px 8px; }
.toc-mobile .toc-title { display: none; }
@media (min-width: 1080px) { .toc-mobile { display: none; } }

/* ---------- Prose ---------- */
.prose { font-size: 1.0625rem; line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.prose > p:first-child { font-size: 1.14rem; color: var(--text-soft); }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 1.55rem; margin: 1.9em 0 0.65em; }
.prose h3 { font-size: 1.22rem; margin: 1.8em 0 0.6em; }
.prose h4 { font-size: 1.05rem; margin: 1.5em 0 0.5em; }
.prose .anchor { margin-left: 0.4em; color: var(--border-strong); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity 0.15s; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.2em; }
.prose li { margin: 0.35em 0; }
.prose li > ul, .prose li > ol { margin: 0.3em 0; }
.prose strong { font-weight: 700; color: var(--text); }
.prose a.ext::after { content: "↗"; font-size: 0.8em; margin-left: 2px; text-decoration: none; display: inline-block; }
.prose code {
  font-family: var(--mono); font-size: 0.88em; padding: 0.12em 0.38em; border-radius: 6px;
  background: var(--inline-code-bg); color: var(--inline-code-text); overflow-wrap: anywhere;
}
.prose blockquote { margin: 1.4em 0; padding: 0.4em 1.2em; border-left: 4px solid var(--border-strong); color: var(--text-soft); background: var(--bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.callout { margin: 1.5em 0; padding: 14px 18px; border-radius: var(--radius-sm); border-left: 4px solid; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { margin: 0 0 4px !important; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.callout-tip { background: var(--tip-bg); border-color: var(--tip); }
.callout-tip .callout-title { color: var(--tip); }
.callout-note { background: var(--note-bg); border-color: var(--note); }
.callout-note .callout-title { color: var(--note); }
.callout-warning { background: var(--warn-bg); border-color: var(--warn); }
.callout-warning .callout-title { color: var(--warn); }

/* tables */
.table-wrap { margin: 1.5em 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.93rem; line-height: 1.5; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-soft) 45%, transparent); }

/* code blocks */
.code-block { margin: 1.5em 0; border-radius: var(--radius-sm); overflow: hidden; background: #0d1117; border: 1px solid #1f2633; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 6px 14px; background: #161b22; border-bottom: 1px solid #1f2633; }
.code-lang { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8b949e; }
.copy-btn { font-size: 0.78rem; padding: 3px 10px; border-radius: 6px; border: 1px solid #30363d; background: #21262d; color: #c9d1d9; cursor: pointer; }
.copy-btn:hover { background: #30363d; color: #fff; }
.code-block pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 0.87rem; line-height: 1.6; tab-size: 4; }
.code-block code { font-family: var(--mono); color: #e6edf3; background: none; padding: 0; border-radius: 0; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.tok-k { color: #ff7b72; }
.tok-s { color: #a5d6ff; }
.tok-c { color: #8b949e; font-style: italic; }
.tok-n { color: #79c0ff; }
.tok-t { color: #ffa657; }
.tok-f { color: #d2a8ff; }
.tok-a { color: #7ee787; }
.tok-v { color: #ffa657; }
.tok-p { color: #8b949e; }
.tok-g { color: #7ee787; }

/* special sections */
.prose .md-section:first-of-type h2 { margin-top: 1.4em; }
.section-key-facts, .section-key-takeaways, .section-summary, .section-tl-dr, .section-at-a-glance, .section-how-to-prepare {
  margin: 2em 0; padding: 4px 24px 12px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
}
.section-key-facts h2, .section-key-takeaways h2, .section-summary h2, .section-tl-dr h2, .section-at-a-glance h2, .section-how-to-prepare h2 { font-size: 1.25rem; margin-top: 1em; }
.faq h3 { font-size: 1.1rem; padding-top: 0.8em; border-top: 1px dashed var(--border); }
.faq h3:first-of-type { border-top: 0; }
.layout-interview .qa {
  margin: 2.2em 0; padding: 4px 22px 10px; border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--radius); background: var(--bg-elev); box-shadow: var(--shadow);
}
.layout-interview .qa h2.question { font-size: 1.28rem; margin: 0.9em 0 0.8em; display: flex; gap: 12px; align-items: baseline; }
.q-num {
  flex: none; display: inline-grid; place-items: center; min-width: 2.4em; height: 1.9em; padding: 0 0.4em;
  border-radius: 8px; background: var(--brand); color: #fff; font-size: 0.8em; font-weight: 800;
}
.q-text { flex: 1; }
.layout-interview .qa .anchor { flex: none; }
.layout-interview .qa > p:first-of-type { padding: 12px 16px; background: var(--bg-soft); border-radius: var(--radius-sm); }
.layout-news .section-key-facts ul { margin-bottom: 0.4em; }

/* article footer */
.source-box { margin: 2em 0 0; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--bg-soft); border: 1px solid var(--border); }
.source-box p { margin: 0.2em 0; }
.article-footer { margin: 2.5em 0 1em; padding-top: 1.5em; border-top: 1px solid var(--border); }
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.prev-next { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 640px) { .prev-next { grid-template-columns: 1fr 1fr; } }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; background: var(--bg-elev); }
.pn:hover { border-color: var(--brand); }
.pn-next { text-align: right; grid-column: 2; }
.pn-prev:only-child { grid-column: 1; }
.pn-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.pn-title { font-weight: 700; color: var(--text); }
@media (max-width: 639px) { .pn-next { grid-column: 1; } }
.related { margin: 3em 0 1em; }
.related h2 { font-size: 1.35rem; }

/* ---------- Tags index, sitemap, search ---------- */
.alpha-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 40px; }
.alpha-group h2 { font-size: 1.1rem; margin: 0 0 6px; color: var(--brand); }
.alpha-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.alpha-group a { text-decoration: none; }
.tag-section h2 { font-size: 1.25rem; margin: 30px 0 12px; }
.sm-section { margin: 30px 0; }
.sm-grid { display: grid; gap: 20px 32px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sm-cat h3 { font-size: 1rem; margin: 0 0 6px; }
.sm-cat ul { margin: 0; padding-left: 1.2em; font-size: 0.92rem; display: grid; gap: 3px; }
.inline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.search-form { display: flex; gap: 8px; margin: 10px 0 16px; }
.search-form input { max-width: none; font-size: 1.05rem; padding: 12px 16px; }
.search-form button { background: var(--brand); padding: 0 20px; }
.search-form button:hover { background: var(--brand-strong); }
.search-results { list-style: none; margin: 16px 0 40px; padding: 0; display: grid; gap: 12px; }
.search-results li { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.search-results .r-title { font-size: 1.08rem; font-weight: 700; text-decoration: none; }
.search-results .r-meta { font-size: 0.82rem; color: var(--muted); margin: 4px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search-results .r-desc { margin: 4px 0 0; color: var(--text-soft); font-size: 0.93rem; }
.search-results mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 64px; background: var(--bg-soft); border-top: 1px solid var(--border); color: var(--text-soft); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 24px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-brand { font-weight: 800; font-size: 1.15rem; color: var(--text); margin: 0 0 6px; }
.footer-title { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; }
.footer-title a { color: var(--text); text-decoration: none; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 0.9rem; }
.footer-col a { color: var(--text-soft); text-decoration: none; }
.footer-col a:hover { color: var(--brand); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 18px; padding-bottom: 28px; display: grid; gap: 8px; }
.footer-bottom a { color: var(--text-soft); }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .sidebar, .toc-mobile, .related, .prev-next, .copy-btn, .skip-link, .filter-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .code-block { border: 1px solid #ccc; }
  .article-layout { display: block; }
  a.ext::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* ---------- Refinements ---------- */
.prose.intro > p:first-child { font-size: inherit; }
.prose.intro p { color: var(--text-soft); }
@media (max-width: 600px) {
  .section-key-facts, .section-key-takeaways, .section-summary, .section-tl-dr, .section-at-a-glance, .section-how-to-prepare { padding: 2px 16px 8px; }
  .layout-interview .qa { padding: 2px 14px 8px; }
  .prose ul, .prose ol { padding-left: 1.25em; }
  .prose { font-size: 1.02rem; }
  .prose > p:first-child { font-size: 1.06rem; }
}
