:root {
  --db-cream-dark: #efe7da;
  --db-warm-gray: #61594f;
  --db-terracotta: #b65f43;
  --db-font-ui: "IBM Plex Sans", "Avenir Next", Helvetica, sans-serif;
  --ink: #201d1a;
  --paper: #fbfaf6;
  --line: #d9d0c2;
  --field: #ffffff;
  --mint: #b7d8c4;
  --blue: #295f83;
  --sage: #47624f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(183, 216, 196, 0.36), transparent 32rem),
    linear-gradient(180deg, #fffdf8 0%, var(--paper) 48%, #f4eee5 100%);
  font-family: var(--db-font-ui);
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 20px 14px;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
  color: var(--db-warm-gray);
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 32px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.84fr);
  gap: 34px;
  align-items: center;
  min-height: clamp(520px, calc(100vh - 160px), 680px);
  padding: 36px 0 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--db-terracotta);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

h1,
h2 {
  margin: 0;
  line-height: 1;
  letter-spacing: 0;
}

h1 {
  max-width: 650px;
  font-size: clamp(2.45rem, 5vw, 4.25rem);
  line-height: 1.02;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.5rem);
  line-height: 1.05;
}

.lede,
section p {
  color: var(--db-warm-gray);
  line-height: 1.6;
  font-size: 1.05rem;
}

.lede {
  max-width: 620px;
}

.actions,
.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button,
.doc-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover,
.doc-links a:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(32, 29, 26, 0.1);
}

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

.secondary,
.doc-links a {
  background: var(--field);
}

.terminal,
.panel,
.grid article,
.docs-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
}

.terminal {
  overflow: hidden;
  box-shadow: 12px 12px 0 var(--mint);
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f1e9;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--db-terracotta);
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 18px;
  line-height: 1.5;
  font-size: 0.92rem;
}

.panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 18px 42px rgba(32, 29, 26, 0.07);
}

.demo-form {
  display: grid;
  gap: 12px;
}

.demo-form[hidden] {
  display: none;
}

.claim-form[hidden] {
  display: none;
}

.processing-panel {
  display: grid;
  gap: 16px;
  align-content: center;
  min-height: 320px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
}

.processing-panel[hidden] {
  display: none;
}

.processing-kicker {
  margin: 0 0 8px;
  color: var(--db-terracotta);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.processing-panel h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.05;
}

.processing-panel p {
  margin: 8px 0 0;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfce;
}

.progress-track span {
  display: block;
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, var(--sage), var(--mint));
  background-size: 44px 100%, 100% 100%;
  transition: width 320ms ease;
  animation: progress-sheen 1.1s linear infinite;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--db-warm-gray);
  font-size: 0.92rem;
  font-weight: 800;
}

@keyframes progress-sheen {
  from {
    background-position: -44px 0, 0 0;
  }
  to {
    background-position: 44px 0, 0 0;
  }
}

.claim-title {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.code-panel[hidden] {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  color: var(--db-warm-gray);
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(71, 98, 79, 0.16);
  outline: none;
}

.source-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f1e9;
}

.source-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--db-warm-gray);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.source-tab.active {
  background: var(--field);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(32, 29, 26, 0.08);
}

.source-panel[hidden] {
  display: none;
}

.upload-dropzone {
  position: relative;
  min-height: 150px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed #a99e90;
  border-radius: 8px;
  background: #fffaf1;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}

.upload-dropzone.dragging,
.upload-dropzone.has-file {
  border-color: var(--sage);
  background: #f4fbf1;
}

.upload-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--db-terracotta);
  font-size: 0.8rem;
  font-weight: 800;
}

.upload-title {
  font-size: 1rem;
  font-weight: 800;
}

.upload-meta {
  max-width: 100%;
  color: var(--db-warm-gray);
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.response {
  grid-column: 1 / -1;
  min-height: 0;
  background: #f7f1e9;
  border-left: 4px solid var(--sage);
  border-radius: 8px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.response.status {
  font-family: var(--db-font-ui);
}

.response.error {
  border-left-color: var(--db-terracotta);
  background: #fff3eb;
  font-family: var(--db-font-ui);
}

.response.markdown {
  max-height: 420px;
  overflow: auto;
}

.demo-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-actions[hidden] {
  display: none;
}

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

.grid article,
.docs-strip {
  padding: 22px;
}

.doc-page {
  max-width: 900px;
}

.doc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.markdown-doc {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  white-space: pre-wrap;
}

.rendered-doc {
  padding: 26px;
  white-space: normal;
  line-height: 1.65;
}

.rendered-doc h1,
.rendered-doc h2,
.rendered-doc h3 {
  margin: 0 0 14px;
  line-height: 1.08;
}

.rendered-doc h1 {
  font-size: 2rem;
}

.rendered-doc h2 {
  margin-top: 28px;
  font-size: 1.35rem;
}

.rendered-doc p,
.rendered-doc li {
  color: var(--db-warm-gray);
}

.rendered-doc pre {
  margin: 14px 0;
  padding: 16px;
  border-radius: 8px;
  background: #f7f1e9;
  overflow-x: auto;
}

.rendered-doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 820px) {
  .hero,
  .panel,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.3rem, 11vw, 3.2rem);
  }

}
