:root {
  --bg: #fff4eb;
  --fg: #101827;
  --muted: #5f5249;
  --main-bg: #fffbf7;
  --sidebar-bg: #ffeede;
  --sidebar-border: #f4c5a4;
  --card: #fffffc;
  --card-hover: #f8fafc;
  --border: #edd2be;
  --brand: #ff4a00;
  --brand-soft: #ffe8d6;
  --primary: #2563eb;
  --accent: #10b981;
  --shadow: 0 10px 30px rgb(95 62 42 / 8%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--main-bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header,
.hero,
.flow,
.open-source,
.site-footer,
.docs-main {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--fg);
  font-size: 15px;
  font-weight: 800;
}

.brand img {
  border: 1px solid rgb(16 24 39 / 8%);
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 8px rgb(16 24 39 / 8%);
}

.site-nav {
  display: flex;
  gap: 28px;
  justify-self: center;
}

.site-nav a,
.login-link,
.coffee-link,
.site-footer a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.site-nav a:hover,
.login-link:hover,
.coffee-link:hover,
.site-footer a:hover,
.inline-links a:hover {
  color: var(--brand);
}

.site-nav [aria-current="page"] {
  color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 18px;
}

.coffee-link {
  white-space: nowrap;
}

.login-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 2px 8px rgb(95 62 42 / 6%);
}

.hero {
  padding: 72px 0 96px;
}

.hero-copy {
  max-width: 830px;
  margin: 0 auto;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.kicker span {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(16 185 129 / 12%);
}

.hero h1 {
  margin: 0;
  color: var(--fg);
  font-size: clamp(52px, 7vw, 84px);
  font-weight: 720;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 em {
  color: var(--brand);
  font-style: normal;
}

.intro {
  max-width: 680px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgb(95 62 42 / 7%);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: #d8ad8e;
  background: var(--card-hover);
}

.button-primary {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--main-bg);
}

.button-primary:hover {
  border-color: var(--brand);
  background: var(--brand);
}

.button-plain {
  box-shadow: none;
}

.dashboard-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 470px;
  margin-top: 54px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 24px 70px rgb(95 62 42 / 13%);
  text-align: left;
}

.preview-sidebar {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  padding: 16px 12px;
  border-right: 1px solid var(--sidebar-border);
  background: var(--sidebar-bg);
}

.preview-sidebar img {
  margin-bottom: 18px;
  border-radius: 11px;
  box-shadow: 0 2px 7px rgb(16 24 39 / 10%);
}

.preview-nav {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgb(117 91 75 / 11%);
}

.preview-nav.is-active {
  position: relative;
  background: rgb(255 74 0 / 11%);
  box-shadow: inset 3px 0 0 var(--brand);
}

.preview-nav.is-active::after {
  position: absolute;
  inset: 12px;
  border: 2px solid var(--brand);
  border-radius: 3px;
  content: "";
}

.preview-main {
  min-width: 0;
  padding: 22px;
  background: var(--main-bg);
}

.preview-topbar,
.chart-heading,
.preview-events div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-topbar div,
.chart-heading div {
  display: grid;
  gap: 4px;
}

.preview-topbar span,
.chart-heading span,
.preview-metrics span,
.preview-metrics small,
.preview-events small {
  color: var(--muted);
  font-size: 11px;
}

.preview-topbar strong {
  font-size: 22px;
}

