@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-600.woff2") format("woff2");
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-600.woff2") format("woff2");
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

html,
body {
  margin: 0;
  background: #07060e;
}

body {
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

/* ── Skip link (accessibility) ── */

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 8px;
  background: #f1e9ff;
  color: #120d20;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ── Global focus styles ── */

:focus-visible {
  outline: 2px solid rgba(155, 138, 251, 0.8);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── No-script fallback ── */

.no-script {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(83, 62, 132, 0.28), transparent 28%),
    radial-gradient(circle at bottom, rgba(28, 20, 52, 0.4), transparent 32%),
    #07060e;
  color: rgba(231, 225, 249, 0.92);
}

.no-script p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.no-script a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f1e9ff 0%, #b9a8ff 100%);
  color: #120d20;
  font-weight: 600;
  text-decoration: none;
}

/* ══════════════════════════════════
   How page
   ══════════════════════════════════ */

.how-page {
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(83, 62, 132, 0.22), transparent),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(28, 20, 52, 0.35), transparent),
    #07060e;
  color: rgba(231, 225, 249, 0.92);
}

.how-shell {
  width: min(640px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

/* ── Scroll reveal animation ── */

.how-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.how-reveal.how-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children within steps */
.how-steps .how-step:nth-child(2) { transition-delay: 0.08s; }
.how-steps .how-step:nth-child(3) { transition-delay: 0.16s; }

/* Stagger lifecycle items */
.how-lifecycle-list li:nth-child(1) { transition-delay: 0.04s; }
.how-lifecycle-list li:nth-child(2) { transition-delay: 0.08s; }
.how-lifecycle-list li:nth-child(3) { transition-delay: 0.12s; }
.how-lifecycle-list li:nth-child(4) { transition-delay: 0.16s; }
.how-lifecycle-list li:nth-child(5) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .how-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Header ── */

.how-header {
  display: flex;
  justify-content: center;
  padding: 40px 0 0;
}

.brand-badge,
.how-badge,
.surface-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(140, 120, 200, 0.12);
  background: rgba(12, 10, 22, 0.55);
  box-shadow: 0 12px 36px rgba(18, 10, 38, 0.28);
  font-family: "IBM Plex Mono", monospace;
  text-decoration: none;
  color: rgba(206, 199, 235, 0.86);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand-badge:hover,
.surface-back:hover {
  transform: translateY(-1px);
  border-color: rgba(155, 138, 251, 0.2);
  box-shadow: 0 14px 40px rgba(18, 10, 38, 0.32);
}

.brand-badge-dot,
.how-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9b8afb;
  box-shadow: 0 0 12px rgba(155, 138, 251, 0.55);
  animation: how-pulse 2.5s ease-in-out infinite;
  flex: 0 0 auto;
}

.brand-badge-wordmark {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(206, 199, 235, 0.86);
}

@keyframes how-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-badge-dot,
  .how-badge-dot {
    animation: none;
  }
}

/* ── Hero section ──
   TYPESET: Title uses tight tracking + heavy weight for impact.
   Lead uses lighter weight + wider measure for readability contrast.
   ARRANGE: Hero gets the most vertical space — 64px top, 96px bottom
   creates asymmetric breathing room before the first content block. */

.how-hero-section {
  text-align: center;
  padding: 64px 0 96px;
  max-width: 520px;
}

.how-eyebrow {
  margin: 0 0 20px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(155, 138, 251, 0.55);
}

.how-title {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: rgba(240, 237, 252, 0.97);
}

.how-lead {
  margin: 28px auto 0;
  max-width: 420px;
  font-size: 1rem;
  line-height: 1.72;
  font-weight: 400;
  color: rgba(195, 188, 220, 0.72);
}

.how-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
  justify-content: center;
}

/* ── Buttons ── */

.how-button,
.how-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.how-button:hover,
.how-button-secondary:hover {
  transform: translateY(-1px);
}

.how-button:active,
.how-button-secondary:active {
  transform: translateY(0);
  transition-duration: 0.05s;
}

