@font-face {
  font-family: "Pangram";
  src: url("../fonts/Pangram-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Pangram";
  src: url("../fonts/Pangram-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Pangram";
  src: url("../fonts/Pangram-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Pangram", "Open Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --page: #191c2d;
  --sidebar: #161928;
  --surface: #1e2237;
  --surface-raised: #242a43;
  --border: rgba(167, 180, 224, 0.12);
  --text: #f3f5ff;
  --muted: #9aa2bd;
  --accent: #6d82ff;
  --accent-bright: #9aa8ff;
  --accent-soft: rgba(109, 130, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 68% -12%, rgba(43, 70, 237, 0.11), transparent 48rem),
    var(--page);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  display: flex;
  width: 258px;
  flex-direction: column;
  padding: 27px 18px 20px;
  border-right: 1px solid var(--border);
  background: rgba(22, 25, 40, 0.94);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 29px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(154, 168, 255, 0.45);
  border-radius: 12px;
  background: linear-gradient(145deg, #354fda, #232d74);
  box-shadow: 0 6px 20px rgba(43, 70, 237, 0.22);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}

.brand-mark--image {
  padding: 3px;
  background: #fff;
}

.brand-mark--image img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

.brand-copy,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 600;
}

.brand-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.site-home-link {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 8px 26px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #a7aec6;
  font-size: 12px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.site-home-link:hover {
  border-color: rgba(109, 130, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.site-home-link span:first-child {
  color: var(--accent-bright);
  font-size: 16px;
}

.sidebar-label {
  padding: 0 11px 10px;
  color: #737d9d;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.navigation {
  display: grid;
  gap: 4px;
}

.nav-link {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #a7aec6;
  font-size: 13px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-link[aria-current="page"] {
  border-color: rgba(109, 130, 255, 0.16);
  background: var(--accent-soft);
  color: var(--accent-bright);
}

.nav-icon {
  width: 17px;
  color: #808aa8;
  font-size: 15px;
  text-align: center;
}

.nav-link[aria-current="page"] .nav-icon {
  color: var(--accent-bright);
}

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: auto 4px 14px;
  padding: 13px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.note-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: #79d4a0;
  box-shadow: 0 0 10px rgba(121, 212, 160, 0.4);
}

.sidebar-version {
  padding: 0 8px;
  color: #68718d;
  font-size: 10px;
}

.main-content {
  min-height: 100vh;
  margin-left: 258px;
}

.topbar {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(24px, 5vw, 72px);
  border-bottom: 1px solid var(--border);
  background: rgba(25, 28, 45, 0.82);
  backdrop-filter: blur(16px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.breadcrumb-divider {
  color: #626b88;
}

.breadcrumb-current {
  color: #e0e4f2;
}

.search-box {
  display: flex;
  width: min(290px, 44vw);
  height: 36px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #828ca8;
  transition: border-color 160ms ease, background 160ms ease;
}

.search-box:focus-within {
  border-color: rgba(109, 130, 255, 0.6);
  background: rgba(255, 255, 255, 0.055);
}

.search-box svg,
.icon-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.search-box input::placeholder {
  color: #7e87a1;
}

.search-box kbd {
  display: grid;
  width: 18px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: #8992ac;
  font-family: inherit;
  font-size: 10px;
}

.menu-button {
  display: none !important;
}

.page-wrap {
  width: min(100%, 1120px);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 54px clamp(24px, 5vw, 72px) 25px;
}

.wiki-status {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 190, 90, 0.35);
  border-radius: 8px;
  background: rgba(255, 190, 90, 0.08);
  color: #ffe0ad;
  font-size: 12px;
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-bright);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow-mark {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(29px, 5vw, 50px);
  border: 1px solid rgba(137, 153, 255, 0.16);
  border-radius: 15px;
  background:
    radial-gradient(ellipse at 94% 18%, rgba(83, 106, 255, 0.22), transparent 42%),
    linear-gradient(120deg, rgba(35, 42, 72, 0.98), rgba(29, 34, 55, 0.96));
  box-shadow: 0 18px 56px rgba(7, 9, 20, 0.18);
}

.hero::after {
  position: absolute;
  top: -90px;
  right: -49px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(157, 170, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(157, 170, 255, 0.035), 0 0 0 70px rgba(157, 170, 255, 0.025);
  content: "";
  pointer-events: none;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 17px 0 13px;
  font-size: clamp(34px, 5vw, 53px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.hero h1 span {
  color: var(--accent-bright);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0;
  color: #aeb6d0;
  font-size: 14px;
  line-height: 1.75;
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.meta-chip {
  padding: 7px 10px;
  border: 1px solid rgba(173, 185, 255, 0.13);
  border-radius: 6px;
  background: rgba(12, 16, 35, 0.2);
  color: #c4cbea;
  font-size: 10px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 42px 0 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  position: relative;
  display: flex;
  min-height: 108px;
  align-items: flex-start;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(34, 39, 62, 0.85), rgba(29, 33, 52, 0.7));
  text-align: left;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 130, 255, 0.4);
  background: linear-gradient(135deg, rgba(39, 47, 78, 0.95), rgba(31, 37, 61, 0.88));
}

.category-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(132, 150, 255, 0.17);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-size: 15px;
}

.category-card-copy {
  min-width: 0;
  padding-top: 2px;
}

.category-card-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.category-card-copy span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.card-arrow {
  margin: 2px 0 0 auto;
  color: #727d9e;
  font-size: 15px;
}

.notice {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  padding: 15px 16px;
  border: 1px solid rgba(109, 130, 255, 0.19);
  border-radius: 9px;
  background: rgba(109, 130, 255, 0.07);
}

.notice-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(109, 130, 255, 0.18);
  color: var(--accent-bright);
  font-size: 12px;
  font-weight: 700;
}

.notice strong {
  display: block;
  margin: 1px 0 4px;
  font-size: 11px;
  font-weight: 600;
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.article-header {
  padding: 9px 0 25px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  margin: 13px 0 9px;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.article-header p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.article-content {
  max-width: 760px;
}

.article-content h2 {
  margin: 31px 0 10px;
  font-size: 17px;
  font-weight: 600;
}

.article-content p {
  margin: 0;
  color: #aab2cb;
  font-size: 12px;
  line-height: 1.75;
}

.article-content .notice {
  margin-top: 24px;
}

.empty-state {
  padding: 32px 18px;
  border: 1px dashed rgba(167, 180, 224, 0.2);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: #dce1f3;
  font-weight: 600;
}

.search-results {
  position: absolute;
  z-index: 4;
  top: 55px;
  right: clamp(24px, 5vw, 72px);
  width: min(370px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(167, 180, 224, 0.17);
  border-radius: 10px;
  background: #22273d;
  box-shadow: 0 16px 42px rgba(5, 7, 16, 0.42);
}

.search-result {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover,
.search-result:focus-visible {
  outline: 0;
  background: rgba(109, 130, 255, 0.1);
}

.search-result strong,
.search-result span {
  display: block;
}

.search-result strong {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
}

.search-result span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.no-results {
  padding: 15px;
  color: var(--muted);
  font-size: 11px;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: #77809b;
  font-size: 10px;
}

.icon-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: #c6cce0;
  cursor: pointer;
}

.icon-button:hover {
  border-color: rgba(109, 130, 255, 0.45);
  color: var(--accent-bright);
}

.sidebar-backdrop {
  display: none;
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .sidebar {
    z-index: 8;
    width: min(285px, calc(100vw - 52px));
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop.is-visible {
    position: fixed;
    z-index: 7;
    inset: 0;
    display: block;
    background: rgba(5, 7, 15, 0.62);
  }

  .main-content {
    margin-left: 0;
  }

  .topbar {
    justify-content: flex-start;
    gap: 12px;
    padding: 0 17px;
  }

  .menu-button {
    display: inline-flex !important;
  }

  .breadcrumbs {
    flex: 1;
    gap: 7px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
  }

  .search-box {
    width: min(220px, 42vw);
  }

  .search-box kbd {
    display: none;
  }

  .page-wrap {
    padding: 31px 19px 20px;
  }

  .search-results {
    top: 55px;
    right: 12px;
  }
}

@media (max-width: 520px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    gap: 10px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .breadcrumbs {
    min-width: 0;
  }

  .search-box {
    width: 100%;
    height: 34px;
    order: 2;
  }

  .menu-button {
    order: 0;
  }

  .page-wrap {
    min-height: calc(100vh - 105px);
    padding-top: 24px;
  }

  .hero {
    padding: 25px 21px;
  }

  .hero::after {
    top: -110px;
    right: -170px;
  }

  .hero-copy {
    font-size: 12px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    margin-top: 32px;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .category-card {
    min-height: 92px;
  }

  .page-footer {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
