:root {
  color-scheme: light;
  --bg: #f6faff;
  --bg-soft: #edf5ff;
  --ghost: #f8f8ff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(233, 242, 255, 0.76);
  --text: #46586f;
  --text-strong: #203246;
  --muted: #6f8198;
  --line: rgba(126, 157, 198, 0.18);
  --line-strong: rgba(110, 144, 190, 0.3);
  --brand: #9bc4f6;
  --brand-deep: #6c95cf;
  --brand-soft: rgba(155, 196, 246, 0.18);
  --brand-soft-2: rgba(211, 229, 255, 0.52);
  --accent: #dbeaff;
  --accent-2: #eef5ff;
  --success: #7fb8a7;
  --warning: #d6b57e;
  --shadow: 0 24px 60px rgba(100, 134, 182, 0.12);
  --shadow-soft: 0 14px 34px rgba(100, 134, 182, 0.08);
  --radius-xl: 34px;
  --radius: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(219, 234, 255, 0.94), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(196, 221, 255, 0.7), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(225, 237, 255, 0.82), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f2f7fe 46%, #f9fbff 100%);
}

a { color: inherit; }
img, svg { max-width: 100%; display: block; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(248, 251, 255, 0.74);
  border-bottom: 1px solid rgba(126, 157, 198, 0.14);
}

.topbar-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-strong);
  background: linear-gradient(145deg, #ffffff 0%, #e7f1ff 54%, #cbdeff 100%);
  border: 1px solid rgba(155, 196, 246, 0.28);
  box-shadow: 0 14px 38px rgba(108, 149, 207, 0.16);
}

.brand-copy strong,
.brand-copy span {
  display: block;
  line-height: 1.1;
}

.brand-copy strong {
  color: var(--text-strong);
  letter-spacing: -0.03em;
}

.brand-copy span {
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--muted);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.34);
  transition: 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-strong);
  border-color: rgba(155, 196, 246, 0.36);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

main {
  padding: 44px 0 84px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(255, 255, 255, 0.94) 100%);
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 40%);
  pointer-events: none;
}

.hero-copy,
.hero-aside,
.section {
  padding: 36px;
}

.hero-copy > *,
.hero-aside > *,
.section > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.small-label,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(155, 196, 246, 0.22);
  background: rgba(255, 255, 255, 0.84);
  color: var(--brand-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.79rem;
}

.eyebrow { margin-bottom: 18px; }
.small-label { margin-bottom: 16px; }

h1, h2, h3 {
  margin: 0;
  color: var(--text-strong);
  line-height: 1.05;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  letter-spacing: -0.06em;
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.6rem, 2.1vw, 2.45rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

p { margin: 0; }

.lead {
  max-width: 64ch;
  margin-bottom: 28px;
  color: #5e7188;
  font-size: 1.08rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 15px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  transition: 180ms ease;
}

.button.primary {
  color: var(--text-strong);
  background: linear-gradient(135deg, #ffffff 0%, #eaf3ff 56%, #cfe1ff 100%);
  border-color: rgba(155, 196, 246, 0.3);
  box-shadow: var(--shadow-soft);
}

.button.secondary {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.72);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.meta-list,
.stat-list,
.card-grid,
.quick-links,
.surface-grid,
.checklist,
.flow-grid,
.metric-strip,
.story-grid,
.split-grid,
.diagram-steps,
.timeline,
.detail-grid {
  display: grid;
  gap: 16px;
}

.meta-list,
.metric-strip,
.timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid,
.story-grid,
.surface-grid,
.detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick-links,
.flow-grid,
.checklist,
.split-grid,
.diagram-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card,
.stat,
.mini-card,
.surface-card,
.check-item,
.flow-card,
.metric,
.note-card,
.timeline-step,
.detail-card {
  position: relative;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(240, 246, 255, 0.92));
  box-shadow: 0 10px 28px rgba(100, 134, 182, 0.06);
}

.surface-card,
.flow-card {
  text-decoration: none;
  transition: 180ms ease;
}

.surface-card:hover,
.surface-card:focus-visible,
.flow-card:hover,
.flow-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(155, 196, 246, 0.38);
  box-shadow: var(--shadow-soft);
}

.card strong,
.stat strong,
.mini-card strong,
.surface-card strong,
.check-item strong,
.flow-card strong,
.metric strong,
.note-card strong,
.timeline-step strong,
.detail-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-strong);
  font-size: 1.02rem;
}

.card p,
.stat p,
.mini-card p,
.surface-card p,
.check-item p,
.flow-card p,
.metric p,
.note-card p,
.timeline-step p,
.detail-card p,
.muted {
  color: var(--muted);
}

.metric .metric-value {
  margin-bottom: 6px;
  color: var(--brand-deep);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.section {
  margin-top: 28px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.kicker {
  margin-bottom: 10px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(127, 184, 167, 0.3);
  background: rgba(127, 184, 167, 0.12);
  color: #507b6e;
  font-size: 0.92rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.hero-visual {
  margin-top: 20px;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(155, 196, 246, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(232,242,255,0.9));
}

.surface-diagram {
  width: 100%;
  height: auto;
}

.surface-diagram text {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  fill: #58708a;
}

.surface-diagram .diagram-panel {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(155, 196, 246, 0.3);
  stroke-width: 1.5;
}

.surface-diagram .diagram-core {
  fill: rgba(210, 228, 255, 0.8);
  stroke: rgba(108, 149, 207, 0.38);
  stroke-width: 1.5;
}

.surface-diagram .diagram-line {
  stroke: rgba(126, 157, 198, 0.56);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.hero-aside-stack,
.stack {
  display: grid;
  gap: 16px;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.inline-chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.diagram-band {
  margin-top: 22px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(235,244,255,0.92));
  border: 1px solid rgba(155, 196, 246, 0.2);
}

.diagram-steps {
  align-items: stretch;
}

.diagram-step {
  position: relative;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.diagram-step small,
.overline {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 700;
}

.callout {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(155, 196, 246, 0.24);
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(232,242,255,0.78));
}

.note-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 24px;
}

.subtle-divider {
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, transparent, rgba(126, 157, 198, 0.36), transparent);
}

.site-footer {
  margin-top: 28px;
  padding-bottom: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer a { color: var(--brand-deep); }

.code-block {
  margin-top: 14px;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(126, 157, 198, 0.22);
  background: rgba(250, 252, 255, 0.94);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #5c7292;
}

::selection {
  background: rgba(155, 196, 246, 0.24);
  color: var(--text-strong);
}

@media (max-width: 1000px) {
  .hero,
  .meta-list,
  .card-grid,
  .quick-links,
  .surface-grid,
  .checklist,
  .flow-grid,
  .metric-strip,
  .story-grid,
  .split-grid,
  .diagram-steps,
  .timeline,
  .detail-grid,
  .note-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner,
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .meta-list,
  .card-grid,
  .quick-links,
  .surface-grid,
  .checklist,
  .flow-grid,
  .metric-strip,
  .story-grid,
  .split-grid,
  .diagram-steps,
  .timeline,
  .detail-grid,
  .note-row {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-aside,
  .section {
    padding: 24px;
  }

  h1 { max-width: none; }
  main { padding-top: 28px; }
}
