:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #66706b;
  --line: #d9ded8;
  --paper: #fbfcf9;
  --panel: #ffffff;
  --green: #1f7a4d;
  --green-dark: #155937;
  --coral: #d95b43;
  --blue: #2f68b1;
  --amber: #c58a19;
  --code: #111816;
  --shadow: 0 18px 50px rgba(23, 32, 28, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--green);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  inset: 8px auto auto 9px;
  width: 5px;
  height: 14px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 7px -4px 0 #fff, 14px 3px 0 #fff;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

nav a:hover,
nav a:focus-visible {
  border-color: var(--line);
  color: var(--ink);
  outline: none;
  background: var(--panel);
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 132px);
  padding: 30px 0 52px;
}

.hero-copy {
  min-width: 0;
  max-width: 760px;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 860px;
  font-size: 5.5rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.6;
}

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

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary,
button {
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  background: var(--panel);
  color: var(--ink);
}

.button:hover,
button:hover {
  transform: translateY(-1px);
}

.visual-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.waveform {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 8px;
  width: 100%;
  height: 132px;
  margin-bottom: 18px;
}

.waveform span {
  display: block;
  min-height: 18px;
  border-radius: 8px 8px 2px 2px;
  background: var(--green);
}

.waveform span:nth-child(2n) {
  background: var(--coral);
}

.waveform span:nth-child(3n) {
  background: var(--blue);
}

.waveform span:nth-child(4n) {
  background: var(--amber);
}

.waveform span:nth-child(1) { height: 32px; }
.waveform span:nth-child(2) { height: 72px; }
.waveform span:nth-child(3) { height: 48px; }
.waveform span:nth-child(4) { height: 110px; }
.waveform span:nth-child(5) { height: 64px; }
.waveform span:nth-child(6) { height: 96px; }
.waveform span:nth-child(7) { height: 42px; }
.waveform span:nth-child(8) { height: 118px; }
.waveform span:nth-child(9) { height: 70px; }
.waveform span:nth-child(10) { height: 92px; }
.waveform span:nth-child(11) { height: 54px; }
.waveform span:nth-child(12) { height: 84px; }

pre,
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

pre {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  border-radius: 8px;
  padding: 18px;
  background: var(--code);
  color: #e9f2ed;
  line-height: 1.55;
}

.visual-panel pre,
.endpoint-card pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.console-section,
.endpoint-grid {
  padding: 62px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

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

.search-console > label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.55fr) minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

input[type="search"],
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  background: var(--paper);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input[type="search"]:focus,
select:focus {
  border-color: var(--green);
  outline: 3px solid rgba(31, 122, 77, 0.14);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.result-shell {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.result-meta a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

#result-output {
  border-radius: 0;
  min-height: 220px;
}

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

.endpoint-grid .section-heading {
  grid-column: 1 / -1;
}

.endpoint-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.endpoint-card > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.endpoint-card code {
  overflow-wrap: anywhere;
  font-weight: 900;
}

.endpoint-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.method {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 5px 7px;
  background: rgba(31, 122, 77, 0.12);
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.endpoint-card pre {
  margin-top: auto;
  font-size: 0.82rem;
}

.endpoint-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--green-dark);
  font-size: 0.88rem;
  font-weight: 900;
  background: var(--paper);
}

.endpoint-link:hover,
.endpoint-link:focus-visible {
  border-color: var(--green);
  outline: none;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 22px;
  }

  .hero > * {
    min-width: 0;
  }

  .visual-panel {
    order: -1;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2rem;
  }

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

  .result-meta {
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  main,
  .topbar,
  footer {
    width: min(1160px, calc(100% - 24px));
  }

  h1 {
    font-size: 2.38rem;
    line-height: 1.06;
  }

  h2 {
    font-size: 1.7rem;
  }

  .hero-actions,
  .button,
  button {
    width: 100%;
  }
}
