/*
 * The site palette, taken from the app's.
 *
 * Same rule as src/renderer/src/styles.css: every colour goes through a
 * variable and there are no literals below this block. The values are the
 * app's own, so a screenshot dropped onto the page sits on the same greys it
 * was captured against rather than floating on a slightly different dark.
 *
 * The code samples use VS Code's Dark+ and Light+ directly, because the editor
 * they are showing does too.
 */
:root {
  /* FathomDB's own app palette (src/renderer/src/styles.css) — so a screenshot
     dropped onto the page sits on the same deep-sea greys it was captured on. */
  --bg: #14171c;
  --panel: #1a1e24;
  --elevated: #22262f;
  --raised: #2a303d;
  --sunken: #101318;
  --border: #2b313c;
  --border-strong: #3b4352;

  --text: #e6e9ef;
  --dim: #8a92a3;
  --faint: #5c6473;
  --code-text: #cfd6e4;
  --on-accent: #06130c;

  /* Kelp green — the app's accent, not blue. */
  --accent: #35c46f;
  --accent-hover: #4bd082;
  --green: #3fb950;
  --orange: #d29922;
  --red: #f85149;
  --purple: #a371f7;

  --shadow: rgba(0, 0, 0, 0.55);
  --glow: rgba(53, 196, 111, 0.16);

  /* VS Code Dark+, for the code samples. */
  --c-comment: #6a9955;
  --c-keyword: #569cd6;
  --c-control: #c586c0;
  --c-string: #ce9178;
  --c-number: #b5cea8;
  --c-function: #dcdcaa;
  --c-property: #9cdcfe;
  --c-type: #4ec9b0;
  --c-plain: #d4d4d4;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas,
    "Noto Sans Mono", "Liberation Mono", "DejaVu Sans Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Inter,
    "Noto Sans", Cantarell, Ubuntu, sans-serif;

  --radius: 10px;
  --page: 1120px;
}

/* Light palette. Applied two ways: automatically when the OS prefers light and
   the visitor hasn't forced a theme (the media query, gated on :not([data-theme])
   so the toggle can override the OS), and explicitly when they pick Light in the
   header toggle (:root[data-theme="light"]). Forced dark is the base :root above,
   so [data-theme="dark"] needs no block. Same values in both — keep in sync. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --elevated: #f1f3f6;
    --sunken: #eceff3;
    --border: #dfe3ea;
    --border-strong: #c6ccd8;

    --text: #1b1f27;
    --dim: #5b6472;
    --faint: #8a92a1;
    --code-text: #24292f;

    --accent: #12924a;
    --accent-hover: #0d7d3e;
    --on-accent: #ffffff;
    --green: #1a7f37;
    --orange: #9a6700;
    --red: #cf222e;
    --purple: #8250df;

    --shadow: rgba(20, 26, 38, 0.16);
    --glow: rgba(18, 146, 74, 0.1);

    /* VS Code Light+. */
    --c-comment: #008000;
    --c-keyword: #0000ff;
    --c-control: #af00db;
    --c-string: #a31515;
    --c-number: #098658;
    --c-function: #795e26;
    --c-property: #001080;
    --c-type: #267f99;
    --c-plain: #000000;
  }
}
:root[data-theme="light"] {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --elevated: #f1f3f6;
  --sunken: #eceff3;
  --border: #dfe3ea;
  --border-strong: #c6ccd8;

  --text: #1b1f27;
  --dim: #5b6472;
  --faint: #8a92a1;
  --code-text: #24292f;

  --accent: #1f6feb;
  --accent-hover: #1a5fd0;
  --green: #1a7f37;
  --orange: #9a6700;
  --red: #cf222e;
  --purple: #8250df;

  --shadow: rgba(20, 26, 38, 0.16);
  --glow: rgba(31, 111, 235, 0.1);

  /* VS Code Light+. */
  --c-comment: #008000;
  --c-keyword: #0000ff;
  --c-control: #af00db;
  --c-string: #a31515;
  --c-number: #098658;
  --c-function: #795e26;
  --c-property: #001080;
  --c-type: #267f99;
  --c-plain: #000000;
}

* {
  box-sizing: border-box;
}

