/* ==========================================================================
   Xtrial — designtrial.com
   One stylesheet. Tokens at :root, then primitives, then components.
   Palette is anchored on the platform's own tokens (platform/src/App.css)
   so the marketing site and the product read as one system.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Brand */
  --navy:        #1E3253;
  --navy-deep:   #14213D;
  --navy-mid:    #2E4A73;
  --accent:      #5A7BB0;   /* UI / large text / on-navy only */
  --accent-ink:  #1F5FA6;   /* link + small text on white (6.5:1) */
  --accent-soft: #E4EAF3;

  /* Neutrals */
  --ink:      #1a2332;
  --muted:    #64748b;
  --border:   #e2e8f0;
  --surface:  #f4f6f9;
  --demo-bg:  #e9edf3;   /* flow-animation band: the video's family, a step off white */
  --white:    #ffffff;

  /* On navy */
  --on-navy:        #ffffff;
  --on-navy-muted:  #c9d8e8;   /* 8:1 on navy */
  --on-navy-line:   rgba(255, 255, 255, 0.14);

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  /* Layout */
  --container: 1120px;
  --container-narrow: 800px;
  --radius:    14px;
  --radius-sm: 10px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow:    0 4px 20px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.13);
}

/* --- 2. Reset ------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;   /* sticky header clearance for #pricing */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

/* --- 3. Type scale ------------------------------------------------------- */

.display {
  font-size: clamp(2.2rem, 4.2vw, 3.15rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  font-weight: 700;
}

.h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.024em;
  font-weight: 700;
}

.h3 {
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: -0.012em;
  font-weight: 650;
}

.lead {
  font-size: clamp(1.03rem, 1.5vw, 1.19rem);
  line-height: 1.62;
  color: var(--muted);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.eyebrow--on-navy { color: var(--accent); }

.small { font-size: 0.875rem; line-height: 1.6; }
.muted { color: var(--muted); }
/* --- 4. Layout primitives ------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow { max-width: var(--container-narrow); }

.section        { padding-block: clamp(64px, 8vw, 104px); }
.section--tight { padding-block: clamp(48px, 6vw, 72px); }
.section--surface { background: var(--surface); }
.section--navy    { background: var(--navy); color: var(--on-navy); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 52px); }
.section-head > * + * { margin-top: 14px; }
.section-head--center { margin-inline: auto; text-align: center; }

/* Tracks are minmax(0, 1fr), never a bare 1fr: a bare 1fr keeps a min-content
   floor, so one wide child (an SVG with a 460px viewBox, a long table) silently
   pushes the whole document past the viewport. min-width:0 on the children is
   the matching half of that guard. */
.grid { display: grid; gap: 24px; }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack > * + * { margin-top: 16px; }
.stack--sm > * + * { margin-top: 8px; }

/* --- 5. Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: #4A6A9C; border-color: #4A6A9C; }

.btn--navy {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.btn--navy:hover { background: var(--navy-mid); border-color: var(--navy-mid); }

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--navy); background: var(--surface); }

/* Ghost sitting on the navy band */
.btn--ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}
.btn--ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn--sm { padding: 9px 16px; font-size: 0.875rem; }
.btn--lg { padding: 17px 34px; font-size: 1.0625rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Text link with a trailing arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
}
.link-arrow::after {
  content: "→";
  transition: transform 0.16s;
}
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover::after { transform: translateX(3px); }

/* --- 6. Header ----------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 42, 70, 0.9);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--on-navy-line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 26px; height: 26px; flex: none; }

.nav { display: flex; align-items: center; gap: 4px; }

.nav__link {
  padding: 8px 13px;
  border-radius: 8px;
  color: var(--on-navy-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.14s, background 0.14s;
}
.nav__link:hover,
.nav__link[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  text-decoration: none;
}

.header__actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* --- 7. Hero ------------------------------------------------------------- */

.hero {
  position: relative;
  background:
    radial-gradient(ellipse 900px 520px at 12% 0%, rgba(90, 123, 176, 0.26), transparent 62%),
    radial-gradient(ellipse 760px 480px at 92% 18%, rgba(90, 123, 176, 0.14), transparent 60%),
    linear-gradient(168deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-navy);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(60px, 7.5vw, 100px) clamp(64px, 8vw, 104px);
}

