:root {
  color-scheme: dark;
  --sidebar-width: 264px;
  --bg: #141617;
  --bg-deep: #0d0f10;
  --surface: #1d1f20;
  --surface-raised: #222425;
  --surface-hover: #292c2e;
  --border: #303336;
  --border-soft: #272a2c;
  --text: #f5f6f7;
  --text-soft: #d5d7da;
  --muted: #a6a9ae;
  --muted-dark: #777b81;
  --blue: #1268f5;
  --blue-bright: #3b82f6;
  --blue-soft: rgba(18, 104, 245, 0.14);
  --orange: #ff6b3d;
  --teal: #35d6c3;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

button,
input {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

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

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

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: white;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(100%, 1350px);
  margin-inline: auto;
  padding-inline: 40px;
}

.app-shell {
  min-height: 100vh;
}

.app-main {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.sidebar {
  position: fixed;
  z-index: 80;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  border-right: 1px solid var(--border-soft);
  background: var(--bg-deep);
}

.sidebar-inner {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 4px;
}

.brand {
  display: flex;
  width: 142px;
  height: 52px;
  align-items: center;
}

.brand img {
  width: 142px;
  height: auto;
}

.sidebar-close {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
}

.sidebar-close svg,
.menu-button svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.sidebar-close:focus {
  outline: none;
}

.sidebar-close:focus-visible {
  box-shadow: 0 0 0 3px rgba(18, 104, 245, 0.24);
}

.sidebar-search {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  margin: 8px 12px 16px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #141617;
  color: var(--muted);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.sidebar-search:hover,
.sidebar-search:focus-visible {
  border-color: #484c50;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.sidebar-search > svg {
  width: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.sidebar-search > .search-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

kbd {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid #404347;
  border-radius: 4px;
  background: #2b2e30;
  color: #babdc1;
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  box-shadow: inset 0 -1px rgba(0, 0, 0, 0.3);
}

.keyboard-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.keyboard-shortcut kbd {
  width: 20px;
  min-width: 20px;
  padding: 0;
  border-color: #3b3f42;
  background: #282b2d;
  color: #c3c6ca;
}

.sidebar-nav {
  flex: 1;
  padding: 0 8px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #373a3d transparent;
  scrollbar-width: thin;
}

.sidebar-browse {
  margin-bottom: 8px;
}

.sidebar-nav-divider {
  height: 1px;
  margin: 0 12px 12px;
  background: var(--border-soft);
}

.sidebar-group + .sidebar-group {
  margin-top: 4px;
}

.sidebar-category-row {
  display: block;
}

.sidebar-category {
  display: flex;
  min-width: 0;
  min-height: 40px;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: #b5b8bc;
  font-size: 14px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease;
}

.sidebar-category:hover,
.sidebar-category.is-active {
  background: var(--surface-raised);
  color: var(--text);
}

.sidebar-category-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: #92969b;
}

.sidebar-category.is-active .sidebar-category-icon,
.sidebar-category:hover .sidebar-category-icon,
.sidebar-group.is-open .sidebar-category-icon {
  color: var(--blue-bright);
}

.sidebar-category span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-category-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #686c71;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: color 160ms ease, transform 160ms ease;
}

.sidebar-category:hover .sidebar-category-chevron,
.sidebar-category.is-active .sidebar-category-chevron {
  color: #aeb2b7;
}

.sidebar-group.is-open .sidebar-category-chevron {
  transform: rotate(90deg);
}

.sidebar-articles[hidden] {
  display: none;
}

.sidebar-articles {
  display: grid;
  gap: 4px;
  padding: 4px 0 8px 20px;
}

.sidebar-article {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border-radius: var(--radius-sm);
  color: #8f9398;
  font-size: 13px;
  line-height: 1.35;
  transition: background 160ms ease, color 160ms ease;
}

.sidebar-article:hover,
.sidebar-article.is-active {
  background: var(--blue-soft);
  color: #dce8ff;
}

.sidebar-article > span:first-child:empty {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 50%;
  background: #4e5256;
}

.sidebar-article.is-active > span:first-child:empty {
  background: var(--blue-bright);
}

.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-deep);
}

