:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #eaf6fb;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --cyan: #06b6d4;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    Manrope,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(247, 249, 252, 0.92);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr) minmax(280px, 380px) auto;
  gap: 18px;
  align-items: center;
  max-width: var(--max);
  min-height: 74px;
  margin: 0 auto;
  padding: 12px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 225px;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-nav a,
.mega summary {
  min-height: 38px;
  padding: 9px 11px;
  border-radius: var(--radius);
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  list-style: none;
}

.desktop-nav a:hover,
.mega summary:hover,
.mega[open] summary {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.mega {
  position: relative;
}

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

.mega-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 20;
  display: grid;
  width: min(560px, calc(100vw - 44px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.mega-panel a {
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--border);
  background: #fbfdff;
}

.mega-panel a span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.header-search {
  position: relative;
}

.header-search input,
.hero-search input,
.search,
.control {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.header-search input,
.search,
.hero-search input {
  padding: 10px 13px;
}

.control {
  padding: 10px 12px;
}

.header-search input:focus,
.hero-search input:focus,
.search:focus,
.control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.quick-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 30;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.quick-results a {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.quick-results a:last-child {
  border-bottom: 0;
}

.quick-results strong {
  display: block;
  font-size: 14px;
}

.quick-results span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.button,
.icon-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.button {
  padding: 10px 14px;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-hover);
}

.button.secondary,
.button.ghost,
.icon-button {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover,
.button.ghost:hover,
.icon-button:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}

.icon-button {
  width: 42px;
  padding: 0;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, calc(100vh - 74px));
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 249, 252, 0.98) 0%, rgba(247, 249, 252, 0.88) 42%, rgba(247, 249, 252, 0.18) 100%),
    linear-gradient(0deg, rgba(247, 249, 252, 1) 0%, rgba(247, 249, 252, 0) 36%);
}

.hero-content,
.hero-stats {
  position: relative;
  width: min(var(--max), calc(100% - 44px));
  margin: 0 auto;
}

.hero-content {
  padding: 80px 0 46px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--text-2);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(220px, 520px) auto;
  gap: 10px;
  max-width: 780px;
  margin-top: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 820px;
  margin-top: 14px;
}

.quick-tags a {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.quick-tags a:hover {
  border-color: var(--primary);
  background: var(--surface);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 32px;
}

.hero-stats div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(10px);
}

.hero-stats strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section,
.event-workspace {
  padding: 64px 22px;
}

.section {
  background: var(--bg);
}

.section.muted {
  background: var(--surface-2);
}

.section-head,
.event-title-head {
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(260px, 1fr);
  gap: 28px;
  align-items: end;
  max-width: var(--max);
  margin: 0 auto 24px;
}

.section-head h2,
.event-title-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-head p,
.event-title-head p {
  margin: 0;
  color: var(--text-2);
}

.bento-grid,
.role-grid,
.topic-grid,
.material-grid,
.learning-grid,
.account-grid,
.trust-grid,
.knowledge-layout,
.article-demo {
  max-width: var(--max);
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(190px, auto);
  gap: 14px;
}

.bento-card,
.role-card,
.topic-card,
.material-card,
.course-card,
.practice-card,
.account-panel,
.trust-grid article,
.map-notes article,
.event-list,
.detail,
.filters,
.article-demo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.bento-card {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 20px;
  text-decoration: none;
}

.bento-card:hover,
.role-card:hover,
.course-card:hover,
.practice-card:hover,
.account-panel:hover {
  border-color: rgba(37, 99, 235, 0.42);
  transform: translateY(-2px);
}

.bento-card.large {
  grid-column: span 2;
  grid-row: span 2;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.12)),
    var(--surface);
}

.bento-card.tall {
  grid-row: span 2;
}

.card-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.bento-card h3,
.role-card h3,
.course-card h3,
.practice-card h3,
.account-panel h3,
.map-notes h3 {
  margin: 10px 0 8px;
  font-size: 21px;
  letter-spacing: 0;
}