.hero__copy > * + * { margin-top: 22px; }
.hero__title { color: #fff; max-width: 18ch; }
.hero__sub { color: var(--on-navy-muted); font-size: clamp(1.04rem, 1.5vw, 1.19rem); line-height: 1.62; max-width: 54ch; }
.hero__sub strong { color: #fff; font-weight: 600; }

.hero__note {
  font-size: 0.8125rem;
  color: rgba(201, 216, 232, 0.8);
  max-width: 52ch;
}
.hero__note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Page head for inner pages — the short version of the hero band */
.pagehead {
  background:
    radial-gradient(ellipse 700px 340px at 10% 0%, rgba(90, 123, 176, 0.22), transparent 65%),
    linear-gradient(168deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-navy);
}
/* Constrain the text, not the container — otherwise .container's auto margins
   centre the whole band and it stops lining up with the sections below it. */
.pagehead__inner { padding-block: clamp(48px, 6vw, 76px) clamp(52px, 7vw, 84px); }
.pagehead__inner > * { max-width: 780px; }
.pagehead__inner > * + * { margin-top: 16px; }
.pagehead h1 { color: #fff; }
.pagehead p { color: var(--on-navy-muted); }

/* --- 9. Cards ------------------------------------------------------------ */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}
.card > * + * { margin-top: 10px; }

a.card:hover,
.card--hover:hover {
  border-color: #C5D0E0;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.card__title { color: var(--ink); font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.012em; }
.card__text  { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.card__foot  { margin-top: auto; padding-top: 14px; }

/* Card sitting on the navy band */
.card--on-navy {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--on-navy-line);
}
.card--on-navy .card__title { color: #fff; }
.card--on-navy .card__text  { color: var(--on-navy-muted); }

.section--navy .section-head h2 { color: #fff; }
.section--navy .section-head .lead { color: var(--on-navy-muted); }

/* Pillar card — the three principles */
.pillar { padding: 32px 30px; }
.pillar__num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
}

/* --- 10. Badges ---------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
  white-space: nowrap;
}
.badge--live    { background: #e7f6ee; color: #0f7a45; }
.badge--coming  { background: var(--surface); color: var(--muted); }
.badge--accent  { background: var(--accent-soft); color: var(--accent-ink); }
.badge--on-navy { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid var(--on-navy-line); }

.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* --- 11. Proof strip ----------------------------------------------------- */

.proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.proof > * { min-width: 0; }
.proof__item > * + * { margin-top: 8px; }
.proof__k {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.026em;
  line-height: 1.25;
  color: var(--navy);
}
.proof__v { font-size: 1rem; color: var(--muted); line-height: 1.6; }

/* --- 12. Steps ----------------------------------------------------------- */

.steps { counter-reset: step; }
.step { position: relative; padding-left: 60px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}
.step > * + * { margin-top: 8px; }

/* --- 13. Feature list ---------------------------------------------------- */

.checks > li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.checks > li + li { margin-top: 11px; }
.checks > li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.44em;
  width: 15px; height: 9px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* --- 14. Pricing --------------------------------------------------------- */

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plans > * { min-width: 0; }

.plan {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.plan > * + * { margin-top: 12px; }

.plan__name { font-size: 1.0625rem; font-weight: 650; color: var(--ink); }
.plan__price { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.028em; color: var(--navy); line-height: 1.2; }
.plan__price small { font-size: 0.875rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan__desc { font-size: 0.9375rem; color: var(--muted); line-height: 1.6; }
.plan__cta { margin-top: auto; padding-top: 20px; }
.plan__cta .btn {
  width: 100%;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

/* The highlight follows the pointer.
   Premium carries it at rest; as soon as the row is pointed at, the default
   drops it and whichever plan is under the pointer (or holds keyboard focus)
   takes it. Focus-within keeps the behaviour reachable without a mouse. */
.plan--featured,
.plan:hover,
.plan:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
  transform: translateY(-3px);
}
.plan--featured .plan__cta .btn,
.plan:hover .plan__cta .btn,
.plan:focus-within .plan__cta .btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.plans:hover .plan--featured:not(:hover),
.plans:focus-within .plan--featured:not(:focus-within):not(:hover) {
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}
.plans:hover .plan--featured:not(:hover) .plan__cta .btn,
.plans:focus-within .plan--featured:not(:focus-within):not(:hover) .plan__cta .btn {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}

/* --- 15. CTA band -------------------------------------------------------- */

.cta-band {
  background:
    radial-gradient(ellipse 620px 320px at 20% 0%, rgba(90, 123, 176, 0.24), transparent 64%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-navy);
  border-radius: var(--radius);
  padding: clamp(40px, 6vw, 60px);
  text-align: center;
}
.cta-band > * + * { margin-top: 18px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--on-navy-muted); max-width: 56ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }

/* --- 16. Footer ---------------------------------------------------------- */

.footer {
  background: var(--navy-deep);
  color: var(--on-navy-muted);
  padding-block: clamp(48px, 6vw, 68px) 32px;
}
.footer a { color: var(--on-navy-muted); font-size: 0.9375rem; }
.footer a:hover { color: #fff; }

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) repeat(3, minmax(0,1fr));
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--on-navy-line);
}
.footer__brandcol > * + * { margin-top: 14px; }
.footer__tagline { font-size: 0.9375rem; line-height: 1.65; max-width: 34ch; }

.footer__h {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}
.footer__list > li + li { margin-top: 9px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 0.8125rem;
}

/* --- 17. Scroll reveal --------------------------------------------------- */

/* Gated on .js (set by an inline script in <head>). If scripting is off or
   site.js fails to load, .reveal never hides anything — the page is readable
   either way. Never style .reveal without the .js prefix. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- 18. Utilities ------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: #fff;
  color: var(--navy);
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { left: 16px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* --- 19. Responsive ------------------------------------------------------ */

@media (max-width: 1000px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .footer__grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px; }
}

@media (max-width: 860px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }

  /* Collapsed by default; .is-open is toggled by site.js. Without JS the
     links stay reachable through the footer, so nothing is stranded. */
  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    background: var(--navy-deep);
    border-bottom: 1px solid var(--on-navy-line);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 12px 14px; font-size: 1rem; }

  .header__actions .btn--sm { padding: 9px 14px; }
  .header__actions .btn--ghost-light { display: none; }
}

