:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5d6673;
  --line: #d7dde5;
  --paper: #fbfcff;
  --panel: #ffffff;
  --blue: #1e5eff;
  --green: #087f5b;
  --red: #c0392b;
  --amber: #b56b00;
  --violet: #6846c6;
  --code: #111827;
  --code-text: #e5edf8;
  --shadow: 0 18px 48px rgba(24, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

header {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 255, 0.94);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

nav {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1160px;
  min-height: 64px;
  padding: 0 22px;
}

nav strong {
  font-size: 0.98rem;
}

nav div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

nav a {
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}

.hero {
  background:
    linear-gradient(135deg, rgba(30, 94, 255, 0.1), transparent 36%),
    linear-gradient(315deg, rgba(8, 127, 91, 0.13), transparent 40%),
    #f7f9fd;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  margin: 0 auto;
  max-width: 1160px;
  padding: 72px 22px 46px;
}

.eyebrow {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 5.15rem);
  line-height: 0.96;
  margin: 0;
  max-width: 880px;
}

.lead {
  color: var(--muted);
  font-size: 1.16rem;
  margin: 22px 0 0;
  max-width: 720px;
}

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

.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  font-weight: 750;
  min-height: 44px;
  padding: 0 15px;
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.button.coffee-link {
  background: #ffdd00;
  border-color: #d9bb00;
  color: #111827;
}

.hero-visual {
  align-self: stretch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: 380px;
  overflow: hidden;
}

.visual-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
}

.legend {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  gap: 10px;
}

.legend span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.dot {
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  width: 9px;
}

canvas {
  display: block;
  height: 332px;
  width: 100%;
}

main {
  margin: 0 auto;
  max-width: 1160px;
  padding: 44px 22px 80px;
}

section {
  margin-top: 64px;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.1;
  margin: 0 0 14px;
}

h3 {
  font-size: 1.12rem;
  margin: 0 0 10px;
}

p {
  margin: 0 0 16px;
}

.section-lead {
  color: var(--muted);
  max-width: 780px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 24px;
}

.comparison-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.card strong {
  color: var(--blue);
}

.support-strip,
.support-panel {
  align-items: center;
  background: #fff8cc;
  border: 1px solid #ead26b;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.support-strip {
  margin-top: 0;
}

.support-panel {
  margin-top: 64px;
  padding: 28px;
}

.coffee-button {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 230px;
}

.coffee-button p {
  font-size: 0.92rem;
  margin: 0;
}

.coffee-cta {
  align-items: center;
  background: #ffdd00;
  border: 1px solid #111827;
  border-radius: 7px;
  color: #111827;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  min-width: 180px;
  padding: 0 16px;
  text-decoration: none;
}

.steps {
  counter-reset: steps;
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.step {
  background: var(--panel);
  border-left: 4px solid var(--green);
  box-shadow: 0 8px 22px rgba(24, 32, 42, 0.06);
  padding: 18px 20px;
}

.step::before {
  color: var(--green);
  content: counter(steps, decimal-leading-zero);
  counter-increment: steps;
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 4px;
}

pre {
  background: var(--code);
  border-radius: 8px;
  color: var(--code-text);
  margin: 18px 0 0;
  overflow-x: auto;
  padding: 18px;
}

code {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
}

.demo {
  display: grid;
  gap: 18px;
  grid-template-columns: 270px minmax(0, 1fr);
  margin-top: 24px;
}

.controls {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 750;
  margin-bottom: 7px;
}

select,
input {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 0 10px;
  width: 100%;
}

.field {
  margin-bottom: 15px;
}

.result {
  background: #f2f6ff;
  border: 1px solid #c9d8ff;
  border-radius: 8px;
  color: #183d99;
  font-weight: 750;
  padding: 12px;
}

.wide-visual {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

table {
  border-collapse: collapse;
  margin-top: 22px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
}

.split {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin-top: 72px;
  padding-top: 24px;
}

@media (max-width: 860px) {
  nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .hero-inner,
  .demo,
  .split {
    grid-template-columns: 1fr;
  }

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

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

  .support-strip,
  .support-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-inner {
    padding-top: 42px;
  }
}
