/* VTC default public landing page.
 *
 * Standalone — no build step, no framework. CSP is `default-src 'self'`: no
 * inline JS, no inline style attributes, so every rule lives here.
 *
 * The colours, type, spacing and radii come from `tokens.css`, the same token
 * file the member portal and the operator console use (its source of truth is
 * `admin-ui/src/styles/tokens.css`), and the IBM Plex faces from `fonts.css`.
 * `index.html` links both before this file. Only the page's own measures are
 * set here; the hero leans more marketing-y than the console.
 */

:root {
  --page-max: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  /* The page's filled buttons sit on indigo 500 in both themes, so their
   * label stays white rather than following the console's dark-mode
   * `--brand-fg`. */
  --on-brand: #ffffff;
}

* {
  box-sizing: border-box;
}

/* `hidden` must win over any `display` a class sets: site.js reveals rows
 * (mediator, transports, the QR code) by clearing it, and `.status-row`'s
 * `display: grid` used to leave them showing empty before the data came. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-hover);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  background: var(--brand-500);
  color: var(--on-brand);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
  color: var(--on-brand);
}

/* Soft brand-tinted backdrop. Large radial blobs sit behind everything,
 * very low opacity so they read as a gradient wash rather than shapes. */
.bg-accent {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 0% 0%,
      color-mix(in srgb, var(--brand-500) 18%, transparent) 0,
      transparent 45%
    ),
    radial-gradient(
      circle at 100% 0%,
      color-mix(in srgb, var(--accent-pink) 14%, transparent) 0,
      transparent 40%
    ),
    radial-gradient(
      circle at 50% 100%,
      color-mix(in srgb, var(--accent-violet) 10%, transparent) 0,
      transparent 50%
    );
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.8rem 1.35rem;
  font-size: 1rem;
}

/* Fill stays brand-500 in both themes: white text on the lighter dark-theme
 * brand (#7c7ce8) falls short of 4.5:1. */
.btn-primary {
  background: var(--brand-500);
  color: var(--on-brand);
  box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--brand-500) 70%, transparent);
}

.btn-primary:hover {
  background: var(--brand-600);
  color: var(--on-brand);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--brand);
  transform: translateY(-1px);
}

/* ── Top bar ─────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.7rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand-500), var(--accent-violet));
}

.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: none;
}

.topnav-link {
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.topnav-link:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

/* The colour-theme switcher (theme.js): Match system / Light / Dark, the
 * same measurements as the console's and portal's
 * (`admin-ui/src/styles/theme-switcher.css`). */
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 0.35rem;
  padding: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.theme-switcher[hidden] {
  display: none;
}

.theme-switcher button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.theme-switcher button:hover:not([aria-checked="true"]) {
  color: var(--text);
  background: var(--bg-subtle);
}

.theme-switcher button[aria-checked="true"] {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border-strong);
}

.theme-switcher button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

@media (forced-colors: active) {
  .theme-switcher button[aria-checked="true"] {
    outline: 2px solid Highlight;
  }
}

/* On a phone the brand name and the two text links give way: the
 * member button is the one action that must stay reachable. */
@media (max-width: 640px) {
  .topnav-link {
    display: none;
  }
}

@media (max-width: 380px) {
  .brand-name {
    display: none;
  }
}

/* ── Page frame ──────────────────────────────────────────── */

main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) 4rem;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 7vw, 5.5rem);
}

/* Section headings. The DID pass and the status card keep the small
 * uppercase label style; content sections get a real heading. */
h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--text);
}

.pass-head h2,
.status-card h2 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

h3 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.kicker {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.section-lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  text-align: left;
  padding-block: clamp(1rem, 5vw, 3rem) 0;
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.status-dot.ok {
  background: var(--success);
}

.status-dot.warn {
  background: var(--warning);
}

.status-dot.err {
  background: var(--danger);
}

.hero h1 {
  margin: 1.25rem 0 0;
  font-size: clamp(2.25rem, 4.5vw + 0.5rem, 3.75rem);
  line-height: 1.04;
  font-weight: 750;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  background: linear-gradient(
    135deg,
    var(--brand-500) 0%,
    var(--accent-violet) 50%,
    var(--accent-pink) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Fallback colour for browsers that don't gradient-clip text. */
  color: var(--brand-500);
}

/* Optional operator-supplied logo. Sits above the headline in the
 * hero. `hidden` by default; site.js sets `src` + clears `hidden`. */
.community-logo {
  display: block;
  margin: 1.5rem 0 0;
  width: auto;
  height: auto;
  max-height: 96px;
  max-width: min(220px, 100%);
  border-radius: var(--radius-md);
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgb(0 0 0 / 0.06));
}

.community-logo[hidden] {
  display: none;
}

.lead {
  margin: 1rem 0 0;
  font-size: clamp(1.05rem, 1vw + 0.85rem, 1.25rem);
  line-height: 1.55;
  max-width: 40rem;
  color: var(--text-muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.cta-note {
  margin: 1rem 0 0;
  max-width: 36rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .cta-row .btn {
    flex: 1 1 100%;
  }
}

/* ── Hero grid + community DID pass ──────────────────────── */

/* The hero text and the DID pass sit side by side on a wide screen and
 * stack (text first) on a narrow one. */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 25rem);
    gap: clamp(2.5rem, 5vw, 4rem);
  }
}

/* ── What is this? ───────────────────────────────────────── */

.explainer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem 3rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.explainer-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 38rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.steps li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.step-num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9rem;
}

.step-body {
  color: var(--text-muted);
}

.step-body strong {
  display: block;
  color: var(--text);
}