@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .btn-row .btn { width: 100%; justify-content: center; }
  .section-head { margin-bottom: 32px; }
}

/* --- 20. Subhead ---------------------------------------------------------- */

.subhead {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* --- 21. Table (Methods) -------------------------------------------------- */

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 15px 20px 15px 0;
  border-bottom: 1px solid var(--border);
}
.table th {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: #cbd5e1;
}
.table td { font-size: 0.9375rem; }
.table td:first-child { font-weight: 650; color: var(--ink); white-space: nowrap; }

/* --- 22. Form (Contact) --------------------------------------------------- */

.form { display: grid; gap: 20px; max-width: 560px; }
.field { display: grid; gap: 8px; }
.label { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }

.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90, 123, 176, 0.18);
}
.textarea { min-height: 140px; resize: vertical; }

/* --- 23. Flow animation --------------------------------------------------- */

/* Its own band under the hero. The ground is a step off white so the
   animation's #F4F6F9 chart panel still reads as a surface against it. */
.demo {
  background: var(--demo-bg);
  padding-block: clamp(40px, 5vw, 64px);
}


/* --- Flow animation -------------------------------------------- */

/* Synthesize, Design, Optimize, Predict, Decide, told as one worked example:
   the numbered rail names the stage, the stage beside it draws it. The chart
   is painted by assets/flow.js onto a fixed 800 x 560 canvas, so it scales
   with whatever column it is given.

   The custom properties below are scoped to .xtf and deliberately shadow the
   site tokens of the same name — flow.js carries the same hex values in its
   own colour map, and the two must agree. */

.xtf {
  --ink: #14213D;
  --navy: #1E3253;
  --muted: #5F6B7E;
  --line: #D5DCE5;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 0.46fr) minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 80px);
  align-items: center;
  color: var(--ink);
  font-family: var(--font);
}

.xtf-brand { display: none; }
.xtf-list { position: relative; }
.xtf-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.xtf-rail { position: absolute; z-index: 0; left: 19px; width: 2px; background: var(--line); }
.xtf-rail span { position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--navy); }

.xtf-step button {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.xtf-step button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; border-radius: 6px; }

.xtf-dot {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--muted);
  line-height: 1;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.xtf-dot svg { width: 23px; height: 23px; }
.xtf-step.is-done .xtf-dot { border-color: var(--navy); color: var(--navy); }
.xtf-step.is-on .xtf-dot {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.xtf-txt { display: flex; flex-direction: column; gap: 5px; padding-top: 3px; }
.xtf-verb {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(23px, 2.2vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #8A94A6;
  transition: color 0.3s;
}
.xtf-step.is-on .xtf-verb, .xtf-step.is-done .xtf-verb { color: var(--ink); }
.xtf-desc {
  max-width: 24em;
  font-size: clamp(14px, 1vw, 18px);
  line-height: 1.45;
  color: #8A94A6;
  transition: color 0.3s;
}
.xtf-step.is-on .xtf-desc { color: var(--muted); }

.xtf-stage svg { display: block; width: 100%; height: auto; }
.xtf-stage text { font-family: var(--font); fill: var(--ink); }
.xtf-stage .s { font-family: var(--serif); }
.xtf-stage .m { fill: var(--muted); }

@media (max-width: 760px) {
  .xtf { grid-template-columns: minmax(0, 1fr); }
  .xtf-desc { display: none; }
  .xtf-step.is-on .xtf-desc { display: block; }
}

/* Recording mode: open the page with ?video=1 for a fixed 1920 x 1080 frame,
   which is how the MP4 of this animation is made. */
.xtf-video body { width: 1920px; height: 1080px; overflow: hidden; }
.xtf-video .xtf {
  width: 1920px; height: 1080px;
  max-width: none;
  padding: 130px 130px 100px;
  grid-template-columns: 520px 1fr;
  gap: 96px;
}
.xtf-video .xtf-brand {
  display: block;
  position: absolute;
  top: 52px; left: 130px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.xtf-video .xtf-verb { font-size: 46px; }
.xtf-video .xtf-desc { display: block; font-size: 20px; }
.xtf-video .xtf-dot { width: 52px; height: 52px; }
.xtf-video .xtf-dot svg { width: 30px; height: 30px; }
.xtf-video .xtf-rail { left: 25px; }
.xtf-video .xtf-steps { gap: 40px; }
.xtf-video .xtf * { transition: none !important; }