.bento-card p,
.role-card p,
.course-card p,
.practice-card p,
.account-panel p,
.map-notes p {
  margin: 0;
  color: var(--text-2);
}

.card-meta {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mini-graph {
  position: relative;
  min-height: 120px;
  margin-top: 22px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent 49%, rgba(37, 99, 235, 0.18) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(6, 182, 212, 0.18) 50%, transparent 51%),
    var(--surface-2);
}

.mini-graph span {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.22);
}

.mini-graph span:nth-child(1) { left: 22%; top: 22%; }
.mini-graph span:nth-child(2) { left: 62%; top: 18%; background: var(--cyan); }
.mini-graph span:nth-child(3) { left: 44%; top: 50%; background: var(--warning); }
.mini-graph span:nth-child(4) { left: 76%; top: 70%; }
.mini-graph span:nth-child(5) { left: 18%; top: 72%; background: var(--success); }

.role-grid,
.topic-grid,
.material-grid,
.learning-grid,
.account-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.topic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.material-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.learning-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-card,
.topic-card,
.material-card,
.course-card,
.practice-card,
.account-panel,
.trust-grid article,
.map-notes article {
  padding: 20px;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.level {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.level.beginner { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.level.middle { background: rgba(37, 99, 235, 0.12); color: var(--primary); }
.level.advanced { background: rgba(245, 158, 11, 0.16); color: #a16207; }
.level.expert { background: rgba(220, 38, 38, 0.12); color: var(--danger); }

.role-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.role-card li {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.topic-card h3,
.material-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.topic-card p,
.material-card p {
  margin: 0 0 16px;
  color: var(--text-2);
}

.material-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.event-workspace {
  background: #fbfdff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.event-layout {
  display: grid;
  grid-template-columns: minmax(220px, 268px) minmax(360px, 1fr) minmax(340px, 500px);
  gap: 16px;
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
}

.filters,
.detail {
  position: sticky;
  top: 92px;
}

.filters {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.metric {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.metric strong {
  display: block;
  font-size: 25px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.event-list {
  overflow: hidden;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.list-head h3 {
  margin: 0;
}

.result-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: #fbfdff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.active {
  background: #eff6ff;
}

.event-id {
  font-weight: 900;
  white-space: nowrap;
}

.event-title strong {
  display: block;
}

.event-title span,
.log-cell,
.mitre-cell {
  color: var(--muted);
  font-size: 13px;
}

.event-title span {
  display: block;
  margin-top: 3px;
}

.severity {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.severity.medium {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
}

.severity.high {
  background: rgba(245, 158, 11, 0.16);
  color: #a16207;
}

.severity.critical {
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger);
}

.detail {
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 18px;
}

.detail-head,
.code-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.tag-row,
.field-list,
.source-list,
.mitre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row {
  margin: 14px 0 18px;
}

.tag,
.field-chip,
.mitre-chip,
.source-link {
  max-width: 100%;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.tag,
.field-chip {
  padding: 6px 9px;
  background: var(--surface-2);
  color: var(--muted);
}

.mitre-chip {
  padding: 7px 10px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.source-link {
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  color: var(--primary);
  text-decoration: none;
}

.detail-section,
.code-head {
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.detail-section h4,
.code-head h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.detail-section p {
  margin: 0;
  color: var(--text-2);
}

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

.tab-group {
  display: inline-grid;
  grid-template-columns: repeat(2, 64px);
  min-height: 34px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.tab.active {
  background: var(--primary);
  color: #fff;
}

.code-block,
.code-snippet pre {
  overflow: auto;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  font-family: "JetBrains Mono", "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}

.code-block {
  min-height: 230px;
  max-height: 360px;
  margin: 10px 0 0;
}

.code-block code {
  display: block;
  padding: 14px;
  white-space: pre;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(280px, 380px);
  gap: 16px;
  align-items: stretch;
}

.knowledge-canvas {
  min-height: 390px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px;
  box-shadow: var(--shadow-card);
}

.knowledge-canvas svg {
  width: 100%;
  height: 100%;
  min-height: 350px;
}

.links line {
  stroke: rgba(37, 99, 235, 0.28);
  stroke-width: 3;
}

.node circle {
  fill: #fff;
  stroke: rgba(37, 99, 235, 0.38);
  stroke-width: 3;
  filter: drop-shadow(0 10px 14px rgba(15, 23, 42, 0.1));
}

.node.main circle {
  fill: #eff6ff;
  stroke: var(--primary);
}

.node text {
  fill: var(--text);
  font-size: 16px;
  font-weight: 850;
  text-anchor: middle;
}

.map-notes {
  display: grid;
  gap: 14px;
}

.term-day {
  border-color: rgba(37, 99, 235, 0.26) !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.1)), var(--surface) !important;
}

.term-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.term-actions a {
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.term-actions a:hover {
  border-color: var(--primary);
}

.article-demo {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 22px;
}

.toc {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfdff;
}

.toc a {
  color: var(--primary);
  font-size: 14px;
  text-decoration: none;
}

.article-body {
  max-width: 760px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.article-body h3 {
  margin: 16px 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.article-body p,
.article-body li {
  color: var(--text-2);
  font-size: 18px;
}

.callout {
  margin: 22px 0;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: #eff6ff;
}

.callout p {
  margin: 6px 0 0;
}

.code-snippet {
  margin: 22px 0;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #1e293b;
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #172033;
  color: var(--code-text);
  font-size: 13px;
  font-weight: 850;
}

.copy-button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(226, 232, 240, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--code-text);
  cursor: pointer;
  font-weight: 850;
}

.code-snippet pre {
  margin: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.code-snippet code {
  display: block;
  padding: 16px;
  white-space: pre;
}

.takeaways {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfdff;
}

.takeaways h4 {
  margin: 0 0 8px;
}

.takeaways ul {
  margin: 0;
  padding-left: 20px;
}

.progress {
  height: 10px;
  overflow: hidden;
  margin: 18px 0;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

.practice-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.practice-card dl div {
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.practice-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.practice-card dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.status-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}

.status {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.status.ok { background: var(--success); }
.status.warn { background: var(--warning); }

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

.trust-grid h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.trust-grid p {
  margin: 0;
  color: var(--text-2);
}

.mobile-nav {
  display: none;
}

.footer {
  padding: 28px 22px 34px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(160px, 220px));
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
}

.footer p {
  margin: 5px 0 0;
  color: var(--muted);
}

.footer nav {
  display: grid;
  gap: 8px;
}

.footer a {
  color: var(--primary);
  font-weight: 850;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: auto minmax(220px, 1fr) auto;
  }

  .desktop-nav {
    display: none;
  }

  .event-layout {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  }

  .detail {
    position: static;
    grid-column: 1 / -1;
    max-height: none;
  }

  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-grid,
  .material-grid,
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body {
    padding-bottom: 64px;
  }

  .site-header {
    position: static;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header-search {
    grid-column: 1 / -1;
  }

  .header-actions .button {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 48px 0 30px;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .section-head,
  .event-title-head,
  .event-layout,
  .knowledge-layout,
  .article-demo,
  .learning-grid,
  .account-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    padding-bottom: 24px;
  }

  .filters {
    position: static;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .toc {
    position: static;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
  }

  .mobile-nav a {
    min-height: 50px;
    display: grid;
    place-items: center;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
  }

  .mobile-nav a:hover {
    background: var(--surface-2);
    color: var(--primary);
  }
}

@media (max-width: 620px) {
  .header-inner,
  .section,
  .event-workspace {
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .hero-content,
  .hero-stats {
    width: calc(100% - 32px);
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-stats,
  .bento-grid,
  .role-grid,
  .topic-grid,
  .material-grid,
  .trust-grid,
  .metric-grid,
  .detail-grid,
  .practice-card dl {
    grid-template-columns: 1fr;
  }

  .bento-card.large,
  .bento-card.tall {
    grid-column: auto;
    grid-row: auto;
  }

  .detail-head,
  .code-head,
  .list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tab-group {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
