/*
 * sfm.luongnv.com
 *
 * Direction: an instrument panel. The brand's navy with assurance-blue
 * lines and one green signal, the logo's radar scope as the only ornament,
 * and JetBrains Mono (the wordmark's face, "the command you type") for
 * headlines and commands. Running text uses the system sans, as the sfm
 * dashboard does.
 *
 * Everything is served from this origin: no web font CDN, no script, no
 * analytics. The pages carry a Content-Security-Policy that allows nothing
 * else, so there is no inline style and no style attribute anywhere.
 */

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Palette: the logo set's light values. Every text pair below is WCAG AA. */
:root {
  color-scheme: light dark;
  --bg: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --line: #d3dbe8;
  --line-strong: #7587a4;
  --text: #0b1424;
  --muted: #4b5a72;
  --accent: #1a56d6;
  --accent-ink: #ffffff;
  --signal: #0b9467;
  --warn: #8f5200;
  --grid: #dfe6f0;
  --shadow: 0 1px 2px rgba(11, 20, 36, 0.05), 0 24px 48px -24px rgba(11, 20, 36, 0.28);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 72rem;
  --radius: 6px;
}

/* The logo set's dark values: the navy the mark was drawn on. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1120;
    --surface: #0f1a2e;
    --surface-2: #0c1526;
    --line: #1c2a44;
    --line-strong: #5b6f8f;
    --text: #eaf1fb;
    --muted: #8fa1bb;
    --accent: #4d9fff;
    --accent-ink: #0a1120;
    --signal: #3ddc97;
    --warn: #f2b544;
    --grid: #111c30;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 28px 56px -24px rgba(0, 0, 0, 0.7);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

/* Inline commands read as the thing you type: tinted, never boxed in a pill. */
:not(pre) > code {
  padding: 0.08em 0.32em;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  white-space: nowrap;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.skip:focus {
  top: 1rem;
}

/* ---------- Header ---------- */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font: 700 1.25rem/1 var(--mono);
  letter-spacing: -0.03em;
}

.brand:hover {
  text-decoration: none;
}

.brand svg {
  width: 2rem;
  height: 2rem;
}

.brand-name {
  padding-left: 0.7rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font: 400 0.8125rem/1 var(--sans);
  letter-spacing: 0;
}

/* The mark, inline so it follows the theme (as in the sfm dashboard). */
.mark-ring {
  fill: none;
  stroke: var(--accent);
}

.mark-sector {
  fill: var(--accent);
  fill-opacity: 0.2;
}

.mark-range {
  fill: none;
  stroke: var(--line-strong);
}

.mark-sweep {
  fill: none;
  stroke: var(--text);
}

.mark-host {
  fill: var(--signal);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.nav a:not(.btn) {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.nav a:not(.btn):hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 0.9375rem/1.2 var(--sans);
  text-decoration: none;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background-color 120ms ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px var(--accent);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-lg {
  min-height: 3.25rem;
  padding: 0.85rem 1.5rem;
  font-size: 1.0625rem;
}

.btn-ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  box-shadow: none;
  border-color: var(--text);
}

.btn-sm {
  min-height: 2.25rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 0;
  isolation: isolate;
}

/* A faint chart grid, fading out: the panel the scope sits on. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 70% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 65% at 70% 30%, #000 0%, transparent 78%);
}

/* The logo's scope, large and off the right edge, with one slow sweep. */
.scope {
  position: absolute;
  top: -9rem;
  right: -11rem;
  z-index: -1;
  width: 44rem;
  height: 44rem;
  border: 2px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.scope::before {
  content: "";
  position: absolute;
  inset: 25%;
  border: 1px solid color-mix(in srgb, var(--line-strong) 60%, transparent);
  border-radius: 50%;
}

.scope::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    color-mix(in srgb, var(--accent) 22%, transparent) 0deg,
    transparent 70deg,
    transparent 360deg
  );
  animation: sweep 14s linear infinite;
}

@keyframes sweep {
  to {
    transform: rotate(-360deg);
  }
}

.hero-copy {
  max-width: 46rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 22%, transparent);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 6.2vw, 4.4rem);
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
}

h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.lede {
  margin: 1.5rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
}

.trust li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.trust svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--signal);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Screenshots ---------- */

.shot {
  margin: 0;
}

.shot-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shot-frame img {
  width: 100%;
}

.shot figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.hero-shot {
  margin-top: 4rem;
}

