:root {
  color-scheme: dark;
  --page: #181615;
  --surface: #221e1c;
  --line: #3e342f;
  --ink: #fff5ed;
  --muted: #d1c3ba;
  --accent: #ffb690;
  --space: clamp(1.15rem, 4vw, 3rem);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--page); color: var(--ink); }
a { color: inherit; text-underline-offset: .2em; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1.1rem; color: var(--muted); }
h1, h2, h3 { margin: 0; line-height: 1.05; }
h1, h2 { letter-spacing: -.058em; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.5vw, 4.3rem); }
h3 { font-size: 1.35rem; letter-spacing: -.025em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.container { width: min(100% - 2 * var(--space), 75rem); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 1;
  inset: .5rem auto auto .5rem;
  transform: translateY(-180%);
  padding: .7rem 1rem;
  color: var(--page);
  background: var(--accent);
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 760;
  letter-spacing: -.04em;
  text-decoration: none;
}
nav { display: flex; gap: clamp(.85rem, 3vw, 2.4rem); }
nav a, .footer-inner > a:last-child { color: var(--muted); font-size: .95rem; text-decoration: none; }
nav a:hover, .footer-inner > a:last-child:hover { color: var(--accent); }

.hero { padding-top: clamp(2.75rem, 6vw, 6rem); }
.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr);
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4rem);
}
.hero h1 { font-size: clamp(3.2rem, 6.45vw, 6.35rem); }
.hero-intro { padding-bottom: .15rem; }
.hero-intro p { max-width: 33ch; font-size: clamp(1rem, 1.45vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.button {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1.1rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  font-weight: 740;
  line-height: 1.2;
  text-decoration: none;
}
.button-primary { color: #2b1810; background: var(--accent); }
.button-primary:hover { background: #ffd0b7; }
.button-secondary { border-color: var(--line); background: var(--surface); }
.button-secondary:hover { border-color: var(--accent); }
.hero-shot { margin: clamp(1.8rem, 4vw, 3.5rem) 0 0; }
.hero-shot img {
  width: 100%;
  border: 1px solid #6c4b3c;
  border-radius: clamp(.65rem, 1.7vw, 1.25rem);
  box-shadow: 0 1.6rem 4.8rem #0c070670, 0 0 4rem #ff94551c;
}
.hero-shot figcaption { margin-top: .8rem; color: var(--muted); font-size: .87rem; }

.section { margin-top: clamp(4rem, 10vw, 8rem); }
.section-intro { max-width: 47rem; }
.section-intro p, .agent-layout > div > p, .hosting-panel p { margin-top: 1rem; font-size: 1.05rem; }
.comparison {
  margin-top: 1.75rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}
.comparison table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.comparison caption {
  padding: .95rem clamp(.5rem, 2vw, 1.4rem);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 740;
}
.comparison th, .comparison td {
  padding: clamp(.6rem, 2vw, 1.4rem);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}
.comparison th:first-child { width: 22%; }
.comparison tbody tr:last-child > * { border-bottom: 0; }
.comparison td { color: var(--muted); }
.comparison .eldstad-cell { background: #31241e; color: var(--ink); }
.comparison thead .eldstad-cell, .comparison a:hover { color: var(--accent); }
.comparison-note { margin: .85rem 0 0; max-width: 82ch; font-size: .9rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 1.75rem;
}
.feature-grid article {
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2.3rem);
  background: linear-gradient(145deg, #2b211d, var(--surface) 42%);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
}
.feature-grid p { margin-top: .7rem; max-width: 45ch; }
.detail-shot { border: 1px solid #51433b; border-radius: .8rem; }
.mobile-shot { width: min(100%, 13rem); margin-inline: auto; }

.agent-section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
  background: #241c19;
  border-block: 1px solid var(--line);
}
.agent-layout, .hosting-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}
.agent-shot { width: min(100%, 30rem); justify-self: end; }
.agent-features { margin: 1.4rem 0 0; }
.agent-features div { border-top: 1px solid #493931; padding-block: .8rem; }
.agent-features dt { font-weight: 740; }
.agent-features dd { margin: .15rem 0 0; color: var(--muted); }
.webhook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 1.75rem;
}
.webhook-example {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}
.webhook-example p { margin-top: .7rem; }
.webhook-example pre, .command-example {
  margin: 0;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--page);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.webhook-example code, .docker-demo code { font: .88rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.webhook-example code span { color: var(--accent); }
.hosting-panel {
  padding: clamp(1.3rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--surface);
}
.hosting-panel h2 { font-size: clamp(2.1rem, 4vw, 3.7rem); }
.docker-demo { margin-top: 1.5rem; }
.docker-demo p { margin: .65rem 0; font-size: .95rem; overflow-wrap: anywhere; }
.docker-demo p:last-child { margin-bottom: 0; }
.docker-demo a { color: var(--accent); }
.site-footer { margin-top: clamp(3rem, 7vw, 6rem); border-top: 1px solid var(--line); }
.footer-inner { padding-block: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; font-size: .9rem; }

@media (max-width: 55rem) {
  .hero-copy { grid-template-columns: 1fr; align-items: start; }
  .hero-intro p { max-width: 47ch; }
  .agent-layout, .hosting-panel { grid-template-columns: 1fr; }
  .agent-shot { justify-self: start; }
}

@media (max-width: 37rem) {
  .header-inner { min-height: 3.9rem; }
  .wordmark { font-size: 1.15rem; }
  .wordmark img { width: 27px; }
  nav { gap: .7rem; }
  nav a { font-size: .84rem; }
  .feature-grid, .webhook-grid { grid-template-columns: minmax(0, 1fr); }
  .comparison th, .comparison td { font-size: clamp(.75rem, 3.4vw, .84rem); padding: .68rem .42rem; }
  .comparison th:first-child { width: 28%; }
  .footer-inner p { width: 100%; order: 3; }
}