.preview-topbar .live-pill {
  padding: 6px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f7fef9;
  color: #047857;
  font-weight: 700;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.preview-metrics article,
.preview-chart,
.preview-events {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 2px 8px rgb(95 62 42 / 5%);
}

.preview-metrics article {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.preview-metrics strong {
  font-size: 22px;
}

.preview-metrics .positive {
  color: #047857;
  font-weight: 700;
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
  gap: 12px;
  margin-top: 12px;
}

.preview-chart,
.preview-events {
  min-height: 230px;
  padding: 16px;
}

.chart-heading strong,
.preview-events > strong {
  font-size: 13px;
}

.chart-heading > span {
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: #ad390a;
  font-weight: 650;
}

.chart-area {
  display: flex;
  align-items: end;
  gap: clamp(4px, 0.8vw, 10px);
  height: 155px;
  margin-top: 18px;
  padding: 10px 10px 0;
  border-bottom: 1px solid var(--border);
}

.chart-area span {
  flex: 1;
  min-width: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
}

.chart-area span:nth-child(3n + 1) {
  background: var(--brand);
}

.preview-events > strong {
  display: block;
  margin-bottom: 12px;
}

.preview-events div {
  justify-content: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.preview-events div > span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.preview-events p {
  display: grid;
  flex: 1;
  gap: 2px;
  margin: 0;
  font-size: 11px;
  font-weight: 650;
}

.preview-events b {
  color: #047857;
  font-size: 10px;
}

.flow {
  padding: 96px 0 110px;
  border-top: 1px solid var(--border);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.section-label span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
}

.section-label p {
  margin: 0;
}

.flow h2,
.open-source h2,
.final-cta h2 {
  margin: 22px 0 46px;
  max-width: 780px;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.flow-steps article {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.flow-steps article > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
}

.flow-steps article:nth-child(2) > span {
  background: #e7efff;
  color: var(--primary);
}

.flow-steps article:nth-child(3) > span {
  background: #e5f9f1;
  color: #047857;
}

.flow-steps h3 {
  margin: 42px 0 10px;
  font-size: 25px;
}

.flow-steps p {
  margin: 0;
  color: var(--muted);
}

.open-source {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  gap: clamp(50px, 9vw, 120px);
  align-items: center;
  padding: 96px 0 118px;
}

.open-source h2 {
  margin-bottom: 24px;
  font-size: clamp(38px, 5vw, 58px);
}

.open-source-copy > p:not(.kicker) {
  max-width: 540px;
  color: var(--muted);
  font-size: 18px;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 28px;
}

.inline-links a {
  color: var(--fg);
  font-size: 14px;
  font-weight: 700;
}

.terminal {
  overflow: hidden;
  border: 1px solid #263247;
  border-radius: 14px;
  background: #101827;
  color: #f8fafc;
  box-shadow: 0 20px 48px rgb(16 24 39 / 18%);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  border-bottom: 1px solid #334155;
}

.terminal-bar > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.terminal-bar > span:nth-child(2) {
  background: #fbbf24;
}

.terminal-bar > span:nth-child(3) {
  background: var(--accent);
}

.terminal-bar p {
  margin: 0 0 0 auto;
  color: #94a3b8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.terminal pre {
  margin: 0;
  padding: 32px 28px 38px;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.9;
}

.terminal code span,
.terminal code b {
  color: #6ee7b7;
}

.final-cta {
  padding: 92px max(20px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--sidebar-border);
  border-bottom: 1px solid var(--sidebar-border);
  background: var(--sidebar-bg);
  text-align: center;
}

.final-cta > p {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.final-cta h2 {
  margin: 20px auto 34px;
  max-width: 900px;
}

.final-cta .hero-actions {
  margin-top: 0;
}

.button-light {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

.button-light:hover {
  background: #dc4100;
}

.button-outline {
  background: var(--card);
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
  min-height: 104px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer nav {
  display: flex;
  gap: 22px;
}

.doc-masthead {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  padding: 72px 0 76px;
  border-bottom: 1px solid var(--border);
}

.doc-code {
  width: max-content;
  margin: 5px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
}

.doc-masthead h1 {
  max-width: 950px;
  margin: 0;
  font-size: clamp(48px, 7vw, 82px);
  font-weight: 720;
  line-height: 0.98;
  letter-spacing: 0;
}

.doc-masthead h1 em {
  color: var(--brand);
  font-style: normal;
}

.doc-masthead .doc-intro {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(50px, 8vw, 105px);
  align-items: start;
  padding: 64px 0 110px;
}

.docs-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  background: var(--sidebar-bg);
}

.docs-sidebar p {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.docs-sidebar a {
  padding: 10px 16px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.docs-sidebar-group {
  padding: 8px 16px 4px 28px;
  color: #755b4b;
  font-size: 12px;
  font-weight: 700;
}

.docs-sidebar a.docs-sidebar-child {
  position: relative;
  padding: 8px 16px 8px 46px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 650;
}

.docs-sidebar a.docs-sidebar-child::before {
  position: absolute;
  left: 32px;
  content: "-";
  color: var(--brand);
}

.docs-sidebar a:hover {
  background: rgb(255 74 0 / 8%);
  color: #1746a2;
}

.docs-content {
  min-width: 0;
}

.docs-content a:not(.button) {
  color: var(--primary);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.docs-content a:not(.button):hover {
  color: #1746a2;
  text-decoration-thickness: 2px;
}

.docs-content a:not(.button):focus-visible,
.docs-sidebar a:focus-visible {
  border-radius: 3px;
  outline: 3px solid rgb(37 99 235 / 28%);
  outline-offset: 2px;
}

.docs-section {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 22px;
  padding: 0 0 62px;
  scroll-margin-top: 24px;
}

.docs-section + .docs-section {
  padding-top: 62px;
  border-top: 1px solid var(--border);
}

.docs-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
}

.docs-section h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.docs-section h3 {
  margin: 34px 0 10px;
  font-size: 19px;
}

.docs-section p,
.docs-section li {
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.docs-section ul,
.docs-section ol {
  max-width: 760px;
  padding-left: 22px;
}

.docs-section li + li {
  margin-top: 8px;
}

.docs-section code:not(pre code) {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card);
  color: var(--fg);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.88em;
}

.docs-section pre {
  max-width: 100%;
  margin: 22px 0;
  padding: 24px;
  overflow-x: auto;
  border: 1px solid #263247;
  border-radius: 12px;
  background: #101827;
  color: #f8fafc;
  box-shadow: 0 8px 24px rgb(16 24 39 / 12%);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.75;
}

.docs-callout {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f7fef9;
}

.docs-callout strong {
  display: block;
  margin-bottom: 5px;
  color: #047857;
  font-size: 11px;
  text-transform: uppercase;
}

.docs-callout p {
  margin: 0;
}

.docs-image {
  max-width: 760px;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.docs-image-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff7f0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.docs-image-topbar strong {
  color: var(--fg);
  font-size: 13px;
}

.docs-image-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.docs-image h3 {
  margin: 8px 0 5px;
  color: var(--fg);
}

.docs-image p {
  margin: 0;
}

.docs-image button {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--fg);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.docs-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.docs-form-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.docs-image-topbar + .docs-form-row {
  border-top: 0;
}

.docs-form-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.docs-form-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--fg);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.docs-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 110px;
  padding: 30px;
  border: 1px solid var(--sidebar-border);
  border-radius: 16px;
  background: var(--sidebar-bg);
}

.docs-next p,
.docs-next h2 {
  margin: 0;
}

.docs-next p {
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.docs-next h2 {
  margin-top: 5px;
  font-size: 26px;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .dashboard-preview {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-events {
    display: none;
  }

  .open-source {
    grid-template-columns: 1fr;
  }

  .terminal {
    width: min(100%, 720px);
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 28px 0;
  }
}

@media (max-width: 760px) {
  .docs-main {
    width: min(100% - 28px, 1180px);
  }

  .doc-masthead {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 52px 0 60px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 46px;
    padding-top: 46px;
  }

  .docs-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-sidebar p {
    grid-column: 1 / -1;
  }

  .docs-section {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .docs-next {
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-image-body {
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-form-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 620px) {
  .site-header,
  .hero,
  .flow,
  .open-source,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .coffee-link {
    display: none;
  }

  .hero {
    padding: 54px 0 72px;
  }

  .hero h1 {
    font-size: clamp(46px, 14vw, 66px);
  }

  .button {
    width: 100%;
  }

  .button-plain {
    width: auto;
  }

  .dashboard-preview {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-top: 42px;
  }

  .preview-sidebar {
    display: none;
  }

  .preview-main {
    padding: 14px;
  }

  .preview-topbar strong {
    font-size: 18px;
  }

  .preview-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .preview-metrics article:last-child {
    display: none;
  }

  .preview-metrics strong {
    font-size: 18px;
  }

  .preview-chart {
    min-height: 210px;
  }

  .chart-heading > span {
    display: none;
  }

  .chart-area {
    height: 135px;
  }

  .flow {
    padding: 72px 0 82px;
  }

  .flow-steps {
    grid-template-columns: 1fr;
  }

  .flow-steps article {
    min-height: 190px;
  }

  .open-source {
    padding: 76px 0 90px;
  }

  .terminal pre {
    padding-inline: 18px;
    font-size: 10px;
  }

  .final-cta {
    padding-top: 72px;
    padding-bottom: 76px;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }
}

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

  .button {
    transition: none;
  }
}
