* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: var(--accent); }

code {
  font-family: ui-monospace, monospace;
  font-size: 0.92em;
}

.nav, main, footer {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: min(1040px, calc(100% - 32px));
  padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav nav a:hover { background: var(--accent-soft); color: var(--accent); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 28px 0 8px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.lede {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  border-radius: 9px;
  padding: 0 14px;
}

.button.quiet {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.steps article, .doc, .panel-cta, .credentials {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.icon {
  width: 22px;
  height: 22px;
  margin-bottom: 10px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon rect { fill: var(--accent); stroke: none; }

.art { margin: 0; }
.scene { width: 100%; height: auto; display: block; }
.wash { fill: var(--accent-soft); }
.wash-strong { fill: var(--accent); opacity: 0.12; }
.paper { fill: var(--card); stroke: var(--line); }
.mark { fill: var(--accent); }
.ink { fill: var(--text); }
.scene .muted { fill: var(--muted); }
.scene text { font-family: system-ui, "Segoe UI", sans-serif; }
.scene .label { font-size: 13px; font-weight: 700; }
.scene .amount { font-size: 28px; font-weight: 750; }
.scene .tiny { font-size: 12px; }

.credentials {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr auto;
  gap: 18px;
  align-items: center;
  margin: 8px 0 18px;
}
.credentials h2 { margin-bottom: 6px; }
.credentials ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.credentials li { display: grid; gap: 2px; }
.credentials strong { font-size: 14px; }
.credentials span, .credentials p { color: var(--muted); font-size: 13px; line-height: 1.45; }

.docs {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  padding-top: 20px;
}
.docs h1 { font-size: clamp(28px, 4vw, 36px); }
.doc-nav { display: grid; gap: 4px; margin-top: 16px; }
.doc-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  padding: 6px 0;
}
.doc-nav a:hover { color: var(--accent); }
nav a[aria-current="page"] { color: var(--accent); }

.step {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}

h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.03em; }
h3 { margin: 0; font-size: 18px; }
.steps p, .doc p, .panel-cta p, footer { color: var(--muted); line-height: 1.55; }

.section-head { margin: 28px 0 14px; max-width: 720px; }
.section-head p { color: var(--muted); }

.doc { margin-bottom: 14px; }
.doc-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.doc-title code {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
}

.sample { position: relative; margin: 12px 0; }

.sample button {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  min-height: 32px;
  padding: 4px 10px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

pre {
  margin: 0;
  overflow: auto;
  background: var(--code);
  color: var(--text);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

pre code { font-size: 13px; line-height: 1.5; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

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

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

th { color: var(--muted); font-weight: 650; font-size: 13px; }

.statuses { display: flex; gap: 8px; flex-wrap: wrap; }
.statuses code {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 8px;
}

.panel-cta {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0 48px;
}

.tabbar { display: none; }

@media (max-width: 800px) {
  .nav nav { display: none; }
  .hero, .steps, .panel-cta, .credentials, .docs, footer { display: grid; }
  .hero, .docs, .credentials { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .credentials ul { grid-template-columns: 1fr; }
  .art { max-width: 420px; }
  .panel-cta .button, footer a { justify-self: start; }
  h1 { font-size: 32px; }
  .lede { font-size: 16px; }
  main { padding-bottom: 96px; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    z-index: 20;
    padding: 6px;
  }
  .tabbar a {
    text-align: center;
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 4px;
    border-radius: 12px;
  }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { padding: 10px 0; border-top: 1px solid var(--line); }
  td { border: 0; padding: 2px 0; }
  td:first-child { color: var(--text); font-weight: 700; }
}
