@layer reset, base, layout, components, prose, responsive;
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  body,
  h1,
  h2,
  h3,
  p {
    margin: 0;
  }
  button,
  input {
    font: inherit;
  }
  button,
  a {
    -webkit-tap-highlight-color: transparent;
  }
  button {
    cursor: pointer;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  img,
  svg {
    display: block;
  }
  img {
    max-width: 100%;
  }
  button {
    color: inherit;
  }
  button svg,
  a svg {
    flex-shrink: 0;
  }
  svg {
    width: 20px;
    height: 20px;
  }
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
  }
  dialog {
    color: inherit;
  }
  summary {
    cursor: pointer;
  }
  summary::-webkit-details-marker {
    display: none;
  }
}
@layer base {
  :root {
    --bg: #fafbf8;
    --paper: #fff;
    --sidebar: #f4f5f0;
    --ink: #26352c;
    --muted: #5e6a60;
    --faint: #616c5f;
    --line: #e1e6dc;
    --green: #315b43;
    --green-dark: #264936;
    --tint: #eaf0e4;
    --diagram: #f0f3ea;
    --warm: #efe9da;
    --shadow: 0 16px 50px #23362913;
    color-scheme: light;
    font-family:
      -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
      "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-synthesis: none;
  }
  :root[data-theme="dark"] {
    --bg: #171e1a;
    --paper: #202922;
    --sidebar: #1b231e;
    --ink: #e1e8de;
    --muted: #a2aea1;
    --faint: #9aa997;
    --line: #344137;
    --green: #b1cfad;
    --green-dark: #9cbf99;
    --tint: #2d3e30;
    --diagram: #202d23;
    --warm: #3a3828;
    --shadow: 0 16px 50px #0003;
    color-scheme: dark;
  }
  body {
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }
  ::selection {
    background: #c9dfba;
    color: #203c2a;
  }
  :focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 4px;
    border-radius: 3px;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .skip-link {
    position: fixed;
    top: 8px;
    left: 16px;
    transform: translateY(-150%);
    background: var(--green);
    color: var(--bg);
    padding: 10px 20px;
    z-index: 100;
  }
  .skip-link:focus {
    transform: translateY(0);
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 1.6px;
    font-weight: 650;
    line-height: 1.8;
    color: var(--muted);
  }
  h1,
  h2,
  h3 {
    font-weight: 600;
  }
  .text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--green);
  }
  .text-link svg {
    width: 16px;
    height: 16px;
  }
  .text-link:hover {
    color: var(--ink);
  }
  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    min-height: 45px;
    padding: 11px 22px;
    border-radius: 6px;
    font-weight: 550;
    font-size: 13px;
    transition:
      background 0.2s,
      transform 0.2s;
  }
  .button:hover {
    transform: translateY(-2px);
  }
  .button-primary {
    background: var(--green);
    color: var(--bg);
  }
  .button-primary:hover {
    background: var(--green-dark);
  }
  .icon-button {
    background: transparent;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    border-radius: 6px;
  }
  .icon-button:hover {
    background: var(--tint);
  }
  .small-dot {
    color: #8a9d6f;
    margin-left: 3px;
  }
  .back-link {
    font-size: 12px;
    color: var(--muted);
    display: inline-block;
    margin-bottom: 32px;
  }
  .back-link:hover {
    color: var(--green);
  }
}
@layer layout {
  .sidebar {
    width: 240px;
    position: fixed;
    inset: 0 auto 0 0;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 35px 21px 23px;
    z-index: 30;
    overflow-y: auto;
  }
  .page-shell {
    margin-left: 240px;
  }
  .topbar {
    height: 76px;
    border-bottom: 1px solid var(--line);
    padding: 0 42px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .topbar-left,
  .header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .home-main {
    max-width: 1430px;
    margin: auto;
    padding: 0 52px;
  }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(310px, 1fr);
    align-items: center;
    gap: 45px;
    padding: 57px 0 48px;
    border-bottom: 1px solid var(--line);
  }
  .knowledge-section,
  .reading-section {
    padding-top: 42px;
    scroll-margin-top: 100px;
  }
  .category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
  .section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
    gap: 20px;
  }
  .site-footer {
    max-width: 1326px;
    margin: 40px 52px 0;
    padding: 23px 0 25px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--faint);
    font-size: 10px;
  }
  .category-main {
    max-width: 1040px;
    padding: 42px 52px 30px;
    margin: auto;
  }
  .reader-main {
    display: grid;
    grid-template-columns: minmax(0, 780px) 205px;
    gap: 55px;
    max-width: 1170px;
    margin: auto;
    padding: 40px 45px;
  }
  .table-of-contents {
    position: sticky;
    top: 116px;
    align-self: start;
    max-height: calc(100dvh - 145px);
    overflow-y: auto;
    padding-bottom: 20px;
  }
  .reader-column {
    min-width: 0;
  }
  .not-found {
    min-height: 65vh;
    padding: 110px 8%;
  }
  .not-found h1 {
    font-size: 36px;
    margin: 20px 0;
  }
  .not-found p {
    color: var(--muted);
    margin-bottom: 30px;
  }
}
@layer components {
  .brand {
    display: flex;
    gap: 12px;
    align-items: center;
  }
  .brand strong {
    font-size: 22px;
    letter-spacing: -0.8px;
    line-height: 1.2;
    font-weight: 680;
  }
  .brand-dot {
    color: #829c6c;
  }
  .brand small {
    display: block;
    font-size: 10px;
    letter-spacing: 1.2px;
    margin-top: 5px;
    color: var(--muted);
  }
  .brand-symbol {
    width: 33px;
    height: 34px;
    position: relative;
    display: block;
    flex-shrink: 0;
  }
  .brand-symbol i {
    position: absolute;
    width: 25px;
    height: 16px;
    transform: rotate(-30deg) skewX(30deg);
    border: 1.5px solid var(--green);
    border-radius: 2px;
    left: 4px;
    top: 0;
    background: var(--sidebar);
    z-index: 3;
  }
  .brand-symbol i:nth-child(2) {
    top: 8px;
    z-index: 2;
  }
  .brand-symbol i:nth-child(3) {
    top: 16px;
    z-index: 1;
  }
  .sidebar-brand {
    padding: 0 7px 35px;
  }
  .primary-nav {
    display: grid;
    gap: 5px;
    padding-bottom: 29px;
  }
  .primary-nav > a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--muted);
  }
  .primary-nav > a svg {
    width: 17px;
    height: 17px;
  }
  .primary-nav > a:hover,
  .primary-nav > a[aria-current="page"] {
    background: var(--tint);
    color: var(--green);
  }
  .primary-nav > a[aria-current="page"] {
    font-weight: 600;
  }
  .nav-label {
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--faint);
    font-weight: 600;
    padding: 0 10px;
    margin-bottom: 14px;
  }
  .nav-label span {
    display: block;
    margin-top: 3px;
    letter-spacing: 0.6px;
    font-weight: 400;
    font-size: 10px;
  }
  .layer-nav details {
    border-radius: 6px;
    margin-bottom: 4px;
  }
  .layer-nav summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 9px;
    list-style: none;
    font-size: 12px;
    color: var(--muted);
  }
  .layer-nav summary:hover {
    background: var(--tint);
    border-radius: 6px;
  }
  .layer-number {
    font-size: 10px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: var(--faint);
    width: 19px;
  }
  .layer-nav summary > svg {
    margin-left: auto;
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
  }
  .layer-nav details[open] summary > svg {
    transform: rotate(90deg);
  }
  .article-nav {
    display: grid;
    padding: 0 0 7px 14px;
    margin: 0 9px 4px 17px;
    border-left: 1px solid var(--line);
    gap: 2px;
  }
  .article-nav a {
    font-size: 11px;
    line-height: 1.7;
    color: var(--muted);
    padding: 6px;
    border-radius: 3px;
  }
  .article-nav a:hover,
  .article-nav a[aria-current="page"] {
    color: var(--green);
    background: var(--tint);
  }
  .sidebar-bottom {
    font-size: 11px;
    margin-top: auto;
    padding: 45px 10px 0;
    color: var(--muted);
  }
  .status-dot,
  .eyebrow > span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7c966b;
    margin-right: 7px;
  }
  .sidebar-bottom a {
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    color: var(--faint);
  }
  .sidebar-bottom a svg {
    width: 12px;
    height: 12px;
  }
  .breadcrumb {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
  }
  .breadcrumb span {
    margin: 0 13px;
    color: var(--line);
  }
  .breadcrumb strong {
    font-weight: 500;
    color: var(--ink);
  }
  .search-trigger {
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 6px;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 7px 9px;
    color: var(--faint);
    width: 260px;
    text-align: left;
    font-size: 11px;
    min-height: 35px;
  }
  .search-trigger svg {
    width: 15px;
    height: 15px;
  }
  .search-trigger kbd {
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 4px;
    font-size: 10px;
    background: var(--bg);
    font-family: inherit;
  }
  .header-divider {
    height: 18px;
    width: 1px;
    background: var(--line);
  }
  .github-link {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
  }
  .github-link > svg:first-child {
    width: 16px;
    height: 16px;
  }
  .github-link > svg:last-child {
    width: 12px;
    height: 12px;
    color: var(--faint);
  }
  .mobile-menu-trigger {
    display: none;
  }
  .hero-copy .eyebrow {
    font-size: 9px;
    letter-spacing: 1.15px;
    white-space: nowrap;
  }
  .hero h1 {
    font-size: clamp(30px, 3.1vw, 49px);
    letter-spacing: -1.2px;
    line-height: 1.55;
    margin: 19px 0 20px;
    font-weight: 600;
    word-break: keep-all;
  }
  .serif-accent {
    font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
    font-weight: 500;
    color: var(--green);
    position: relative;
  }
  .serif-accent::after {
    content: "";
    position: absolute;
    left: 1px;
    right: 0;
    bottom: -6px;
    height: 8px;
    border-top: 2px solid #a5b391;
    border-radius: 50%;
    transform: rotate(-2deg);
    opacity: 0.7;
  }
  .hero-description {
    font-size: 12px;
    line-height: 2.1;
    color: var(--muted);
    max-width: 460px;
  }
  .hero-actions {
    display: flex;
    gap: 23px;
    align-items: center;
    margin-top: 29px;
    flex-wrap: wrap;
  }
  .hero-actions .text-link {
    font-size: 11px;
  }
  .hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 35px;
    color: var(--muted);
    font-size: 10px;
  }
  .hero-stats > span {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .hero-stats strong {
    font-size: 24px;
    line-height: 1;
    font-weight: 500;
    font-family: "Georgia", serif;
    color: var(--ink);
  }
  .hero-stats .stat-principle {
    border-left: 1px solid var(--line);
    padding-left: 22px;
    font-size: 10px;
    gap: 6px;
  }
  .stat-principle i {
    font-style: normal;
    color: var(--faint);
  }
  .atlas-diagram {
    position: relative;
    background-color: var(--diagram);
    background-image: radial-gradient(#81907628 1px, transparent 1px);
    background-size: 14px 14px;
    padding: 20px 22px 15px;
    border: 1px solid var(--line);
    border-radius: 9px;
    transform: rotate(-1deg);
  }
  .diagram-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font:
      8px ui-monospace,
      SFMono-Regular,
      monospace;
    color: var(--muted);
    letter-spacing: 1.1px;
    margin: 0 0 17px;
  }
  .diagram-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .stack-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 2px 0 #38432905;
  }
  .stack-row > span {
    font:
      9px ui-monospace,
      monospace;
    color: var(--faint);
  }
  .stack-row svg {
    height: 17px;
    width: 17px;
    color: var(--green);
  }
  .stack-row strong {
    font-size: 12px;
    font-weight: 500;
  }
  .stack-row em {
    font-style: normal;
    font-size: 8px;
    color: var(--faint);
    margin-left: auto;
  }
  .stack-app {
    background: var(--green);
    color: var(--bg);
    border-color: var(--green);
  }
  .stack-app > span,
  .stack-app svg,
  .stack-app em {
    color: var(--bg);
    opacity: 0.75;
  }
  .stack-app > svg:last-child {
    margin-left: auto;
    width: 12px;
  }
  .stack-app em {
    margin-left: 0;
  }
  .stack-connector {
    display: flex;
    justify-content: space-around;
    margin-top: -8px;
    margin-bottom: -8px;
    height: 12px;
  }
  .stack-connector i {
    width: 1px;
    background: #81957666;
  }
  .stack-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .stack-pair > a {
    display: grid;
    grid-template-columns: 1fr auto;
    background: var(--paper);
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    gap: 4px;
  }
  .stack-pair > a > span {
    font:
      7px ui-monospace,
      monospace;
    letter-spacing: 0.3px;
    color: var(--faint);
    grid-column: 1/-1;
  }
  .stack-pair strong {
    font-size: 12px;
    font-weight: 500;
    grid-column: 1;
  }
  .stack-pair svg {
    grid-column: 2;
    grid-row: 2;
    width: 18px;
    height: 18px;
    color: var(--green);
  }
  .stack-pair small {
    font-size: 8px;
    color: var(--muted);
    grid-column: 1/-1;
  }
  .stack-foundation > a {
    background: var(--tint);
  }
  .stack-foundation > a:last-child {
    background: var(--warm);
  }
  .diagram-foundation {
    display: flex;
    gap: 7px;
    align-items: center;
    font-size: 9px;
    color: var(--muted);
    margin-top: 14px;
  }
  .diagram-foundation > svg {
    width: 13px;
    height: 13px;
  }
  .diagram-through {
    margin-left: auto;
    font-size: 8px;
    letter-spacing: 1px;
  }
  .atlas-diagram a {
    transition:
      transform 0.2s,
      box-shadow 0.2s;
  }
  .atlas-diagram a:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px #38523918;
  }
  .section-heading h2 {
    font-size: 22px;
    line-height: 1.5;
    letter-spacing: -0.6px;
    margin-top: 6px;
  }
  .section-heading > .text-link {
    margin-bottom: 5px;
    font-size: 11px;
  }
  .category-card {
    background: var(--paper);
    padding: 19px 19px 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    scroll-margin-top: 100px;
    transition:
      border-color 0.2s,
      transform 0.2s,
      box-shadow 0.2s;
  }
  .category-card:hover {
    border-color: #96ab89;
    transform: translateY(-4px);
    box-shadow: var(--shadow);
  }
  .card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
  }
  .category-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    background: var(--tint);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green);
  }
  .category-icon svg {
    width: 20px;
    height: 20px;
  }
  .card-number {
    font:
      10px ui-monospace,
      SFMono-Regular,
      monospace;
    color: var(--faint);
  }
  .category-english {
    font-size: 8px;
    letter-spacing: 0.7px;
    color: var(--faint);
  }
  .category-card h3 {
    font-size: 16px;
    margin: 3px 0 9px;
  }
  .category-card p {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.9;
    min-height: 43px;
  }
  .category-keywords {
    font-size: 9px;
    color: var(--muted);
    display: block;
    letter-spacing: 0.1px;
  }
  .category-card .category-keywords {
    margin-top: 14px;
    margin-bottom: 17px;
    line-height: 1.7;
  }
  .card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding: 12px 0;
    font-size: 10px;
    color: var(--faint);
    margin-top: auto;
  }
  .card-bottom svg {
    width: 16px;
    height: 16px;
    color: var(--green);
  }
  .section-note {
    font-size: 11px;
    color: var(--faint);
    margin-bottom: 5px;
  }
  .reading-paths {
    border-top: 1px solid var(--line);
  }
  .reading-path {
    display: flex;
    align-items: center;
    gap: 25px;
    border-bottom: 1px solid var(--line);
    padding: 24px 6px;
  }
  .path-letter {
    border: 1px solid var(--line);
    width: 38px;
    height: 43px;
    display: grid;
    place-items: center;
    font:
      24px Georgia,
      serif;
    color: var(--green);
    border-radius: 25px 25px 4px 4px;
    background: var(--tint);
    flex-shrink: 0;
  }
  .reading-path:nth-child(2) .path-letter {
    background: var(--warm);
  }
  .path-content {
    flex: 1;
  }
  .path-content h3 {
    font-size: 14px;
    line-height: 1.7;
  }
  .path-content p {
    font-size: 11px;
    color: var(--muted);
    margin: 2px 0 10px;
  }
  .path-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 10px;
  }
  .path-steps a {
    color: var(--green);
    border-bottom: 1px solid transparent;
  }
  .path-steps a:hover {
    border-bottom-color: var(--green);
  }
  .path-steps > span {
    color: var(--faint);
    font-size: 10px;
  }
  .path-icon {
    width: 25px;
    height: 25px;
    margin: 0 18px;
    color: var(--faint);
  }
  .editorial-note {
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 19px;
    background: var(--tint);
    border-radius: 7px;
    padding: 25px;
  }
  .editorial-note > svg {
    width: 24px;
    height: 24px;
    color: var(--green);
    flex-shrink: 0;
  }
  .editorial-note > div {
    flex: 1;
  }
  .editorial-note strong {
    font-size: 12px;
    font-weight: 550;
  }
  .editorial-note p {
    font-size: 10px;
    line-height: 1.9;
    color: var(--muted);
    margin-top: 5px;
    max-width: 630px;
  }
  .editorial-note .text-link {
    font-size: 10px;
    white-space: nowrap;
  }
  .site-footer strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-right: 14px;
    letter-spacing: -0.5px;
  }
  .footer-star {
    color: #8ba173;
    margin: 0 5px;
    font-size: 14px;
  }
  .category-header {
    margin: 10px 0 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--line);
  }
  .large-category-icon {
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    background: var(--tint);
    border-radius: 12px;
    color: var(--green);
    margin-bottom: 20px;
  }
  .large-category-icon svg {
    width: 30px;
    height: 30px;
  }
  .category-header h1 {
    font-size: 38px;
    margin: 10px 0 15px;
  }
  .category-header > p:not(.eyebrow) {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 17px;
  }
  .article-list > a {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    padding: 25px 4px;
  }
  .article-list > a:hover h2 {
    color: var(--green);
  }
  .article-order {
    font:
      13px ui-monospace,
      monospace;
    color: var(--faint);
    padding-top: 6px;
  }
  .article-list > a > div {
    flex: 1;
    min-width: 0;
  }
  .article-list h2 {
    font-size: 20px;
    margin-bottom: 8px;
  }
  .article-list p {
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
    margin-bottom: 9px;
  }
  .article-list div > span {
    font-size: 10px;
    color: var(--faint);
  }
  .article-list > a > svg {
    margin-top: 6px;
    color: var(--green);
  }
  .article-header {
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 30px;
  }
  .article-header h1 {
    font-size: 33px;
    line-height: 1.5;
    margin: 12px 0 20px;
    letter-spacing: -0.7px;
    overflow-wrap: anywhere;
  }
  .article-meta {
    display: flex;
    gap: 17px;
    align-items: center;
    flex-wrap: wrap;
    color: var(--faint);
    font-size: 10px;
  }
  .article-meta span,
  .article-meta a {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .article-meta svg {
    width: 13px;
    height: 13px;
  }
  .article-meta a {
    color: var(--green);
    margin-left: auto;
  }
  .table-of-contents .nav-label {
    padding: 0;
    margin-bottom: 18px;
  }
  .table-of-contents nav {
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
  }
  .table-of-contents a {
    font-size: 10px;
    line-height: 1.7;
    padding: 6px 0 6px 15px;
    color: var(--muted);
    border-left: 2px solid transparent;
    margin-left: -1px;
  }
  .table-of-contents .toc-level-3 {
    padding-left: 25px;
    font-size: 9px;
    color: var(--faint);
  }
  .table-of-contents a:hover,
  .table-of-contents a[aria-current] {
    border-left-color: var(--green);
    color: var(--green);
  }
  .table-of-contents .toc-top {
    display: block;
    margin-top: 18px;
    padding-left: 0;
  }
  .article-pagination {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    border-top: 1px solid var(--line);
    margin-top: 50px;
    padding-top: 24px;
  }
  .article-pagination a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px;
  }
  .article-pagination a:hover {
    border-color: var(--green);
  }
  .article-pagination span {
    font-size: 10px;
    color: var(--muted);
  }
  .article-pagination strong {
    font-size: 12px;
    font-weight: 500;
  }
  .article-source-note {
    font-size: 11px;
    color: var(--faint);
    margin-top: 25px;
  }
  .reading-progress {
    position: fixed;
    left: 240px;
    top: 75px;
    height: 2px;
    background: var(--green);
    z-index: 25;
    width: 0;
    max-width: calc(100% - 240px);
    pointer-events: none;
  }
  .search-dialog {
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    width: min(650px, calc(100% - 28px));
    max-height: min(680px, 80dvh);
    margin: 12dvh auto auto;
    box-shadow: 0 25px 100px #10291b40;
    overflow: hidden;
  }
  .search-dialog::backdrop,
  .mobile-menu::backdrop {
    background: #18281f66;
    backdrop-filter: blur(4px);
  }
  .search-field {
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
  }
  .search-field > svg {
    color: var(--green);
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }
  .search-field input {
    width: 100%;
    background: transparent;
    border: 0;
    min-width: 0;
    color: var(--ink);
    font-size: 14px;
    outline: none;
  }
  .key-button {
    border: 1px solid var(--line);
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg);
    font-size: 10px;
    color: var(--muted);
  }
  .search-status {
    padding: 13px 20px;
    font-size: 11px;
    color: var(--muted);
  }
  .search-results {
    overflow: auto;
    max-height: calc(min(680px, 80dvh) - 155px);
    padding: 0 10px 10px;
  }
  .search-result {
    display: block;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 12px;
    margin-bottom: 5px;
  }
  .search-result:hover,
  .search-result:focus,
  .search-result.is-selected {
    background: var(--tint);
    border-color: var(--line);
    outline: none;
  }
  .result-title {
    font-size: 14px;
    font-weight: 550;
  }
  .result-meta {
    color: var(--faint);
    font-size: 10px;
    margin-top: 4px;
  }
  .result-snippet {
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px;
    line-height: 1.8;
  }
  .search-result mark {
    background: var(--warm);
    color: var(--ink);
    border-radius: 2px;
  }
  .search-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding: 10px 18px;
    color: var(--faint);
    font-size: 10px;
  }
  .search-help kbd {
    font-family: inherit;
    border: 1px solid var(--line);
    padding: 0 4px;
    border-radius: 3px;
    margin: 0 2px;
  }
  .mobile-menu {
    display: none;
  }
  .copy-button {
    position: absolute;
    right: 8px;
    top: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    font-size: 10px;
    padding: 4px 8px;
    z-index: 1;
  }
  .copy-button:hover {
    color: var(--green);
    border-color: var(--green);
  }
}
@layer prose {
  .prose {
    font-size: 14px;
    line-height: 2;
    color: var(--ink);
    overflow-wrap: anywhere;
  }
  .prose > * + * {
    margin-top: 18px;
  }
  .prose h2 {
    font-size: 24px;
    line-height: 1.5;
    margin-top: 45px;
    margin-bottom: 18px;
    letter-spacing: -0.3px;
  }
  .prose h3 {
    font-size: 18px;
    line-height: 1.6;
    margin-top: 30px;
  }
  .prose h4 {
    font-size: 16px;
    margin-top: 25px;
  }
  .prose h2,
  .prose h3,
  .prose h4 {
    scroll-margin-top: 105px;
  }
  .prose a {
    color: var(--green);
    text-decoration: underline;
    text-decoration-color: #9aaf8f80;
    text-underline-offset: 4px;
  }
  .prose a:hover {
    text-decoration-color: var(--green);
  }
  .prose a.heading-anchor {
    margin-left: 8px;
    opacity: 0;
    text-decoration: none;
    font-size: 0.8em;
  }
  .prose h2:hover .heading-anchor,
  .prose h3:hover .heading-anchor,
  .prose .heading-anchor:focus {
    opacity: 1;
  }
  .prose blockquote {
    margin-left: 0;
    margin-right: 0;
    border-left: 3px solid #95a783;
    background: var(--tint);
    padding: 17px 21px;
    font-size: 12px;
    color: var(--muted);
    border-radius: 0 5px 5px 0;
  }
  .prose blockquote p + p {
    margin-top: 12px;
  }
  .prose ul,
  .prose ol {
    padding-left: 24px;
  }
  .prose li {
    margin: 6px 0;
  }
  .prose li > p {
    margin: 5px 0;
  }
  .prose hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 35px 0;
  }
  .prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85em;
    background: var(--tint);
    padding: 2px 5px;
    border-radius: 4px;
  }
  .prose pre {
    position: relative;
    max-width: 100%;
    overflow: auto;
    background: var(--sidebar);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 22px;
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: normal;
  }
  .prose pre.has-copy-button {
    padding-top: 43px;
  }
  .prose pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
  }
  .prose table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.8;
    margin: 25px 0;
  }
  .prose th {
    background: var(--tint);
    text-align: left;
    font-weight: 600;
  }
  .prose td,
  .prose th {
    border: 1px solid var(--line);
    padding: 10px 13px;
    min-width: 90px;
  }
  .prose tbody tr:nth-child(even) {
    background: var(--paper);
  }
  .prose img {
    display: block;
    max-height: 850px;
    object-fit: contain;
    margin: 25px auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
  }
  .prose .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 8px;
    margin: 22px 0;
    font-size: 0.95em;
  }
  .prose .katex {
    font-size: 1.12em;
    overflow-wrap: normal;
  }
  .prose eqn {
    display: block;
    overflow-x: auto;
  }
  .prose strong {
    font-weight: 600;
  }
  .prose .table-wrapper {
    overflow: auto;
    max-width: 100%;
  }
}
@layer responsive {
  .result-title,
  .result-meta,
  .result-snippet {
    display: block;
  }
  .reading-progress {
    width: calc(100% - 240px);
    transform: scaleX(0);
    transform-origin: left;
  }
  .prose h2,
  .prose h3,
  .prose h4 {
    position: relative;
  }
  .prose a.heading-anchor {
    position: absolute;
    left: -21px;
    margin-left: 0;
  }
  @media (max-width: 1250px) {
    .reading-progress {
      width: calc(100% - 215px);
    }
  }
  @media (max-width: 900px) {
    .reading-progress {
      width: calc(100% - 200px);
    }
  }
  @media (max-width: 700px) {
    .reading-progress {
      width: 100%;
    }
    .prose a.heading-anchor {
      left: -17px;
    }
  }
  @media (min-width: 1700px) {
    .site-footer {
      margin-left: auto;
      margin-right: auto;
    }
    .hero {
      padding: 70px 0;
    }
    .hero h1 {
      font-size: 51px;
    }
    .hero-description {
      font-size: 14px;
    }
    .atlas-diagram {
      padding: 25px 30px;
    }
    .stack-row {
      padding: 15px;
    }
    .stack-pair > a {
      padding: 16px;
    }
    .category-card {
      padding: 23px 23px 0;
    }
    .category-card p {
      font-size: 12px;
    }
    .category-card h3 {
      font-size: 19px;
    }
    .card-bottom {
      padding: 15px 0;
    }
  }
  @media (max-width: 1250px) {
    .sidebar {
      width: 215px;
      padding-left: 15px;
      padding-right: 15px;
    }
    .page-shell {
      margin-left: 215px;
    }
    .home-main {
      padding: 0 32px;
    }
    .topbar {
      padding: 0 30px;
    }
    .hero {
      gap: 25px;
      grid-template-columns: 1.12fr 1fr;
    }
    .hero h1 {
      font-size: 34px;
    }
    .hero-copy .eyebrow {
      font-size: 8px;
      letter-spacing: 0.7px;
    }
    .hero-description {
      font-size: 11px;
    }
    .hero-actions {
      gap: 13px;
    }
    .hero-actions .button {
      padding: 10px 17px;
      gap: 15px;
    }
    .hero-actions .text-link {
      font-size: 10px;
      gap: 5px;
    }
    .hero-stats {
      gap: 16px;
    }
    .hero-stats .stat-principle {
      padding-left: 14px;
      font-size: 8px;
      gap: 4px;
    }
    .atlas-diagram {
      padding: 17px 15px;
    }
    .category-card {
      padding: 16px 14px 0;
    }
    .category-keywords {
      font-size: 8px;
    }
    .reader-main {
      gap: 28px;
      padding-left: 32px;
      padding-right: 28px;
      grid-template-columns: minmax(0, 1fr) 175px;
    }
    .article-header h1 {
      font-size: 29px;
    }
    .site-footer {
      margin-left: 32px;
      margin-right: 32px;
    }
    .reading-progress {
      left: 215px;
      max-width: calc(100% - 215px);
    }
  }
  @media (max-width: 1050px) {
    .hero {
      grid-template-columns: 1fr 310px;
    }
    .hero h1 {
      font-size: 30px;
      letter-spacing: -0.6px;
    }
    .hero-stats .stat-principle {
      display: none;
    }
    .hero-description br {
      display: none;
    }
    .hero-actions {
      flex-direction: column;
      align-items: flex-start;
      margin-top: 22px;
      gap: 15px;
    }
    .hero-stats {
      margin-top: 25px;
    }
    .category-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .category-card {
      padding: 22px 22px 0;
    }
    .category-card p {
      min-height: 0;
      font-size: 12px;
    }
    .category-card .category-keywords {
      font-size: 10px;
    }
    .card-top {
      margin-bottom: 15px;
    }
    .table-of-contents {
      display: none;
    }
    .reader-main {
      display: block;
      max-width: 850px;
    }
    .search-trigger {
      width: 220px;
    }
    .section-heading h2 {
      font-size: 20px;
    }
    .section-note {
      font-size: 10px;
    }
    .category-main {
      padding-left: 32px;
      padding-right: 32px;
    }
    .site-footer {
      flex-wrap: wrap;
    }
    .editorial-note .text-link {
      display: none;
    }
  }
  @media (max-width: 900px) {
    .sidebar {
      width: 200px;
      padding-left: 10px;
      padding-right: 10px;
    }
    .page-shell {
      margin-left: 200px;
    }
    .brand strong {
      font-size: 20px;
    }
    .brand {
      gap: 10px;
    }
    .brand small {
      font-size: 9px;
    }
    .hero {
      grid-template-columns: 1fr;
      gap: 30px;
      padding-top: 38px;
    }
    .hero h1 {
      font-size: 40px;
    }
    .hero-description {
      font-size: 13px;
      max-width: 480px;
    }
    .hero-actions {
      flex-direction: row;
      align-items: center;
      gap: 20px;
    }
    .hero-stats {
      margin-top: 26px;
    }
    .hero-stats .stat-principle {
      display: flex;
    }
    .hero-copy .eyebrow {
      font-size: 9px;
      letter-spacing: 1px;
    }
    .atlas-diagram {
      max-width: 490px;
      width: 100%;
      justify-self: center;
      padding: 22px;
    }
    .stack-row {
      padding: 12px 15px;
    }
    .stack-pair > a {
      padding: 15px;
    }
    .stack-row em {
      font-size: 10px;
    }
    .stack-pair > a > span {
      font-size: 8px;
    }
    .stack-row strong,
    .stack-pair strong {
      font-size: 13px;
    }
    .search-trigger {
      width: 36px;
      min-height: 36px;
      padding: 0;
      justify-content: center;
      border: 0;
      background: transparent;
    }
    .search-trigger > span,
    .search-trigger kbd {
      display: none;
    }
    .header-actions {
      gap: 8px;
    }
    .topbar {
      padding: 0 25px;
    }
    .section-note {
      display: none;
    }
    .reading-progress {
      left: 200px;
      max-width: calc(100% - 200px);
    }
  }
  @media (max-width: 700px) {
    .sidebar {
      display: none;
    }
    .page-shell {
      margin-left: 0;
    }
    .topbar {
      height: 62px;
      padding: 0 16px;
      gap: 10px;
    }
    .topbar-left {
      gap: 7px;
    }
    .mobile-menu-trigger {
      display: inline-flex;
    }
    .breadcrumb {
      font-size: 11px;
    }
    .breadcrumb span {
      margin: 0 8px;
    }
    .github-link > span,
    .github-link > svg:last-child {
      display: none;
    }
    .github-link {
      padding: 9px;
    }
    .header-divider {
      display: none;
    }
    .header-actions {
      gap: 3px;
    }
    .home-main {
      padding: 0 23px;
    }
    .hero {
      padding: 34px 0 30px;
      gap: 32px;
    }
    .hero h1 {
      font-size: 37px;
      margin-top: 15px;
      line-height: 1.5;
    }
    .hero-copy .eyebrow {
      font-size: 7.5px;
      letter-spacing: 1px;
    }
    .hero-description {
      font-size: 12px;
    }
    .hero-actions {
      gap: 18px;
    }
    .hero-actions .text-link {
      font-size: 10px;
    }
    .hero-stats .stat-principle {
      font-size: 8px;
    }
    .hero-stats {
      gap: 23px;
    }
    .atlas-diagram {
      padding: 20px;
      transform: rotate(-0.7deg);
    }
    .knowledge-section,
    .reading-section {
      padding-top: 32px;
    }
    .section-heading {
      margin-bottom: 20px;
      gap: 10px;
    }
    .section-heading h2 {
      font-size: 20px;
    }
    .section-heading > .text-link {
      font-size: 9px;
      gap: 4px;
      white-space: nowrap;
    }
    .section-heading > .text-link svg {
      width: 12px;
    }
    .eyebrow {
      font-size: 8px;
      letter-spacing: 1px;
    }
    .category-grid {
      gap: 12px;
    }
    .category-card {
      padding: 17px 15px 0;
    }
    .category-card h3 {
      font-size: 16px;
    }
    .category-card p {
      font-size: 11px;
      min-height: 42px;
    }
    .category-card .category-keywords {
      font-size: 8px;
      min-height: 27px;
      margin-top: 12px;
      margin-bottom: 12px;
    }
    .category-english {
      font-size: 7px;
      letter-spacing: 0.35px;
    }
    .card-top {
      margin-bottom: 15px;
    }
    .category-icon {
      width: 32px;
      height: 32px;
    }
    .reading-path {
      gap: 16px;
      padding: 23px 2px;
    }
    .path-letter {
      width: 32px;
      height: 39px;
      font-size: 21px;
    }
    .path-content h3 {
      font-size: 13px;
    }
    .path-content p {
      font-size: 10px;
    }
    .path-steps {
      font-size: 9px;
      gap: 6px;
    }
    .path-icon {
      display: none;
    }
    .editorial-note {
      margin-top: 30px;
      padding: 20px;
      gap: 14px;
      align-items: flex-start;
    }
    .editorial-note > svg {
      width: 20px;
      height: 20px;
    }
    .site-footer {
      margin: 30px 23px 0;
      gap: 10px;
      align-items: flex-start;
      flex-direction: column;
      padding: 20px 0;
    }
    .site-footer strong {
      font-size: 12px;
    }
    .site-footer {
      font-size: 9px;
    }
    .mobile-menu[open] {
      display: flex;
      flex-direction: column;
      position: fixed;
      inset: 0 auto 0 0;
      margin: 0;
      height: 100dvh;
      max-height: 100dvh;
      width: min(310px, 85vw);
      max-width: 85vw;
      background: var(--sidebar);
      border: 0;
      border-right: 1px solid var(--line);
      padding: 35px 23px 25px;
      overflow: auto;
    }
    .mobile-close {
      position: absolute;
      right: 9px;
      top: 6px;
    }
    .mobile-menu .sidebar-brand {
      padding-top: 5px;
    }
    .mobile-menu .brand strong {
      font-size: 24px;
    }
    .mobile-menu .primary-nav > a,
    .mobile-menu .layer-nav summary {
      font-size: 14px;
      padding-top: 12px;
      padding-bottom: 12px;
    }
    .mobile-menu .article-nav a {
      font-size: 12px;
    }
    .mobile-menu .sidebar-bottom {
      padding-top: 30px;
    }
    .category-main {
      padding: 30px 23px;
    }
    .category-header h1 {
      font-size: 32px;
    }
    .category-header > p:not(.eyebrow) {
      font-size: 13px;
    }
    .article-list > a {
      gap: 16px;
      padding: 23px 0;
    }
    .article-list h2 {
      font-size: 17px;
    }
    .article-list p {
      font-size: 11px;
    }
    .reader-main {
      padding: 25px 23px;
    }
    .article-header h1 {
      font-size: 27px;
      line-height: 1.5;
    }
    .article-header .back-link {
      margin-bottom: 25px;
    }
    .article-meta {
      gap: 12px;
      font-size: 9px;
    }
    .article-meta a {
      margin-left: 0;
    }
    .article-header {
      margin-bottom: 23px;
    }
    .prose {
      font-size: 14px;
      line-height: 1.95;
    }
    .prose h2 {
      font-size: 22px;
      margin-top: 35px;
    }
    .prose h3 {
      font-size: 18px;
    }
    .prose blockquote {
      padding: 13px 15px;
    }
    .prose td,
    .prose th {
      padding: 8px 11px;
      font-size: 11px;
    }
    .prose .katex-display {
      font-size: 0.85em;
    }
    .article-pagination {
      gap: 10px;
    }
    .article-pagination a {
      padding: 13px;
    }
    .article-pagination strong {
      font-size: 11px;
    }
    .reading-progress {
      left: 0;
      top: 61px;
      max-width: 100%;
    }
    .search-dialog {
      margin-top: 6dvh;
      max-height: 85dvh;
    }
    .search-field {
      padding: 15px 12px;
      gap: 8px;
    }
    .search-field input {
      font-size: 12px;
    }
    .search-results {
      max-height: calc(85dvh - 155px);
    }
    .search-help {
      font-size: 9px;
      padding: 9px 12px;
    }
    .not-found {
      padding: 85px 25px;
    }
    .not-found h1 {
      font-size: 28px;
    }
  }
  @media (max-width: 370px) {
    .hero h1 {
      font-size: 31px;
    }
    .hero-stats {
      gap: 14px;
    }
    .hero-stats .stat-principle {
      padding-left: 10px;
    }
    .hero-actions {
      gap: 12px;
    }
    .category-card {
      padding: 14px 11px 0;
    }
    .category-card .category-keywords {
      font-size: 7px;
    }
    .section-heading h2 {
      font-size: 18px;
    }
    .section-heading > .text-link {
      font-size: 8px;
    }
    .home-main {
      padding: 0 18px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
      transition: none !important;
      animation: none !important;
    }
  }
  @media print {
    .sidebar,
    .topbar,
    .table-of-contents,
    .site-footer,
    .article-pagination,
    .copy-button,
    .reading-progress {
      display: none !important;
    }
    .page-shell {
      margin: 0;
    }
    .reader-main {
      display: block;
      padding: 0;
      max-width: 100%;
    }
    :root {
      --bg: #fff;
      --ink: #000;
      --muted: #444;
      --line: #ddd;
      --tint: #f4f4f4;
      --green: #222;
    }
    .prose table {
      display: table;
      font-size: 10px;
    }
    .prose a {
      color: inherit;
    }
    .prose pre,
    .prose img {
      break-inside: avoid;
    }
    .article-header .back-link {
      display: none;
    }
  }
}
