/* Stealthy — next. One stylesheet for every page.
 *
 * Idea: every site you open reads your return address (city + network).
 * Stealthy changes it. The envelope / postmark on the home page is the one
 * loud thing; everything else stays quiet so it can be heard.
 *
 * Cached immutable: bump ?v= in every HTML file when this changes.
 */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Colour */
  --paper: #f5f7fc;      /* cool envelope white — the ground */
  --sheet: #ffffff;      /* cards and the envelope itself */
  --tint: #e8edf8;       /* quiet panels */
  --ink: #0a1024;        /* text, dark bands */
  --ink-2: #161e3a;      /* raised surfaces on ink */
  --muted: #4f5872;      /* secondary text on paper (6.6:1) */
  --muted-on-ink: #9aa4c2; /* secondary text on ink (7.4:1) */
  --quiet: #7c86a3;      /* greyed half of a big headline (3.4:1, large text only) */
  --hint: #6b7490;       /* placeholders (4.6:1 on sheet) */
  --rule: #d4dae9;
  --rule-on-ink: #28314f;
  --blue: #2962ff;       /* Stealthy blue: actions, postmark ink */
  --blue-hover: #1a4de0; /* also text links on tint, where --blue is 4.2:1 */
  --cyan: #57fff9;       /* signal: only ever on ink */

  /* Type */
  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Public Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;

  --fs-hero: clamp(2.5rem, 5.6vw, 4.5rem);
  --fs-h1: clamp(2.25rem, 5vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 3.4vw, 2.625rem);
  --fs-h3: 1.25rem;
  --fs-lead: clamp(1.0625rem, 1.5vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;

  /* Space */
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 10vw, 128px);
  --radius: 14px;
  --radius-s: 8px;
  --nav-h: 68px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
img { height: auto; }

a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-hover); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-ink :focus-visible, .footer :focus-visible { outline-color: var(--cyan); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
p + p { margin-top: 1em; }
code, kbd {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--tint);
  border-radius: 5px;
  padding: 0.1em 0.4em;
  overflow-wrap: anywhere;
}
kbd { border: 1px solid var(--rule); background: var(--sheet); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-s);
}
.skip:focus { top: 12px; }

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