.dashboard-link {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease;
}

.dashboard-link:hover {
  background: var(--surface);
  color: var(--text);
}

.dashboard-link svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  border-bottom: 1px solid rgba(48, 51, 54, 0.74);
  background: rgba(20, 22, 23, 0.86);
  backdrop-filter: blur(16px);
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.topbar-title {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-search {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}

.topbar-search:hover {
  border-color: #4a4e52;
  color: var(--text);
}

.topbar-search svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

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

.button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-soft);
}

.button-secondary:hover {
  border-color: #4c5054;
  background: var(--surface-raised);
}

.button-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.home-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #151718;
  background-size: 48px 48px;
}

.hero-glow {
  position: absolute;
  top: -240px;
  left: 50%;
  width: 680px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 104, 245, 0.2), rgba(18, 104, 245, 0) 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.home-hero-inner {
  position: relative;
  display: flex;
  min-height: 440px;
  max-width: 920px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9cbfff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(53, 214, 195, 0.8);
}

.home-hero h1 {
  max-width: 720px;
  margin: 16px 0 8px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.home-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-search {
  display: flex;
  width: min(100%, 720px);
  min-height: 64px;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 8px 8px 8px 20px;
  border: 1px solid #3c4043;
  border-radius: var(--radius-lg);
  background: rgba(31, 33, 34, 0.94);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.hero-search:focus-within {
  border-color: rgba(59, 130, 246, 0.78);
  box-shadow: var(--shadow), 0 0 0 3px rgba(18, 104, 245, 0.14);
}

.hero-search > svg {
  width: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: #7f8389;
  stroke-width: 1.8;
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.hero-search input::placeholder {
  color: #777b81;
}

.hero-search-hint {
  color: #777b81;
  font-size: 12px;
}

.hero-search button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  flex: 0 0 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  color: white;
  transition: background 160ms ease, transform 160ms ease;
}

.hero-search button:hover {
  background: #2677f7;
  transform: translateX(2px);
}

.hero-search button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.category-section {
  padding: 64px 0 96px;
}

.category-container {
  max-width: 1060px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading span {
  color: var(--blue-bright);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0;
  color: var(--muted-dark);
  font-size: 13px;
}

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

.category-card {
  position: relative;
  display: flex;
  min-height: 136px;
  align-items: center;
  gap: 16px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.018), transparent), var(--surface);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.category-card:hover {
  border-color: rgba(59, 130, 246, 0.55);
  background: var(--surface-raised);
  transform: translateY(-2px);
}

.category-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  flex: 0 0 48px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: #5f95fb;
}

.category-icon .icon {
  width: 24px;
  height: 24px;
}

.category-card-copy {
  display: grid;
  gap: 4px;
}

.category-card-copy strong {
  color: var(--text);
  font-size: 16px;
}

.category-card-copy > span {
  color: var(--muted);
  font-size: 13px;
}

.card-arrow {
  width: 20px;
  margin-left: auto;
  fill: none;
  stroke: #65696e;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 160ms ease, transform 160ms ease;
}

.category-card:hover .card-arrow {
  stroke: var(--blue-bright);
  transform: translateX(4px);
}

.page-wrap {
  max-width: 1000px;
  min-height: calc(100vh - 160px);
  padding-top: 48px;
  padding-bottom: 96px;
}

.breadcrumbs {
  color: var(--muted-dark);
  font-size: 13px;
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li:last-child span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs a:hover {
  color: var(--text-soft);
}

.breadcrumbs svg {
  width: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 64px 0 40px;
}

.category-icon-large {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  border-radius: var(--radius-lg);
}

.category-icon-large .icon {
  width: 32px;
  height: 32px;
}

.category-header h1 {
  margin: 4px 0 0;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.category-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.article-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.article-row {
  display: grid;
  min-height: 104px;
  grid-template-columns: 48px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  transition: background 160ms ease;
}

.article-row + .article-row {
  border-top: 1px solid var(--border-soft);
}

.article-row:hover {
  background: var(--surface-raised);
}

.article-index {
  color: #5d6267;
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.article-row-copy {
  display: grid;
  gap: 4px;
}

.article-row-copy strong {
  color: var(--text);
  font-size: 15px;
}

.article-row-copy span {
  display: -webkit-box;
  max-width: 680px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.article-row-arrow {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #73777c;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.article-row:hover .article-row-arrow {
  border-color: rgba(59, 130, 246, 0.55);
  color: var(--blue-bright);
  transform: translateX(2px);
}

.article-row-arrow svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.article-layout {
  display: grid;
  max-width: 1200px;
  grid-template-columns: minmax(0, 780px) 220px;
  justify-content: center;
  gap: 64px;
  padding-top: 48px;
  padding-bottom: 96px;
}

.article-main {
  min-width: 0;
}

.article-header {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border-soft);
}

.article-topic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 999px;
  background: var(--blue-soft);
  color: #91b6ff;
  font-size: 12px;
  font-weight: 700;
}

.article-topic-icon {
  width: 16px;
  height: 16px;
}

.article-header h1 {
  max-width: 760px;
  margin: 16px 0 24px;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.article-meta > div {
  display: grid;
}

.article-meta strong {
  color: var(--text-soft);
  font-size: 13px;
}

.article-meta span {
  color: var(--muted-dark);
  font-size: 12px;
}

.article-content {
  padding: 40px 0 64px;
  color: #bdc0c5;
  font-size: 16px;
  line-height: 1.72;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content p {
  margin: 0 0 20px;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--text);
  line-height: 1.25;
  scroll-margin-top: 96px;
}

.article-content h2 {
  margin: 48px 0 16px;
  font-size: 28px;
  letter-spacing: -0.025em;
}

.article-content h3 {
  margin: 32px 0 12px;
  font-size: 20px;
}

.article-content h4 {
  margin: 24px 0 12px;
  font-size: 17px;
}

.article-content strong {
  color: #e9eaec;
}

.article-content a {
  color: #78a7ff;
  text-decoration: underline;
  text-decoration-color: rgba(120, 167, 255, 0.4);
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: #a6c4ff;
  text-decoration-color: currentColor;
}

.article-content ul,
.article-content ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.article-content li {
  margin: 8px 0;
  padding-left: 4px;
}

.article-content li::marker {
  color: var(--blue-bright);
}

.article-content li p {
  margin: 0;
}

.article-content blockquote {
  position: relative;
  margin: 32px 0;
  padding: 20px 24px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: var(--radius);
  background: rgba(18, 104, 245, 0.08);
  color: #c8d8f7;
}

.article-content blockquote::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue-bright);
  content: "";
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content details {
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, background 160ms ease;
}

.article-content details:hover {
  border-color: #44484c;
  background: var(--surface-raised);
}

.article-content details[open] {
  border-color: rgba(59, 130, 246, 0.45);
  background: var(--surface-raised);
}

.article-content summary {
  position: relative;
  display: flex;
  min-height: 64px;
  align-items: center;
  padding: 16px 64px 16px 20px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  list-style: none;
}

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

.article-content summary::after {
  position: absolute;
  top: 50%;
  right: 20px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #414549;
  border-radius: 50%;
  background: #26292b;
  color: var(--muted);
  content: "+";
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.article-content details[open] summary {
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.article-content details[open] summary::after {
  border-color: rgba(59, 130, 246, 0.52);
  background: var(--blue-soft);
  color: #9bbdff;
  content: "−";
}

.article-content summary:focus-visible {
  outline: 3px solid rgba(18, 104, 245, 0.3);
  outline-offset: -3px;
}

.article-content [data-type="detailsContent"] {
  padding: 20px 24px 4px;
}

.article-content [data-type="detailsContent"] p:empty {
  display: none;
}

.article-content [data-type="detailsContent"] > :last-child {
  margin-bottom: 20px;
}

.article-content img {
  display: block;
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.article-content iframe,
.article-content video {
  width: 100%;
  max-width: 100%;
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.article-content .iframe-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 32px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.article-content .iframe-wrapper > iframe {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.article-content .table-scroll {
  width: 100%;
  margin: 32px 0;
  overflow-x: auto;
}

.article-content table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.article-content th,
.article-content td {
  min-width: 160px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.article-content th:not(:last-child),
.article-content td:not(:last-child) {
  border-right: 1px solid var(--border);
}

.article-content th,
.article-content tr:first-child td {
  border-bottom-color: #3d5275;
  background: linear-gradient(135deg, #1c3358, #172946);
  color: #e1ebff;
  font-size: 13px;
  font-weight: 700;
}

.article-content tr:last-child td {
  border-bottom: 0;
}

.article-content th p,
.article-content td p {
  margin: 0;
}

.article-content tbody tr:not(:first-child) td {
  transition: background 160ms ease;
}

.article-content tbody tr:not(:first-child):hover td {
  background: rgba(255, 255, 255, 0.025);
}

.article-content code {
  padding: 2px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: #b9d0ff;
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace;
}

.article-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 128px);
  padding-left: 20px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}

.article-toc > strong {
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-toc nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.article-toc a {
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.45;
  transition: color 160ms ease;
}

.article-toc a:hover,
.article-toc a.is-active {
  color: #91b6ff;
}

.article-toc .toc-h3 {
  padding-left: 12px;
}

.article-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.article-pagination a {
  display: grid;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, background 160ms ease;
}

.article-pagination a:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: var(--surface-raised);
}

.article-pagination .next {
  text-align: right;
}

.article-pagination span {
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-pagination strong {
  color: var(--text-soft);
  font-size: 13px;
}

.site-footer {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 40px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted-dark);
  font-size: 12px;
}

.site-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-mark {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.site-footer a:hover {
  color: var(--text-soft);
}

.search-dialog {
  width: min(720px, calc(100% - 40px));
  max-height: min(720px, calc(100vh - 80px));
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text);
  box-shadow: var(--shadow);
}

.search-dialog::backdrop {
  background: rgba(3, 5, 6, 0.76);
  backdrop-filter: blur(4px);
}

.search-panel {
  overflow: hidden;
  border: 1px solid #414549;
  border-radius: var(--radius-lg);
  background: #191b1c;
}

.search-form {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.search-form > svg {
  width: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: var(--blue-bright);
  stroke-width: 1.8;
}

.search-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
}

.search-form input::placeholder {
  color: #6f7378;
}

.search-close {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 11px;
}

.search-status {
  padding: 12px 16px 8px;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-results {
  max-height: min(520px, calc(100vh - 280px));
  padding: 4px 8px 12px;
  overflow-y: auto;
}

.search-result {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.search-result:hover,
.search-result.is-active {
  border-color: rgba(59, 130, 246, 0.25);
  background: var(--blue-soft);
}

.search-result-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--blue-bright);
}

.search-result-icon svg,
.search-result-arrow {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-result-copy {
  display: grid;
  gap: 2px;
}

.search-result-copy strong {
  color: var(--text-soft);
  font-size: 14px;
}

.search-result-copy span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted-dark);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.search-result-arrow {
  color: #65696e;
}

.search-empty {
  padding: 48px 24px 64px;
  color: var(--muted);
  text-align: center;
}

.search-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 16px;
}

.search-footer {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted-dark);
  font-size: 11px;
}

.search-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-scrim {
  display: none;
}

.error-page {
  display: flex;
  min-height: calc(100vh - 144px);
  max-width: 760px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 80px;
}

.error-code {
  color: var(--blue-bright);
  font: 700 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.error-page h1 {
  margin: 16px 0 8px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.error-page p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.error-page > div {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 440ms ease, transform 440ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1180px) {
  .article-layout {
    grid-template-columns: minmax(0, 780px);
  }

  .article-toc {
    display: none;
  }
}

@media (max-width: 1024px) {
  .app-main {
    margin-left: 0;
  }

  .sidebar {
    inset: 0 0 0 auto;
    width: min(340px, calc(100vw - 40px));
    border-right: 0;
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 64px rgba(0, 0, 0, 0.4);
    transform: translateX(104%);
    transition: transform 220ms ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-button {
    display: grid;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.64);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  body.sidebar-open .sidebar-scrim {
    opacity: 1;
    visibility: visible;
  }

  .topbar {
    padding-inline: 20px;
  }

  .topbar-title {
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 20px;
  }

  .topbar {
    min-height: 64px;
    padding: 12px 16px;
  }

  .topbar-search {
    display: none;
  }

  .topbar-actions .button span,
  .topbar-actions .button svg {
    display: none;
  }

  .topbar-actions .button {
    min-height: 36px;
    padding-inline: 12px;
  }

  .home-hero-inner {
    min-height: 400px;
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .home-hero h1 {
    font-size: 40px;
  }

  .home-hero p {
    font-size: 15px;
  }

  .hero-search {
    min-height: 56px;
    margin-top: 24px;
    padding: 4px 4px 4px 16px;
  }

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

  .hero-search button {
    width: 48px;
    height: 48px;
  }

  .category-section {
    padding: 48px 0 64px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

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

  .category-card {
    min-height: 112px;
    padding: 20px;
  }

  .page-wrap,
  .article-layout {
    padding-top: 32px;
    padding-bottom: 64px;
  }

  .breadcrumbs ol {
    overflow: hidden;
  }

  .breadcrumbs li:last-child {
    min-width: 0;
  }

  .category-header {
    align-items: flex-start;
    gap: 16px;
    padding: 48px 0 32px;
  }

  .category-icon-large {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .category-icon-large .icon {
    width: 24px;
  }

  .category-header h1 {
    font-size: 36px;
  }

  .category-header p {
    font-size: 13px;
  }

  .article-row {
    min-height: 88px;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 12px;
    padding: 16px;
  }

  .article-index {
    display: none;
  }

  .article-row-copy span {
    -webkit-line-clamp: 2;
  }

  .article-layout {
    display: block;
  }

  .article-header {
    padding: 40px 0 32px;
  }

  .article-header h1 {
    margin-bottom: 20px;
    font-size: 36px;
  }

  .article-content {
    padding: 32px 0 48px;
    font-size: 15px;
  }

  .article-content h2 {
    margin-top: 40px;
    font-size: 24px;
  }

  .article-content h3 {
    margin-top: 32px;
    font-size: 19px;
  }

  .article-content blockquote {
    margin: 24px 0;
    padding: 16px 20px;
  }

  .article-content details {
    margin: 12px 0;
  }

  .article-content summary {
    min-height: 56px;
    padding: 16px 56px 16px 16px;
    font-size: 15px;
  }

  .article-content summary::after {
    right: 16px;
  }

  .article-content [data-type="detailsContent"] {
    padding: 16px 20px 4px;
  }

  .article-content img,
  .article-content iframe {
    margin: 24px 0;
  }

  .article-content .iframe-wrapper {
    margin: 24px 0;
  }

  .article-pagination {
    grid-template-columns: 1fr;
  }

  .article-pagination > span:empty {
    display: none;
  }

  .article-pagination .next {
    text-align: left;
  }

  .site-footer {
    padding: 20px;
  }

  .search-dialog {
    width: calc(100% - 24px);
    max-height: calc(100vh - 24px);
  }

  .search-form {
    min-height: 64px;
  }

  .search-results {
    max-height: calc(100vh - 220px);
  }

  .search-footer {
    display: none;
  }

  .error-page > div {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
