/* NetworkMonitor marketing site. No external requests: fonts are bundled (SIL OFL, licences next to them). */

/* @font-face rules live in fonts.css: build.py embeds the bundled woff2 files there as data: URLs, because browsers
   refuse font files over file:// (opaque origin) and the site must work when opened straight from disk. */

:root {
  color-scheme: light dark;
  /* Light: cool mist paper, slate ink, fjord teal, beacon amber for signal marks only */
  --ink: #13202a;
  --ink-soft: #4c5c65;
  --mist: #edf1f0;
  --paper: #ffffff;
  --line: #cfd8d6;
  --fjord: #0b6560;
  --fjord-strong: #08504c;
  --fjord-wash: #dceae7;
  --beacon: #c98a0b;
  --plate-shadow: 0 1px 0 rgba(19, 32, 42, .05), 0 18px 40px -18px rgba(11, 60, 70, .35);
  --focus: #b06f00;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1320px;
  --rail: 13rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e3ebe9;
    --ink-soft: #a3b3b6;
    --mist: #0f1a20;
    --paper: #15232b;
    --line: #2a3b44;
    --fjord: #5cc6b8;
    --fjord-strong: #86dacd;
    --fjord-wash: #17343a;
    --beacon: #f0b93a;
    --plate-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 22px 50px -20px rgba(0, 0, 0, .7);
    --focus: #f0b93a;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 1.0625rem/1.62 var(--sans);
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--fjord); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--fjord-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