/* The hero image runs off the bottom of the section, like a panel sliding up. */
.hero-shot .shot-frame {
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.hero-shot figcaption {
  margin: 0;
  padding: 0.75rem 0 0.9rem;
}

.hero-base {
  border-top: 1px solid var(--line);
}

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

.section {
  padding: 6.5rem 0;
}

.section-tight {
  padding: 5rem 0;
}

.band {
  border-block: 1px solid var(--line);
  background: var(--surface-2);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 3rem;
}

.section-head p {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

/* Problem and agitate: two columns, the claim on the left, the cases on the right. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem 4.5rem;
  align-items: start;
}

.split .section-head {
  margin: 0;
  position: sticky;
  top: 6.5rem;
}

.cases {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.cases li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.125rem;
  line-height: 1.55;
}

.cases svg {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.15rem;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cases-warn svg {
  stroke: var(--warn);
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature-wide {
  grid-column: span 3;
}

.feature p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.25rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.versus {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-size: 1.125rem;
}

.shot-wide {
  margin-top: 3.5rem;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.steps li {
  padding: 1.75rem 1.5rem 2rem;
  border-right: 1px solid var(--line);
}

.steps li:last-child {
  border-right: 0;
}

.steps svg {
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 1.1rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.steps p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.9688rem;
}

.steps code {
  white-space: nowrap;
}

.after-steps {
  margin-top: 2.5rem;
}

/* ---------- Guard list (the proof slot) ---------- */

.guards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 3.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.guards li {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.9rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.guards li:last-child {
  grid-column: 1 / -1;
}

.guards svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  fill: none;
  stroke: var(--signal);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.note {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.9688rem;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 50rem;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 0;
  cursor: pointer;
  list-style: none;
  font: 700 1.0938rem/1.4 var(--mono);
  letter-spacing: -0.03em;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 160ms ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq summary:hover {
  color: var(--accent);
}

.faq details p {
  margin: 0 0 1.5rem;
  max-width: 44rem;
  color: var(--muted);
}

/* ---------- Final call ---------- */

.final {
  position: relative;
  overflow: hidden;
  padding: 6.5rem 0;
  border-top: 1px solid var(--line);
  isolation: isolate;
}

.final .scope {
  top: auto;
  bottom: -30rem;
  right: 50%;
  margin-right: -22rem;
}

.final .wrap {
  max-width: 46rem;
  text-align: center;
}

.final p {
  margin: 1.25rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.final .actions {
  justify-content: center;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.site-footer .brand {
  font-size: 1.0625rem;
}

.site-footer .brand svg {
  width: 1.6rem;
  height: 1.6rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.foot-links a {
  color: var(--muted);
}

.foot-links a:hover {
  color: var(--text);
}

/* ---------- Document pages (privacy, changelog, docs) ---------- */

.doc {
  padding: 4.5rem 0 6rem;
}

.doc .wrap {
  max-width: 50rem;
}

.doc-head {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.doc-head h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
}

.doc-meta {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9688rem;
}

.doc h2 {
  margin: 3rem 0 1rem;
  font-size: 1.5rem;
  letter-spacing: -0.035em;
}

.doc h3 {
  margin: 2rem 0 0.6rem;
}

.doc p,
.doc ul,
.doc ol,
.doc dl {
  margin: 0 0 1.1rem;
}

.doc ul,
.doc ol {
  padding-left: 1.35rem;
}

.doc li {
  margin-bottom: 0.5rem;
}

.doc li::marker {
  color: var(--muted);
}

.summary-box {
  margin: 0 0 2.5rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.summary-box p:last-child {
  margin-bottom: 0;
}

pre {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.875rem;
  line-height: 1.6;
  tab-size: 2;
}

pre code {
  font-size: inherit;
}

.table-wrap {
  margin: 0 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

td code {
  white-space: normal;
}

/* Commands stay on one line where the table has room for them. */
@media (min-width: 44rem) {
  td:first-child {
    width: 46%;
  }

  td:first-child code {
    white-space: nowrap;
  }
}

.release {
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.release h2 {
  margin-top: 0;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.back {
  display: inline-block;
  margin-top: 2.5rem;
}

.lost {
  padding: 8rem 0;
  text-align: center;
}

.lost p {
  margin: 1.25rem 0 2rem;
  color: var(--muted);
}

/*
 * ---------- Entrance: one staggered rise on load ----------
 * Movement only, never opacity: a renderer that does not run animations
 * (a link preview, a crawler's snapshot) must still see the hero text.
 */

@keyframes rise {
  from {
    transform: translateY(12px);
  }
}

.hero-copy > * {
  animation: rise 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 70ms;
}

.hero-copy > :nth-child(3) {
  animation-delay: 140ms;
}

.hero-copy > :nth-child(4) {
  animation-delay: 210ms;
}

.hero-copy > :nth-child(5) {
  animation-delay: 280ms;
}

.hero-shot {
  animation: rise 700ms 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 62rem) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split .section-head {
    position: static;
  }

  .feature,
  .feature-wide {
    grid-column: span 3;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps li:nth-child(2n) {
    border-right: 0;
  }

  .steps li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .scope {
    width: 32rem;
    height: 32rem;
    top: -7rem;
    right: -14rem;
  }
}

@media (max-width: 44rem) {
  body {
    font-size: 1rem;
  }

  .wrap {
    width: min(100% - 2rem, var(--wrap));
  }

  .site-header .wrap {
    gap: 0.75rem;
  }

  .brand-name,
  .nav .nav-link {
    display: none;
  }

  .hero {
    padding-top: 3.5rem;
  }

  /* Keep the scope clear of the headline on a phone. */
  .scope {
    width: 20rem;
    height: 20rem;
    top: -8rem;
    right: -11rem;
  }

  .final .scope {
    bottom: -14rem;
    margin-right: -10rem;
  }

  .section,
  .final {
    padding: 4.5rem 0;
  }

  .section-tight {
    padding: 3.5rem 0;
  }

  .feature,
  .feature-wide {
    grid-column: 1 / -1;
  }

  .steps,
  .guards {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .steps li:last-child {
    border-bottom: 0;
  }

  .actions .btn {
    width: 100%;
  }

  .trust {
    flex-direction: column;
  }

  .foot-links {
    margin-left: 0;
  }

  :not(pre) > code {
    white-space: normal;
  }
}
