.public-site {
  --site-accent: #a53765;
  --site-card: #fffaf7;
  --site-tint: #f8e5eb;
  --site-dark: #21162f;
  --site-dark-muted: #d6bfdb;
  --site-dark-rule: #ffffff29;
  --site-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  background: radial-gradient(ellipse 660px 465px at 77% 225px, #f0bedb55, transparent 100%), var(--bg);
}

[data-theme=dark] .public-site {
  --site-accent: #ffa4bc;
  --site-card: #2e213a;
  --site-tint: #402a43;
  background: radial-gradient(ellipse 660px 465px at 77% 225px, #83457433, transparent 100%), var(--bg);
}

.site-container { width: min(100% - 80px, 1200px); margin-inline: auto; }
.public-site main { padding: 0; }
.public-site [id] { scroll-margin-top: 24px; }

.site-header {
  display: block;
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-nav, .site-footer > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.site-nav { min-height: 76px; }
.site-nav .brand, .site-footer .brand { font-size: 24px; letter-spacing: -.055em; }
.site-nav .brand-mark, .site-footer .brand-mark { width: 33px; height: 33px; }

.site-nav-links, .site-nav-actions, .site-actions, .site-footer nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-nav-links, .site-footer nav { gap: clamp(16px, 3vw, 34px); font-size: 14px; font-weight: 650; }
.site-nav-links a, .site-footer nav a { color: var(--muted); }
.site-nav-links a:hover, .site-nav-links [aria-current=page], .site-footer nav a:hover { color: var(--site-accent); }
.site-nav-links [aria-current=page] { text-decoration: underline; text-underline-offset: .38em; }

.site-nav .theme-toggle { width: 42px; min-width: 0; height: 42px; padding: 0; border-radius: 50%; }
.site-nav .theme-toggle [data-theme-icon] { font-size: 19px; }
.site-nav .theme-toggle [data-theme-label] { display: none; }

.public-site .site-button {
  min-height: 50px;
  padding: 0 18px;
  gap: 12px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.public-site .site-button:hover { transform: translateY(-2px); background: var(--site-accent); border-color: var(--site-accent); }
.public-site .site-nav .site-button { min-height: 42px; padding-inline: 14px; font-size: 13px; }

.public-site .site-button-outline { border-color: var(--border); background: var(--site-card); color: var(--ink); }
.public-site .site-button-outline:hover { background: var(--site-tint); color: var(--ink); }

.site-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--site-accent);
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: .2em;
}
.site-link svg { width: 17px; height: 17px; }

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(48px, 7vw, 106px) 0 clamp(42px, 5.1vw, 75px);
}

.site-kicker {
  margin: 0 0 12px;
  color: var(--site-accent);
  font: 700 11px/1.35 var(--site-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--site-tint);
}

.hero-kicker > span, .hero-figure-label > span {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
}

.home-hero h1, .tutorial-hero h1 {
  margin: 0;
  font-size: clamp(45px, 5.65vw, 82px);
  font-weight: 760;
  letter-spacing: -.077em;
  line-height: 1.025;
}
.home-hero h1 { font-size: clamp(44px, 5.55vw, 74px); }
.home-hero h1 em, .tutorial-hero h1 em { color: var(--site-accent); font-style: normal; }

.site-lead { max-width: 42ch; margin: 22px 0 26px; color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.62; }
.site-actions { flex-wrap: wrap; }
.hero-shared-link { margin-top: 23px; color: var(--muted); font-size: 13px; }
.hero-shared-link:hover { color: var(--site-accent); }

.hero-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid #644762;
  border-radius: 22px;
  background: var(--site-dark);
  color: var(--paper);
  box-shadow: 0 26px 65px #4316352e, 0 5px 15px #43163525;
}

.hero-figure-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px clamp(14px, 2.2vw, 26px);
  border-bottom: 1px solid var(--site-dark-rule);
  color: var(--site-dark-muted);
  font: 600 10px/1.3 var(--site-mono);
  letter-spacing: .09em;
}