/* Header theme toggle — mirrors the docs' light/dark switch. Shows a sun in dark
   mode (click for light) and a moon in light mode. The button's data-theme is set
   by the wiring script to the effective theme. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--elevated);
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
}
.theme-toggle .icon-moon {
  display: none;
}
.theme-toggle[data-theme="light"] .icon-sun {
  display: none;
}
.theme-toggle[data-theme="light"] .icon-moon {
  display: block;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

code,
kbd {
  font-family: var(--mono);
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------- header */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.bar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover {
  color: var(--text);
}
.logo-badge {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  /* The mark is a self-contained rounded tile; the wrapper just clips and
     carries no background/border of its own so it doesn't double-frame. */
  border-radius: 5px;
  overflow: hidden;
}
.logo em {
  font-style: normal;
  color: var(--accent);
}

nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
}
nav a {
  color: var(--dim);
}
nav a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  nav {
    display: none;
  }
}

/* ----------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 88px 0 0;
  overflow: hidden;
}

/*
 * A soft ambient glow behind the hero instead of a grid. The graph-paper grid
 * that ships with every dev-tool template read as cheap; this gives the hero a
 * little depth and lets the product screenshot below be the thing you look at.
 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -6%, var(--glow), transparent 70%);
  pointer-events: none;
}

/*
 * The hero is centred; every section below it is left-aligned.
 *
 * Deliberate rather than inconsistent. A screenshot this wide has to sit in
 * the middle of the page, and copy hanging off its left edge above it reads as
 * a mistake — so the whole hero centres and the rest of the page keeps its
 * left rail.
 */
.hero-inner {
  position: relative;
  max-width: 780px;
  text-align: center;
}
.hero-inner .lede {
  margin-left: auto;
  margin-right: auto;
}
.hero-inner .actions {
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--elevated);
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--dim);
  margin-bottom: 22px;
}
.eyebrow b {
  color: var(--text);
  font-weight: 600;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 6.6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 660;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}

/* The capability line under the headline — the "all in one" claim. Bridges the
   headline and the lede: larger and stronger than the lede, quieter than the h1. */
.hero-cap {
  margin: -8px 0 18px;
  font-size: clamp(18px, 2.3vw, 23px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.hero-inner .hero-cap {
  margin-left: auto;
  margin-right: auto;
  /* Wide enough that the protocol list plus the proxy stays on one line on a
     desktop; on a phone it wraps after "and" — "a capture proxy" is held
     together by non-breaking spaces in the markup. */
  max-width: 820px;
}

.lede {
  margin: 0 0 34px;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--dim);
  max-width: 620px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 550;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn.primary {
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 4px 16px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
.btn.ghost {
  background: var(--elevated);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn.ghost:hover {
  border-color: var(--dim);
  color: var(--text);
}

.platforms {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--faint);
}

/* ------------------------------------------------------ the screenshot */

.shot-wrap {
  position: relative;
  margin-top: 58px;
  /* Wider than the text column: the detail in it is the point. */
  max-width: 1240px;
}

/*
 * A pool of accent light under the window, so it sits on the page rather than
 * being pasted onto it. Behind the image, and ignoring pointer events, so it
 * can be as large as it likes.
 */
.shot-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6%;
  width: 78%;
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--glow), transparent 70%);
  filter: blur(46px);
  pointer-events: none;
}

.shot {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 32px 90px var(--shadow), 0 4px 14px var(--shadow);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  /*
   * The window is a screenshot of a dark app. On the light theme it would
   * otherwise sit as a black slab; a hairline inset keeps its edge readable
   * against a white page without touching the pixels.
   */
  border-radius: 11px;
}

/*
 * The bottom of the screenshot fades into the page rather than stopping on a
 * hard line, which is what stops a tall image from feeling cropped.
 */
.shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 22%;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

@media (max-width: 720px) {
  .shot-wrap {
    margin-top: 40px;
  }
  .shot {
    border-radius: 8px;
  }
}

/* ------------------------------------------------------------- sections */

section {
  padding: 76px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 660px;
  margin-bottom: 40px;
}
h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.8vw, 41px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 630;
}
.section-head p {
  margin: 0;
  color: var(--dim);
  font-size: 16.5px;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* ----------------------------------------------------------- the wire */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
/* A split with only one column of content (its companion panel was removed). */
.split.single {
  grid-template-columns: 1fr;
}

.points {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.points li {
  padding-left: 30px;
  position: relative;
}
.points li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}
.points p {
  margin: 0;
  color: var(--dim);
  font-size: 14.5px;
}

/* ------------------------------------------------------------ terminal */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 48px var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--elevated);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--dim);
}
.dots {
  display: flex;
  gap: 6px;
}
.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.panel-body {
  margin: 0;
  padding: 16px 18px;
  background: var(--sunken);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--code-text);
  overflow-x: auto;
  tab-size: 2;
}

