/* PurpleSky: static, dependency-free protocol notes. */
:root {
  color-scheme: dark;
  --bg: #0b0911;
  --panel: #121018;
  --text: #f4f0fa;
  --muted: #aaa4b8;
  --purple: #c19af5;
  --blue: #83c5f9;
  --line: #2c2538;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  line-height: 1.65;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
a:hover {
  color: var(--blue);
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
  border-radius: 3px;
}
button {
  font: inherit;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
}
img,
svg {
  max-width: 100%;
}
figure,
p,
blockquote {
  margin: 0;
}
p + p {
  margin-top: 1.15rem;
}
h1,
h2,
h3 {
  font-weight: 550;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.045em;
}
h2 {
  font-size: clamp(2.05rem, 3.5vw, 3.05rem);
}
h3 {
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}
p {
  color: var(--muted);
}
strong {
  color: var(--text);
  font-weight: 550;
}
code {
  font-family: var(--mono);
  font-size: 0.85em;
  overflow-wrap: anywhere;
  color: #c9bedf;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  line-height: 1.85;
  margin: 0;
}
pre code {
  font-size: inherit;
}
::selection {
  background: #7154a8;
  color: #fff;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(1200px, calc(100% - 96px));
  margin-inline: auto;
}
.section {
  padding-block: 104px;
}
.section-heading {
  margin-bottom: 45px;
}
.section-heading .eyebrow {
  margin-bottom: 20px;
}
.section-heading > p:last-child:not(.eyebrow) {
  max-width: 670px;
  margin-top: 20px;
}
.eyebrow,
.tiny-label {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--purple);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tiny-label {
  display: block;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--purple);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #c19af510;
  flex: none;
}
.blue-text {
  color: var(--blue);
}
.quiet {
  color: var(--purple);
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.split > * {
  min-width: 0;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.heading-row > p {
  font-size: 0.9rem;
  max-width: 360px !important;
  margin: 0 !important;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 13px 19px;
  min-height: 48px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.button.primary {
  color: #1c102e;
  background: #cfb1f4;
  border-color: #cfb1f4;
}
.button.primary:hover {
  background: #e1cbfb;
  border-color: #e1cbfb;
}
.button.secondary {
  background: #14111c;
  border-color: #3c304c;
}
.button.secondary:hover {
  border-color: var(--purple);
  color: #fff;
}
.proposal-link {
  font-size: 0.8rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
}
.proposal-link span {
  color: var(--purple);
}
.skip-link {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  background: #fff;
  color: #111;
}
.skip-link:focus {
  top: 12px;
}
.site-header {
  border-bottom: 1px solid #ffffff0a;
  background: #0b0911f5;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 620;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.brand img {
  margin-right: 9px;
}
.brand-dot {
  color: var(--purple);
}
nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  margin-right: 36px;
}
nav a,
.header-github {
  font-size: 0.78rem;
  text-decoration: none;
  padding-block: 12px;
  color: var(--muted);
}
.header-github {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 13px;
}
.hero {
  padding-block: 64px 74px;
  display: grid;
  grid-template-columns: 0.92fr 1.12fr;
  align-items: center;
  gap: 35px;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding-block: 10px;
}
.hero h1 {
  font-size: clamp(3.2rem, 5.8vw, 5.2rem);
  letter-spacing: -0.065em;
  margin-top: 27px;
  line-height: 1.03;
  white-space: nowrap;
}
.gradient-text {
  background: linear-gradient(100deg, #c796f8 8%, #b79ef8 45%, #7ac8fb 95%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.hero-lede {
  font-size: 1.03rem;
  line-height: 1.75;
  margin-top: 28px;
  max-width: 430px;
  color: #c6c0d0;
}
.hero-lede strong {
  white-space: nowrap;
  font-weight: 500;
}
.hero-detail {
  font-size: 0.87rem;
  max-width: 410px;
  line-height: 1.8;
  margin-top: 17px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}
.hero .proposal-link {
  margin-top: 11px;
  color: var(--muted);
}
.hero-figure {
  min-width: 0;
  margin-left: -10px;
}
.figure-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  font: 0.62rem/1.5 var(--mono);
  color: #a59bac;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-figure .figure-heading {
  padding-inline: 25px;
}
#motion-toggle {
  border: 1px solid #3a3048;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  padding: 7px 9px;
  cursor: pointer;
  min-height: 32px;
}
#motion-toggle:hover {
  color: #fff;
  border-color: var(--purple);
}
#motion-toggle:disabled {
  color: #aaa4b8;
  border-color: var(--line);
}
.hero-network {
  display: block;
  width: 100%;
  height: auto;
}
.hero-figure figcaption {
  font: 0.65rem/1.6 var(--mono);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
}
.caption-divider {
  padding-inline: 9px;
  color: #4d435d;
}
.legend-dot {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  display: inline-block;
}
.purple {
  background: var(--purple);
}
.blue {
  background: var(--blue);
}

.svg-label {
  font:
    550 22px system-ui,
    sans-serif;
  fill: var(--text);
  letter-spacing: -0.5px;
}
.svg-small {
  font: 13px var(--mono);
  fill: #aaa2bc;
}
.svg-mono {
  font: 16px var(--mono);
  fill: #d3c3e7;
}
.svg-code {
  font: 16px var(--mono);
  fill: #a0d1f6;
}
.blue-label {
  fill: var(--blue);
}
.purple-label {
  fill: var(--purple);
}

