@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  color-scheme: light;
  --paper: #fff;
  --surface: #f7f8fa;
  --ink: #182225;
  --muted: #4b5a61;
  --border: #dce4e3;
  --green: #047857;
  --green-dark: #065f46;
  --green-soft: #e0f4eb;
  --nav-height: 58px;
  --sidebar-width: 252px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-height) + 18px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 Inter, system-ui, sans-serif; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.23; }
a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
button { font: inherit; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 8px 12px; background: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header {
  position: sticky; top: 0; z-index: 5; min-height: var(--nav-height);
  padding: 0 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--border); background: rgba(255,255,255,.97);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { position: relative; display: inline-block; width: 19px; height: 19px; border: 1.7px solid var(--green); border-radius: 50% / 25%; background: var(--green-soft); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 0 -1px auto; height: 7px; border-bottom: 1.7px solid var(--green); border-radius: 50%; }
.brand-mark::after { top: 5px; }
.version { font-size: 11px; font-weight: 600; color: var(--green-dark); border: 1px solid var(--border); border-radius: 20px; padding: 1px 8px; }
.site-nav, .footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.site-nav > a, .footer a { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.site-nav > a:hover, .footer a:hover { color: var(--green-dark); }
.site-nav .button { padding: 7px 14px; }
.menu-toggle { display: none; cursor: pointer; color: var(--ink); border: 1px solid var(--border); background: var(--paper); border-radius: 6px; padding: 6px 12px; font-weight: 600; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; text-decoration: none; }
.primary, .site-nav .primary { color: #fff; background: var(--green); }
.primary:hover, .site-nav .primary:hover { color: #fff; background: var(--green-dark); }
.secondary { color: var(--ink); background: var(--paper); border-color: var(--border); }
.secondary:hover { color: var(--green-dark); border-color: var(--green); }

.hero { text-align: center; padding: 90px 24px 72px; background: linear-gradient(180deg, #fff, #f1f7f5); border-bottom: 1px solid var(--border); }
.hero h1 { max-width: 840px; margin: 0 auto 18px; font-size: clamp(2.05rem, 5vw, 3.4rem); letter-spacing: -.045em; font-weight: 800; }
.hero h1 span { color: var(--green); }
.hero p { max-width: 620px; margin: 0 auto 26px; font-size: clamp(1rem, 2vw, 1.125rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 64px; padding: 34px 24px; border-bottom: 1px solid var(--border); text-align: center; }
.facts div { display: flex; flex-direction: column-reverse; }
.facts dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { color: var(--green); font-size: 25px; font-weight: 800; letter-spacing: -.03em; }

.section { width: min(100%, 1120px); margin-inline: auto; padding: 58px 32px; }
.section h2 { font-size: clamp(1.55rem, 3.1vw, 2.05rem); letter-spacing: -.035em; }
.section-intro { margin-top: 10px; max-width: 650px; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.feature { display: block; padding: 21px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); text-decoration: none; color: var(--ink); }
.feature:hover { color: var(--ink); border-color: var(--green); box-shadow: 0 4px 16px #04785714; }
.feature-icon { display: grid; place-items: center; width: 33px; height: 33px; margin-bottom: 11px; border-radius: 7px; background: var(--green-soft); color: var(--green-dark); font-size: 21px; line-height: 1; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--muted); }

.code-section { background: #0f172a; color: #f1f5f9; }
.quick-grid { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 34px; }
.quick-grid > div { min-width: 0; }
.quick-grid p { margin: 12px 0 19px; color: #cbd5e1; }
.quick-grid .primary { background: #047857; }
.quick-grid .primary:hover { background: #065f46; }
.start-section { text-align: center; }
.start-section p { max-width: 560px; margin: 12px auto 18px; color: var(--muted); }
.footer { border-top: 1px solid var(--border); background: var(--surface); text-align: center; padding: 28px 18px; }
.footer nav { justify-content: center; }
.footer p { margin-top: 9px; color: var(--muted); font-size: 12px; }

.guide-header .site-nav { margin-left: auto; }
.guide-sidebar { position: fixed; z-index: 3; inset: var(--nav-height) auto 0 0; width: var(--sidebar-width); overflow-y: auto; border-right: 1px solid var(--border); padding: 13px 0 20px; background: var(--surface); }
.guide-sidebar h2 { margin: 12px 18px 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.guide-sidebar a { display: block; color: var(--muted); text-decoration: none; font-size: 13px; padding: 5px 16px; border-left: 2px solid transparent; }
.guide-sidebar a:hover, .guide-sidebar a[aria-current="location"] { color: var(--green-dark); border-left-color: var(--green); background: var(--green-soft); }
.guide-main { margin-left: var(--sidebar-width); max-width: calc(var(--sidebar-width) + 880px); padding: 34px 34px 60px; }
.guide-intro { padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.guide-intro h1 { font-size: clamp(1.55rem, 4vw, 2.125rem); letter-spacing: -.04em; }
.guide-intro h1 span { color: var(--green); }
.guide-intro p { margin-top: 9px; color: var(--muted); }
.guide-intro .facts { justify-content: flex-start; padding: 16px 0 0; gap: 14px 30px; border: 0; text-align: left; }
.guide-intro .facts dd { font-size: 20px; }
.guide-section { margin-bottom: 36px; }
.guide-section > h2 { font-size: 21px; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.guide-section h3 { font-size: 16px; margin-top: 19px; }
.guide-section p { margin-top: 8px; color: var(--muted); }
.guide-section ul, .guide-section ol { padding-left: 22px; margin: 8px 0; }
.guide-section li + li { margin-top: 4px; }
.guide-main { font-size: 14px; }
.callout { margin: 12px 0; padding: 9px 12px; border-left: 3px solid var(--green); border-radius: 0 5px 5px 0; background: #eaf7f1; color: #185640; }
.callout.caution { border-color: #a55d07; background: #fff6e7; color: #753e0c; }
.table-scroll { overflow-x: auto; margin: 10px 0; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); font-weight: 700; }
.role-table td:first-child { white-space: nowrap; }
code { font-family: var(--mono); font-size: .92em; overflow-wrap: anywhere; }
:not(pre) > code { background: #edf1f2; border-radius: 4px; padding: 1px 4px; }
.code-panel { border-radius: 8px; overflow: hidden; color: #e2e8f0; background: #1e293b; border: 1px solid #334155; margin: 10px 0; }
.code-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 13px; background: #172133; border-bottom: 1px solid #334155; color: #cbd5e1; font: 12px/1.5 var(--mono); }
.code-panel pre { margin: 0; padding: 13px; overflow: auto; font-size: 13px; line-height: 1.7; }
.code-panel pre:focus-visible { outline-offset: -3px; }
.code-panel code { font-size: inherit; overflow-wrap: normal; }
.copy-button { cursor: pointer; border: 1px solid #53637a; background: transparent; color: #e2e8f0; border-radius: 4px; min-width: 57px; padding: 2px 7px; }
.copy-button:hover { background: #334155; }
.copy-button:focus-visible { outline-color: #a7f3d0; }
.syntax-keyword { color: #7dd3fc; }
.syntax-string { color: #a7f3d0; }

@media (max-width: 850px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: 1fr; gap: 16px; }
  .guide-sidebar { width: 215px; }
  .guide-main { margin-left: 215px; padding-inline: 25px; }
}

@media (max-width: 640px) {
  .site-header { padding: 0 16px; flex-wrap: wrap; }
  .js .menu-toggle { display: block; }
  .site-nav { width: 100%; padding-bottom: 12px; gap: 12px; }
  .js .site-nav:not(.is-open) { display: none; }
  .hero { padding: 58px 17px 47px; }
  .hero-break { display: none; }
  .facts { gap: 14px 22px; padding: 24px 16px; }
  .facts dd { font-size: 19px; }
  .section { padding: 40px 16px; }
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .guide-header .site-nav { display: none; }
  .guide-sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .js .guide-sidebar { display: none; position: fixed; inset: var(--nav-height) 0 auto 0; max-height: calc(100dvh - var(--nav-height)); box-shadow: 0 6px 16px #17213322; }
  .js .guide-sidebar.is-open { display: block; }
  .guide-main { margin-left: 0; padding: 24px 16px 42px; }
}

@media print {
  .site-header, .guide-sidebar, .footer, .copy-button, .skip-link { display: none !important; }
  .guide-main { margin: 0; max-width: none; padding: 0; }
  .code-panel { background: #fff; color: #000; }
  .code-header { background: #eee; color: #000; }
  .code-panel pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  h2, h3 { break-after: avoid; }
}