/* Labels: mono caps. Used only for things that are labels. */
.label {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.on-ink .label { color: var(--muted-on-ink); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--muted);
  max-width: 38em;
}
.on-ink .lead { color: var(--muted-on-ink); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.9375rem; }
.on-ink .btn-primary { background: var(--cyan); color: var(--ink); }
.on-ink .btn-primary:hover { background: #fff; color: var(--ink); }
.on-ink .btn-ghost { color: #fff; border-color: var(--rule-on-ink); }
.on-ink .btn-ghost:hover { border-color: #fff; color: #fff; }

.arrow-link {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.arrow-link::after { content: " \2192"; transition: margin 0.15s; }
.arrow-link:hover::after { margin-left: 3px; }
.arrow-link[target="_blank"]::after { content: " \2197"; }
.on-ink .arrow-link { color: var(--cyan); }

/* ---------- Logo ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.logo:hover { color: inherit; }
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--blue);
  display: grid;
  place-items: center;
}
.logo-mark::before {
  content: "";
  width: 24px;
  height: 24px;
  background: #fff;
  -webkit-mask: url("/img/mark.svg") center / contain no-repeat;
  mask: url("/img/mark.svg") center / contain no-repeat;
}
.logo-word {
  width: 94px;
  height: 26px;
  background: currentColor;
  -webkit-mask: url("/img/logo.svg") left center / contain no-repeat;
  mask: url("/img/logo.svg") left center / contain no-repeat;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 247, 252, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links > a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  font-size: var(--fs-small);
  text-decoration: none;
}
.nav-links > a:hover { background: var(--tint); }
.nav-links > a[aria-current="page"] { background: var(--tint); }
.nav-actions { display: flex; gap: 8px; margin-left: 12px; }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--tint); }

@media (max-width: 860px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.open { display: flex; }
  .nav-links > a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--rule); font-size: 1.0625rem; }
  .nav-links > a:hover, .nav-links > a[aria-current="page"] { background: none; }
  .nav-actions { margin: 16px 0 0; }
  .nav-actions .btn { flex: 1; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section-tight { padding-block: calc(var(--section) * 0.6); }
.on-ink { background: var(--ink); color: #fff; }
.on-tint { background: var(--tint); }
.on-tint a:not([class]), .on-tint .arrow-link { color: var(--blue-hover); }
.section-head { max-width: 44rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .label { display: block; margin-bottom: 16px; }
.section-head .lead { margin-top: 16px; }

/* Page head for inner pages */
.page-head { padding-block: clamp(48px, 8vw, 96px) clamp(32px, 5vw, 56px); }
.page-head .label { display: block; margin-bottom: 18px; }
.page-head h1 { max-width: 16em; }
.page-head .lead { margin-top: 20px; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }

.prose { max-width: 42rem; }
.prose h2 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); margin: 2.2em 0 0.6em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #283047; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }

/* ---------- Home: hero ---------- */

.hero { overflow-x: clip; padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 112px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hero h1 { font-size: var(--fs-hero); letter-spacing: -0.035em; line-height: 0.98; }
.hero h1 .quiet { display: block; color: var(--quiet); }
.hero .label { display: block; margin-bottom: 24px; }
.hero .lead { margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 36px; }
.hero-alt { font-size: var(--fs-small); color: var(--muted); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .envelope { margin-right: 24px; }
}
@media (max-width: 560px) {
}

/* ---------- The envelope (live state card) ----------
   Hooks used by home.js and functions/lib/state-card.js — keep them:
   aside.state[data-on][data-ready], .state-on-badge, span[data-place],
   dd[data-net], .state-note, .state-foot, .state-foot-sub. */

.envelope {
  position: relative;
  padding: 10px;
  border-radius: calc(var(--radius) + 6px);
  /* airmail edging */
  background: repeating-linear-gradient(
    -45deg,
    var(--blue) 0 14px,
    var(--sheet) 14px 22px,
    var(--ink) 22px 36px,
    var(--sheet) 36px 44px
  );
  box-shadow: 0 30px 60px -30px rgba(10, 16, 36, 0.35), 0 2px 6px rgba(10, 16, 36, 0.06);
}
.state {
  position: relative;
  background: var(--sheet);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 36px);
}
.state-on-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cyan);
  font: 400 var(--fs-label)/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.state-on-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(87, 255, 249, 0.25);
}
.state-on-badge[hidden] { display: none; }
.state-caption { max-width: 14rem; } /* wraps before it reaches the postmark */
.state-address {
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
  align-items: baseline;
}
.state-address dt {
  font: 400 var(--fs-label)/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.state-address dd { margin: 0; }
.state-place {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.state-address dd[data-net] { font-weight: 600; font-size: 1.125rem; }
.state-note {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed var(--rule);
  font-size: var(--fs-small);
  color: var(--muted);
}
.state-foot {
  margin-top: 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.state-foot + .state-foot-sub { margin-top: 4px; font-size: var(--fs-small); color: var(--muted); }

/* The postmark: decorative, rotated, stamped on load. */
.postmark {
  position: absolute;
  top: -34px;
  right: -46px;
  width: clamp(200px, 22vw, 260px);
  color: var(--blue);
  opacity: 0.9;
  mix-blend-mode: multiply;
  transform: rotate(-12deg);
  pointer-events: none;
  animation: stamp 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 0.35s both;
}
.postmark text {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 2.4px;
  fill: currentColor;
}
.postmark .pm-center { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.5px; }
.postmark .pm-on { display: none; }
.state[data-on="1"] .postmark { color: var(--ink); }
.state[data-on="1"] .postmark .pm-off { display: none; }
.state[data-on="1"] .postmark .pm-on { display: inline; }
.state[data-on="1"] .state-place::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.3em;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px var(--ink);
  vertical-align: 0.12em;
}
.state-caption, .state-address { position: relative; }

@keyframes stamp {
  from { opacity: 0; transform: rotate(-4deg) scale(1.35); }
  to { opacity: 0.9; transform: rotate(-12deg) scale(1); }
}

/* ---------- Home: ways in ---------- */

.ways { border-top: 1px solid var(--rule); }
.way {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
  gap: 16px clamp(24px, 4vw, 56px);
  align-items: start;
  padding-block: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--rule);
}
.way-q {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.way-a h3 { font-size: 1.0625rem; font-family: var(--body); font-weight: 600; letter-spacing: 0; }
.way-a p { margin-top: 6px; color: var(--muted); }
.way-meta { margin-top: 12px !important; }
.way-go { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
@media (max-width: 860px) {
  .way { grid-template-columns: 1fr; }
  .way-go { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* ---------- Home: honest ledger ---------- */

.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ledger-col {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 40px);
}
.ledger-col h3 { margin-bottom: 20px; }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 1px solid var(--rule);
}
.ledger li::before {
  position: absolute;
  left: 0;
  top: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 0.8125rem/1 var(--body);
}
.ledger .does li::before { content: "\2713"; background: var(--blue); color: #fff; }
.ledger .doesnt li::before { content: "\2013"; background: var(--tint); color: var(--ink); }
@media (max-width: 760px) { .ledger { grid-template-columns: 1fr; } }

/* ---------- Postage stamps (PRO locations) ---------- */

.stamps { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0; padding: 0; }
.stamp {
  --stamp-bg: var(--sheet);
  position: relative;
  width: 110px;
  height: 130px;
  padding: 7px;
  color: var(--ink);
  /* perforated edge: holes centred on the border, inner panel covers the rest */
  background: radial-gradient(circle at 5px 5px, transparent 3.5px, var(--stamp-bg) 4px) -5px -5px / 10px 10px;
  filter: drop-shadow(0 6px 10px rgba(10, 16, 36, 0.12));
}
.stamp-inner {
  height: 100%;
  background: var(--stamp-bg);
  border: 1.5px solid var(--blue);
  border-radius: 3px;
  padding: 12px 10px 10px;
  text-align: left;
}
.stamp b {
  display: block;
  font: 700 2.125rem/1 var(--display);
  letter-spacing: -0.03em;
  color: var(--blue);
}
.stamp span {
  display: block;
  margin-top: 16px;
  font: 400 0.6875rem/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stamp:nth-child(2n) { transform: rotate(2deg); }
.stamp:nth-child(3n) { transform: rotate(-2.5deg); }
.stamp-more .stamp-inner { border-style: dashed; border-color: var(--muted); }
.stamp-more b { color: var(--muted); }
a.stamp-inner { display: block; color: inherit; text-decoration: none; transition: border-color 0.15s; }
a.stamp-inner:hover { border-color: var(--blue); color: inherit; }
a.stamp-inner:hover b { color: var(--blue); }
.on-ink .stamp { --stamp-bg: #f5f7fc; filter: none; }
/* Three to a row on phones instead of 2 + 2 + 1. */
@media (max-width: 560px) {
  .stamps { gap: 12px; }
  .stamp { width: 96px; height: 116px; }
  .stamp b { font-size: 1.875rem; }
  .stamp span { margin-top: 12px; }
}

/* ---------- Home: PRO band ---------- */

.pro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.pro-band h2 { color: #fff; }
.pro-band h2 em { font-style: normal; color: var(--cyan); }
.price-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-top: 32px; }
.price-line .big { font: 700 clamp(2.5rem, 5vw, 3.5rem)/1 var(--display); letter-spacing: -0.03em; }
.price-line .per { color: var(--muted-on-ink); }
.pro-band .fine { margin-top: 12px; color: var(--muted-on-ink); font-size: var(--fs-small); }
.pro-band .hero-actions { margin-top: 28px; }
.pro-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 10px; }
.pro-list li { display: flex; gap: 12px; }
.pro-list li::before { content: "\2192"; color: var(--cyan); font-weight: 700; }
@media (max-width: 860px) { .pro-band { grid-template-columns: 1fr; } }

/* ---------- Home: since 2012 ---------- */

.origin h2 { max-width: 20em; font-size: clamp(1.75rem, 3.6vw, 2.875rem); }
.origin h2 .quiet { color: var(--quiet); }
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(32px, 5vw, 56px);
}
.principle { border-top: 2px solid var(--ink); padding-top: 18px; }
.principle p { color: var(--muted); margin-top: 8px; }
.origin-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 40px; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Shortcuts (help strip, 404) ---------- */

.shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.shortcut {
  display: block;
  padding: 20px 22px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.shortcut:hover { border-color: var(--blue); color: var(--ink); transform: translateY(-2px); }
.shortcut b { display: block; font-weight: 600; }
.shortcut span { display: block; margin-top: 4px; color: var(--muted); font-size: var(--fs-small); }
.split-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px 32px;
  margin-bottom: 28px;
}

/* ---------- Choice rows (download page) ---------- */

.group + .group { margin-top: clamp(48px, 7vw, 80px); }
.group-head { display: grid; gap: 8px; margin-bottom: 20px; max-width: 42rem; }
.group-head h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
.group-head p { color: var(--muted); }
.rows {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 20px clamp(18px, 3vw, 28px);
}
.row + .row { border-top: 1px solid var(--rule); }
.row b { font-weight: 600; font-size: 1.0625rem; }
.row .sub { display: block; color: var(--muted); font-size: var(--fs-small); margin-top: 2px; }
.row[data-you] { background: linear-gradient(90deg, rgba(41, 98, 255, 0.07), transparent 70%); }
.row[data-you] b::after {
  content: "Your device";
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 400 0.6875rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.2em;
}
.row[data-you="compat"] b::after { content: "Works on your browser"; }
.note {
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--muted);
  max-width: 44rem;
}

/* ---------- Steps (a real sequence) ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 12px;
}
.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px clamp(18px, 3vw, 28px);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.steps > li::before {
  content: counter(step);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font: 700 1.125rem/1 var(--display);
}
.steps h3 { font-size: 1.125rem; padding-top: 10px; }
.steps p { margin-top: 6px; color: var(--muted); }
.steps .btn { margin-top: 16px; }
.steps-row { grid-template-columns: repeat(3, 1fr); }
.steps-row > li { grid-template-columns: 1fr; }
@media (max-width: 860px) { .steps-row { grid-template-columns: 1fr; } .steps-row > li { grid-template-columns: 44px 1fr; } }

/* ---------- Two-up panels ---------- */

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 40px);
  display: flex;
  flex-direction: column;
}
.panel .label { margin-bottom: 14px; }
.panel h2, .panel h3 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); }
.panel > p { margin-top: 10px; color: var(--muted); }
.panel ol { margin: 22px 0 0; padding-left: 1.25em; display: grid; gap: 10px; }
.panel ol li::marker { font-family: var(--display); font-weight: 700; color: var(--blue); }
.panel .panel-foot { margin-top: auto; padding-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.panel.is-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel.is-ink > p, .panel.is-ink li { color: var(--muted-on-ink); }
.panel.is-ink ol li::marker { color: var(--cyan); }
.panel.is-ink code { background: var(--ink-2); color: #fff; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

/* ---------- Setup: platform switcher + guides ---------- */

.platforms {
  position: sticky;
  top: var(--nav-h);
  z-index: 10;
  padding-block: 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.platforms nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.platforms nav::-webkit-scrollbar { display: none; }
.platforms a {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--sheet);
  color: var(--ink);
  font-weight: 500;
  font-size: var(--fs-small);
  text-decoration: none;
}
.platforms a:hover { border-color: var(--ink); }
.platforms-label { flex: none; align-self: center; padding-right: 10px; color: var(--muted); font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; }
/* page.js marks the visitor's OS. */
.platforms a[data-you] { border-color: var(--blue); color: var(--blue); }
.platforms a[data-you]::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--blue); vertical-align: 0.1em; }
/* Land below the sticky nav AND the sticky switcher, not under it. */
.platforms ~ section [id], .platforms ~ section[id] { scroll-margin-top: 64px; }

