:root {
  color-scheme: light;
  --bg: #f8faf8;
  --surface: #ffffff;
  --surface-muted: #eef5f1;
  --ink: #17211c;
  --muted: #5d6b64;
  --line: #d9e2dc;
  --accent: #0d7d65;
  --accent-strong: #075f4d;
  --warning-bg: #fff8e6;
  --warning-border: #efd486;
  --error: #a83838;
  --success: #0b6d4f;
  --code-bg: #14201b;
  --code-ink: #e6f4ec;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

code,
pre,
input,
button {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid rgb(217 226 220 / 80%);
  background: rgb(248 250 248 / 92%);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.95rem;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--accent-strong);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 40px;
  align-items: center;
  padding: 74px 0 52px;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.04rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.lead {
  margin: 24px 0 0;
  max-width: 620px;
  color: #24342d;
  font-size: 1.35rem;
  line-height: 1.45;
}

.ja-lead {
  margin: 14px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.04rem;
}

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

.button,
.lookup-controls button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
.lookup-controls button {
  background: var(--accent);
  color: #ffffff;
}

.button.primary:hover,
.lookup-controls button:hover {
  background: var(--accent-strong);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: #a9c3b8;
  color: var(--accent-strong);
}

.client-preview,
.section,
.result-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.client-preview {
  overflow: hidden;
  box-shadow: 0 24px 70px rgb(23 33 28 / 10%);
}

.preview-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #263a32;
  background: #192721;
  color: var(--code-ink);
}

.preview-header span {
  border-radius: 6px;
  background: #d6f2e6;
  color: #0b4e3f;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 7px;
}

.preview-header code {
  min-width: 0;
  color: #dce9e3;
  font-size: 0.86rem;
}

.client-preview pre,
.code-block {
  overflow-x: auto;
  margin: 0;
  background: var(--code-bg);
  color: var(--code-ink);
  font-size: 0.92rem;
  line-height: 1.65;
}

.client-preview pre {
  padding: 18px;
}

.section {
  margin: 22px 0;
  padding: 30px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
}

.code-block {
  border-radius: 8px;
  padding: 18px;
}

.code-grid,
.info-grid {
  display: grid;
  gap: 18px;
}

.code-grid > *,
.info-grid > * {
  min-width: 0;
}

.code-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-grid ul {
  margin: 0;
  padding-left: 1.2rem;
}

.info-grid li + li {
  margin-top: 8px;
}

.demo-section {
  background: var(--surface-muted);
}

.lookup-form {
  display: grid;
  gap: 10px;
  max-width: 680px;
}

.lookup-form label {
  font-weight: 740;
}

.lookup-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.lookup-controls input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #b9c9c1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
}

.lookup-controls input:focus {
  border-color: var(--accent);
  outline: 3px solid rgb(13 125 101 / 18%);
}

.text-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  padding: 0;
  font-weight: 700;
  cursor: pointer;
}

.demo-status {
  min-height: 28px;
  margin: 18px 0 0;
  font-weight: 720;
}

.demo-status[data-kind="neutral"],
.demo-status[data-kind="empty"] {
  color: var(--muted);
}

.demo-status[data-kind="success"] {
  color: var(--success);
}

.demo-status[data-kind="error"] {
  color: var(--error);
}

.result-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.result-item {
  padding: 16px;
}

.result-item p {
  margin: 0;
  color: var(--muted);
}

.warning-section {
  border-color: var(--warning-border);
  background: var(--warning-bg);
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-list a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 720;
  padding: 12px 14px;
  text-decoration: none;
}

.link-list a:hover {
  border-color: #a9c3b8;
  color: var(--accent-strong);
}

.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 46px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 20px;
  }

  main,
  .site-footer {
    width: min(100% - 28px, 720px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 46px 0 22px;
  }

  .client-preview {
    max-width: 100%;
  }

  .code-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .top-nav {
    width: 100%;
    justify-content: space-between;
  }

  .lead {
    font-size: 1.16rem;
  }

  .hero-actions,
  .link-list {
    flex-direction: column;
  }

  .button,
  .link-list a {
    width: 100%;
  }

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

  .lookup-controls button {
    width: 100%;
  }
}
