:root {
  color-scheme: light;
  --bg: #fafafa;
  --fg: #171717;
  --muted: #686868;
  --border: #dedede;
  --surface: #f0f0f0;
  --hover: #f3f3f3;
  --focus: #454545;
  --header-height: 62px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0d0d0d;
    --fg: #ededed;
    --muted: #a3a3a3;
    --border: #303030;
    --surface: #181818;
    --hover: #191919;
    --focus: #d8d8d8;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --fg: #ededed;
  --muted: #a3a3a3;
  --border: #303030;
  --surface: #181818;
  --hover: #191919;
  --focus: #d8d8d8;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--fg); }
button, select { font: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--fg); color: var(--bg); }
.visually-hidden { 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; z-index: 60; left: 16px; top: -100px; padding: 10px 15px; background: var(--fg); color: var(--bg); }
.skip-link:focus { top: 10px; }

.masthead { position: sticky; top: 0; z-index: 30; height: var(--header-height); border-bottom: 1px solid var(--border); background: var(--bg); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 42px; }
.wordmark { font-size: 14px; font-weight: 750; letter-spacing: .105em; }
.wordmark-period, .title-period { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 32px; height: 100%; }
.github-link { font-size: 12px; font-weight: 600; transition: opacity .16s ease; }
.github-link:hover { opacity: .56; }
.github-link span { margin-left: 3px; }
.theme-control { display: inline-flex; align-items: center; }
.theme-control select { appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 600; padding: 8px 16px 8px 4px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23888888'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; }
.theme-control select:hover { color: var(--fg); }

.home { max-width: 900px; padding: 0 48px 72px; margin: 0 auto; }
.home-intro { padding: 114px 0 72px; }
.eyebrow { margin: 0; font-size: 11px; font-weight: 650; letter-spacing: .18em; color: var(--muted); }
.eyebrow span { margin: 0 8px; }
.home-intro h1 { max-width: 800px; margin: 27px 0 26px; font-size: clamp(42px, 5.6vw, 72px); font-weight: 570; line-height: 1.095; letter-spacing: -.058em; }
.home-description { max-width: 495px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.home-count { margin: 35px 0 0; font-size: 12px; color: var(--muted); }
.home-count span { padding: 0 6px; }
.index-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 24px 0 31px; border-top: 1px solid var(--fg); }
.index-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; font-weight: 650; }
.index-heading > span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.index-group { display: grid; grid-template-columns: minmax(150px, 29%) 1fr; gap: 20px; padding: 29px 0 42px; border-top: 1px solid var(--border); }
.index-group h3 { margin: 8px 0 0; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.index-rows { min-width: 0; }
.skill-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 12px 20px; margin: 0 -12px; border-bottom: 1px solid var(--border); transition: background .17s ease; }
.skill-row:first-child { padding-top: 6px; }
.skill-row:last-child { border-bottom: 0; }
.skill-row:hover, .skill-row:focus-visible { background: var(--hover); }
.row-copy { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.row-copy strong { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.row-copy > span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.row-arrow { flex: none; color: var(--muted); font-size: 19px; transition: transform .17s ease, color .17s ease; }
.skill-row:hover .row-arrow, .skill-row:focus-visible .row-arrow { color: var(--fg); transform: translate(2px, -2px); }
.home-footer { display: flex; justify-content: space-between; gap: 16px; padding-top: 25px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.home-footer a, .source-section a, .not-found a { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border); }
.home-footer a:hover, .source-section a:hover, .not-found a:hover { text-decoration-color: var(--fg); }

.doc-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: calc(100vh - var(--header-height)); }
.sidebar { position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--border); scrollbar-width: thin; }
.sidebar-inner { padding: 41px 19px 70px 30px; }
.sidebar-home { display: flex; justify-content: space-between; padding: 0 10px 34px; color: var(--fg); font-size: 13px; font-weight: 650; }
.sidebar-home span { color: var(--muted); }
.nav-group { margin-bottom: 28px; }
.nav-group h2 { margin: 0 10px 10px; color: var(--muted); font-size: 10px; letter-spacing: .115em; line-height: 1.5; text-transform: uppercase; font-weight: 700; overflow-wrap: anywhere; }
.nav-group ul { list-style: none; padding: 0; margin: 0; }
.nav-group a { display: block; padding: 8px 10px; border-radius: 5px; font-size: 13px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; transition: background .16s ease, color .16s ease; }
.nav-group a:hover { background: var(--hover); color: var(--fg); }
.nav-group a[aria-current="page"] { color: var(--fg); background: var(--surface); font-weight: 600; }
.doc-main { min-width: 0; width: 100%; max-width: 860px; margin: 0 auto; padding: 84px 54px 110px; }
.doc-main article { max-width: 740px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 27px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .045em; }
.breadcrumb a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span { opacity: .6; }
.doc-intro { padding-bottom: 52px; border-bottom: 1px solid var(--border); }
.doc-intro h1 { margin: 0 0 21px; font-size: clamp(40px, 5vw, 62px); font-weight: 580; letter-spacing: -.055em; line-height: 1.09; overflow-wrap: anywhere; }
.doc-lede { max-width: 640px; margin: 0; font-size: 19px; line-height: 1.65; letter-spacing: -.018em; color: var(--muted); }
.doc-lede a { text-decoration: underline; text-underline-offset: 3px; }
.prose { padding-top: 22px; font-size: 15px; line-height: 1.85; overflow-wrap: break-word; }
.prose h2, .source-section h2 { margin: 58px 0 20px; font-size: 22px; font-weight: 630; line-height: 1.35; letter-spacing: -.03em; scroll-margin-top: 90px; }
.prose h3 { margin: 42px 0 14px; font-size: 17px; font-weight: 630; line-height: 1.4; letter-spacing: -.02em; scroll-margin-top: 90px; }
.prose h4 { margin: 30px 0 12px; font-size: 15px; font-weight: 650; scroll-margin-top: 90px; }
.prose p { margin: 0 0 20px; }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 26px; }
.prose li { padding-left: 3px; margin: 7px 0; }
.prose li > ul, .prose li > ol { margin: 8px 0 12px; }
.prose strong { font-weight: 660; }
.prose a { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--fg); }
.prose blockquote { border-left: 2px solid var(--border); margin: 24px 0; padding: 1px 0 1px 22px; color: var(--muted); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code, .home code { border-radius: 3px; padding: .12em .3em; background: var(--surface); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .87em; }
.prose pre { max-width: 100%; padding: 18px 20px; margin: 24px 0 32px; overflow-x: auto; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); line-height: 1.65; font-size: 12px; }
.prose pre code { padding: 0; border-radius: 0; background: none; font-size: inherit; }
.install-rail { margin-top: 38px; }
.install-label, .requirements-label { margin: 0 0 9px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; }
.install-command { display: flex; align-items: stretch; max-width: 620px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.install-command code { flex: 1; min-width: 0; padding: 13px 16px; border-radius: 0; background: none; overflow-x: auto; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12.5px; line-height: 1.5; white-space: nowrap; -webkit-user-select: all; user-select: all; }
.copy-button { flex: none; min-width: 90px; padding: 0 16px; border: 0; border-left: 1px solid var(--border); border-radius: 0 4px 4px 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 650; letter-spacing: .14em; text-align: center; text-transform: uppercase; transition: background .16s ease, color .16s ease; }
.copy-button:hover { background: var(--hover); color: var(--fg); }
.copy-button[data-state="copied"] { color: var(--fg); }
.requirements { max-width: 620px; margin-top: 36px; }
.requirement-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.requirement-list li { display: flex; flex-direction: column; gap: 9px; padding: 16px 0 18px; border-bottom: 1px solid var(--border); }
.requirement-list p { margin: 0; font-size: 14px; line-height: 1.5; }
.requirement-name { font-weight: 600; letter-spacing: -.012em; }
.requirement-note { color: var(--muted); }
.requirement-list code { max-width: 100%; padding: 9px 12px; overflow-x: auto; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 1.5; white-space: nowrap; -webkit-user-select: all; user-select: all; }
.copy-button[data-state="copied"]::after { content: "."; color: var(--muted); }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 28px 0; font-size: 13px; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
.source-section { margin-top: 74px; padding: 30px 0 50px; border-top: 1px solid var(--border); }
.source-section h2 { margin: 0 0 11px; font-size: 18px; }
.source-section p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.source-section a { font-size: 13px; font-weight: 600; }
.page-turn { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 25px; border-top: 1px solid var(--border); }
.page-turn a { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.page-turn a:last-child { text-align: right; }
.page-turn span { color: var(--muted); font-size: 11px; }
.page-turn strong { font-size: 14px; font-weight: 580; overflow-wrap: anywhere; }
.page-turn a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.menu-toggle, .nav-scrim { display: none; }
.not-found { max-width: 730px; margin: 0 auto; padding: 130px 40px; }
.not-found h1 { margin: 25px 0 12px; font-weight: 560; font-size: clamp(36px, 5vw, 58px); letter-spacing: -.05em; }
.not-found > p:not(.eyebrow) { color: var(--muted); font-size: 16px; line-height: 1.7; }
.not-found a { display: inline-block; margin-top: 32px; font-size: 13px; font-weight: 600; }

@media (max-width: 980px) {
  .doc-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar-inner { padding-left: 19px; padding-right: 14px; }
  .doc-main { padding: 70px 36px 100px; }
}

@media (max-width: 760px) {
  :root { --header-height: 58px; }
  .masthead-inner { padding: 0 24px; }
  .header-actions { gap: 18px; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; order: 2; width: 34px; height: 34px; padding: 7px; border: 0; background: transparent; cursor: pointer; }
  .menu-toggle span { display: block; height: 1.5px; width: 20px; background: var(--fg); }
  .theme-control { order: 1; }
  .github-link { order: 0; }
  .doc-shell { display: block; }
  .sidebar { position: fixed; top: var(--header-height); left: 0; z-index: 25; width: min(310px, 85vw); height: calc(100dvh - var(--header-height)); background: var(--bg); visibility: hidden; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.is-open { visibility: visible; transform: translateX(0); }
  .nav-scrim:not([hidden]) { display: block; position: fixed; z-index: 20; inset: var(--header-height) 0 0; width: 100%; background: rgba(0, 0, 0, .48); border: 0; cursor: pointer; }
  body.nav-open { overflow: hidden; }
  .doc-main { max-width: 720px; padding: 62px 30px 90px; }
  .home { padding: 0 30px 65px; }
  .home-intro { padding: 94px 0 64px; }
  .index-group { grid-template-columns: 145px 1fr; }
}

@media (max-width: 550px) {
  .masthead-inner { padding: 0 20px; }
  .header-actions { gap: 13px; }
  .home { padding: 0 22px 55px; }
  .home-intro { padding: 80px 0 56px; }
  .home-intro h1 { margin-top: 22px; font-size: clamp(40px, 10vw, 52px); }
  .home-description { font-size: 14px; }
  .index-group { display: block; padding: 27px 0 34px; }
  .index-group h3 { margin: 0 0 17px; }
  .skill-row { padding: 15px 9px 17px; margin: 0 -9px; }
  .skill-row:first-child { padding-top: 12px; border-top: 1px solid var(--border); }
  .doc-main { padding: 50px 23px 80px; }
  .doc-intro { padding-bottom: 38px; }
  .doc-intro h1 { font-size: 43px; }
  .doc-lede { font-size: 17px; }
  .prose { font-size: 14px; }
  .prose h2 { margin-top: 46px; }
  .github-link { font-size: 11px; }
  .home-footer { flex-wrap: wrap; }
  .install-command { flex-direction: column; }
  .copy-button { min-width: 0; padding: 12px 16px; border-top: 1px solid var(--border); border-left: 0; border-radius: 0 0 4px 4px; text-align: left; }
}

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