:root {
  color-scheme: dark;
  --canvas: #08080a;
  --panel: #111116;
  --ink: #f5f4fa;
  --muted: #b0aebb;
  --line: #2b2a35;
  --accent: #b7a8ff;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--canvas);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, h4, p, figure, ol { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent); color: var(--canvas); }

.wrap {
  width: min(100% - 2 * clamp(1.1rem, 4vw, 3rem), 71rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  padding: .65rem .9rem;
  background: var(--panel);
  transform: translateY(-220%);
}

.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); }

.site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1.15rem;
  min-height: 4.5rem;
  padding-block: .75rem;
}

.header-bar .site-links { margin-inline-start: auto; }

.theme-toggle:not([hidden]) {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover { color: var(--ink); background: var(--panel); }

.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.lang-menu { position: relative; }

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 2.5rem;
  padding-inline: .65rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--ink); background: var(--panel); }
.lang-menu .flag { font-size: 1.05rem; line-height: 1; }

.lang-list {
  position: absolute;
  z-index: 10;
  top: calc(100% + .4rem);
  right: 0;
  min-width: 11rem;
  margin: 0;
  padding: .35rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--panel);
  box-shadow: 0 .8rem 2.4rem #0000004d;
  list-style: none;
}

.lang-list a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .6rem;
  border-radius: .4rem;
  color: var(--ink);
  font-size: .9rem;
  text-decoration: none;
}

.lang-list a:hover { background: var(--canvas); }
.lang-list a[aria-current="page"] { color: var(--accent); font-weight: 650; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .52rem;
  font-size: 1.57rem;
  font-weight: 740;
  letter-spacing: -.05em;
  line-height: 1;
  text-decoration: none;
}

.brand-sep { margin-inline: -.5rem .02rem; color: var(--muted); font-weight: 500; }
.brand-product { color: var(--accent); }

.brand-mark {
  position: relative;
  width: 1.9rem;
  height: 1.75rem;
  color: var(--accent);
}

.brand-mark::before, .brand-mark::after {
  content: '';
  position: absolute;
  width: 1.13rem;
  height: .83rem;
  border: 1.5px solid currentColor;
}

.brand-mark::before {
  top: .15rem;
  left: .05rem;
  border-radius: .35rem .35rem .35rem .05rem;
  background: currentColor;
}

.brand-mark::after {
  right: .05rem;
  bottom: .22rem;
  border-radius: .35rem .35rem .05rem .35rem;
  background: var(--canvas);
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem clamp(.75rem, 2.6vw, 1.9rem);
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 570;
}

.site-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  text-decoration: none;
}

.site-links a:hover { color: var(--ink); }

.site-links .nav-guide {
  gap: .55rem;
  padding-inline: .85rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  color: var(--ink);
}