.how-button {
  background: linear-gradient(135deg, #f1e9ff 0%, #b9a8ff 100%);
  color: #120d20;
  box-shadow: 0 16px 40px rgba(92, 71, 160, 0.3);
}

.how-button:hover {
  box-shadow: 0 20px 50px rgba(92, 71, 160, 0.45);
}

.how-button-secondary {
  border: 1px solid rgba(155, 138, 251, 0.15);
  background: rgba(17, 13, 27, 0.65);
  color: rgba(220, 215, 240, 0.8);
}

.how-button-secondary:hover {
  border-color: rgba(155, 138, 251, 0.28);
  background: rgba(22, 17, 35, 0.8);
}

/* ── Steps section ──
   ARRANGE: Tighter padding than hero-to-steps gap.
   Steps-to-details gets 64px — a smaller exhale. */

.how-steps-section {
  width: 100%;
  max-width: 540px;
  padding-bottom: 64px;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(140, 120, 200, 0.13);
  box-shadow: 0 24px 64px rgba(30, 15, 60, 0.4);
  background: rgba(140, 120, 200, 0.06);
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 26px;
  background: rgba(30, 24, 50, 0.98);
  transition: background 0.25s ease;
}

.how-step:hover {
  background: rgba(36, 28, 58, 0.98);
}

.how-step-number {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(155, 138, 251, 0.18), rgba(108, 69, 242, 0.12));
  border: 1px solid rgba(155, 138, 251, 0.2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  color: rgba(155, 138, 251, 0.75);
}

.how-step-content {
  flex: 1;
  min-width: 0;
}

/* TYPESET: Step label uses wider tracking than eyebrow to
   differentiate the two mono text roles. */
.how-step-label {
  margin: 0 0 5px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(155, 138, 251, 0.5);
}

.how-step-content strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(237, 233, 249, 0.93);
  line-height: 1.45;
  overflow-wrap: break-word;
}

/* TYPESET: Step descriptions match detail body size — no
   arbitrary 0.93rem shrink. Consistent reading rhythm. */
.how-step-desc {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(195, 188, 220, 0.62);
  overflow-wrap: break-word;
}

/* ── Details section ──
   ARRANGE: Details use 48px padding between items (compact)
   but 72px between section groups (roomier). This creates
   a grouped rhythm — tight within, loose between. */

.how-details-section {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 24px;
}

/* Add gap between detail section groups */
.how-details-section + .how-details-section {
  padding-top: 24px;
}

.how-details-section + .how-lifecycle-section {
  padding-top: 24px;
}

.how-detail {
  padding: 36px 0;
  border-top: 1px solid rgba(140, 120, 200, 0.1);
}

.how-detail:first-child {
  border-top: none;
  padding-top: 0;
}

/* TYPESET: H2 bumped to 1.35rem with -0.02em tracking.
   Clear step up from 1rem body. Semi-bold (600) for
   authority without shouting. */
.how-detail h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 600;
  color: rgba(240, 236, 255, 0.96);
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: break-word;
}

/* TYPESET: Body at 15px (0.9375rem) with 1.8 line-height.
   Comfortable reading line of ~60 chars at 540px. */
.how-detail p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: rgba(205, 198, 230, 0.72);
  overflow-wrap: break-word;
}

/* ── Inline code (for technical terms like x402) ── */

.how-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85em;
  padding: 0.15em 0.45em;
  border-radius: 5px;
  background: rgba(155, 138, 251, 0.08);
  border: 1px solid rgba(155, 138, 251, 0.12);
  color: rgba(195, 185, 235, 0.85);
}

/* ── Inline links ── */

.how-inline-link {
  color: rgba(185, 168, 255, 0.88);
  text-decoration: underline;
  text-decoration-color: rgba(185, 168, 255, 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.how-inline-link:hover {
  color: #f1e9ff;
  text-decoration-color: rgba(241, 233, 255, 0.5);
}

/* ── Lifecycle section ──
   ARRANGE: 56px top padding separates it from details.
   72px bottom before the final detail group. */

.how-lifecycle-section {
  width: 100%;
  max-width: 540px;
  padding-bottom: 48px;
}

.how-lifecycle-card {
  padding: 32px 28px;
  border-radius: 16px;
  background: rgba(30, 24, 50, 0.98);
  border: 1px solid rgba(140, 120, 200, 0.13);
  box-shadow: 0 24px 64px rgba(30, 15, 60, 0.4);
}

/* TYPESET: Lifecycle h2 matches detail h2 for consistency. */
.how-lifecycle-card h2 {
  margin: 0 0 24px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(240, 236, 255, 0.96);
}

.how-lifecycle-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* TYPESET: List items match body text size for reading flow. */
.how-lifecycle-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(205, 198, 230, 0.78);
  overflow-wrap: break-word;
}

.how-lifecycle-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(155, 138, 251, 0.1);
  border: 1px solid rgba(155, 138, 251, 0.15);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: rgba(155, 138, 251, 0.55);
}