/* The wire log's own vocabulary, reused so the sample reads like the app. */
.w-time {
  color: var(--faint);
}
.w-dns {
  color: var(--purple);
}
.w-tcp {
  color: var(--accent);
}
.w-tls {
  color: var(--green);
}
.w-send {
  color: var(--orange);
}
.w-recv {
  color: var(--text);
}
.w-note {
  color: var(--faint);
}

/* Syntax colours for the script sample. */
.k {
  color: var(--c-keyword);
}
.ct {
  color: var(--c-control);
}
.s {
  color: var(--c-string);
}
.n {
  color: var(--c-number);
}
.f {
  color: var(--c-function);
}
.p {
  color: var(--c-property);
}
.t {
  color: var(--c-type);
}
.cm {
  color: var(--c-comment);
}
.pl {
  color: var(--c-plain);
}
/* The app's own marking: `sw` is the API you can call. */
.api {
  color: var(--accent);
}

/* -------------------------------------------------------------- grids */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card p {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
}
.card .ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--accent);
  margin-bottom: 14px;
}

/* --------------------------------------------------------------- specs */

.specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 760px) {
  .specs {
    grid-template-columns: repeat(2, 1fr);
  }
}
.spec {
  background: var(--panel);
  padding: 22px 20px;
}
.spec b {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.spec span {
  font-size: 13px;
  color: var(--dim);
}

/* ------------------------------------------------------------ download */

.download {
  text-align: center;
}
.download .section-head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------------------------------------------------------------------------
   Home closing band — the diver surfaces beside the final CTA.
   Every override here is scoped to .closing so the download PAGE (also
   .download) is untouched. overflow:hidden clips the boots at the footer
   waterline and stops the bled figure ever making a horizontal scrollbar.
--------------------------------------------------------------------------- */
.closing {
  position: relative;
  overflow: hidden;
}
.closing-inner {
  position: relative;
  z-index: 1;
}
/* The art's own accent glow, so he sits on the dark rather than floating on it
   — same token and technique as .hero::before. */
.closing::before {
  content: "";
  position: absolute;
  left: max(0px, calc(50% - 600px));
  bottom: -40px;
  width: 440px;
  height: 380px;
  /* Accent at 10% — the same faint blue the app's welcome diver now glows with,
     so the mark reads the same in both places. */
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--accent) 10%, transparent),
    transparent 70%
  );
  filter: blur(52px);
  pointer-events: none;
  z-index: 0;
}
/* Mobile / tablet default: a quieter stacked flourish, centred, zero overlap. */
.closing .diver {
  display: block;
  margin: 0 auto 6px;
  width: auto;
  height: clamp(180px, 40vw, 236px);
  pointer-events: none;
  user-select: none;
  /* Faded so the diver recedes as ambient brand atmosphere rather than the
     loudest thing in the band — matches the app's welcome screen. */
  opacity: 0.55;
  filter: drop-shadow(0 18px 34px var(--shadow));
}
.closing .actions {
  justify-content: center;
}
/* Desktop: two columns — diver rising left, CTA left-aligned right. */
@media (min-width: 960px) {
  .closing {
    text-align: left;
  }
  .closing-inner {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    align-items: end;
    gap: clamp(28px, 5vw, 72px);
  }
  .closing .diver {
    grid-column: 1;
    justify-self: start;
    align-self: end;
    margin: 0;
    height: clamp(300px, 26vw, 420px);
    margin-bottom: -76px; /* boots sink to the footer waterline; clipped */
  }
  .closing-cta {
    grid-column: 2;
    align-self: center;
  }
  .closing .section-head {
    max-width: 560px;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }
  .closing .actions {
    justify-content: flex-start;
  }
  .closing .platforms {
    text-align: left;
  }
}