.principle-band {
  border-block: 1px solid var(--line);
  background: linear-gradient(105deg, #1a1222a0, #14111e50, #10142260);
}
.principle-inner {
  display: grid;
  grid-template-columns: 165px 1fr 50px;
  align-items: center;
  gap: 24px;
  padding-block: 28px;
}
.principle-inner p {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #cfc7dc;
}
.invariant-symbol {
  font-size: 2rem;
  color: var(--purple);
  text-align: right;
}
.idea-grid {
  gap: 85px;
  align-items: center;
}
.large-copy {
  font-size: 1.22rem;
  line-height: 1.6;
  color: #e1d9ec;
}
.prose p:not(.large-copy) {
  font-size: 0.92rem;
}
.composition {
  padding: 18px 25px 23px;
}
.composition-flow {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 54px;
  align-items: center;
  min-height: 262px;
}
.state-node {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.state-node strong {
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.04em;
}
.state-node .tiny-label {
  font-size: 0.59rem;
}
.state-blocks {
  color: var(--purple);
  font-size: 1.5rem;
  letter-spacing: 3px;
}
.state-node::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -35px;
  width: 40px;
  height: 1px;
  background: #6c518a;
}
.view-list {
  display: grid;
  gap: 20px;
  position: relative;
}
.view-list::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 29px;
  bottom: 29px;
  border-left: 1px solid #6c518a;
}
.protocol-view {
  position: relative;
  border: 1px solid #4b3d60;
  border-radius: 5px;
  padding: 9px 12px;
  line-height: 1.5;
  font-size: 0.8rem;
}
.protocol-view::before {
  content: "";
  position: absolute;
  left: -20px;
  width: 19px;
  height: 1px;
  top: 50%;
  background: #6c518a;
}
.protocol-view span {
  display: block;
  font: 0.59rem/1.5 var(--mono);
  color: var(--muted);
  margin-top: 3px;
}
.active-view {
  background: linear-gradient(110deg, #3c27524f, #162a3c70);
  color: #cbd8f9;
  border-color: #7381b3;
}
.active-view::before {
  background: var(--blue);
}
.muted-view {
  border-style: dashed;
  color: #b2a9bf;
}
.composition figcaption,
.architecture figcaption,
.people-diagram figcaption {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.7;
}
.architecture-section {
  border-block: 1px solid #211b2a;
  background: radial-gradient(ellipse at 50% 45%, #1e142c66, transparent 65%);
}
.architecture {
  padding: 22px 30px 24px;
  background: #0d0b12;
}

.architecture figcaption {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.architecture-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 32px;
}
.architecture-notes p {
  font-size: 0.8rem;
  margin-top: 10px;
}
.compatibility-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.feature-index {
  font: 0.7rem var(--mono);
  color: var(--purple);
  display: block;
  margin-bottom: 20px;
}
.compatibility-grid h3 {
  margin-bottom: 16px;
}
.compatibility-grid p {
  font-size: 0.9rem;
}
.source-link {
  display: inline-block;
  font-size: 0.73rem;
  color: #c8b8de;
  margin-top: 18px;
  text-decoration: none;
  padding-block: 8px;
}
.source-link span {
  margin-left: 7px;
}
.contract-strip {
  margin-top: 38px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #131017;
}
.contract-strip > div {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  align-items: center;
  margin-top: 12px;
  font-size: 0.9rem;
}
.contract-strip > div > span {
  color: #81708f;
}
.section-note {
  font-size: 0.8rem;
  max-width: 1000px;
  margin-top: 23px;
}
.identity-section {
  padding-top: 8px;
}

.identity-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 25px;
}
.identity-notes p {
  font-size: 0.85rem;
  margin: 0;
}
.graph-section {
  background: linear-gradient(150deg, #15101a, #0f121b 75%, #0b0911);
  border-block: 1px solid #252231;
}
.social-example {
  gap: 50px;
  align-items: center;
}
.people-diagram {
  padding: 32px 30px 25px;
  background: #100f18;
}
.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding-bottom: 31px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font: 1.2rem var(--mono);
  margin-bottom: 15px;
  background: #322340;
  color: #d6b2fc;
  border: 1px solid #8860ad;
}
.bob .avatar {
  background: #182d42;
  border-color: #486f96;
  color: #99cbf6;
}
.person h3 {
  font-size: 1.2rem;
  margin-bottom: 7px;
}
.person > span:not(.avatar) {
  font-size: 0.82rem;
  color: #c4bdcf;
}
.person code {
  font-size: 0.67rem;
  margin-top: 8px;
}
.person small {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 5px;
}
.person::after {
  content: "";
  position: absolute;
  height: 24px;
  width: 1px;
  background: #665082;
  bottom: 0;
  left: 50%;
}
.bob::after {
  background: #48759c;
}
.shared-graph {
  position: relative;
  margin: 0 auto 23px;
  text-align: center;
  width: 65%;
  padding-top: 25px;
  border-top: 1px solid #6b5a89;
}
.shared-graph::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 20px;
  background: var(--blue);
}
.shared-graph span {
  color: var(--blue);
  font: 0.65rem var(--mono);
  display: block;
  margin-bottom: 6px;
}
.shared-graph strong {
  font-weight: 450;
  font-size: 1rem;
}
.people-diagram figcaption {
  text-align: center;
  font-size: 0.7rem;
}
.code-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.small-tag {
  display: inline-block;
  border: 1px solid #43364f;
  border-radius: 4px;
  padding: 4px 7px;
  font: 0.55rem/1.5 var(--mono);
  color: #baadc9;
  letter-spacing: 0;
  text-transform: none;
}
.follow-example pre {
  font-size: 0.75rem;
  padding-block: 20px;
  border-block: 1px solid #30293b;
}
.code-key {
  color: #c2a3ea;
}
.code-value {
  color: #99c7ec;
}
.follow-example p {
  font-size: 0.86rem;
  margin-top: 21px;
}
.follow-example > small {
  font-size: 0.67rem;
  color: var(--muted);
  display: block;
  margin-top: 12px;
}
.research-question {
  max-width: 850px;
  margin: 55px auto 0;
  text-align: center;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.65;
  color: #cfc9dc;
}
.levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.level {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #100d16;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.level-top {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
.level-number {
  font: 0.8rem var(--mono);
  color: var(--purple);
}
.level h3 {
  font-size: 1.55rem;
  line-height: 1.2;
  margin-bottom: 20px;
}
.level > p {
  font-size: 0.85rem;
}
.preferred {
  border-color: #8c66ad;
  background: linear-gradient(145deg, #28193599, #171422);
}
.preferred .small-tag {
  background: #352344;
  border-color: #694680;
  color: #dbbaff;
}
.level-flow {
  list-style: none;
  padding: 0;
  margin: 29px 0;
  display: grid;
  gap: 22px;
}
.level-flow li {
  font: 0.73rem/1.6 var(--mono);
  color: #c6bdd5;
  border: 1px solid #3d304b;
  border-radius: 4px;
  padding: 8px 12px;
  background: #131019;
  position: relative;
}
.level-flow li + li::before {
  content: "↓";
  position: absolute;
  left: 16px;
  top: -22px;
  color: #9b7ab7;
}
.preferred .level-flow li:last-child {
  border-color: #58668c;
  color: var(--blue);
}
.level .level-verdict {
  font-size: 0.76rem;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #34293f;
  line-height: 1.7;
}
.shared-operation {
  margin: 30px 0 45px;
  font: 0.65rem/1.6 var(--mono);
  color: #c2b7d1;
  text-align: center;
}
.shared-operation > span {
  display: block;
  padding: 12px 6px;
  border: 1px solid #3e304b;
  border-radius: 4px;
}
.shared-operation > div {
  display: flex;
  justify-content: space-around;
  position: relative;
  padding-top: 45px;
}
.shared-operation > div::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 25%;
  right: 25%;
  height: 17px;
  border: 1px solid #695077;
  border-bottom: 0;
}
.shared-operation > div::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 24px;
  width: 1px;
  background: #695077;
}
.technical-detail {
  border-bottom: 1px solid var(--line);
  margin-top: 25px;
}
.technical-detail summary {
  cursor: pointer;
  padding: 22px 8px;
  font-size: 0.88rem;
  color: #d9c9eb;
}
.technical-detail summary::marker {
  color: var(--purple);
}
.detail-content {
  padding: 12px 8px 30px;
  gap: 40px;
  font-size: 0.83rem;
}
.detail-content pre {
  font-size: 0.7rem;
  padding: 18px 0;
  color: #c3b3da;
}
.prototype-section {
  border-block: 1px solid #2c2238;
  background: radial-gradient(ellipse at 50% 100%, #29143860, transparent 75%);
}
.status-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 0.65rem var(--mono);
  color: var(--muted);
}