/* ── Pill ── */

.how-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6em;
  padding: 0.1em 0.6em;
  border-radius: 999px;
  background: linear-gradient(135deg, #8c6dff 0%, #6c45f2 100%);
  color: #fff;
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1;
  vertical-align: baseline;
  box-shadow: 0 4px 14px rgba(108, 69, 242, 0.2);
  white-space: nowrap;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Subtle hover glow on pills for delight */
*:hover > .how-pill,
.how-step:hover .how-pill,
.how-lifecycle-list li:hover .how-pill {
  box-shadow: 0 6px 20px rgba(108, 69, 242, 0.32);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .how-pill,
  *:hover > .how-pill,
  .how-step:hover .how-pill,
  .how-lifecycle-list li:hover .how-pill {
    transition: none;
    transform: none;
  }
}

/* ── Selection color ── */

.how-page ::selection {
  background: rgba(155, 138, 251, 0.3);
  color: #fff;
}

/* ── Tooltip on [data-tip] ── */

[data-tip] {
  position: relative;
  cursor: help;
}

[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  width: max-content;
  max-width: 300px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(22, 17, 38, 0.97);
  border: 1px solid rgba(155, 138, 251, 0.18);
  box-shadow: 0 12px 40px rgba(10, 6, 24, 0.6);
  color: rgba(215, 210, 240, 0.88);
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

[data-tip]:hover::after,
[data-tip]:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Keep tooltips on-screen on narrow viewports */
@media (max-width: 640px) {
  [data-tip]::after {
    left: 0;
    transform: translateX(0) translateY(6px);
    max-width: 220px;
  }

  [data-tip]:hover::after,
  [data-tip]:focus::after {
    transform: translateX(0) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-tip]::after {
    transition: none;
  }
}

/* ── Footer ──
   ARRANGE: 56px top padding, 80px bottom for a
   generous close. Tighter than hero but still spacious. */

.how-footer {
  width: 100%;
  max-width: 540px;
  text-align: center;
  padding: 56px 0 80px;
  border-top: 1px solid rgba(140, 120, 200, 0.1);
}

/* TYPESET: Footer tagline in mono — a callback to the
   badge, bookending the page. Smaller + lighter than body. */
.how-footer p {
  margin: 0 auto 28px;
  max-width: 400px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: rgba(185, 178, 210, 0.42);
  text-transform: uppercase;
}

.how-footer-family {
  margin: 32px auto 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(185, 178, 210, 0.3);
}

.how-footer-family .how-inline-link {
  color: rgba(185, 168, 255, 0.5);
  text-decoration-color: rgba(185, 168, 255, 0.15);
}

.how-footer-family .how-inline-link:hover {
  color: rgba(185, 168, 255, 0.8);
  text-decoration-color: rgba(185, 168, 255, 0.35);
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .how-shell {
    padding: 0 20px;
  }

  .how-header {
    padding-top: 28px;
  }

  .how-hero-section {
    padding: 44px 0 64px;
  }

  .how-title {
    font-size: clamp(1.75rem, 7vw, 2.2rem);
    line-height: 1.15;
  }

  .how-lead {
    font-size: 0.92rem;
    line-height: 1.7;
  }

  .how-steps-section {
    padding-bottom: 48px;
  }

  .how-details-section {
    padding-bottom: 16px;
  }

  .how-details-section + .how-details-section,
  .how-details-section + .how-lifecycle-section {
    padding-top: 16px;
  }

  .how-lifecycle-section {
    padding-bottom: 36px;
  }

  .how-step {
    padding: 20px 18px;
    gap: 14px;
  }

  .how-step-number {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .how-lifecycle-card {
    padding: 24px 20px;
  }

  .how-detail {
    padding: 28px 0;
  }

  .how-detail h2 {
    font-size: 1.2rem;
  }

  .how-footer {
    padding: 40px 0 56px;
  }
}

/* ── High contrast mode support ── */

@media (forced-colors: active) {
  .how-pill {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }

  .how-button {
    border: 2px solid ButtonText;
  }

  .brand-badge,
  .how-badge,
  .surface-back {
    border: 1px solid ButtonText;
  }

  .brand-badge-dot,
  .how-badge-dot {
    background: Highlight;
  }

  .how-step-number,
  .how-lifecycle-num {
    border: 1px solid ButtonText;
  }
}

/* ── Print styles ── */

@media print {
  .how-page {
    background: white;
    color: black;
  }

  .brand-badge-dot,
  .how-badge-dot {
    animation: none;
  }

  .how-pill {
    background: #eee;
    color: #333;
    box-shadow: none;
    border: 1px solid #999;
  }

  .how-button,
  .how-button-secondary {
    border: 1px solid #333;
    box-shadow: none;
  }

  .how-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ══════════════════════════════════
   Surface pages
   ══════════════════════════════════ */

.surface-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(83, 62, 132, 0.24), transparent 28%),
    radial-gradient(circle at bottom, rgba(28, 20, 52, 0.38), transparent 34%),
    #07060e;
  color: rgba(231, 225, 249, 0.92);
}

.surface-page ::selection {
  background: rgba(155, 138, 251, 0.26);
  color: rgba(250, 247, 255, 0.98);
}

.surface-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.surface-header {
  max-width: 760px;
  margin-top: 28px;
}

.surface-kicker {
  margin: 0 0 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(155, 138, 251, 0.58);
}

.surface-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: rgba(243, 239, 255, 0.98);
}

.surface-lead {
  margin: 18px 0 0;
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.72;
  color: rgba(198, 191, 224, 0.72);
}

.surface-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.surface-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(140, 120, 200, 0.12);
  background: rgba(13, 11, 22, 0.62);
  color: rgba(223, 217, 245, 0.78);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.surface-nav a:hover,
.surface-nav a[aria-current="page"] {
  transform: translateY(-1px);
  border-color: rgba(185, 168, 255, 0.26);
  color: rgba(247, 244, 255, 0.95);
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.surface-card,
.surface-listing,
.surface-panel {
  border-radius: 18px;
  border: 1px solid rgba(140, 120, 200, 0.08);
  background:
    linear-gradient(180deg, rgba(20, 17, 34, 0.92), rgba(12, 10, 20, 0.94)),
    rgba(12, 10, 20, 0.9);
  box-shadow: 0 24px 70px rgba(17, 10, 34, 0.32);
}

.surface-card,
.surface-panel {
  padding: 18px;
}

.surface-card-label {
  margin: 0 0 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(162, 154, 196, 0.56);
}

.surface-card-value {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.15;
  color: rgba(243, 239, 255, 0.95);
}

.surface-card-note {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(185, 178, 214, 0.62);
}

.surface-section {
  margin-top: 28px;
}

.surface-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 14px;
}

.surface-section-title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  color: rgba(241, 237, 255, 0.95);
}