/* ---------------------------------------------------------------------------
   Download page — the diver as a quiet companion in the left gutter, pinned to
   the wrap's left edge and hidden the moment that margin closes (<1100px).
--------------------------------------------------------------------------- */
.install {
  position: relative;
  overflow: hidden;
}
.install .wrap {
  position: relative;
  z-index: 1; /* the install card is always above the art */
}
.install .diver-side {
  position: absolute;
  top: 150px;
  right: max(8px, calc(50% - 560px));
  width: clamp(140px, 14vw, 176px);
  height: auto;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  /* Faded so the diver recedes as ambient brand atmosphere rather than the
     loudest thing in the gutter — matches the app's welcome screen. */
  opacity: 0.55;
  filter: drop-shadow(0 18px 36px var(--shadow));
}
/* The same faint accent glow behind the gutter diver as the home band + the app,
   so this diver sits on the dark rather than floating on it. */
.install::before {
  content: "";
  position: absolute;
  top: 120px;
  right: max(-40px, calc(50% - 620px));
  width: 320px;
  height: 320px;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--accent) 10%, transparent),
    transparent 70%
  );
  filter: blur(52px);
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 1099px) {
  .install .diver-side,
  .install::before {
    display: none;
  }
}
.oses {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.os {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 24px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.os:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}
.os svg {
  color: var(--dim);
}
.os:hover svg {
  color: var(--accent);
}
.os b {
  font-size: 14.5px;
  font-weight: 550;
}
.os span {
  font-size: 12px;
  color: var(--faint);
  font-family: var(--mono);
}

/* ------------------------------------------------ per-OS install tabs */

/*
 * The download page's tabbed installer. It's a progressive enhancement: the
 * .os-tabs tablist is hidden until /os-tabs.js opts in with `.js-tabs`, so with
 * no JavaScript every .os-panel simply stacks, each under its own heading. With
 * JavaScript the panels share one tablist and the per-panel headings fold away.
 */
.install-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.os-tabs {
  display: none; /* revealed only once JS enhances — see os-tabs.js */
  gap: 2px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.js-tabs .os-tabs {
  display: flex;
}
.js-tabs .os-panel-title {
  display: none;
}

.os-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 9px 15px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 550;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.os-tab:hover {
  color: var(--text);
}
.os-tab[aria-selected='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.os-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.os-panel-title {
  font-size: 18px;
  margin: 0 0 16px;
}
/* Space between panels only matters when they stack (no JS). */
.os-panel + .os-panel {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.js-tabs .os-panel + .os-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* A quiet label above the direct-download cards. */
.dl-label {
  margin: 26px 0 12px;
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--dim);
}

/* On the download page the cards sit left in the column, not centred. */
.install-card .oses {
  justify-content: flex-start;
  margin-top: 0;
}
.install-card .os {
  min-width: 150px;
}

/* Small print under a command or a set of cards. */
.platforms.sub {
  margin-top: 12px;
}
.platforms code,
.notice code {
  font-family: var(--mono);
  font-size: 0.92em;
}

/* -------------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--border);
  padding: 34px 0 46px;
  color: var(--faint);
  font-size: 13.5px;
}
.foot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.foot nav {
  display: flex;
  margin-left: auto;
}
/*
 * The maker credit sits inside the copyright line, so it stays in the footer's
 * faint tone rather than the accent every other link uses — a footnote, not a
 * call to action. Only a hover lifts it, to signal it's clickable.
 */
.foot .credit {
  color: inherit;
  text-decoration: none;
}
.foot .credit:hover {
  color: var(--dim);
  text-decoration: underline;
}

/*
 * The beta notice. Warm rather than alarming — it is a caveat, not an error,
 * and a red banner would read as something being broken.
 */
.notice {
  max-width: 620px;
  margin: 0 auto 30px;
  padding: 13px 18px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.55;
}
.notice b {
  color: var(--orange);
  font-weight: 600;
}

/* ------------------------------------------------------ capability strip */

/*
 * The rare capabilities, straight after the hero.
 *
 * SOAP and raw sockets are the reason people keep SoapUI and netcat installed
 * next to a modern client, and load testing is the reason they keep k6. None
 * of that survives being the fourth card in a grid two screens down.
 */
.strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.strip ul {
  display: grid;
  /*
   * Six now, since REST joined the list.
   *
   * It was five, and REST was deliberately absent because the strip exists to
   * show the rare things. That was the wrong read: omitting the ordinary case
   * does not imply "and obviously the ordinary case too", it implies the tool
   * might not do it — someone arriving with API documentation could take this
   * for a SOAP and sockets tool. So the common case leads, and the unusual ones
   * follow it.
   */
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.strip li {
  padding: 22px 20px 22px 0;
}
.strip b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.strip b::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 2px;
}
.strip span {
  font-size: 12.5px;
  color: var(--dim);
}

@media (max-width: 900px) {
  .strip ul {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .strip ul {
    grid-template-columns: 1fr;
  }
  .strip li {
    padding: 14px 0;
  }
}

/* ------------------------------------------------------------ load shot */

/* Full width, so the figures in it are actually readable. */
.shot.wide {
  margin-bottom: 34px;
}

/* The points under a full-width figure, rather than beside it. */
.points.three {
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 38px;
}
@media (max-width: 820px) {
  .points.three {
    grid-template-columns: 1fr;
  }
}

/* Inside a section rather than under the hero: no fade, lighter shadow. */
.shot.flat {
  box-shadow: 0 12px 34px var(--shadow);
}
.shot.flat::after {
  display: none;
}

/* -------------------------------------------------------------- figures */

/*
 * A screenshot with something said about it.
 *
 * The caption is not the alt text and not a second headline. Each one names a
 * figure that is actually in the image — 144 ms, 59 days, thirteen tabs — so
 * the claim in the prose above can be checked against the picture rather than
 * taken on trust. A caption that only says "Sendwire showing the Timing tab"
 * would be describing the obvious and proving nothing.
 */
figure {
  margin: 36px 0 0;
}
figure .shot.wide {
  margin-bottom: 0;
}
figcaption {
  margin: 13px 0 0;
  max-width: 760px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--faint);
}
figcaption b {
  color: var(--dim);
  font-weight: 600;
}
figcaption code {
  font-size: 12.5px;
  color: var(--dim);
}

/* A figure standing beside prose rather than above it. */
.split figure {
  margin: 0;
}

/*
 * A small label heading a full-width figure — the eyebrow pill reused, tucked
 * tight to the screenshot it names ("Capture proxy", "HAR browser"), so a
 * visitor knows what the shot is before reading the caption.
 */
.fig-label {
  margin: 0 0 14px;
}
.fig-label + figure {
  margin-top: 0;
}

/* Four notes under a full-width figure, rather than beside it. */
.points.four {
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin: 34px 0 52px;
}
@media (max-width: 980px) {
  .points.four {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .points.four {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- docs */

/*
 * Links into the documentation, one line each.
 *
 * The page can only assert things; these pages are where someone checks. Put
 * last because that is when the question changes from "what is this" to "how
 * would I actually do the thing I came here for".
 */
.doclinks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 860px) {
  .doclinks {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .doclinks {
    grid-template-columns: 1fr;
  }
}

.doclink {
  display: block;
  padding: 18px 20px;
  background: var(--panel);
  color: var(--text);
  transition: background 0.15s;
}
.doclink:hover {
  background: var(--elevated);
  color: var(--text);
}
.doclink b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 3px;
}
.doclink:hover b {
  color: var(--accent);
}
.doclink span {
  font-size: 13px;
  color: var(--dim);
}

/* A shell prompt glyph that is never caught in a text selection or copy. */
.prompt {
  color: var(--faint);
  user-select: none;
  -webkit-user-select: none;
}

/* Copy button on a command panel (see /copy.js). */
.panel-head .copy {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 550;
  color: var(--dim);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 3px 11px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.panel-head .copy:hover {
  color: var(--text);
  border-color: var(--accent);
}
.panel-head .copy.copied {
  color: var(--green);
  border-color: var(--green);
}

/* --------------------------------------------------- protocols tabs (CSS-only)
 * A tabbed "every protocol" showcase. No JS: hidden radios drive it, so it works
 * on this otherwise script-free page and stays keyboard-navigable (arrow keys
 * move between radios natively). Panels are shown by the checked radio via the
 * general-sibling combinator, which is why every radio precedes the tablist and
 * the panels at the same level.
 */
.pr-widget { position: relative; }
.pr-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.pr-tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.pr-tab {
  font: 600 15px/1 var(--sans); color: var(--dim); cursor: pointer;
  padding: 12px 15px; border-radius: 8px 8px 0 0; position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .15s, background .15s;
}
.pr-tab .pr-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .5; }
.pr-tab:hover { color: var(--text); background: var(--elevated); }
.pr-tab::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: -1px; height: 2px;
  background: var(--accent); border-radius: 2px 2px 0 0; transform: scaleX(0); transition: transform .15s;
}

/* The checked radio lights its label and reveals its panel. One pair per tab. */
#pr-rest:checked ~ .pr-tablist label[for="pr-rest"],
#pr-soap:checked ~ .pr-tablist label[for="pr-soap"],
#pr-gql:checked  ~ .pr-tablist label[for="pr-gql"],
#pr-ws:checked   ~ .pr-tablist label[for="pr-ws"],
#pr-sock:checked ~ .pr-tablist label[for="pr-sock"] { color: var(--text); }
#pr-rest:checked ~ .pr-tablist label[for="pr-rest"] .pr-dot,
#pr-soap:checked ~ .pr-tablist label[for="pr-soap"] .pr-dot,
#pr-gql:checked  ~ .pr-tablist label[for="pr-gql"] .pr-dot,
#pr-ws:checked   ~ .pr-tablist label[for="pr-ws"] .pr-dot,
#pr-sock:checked ~ .pr-tablist label[for="pr-sock"] .pr-dot { opacity: 1; }
#pr-rest:checked ~ .pr-tablist label[for="pr-rest"]::after,
#pr-soap:checked ~ .pr-tablist label[for="pr-soap"]::after,
#pr-gql:checked  ~ .pr-tablist label[for="pr-gql"]::after,
#pr-ws:checked   ~ .pr-tablist label[for="pr-ws"]::after,
#pr-sock:checked ~ .pr-tablist label[for="pr-sock"]::after { transform: scaleX(1); }

/* Keyboard focus: the hidden radio's focus ring lands on its label. */
.pr-radio:focus-visible ~ .pr-tablist label[for="pr-rest"],
.pr-radio:focus-visible ~ .pr-tablist label[for="pr-soap"],
.pr-radio:focus-visible ~ .pr-tablist label[for="pr-gql"],
.pr-radio:focus-visible ~ .pr-tablist label[for="pr-ws"],
.pr-radio:focus-visible ~ .pr-tablist label[for="pr-sock"] { outline: 2px solid var(--accent); outline-offset: 2px; }

.pr-panel { display: none; }
#pr-rest:checked ~ .pr-panel-rest,
#pr-soap:checked ~ .pr-panel-soap,
#pr-gql:checked  ~ .pr-panel-gql,
#pr-ws:checked   ~ .pr-panel-ws,
#pr-sock:checked ~ .pr-panel-sock {
  display: grid; grid-template-columns: 0.82fr 1.18fr;
  border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, var(--panel)), var(--panel));
}
.pr-copy { padding: 28px 30px 32px; }
.pr-copy h3 { font-size: 20px; margin: 0 0 6px; letter-spacing: -0.01em; }
.pr-copy .pr-lead { color: var(--dim); font-size: 15px; margin: 0 0 18px; }
.pr-copy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.pr-copy li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.pr-copy li svg { flex: none; margin-top: 3px; color: var(--accent); }
.pr-copy li span { color: var(--dim); }
.pr-copy li b { color: var(--text); font-weight: 600; }