.text-link {
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

@media (min-width: 860px) {
  .explainer {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }

  .text-link {
    grid-column: 1 / -1;
  }
}

/* ── Capabilities ────────────────────────────────────────── */

.cap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 720px) {
  .cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cap-wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1040px) {
  .cap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Two columns, one row: the git card and data rooms fill the first
   * row, the remaining three cards the second — no empty cell. */
  .cap-wide {
    grid-column: span 2;
  }
}

.cap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.cap p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cap-icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.35rem;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  color: var(--brand);
}

.badge-new {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent-pink) 16%, transparent);
  color: light-dark(#a3249f, #f0a6ee);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cap-git {
  background:
    radial-gradient(
      circle at 100% 0%,
      color-mix(in srgb, var(--brand-500) 12%, transparent) 0,
      transparent 55%
    ),
    var(--bg-elev);
}

.cap-git h3 {
  font-size: 1.35rem;
  padding-right: 4rem;
}

.cap-git p {
  font-size: 1rem;
  max-width: 40rem;
}

.forge-list {
  list-style: none;
  margin: auto 0 0;
  padding: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.75rem;
}

.forge {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.7rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.forge-logo {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  flex: none;
}

.forge-github {
  color: var(--text);
}

.forge-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.forge-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Where to next ───────────────────────────────────────── */

.path-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 760px) {
  .path-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.path {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.path:hover {
  color: var(--text);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.path-title {
  font-weight: 650;
  font-size: 1.05rem;
}

.path-sub {
  color: var(--text-muted);
  font-size: 0.925rem;
}

.path-go {
  margin-top: auto;
  padding-top: 0.6rem;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
}

.path-featured {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, var(--brand-500) 10%, transparent),
      transparent 70%
    ),
    var(--bg-elev);
}

/* Operators know where they're going: no shadow, muted link. */
.path-quiet {
  background: transparent;
  box-shadow: none;
}

.path-quiet .path-go {
  color: var(--text-muted);
}

/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  color: var(--text-faint);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-inner p {
  margin: 0.5rem 0 0;
  max-width: 48rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
}

.footer-links a,
.footer-meta a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-meta a:hover {
  color: var(--brand);
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
}

/* The DID value boxes style their own code element. */
.did-value {
  overflow-wrap: normal;
}

/* ── DID pass (continued) ────────────────────────────────── */

.hero-hint {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pass {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow:
    var(--shadow-card),
    0 24px 48px -24px color-mix(in srgb, var(--brand-500) 28%, transparent);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.pass-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.pass-head h2 {
  margin: 0;
}

.pass-public {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* The code is always dark on white, whatever the theme: an inverted QR
 * (light modules on dark) fails on many scanners. The SVG carries its own
 * four-module quiet zone, so the tile needs only a little padding. */
.pass-qr {
  align-self: center;
  padding: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  line-height: 0;
}

.pass-qr img {
  display: block;
  width: min(264px, 70vw);
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
}

.pass-caption {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* A phone cannot scan its own screen: there, say how to use the DID on
 * this device instead of asking to scan it. */
.pass-caption-touch {
  display: none;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (hover: none) and (pointer: coarse) {
  .pass-caption-touch {
    display: block;
    margin-top: 0.25rem;
  }

  .hero-hint {
    display: none;
  }
}

.status-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  box-shadow: var(--shadow-card);
}

.status-card dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-row {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.5rem;
  border-bottom: 1px dashed var(--border);
}

/* DID rows stack the value below the label so the monospace string
 * gets the full card width — no awkward mid-DID linebreaks. */
.status-row.stacked {
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding-block: 0.75rem;
}

.status-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.status-row dt {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-row dd {
  margin: 0;
}

.did-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.did-value {
  flex: 1 1 0;
  min-width: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text);
  /* DIDs are long opaque tokens with no good break points — mid-
   * string wrapping looks like data corruption. Keep them on a
   * single line and let the box scroll horizontally on narrow
   * viewports instead. */
  overflow-x: auto;
  white-space: nowrap;
  /* Subtle scrollbar styling so the scroll affordance is visible
   * without being noisy. */
  scrollbar-width: thin;
}

/* Transports — how to reach this community, and whether each route
 * currently works. Two independent facts per row (advertised /
 * serviceable), never collapsed: "advertised but not responding" is the
 * state worth seeing, and one badge would hide it. */
.transport-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.transport {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.transport-name {
  flex: 0 0 auto;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.25rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
}

.transport.is-reachable .transport-name {
  border-color: color-mix(in srgb, var(--success) 50%, var(--border-strong));
}

.transport.is-degraded .transport-name {
  border-color: color-mix(in srgb, var(--warning) 50%, var(--border-strong));
}

.transport-note {
  flex: 0 0 auto;
  font-size: 0.8rem;
}

.transport-note.ok {
  color: var(--success);
}

.transport-note.warn {
  color: var(--warning);
}

.transport-note.muted {
  color: var(--text-faint);
}

/* The endpoint is a mediator DID or a URL — same opaque-token problem as
 * `.did-value`, so the same treatment: one line, scroll rather than wrap. */
.transport-endpoint {
  flex: 1 1 100%;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.copy-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-elev);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 180ms cubic-bezier(0.16, 1, 0.3, 1),
    color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.copy-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand) 8%, var(--bg-elev));
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 50%, var(--border-strong));
}

.copy-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.copy-btn .icon-clipboard,
.copy-btn .icon-check {
  display: inline-block;
}

.copy-btn .icon-check {
  display: none;
}

.copy-btn.copied {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 50%, var(--border-strong));
  background: color-mix(in srgb, var(--success) 10%, var(--bg-elev));
}

.copy-btn.copied .icon-clipboard {
  display: none;
}

.copy-btn.copied .icon-check {
  display: inline-block;
}

.copy-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .path {
    transition: none;
  }

  .btn:hover,
  .path:hover {
    transform: none;
  }
}