.surface-section-title-small {
  font-size: 0.98rem;
}

.surface-section-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(173, 166, 205, 0.62);
}

.surface-stack {
  display: grid;
  gap: 12px;
}

.surface-listing {
  padding: 18px;
}

.surface-listing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.surface-listing-copy {
  min-width: 0;
}

.surface-listing-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  color: rgba(245, 242, 255, 0.96);
}

.surface-listing-title a {
  text-decoration: none;
}

.surface-listing-id {
  margin: 8px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: rgba(170, 162, 202, 0.56);
}

.surface-listing-summary {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(195, 188, 220, 0.74);
}

.surface-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: rgba(170, 162, 202, 0.62);
}

.surface-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.surface-chip-row-tight {
  margin-top: 0;
  justify-content: flex-end;
}

.surface-pill,
.surface-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(140, 120, 200, 0.12);
  background: rgba(15, 12, 26, 0.68);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1;
  color: rgba(226, 220, 248, 0.76);
}

.surface-status-open {
  border-color: rgba(92, 198, 145, 0.24);
  background: rgba(33, 84, 61, 0.24);
  color: rgba(188, 247, 217, 0.9);
}

.surface-status-active {
  border-color: rgba(92, 198, 145, 0.24);
  background: rgba(33, 84, 61, 0.24);
  color: rgba(188, 247, 217, 0.9);
}

