:root {
  --bg: #f5f5f7;
  --bg-strong: #fbfbfd;
  --ink: #111114;
  --muted: #6e6e73;
  --line: rgba(15, 23, 42, 0.10);
  --line-strong: rgba(15, 23, 42, 0.16);
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --blue: #0a84ff;
  --blue-deep: #0066cc;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 48%, #ffffff 100%);
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

code {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

p code,
li code {
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.05);
  color: #56565c;
  font-size: 0.92em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  width: min(var(--max), calc(100% - 32px));
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(22px);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  border-radius: 999px;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  padding: 4px 10px 4px 4px;
  font-weight: 650;
}

.brand img {
  width: 34px;
  height: 34px;
}

.nav-links {
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(15, 23, 42, 0.06);
}

.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0;
}

.hero {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  text-align: center;
}

.hero-copy {
  width: 100%;
  min-width: 0;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 28px;
}

.hero h1,
.section-head h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.04;
  font-weight: 720;
}

.hero h1 {
  width: 100%;
  min-width: 0;
  max-width: 820px;
  font-size: clamp(48px, 8vw, 96px);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero p {
  width: 100%;
  min-width: 0;
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.button.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
}

.hero-media {
  width: 100%;
  min-width: 0;
  max-width: 980px;
  margin: 0;
}

.hero-media img,
.workflow-visual,
.media-frame img {
  border: 1px solid #d7dde6;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-media img,
.workflow-visual {
  border-radius: var(--radius);
}

.hero-media figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.compact {
  padding-top: 10px;
}

.intro-grid,
.wiki-grid,
.boundary-grid,
.io-grid,
.example-grid {
  display: grid;
  gap: 18px;
}

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

.intro-grid article,
.wiki-grid article,
.boundary-grid article,
.io-grid article,
.example-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(18px);
  padding: 24px;
}

.metric {
  display: block;
  color: var(--blue-deep);
  font-weight: 700;
  margin-bottom: 20px;
}

h2,
h3,
p {
  margin-top: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  letter-spacing: 0;
}

p,
li {
  color: var(--muted);
  line-height: 1.62;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head.inline {
  margin-bottom: 0;
}

.section-head h2 {
  font-size: clamp(36px, 5.4vw, 70px);
}

.section-head p:not(.kicker) {
  margin: 18px 0 0;
  font-size: 19px;
}

.kicker {
  margin-bottom: 12px;
  color: var(--blue-deep);
  font-weight: 700;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.timeline div {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  padding: 16px;
}

.timeline b {
  display: block;
  color: var(--blue-deep);
  margin-bottom: 10px;
}

.timeline span {
  color: var(--muted);
  line-height: 1.5;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

.code-panel {
  overflow: hidden;
  border: 1px solid #1f2937;
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow);
}

pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
}

pre code {
  color: #e5edf8;
  background: transparent;
  padding: 0;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

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

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

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

.boundary-grid article {
  background: #fff;
}

.boundary-grid ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
  background: #f8fafc;
}

.media-frame img {
  width: 100%;
  border-radius: var(--radius);
}

.text-link {
  display: inline-flex;
  margin-top: 6px;
  color: var(--blue-deep);
  font-weight: 700;
}

.footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer a {
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    align-items: flex-start;
    border-radius: 20px;
  }

  .nav-links {
    display: none;
  }

  .section {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    padding: 58px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 64px;
  }

  .intro-grid,
  .wiki-grid,
  .io-grid,
  .boundary-grid,
  .example-grid,
  .split,
  .timeline {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    width: 100%;
    max-width: 100%;
    font-size: 36px;
    line-height: 1.08;
  }

  .hero p,
  .hero-media,
  .workflow-visual {
    width: 100%;
    max-width: 100%;
  }

  .hero p {
    max-width: min(100%, 320px);
    font-size: 18px;
  }

  .hero-media img {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    height: auto;
  }

  .actions {
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  .button {
    width: min(100%, 260px);
  }

  .section-head h2 {
    font-size: 38px;
  }
}