.hero-figure-label { display: inline-flex; align-items: center; gap: 9px; }
.hero-figure-label > span { color: var(--signal); box-shadow: 0 0 10px #ff729977; }
.hero-figure-index { white-space: nowrap; }

.hero-stage {
  display: grid;
  align-items: center;
  position: relative;
  padding: 7.5% 10% 11%;
  background:
    radial-gradient(ellipse at 78% 52%, #62395e80, transparent 76%),
    radial-gradient(circle, #ecd5ff39 1px, transparent 1px) 50% 50% / 18px 18px,
    #251a35;
}

.hero-browser {
  overflow: hidden;
  border: 1px solid #dd9dc296;
  border-radius: 12px;
  background: #332340;
  box-shadow: 0 20px 42px #0e081eaa;
}

.hero-browser-bar {
  display: flex;
  align-items: center;
  position: relative;
  justify-content: center;
  min-height: 32px;
  border-bottom: 1px solid #efafdc38;
  color: #f2dce9;
  font: 600 10px/1.2 var(--site-mono);
}

.hero-browser-bar > span { display: inline-flex; align-items: center; gap: 5px; }
.hero-browser-bar svg { width: 12px; height: 12px; }
.hero-browser-dots { position: absolute; left: 11px; }
.hero-browser-dots i { width: 5px; height: 5px; border-radius: 50%; background: #c18ab6; }
.hero-browser-dots i:first-child { background: var(--signal); }
.hero-desktop { position: relative; aspect-ratio: 2.12; }
.hero-desktop > svg { display: block; width: 100%; height: 100%; }

.hero-dock {
  display: flex;
  gap: 5px;
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 7px;
  border: 1px solid #ffffff4f;
  border-radius: 6px;
  background: #29183fab;
}
.hero-dock span { width: 10px; height: 10px; border-radius: 3px; background: #f79fc9; }
.hero-dock span:nth-child(2) { background: #bda5ff; }
.hero-dock span:nth-child(3) { background: #ffcbad; }
.hero-dock span:nth-child(4) { background: #dfc7fc; }

.hero-tunnel-tag {
  position: absolute;
  right: 4.5%;
  bottom: 5%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px 8px 8px;
  border: 1px solid #a36b97;
  border-radius: 10px;
  background: #372541;
  box-shadow: 0 8px 18px #170d2866;
}

.hero-tunnel-tag strong, .hero-tunnel-tag small { display: block; }
.hero-tunnel-tag strong { font-size: 11px; }
.hero-tunnel-tag small { margin-top: 2px; color: var(--site-dark-muted); font: 500 9px/1.3 var(--site-mono); }

.hero-tunnel-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 6px;
  background: #5c3556;
  color: #ff9dbb;
}

.hero-tunnel-icon svg { width: 18px; height: 18px; }
.hero-path {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: clamp(7px, 1.4vw, 16px);
  min-height: 60px;
  padding: 9px clamp(12px, 2.2vw, 26px);
  border-top: 1px solid var(--site-dark-rule);
  color: var(--site-dark-muted);
  font: 600 10px/1.2 var(--site-mono);
  text-transform: uppercase;
}

.hero-path-node { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hero-path-node svg { width: 18px; height: 18px; color: #ffa6bf; }
.hero-path-line { position: relative; height: 1px; background: #9d6e97; }
.hero-path-line::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffa6bf;
  box-shadow: 0 0 8px #ffa6bf;
}

.site-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--site-tint);
  color: var(--site-accent);
}
.site-icon svg { width: 23px; height: 23px; }

.home-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 19px 0;
  border-block: 1px solid var(--border);
}

.home-highlights > div { display: flex; align-items: center; justify-content: center; gap: 12px; padding-inline: 12px; }
.home-highlights > div + div { border-left: 1px solid var(--border); }
.home-highlights p { margin: 0; font-size: 14px; }
.home-highlights small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

.site-section { padding: clamp(43px, 6.3vw, 88px) 0; border-bottom: 1px solid var(--border); }
.site-section-heading { margin-bottom: 25px; }
.site-section-heading h2, .site-cta h2 {
  margin: 0;
  font-size: clamp(30px, 4.3vw, 51px);
  line-height: 1.08;
  letter-spacing: -.062em;
}
.site-section-heading > p:last-child:not(.site-kicker) { max-width: 58ch; margin: 13px 0 0; color: var(--muted); font-size: 16px; line-height: 1.62; }
.site-section-heading-split { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; }

.home-topologies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.home-topology {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: clamp(16px, 2.6vw, 32px);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--site-card);
}

.home-topology-label { display: flex; align-items: center; gap: 12px; }
.home-topology-label .site-kicker { margin: 0; }
.home-topology h3 { margin: 16px 0 0; font-size: clamp(20px, 2.2vw, 28px); letter-spacing: -.045em; line-height: 1.18; }
.home-topology p { margin: 9px 0 19px; color: var(--muted); font-size: 15px; line-height: 1.62; }

.topology-figure {
  align-self: stretch;
  margin: auto 0 17px;
  padding: 13px clamp(9px, 1.3vw, 17px) 14px;
  border: 1px solid #523d5d;
  border-radius: 11px;
  background: radial-gradient(ellipse at 50% 100%, #4c3053, transparent 85%), var(--site-dark);
  color: var(--paper);
}

.topology-figure figcaption {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--site-dark-rule);
  color: var(--site-dark-muted);
  font: 600 10px/1.3 var(--site-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.topology-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(51px, .63fr) minmax(0, 1fr) minmax(51px, .63fr) minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding-top: 10px;
}

.topology-node { display: grid; justify-items: center; gap: 2px; min-width: 0; text-align: center; line-height: 1.25; }
.topology-node strong { font-size: 12px; }
.topology-node > span:last-child { color: var(--site-dark-muted); font-size: 10px; }
.topology-icon { display: grid; place-items: center; color: #ffa6bf; }
.topology-icon svg { width: 21px; height: 21px; }
.topology-link { display: grid; gap: 6px; color: #ffafc9; text-align: center; font: 600 10px/1.2 var(--site-mono); }
.topology-line { position: relative; display: block; width: calc(100% - 3px); height: 1px; background: currentColor; }
.topology-line::after { content: ""; position: absolute; right: 0; top: -2px; width: 5px; height: 5px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); }

.home-shared {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 18px clamp(15px, 2.5vw, 30px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--site-tint);
}
.home-shared .site-icon { background: var(--site-card); }
.home-shared h3, .home-steps h3 { margin: 0; font-size: 17px; letter-spacing: -.022em; }
.home-shared p, .home-steps p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.home-steps, .tutorial-steps { margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.home-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-steps li {
  counter-increment: steps;
  padding: 17px 18px 20px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--site-card);
}

.home-steps li::before, .tutorial-steps li::before {
  content: counter(steps, decimal-leading-zero);
  color: var(--site-accent);
  font: 700 12px/1 var(--site-mono);
}
.home-steps li::before { display: block; margin-bottom: 12px; }

.home-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 25px; }
.home-faq .site-section-heading { margin: 0; }
.site-accordion details { border-bottom: 1px solid var(--border); }
.site-accordion details:first-child { border-top: 1px solid var(--border); }
.site-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 2px;
  list-style: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}
.site-accordion summary::-webkit-details-marker { display: none; }
.site-accordion summary::after { content: ""; width: 8px; height: 8px; flex-shrink: 0; margin-right: 4px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); color: var(--site-accent); transition: transform .2s ease; }
.site-accordion [open] summary::after { transform: rotate(225deg); }
.site-accordion summary:hover { color: var(--site-accent); }
.site-accordion details p { margin: 0 22px 16px 2px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.site-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: clamp(35px, 5vw, 66px);
  padding: clamp(20px, 4vw, 46px);
  border: 1px solid #6d4d70;
  border-radius: 18px;
  background: radial-gradient(ellipse at 85% 105%, #663656, transparent 80%), var(--site-dark);
  color: var(--paper);
}
.site-cta .site-kicker { color: #ffa6bf; }
.site-cta h2 { font-size: clamp(26px, 3.6vw, 42px); }
.site-cta .site-button { border-color: #ffc1d3; background: #ffc1d3; color: var(--site-dark); }
.site-cta .site-button:hover { border-color: #ffe0e8; background: #ffe0e8; }

.site-footer { display: block; margin-top: 45px; padding: 22px 0; background: var(--surface); }
.site-footer nav { flex-wrap: wrap; row-gap: 10px; font-size: 13px; }

/* Tutorials */
.tutorial-hero { padding: clamp(46px, 7vw, 96px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--border); }
.tutorial-hero h1 { max-width: 16ch; }
.tutorial-hero .site-lead { max-width: 48ch; margin-bottom: 29px; }

.tutorial-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tutorial-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: clamp(15px, 2.2vw, 25px);
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--site-card);
  color: var(--ink);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.tutorial-card:hover, .tutorial-card:focus-visible { border-color: var(--site-accent); text-decoration: none; }
.tutorial-card:hover { transform: translateY(-3px); box-shadow: 0 9px 22px #3f153117; }
.tutorial-card-top, .tutorial-card-description { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tutorial-card-top { margin-bottom: 5px; }
.tutorial-card-top .site-kicker { margin: 0; }
.tutorial-card strong { font-size: clamp(18px, 2.2vw, 25px); letter-spacing: -.045em; }
.tutorial-card-description { color: var(--muted); font-size: 14px; line-height: 1.45; }
.tutorial-card-description > span { color: var(--site-accent); font-size: 19px; }

.tutorial-guide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: clamp(25px, 7vw, 100px); }
.tutorial-guide .site-section-heading { margin: 0; }
.tutorial-guide .site-icon { margin-bottom: 18px; }
.tutorial-guide h2 { max-width: 14ch; font-size: clamp(29px, 3.8vw, 46px); }

.tutorial-steps { display: grid; gap: 12px; }
.tutorial-steps li {
  position: relative;
  counter-increment: steps;
  padding: 17px clamp(14px, 2.4vw, 26px) 17px 54px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--site-card);
}
.tutorial-steps li::before {
  position: absolute;
  top: 16px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 7px;
  background: var(--site-tint);
}
.tutorial-steps li:target { border-color: var(--site-accent); }
.tutorial-steps h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.tutorial-steps p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.62; }
.tutorial-steps strong { color: var(--ink); }
.tutorial-steps a { text-decoration: underline; text-underline-offset: .16em; }
.tutorial-steps pre { margin: 10px 0 0; padding: 10px 12px; border-radius: 7px; background: var(--site-dark); color: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }

/* Motion is decorative. All content is present at rest. */
@media (prefers-reduced-motion: no-preference) {
  .home-intro, .tutorial-intro { animation: site-appear .55s ease-out both; }
  .hero-figure, .tutorial-picker { animation: site-appear .65s .12s ease-out both; }
  .hero-tunnel-tag { animation: site-appear .5s .4s ease-out both; }
  .hero-path-line::after { animation: signal-travel 1.65s .65s ease-in-out 2; }
  .hero-path-line:nth-of-type(4)::after { animation-delay: 1.05s; }
}

@keyframes site-appear {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes signal-travel {
  from { left: 0; opacity: .25; }
  45% { opacity: 1; }
  to { left: calc(100% - 5px); opacity: .25; }
}

@media (prefers-reduced-motion: reduce) {
  .public-site .site-button:hover, .tutorial-card:hover { transform: none; }
}

@media (max-width: 1000px) {
  .site-container { width: calc(100% - 54px); }
  .hero-path-node svg { width: 15px; height: 15px; }
  .home-highlights > div { gap: 8px; }
}

@media (max-width: 760px) {
  .site-container { width: calc(100% - 36px); }
  .site-nav { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .site-nav-links { order: 1; width: 100%; padding: 12px 0; }
  .home-hero, .home-faq, .tutorial-guide { grid-template-columns: 1fr; }
  .home-hero h1, .tutorial-hero h1 { font-size: clamp(36px, 10.5vw, 66px); }
  .home-hero { gap: 30px; }
  .home-topologies { grid-template-columns: 1fr; }
  .home-highlights > div { align-items: flex-start; justify-content: flex-start; }
  .home-highlights .site-icon { width: 34px; height: 34px; }
  .home-highlights .site-icon svg { width: 18px; height: 18px; }
  .tutorial-guide h2 { max-width: none; }
}

@media (max-width: 520px) {
  .site-container { width: calc(100% - 32px); }
  .site-nav-actions { gap: 7px; }
  .site-nav .brand { font-size: 21px; }
  .site-nav .brand-mark { width: 29px; height: 29px; }
  .site-nav-links { gap: 20px; font-size: 13px; }
  .home-hero { padding-top: 36px; }
  .hero-figure { border-radius: 15px; }
  .hero-figure-heading, .hero-path { min-height: 42px; }
  .hero-stage { padding: 8% 8% 13%; }
  .hero-tunnel-tag { padding: 5px 7px; }
  .hero-tunnel-icon { width: 25px; height: 25px; }
  .hero-tunnel-icon svg { width: 15px; height: 15px; }
  .home-highlights { grid-template-columns: 1fr; gap: 0; padding: 4px 0; }
  .home-highlights > div { padding: 10px 0; align-items: center; gap: 10px; }
  .home-highlights > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .home-steps, .tutorial-picker { grid-template-columns: 1fr; gap: 9px; }
  .home-shared { grid-template-columns: auto minmax(0, 1fr); }
  .home-shared .site-link { grid-column: 2; }
  .site-footer > div { flex-wrap: wrap; gap: 12px 20px; }
}
