/* ==========================================================================
   stepkeep — reset, base elements, utilities
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky header clearance for in-page anchors. */
  scroll-padding-top: 5.5rem;
}

/* `hidden` has to win over a component's own `display`. The browser's rule is
   `[hidden] { display: none }` in the user-agent sheet, which any author rule
   beats — `.btn { display: inline-flex }` did, so a hidden submit button went on
   rendering next to the message that had replaced it. `!important` is the point
   here rather than a smell: element.hidden = true is the DOM's own way of saying
   "not rendered", and nothing should quietly contradict it. */
[hidden] {
  display: none !important;
}

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

body {
  background-color: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Paper grain: 3% ink noise, so surfaces read as stock rather than screen. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: var(--lh-head);
  letter-spacing: var(--tracking-head);
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 6vw, var(--step-4));
}

h2 {
  font-size: clamp(1.6rem, 4vw, var(--step-3));
}

h3 {
  font-size: var(--step-2);
}

h4 {
  font-size: var(--step-1);
  font-weight: 600;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s var(--ease);
}

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

ul,
ol {
  padding-left: 1.25rem;
}

li::marker {
  color: var(--slate);
}

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

code {
  background: var(--ink-soft);
  border-radius: 3px;
  padding: 0.1em 0.34em;
}

kbd {
  border: var(--border);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--surface);
  padding: 0.05em 0.35em;
  font-size: 0.85em;
  color: var(--ink);
}

/* Tabular figures wherever numbers are compared: prices, step numbers, tables */
.tnum,
table,
.price-amount {
  font-variant-numeric: tabular-nums;
}

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

hr {
  border: 0;
  border-top: var(--border);
}

::selection {
  background: var(--marker);
  color: var(--on-marker);
}

/* --- Utilities ----------------------------------------------------------- */

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

.prose {
  max-width: var(--measure);
}

.section {
  padding-block: clamp(3.5rem, 9vw, var(--sp-9));
}

.section--sunk {
  background: var(--paper-sunk);
  border-block: var(--border);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--slate);
}

.lede {
  font-size: var(--step-1);
  color: var(--graphite);
  max-width: var(--measure);
  text-wrap: pretty;
}

.muted {
  color: var(--slate);
}

.small {
  font-size: var(--step--1);
}

/* Marker underline motif: a thin highlighter stroke under
   the phrase "stays on your machine". Drawn as a background so it survives
   line wraps and sits below the descenders rather than through them. */
.marked {
  background-image: linear-gradient(var(--marker), var(--marker));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 3px;
  padding-bottom: 0.06em;
}

/* Wordmark step-dot: the Marker dot that appears once per composition. */
.dot {
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: var(--marker);
  vertical-align: baseline;
  margin-left: 0.06em;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0.75rem;
}

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