code, .token {
  font-family: var(--mono);
  font-size: .86em;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--paper); color: var(--ink); padding: .6rem 1rem; border-radius: 6px;
}
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--mist) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--ink); text-decoration: none;
  font-weight: 620; letter-spacing: -.01em; font-size: 1.05rem;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.brand:hover { color: var(--ink); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.site-nav a:hover { color: var(--ink); }
.site-nav .talk {
  color: var(--paper); background: var(--ink); padding: .45rem .9rem; border-radius: 999px;
}
.site-nav .talk:hover { color: var(--paper); background: var(--fjord-strong); }
@media (max-width: 900px) {
  .site-nav li:not(.keep) { display: none; }
}

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

/* ------------------------------------------------------------------ hero */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) 0; overflow: clip; }
.hero-grid {
  display: grid; gap: clamp(2rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
}
.hero h1 {
  margin: 0;
  font-weight: 300;
  font-size: clamp(2.45rem, 6.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  max-width: 15ch;
  text-wrap: balance;
}
.hero .lede {
  margin: 1.6rem 0 0;
  max-width: 54ch;
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; margin-top: 2rem; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.25rem; border-radius: 999px;
  background: var(--fjord); color: #fff; text-decoration: none; font-weight: 560;
}
@media (prefers-color-scheme: dark) { .button { color: #062421; } }
.button:hover { background: var(--fjord-strong); color: #fff; text-decoration: none; }
@media (prefers-color-scheme: dark) { .button:hover { color: #062421; } }
.quiet-link { font-weight: 520; }

/* the zero-requests meter: a live check, not a claim */
.meter {
  margin-top: 2.2rem;
  display: inline-grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; align-items: center;
  padding: .75rem 1rem; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: .9rem; color: var(--ink-soft); max-width: 100%;
}
.meter .dot {
  grid-row: span 2; width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--fjord); box-shadow: 0 0 0 4px var(--fjord-wash);
}
.meter strong { color: var(--ink); font-weight: 600; }

.hero-plate {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  margin-right: calc(-1 * var(--gutter));
}
.hero-plate .plate { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; }

/* ------------------------------------------------------------------ spec sheet */
.spec {
  background: var(--paper);
  border-block: 1px solid var(--line);
  padding-block: clamp(2rem, 4vw, 3rem);
}
.spec dl {
  display: grid; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.5rem 2.5rem;
}
.spec dt { font-size: .86rem; color: var(--ink-soft); }
.spec dd { margin: .2rem 0 0; font-size: 1.12rem; font-weight: 520; letter-spacing: -.01em; }

/* ------------------------------------------------------------------ chapters with index rail */
.chapters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 3rem;
}
@media (min-width: 1180px) {
  .chapters { grid-template-columns: var(--rail) minmax(0, 1fr); }
}
.rail { display: none; }
@media (min-width: 1180px) {
  .rail { display: block; }
  .rail nav { position: sticky; top: 6rem; padding-top: 5.5rem; }
  .rail ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .rail li a {
    display: block; padding: .35rem 0 .35rem 1rem; margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--ink-soft); text-decoration: none; font-size: .92rem;
  }
  .rail li a:hover { color: var(--ink); }
  .rail li a[aria-current="true"] { color: var(--ink); border-left-color: var(--fjord); font-weight: 560; }
  .rail p { font-size: .82rem; color: var(--ink-soft); margin: 1.4rem 0 0 1rem; }
}

.chapter { padding-block: clamp(4rem, 8vw, 7rem) 0; }
.chapter > header { max-width: var(--measure); }
.chapter h2 {
  margin: 0;
  font-weight: 340;
  font-size: clamp(1.95rem, 3.8vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.chapter .kicker {
  margin: 0 0 .9rem;
  color: var(--fjord);
  font-weight: 560; font-size: .98rem;
}
.chapter header p:not(.kicker) {
  margin: 1.2rem 0 0;
  font-size: 1.14rem;
  color: var(--ink-soft);
}

.prose { max-width: var(--measure); }
.prose.solo { margin-top: 2.5rem; }
.prose p { margin: 1rem 0; }
.prose h3, .split h3 {
  font-size: 1.12rem; font-weight: 620; letter-spacing: -.01em; margin: 2rem 0 .4rem;
}

.facts { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .95rem; }
.facts li { padding-left: 1.4rem; position: relative; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .5rem; height: .5rem; border-radius: 2px; background: var(--fjord);
}
.facts strong { font-weight: 620; }

.split {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
  margin-top: 2.5rem;
  align-items: start;
}
@media (min-width: 1000px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split.flip > :first-child { order: 2; }
  /* a screenshot next to a long column of text stays in view while the text scrolls past */
  .split > figure, .split > .phones { position: sticky; top: 5.5rem; }
}

/* tag tokens look like the product's own key:value tags */
.token {
  display: inline-block;
  padding: .05rem .45rem; border-radius: 6px;
  background: var(--fjord-wash); color: var(--fjord-strong);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ plates (screenshots) */
.plates { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 2.5rem; }
.plates.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.plates.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
/* a setup sequence: an ordered list of screenshots, each caption led by its step number */
ol.plates { list-style: none; padding: 0; counter-reset: step; }
ol.plates > li { counter-increment: step; }
ol.plates figcaption::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 1.5rem; height: 1.5rem; margin-right: .55rem; border-radius: 50%;
  background: var(--fjord-wash); color: var(--fjord-strong); font-weight: 650; font-size: .82rem;
}
figure { margin: 0; }
.plate {
  position: relative; display: block; width: 100%;
  padding: 0; margin: 0; cursor: zoom-in;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--plate-shadow);
  font: inherit; color: inherit; text-align: left;
}
.plate img { width: 100%; }
.plate::after {
  content: "Enlarge"; position: absolute; right: .8rem; bottom: .8rem;
  font-size: .78rem; font-weight: 560;
  padding: .3rem .6rem; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 82%, transparent); color: var(--mist);
  opacity: 0; transition: opacity .15s ease;
}
.plate:hover::after, .plate:focus-visible::after { opacity: 1; }
figcaption {
  margin-top: .8rem; font-size: .92rem; color: var(--ink-soft); max-width: 70ch;
}
figcaption b { color: var(--ink); font-weight: 600; }

.plate.phone { max-width: 300px; border-radius: 26px; }
.phones { display: grid; grid-template-columns: repeat(2, minmax(0, 250px)); gap: clamp(.9rem, 2vw, 1.5rem); align-items: start; }
.phones figure { margin: 0; }

/* ------------------------------------------------------------------ how it works diagram */
.flow-diagram {
  margin-top: 2.5rem; padding: clamp(1rem, 3vw, 2rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
}
.flow-diagram svg { width: 100%; height: auto; display: block; }
.flow-diagram .d-box { fill: var(--mist); stroke: var(--line); stroke-width: 1.5; }
.flow-diagram .d-core { fill: var(--fjord-wash); stroke: var(--fjord); stroke-width: 1.5; }
.flow-diagram .d-title { fill: var(--ink); font: 600 15px var(--sans); }
.flow-diagram .d-text { fill: var(--ink-soft); font: 400 12.5px var(--sans); }
.flow-diagram .d-link { stroke: var(--fjord); stroke-width: 2; fill: none; }
.flow-diagram .d-poll { stroke: var(--ink-soft); stroke-width: 1.5; fill: none; stroke-dasharray: 4 5; }
.flow-diagram .d-arrow { fill: var(--fjord); }
.flow-diagram .d-label { fill: var(--fjord-strong); font: 500 12px var(--mono); }
.flow-diagram .d-wall { stroke: var(--beacon); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.flow-diagram .d-walltext { fill: var(--ink-soft); font: 500 12px var(--sans); }
.flow-diagram .diagram-mobile { display: none; }
@media (max-width: 700px) {
  .flow-diagram .diagram-wide { display: none; }
  .flow-diagram .diagram-mobile { display: block; }
}

.roles {
  display: grid; gap: 1.5rem 2.5rem; margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.roles h3 { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 620; }
.roles p { margin: 0; color: var(--ink-soft); }

/* ------------------------------------------------------------------ comparison table */
.table-scroll { overflow-x: auto; margin-top: 2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: .95rem; }
caption { text-align: left; padding: 1rem 1.1rem 0; color: var(--ink-soft); font-size: .88rem; }
th, td { text-align: left; vertical-align: top; padding: .85rem 1.1rem; border-top: 1px solid var(--line); }
thead th { border-top: 0; font-weight: 600; color: var(--ink-soft); font-size: .86rem; }
tbody th { font-weight: 600; width: 34%; }

.limits {
  margin-top: 2.5rem; padding: 1.4rem 1.5rem; border-radius: 14px;
  border: 1px dashed var(--line); background: transparent; max-width: 70ch;
}
.limits h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.limits p { margin: .4rem 0 0; color: var(--ink-soft); }

/* ------------------------------------------------------------------ contact */
.contact {
  margin-top: clamp(5rem, 9vw, 8rem);
  background: var(--ink); color: var(--mist);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
@media (prefers-color-scheme: dark) { .contact { background: #0a1217; color: var(--ink); } }
.contact h2 {
  margin: 0; font-weight: 300; letter-spacing: -.03em; line-height: 1.05;
  font-size: clamp(2rem, 4.6vw, 3.8rem); max-width: 18ch;
}
.contact p { max-width: 58ch; color: color-mix(in srgb, currentColor 78%, transparent); font-size: 1.1rem; }
.contact-grid {
  display: grid; gap: 2rem; margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.contact dt { font-size: .86rem; opacity: .75; }
.contact dd { margin: .25rem 0 0; font-size: 1.15rem; }
.contact a { color: inherit; }
.todo {
  display: inline-block; font-size: .72rem; font-weight: 700; vertical-align: .2em; margin-left: .4rem;
  padding: .15rem .4rem; border-radius: 4px; background: var(--beacon); color: #1b1300;
}

.site-foot { padding-block: 2rem 3rem; font-size: .88rem; color: var(--ink-soft); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }

/* ------------------------------------------------------------------ lightbox */
dialog.lightbox {
  width: min(96vw, 1800px); max-width: none; max-height: 94vh;
  padding: 0; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}
dialog.lightbox::backdrop { background: rgba(8, 14, 18, .78); }
dialog.lightbox[open] { animation: lb-in .18s ease-out; }
@keyframes lb-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.lightbox .lb-body { overflow: auto; max-height: calc(94vh - 3.6rem); }
.lightbox img { width: 100%; height: auto; }
.lightbox .lb-bar {
  display: flex; align-items: center; gap: 1rem; justify-content: space-between;
  padding: .7rem .9rem .7rem 1.2rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-soft);
}
.lightbox button.close {
  font: inherit; font-weight: 560; cursor: pointer;
  border: 1px solid var(--line); background: var(--mist); color: var(--ink);
  border-radius: 999px; padding: .4rem .9rem;
}

/* ------------------------------------------------------------------ one orchestrated moment: the hero trace */
.trace path {
  fill: none; stroke: var(--fjord); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1200; stroke-dashoffset: 1200;
  animation: draw 2.4s cubic-bezier(.6, .05, .3, 1) .2s forwards;
}
.trace circle { fill: var(--beacon); opacity: 0; animation: blink .4s ease 2.4s forwards; }
.trace { width: min(100%, 34rem); height: auto; margin-top: 1.4rem; display: block; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes blink { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .trace path { stroke-dashoffset: 0; animation: none; }
  .trace circle { opacity: 1; animation: none; }
}