.milestone-number {
  font: 0.65rem var(--mono);
  color: var(--purple);
  display: block;
  margin-bottom: 14px;
}

.acceptance-test {
  padding: 30px 35px;
  border-left: 2px solid #ad7fe0;
  background: linear-gradient(110deg, #261a3260, transparent);
  margin-top: 45px;
}
.acceptance-test blockquote {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  letter-spacing: -0.03em;
  line-height: 1.55;
  margin-top: 16px;
  max-width: 910px;
}
.acceptance-test p {
  font-size: 0.85rem;
  margin-top: 20px;
  max-width: 900px;
}
.questions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
}
.questions-grid ol {
  list-style: none;
  counter-reset: question;
  padding: 0;
  margin: 0;
}
.questions-grid ol[start="6"] {
  counter-reset: question 5;
}
.questions-grid li {
  counter-increment: question;
  position: relative;
  padding: 21px 0 21px 39px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--line);
  color: #c8bfd5;
  min-height: 87px;
}
.questions-grid li::before {
  content: counter(question, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 23px;
  color: #a184bc;
  font: 0.62rem/1.6 var(--mono);
}
#status {
  padding-top: 0;
}
.status-panel {
  border: 1px solid #4c345f;
  background:
    radial-gradient(ellipse at 85% 65%, #4e2a7833, transparent 65%), #15101d;
  border-radius: 12px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 65px;
  align-items: center;
}
.status-panel h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin-block: 22px;
}
.status-panel p:not(.eyebrow) {
  font-size: 0.87rem;
}
.status-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.status-footnote {
  font: 0.65rem/1.8 var(--mono);
  color: var(--muted);
  margin-top: 18px;
}
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.site-footer .brand {
  font-size: 1.14rem;
}
.site-footer p {
  font-size: 0.73rem;
  margin-top: 8px;
}
.footer-links {
  display: flex;
  gap: 23px;
  flex-wrap: wrap;
}
.footer-links a {
  text-decoration: none;
  color: #bbb0cb;
  font-size: 0.72rem;
  padding-block: 10px;
}
.footer-links a:hover {
  color: var(--blue);
}
.footer-note {
  font: 0.58rem var(--mono);
  color: #9d91ae;
}
@media (min-width: 1500px) {
  .hero {
    padding-block: 85px 95px;
  }
}
@media (max-width: 1100px) {
  .wrap {
    width: calc(100% - 64px);
  }
  .hero {
    gap: 12px;
  }
  .hero h1 {
    font-size: 5.8vw;
  }
  .hero-lede {
    font-size: 0.94rem;
  }
  .hero-actions {
    gap: 8px;
  }
  .hero-actions .button {
    gap: 12px;
    padding: 12px 14px;
  }

  .architecture {
    padding: 20px;
  }

  .split {
    gap: 35px;
  }
  .composition {
    padding: 18px;
  }
  .composition-flow {
    gap: 40px;
  }
  .state-node::after {
    right: -22px;
    width: 26px;
  }

  .level {
    padding: 23px;
  }
  .level-top {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }
  .level-top .small-tag {
    font-size: 0.52rem;
  }
  .status-panel {
    gap: 40px;
  }
  .footer-note {
    width: 100%;
  }
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }
  .hero h1 {
    font-size: 5.8vw;
  }
  .hero-actions .button {
    font-size: 0.7rem;
  }
  .hero-copy .eyebrow {
    font-size: 0.58rem;
  }
  .hero-detail {
    font-size: 0.79rem;
  }
  .figure-heading {
    font-size: 0.53rem;
  }
  .hero-figure .figure-heading {
    padding-inline: 8px;
  }
  .hero-figure figcaption {
    font-size: 0.55rem;
    gap: 5px;
  }
  .caption-divider {
    padding-inline: 4px;
  }
  .section {
    padding-block: 78px;
  }
  .principle-inner {
    grid-template-columns: 120px 1fr;
    gap: 18px;
  }
  .principle-inner p {
    font-size: 0.94rem;
  }
  .invariant-symbol {
    display: none;
  }
  .heading-row {
    display: block;
  }
  .heading-row > p,
  .heading-row > .status-label {
    margin-top: 20px !important;
  }

  .compatibility-grid {
    gap: 28px;
  }
  .compatibility-grid h3 {
    font-size: 1.1rem;
  }
  .compatibility-grid p {
    font-size: 0.82rem;
  }
  .architecture-notes {
    gap: 23px;
  }
  .architecture-notes p {
    font-size: 0.76rem;
  }
  .identity-section {
    padding-top: 0;
  }

  .levels {
    gap: 12px;
  }
  .level {
    padding: 20px 17px;
  }
  .level h3 {
    font-size: 1.28rem;
  }
  .level > p {
    font-size: 0.78rem;
  }
  .level-flow li {
    font-size: 0.65rem;
    padding: 8px;
  }
  .level .level-verdict {
    font-size: 0.72rem;
  }

  .status-panel {
    padding: 35px;
    gap: 35px;
  }
  .status-actions .button {
    font-size: 0.73rem;
  }
  .questions-grid {
    gap: 35px;
  }
  .questions-grid li {
    min-height: 109px;
  }
}
@media (max-width: 680px) {
  html {
    scroll-padding-top: 122px;
  }
  .wrap {
    width: calc(100% - 40px);
  }
  .header-inner {
    min-height: 92px;
    flex-wrap: wrap;
    column-gap: 15px;
    row-gap: 0;
    padding-top: 13px;
    padding-bottom: 8px;
  }
  .brand {
    font-size: 1.15rem;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  nav {
    order: 3;
    width: 100%;
    margin: 0;
    justify-content: space-between;
    gap: 18px;
  }
  nav a {
    font-size: 0.7rem;
    padding-block: 9px;
  }
  .header-github {
    margin-left: auto;
    font-size: 0.72rem;
  }
  .hero {
    display: block;
    padding-top: 40px;
    padding-bottom: 30px;
  }
  .hero h1 {
    font-size: clamp(3.15rem, 11.9vw, 4.8rem);
    margin-top: 22px;
  }
  .hero-copy .eyebrow {
    font-size: 0.57rem;
  }
  .hero-lede {
    font-size: 1rem;
    max-width: 480px;
    margin-top: 25px;
  }
  .hero-detail {
    font-size: 0.85rem;
    max-width: 480px;
  }
  .hero-actions {
    gap: 10px;
    margin-top: 24px;
  }
  .hero-actions .button {
    font-size: 0.75rem;
    padding: 13px 17px;
    gap: 17px;
  }
  .hero-figure {
    margin: 32px -8px 0;
  }
  .hero-figure .figure-heading {
    font-size: 0.53rem;
    padding-inline: 8px;
  }
  .hero-network {
    margin-top: 5px;
  }
  .hero-figure figcaption {
    font-size: 0.59rem;
  }
  .hero-figure .svg-label {
    font-size: 24px;
  }
  .hero-figure .svg-small {
    font-size: 14px;
  }
  .principle-inner {
    display: block;
    padding-block: 24px;
  }
  .principle-inner .eyebrow {
    font-size: 0.59rem;
    margin-bottom: 10px;
  }
  .principle-inner p {
    font-size: 0.94rem;
  }
  .section {
    padding-block: 60px;
  }
  .section-heading {
    margin-bottom: 30px;
  }
  .section-heading .eyebrow {
    margin-bottom: 16px;
  }
  .eyebrow {
    font-size: 0.6rem;
  }
  h2 {
    font-size: 2.1rem;
  }
  .section-heading > p:last-child:not(.eyebrow) {
    font-size: 0.9rem;
    margin-top: 16px;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .large-copy {
    font-size: 1.12rem;
  }
  .prose p:not(.large-copy) {
    font-size: 0.88rem;
  }
  .composition {
    padding: 16px 20px 20px;
  }
  .composition-flow {
    min-height: 250px;
    grid-template-columns: 0.75fr 1fr;
    gap: 42px;
  }
  .state-node strong {
    font-size: 1.25rem;
  }
  .protocol-view {
    font-size: 0.75rem;
  }
  .architecture {
    padding: 15px;
  }
  .architecture > .figure-heading {
    font-size: 0.49rem;
    gap: 6px;
  }

  .architecture figcaption {
    font-size: 0.67rem;
  }
  .architecture-notes {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 27px;
  }
  .architecture-notes > div {
    padding-left: 16px;
    border-left: 1px solid #634779;
  }
  .architecture-notes > div:nth-child(2) {
    border-color: #537faa;
  }
  .architecture-notes p {
    font-size: 0.83rem;
    margin-top: 6px;
  }
  .compatibility-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .compatibility-grid article {
    padding-bottom: 25px;
    border-bottom: 1px solid var(--line);
  }
  .feature-index {
    margin-bottom: 12px;
  }
  .compatibility-grid h3 {
    font-size: 1.18rem;
    margin-bottom: 12px;
  }
  .compatibility-grid p {
    font-size: 0.86rem;
  }
  .source-link {
    margin-top: 9px;
  }
  .contract-strip {
    padding: 20px;
    margin-top: 4px;
  }
  .contract-strip > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
  }
  .contract-strip > div > span {
    transform: rotate(90deg);
    margin-left: 12px;
  }
  .section-note {
    font-size: 0.77rem;
  }
  .identity-section {
    padding-top: 0;
  }

  .identity-notes {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 22px;
  }
  .identity-notes p {
    font-size: 0.83rem;
  }
  .people-diagram {
    padding: 26px 17px 21px;
  }
  .people {
    gap: 16px;
  }
  .person code {
    font-size: 0.62rem;
  }
  .person small {
    font-size: 0.6rem;
  }
  .person > span:not(.avatar) {
    font-size: 0.76rem;
  }
  .shared-graph {
    width: 57%;
  }
  .code-heading {
    gap: 8px;
    margin-bottom: 12px;
  }
  .follow-example pre {
    font-size: 0.7rem;
  }
  .research-question {
    font-size: 1.17rem;
    margin-top: 32px;
    text-align: left;
  }
  .levels {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .level {
    padding: 25px;
  }
  .level-top {
    justify-content: space-between;
  }
  .level-top .small-tag {
    font-size: 0.54rem;
  }
  .level h3 {
    font-size: 1.7rem;
    margin-bottom: 15px;
  }
  .level h3 br {
    display: none;
  }
  .level > p {
    font-size: 0.86rem;
  }
  .level-flow li {
    font-size: 0.75rem;
    padding: 9px 12px;
  }
  .level .level-verdict {
    font-size: 0.8rem;
  }
  .shared-operation {
    font-size: 0.73rem;
  }
  .technical-detail summary {
    font-size: 0.8rem;
    padding-inline: 0;
  }
  .detail-content {
    padding-inline: 0;
    font-size: 0.81rem;
    gap: 5px;
  }
  .detail-content pre {
    font-size: 0.67rem;
  }

  .acceptance-test {
    padding: 23px 20px;
    margin-top: 32px;
  }
  .acceptance-test blockquote {
    font-size: 1.22rem;
  }
  .acceptance-test p {
    font-size: 0.8rem;
  }
  .questions-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .questions-grid li {
    min-height: 0;
    padding-block: 19px;
    font-size: 0.85rem;
  }
  .questions-grid li::before {
    top: 21px;
  }
  .status-panel {
    grid-template-columns: 1fr;
    padding: 28px 22px;
    gap: 25px;
  }
  .status-panel .eyebrow {
    font-size: 0.52rem;
    gap: 8px;
  }
  .status-panel h2 {
    font-size: 1.85rem;
  }
  .status-panel p:not(.eyebrow) {
    font-size: 0.84rem;
  }
  .status-panel h2 br {
    display: none;
  }
  .status-footnote {
    margin-top: 8px;
  }
  .site-footer {
    padding-block: 30px;
    gap: 22px;
  }
  .footer-links {
    gap: 18px;
    width: 100%;
  }
  .footer-links a {
    font-size: 0.67rem;
  }
  .footer-note {
    font-size: 0.55rem;
  }
}
@media (max-width: 360px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .hero h1 {
    font-size: 11.7vw;
  }
  .hero-actions .button {
    padding: 12px;
    gap: 12px;
    font-size: 0.7rem;
  }
  .hero-figure figcaption {
    font-size: 0.53rem;
  }
  .composition {
    padding: 15px;
  }
  .composition-flow {
    gap: 34px;
  }
  .state-node .tiny-label {
    font-size: 0.49rem;
  }
  .protocol-view {
    font-size: 0.67rem;
    padding-inline: 8px;
  }
  .level {
    padding: 22px;
  }
  .small-tag {
    font-size: 0.5rem;
  }
  .people-diagram {
    padding-inline: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
@media print {
  body {
    background: #fff;
    color: #111;
  }
  .site-header {
    position: static;
  }
  .wrap {
    width: 100%;
  }
  .hero {
    display: block;
  }
  .hero h1 {
    font-size: 40px;
    color: #111;
  }
  .gradient-text {
    color: #52347c;
    background: none;
  }
  p,
  strong,
  h1,
  h2,
  h3 {
    color: #111;
  }
  .section {
    padding-block: 25px;
  }
  .panel,
  .level,
  .status-panel {
    background: #fff;
    border-color: #ccc;
  }
  .hero-figure {
    max-width: 450px;
  }
  .hero-network {
    background: #0b0911;
  }
  .skip-link,
  #motion-toggle,
  .hero-actions {
    display: none !important;
  }
  a {
    color: #432a6e;
  }

  .questions-grid li {
    color: #222;
  }

  details {
    display: block;
  }
}

/* Distributed logical PDS diagrams. Animation illustrates one shared commit. */
.distributed-hero .hero-network {
  max-height: 640px;
}
.distributed-hero figcaption {
  display: block;
  text-align: center;
  line-height: 1.7;
  font-size: 0.64rem;
}
.diagram-note {
  font: 0.58rem/1.7 var(--mono);
  text-align: center;
  max-width: 470px;
  margin: 10px auto 0;
  color: var(--muted);
}
.distributed-wires {
  fill: none;
  stroke: #726084;
  stroke-width: 1.4;
}
.worker-boxes rect {
  fill: #18111f;
  stroke: #81629f;
  stroke-width: 1.4;
}
.worker-boxes .svg-label {
  font-size: 20px;
}
.worker-boxes .svg-small {
  font-size: 12px;
}
.shared-substrate rect {
  fill: #21152d;
  stroke: #a87bcb;
  stroke-width: 1.5;
}
.shared-substrate .svg-label {
  font-size: 21px;
}
.shared-repository rect {
  fill: #101d2b;
  stroke: #78abd6;
  stroke-width: 1.5;
}
.shared-repository .svg-label {
  font-size: 21px;
}
.distributed-hero .svg-small {
  font-size: 12px;
}
.write-packet,
.replay-packet {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0;
}
.write-packet {
  stroke: #c69aff;
}
.replay-packet {
  stroke: #82caff;
}
.motion-enabled .write-packet {
  animation: shared-write 16s linear infinite;
}
.motion-enabled .order-beacon {
  animation: shared-order 16s linear infinite;
}
.motion-enabled .commit-beacon {
  animation: shared-commit 16s linear infinite;
}
.motion-enabled .replay-packet {
  animation: shared-replay 16s linear infinite;
}
.motion-enabled .replay-beacon {
  animation: shared-read 16s linear infinite;
}
.motion-paused .protocol-motion {
  animation-play-state: paused;
}
@keyframes shared-write {
  0%,
  5% {
    stroke-dashoffset: 100;
    opacity: 0;
  }
  7% {
    opacity: 1;
  }
  29% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  32%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
@keyframes shared-order {
  0%,
  29%,
  49%,
  100% {
    stroke: #a87bcb;
    fill: #21152d;
  }
  35%,
  44% {
    stroke: #e0c2ff;
    fill: #39234d;
  }
}
@keyframes shared-commit {
  0%,
  45%,
  90%,
  100% {
    stroke: #78abd6;
    fill: #101d2b;
  }
  52%,
  81% {
    stroke: #ade3ff;
    fill: #1a3349;
  }
}
@keyframes shared-replay {
  0%,
  54% {
    stroke-dashoffset: 100;
    opacity: 0;
  }
  55% {
    opacity: 1;
  }
  77% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  80%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
@keyframes shared-read {
  0%,
  73%,
  98%,
  100% {
    stroke: #81629f;
    fill: #18111f;
  }
  80%,
  90% {
    stroke: #a5d8ff;
    fill: #192d41;
  }
}
.distributed-architecture {
  padding: 23px 30px;
  background: #100d16;
}
.discovery-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  font: 0.7rem/1.6 var(--mono);
  color: var(--muted);
  padding: 28px 0;
}
.discovery-row code {
  color: #ccb7e9;
  font-size: 1em;
}
.discovery-row > span:first-of-type {
  color: var(--purple);
}
.service-surface {
  text-align: center;
  padding: 27px 20px;
  border: 1px solid #6486ab;
  background: linear-gradient(115deg, #172338, #151426);
  border-radius: 9px;
}
.service-surface h3 {
  font-size: 1.65rem;
  margin-top: 12px;
}
.service-surface p {
  font-size: 0.85rem;
  margin-top: 12px;
  color: #c2bed4;
}
.service-consumers {
  display: block;
  font: 0.65rem/1.6 var(--mono);
  color: var(--blue);
  margin-top: 16px;
}
.workers-surface {
  margin: 34px 0;
  padding: 23px;
  border: 1px dashed #685079;
  border-radius: 9px;
  position: relative;
}
.workers-surface::before,
.workers-surface::after {
  content: "↕";
  position: absolute;
  left: 50%;
  color: #a889c2;
  font-size: 1.1rem;
  line-height: 1;
  transform: translateX(-50%);
}
.workers-surface::before {
  top: -27px;
}
.workers-surface::after {
  bottom: -27px;
}
.layer-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 19px;
}
.layer-caption > span:last-child {
  font: 0.63rem/1.6 var(--mono);
  color: var(--muted);
}
.worker-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.worker-row > div {
  padding: 22px 15px;
  background: #1c1426;
  border: 1px solid #4d3c60;
  border-radius: 6px;
  text-align: center;
}
.worker-row h3 {
  font-size: 1.15rem;
  margin-top: 9px;
}
.worker-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid #c799ed;
  border-radius: 50%;
  background: #513461;
}
.worker-row p {
  font-size: 0.72rem;
  margin-top: 9px;
}
.node-cache-note {
  font: 0.62rem/1.7 var(--mono);
  text-align: center;
  margin-top: 19px;
}
.substrate-surface {
  padding: 25px 20px;
  border: 1px solid #795499;
  border-radius: 8px;
  text-align: center;
  background: linear-gradient(105deg, #20142980, #2e1c3d80);
}
.substrate-surface h3 {
  font-size: 1.5rem;
  margin-top: 11px;
}
.substrate-surface p {
  font-size: 0.83rem;
  margin-top: 12px;
}
.distributed-architecture figcaption {
  font-size: 0.76rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 23px;
  margin-top: 27px;
}
.any-node-intro {
  align-items: center;
}
.node-principle {
  border-left: 2px solid #9e79c3;
  padding: 22px 25px;
  background: linear-gradient(90deg, #271a3460, transparent);
}
.node-principle strong {
  display: block;
  font-size: 1.65rem;
  line-height: 1.4;
  letter-spacing: -0.035em;
  margin-top: 14px;
}
.node-principle p {
  font-size: 0.85rem;
  margin-top: 18px;
}
.concurrency-heading {
  margin-top: 50px;
  margin-bottom: 25px;
  max-width: 820px;
}
.concurrency-heading h3 {
  font-size: 1.5rem;
}
.concurrency-heading p {
  font-size: 0.87rem;
  margin-top: 14px;
}
.concurrency-diagram {
  padding: 29px 30px;
  background: #110f18;
}
.concurrent-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 670px;
  margin: auto;
  position: relative;
  padding-bottom: 30px;
}
.concurrent-inputs > div {
  padding: 16px 22px;
  border: 1px solid #4d395f;
  border-radius: 6px;
  background: #1e1527;
}
.concurrent-inputs code {
  display: block;
  margin-top: 5px;
}
.concurrent-inputs::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 12px;
  height: 18px;
  border: 1px solid #76608d;
  border-top: 0;
}
.ordered-mutations {
  padding: 22px;
  border: 1px solid #8a66a7;
  border-radius: 6px;
  max-width: 670px;
  margin: auto;
  text-align: center;
  position: relative;
}
.ordered-mutations::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -13px;
  width: 1px;
  height: 12px;
  background: #76608d;
}
.ordered-mutations > div {
  display: flex;
  justify-content: center;
  gap: 35px;
  margin-top: 12px;
}
.ordered-mutations code {
  font-size: 0.8rem;
  color: #dec4f6;
}
.projection-label {
  text-align: center;
  font: 0.64rem/1.7 var(--mono);
  margin-top: 23px;
  color: var(--muted);
}
.repo-lineage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 23px 0;
}
.repo-lineage > span {
  border: 1px solid #454057;
  border-radius: 5px;
  padding: 10px 25px;
  font: 0.85rem/1.5 var(--mono);
  background: #17131f;
}
.repo-lineage > i {
  font-style: normal;
  color: #856d9c;
}
.repo-lineage > .current-commit {
  border-color: #6d9dc7;
  background: #16263a;
  color: #abd5f7;
}
.concurrency-diagram figcaption {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  max-width: 800px;
  margin: auto;
}
.key-diagrams {
  gap: 26px;
}
.key-diagram {
  padding: 22px 25px;
  min-width: 0;
}
.identity-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 23px 0 28px;
  gap: 5px;
}
.identity-root code {
  font-size: 1rem;
  color: #e1c6fa;
}
.identity-root > span:not(.down-arrow) {
  font-size: 0.72rem;
  color: var(--muted);
}
.down-arrow {
  line-height: 28px;
  color: #8c70a3;
}
.did-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  position: relative;
  padding-top: 20px;
}
.did-branches::before {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  top: 0;
  height: 20px;
  border: 1px solid #716080;
  border-bottom: 0;
}
.did-branches > div {
  padding: 16px 12px;
  border: 1px solid #514161;
  border-radius: 5px;
  background: #191221;
  text-align: center;
}
.did-branches strong {
  display: block;
  font-size: 1rem;
  margin-top: 8px;
}
.did-branches .tiny-label {
  font-size: 0.55rem;
}
.did-branches small {
  display: block;
  font-size: 0.66rem;
  color: var(--muted);
  margin-top: 6px;
}
.key-diagram figcaption {
  font-size: 0.71rem;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 24px;
}
.authority-flow {
  list-style: none;
  margin: 23px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
}
.authority-flow li {
  position: relative;
  padding: 12px 18px;
  border: 1px solid #44314f;
  border-radius: 5px;
  background: #191221;
}
.authority-flow li + li::before {
  content: "↓";
  position: absolute;
  top: -25px;
  left: 50%;
  color: #9475ae;
}
.authority-flow strong {
  display: block;
  font-size: 0.92rem;
}
.authority-flow span {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 5px;
}
.signer-panel {
  padding: 25px 30px;
  background: #100d16;
}
.signer-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 29px;
}
.signer-flow li {
  position: relative;
  border: 1px solid #4e395e;
  padding: 17px 15px;
  border-radius: 5px;
}
.signer-flow li + li::before {
  content: "→";
  position: absolute;
  left: -22px;
  top: 35%;
  color: #9d7bb9;
}
.signer-flow span {
  display: block;
  font: 0.57rem/1.6 var(--mono);
  color: var(--muted);
}
.signer-flow strong {
  display: block;
  font-size: 0.8rem;
  margin-top: 8px;
}
.signer-flow li:last-child {
  background: #142335;
  border-color: #4d6c8e;
}
.signer-panel figcaption {
  font-size: 0.73rem;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 23px;
}
.migration-section {
  border-block: 1px solid #272033;
  background: linear-gradient(125deg, #1d122a55, #10152255);
}
.migration-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.migration-pane {
  padding: 25px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.migration-pane > .tiny-label {
  margin-bottom: 18px;
}
.migration-pane code {
  font-size: 1rem;
  color: #ddcaee;
}
.migration-arrow {
  color: #8d759f;
  line-height: 30px;
}
.migration-pane strong {
  margin-top: 3px;
}
.migration-pane small {
  font-size: 0.71rem;
  color: var(--muted);
  margin-top: 8px;
}
.migration-after {
  border-color: #627eab;
  background: #141b2b;
}
.migration-figure figcaption {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 20px;
}
.migration-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 25px;
}
.migration-notes p {
  font-size: 0.86rem;
  margin: 0;
}
.distributed-milestones {
  counter-reset: proof;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 35px;
}
.distributed-milestones li {
  counter-increment: proof;
  position: relative;
  border-top: 1px solid #574168;
  padding: 21px 0 15px 34px;
  font-size: 0.87rem;
  color: #cfc6db;
  line-height: 1.8;
}
.distributed-milestones li::before {
  content: counter(proof, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 24px;
  font: 0.65rem var(--mono);
  color: var(--purple);
}
@media (max-width: 900px) {
  .worker-row {
    gap: 14px;
  }
  .worker-row > div {
    padding: 18px 10px;
  }
  .worker-row p {
    font-size: 0.65rem;
  }
  .key-diagrams {
    grid-template-columns: 1fr;
  }
  .identity-root {
    padding-block: 20px;
  }
  .did-branches {
    max-width: 540px;
    margin-inline: auto;
  }
  .authority-flow {
    max-width: 540px;
    margin-inline: auto;
  }
  .signer-flow {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .signer-flow li:nth-child(3)::before {
    display: none;
  }
  .signer-flow li {
    padding: 17px;
  }
  .signer-panel figcaption {
    font-size: 0.72rem;
  }
  .distributed-milestones {
    gap: 14px 22px;
  }
  .distributed-milestones li {
    font-size: 0.8rem;
  }
}
@media (max-width: 680px) {
  .distributed-hero .hero-network {
    max-height: none;
  }
  .distributed-hero figcaption {
    font-size: 0.63rem;
    padding-inline: 10px;
  }
  .diagram-note {
    font-size: 0.58rem;
    padding-inline: 15px;
  }
  .distributed-architecture {
    padding: 16px;
  }
  .discovery-row {
    font-size: 0.58rem;
    gap: 9px;
    padding-block: 22px;
  }
  .service-surface {
    padding: 23px 14px;
  }
  .service-surface h3 {
    font-size: 1.4rem;
  }
  .service-surface p {
    font-size: 0.76rem;
  }
  .service-surface .tiny-label {
    font-size: 0.55rem;
  }
  .service-consumers {
    font-size: 0.58rem;
    line-height: 1.8;
  }
  .workers-surface {
    padding: 16px 12px;
  }
  .layer-caption {
    display: block;
  }
  .layer-caption > span:last-child {
    display: block;
    font-size: 0.55rem;
    margin-top: 5px;
  }
  .worker-row {
    gap: 9px;
  }
  .worker-row > div {
    padding: 15px 7px;
  }
  .worker-row h3 {
    font-size: 0.87rem;
  }
  .worker-row p {
    font-size: 0.55rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
  }
  .node-cache-note {
    font-size: 0.56rem;
  }
  .substrate-surface {
    padding: 21px 14px;
  }
  .substrate-surface .tiny-label {
    font-size: 0.51rem;
  }
  .substrate-surface h3 {
    font-size: 1.27rem;
  }
  .substrate-surface p {
    font-size: 0.76rem;
  }
  .distributed-architecture figcaption {
    font-size: 0.7rem;
    padding-top: 17px;
    margin-top: 21px;
  }
  .node-principle {
    padding: 22px;
  }
  .node-principle strong {
    font-size: 1.42rem;
  }
  .node-principle p {
    font-size: 0.82rem;
  }
  .concurrency-heading {
    margin-top: 35px;
  }
  .concurrency-heading h3 {
    font-size: 1.3rem;
  }
  .concurrency-heading p {
    font-size: 0.83rem;
  }
  .concurrency-diagram {
    padding: 20px 16px;
  }
  .concurrent-inputs {
    gap: 15px;
  }
  .concurrent-inputs > div {
    padding: 13px;
  }
  .concurrent-inputs code {
    font-size: 0.7rem;
  }
  .ordered-mutations {
    padding: 17px 10px;
  }
  .ordered-mutations .tiny-label {
    font-size: 0.53rem;
  }
  .ordered-mutations > div {
    gap: 17px;
  }
  .ordered-mutations code {
    font-size: 0.7rem;
  }
  .projection-label {
    font-size: 0.59rem;
  }
  .repo-lineage {
    gap: 9px;
  }
  .repo-lineage > span {
    padding: 9px 12px;
    font-size: 0.7rem;
  }
  .repo-lineage > i {
    font-size: 0.8rem;
  }
  .concurrency-diagram figcaption {
    font-size: 0.65rem;
  }
  .key-diagram {
    padding: 18px;
  }
  .key-diagram .figure-heading {
    font-size: 0.51rem;
  }
  .identity-root code {
    font-size: 0.92rem;
  }
  .did-branches {
    gap: 14px;
  }
  .did-branches > div {
    padding: 13px 7px;
  }
  .did-branches .tiny-label {
    font-size: 0.48rem;
  }
  .did-branches strong {
    font-size: 0.86rem;
  }
  .did-branches small {
    font-size: 0.59rem;
  }
  .key-diagram figcaption {
    font-size: 0.68rem;
  }
  .authority-flow span {
    font-size: 0.68rem;
  }
  .signer-panel {
    padding: 20px;
  }
  .signer-flow {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .signer-flow li {
    padding: 16px;
  }
  .signer-flow li + li::before {
    content: "↓";
    display: block;
    left: 50%;
    top: -25px;
  }
  .signer-flow strong {
    font-size: 0.92rem;
  }
  .signer-flow span {
    font-size: 0.61rem;
  }
  .signer-panel figcaption {
    font-size: 0.7rem;
  }
  .migration-panes {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .migration-pane {
    padding: 24px 20px;
  }
  .migration-notes {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .migration-notes p {
    font-size: 0.82rem;
  }
  .distributed-milestones {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .distributed-milestones li {
    padding-block: 18px;
    font-size: 0.84rem;
  }
  .distributed-milestones li::before {
    top: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .protocol-motion {
    animation: none !important;
  }
}
@media print {
  .protocol-motion {
    animation: none !important;
  }
  .distributed-architecture,
  .key-diagram,
  .concurrency-diagram,
  .migration-pane {
    break-inside: avoid;
  }
}

/* Keep worker roles and identity labels readable on narrow screens. */
@media (max-width: 680px) {
  .worker-row p {
    display: none;
  }
  .worker-row h3 {
    font-size: 1rem;
  }
  .node-cache-note {
    font-size: 0.66rem;
  }
  .layer-caption > span:last-child {
    font-size: 0.62rem;
  }
  .did-branches .tiny-label {
    font-size: 0.6rem;
  }
  .did-branches small {
    font-size: 0.65rem;
  }
  .substrate-surface .tiny-label {
    font-size: 0.6rem;
  }
}
