:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --panel: #ffffff;
  --line: #e7e8ec;
  --line-soft: #eef0f3;
  --text: #14161a;
  --muted: #6b7280;
  --muted-2: #9aa1ad;
  --ink: #14161a;
  --max: 1040px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; height: 64px; gap: 16px; }
.brand { font-weight: 600; letter-spacing: -0.02em; font-size: 17px; color: var(--ink); }
.nav-center { flex: 1; display: flex; justify-content: center; gap: 30px; }
.nav-center a { color: var(--muted); font-size: 14px; }
.nav-center a:hover { color: var(--text); }
.nav-center a[aria-current="page"] { color: var(--ink); }
.nav-contact { font-size: 14px; color: var(--text); }
.nav-contact:hover { color: var(--muted); }
@media (max-width: 680px) {
  .nav { gap: 12px; flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .nav-center { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 20px; flex-wrap: wrap; }
}

/* Buttons */
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 500; font-size: 15px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); background: #2b2f37; }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted-2); }

/* Sections / page */
.hero { padding: 104px 0 76px; }
.page-head { padding: 80px 0 8px; }
.eyebrow {
  display: inline-block; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; background: var(--bg-soft); margin-bottom: 24px;
}
h1 {
  font-size: clamp(34px, 5.6vw, 58px);
  line-height: 1.07; letter-spacing: -0.035em;
  margin: 0 0 22px; font-weight: 600; color: var(--ink); max-width: 18ch;
}
.lede { font-size: clamp(16px, 2.3vw, 20px); color: var(--muted); max-width: 58ch; margin: 0 0 34px; }

section { padding: 56px 0; border-top: 1px solid var(--line-soft); }
.section-title { font-size: 12.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 10px; }
.section-head h2 { font-size: clamp(24px, 4vw, 33px); letter-spacing: -0.025em; margin: 0 0 14px; font-weight: 600; color: var(--ink); }
.section-head p { color: var(--muted); max-width: 62ch; margin: 0; }

.prose { color: var(--muted); max-width: 64ch; }
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--ink); font-weight: 600; }

/* Engine flow */
.engine { margin-top: 34px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-soft); padding: 26px; }
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .flow { grid-template-columns: 1fr; } }
.node { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--panel); }
.node b { display: block; margin-bottom: 5px; font-size: 15px; font-weight: 600; color: var(--ink); }
.node span { color: var(--muted); font-size: 13.5px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: var(--panel); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--muted-2); box-shadow: 0 8px 30px rgba(20,22,26,0.06); }
.card .tag { font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-2); }
.card h3 { font-size: 19px; margin: 10px 0 8px; letter-spacing: -0.015em; font-weight: 600; color: var(--ink); }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.card .status { display: inline-block; margin-top: 16px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; background: var(--bg-soft); }

/* Simple list rows (blog, research, etc.) */
.rows { margin-top: 32px; border-top: 1px solid var(--line-soft); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 2px; border-bottom: 1px solid var(--line-soft); }
.row h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0 0 4px; letter-spacing: -0.01em; }
.row p { color: var(--muted); font-size: 14px; margin: 0; }
.row .meta { color: var(--muted-2); font-size: 13px; white-space: nowrap; }
.empty { margin-top: 32px; color: var(--muted); font-size: 15px; border: 1px dashed var(--line); border-radius: 14px; padding: 40px 24px; text-align: center; background: var(--bg-soft); }

/* Contact lines */
.contact-list { margin-top: 28px; display: grid; gap: 18px; max-width: 460px; }
.contact-list .item { border-top: 1px solid var(--line-soft); padding-top: 16px; }
.contact-list .k { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.contact-list .v { font-size: 17px; color: var(--ink); }
.contact-list .v a:hover { color: var(--muted); }

/* Footer */
footer { border-top: 1px solid var(--line-soft); padding: 40px 0 60px; color: var(--muted); font-size: 14px; margin-top: 24px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; }
footer a:hover { color: var(--text); }

/* Clickable list rows */
a.row { transition: opacity .15s ease; }
a.row:hover h3 { color: var(--muted); }
a.row:hover { opacity: 0.92; }

/* Rich prose (rendered Markdown) */
.prose { font-size: 17px; line-height: 1.75; }
.prose h2 { color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 38px 0 14px; }
.prose h3 { color: var(--ink); font-size: 19px; font-weight: 600; margin: 30px 0 10px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--muted-2); }
.prose a:hover { text-decoration-color: var(--ink); }
.prose blockquote { margin: 22px 0; padding: 4px 18px; border-left: 2px solid var(--line); color: var(--muted); }
.prose code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 0.88em; }
.prose pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow: auto; margin: 22px 0; }
.prose pre code { background: none; border: none; padding: 0; font-size: 13.5px; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; margin: 18px 0; }
.prose hr { border: none; border-top: 1px solid var(--line-soft); margin: 32px 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 22px 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 600; }