.site-links .nav-guide:hover { background: var(--panel); border-color: #6a627d; }

.hero {
  display: grid;
  justify-items: center;
  gap: clamp(2.3rem, 5.5vw, 4rem);
  padding-block: clamp(3.4rem, 6.7vw, 6rem) clamp(3rem, 6.4vw, 6rem);
}

.hero-copy {
  position: relative;
  isolation: isolate;
  min-width: 0;
  width: 100%;
  text-align: center;
}

.hero-copy::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -3rem 0 10%;
  background: radial-gradient(ellipse at 50% 43%, #4a2b934a, transparent 68%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1.4rem;
  padding: .4rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: .88rem;
  font-weight: 560;
}

.eyebrow strong { color: var(--accent); font-weight: 700; }

.footer-note { color: var(--muted); font-size: .88rem; }

.hero h1, .section-title {
  letter-spacing: -.045em;
  text-wrap: balance;
}

.hero h1 {
  font-size: clamp(2.5rem, 7.3vw, 6.35rem);
  font-weight: 720;
  line-height: .99;
  text-shadow: 0 0 .42em #ad99ff55;
}

.hero h1 span {
  display: block;
  color: #d1c2ff;
  text-shadow: 0 0 .16em #af8fffaa, 0 0 .52em #9460ffae, 0 0 1.1em #7748ff70;
}

.hero-intro {
  max-width: 35rem;
  margin: 1.35rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .65rem 1.1rem;
  margin-top: 1.6rem;
  font-size: .94rem;
  font-weight: 650;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 3.15rem;
  padding: .65rem 1.14rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  text-decoration: none;
}

.button-primary { background: var(--accent); color: #151020; }
.button-primary:hover { background: #d3c9ff; }
.button-secondary { border-color: var(--line); }
.button-secondary:hover { border-color: #6a627d; background: var(--panel); }
.text-link:hover { color: var(--accent); }

.preview {
  position: relative;
  isolation: isolate;
  width: min(100%, 65rem);
  padding: clamp(.75rem, 5vw, 3.1rem);
  border: 1px solid #252334;
  border-radius: clamp(.9rem, 2.8vw, 1.6rem);
  background: radial-gradient(ellipse at 73% 0%, #292448 0%, transparent 65%), #0c0b12;
}

.preview::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(#c8bbff14 1px, transparent 1px),
    linear-gradient(90deg, #c8bbff14 1px, transparent 1px);
  background-size: 1.65rem 1.65rem;
  mask-image: linear-gradient(#000, transparent 92%);
  pointer-events: none;
}

.sample {
  overflow: hidden;
  max-width: 49rem;
  margin-inline: auto;
  border: 1px solid #444053;
  border-radius: .85rem;
  background: var(--panel);
  box-shadow: 0 1rem 3.5rem #040307a8;
}

.sample-heading, .sample-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: .88rem clamp(.9rem, 3vw, 1.5rem);
}

.sample-heading { border-bottom: 1px solid var(--line); background: #171620; }
.sample-title { display: block; margin-top: .25rem; font-size: 1.1rem; font-weight: 680; }

.sample-label, .sample-mode, .branch {
  font-family: var(--mono);
  font-size: .73rem;
}

.sample-label { color: var(--accent); }
.sample-mode { color: var(--muted); }

.messages {
  padding: 0 clamp(.9rem, 3vw, 1.5rem);
  list-style: none;
}

.message {
  display: grid;
  grid-template-columns: 1.85rem minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  padding: .9rem 0;
  font-size: .91rem;
  line-height: 1.5;
}

.message + .message { border-top: 1px solid var(--line); }

.avatar {
  display: grid;
  place-items: center;
  height: 1.85rem;
  border: 1px solid #6a5da1;
  border-radius: .5rem;
  background: #28213e;
  color: #e2d8ff;
  font: 650 .76rem var(--mono);
}

.reviewer .avatar { border-color: #4b647d; background: #1c2b3b; color: #c9e4ff; }
.observer .avatar { border-color: #4a706b; background: #1c302f; color: #bbf3e7; }
.message strong { display: block; margin-bottom: .15rem; font-size: .85rem; }
.message p { color: var(--muted); }

.branch {
  margin-left: .9rem;
  padding: .3rem .55rem .35rem 1.05rem;
  border-left: 1px solid #7668b2;
  color: var(--accent);
  line-height: 1.5;
}

.branch + .message {
  margin-left: .9rem;
  padding: .32rem 0 1rem 1.05rem;
  border-left: 1px solid #7668b2;
}

.sample-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: .84rem;
  font-weight: 640;
}

.sample-footer a { text-decoration: none; }
.sample-footer a:hover { text-decoration: underline; }

.section {
  padding-block: clamp(3rem, 6vw, 5.4rem);
  border-top: 1px solid var(--line);
}

.section-title {
  font-size: clamp(2.15rem, 4.7vw, 4rem);
  font-weight: 690;
  line-height: 1.04;
  text-shadow: 0 0 .42em #b398ff65, 0 0 1em #8454ff70;
}

.role-panels {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: start;
  gap: 1rem;
  margin-top: 1.75rem;
}

.role-panel {
  padding: clamp(1.1rem, 2.8vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--panel);
}

.role-panel h3 { margin-bottom: .8rem; color: var(--accent); font-size: 1.35rem; }
.role-panel h4 { margin-bottom: .4rem; font-size: 1rem; }
.role-panel p + h4, .role-panel p + p { margin-top: 1.1rem; }
.role-panel p, .faq p, .connect-steps { color: var(--muted); font-size: .95rem; line-height: 1.67; }

.connect-steps { margin-block: .85rem; padding-inline-start: 1.4rem; }
.connect-steps li + li { margin-top: .45rem; }
.connect-steps li::marker { color: var(--accent); font-weight: 650; }

.connect-steps code {
  padding: .1em .3em;
  border-radius: .25rem;
  background: #1a1627;
  color: var(--accent);
  font: .88em var(--mono);
  overflow-wrap: anywhere;
}

.faq {
  display: grid;
  grid-template-columns: .7fr 1fr;
  gap: 1.35rem clamp(2rem, 7vw, 6.5rem);
}

.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem .25rem;
  cursor: pointer;
  font-weight: 630;
  line-height: 1.4;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+' / ''; color: var(--accent); font: 1.2rem var(--mono); }
.faq details[open] summary::after { content: '−' / ''; }
.faq summary:hover { color: var(--accent); }
.faq p { padding: 0 1.6rem 1.2rem .25rem; }

@media (max-width: 43rem) {
  .role-panels, .faq { grid-template-columns: 1fr; }
}

@media (max-width: 36rem) {
  .site-links a:not(.nav-guide) { display: none; }
}

@media (max-width: 24rem) {
  .lang-menu .lang-code { display: none; }
}

@media (max-width: 32rem) {
  .site-bar { column-gap: .65rem; }
  .brand { font-size: 1.3rem; gap: .4rem; }
  .brand-sep { margin-inline-start: -.4rem; }
    .site-links { gap: .1rem .72rem; font-size: .79rem; }
  .site-links .nav-guide { gap: .32rem; padding-inline: .55rem; }
  .hero { padding-top: 3rem; }
  .hero h1 { font-size: clamp(1.8rem, 9.1vw, 3.15rem); }
  .hero-intro { margin-top: 1.05rem; }
  .hero-actions { gap: .5rem; margin-top: 1.25rem; }
  .button { gap: .5rem; padding-inline: .8rem; font-size: .88rem; }
}