.guide {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 16px clamp(24px, 5vw, 64px);
  padding-block: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--rule);
}
.guide:first-of-type { border-top: 0; }
.guide-head h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em; }
.guide-head p { margin-top: 10px; color: var(--muted); font-size: var(--fs-small); }
.guide-body ol { margin: 0; padding: 0; list-style: none; counter-reset: g; display: grid; gap: 14px; }
.guide-body ol > li { counter-increment: g; position: relative; padding-left: 44px; }
.guide-body ol > li::before {
  content: counter(g);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font: 700 0.875rem/1 var(--display);
}
.guide-body .aside { margin-top: 20px; padding: 16px 18px; background: var(--tint); border-radius: var(--radius-s); font-size: var(--fs-small); }
@media (max-width: 860px) { .guide { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); min-width: 560px; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { font: 400 var(--fs-label)/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
tbody th { font-weight: 600; }
td .host { display: block; margin-top: 6px; }
.yes { color: var(--blue); font-weight: 600; }
.no { color: var(--muted); }

/* ---------- PRO page: plans ---------- */

.plans { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: stretch; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(28px, 3.6vw, 44px);
}
.plan.is-best { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan-flag {
  position: absolute;
  top: -12px;
  left: clamp(28px, 3.6vw, 44px);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--ink);
  font: 400 var(--fs-label)/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.plan-price { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.plan-price b { font: 700 clamp(3rem, 6vw, 4.5rem)/0.9 var(--display); letter-spacing: -0.04em; }
.plan-price s { color: var(--muted-on-ink); font-size: 1.0625rem; }
.plan-price span { color: var(--muted); }
.plan.is-best .plan-price span { color: var(--muted-on-ink); }
.plan-bill { margin-top: 10px; color: var(--muted); }
.plan.is-best .plan-bill { color: var(--muted-on-ink); }
.plan-actions { margin-top: auto; padding-top: 32px; display: grid; gap: 10px; }
.plan-actions .btn { width: 100%; }
.plan-actions form { margin: 0; }
.plan.is-best .btn-primary { background: var(--cyan); color: var(--ink); }
.plan.is-best .btn-primary:hover { background: #fff; }
.plan.is-best .btn-ghost { color: #fff; border-color: var(--rule-on-ink); }
.plan.is-best .btn-ghost:hover { border-color: #fff; }
.plan.is-best :focus-visible { outline-color: var(--cyan); }
.plan-guarantees { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 24px; font-size: var(--fs-small); color: var(--muted); }
.plan-guarantees span::before { content: "\2713  "; color: var(--blue); font-weight: 700; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

.includes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 40px; }
.include h3 { font-size: 1.125rem; }
.include p { margin-top: 8px; color: var(--muted); }

/* ---------- Help ---------- */

.help-search { position: relative; margin-top: 32px; max-width: 40rem; }
.help-search input {
  width: 100%;
  height: 60px;
  padding: 0 22px 0 54px;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--ink);
  font: 400 1.0625rem var(--body);
  -webkit-appearance: none;
  appearance: none;
}
.help-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.15); }
.help-search::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  box-sizing: border-box;
  -webkit-mask: linear-gradient(#000 0 0);
}
#help-count { margin-top: 12px; min-height: 1.5em; font-size: var(--fs-small); color: var(--muted); }

.help-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.help-jump a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--sheet);
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
}
.help-jump a:hover { border-color: var(--ink); }

.help-topic {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr);
  gap: 16px clamp(24px, 5vw, 64px);
  padding-block: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--rule);
}
.help-topic > h2 { grid-column: 1; font-size: clamp(1.375rem, 2.4vw, 1.75rem); }
.help-topic > .topic-sub { grid-column: 1; color: var(--muted); font-size: var(--fs-small); margin-top: -4px; }
.help-topic > .qa { grid-column: 2; }
.help-topic > h2, .help-topic > .topic-sub { align-self: start; }
.help-topic { grid-auto-flow: row dense; }
@media (min-width: 861px) {
  .help-topic > h2 { grid-row: 1; }
  .help-topic > .topic-sub { grid-row: 2; }
}
.qa { border-bottom: 1px solid var(--rule); }
.help-topic > .qa:first-of-type { border-top: 1px solid var(--rule); }
.qa > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 18px 44px 18px 0;
  font-weight: 600;
  font-size: 1.0625rem;
}
.qa > summary::-webkit-details-marker { display: none; }
.qa > summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.qa[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.qa > summary:hover { color: var(--blue); }
.qa-body { padding: 0 0 24px; color: #283047; }
.qa-body p + p, .qa-body p + ul, .qa-body ul + p, .qa-body ol + p, .qa-body p + ol { margin-top: 0.9em; }
.qa-body ul, .qa-body ol { padding-left: 1.2em; margin: 0.6em 0 0; }
.qa-body li + li { margin-top: 0.35em; }
.qa-body .btn { margin-top: 4px; }
@media (max-width: 860px) {
  .help-topic { grid-template-columns: 1fr; }
  .help-topic > .qa { grid-column: 1; }
  .help-topic > .qa:first-of-type { margin-top: 12px; }
}
.help-empty { display: none; padding-block: 48px; }
.help-empty.show { display: block; }
.help-empty h2 { font-size: 1.5rem; margin-bottom: 8px; }

.stuck {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr);
  gap: 16px clamp(24px, 5vw, 64px);
}
.stuck ul { padding-left: 1.2em; }
@media (max-width: 860px) { .stuck { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.footer { background: var(--ink); color: #fff; padding-block: 72px 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px 32px;
}
.footer-brand p { margin-top: 18px; color: var(--muted-on-ink); font-size: var(--fs-small); max-width: 22em; }
.footer h2 {
  font: 400 var(--fs-label)/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-on-ink);
  margin-bottom: 18px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { color: #fff; text-decoration: none; font-size: var(--fs-small); }
.footer a:hover { color: var(--cyan); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-on-ink);
  color: var(--muted-on-ink);
  font-size: 0.8125rem;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.spaced { margin-top: clamp(48px, 7vw, 80px); }
.flush-top { padding-top: 0; }
@media (max-width: 560px) {
  .postmark { width: 150px; top: -40px; right: -50px; }
  .state-caption { max-width: 55%; }
}
.wrap.prose { max-width: var(--max); }
.wrap.prose > * { max-width: 42rem; }

/* Screenshots: framed so they read as pictures of the UI, not the UI. */
.shot {
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--sheet);
  box-shadow: 0 12px 28px -18px rgba(10, 16, 36, 0.35);
}
.prose p > .shot { margin-block: 8px; }
.wrap.prose > .shots { max-width: none; }
.shots {
  display: grid;
  /* 348px is the screenshots' own width: three fit in the 1080px column. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 348px));
  gap: 24px 16px;
  margin: 1.4em 0;
}
.shots figure { margin: 0; }
.shots figcaption { margin-top: 12px; font-size: var(--fs-small); color: var(--muted); }
.shots .shot { width: 100%; }
.steps > li { align-content: start; }
.help-topic { grid-template-rows: auto 1fr; }
.help-topic > .qa-list { grid-column: 2; grid-row: 1 / span 2; }
.help-topic > .topic-sub { margin-top: 0; }
.qa-list > .qa:first-child { border-top: 1px solid var(--rule); }
@media (max-width: 860px) {
  .help-topic { grid-template-rows: none; }
  .help-topic > .qa-list { grid-column: 1; grid-row: auto; margin-top: 12px; }
}
.help-search::after {
  content: "";
  position: absolute;
  left: 36px;
  top: 50%;
  width: 7px;
  height: 2px;
  margin-top: 7px;
  background: var(--muted);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* ---------- "To" field: open a site in the web proxy ----------
   Shared with webproxy.stealthy.co (vendored there as public/site.css). */
.to-form {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 30rem;
  margin-top: 16px;
  padding: 5px 5px 5px 18px;
  background: var(--sheet);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.to-form:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.15); }
.to-key {
  flex: none;
  font: 400 var(--fs-label)/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.to-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 400 1rem var(--body);
}
.to-form input:focus { outline: none; }
.to-form input::placeholder { color: var(--hint); }
