:root {
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --soft-2: #eef4ff;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --max: 1120px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --page-gutter: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: white;
}

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

img {
  max-width: 100%;
}

code {
  font-family: Consolas, monospace;
  display: inline;
  background: #eef2f7;
  color: #0f172a;
  border: 1px solid #d6dee8;
  border-radius: 6px;
  padding: 0.08em 0.34em;
  font-size: 0.92em;
  line-height: 1.5;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  padding-top: 0;
  padding-bottom: 0;
}

.brand {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  position: relative;
  z-index: 2;
}

.navtoggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.navtoggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navtoggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.navtoggle.is-open span:nth-child(2) {
  opacity: 0;
}

.navtoggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.navlinks {
  display: flex;
  gap: 10px;
  color: #475569;
  font-size: 14px;
  align-items: center;
}

.navlinks a {
  padding: 9px 12px;
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navlinks a:hover,
.navlinks a.is-active {
  background: var(--soft-2);
  color: var(--ink);
}

.hero {
  padding: 92px 0 70px;
}

.hero-home {
  border-top: 0;
}

.eyebrow,
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
}

.kicker-light {
  color: #93c5fd;
}

h1,
.content-title {
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 14px 0 24px;
  max-width: 950px;
}

h2 {
  font-size: 34px;
  letter-spacing: -0.025em;
  margin: 8px 0 12px;
}

h3 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 760px;
}

.lead-tight {
  font-size: 22px;
}

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

.btn {
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.btn-light {
  display: inline-block;
  background: white;
  color: var(--ink);
  border-color: white;
}

section {
  padding: 66px 0;
  border-top: 1px solid var(--line);
}

.sub {
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 32px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 23px;
  background: white;
}

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

.flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 28px;
}

.step {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
  font-weight: 750;
  font-size: 14px;
}

.step.future {
  border-style: dashed;
  color: var(--muted);
}

.rq {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.status {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: var(--soft);
}

.status dl {
  margin: 0;
}

.status dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 13px;
}

.status dd {
  margin: 2px 0;
  font-weight: 700;
}

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.evidence,
.latest,
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.evidence {
  gap: 18px;
}

.showcase {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}

.plot {
  height: 270px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(#fff, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.plot-meta {
  margin-top: 10px;
}

.dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  opacity: 0.75;
}

.mock {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--soft);
}

.mockbar {
  height: 15px;
  width: 38%;
  background: #cbd5e1;
  border-radius: 4px;
  margin-bottom: 13px;
}

.mockrow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.mockbox {
  height: 85px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mockpanel {
  height: 130px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 9px;
}

.item {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.meta {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.item strong {
  display: block;
  margin-top: 3px;
}

.item-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.item-date {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.collab {
  background: var(--ink);
  color: white;
  border-radius: 18px;
  padding: 36px;
}

.collab p {
  color: #cbd5e1;
  max-width: 720px;
}

.smalllink {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.link-arrow {
  font-size: 0.95em;
  line-height: 1;
  transition: transform 0.2s ease;
}

.btn:hover .link-arrow,
.smalllink:hover .link-arrow,
.item strong a:hover .link-arrow {
  transform: translateX(3px);
}

.content-main {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.content-hero {
  padding: 74px 0 28px;
  border-top: 0;
}

.content-lead {
  max-width: 840px;
}

.content-shell {
  padding-top: 22px;
}

.content-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.content-sidebar {
  position: sticky;
  top: 96px;
}

.toc-card,
.markdown-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.toc-card {
  padding: 22px;
}

.toc-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-link {
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
}

.toc-link.is-current {
  color: var(--ink);
  font-weight: 700;
}

.toc-level-2 {
  padding-left: 12px;
}

.toc-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.markdown-card {
  padding: 28px 32px;
}

.records-overview {
  display: grid;
  gap: 24px;
}

.records-list-card h2 {
  margin-top: 0;
}

.markdown-card h1 {
  font-size: 44px;
  max-width: none;
}

.markdown-card h2 {
  margin-top: 28px;
}

.markdown-card h3 {
  margin-top: 24px;
}

.markdown-card p,
.markdown-card li {
  color: #334155;
}

.markdown-card ul {
  padding-left: 22px;
}

.markdown-card ol {
  padding-left: 24px;
}

.markdown-card ul,
.markdown-card ol {
  margin: 16px 0;
}

.markdown-card .table-scroll {
  overflow-x: auto;
  margin: 22px 0;
}

.markdown-card table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  border: 1px solid var(--line);
}

.markdown-card th,
.markdown-card td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: #334155;
}

.markdown-card th {
  background: var(--soft);
  font-weight: 700;
}

.markdown-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.markdown-card blockquote {
  margin: 22px 0;
  padding: 18px 20px 18px 22px;
  border-left: 4px solid #cbd5e1;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%);
  color: #334155;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.markdown-card blockquote > :first-child {
  margin-top: 0;
}

.markdown-card blockquote > :last-child {
  margin-bottom: 0;
}

.markdown-card pre {
  position: relative;
  overflow-x: hidden;
  margin: 24px 0;
  padding: 22px 24px 22px 28px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
  color: #1e293b;
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  border-left: 6px solid #94a3b8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.markdown-card pre code {
  display: block;
  background: transparent;
  color: inherit;
  padding: 0;
  border: 0;
  border-radius: 0;
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
  font-size: 0.98rem;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.markdown-card .md-inline-image,
.markdown-card .md-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.markdown-card .md-inline-image {
  margin: 22px 0;
}

.markdown-card .md-image {
  margin: 22px 0;
}

.markdown-card .md-image figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.markdown-card p > code:only-child {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: #eef3f8;
  border: 1px solid #d8e1eb;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.05);
}

.markdown-card blockquote p,
.markdown-card blockquote li {
  color: inherit;
}

footer {
  padding: 38px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 960px) {
  .content-layout,
  .rq,
  .evidence,
  .latest,
  .showcase {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    position: static;
  }

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

@media (max-width: 800px) {
  .wrap {
    --page-gutter: 20px;
  }

  .nav {
    flex-wrap: wrap;
    padding: 12px var(--page-gutter);
  }

  .brand {
    max-width: calc(100% - 82px);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
  }

  .navtoggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .navlinks {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    flex-basis: 100%;
    width: 100%;
    padding: 12px 0 4px;
    border-top: 1px solid var(--line);
  }

  .navlinks.is-open {
    display: flex;
  }

  .navlinks a {
    display: block;
    padding: 12px 14px;
  }

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

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

  .hero,
  .content-hero {
    padding-top: 60px;
  }

  .markdown-card {
    padding: 22px 20px;
  }
}
