:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #172033;
  --muted: #5f6b7a;
  --line: #d8e0ea;
  --blue: #2563eb;
  --green: #087f5b;
  --amber: #b45309;
  --red: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

pre {
  margin: 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101827;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.55;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #172033;
  color: #ffffff;
  font-size: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 7px 9px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
}

.nav .nav-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
}

.nav .nav-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.page {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 36px;
  align-items: center;
  padding: 64px 0 36px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

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

h1 {
  max-width: 760px;
  font-size: clamp(42px, 8vw, 78px);
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 18px;
}

.lead {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.visual {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(23, 32, 51, 0.12);
}

.visual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.preview-screen {
  min-height: 330px;
  padding: 24px;
  background:
    linear-gradient(#e9eef6 1px, transparent 1px),
    linear-gradient(90deg, #e9eef6 1px, transparent 1px),
    #ffffff;
  background-size: 24px 24px;
}

.phone {
  width: min(100%, 360px);
  min-height: 282px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: #f8fafc;
}

.phone-title {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 800;
}

.phone-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
}

.live-sketch-demo {
  padding-top: 28px;
}

.live-sketch-surface {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(23, 32, 51, 0.1);
}

.live-sketch-editor,
.live-sketch-viewer {
  min-width: 0;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.live-sketch-editor {
  background: #101827;
  color: #dbeafe;
}

.live-sketch-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.live-sketch-code {
  position: relative;
  min-height: 260px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #dbeafe;
  white-space: pre-wrap;
  overflow: hidden;
}

.live-sketch-caret {
  display: inline-block;
  width: 8px;
  height: 1.15em;
  margin-left: 2px;
  transform: translateY(2px);
  background: #f8fafc;
  animation: live-sketch-caret 0.9s steps(2, start) infinite;
}

.live-sketch-viewer {
  display: grid;
  place-items: center;
  background:
    linear-gradient(#e9eef6 1px, transparent 1px),
    linear-gradient(90deg, #e9eef6 1px, transparent 1px),
    #ffffff;
  background-size: 20px 20px;
  padding: 18px;
}

.live-sketch-preview {
  position: relative;
  width: 360px;
  height: 220px;
  max-width: 100%;
  overflow: visible;
}

.live-sketch-fallback {
  display: grid;
  align-content: start;
  gap: 54px;
  width: 360px;
  max-width: 100%;
  height: 220px;
  padding: 24px;
  border: 1px solid #cfd8e5;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: 0 14px 32px rgba(23, 32, 51, 0.14);
}

.live-sketch-fallback strong {
  text-align: center;
  font-size: 24px;
}

.live-sketch-fallback span {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 30px;
  border-radius: 12px;
  background: #db2777;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(219, 39, 119, 0.24);
}

.live-sketch-actions {
  margin-top: 18px;
}

@keyframes live-sketch-caret {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-sketch-caret {
    animation: none;
  }
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.pill.green {
  background: #d1fae5;
  color: #047857;
}

.pill.amber {
  background: #fef3c7;
  color: #92400e;
}

.section {
  padding: 38px 0;
}

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

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

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

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

.card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metadata {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 16px;
  margin-top: 16px;
}

.metadata dt {
  color: var(--muted);
}

.metadata dd {
  margin: 0;
}

.callout {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.footer {
  margin-top: 44px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

  .nav {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 42px;
  }

  .live-sketch-surface {
    grid-template-columns: 1fr;
  }

  .live-sketch-editor,
  .live-sketch-viewer {
    min-height: 260px;
  }

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

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