/* ppz server GUI — minimal, modern, readable. No framework. */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --border: #e5e5e3;
  --text: #1c1c1a;
  --muted: #71716e;
  /* Sampled from the logo's pipe blue — a deeper royal that gives
     enough contrast against white button text. Used by buttons,
     active tab markers, and the primary CTA. */
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  /* Buttons stay this saturated cobalt in BOTH light and dark mode
     so they match the pipe in the logo. --accent itself shifts in
     dark mode (for link legibility on near-black bg) — buttons do
     not, because they always have white text on top. */
  --btn-bg: #1d4ed8;
  --btn-bg-hover: #1e40af;
  --code-bg: #f1f1ef;
  --row-hover: #f5f5f3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a18;
    --surface: #232321;
    --border: #353532;
    --text: #ececea;
    --muted: #92928e;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --code-bg: #2c2c2a;
    --row-hover: #2a2a28;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:visited { color: var(--accent); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
h3 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }

small, .meta { color: var(--muted); font-size: 0.85rem; }

code, pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
}
pre {
  padding: 0.75rem 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}

/* Header / brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.brand h1 a { color: inherit; }
.brand .crumbs { color: var(--muted); font-size: 0.95rem; }

.back {
  display: inline-block;
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
}

/* Lists & cards */
ul.tidy {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}
ul.tidy li {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
ul.tidy li:last-child { border-bottom: 0; }
ul.tidy li:hover { background: var(--row-hover); }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--bg);
  font-weight: 600;
}
tbody tr:hover { background: var(--row-hover); }