.surface-status-accepted,
.surface-status-completed {
  border-color: rgba(121, 177, 255, 0.24);
  background: rgba(39, 64, 104, 0.24);
  color: rgba(203, 225, 255, 0.9);
}

.surface-status-verifying {
  border-color: rgba(185, 168, 255, 0.24);
  background: rgba(71, 55, 113, 0.24);
  color: rgba(230, 222, 255, 0.9);
}

.surface-status-rejected,
.surface-status-failed,
.surface-status-expired,
.surface-status-inactive,
.surface-status-reversed,
.surface-status-dormant {
  border-color: rgba(232, 120, 120, 0.24);
  background: rgba(107, 37, 37, 0.24);
  color: rgba(255, 214, 214, 0.92);
}

.surface-status-fresh {
  border-color: rgba(92, 198, 145, 0.24);
  background: rgba(33, 84, 61, 0.24);
  color: rgba(188, 247, 217, 0.9);
}

.surface-status-stale,
.surface-status-degraded,
.surface-status-held,
.surface-status-pending,
.surface-status-missing {
  border-color: rgba(214, 180, 92, 0.22);
  background: rgba(102, 78, 27, 0.24);
  color: rgba(245, 228, 178, 0.9);
}

.surface-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.surface-panel-nested {
  margin-top: 14px;
  padding: 16px;
  box-shadow: none;
}

.surface-bullet-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(195, 188, 220, 0.74);
}

.surface-links a,
.surface-inline-link {
  color: rgba(188, 176, 255, 0.86);
  text-decoration: none;
  border-bottom: 1px solid rgba(188, 176, 255, 0.16);
}

.surface-links a:hover,
.surface-inline-link:hover {
  color: rgba(229, 224, 255, 0.96);
  border-bottom-color: rgba(188, 176, 255, 0.34);
}

.surface-kv {
  display: grid;
  gap: 10px;
}

.surface-kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(160, 140, 220, 0.06);
}

.surface-kv-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.surface-kv-key {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(186, 179, 214, 0.72);
}

.surface-kv-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
  color: rgba(236, 232, 251, 0.9);
}

.surface-inline-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: rgba(236, 232, 251, 0.9);
}

.surface-compare-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}

.surface-compare-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.surface-compare-table th,
.surface-compare-table td {
  padding: 12px 14px;
  border-top: 1px solid rgba(160, 140, 220, 0.06);
  text-align: left;
  vertical-align: top;
}

.surface-compare-table thead th {
  border-top: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(164, 156, 198, 0.62);
}

.surface-compare-table tbody th {
  min-width: 160px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(186, 179, 214, 0.72);
}

.surface-compare-table td {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(236, 232, 251, 0.9);
}

.surface-empty,
.surface-error {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(140, 120, 200, 0.08);
  background: rgba(13, 11, 22, 0.72);
  color: rgba(198, 191, 224, 0.72);
}

.surface-error {
  border-color: rgba(232, 120, 120, 0.22);
  color: rgba(255, 214, 214, 0.88);
}

.surface-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  .surface-shell {
    padding: 32px 18px 64px;
  }

  .surface-listing-head,
  .surface-kv-row,
  .surface-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .surface-kv-value {
    text-align: left;
  }

  .surface-panel-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════
   Home page
   ══════════════════════════════════ */

.home-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(83, 62, 132, 0.28), transparent 28%),
    radial-gradient(circle at bottom, rgba(28, 20, 52, 0.4), transparent 32%),
    #07060e;
}

.home-shell {
  width: min(540px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
  isolation: isolate;
}

.home-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
  pointer-events: none;
  z-index: 6;
}

.home-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(140, 120, 200, 0.12);
  background: rgba(12, 10, 22, 0.55);
  box-shadow: 0 12px 36px rgba(18, 10, 38, 0.28);
}

.home-brand-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9b8afb;
  box-shadow: 0 0 12px rgba(155, 138, 251, 0.55);
}