.pr-demo { border-left: 1px solid var(--border); background: var(--sunken);
  border-radius: 0 0 var(--radius) 0; display: flex; flex-direction: column; min-width: 0; }
.pr-demo-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  border-bottom: 1px solid var(--border); color: var(--faint); font: 12.5px/1 var(--mono); }
.pr-demo-head .pr-dots { display: inline-flex; gap: 6px; }
.pr-demo-head .pr-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.pr-demo pre { margin: 0; padding: 18px 20px; font: 13px/1.65 var(--mono);
  color: var(--code-text); overflow-x: auto; white-space: pre; flex: 1; }
.pr-cm { color: var(--c-comment); } .pr-kw { color: var(--c-keyword); } .pr-ct { color: var(--c-control); }
.pr-st { color: var(--c-string); } .pr-nu { color: var(--c-number); } .pr-fn { color: var(--c-function); }
.pr-pr { color: var(--c-property); } .pr-ty { color: var(--c-type); }
.pr-ok { color: var(--green); } .pr-warn { color: var(--orange); } .pr-faint { color: var(--faint); }

@media (max-width: 760px) {
  #pr-rest:checked ~ .pr-panel-rest,
  #pr-soap:checked ~ .pr-panel-soap,
  #pr-gql:checked  ~ .pr-panel-gql,
  #pr-ws:checked   ~ .pr-panel-ws,
  #pr-sock:checked ~ .pr-panel-sock { grid-template-columns: 1fr; }
  .pr-demo { border-left: 0; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
  .pr-tab { font-size: 14px; padding: 11px 12px; }
}