/* Forms */
form { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; }
label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); }
input[type="text"], input:not([type]) {
  font: inherit;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  min-width: 200px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
button {
  font: inherit;
  padding: 0.4rem 0.85rem;
  background: var(--btn-bg);
  color: #fff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
button:hover { background: var(--btn-bg-hover); }

/* Empty / muted */
.empty { color: var(--muted); font-style: italic; }

/* Revoked API keys: dim + strike-through, no Revoke button. The
   row stays in the list for audit. */
[data-key-state="revoked"] {
  text-decoration: line-through;
  opacity: 0.55;
}
[data-key-state="revoked"] .revoked { color: var(--muted); }

/* Org page tab nav (Pipes / Users / API keys). Each link is a
   plain horizontal item; the active tab gets a coloured underline
   so the user can tell where they are without depending on URL. */
nav.tabs {
  display: flex;
  gap: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin: 1rem 0 1rem;
}
nav.tabs a {
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; /* sit on top of the bottom border */
}
nav.tabs a:hover { color: var(--text); }
nav.tabs a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Keys list + Users subsections (owner + members): flex rows so
   the trailing action (Revoke form, Remove form, Transfer-ownership
   button) hugs the right edge instead of inlining after the row's
   text content. */
#keys li,
[data-users-subsection] li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
#keys form.inline,
[data-users-subsection] li > form.inline,
[data-users-subsection] li > button[data-todo] {
  margin: 0 0 0 auto;
}

/* ──────────────────────────────────────────────────────────────────
   Landing page (`/`). The operator dashboard is at /dashboard; this
   surface is purely marketing — logo + tagline + animated demos.
   The hero sits on a black background so the existing logo PNG
   blends in seamlessly without alpha-channel surgery.
   ────────────────────────────────────────────────────────────── */

body[data-page="landing"] {
  background: var(--bg);
  margin: 0;
}

.hero {
  background: #000;
  color: #fff;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}
.hero-logo {
  display: block;
  margin: -3rem auto -3rem;
  max-width: min(480px, 70vw);
  height: auto;
  /* The source PNG has ~20% black padding baked in above + below
     the artwork. clip-path crops it visually; the matching negative
     margins above pull adjacent content into the void left behind
     so the tagline hugs the logo instead of floating in dead space.
     Swap when we have a properly cropped PNG. */
  clip-path: inset(20% 0);
}
.hero-tag {
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0 0 0.8rem;
}
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0 0 1.4rem;
}
.hero-sub {
  color: #b9b9b3;
  max-width: 640px;
  margin: 0 auto 1.6rem;
  font-size: 1rem;
  line-height: 1.5;
}
.hero-examples {
  margin: 0 auto 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-examples code {
  background: rgba(255,255,255,0.06);
  color: #d6deeb;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85em;
}
.hero-cta {
  margin: 0;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary,
.btn-primary:visited {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  background: var(--btn-bg);
  /* :visited would otherwise paint the text the browser's default
     visited-link colour and clash with the button background. Lock
     it to white in both states. */
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--btn-bg-hover); }
/* Secondary button: subtle outline against the black hero, sits
   beside the primary CTA. Used for "GitHub →" today. */
.btn-secondary,
.btn-secondary:visited {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #555;
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #888;
}
/* One-line install snippet under the CTA row. Visually a code box
   the user can triple-click and copy. NB: the URL here points to a
   curl installer that doesn't exist yet (task #86) — the visual is
   in place ahead of the script landing. */
.hero-install {
  position: relative;
  display: inline-block;
  margin: 1.4rem auto 0;
  padding: 0.6rem 2.4rem 0.6rem 1rem;
  background: #1a1a18;
  border: 1px solid #353532;
  border-radius: 6px;
  color: #ececea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  white-space: pre;
  overflow-x: auto;
  max-width: 90vw;
}
.hero-install code { font: inherit; color: inherit; background: transparent; padding: 0; }
/* Copy-to-clipboard button. The generic `button` rule above paints
   it cobalt with white text — we override here to a subtle ghost
   button that sits in the top-right of the install snippet. The
   .copied class swaps clipboard icon for a checkmark for 1.5s after
   a successful copy (added by the inline script in landing.html). */
.hero-install .copy-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 4px 6px;
  background: transparent;
  color: #92928e;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.hero-install .copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ececea;
}
.hero-install .copy-btn .check-icon { display: none; }
.hero-install .copy-btn.copied { color: #5fb87a; }
.hero-install .copy-btn.copied .copy-icon { display: none; }
.hero-install .copy-btn.copied .check-icon { display: inline; }

.demos {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.demos h2 {
  text-align: center;
  margin: 0 0 0.4rem;
  font-weight: 500;
}
.demos-blurb {
  text-align: center;
  color: var(--muted);
  margin: 0 0 2.5rem;
}
.demo-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0 0 7rem;
  /* Whichever demo is currently in the viewport's centre band gets
     `.in-focus` (set by typewriter.js IntersectionObserver). Demos
     above and below dim so they don't compete with the one the
     reader is looking at — but stay readable: 0.18 + blur erased the
     content entirely on light bg. */
  opacity: 0.45;
  transition: opacity 0.5s ease;
}
.demo-pair.in-focus {
  opacity: 1;
}
/* Two-sender / one-receiver "monitor" layout: top row splits into
   columns for the parallel sender terminals; the receiver below
   spans full-width. Collapses to single-column on narrow screens. */
.demo-pair .senders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
@media (max-width: 720px) {
  .demo-pair .senders { grid-template-columns: 1fr; }
}
.demo-pair h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.6rem;
  text-align: center;
  letter-spacing: -0.01em;
}
.demo-blurb {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}
.demo-blurb code {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
}
/* Highlighted Unix `|` in the "you can also | to pipes" heading.
   Sits inline with the heading text but coloured cobalt to make
   the joke land. */
.demo-pair h3 .hl-pipe {
  background: rgba(37, 99, 235, 0.12);
  color: var(--btn-bg);
  padding: 0 0.45rem;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
}
/* Tinted left edge on PTY-shared agent panes so they read as
   "this is what claude/copilot looks like, captured live" rather
   than as a generic terminal. */
.pty-claude  { border-left: 3px solid #b87a99; }
.pty-copilot { border-left: 3px solid #a78bfa; }
/* Browser-frame wrapper for the "remote monitor" demo. Its inner
   .pane mirrors the sender pane on the left; the chrome around it
   makes the second view obviously a browser viewport rather than
   another terminal. */
.browser-frame {
  border: 1px solid #3a3a37;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a18;
  display: flex;
  flex-direction: column;
}
.browser-frame .pane {
  border-radius: 0;
  border-left: 0;
  flex: 1;
}
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  background: #2a2a28;
  border-bottom: 1px solid #3a3a37;
}
.browser-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.browser-dot.dot-r { background: #ff5f56; }
.browser-dot.dot-y { background: #ffbd2e; }
.browser-dot.dot-g { background: #27c93f; }
.browser-url {
  flex: 1;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: #8a8a85;
  background: #1a1a18;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #353532;
  margin: 0 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pane .cmd {
  /* User-input rows (prompt + typed command) — bright blue so they
     stand out against the muted output text. */
  color: #60a5fa;
  font-weight: 500;
}
.pane .alert {
  /* Highlight for output rows that need the reader's attention —
     e.g. an agent reporting it's blocked. Bright red against the
     terminal dark, easy to spot in a long ls listing. */
  color: #ff6b6b;
  font-weight: 500;
}

/* Small italic note that sits below a setup pane to give context
   without occupying h3/blurb real estate. */
.demo-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
  margin: 0.5rem 0 0;
}
.pane {
  background: #0d1117;
  color: #d6deeb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0;
  /* Tall enough to fit the *final* content of the largest demo's
     pane (~8 lines + padding at 0.85rem font). Keeping every pane at
     this floor means no pane grows during the typewriter animation,
     which would otherwise push later demos around mid-read. */
  min-height: 13rem;
  white-space: pre;
  /* Horizontal scroll rather than clip — narrow viewports otherwise
     hide the right edge of demo output (ls tables, long send= lines).
     Vertical content grows naturally; no overflow-y clipping. */
  overflow-x: auto;
  cursor: pointer;
  border: 1px solid #1f2933;
}

/* Pipe segment between sender + receiver. Renders a faint vertical
   tube anchored to the centre of each terminal pair, with a tiny
   "ppz" label badged in the middle. The packet is a small accent-
   coloured dot that animates from top → bottom whenever the pair
   gains the `.fire` class (typewriter.js sets+clears it between
   sender finishing and receiver starting). */
.pipe {
  position: relative;
  height: 3.5rem;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pipe::before {
  /* The tube itself: a vertical line behind the label. */
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--accent) 20%,
    var(--accent) 80%,
    transparent 100%
  );
  opacity: 0.35;
}
.pipe-label {
  position: relative;
  z-index: 2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg);
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.packet {
  position: absolute;
  left: 50%;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00A368;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.demo-pair.fire .packet {
  /* Travel from above the pipe to below it, fading in on entry and
     out on exit so the ends look natural. */
  animation: packet-fly 1100ms cubic-bezier(0.4, 0, 0.6, 1);
}
@keyframes packet-fly {
  0%   { top: -10%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}
.demo-pair.fire .pipe::before {
  opacity: 0.7;
  transition: opacity 0.2s;
}

/* Horizontal pipe variant for connecting side-by-side panes (e.g. the
   remote-share demo: agent terminal on the left, browser mirror on the
   right). Sits as a middle grid column with auto width — the .senders
   parent gets a 1fr auto 1fr template to accommodate. Static visual
   only (no packet animation yet — the panes show mirrored content, so
   firing a packet would feel ambiguous). */
.pipe.pipe-horizontal {
  width: 4rem;
  height: auto;
  margin: 0;
  align-self: stretch;
}
.pipe.pipe-horizontal::before {
  top: 50%;
  left: 0;
  right: 0;
  bottom: auto;
  width: auto;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--accent) 20%,
    var(--accent) 80%,
    transparent 100%
  );
}

/* Side-by-side layout for the remote-share demo, with room for the
   horizontal pipe between the two columns. */
.demo-pair[data-pair="remote"] .senders {
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
}

/* Continuous packet animation for the horizontal pipe — the remote-
   share demo shows a live PTY, so a perpetually-flying packet
   communicates "data is streaming" without JS firing it. The packet
   travels left → right (sender → browser mirror) on a 1.4s loop. */
.pipe.pipe-horizontal .packet {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  animation: packet-fly-horizontal 1400ms cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes packet-fly-horizontal {
  0%   { left: -8%; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 108%; opacity: 0; }
}
/* While streaming, keep the pipe gradient slightly brighter than the
   default 0.35 so the channel reads as "active" rather than dormant. */
.pipe.pipe-horizontal::before {
  opacity: 0.55;
}

/* On mobile the senders stack, so the horizontal pipe falls back to
   a normal vertical connector. */
@media (max-width: 720px) {
  .demo-pair[data-pair="remote"] .senders {
    grid-template-columns: 1fr;
  }
  .pipe.pipe-horizontal {
    width: 100%;
    height: 3.5rem;
  }
  .pipe.pipe-horizontal::before {
    top: 0;
    bottom: 0;
    left: 50%;
    right: auto;
    width: 2px;
    height: auto;
    transform: translateX(-50%);
    background: linear-gradient(
      to bottom,
      transparent 0%,
      var(--accent) 20%,
      var(--accent) 80%,
      transparent 100%
    );
  }
  /* Vertical streaming packet for the stacked-mobile layout. */
  .pipe.pipe-horizontal .packet {
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    animation: packet-fly 1400ms cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }
}

.hero-footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted);
}
.hero-footer a { color: var(--accent); text-decoration: none; }
.hero-footer a:hover { text-decoration: underline; }

/* ─── pipescloud marketing chrome ─── */
/* pipescloud site chrome — nav + footer + simple page layout for the
   marketing pages. The OSS ppz stylesheet at /assets/style.css owns the
   hero/demo styling on the landing; this file adds the wrapper chrome
   so every page (landing + placeholders) shares a consistent header
   and footer. */

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 14px;
}

.topnav-brand {
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.topnav-links {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topnav-links a {
  text-decoration: none;
  color: inherit;
  opacity: 0.75;
}

.topnav-links a:hover {
  opacity: 1;
}

.topnav-cta {
  opacity: 1 !important;
  font-weight: 600;
}

.site-footer {
  margin-top: 80px;
  padding: 32px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer .footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.site-footer a {
  text-decoration: none;
  color: inherit;
}

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

/* Simple text-page layout for /about, /pricing, /legal/* — narrow
   reading column, generous line-height. */
.page-narrow {
  max-width: 680px;
  margin: 32px auto 64px;
  padding: 0 24px;
  line-height: 1.6;
}

.page-narrow h1 {
  font-size: 28px;
  margin: 0 0 16px;
}

.page-narrow h2 {
  font-size: 20px;
  margin: 32px 0 12px;
}

.page-narrow p {
  margin: 0 0 16px;
}

.page-narrow ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

/* ──────────────────────────────────────────────────────────────────
   Pricing page (`/pricing`). Four tier cards in a responsive grid,
   each with a CTA at the bottom that pins to the card edge so all
   buttons line up regardless of feature-list length.
   ────────────────────────────────────────────────────────────── */

.pricing-page {
  max-width: 1200px;
  margin: 32px auto 64px;
  padding: 0 24px;
}

.pricing-header {
  text-align: center;
  margin: 0 0 40px;
}
.pricing-header h1 {
  font-size: 32px;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.pricing-subtitle {
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 0 0 32px;
}

.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.tier-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.tier-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--code-bg);
  padding: 3px 8px;
  border-radius: 999px;
}
.tier-name {
  font-size: 1.1rem;
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.tier-price {
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.tier-price .amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}
.tier-price .cadence {
  font-size: 0.85rem;
  color: var(--muted);
}
.tier-tagline {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}
.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.tier-features li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--text);
  border-top: 1px solid var(--border);
}
.tier-features li:first-child { border-top: 0; }
.tier-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.tier-cta {
  margin-top: auto;
  display: inline-block;
  padding: 0.6rem 1rem;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
}
.tier-cta.btn-primary,
.tier-cta.btn-primary:visited {
  background: var(--btn-bg);
  color: #fff;
}
.tier-cta.btn-primary:hover { background: var(--btn-bg-hover); }
.tier-cta.btn-secondary,
.tier-cta.btn-secondary:visited {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.tier-cta.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.pricing-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 24px 0 0;
}

/* ──────────────────────────────────────────────────────────────────
   Phone-sized viewport adjustments. Targets the landing-page demos
   first (the original complaint: terminal content was clipped + too
   small to read on a phone) but tightens hero + section padding too
   so the page reads as one coherent surface on a 360-430px screen.
   ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Bump the root font-size on phone-sized viewports — every rem-based
     size scales with this, so most of the site reads ~25% larger
     without per-rule overrides. Px-based chrome (topnav, footer, page-
     narrow headings) doesn't follow rem and gets explicit bumps below. */
  html, body {
    font-size: 19px;
  }

  /* Topnav + footer + page-narrow headings are px-based; manual 25%
     bumps so they don't end up looking small next to the now-larger
     rem-based content. */
  .topnav { font-size: 17px; }
  .topnav-brand { font-size: 20px; }
  .site-footer { font-size: 16px; }
  .page-narrow h1 { font-size: 35px; }
  .page-narrow h2 { font-size: 25px; }
  .pricing-header h1 { font-size: 40px; }

  /* Terminal panes — readable monospace at phone size. Combined
     with overflow-x:auto on .pane (universal), long lines stay
     readable via horizontal swipe rather than vanish. min-height
     mirrors desktop's floor (8-line content + padding at mobile
     font) so no pane grows mid-animation. */
  .pane {
    font-size: 0.82rem;
    line-height: 1.45;
    padding: 0.8rem 0.95rem;
    min-height: 12rem;
  }

  /* Demos: tighter outer padding + less vertical air between demos. */
  .demos {
    margin: 2rem auto;
    padding: 0 1rem;
  }
  .demo-pair {
    margin: 0 0 4rem;
  }
  .demo-pair h3 {
    font-size: 1.1rem;
  }
  .demo-blurb {
    font-size: 0.85rem;
  }

  /* Pipe between panes — slightly shorter so the demo isn't dominated
     by the connector. */
  .pipe {
    height: 2.5rem;
  }

  /* Hero — less heavy padding, smaller tag/sub, install snippet
     readable but not edge-bleeding. */
  .hero {
    padding: 2.5rem 1rem 2rem;
  }
  /* Drop the clip-path + negative-margin hack at phone size — at
     mobile image dimensions the negative margin overruns the clipped
     area and pulls the .hero-tag text into the visible PIPES
     artwork. The image's black padding is invisible against the
     black hero background, so we don't need the hack to look tidy. */
  .hero-logo {
    clip-path: none;
    margin: 0 auto;
  }
  .hero-tag {
    font-size: 1.2rem;
  }
  .hero-sub {
    font-size: 0.9rem;
  }
  /* Hide the curl install snippet on phone — mobile visitors aren't
     copy-pasting shell commands. Saves a chunk of awkward truncation. */
  .hero-install {
    display: none;
  }

  /* Browser-frame demo: URL truncation feels right at smaller size. */
  .browser-url {
    font-size: 0.6rem;
  }
}

/* ──────────────────────────────────────────────────────────────────
   Architecture diagram on the About page. Five nodes connected by
   four labeled pipes (IPC / NATS / NATS / IPC). Horizontal flex on
   desktop; the existing .pipe.pipe-horizontal mobile fallback turns
   the pipes vertical when the diagram stacks. The central ppz-server
   node is highlighted as the hub.
   ────────────────────────────────────────────────────────────── */

.architecture {
  max-width: 1400px;
  margin: 1rem auto 5rem;
  padding: 0 1.5rem;
}

/* About page — adopt the same centered, wider layout the architecture
   section uses so the heading + prose visually align with the diagram
   below instead of sitting in a narrower offset column. */
body[data-page="about"] main.page-narrow {
  max-width: 1400px;
  padding: 0 1.5rem;
}
body[data-page="about"] main.page-narrow h1 {
  text-align: center;
  margin-bottom: 1.25rem;
}
body[data-page="about"] main.page-narrow p {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.architecture h2 {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.75rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: -0.01em;
}
.architecture-blurb {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 720px;
  margin: 0 auto 2.5rem;
  line-height: 1.5;
}

.arch-diagram {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.arch-node {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 0.9rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  min-height: 6.5rem;
}
.arch-node-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.3;
}
.arch-node-sub {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Central node — the broker — gets the accent treatment so the eye
   lands on it as the hub. */
.arch-node.arch-node-hub {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.arch-node.arch-node-hub .arch-node-title {
  color: var(--accent);
}

@media (max-width: 720px) {
  .arch-diagram {
    flex-direction: column;
    align-items: stretch;
  }
  .arch-node {
    flex: 0 0 auto;
    min-height: auto;
    padding: 0.9rem 0.85rem;
  }
}

/* ──────────────────────────────────────────────────────────────────
   Roadmap section on the About page. Auto-fit card grid — collapses
   from 4 columns on wide screens down to 1 on phone. Visually mirrors
   the pricing cards but with less commitment (no CTA, no price).
   ────────────────────────────────────────────────────────────── */

.roadmap {
  max-width: 1100px;
  margin: 1rem auto 5rem;
  padding: 0 1.5rem;
}
.roadmap h2 {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.75rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: -0.01em;
}
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
}
.roadmap-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1.4rem;
}
.roadmap-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
  /* Leave room on the right for the icon decoration. */
  padding-right: 2.75rem;
}

/* Roadmap card icons — small, absolutely positioned in the top-right.
   Base stroke is cobalt (matches links/pipes); paths marked with
   `.icon-accent` switch to the green that matches the packet ball.
   Two-tone in every icon so green & blue read as a deliberate pair. */
.roadmap-card .roadmap-icon {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 32px;
  height: 32px;
  color: var(--accent);
}
.roadmap-card .roadmap-icon .icon-accent {
  stroke: #00A368;
}
.roadmap-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.roadmap-cta {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.5;
}
