:root {
  color-scheme: light;
  --bg: #f4f7fd;
  --panel: rgb(255 255 255 / .67);
  --ink: #17233e;
  --muted: #4b5875;
  --line: #dbe3f2;
  --blue: #465baf;
  --blue-soft: #e4eaff;
  --teal: #296c60;
  --error: #a24455;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, figure { margin: 0; }
body {
  min-width: 280px;
  background:
    radial-gradient(ellipse 63% 420px at 82% 110px, #e3e9fc 3%, transparent 95%),
    radial-gradient(ellipse 48% 330px at 98% 410px, #eae2f8 0%, transparent 92%),
    radial-gradient(ellipse 57% 460px at 2% 290px, #f8ebee 0%, transparent 92%);
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }

.wrap {
  width: min(100% - clamp(2rem, 10vw, 9rem), 1264px);
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  z-index: 2;
  top: .6rem;
  left: .6rem;
  padding: .65rem 1rem;
  color: white;
  border-radius: 12px;
  background: var(--ink);
  transform: translateY(-180%);
}
.skip-link:focus-visible { transform: none; }
.site-header {
  background: rgb(248 250 255 / .58);
  border-bottom: 1px solid rgb(124 144 184 / .16);
  backdrop-filter: blur(14px);
}
.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .68rem;
  font-size: 1.1rem;
  font-weight: 720;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.brand-mark {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  padding-bottom: 8px;
  border: 1px solid rgb(116 132 193 / .21);
  border-radius: 11px;
  background: linear-gradient(145deg, #f5f6fe, #dfe4fc 66%, #e9e0f8);
  box-shadow: inset 0 1px white, 0 3px 8px rgb(78 92 151 / .09);
}
.brand-mark i { width: 4px; height: 8px; background: #344681; border-radius: 2px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 12px; }
.site-nav { display: flex; align-items: center; gap: clamp(.6rem, 3vw, 1.7rem); }
.site-nav a {
  border-radius: 999px;
  padding: .55rem .6rem;
  font-size: .88rem;
  font-weight: 570;
  color: var(--muted);
}
.site-nav a:hover { color: var(--ink); background: rgb(255 255 255 / .6); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.4rem);
  padding-block: clamp(3.25rem, 7vw, 6.25rem);
}
.intro { min-width: 0; }
.platform {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.15rem;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 640;
}
.platform span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6e80ca;
  box-shadow: 0 0 0 4px rgb(149 160 223 / .2);
}
.intro h1 {
  max-width: 10ch;
  font-size: clamp(3.2rem, 6.35vw, 6.8rem);
  font-weight: 680;
  letter-spacing: -.07em;
  line-height: .97;
}
.intro h1 em { display: block; color: #4d61ac; font-style: normal; }
.intro-copy {
  max-width: 40ch;
  margin-top: 1.45rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.17rem);
  line-height: 1.6;
}
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.7rem; }
.action {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 48px;
  padding: .6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .87rem;
  font-weight: 650;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.action span { font-size: 1.05rem; }
.action.primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 7px 18px rgb(31 43 83 / .16);
}
.action.primary:hover { background: #283a68; transform: translateY(-2px); }
.action.secondary { background: rgb(255 255 255 / .65); border-color: var(--line); }
.action.secondary:hover { background: #fff; border-color: #a9b9e0; }

.graph-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / .95);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgb(64 77 124 / .13), 0 4px 14px rgb(87 98 148 / .06);
  backdrop-filter: blur(14px);
}
.graph-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.25rem 1rem;
}
.graph-title { min-width: 0; }
.graph-title h2 { font-size: 1.05rem; font-weight: 680; letter-spacing: -.03em; }
.graph-title p { margin-top: .37rem; color: var(--muted); font-size: .75rem; line-height: 1.4; }
.graph-status {
  display: flex;
  flex: none;
  align-items: center;
  gap: .43rem;
  padding: .38rem .6rem;
  border: 1px solid #dce4f6;
  border-radius: 999px;
  background: #f6f8fd;
  font-size: .67rem;
  font-weight: 630;
  color: var(--muted);
  white-space: nowrap;
}
.graph-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.graph-status[data-status="recorded"] { color: #405394; background: #eef2ff; }
.graph-status[data-status="live"] { color: var(--teal); background: #eff9f6; border-color: #cfe9e1; }
.graph-status[data-status="live"]::before { box-shadow: 0 0 0 2px #bfe2d8; }
.graph-status[data-status="error"] { color: var(--error); background: #fff4f5; border-color: #f2dce0; }

.plot {
  position: relative;
  isolation: isolate;
  height: clamp(325px, 32vw, 418px);
  min-width: 0;
  margin-inline: .55rem;
  overflow: hidden;
  border: 1px solid rgb(167 184 230 / .27);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 0%, #f9eaf2 0%, transparent 62%),
    radial-gradient(ellipse at 15% 100%, #e2eefe 0%, transparent 62%),
    radial-gradient(ellipse at 100% 100%, #ddd9f7 0%, transparent 59%),
    #ebedfb;
}
.plot canvas, .labels { position: absolute; inset: 0; width: 100%; height: 100%; }
.labels { pointer-events: none; }
.node-label {
  --node-accent: #6373ab;
  position: absolute;
  display: grid;
  gap: .17rem;
  align-content: center;
  width: min(var(--node-width, 160px), calc(100% - 1.4rem));
  height: 58px;
  transform: translate(-50%, -50%);
  padding: .47rem .62rem;
  border: 1px solid #fbfcff;
  border-radius: 13px;
  background: rgb(253 254 255 / .84);
  box-shadow: 0 6px 16px rgb(58 73 124 / .12);
}
.node-label[data-level="0"] {
  border-color: #d7dff8;
  background: linear-gradient(120deg, #fff, #f2f3fe);
  box-shadow: 0 8px 24px rgb(72 91 158 / .16);
}
.node-label[data-status="complete"] { --node-accent: #458374; }
.node-label[data-status="active"] { --node-accent: #516ac5; }
.node-label[data-status="error"] { --node-accent: #a34b59; }
.node-title {
  display: -webkit-box;
  color: var(--ink);
  font-size: .76rem;
  font-weight: 660;
  line-height: 1.2;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.node-status {
  display: flex;
  align-items: center;
  gap: .32rem;
  color: var(--muted);
  font-size: .63rem;
  font-weight: 580;
  line-height: 1.25;
}
.node-status::before {
  content: "";
  width: .36rem;
  height: .36rem;
  flex: none;
  border-radius: 50%;
  background: var(--node-accent);
}
.empty-graph {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .75rem;
  color: var(--muted);
  font-size: .83rem;
}
.empty-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgb(150 166 232 / .28), 0 0 0 13px rgb(181 193 245 / .28);
  background: #778bd0;
}
.graph-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .33rem 1rem;
  padding: .83rem 1.2rem .95rem;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
}
.graph-counts { display: flex; gap: .8rem; }
.graph-counts strong { color: var(--ink); font-weight: 650; }
.graph-event { grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-link { grid-column: 2; grid-row: 1 / span 2; color: var(--blue); font-weight: 660; }
.graph-link span { margin-left: .25rem; }
.graph-link:hover { text-decoration: underline; }

.workflow {
  border-top: 1px solid #dce4f2;
  padding-block: clamp(1.5rem, 3.5vw, 2.5rem) clamp(3rem, 7vw, 6rem);
}
.workflow-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .45rem 1.15rem;
  margin-bottom: 1.05rem;
}
.workflow-header h2 { font-size: clamp(1.42rem, 2.75vw, 2.2rem); font-weight: 650; letter-spacing: -.05em; }
.workflow-header p { color: var(--muted); font-size: .75rem; }
.workflow-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .76rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.stage {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid #e0e6f6;
  border-radius: 19px;
  background: rgb(255 255 255 / .54);
  box-shadow: 0 5px 16px rgb(63 88 146 / .045);
}
.stage h3 { margin-bottom: .52rem; color: var(--blue); font-size: .78rem; font-weight: 670; }
.stage-result {
  color: var(--ink);
  font-size: clamp(.95rem, 1.55vw, 1.13rem);
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -.025em;
}
.stage-detail { margin-top: .34rem; color: var(--muted); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.stage-link { display: inline-block; margin-top: .55rem; color: var(--blue); font-size: .75rem; font-weight: 650; }
.stage-link:hover { text-decoration: underline; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 920px) {
  .wrap { width: min(100% - clamp(2rem, 8vw, 5rem), 1264px); }
  .hero { gap: clamp(1.4rem, 4vw, 3rem); }
}
@media (max-width: 740px) {
  .header-inner { height: 62px; }
  .hero { grid-template-columns: 1fr; padding-block: 2.8rem 2.8rem; gap: 1.8rem; }
  .intro h1 { font-size: clamp(3rem, 11vw, 5.7rem); }
  .intro-copy { margin-top: 1rem; }
  .actions { margin-top: 1.25rem; }
  .plot { height: clamp(320px, 72vw, 384px); }
}
@media (max-width: 520px) {
  .workflow-stages { grid-template-columns: 1fr; gap: .6rem; }
  .stage { padding: .95rem; }
}
@media (max-width: 410px) {
  .wordmark { gap: .5rem; font-size: 1rem; }
  .brand-mark { width: 29px; height: 29px; padding-bottom: 6px; }
  .site-nav { gap: .15rem; }
  .site-nav a { font-size: .78rem; padding-inline: .48rem; }
  .graph-header, .graph-footer { padding-inline: .85rem; }
  .plot { margin-inline: .4rem; border-radius: 19px; }
  .graph-panel { border-radius: 23px; }
  .node-label { padding-inline: .45rem; }
  .node-title { font-size: .69rem; }
  .node-status { font-size: .61rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