.home-brand-badge-wordmark {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(206, 199, 235, 0.86);
}

.home-panel {
  width: min(480px, 100%);
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(140, 120, 200, 0.07);
  background: rgba(14, 12, 22, 0.95);
  box-shadow: 0 30px 80px rgba(30, 15, 60, 0.5), 0 1px 0 rgba(160, 140, 220, 0.04) inset;
  overflow: visible;
}

.home-panel-header {
  padding: 16px 20px 14px;
}

.home-panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.home-panel-kicker {
  margin-bottom: 5px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: rgba(160, 150, 200, 0.28);
  text-transform: uppercase;
}

.home-panel-title {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: rgba(225, 220, 240, 0.88);
  text-wrap: balance;
}

.home-agent-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-shrink: 0;
}

.home-agent-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: rgba(160, 150, 200, 0.28);
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.home-agent-link:hover {
  color: rgba(196, 188, 228, 0.52);
}

.home-agent-indicator {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(160, 150, 200, 0.5);
  box-shadow: 0 0 6px rgba(160, 150, 200, 0.18);
  animation: home-pulse 2.5s ease-in-out infinite;
}

.home-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 440 / 360;
  margin: 0 auto 2px;
  overflow: visible;
}

.home-stage-hitbox {
  position: absolute;
  inset: 0;
  z-index: 9;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  appearance: none;
}

.home-stage-backdrop,
.home-stage-panel {
  position: absolute;
  inset: 0;
  border-radius: 12px;
}

.home-stage-backdrop {
  border: 1px solid rgba(160, 140, 220, 0.05);
  background: radial-gradient(circle at 50% 30%, rgba(31, 24, 52, 0.9), rgba(11, 9, 19, 0.96) 72%);
  box-shadow: inset 0 0 40px rgba(9, 7, 16, 0.85);
}

.home-stage-grid {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  pointer-events: none;
}

.home-stage-panel {
  z-index: 1;
}

.home-legend {
  padding: 4px 0 8px;
}

.home-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid rgba(160, 140, 220, 0.06);
}

.home-legend-key {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.home-legend-label {
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(200, 195, 220, 0.6);
}

.home-legend-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.home-legend-size,
.home-legend-pct {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.home-legend-size {
  font-size: 12px;
  color: rgba(170, 165, 200, 0.25);
}

.home-legend-pct {
  min-width: 36px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(210, 205, 230, 0.8);
  text-align: right;
}

.home-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.home-protocol-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f1e9ff 0%, #c4b3ff 50%, #9b8afb 100%);
  color: #120d20;
  box-shadow:
    0 0 0 1px rgba(155, 138, 251, 0.2),
    0 20px 50px rgba(92, 71, 160, 0.45),
    0 0 80px rgba(155, 138, 251, 0.15);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  overflow: hidden;
  animation: home-protocol-glow 3s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

.home-protocol-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.home-protocol-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}

.home-protocol-btn:hover .home-protocol-arrow {
  transform: translateX(3px);
}

.home-protocol-btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.08s;
}

.home-agent-text-link {
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(185, 168, 255, 0.15);
  color: rgba(185, 168, 255, 0.6);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.home-agent-text-link:hover {
  color: rgba(201, 188, 255, 0.78);
  border-color: rgba(185, 168, 255, 0.3);
}

.home-caption {
  max-width: 400px;
  margin: 0;
  color: rgba(201, 195, 230, 0.5);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

@keyframes home-pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

@keyframes home-protocol-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(155, 138, 251, 0.2),
      0 20px 50px rgba(92, 71, 160, 0.45),
      0 0 80px rgba(155, 138, 251, 0.15);
  }

  50% {
    box-shadow:
      0 0 0 1px rgba(155, 138, 251, 0.35),
      0 20px 60px rgba(92, 71, 160, 0.55),
      0 0 120px rgba(155, 138, 251, 0.25);
  }
}

@media (max-width: 560px) {
  .home-page {
    padding: 20px 16px;
  }

  .home-panel-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-agent-cluster {
    margin-top: 0;
  }

  .home-legend-row {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .home-legend-meta {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-agent-indicator,
  .home-protocol-btn {
    animation: none;
  }

  .home-protocol-btn,
  .home-protocol-arrow {
    transition: none;
  }
}
