:root {
  --ink: #17231c;
  --muted: #5a6860;
  --paper: #f4f6f4;
  --surface: #ffffff;
  --line: #d4ddd7;
  --deep: #0b1410;
  --green: #2f7d55;
  --green-dark: #173e2a;
  --green-soft: #e3f1e8;
  --amber: #a66d11;
  --blue: #285f8f;
  --code: #101a14;
  --content: 760px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
}

a {
  color: var(--green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--green);
}

.skip-link:focus {
  top: 12px;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: #1e2b24;
  z-index: 30;
}

.reading-progress span {
  display: block;
  height: 100%;
  background: #72d99b;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  color: #f2f7f3;
  background: rgba(11, 20, 16, 0.96);
  border-bottom: 1px solid #2a3d32;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #f2f7f3;
  font-weight: 720;
  text-decoration: none;
}

.brand:hover {
  color: #ffffff;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--deep);
  background: #72d99b;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 800;
}

.top-links {
  display: flex;
  gap: 24px;
}

.top-links a {
  color: #c8d6ce;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.top-links a:hover {
  color: #ffffff;
}

.home-hero {
  position: relative;
  min-height: 390px;
  display: flex;
  align-items: flex-end;
  background-image: url("licheerv-nano.jpg");
  background-position: center 55%;
  background-size: cover;
  color: #ffffff;
}

.home-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(6, 15, 10, 0.72);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 50px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #58a878;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 760;
  text-transform: uppercase;
}

.home-hero .eyebrow {
  color: #9ee2b9;
}

.home-hero h1 {
  max-width: 770px;
  margin: 0;
  color: #ffffff;
  font-size: 52px;
  line-height: 1.05;
}

.home-hero p:not(.eyebrow) {
  max-width: 710px;
  margin: 22px 0 0;
  color: #d7e2db;
  font-size: 21px;
  line-height: 1.55;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 9px 15px;
  border: 1px solid #9ee2b9;
  border-radius: 5px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 720;
  text-decoration: none;
}

.hero-links .primary-link {
  color: var(--deep);
  background: #9ee2b9;
}

.hero-links .secondary-link {
  background: rgba(11, 20, 16, 0.5);
}

.chapter-heading {
  padding: 64px max(24px, calc((100vw - 1180px) / 2));
  background: #e8eee9;
  border-bottom: 1px solid var(--line);
}

.chapter-heading h1 {
  max-width: 860px;
  margin: 0;
  font-size: 43px;
  line-height: 1.12;
}

.chapter-heading > p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.chapter-meta {
  margin-top: 22px;
  color: #718078;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  text-transform: uppercase;
}

.docs-shell {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  grid-template-columns: 258px minmax(0, var(--content));
  gap: 72px;
  justify-content: start;
}

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 116px);
  padding: 44px 0;
  overflow-y: auto;
}

.sidebar-label {
  margin: 0 0 12px;
  color: #718078;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.chapter-links {
  display: grid;
  gap: 3px;
}

.chapter-links a {
  padding: 7px 10px;
  border-left: 2px solid transparent;
  color: #536259;
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
}

.chapter-links a:hover {
  color: var(--ink);
  background: #e8eee9;
}

.chapter-links a.active {
  border-left-color: var(--green);
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 720;
}

.sidebar-note {
  display: grid;
  gap: 5px;
  margin-top: 26px;
  padding: 14px;
  border: 1px solid #bdd2c4;
  border-radius: 6px;
  background: #edf6f0;
  font-size: 13px;
  line-height: 1.5;
}

.sidebar-note span {
  color: var(--muted);
}

.content {
  min-width: 0;
  padding: 52px 0 80px;
}

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

.content h2 {
  margin: 52px 0 15px;
  font-size: 28px;
  line-height: 1.25;
}

.content h3 {
  margin: 34px 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

.content p,
.content li {
  color: #2d3b33;
}

.content strong {
  color: var(--ink);
}

.content img,
.content svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.content blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--amber);
  color: #4c412f;
}

.content code {
  padding: 0.13em 0.32em;
  border-radius: 4px;
  background: #e6ece8;
  color: #214e36;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.content pre {
  max-width: 100%;
  margin: 24px 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid #293b31;
  border-radius: 6px;
  background: var(--code);
  color: #e6f0e9;
  line-height: 1.55;
}

.content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  overflow-wrap: normal;
}

.content table {
  display: block;
  width: 100%;
  margin: 26px 0;
  overflow-x: auto;
  border-collapse: collapse;
  background: var(--surface);
}

.content th,
.content td {
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.content th {
  color: var(--ink);
  background: #e8eee9;
  font-size: 14px;
}

.mermaid {
  margin: 30px 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
}

.chapter-footer {
  display: grid;
  margin-top: 70px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.chapter-direction {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
}

.chapter-direction span {
  color: #718078;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.chapter-direction strong {
  color: var(--green-dark);
  line-height: 1.35;
}

.chapter-direction.next {
  text-align: right;
}

.chapter-direction:hover {
  border-color: #91ad9b;
}

.chapter-direction.spacer {
  visibility: hidden;
}

.mobile-nav {
  display: none;
}

.site-footer {
  padding: 28px 24px;
  color: #a6b6ac;
  background: var(--deep);
  font-size: 13px;
  text-align: center;
}

.site-footer p {
  max-width: 760px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  body {
    font-size: 16px;
  }

  .topbar {
    padding: 0 18px;
  }

  .top-links {
    gap: 16px;
  }

  .home-hero {
    min-height: 350px;
    background-position: 48% center;
  }

  .hero-content {
    width: calc(100% - 36px);
    padding: 44px 0 38px;
  }

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

  .home-hero p:not(.eyebrow) {
    font-size: 18px;
  }

  .chapter-heading {
    padding: 46px 20px 42px;
  }

  .chapter-heading h1 {
    font-size: 34px;
  }

  .chapter-heading > p:not(.eyebrow) {
    font-size: 18px;
  }

  .mobile-nav {
    display: block;
    margin: 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
  }

  .mobile-nav summary {
    padding: 12px 14px;
    color: var(--green-dark);
    cursor: pointer;
    font-weight: 720;
  }

  .mobile-chapter-links {
    display: grid;
    padding: 0 12px 12px;
  }

  .mobile-chapter-links a {
    padding: 8px 6px;
    border-top: 1px solid #edf0ee;
    color: #536259;
    font-size: 14px;
    text-decoration: none;
  }

  .mobile-chapter-links a.active {
    color: var(--green-dark);
    font-weight: 720;
  }

  .docs-shell {
    display: block;
    width: min(100% - 36px, var(--content));
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 30px 0 60px;
  }

  .content h2 {
    margin-top: 42px;
    font-size: 25px;
  }

  .content pre {
    padding: 16px;
    font-size: 13px;
  }

  .chapter-footer {
    grid-template-columns: 1fr;
  }

  .chapter-direction.next {
    text-align: left;
  }

  .chapter-direction.spacer {
    display: none;
  }
}

@media (max-width: 430px) {
  .brand span:last-child {
    display: none;
  }

  .top-links a:first-child {
    display: none;
  }

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

  .hero-links {
    display: grid;
  }

  .hero-links a {
    justify-content: center;
  }

  .content th,
  .content td {
    min-width: 132px;
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
