:root {
  --ink: #12231f;
  --muted: #5d6f69;
  --paper: #f7faf7;
  --surface: #ffffff;
  --line: #dce7e1;
  --brand: #176b55;
  --brand-dark: #0d493a;
  --accent: #d8f36b;
  --code: #10251f;
  --shadow: 0 18px 50px rgba(13, 73, 58, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(220, 231, 225, .85);
  background: rgba(247, 250, 247, .9);
  backdrop-filter: blur(14px);
}
.nav { min-height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; text-decoration: none; font-size: 1.15rem; }
.mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--brand); box-shadow: inset 0 -5px 10px rgba(0,0,0,.12); }
.navlinks { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.navlinks a { color: var(--muted); font-weight: 650; text-decoration: none; font-size: .94rem; }
.navlinks a:hover, .navlinks a[aria-current="page"] { color: var(--brand); }
.menu { display: none; width: 44px; height: 44px; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; font-size: 1.4rem; color: var(--ink); cursor: pointer; }
.menu:hover { background: #e7f0ea; }

.hero { padding: 96px 0 72px; overflow: hidden; background: radial-gradient(circle at 82% 15%, rgba(216,243,107,.28), transparent 25%), linear-gradient(180deg, #f2f8f4 0%, var(--paper) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 72px; }
.hero-grid > * { min-width: 0; }
.eyebrow { color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.025em; }
h1 { margin: 12px 0 20px; font-size: clamp(2.75rem, 6vw, 5.4rem); max-width: 850px; }
h2 { margin: 0 0 18px; font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { margin: 0 0 10px; font-size: 1.25rem; }
.lead { color: var(--muted); font-size: 1.2rem; max-width: 700px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--brand); border-radius: 9px; background: var(--brand); color: white; font-weight: 750; text-decoration: none; }
.button:hover { background: var(--brand-dark); color: white; }
.button.secondary { color: var(--brand); background: transparent; }
.button.secondary:hover { color: white; background: var(--brand); }

.terminal { width: 100%; max-width: 100%; min-width: 0; padding: 16px; overflow: hidden; transform: rotate(1.5deg); border: 1px solid #244a3f; border-radius: 16px; color: #daf4ea; background: var(--code); box-shadow: var(--shadow); }
.terminal-bar { display: flex; gap: 7px; padding: 2px 0 13px; }
.terminal-bar i { width: 9px; height: 9px; border-radius: 50%; background: #6d8c83; }
.terminal pre { max-width: 100%; margin: 0; overflow: auto; color: #dcebe6; }
.prompt { color: var(--accent); }

.section { padding: 76px 0; }
.section.alt { background: #eef5f0; border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 38px; }
.section-head p, .muted { color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card { padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 30px rgba(18,35,31,.04); }
.card p:last-child { margin-bottom: 0; }
.number { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 18px; border-radius: 10px; color: var(--brand-dark); background: var(--accent); font-weight: 900; }

.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: stretch; }
.flow-step { position: relative; padding: 20px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.flow-step:not(:last-child)::after { content: "→"; position: absolute; right: -17px; top: 42%; z-index: 2; color: var(--brand); font-weight: 900; }
.flow-step strong { display: block; margin-bottom: 5px; }
.flow-step span { color: var(--muted); font-size: .9rem; }

.page-head { padding: 72px 0 54px; background: linear-gradient(135deg, #eef7f1, #f8faef); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); margin-bottom: 10px; }
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 62px; padding-block: 58px 90px; }
.toc { position: sticky; top: 94px; align-self: start; }
.toc strong { display: block; margin-bottom: 10px; }
.toc a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: .92rem; }
.toc a:hover { color: var(--brand); }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose h2 { padding-top: 20px; margin-top: 42px; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 30px; }
.prose p, .prose li { color: #334a43; }
pre { max-width: 100%; padding: 20px; overflow-x: auto; overscroll-behavior-inline: contain; border-radius: 12px; color: #dcebe6; background: var(--code); font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; -webkit-overflow-scrolling: touch; }
code { padding: .12em .36em; border-radius: 4px; color: var(--brand-dark); background: #e6efe9; font: .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre code { padding: 0; color: inherit; background: transparent; font-size: inherit; }
table { display: block; width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border-collapse: collapse; margin: 22px 0; font-size: .94rem; -webkit-overflow-scrolling: touch; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--brand-dark); background: #edf5f0; }
.callout { padding: 18px 20px; margin: 24px 0; border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; background: #eaf4ed; }
.callout.warning { border-color: #be7a17; background: #fff5df; }
.status { display: inline-block; padding: 3px 9px; border-radius: 999px; color: var(--brand-dark); background: #ddefe4; font-size: .78rem; font-weight: 800; }

footer { padding: 35px 0; color: var(--muted); border-top: 1px solid var(--line); background: white; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; }

@media (max-width: 1024px) {
  .hero-grid { gap: 42px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow-step:nth-child(3)::after { display: none; }
}

@media (max-width: 820px) {
  .menu { display: grid; margin-left: auto; }
  .navlinks { display: none; position: absolute; inset: 68px 0 auto; max-height: calc(100dvh - 68px); padding: 12px 20px 20px; overflow-y: auto; flex-direction: column; align-items: stretch; gap: 2px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 16px 28px rgba(18,35,31,.1); }
  .navlinks.open { display: flex; }
  .navlinks a { min-height: 44px; display: flex; align-items: center; padding: 7px 10px; border-radius: 7px; }
  .navlinks a:hover, .navlinks a[aria-current="page"] { background: #e7f0ea; }
  .hero { padding-top: 65px; }
  .hero-grid, .docs-layout { grid-template-columns: 1fr; gap: 30px; }
  .terminal { transform: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-step:nth-child(3)::after { display: block; }
  .flow-step:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -21px; }
  .toc { position: static; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
  .footer-row { flex-direction: column; }
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 28px, 1120px); }
  .nav { min-height: 62px; gap: 14px; }
  .mark { width: 32px; height: 32px; }
  .navlinks { inset-block-start: 62px; max-height: calc(100dvh - 62px); padding-inline: 14px; }
  .hero { padding: 48px 0 52px; }
  .hero-grid { gap: 34px; }
  .hero h1 { width: 100%; max-width: 100%; margin-top: 10px; font-size: clamp(1.6rem, 7.25vw, 2rem); line-height: 1.06; }
  .hero-title-line { display: block; }
  h2 { font-size: clamp(1.75rem, 9vw, 2.25rem); }
  .hero .lead { width: 100%; max-width: 100%; font-size: 1rem; }
  .section { padding: 54px 0; }
  .section-head { margin-bottom: 28px; }
  .page-head { padding: 48px 0 38px; }
  .page-head h1 { font-size: clamp(2.15rem, 12vw, 3rem); }
  .docs-layout { padding-block: 36px 62px; }
  .card { padding: 21px; }
  .terminal { margin-inline: -2px; padding: 13px; border-radius: 12px; }
  .terminal pre, pre { font-size: 12.5px; }
  pre { padding: 16px; border-radius: 9px; }
  th, td { min-width: 130px; padding: 10px 12px; }
  .callout { padding: 15px 16px; }
  .hero .actions { display: grid; width: 100%; max-width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .hero .actions .button { width: auto; max-width: 100%; min-width: 0; min-height: 48px; padding-inline: 12px; white-space: normal; text-align: center; }
  footer { padding: 28px 0; }
  .footer-row { gap: 12px; }
}

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