/* WebForge bundles private sources; utilities deliberately follow components. */
@font-face {
  font-family: "Source Serif 4";
  src: url("/rez/fonts/SourceSerif4Variable-Roman.ttf@lAp27a.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/rez/fonts/SourceSerif4Variable-Italic.ttf@nSi1dJ.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/rez/fonts/SourceSans3VF-Upright.ttf@XxZWb3.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/rez/fonts/SourceSans3VF-Italic.ttf@tJWavA.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}
:root {
  color-scheme: light dark;
  --site-canvas: #f8fafc;
  --site-panel: #ffffff;
  --site-section: #f0f3f7;
  --site-text: #111b35;
  --site-muted: #536077;
  --site-rule: #dde3eb;
  --site-accent: #b53f24;
  --site-accent-hover: #92311b;
  --site-on-accent: #ffffff;
  --site-accent-soft: #fae8e2;
  --site-error: #b42318;
  --site-focus-width: 3px;
  --site-focus-offset: 5px;
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 5.5rem;
  --site-width: 1200px;
  --site-gutter: clamp(20px, 4vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --site-canvas: #101827;
    --site-panel: #182233;
    --site-section: #151f30;
    --site-text: #eef2f8;
    --site-muted: #aeb8c8;
    --site-rule: #344155;
    --site-accent: #ffad94;
    --site-accent-hover: #ffc9b8;
    --site-on-accent: #111b35;
    --site-accent-soft: #422d2c;
    --site-error: #ffb4ab;
  }
}

* { box-sizing: border-box; }
html { background: var(--site-canvas); color: var(--site-text); font-family: var(--font-body); font-size: 18px; line-height: 1.6; font-synthesis: none; font-optical-sizing: auto; scroll-padding-block-start: var(--space-4); }
body { display: flex; flex-direction: column; min-height: 100dvh; margin: 0; }
body > header, body > footer { flex-shrink: 0; }
body > main { flex: 1; }
a { color: var(--site-accent); text-underline-offset: .2em; }
a:hover { color: var(--site-accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: var(--site-focus-width) solid var(--site-accent); outline-offset: var(--site-focus-offset); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, blockquote, pre, figure, hr { margin: 0; }
hr { border: 0; border-top: 1px solid var(--site-rule); }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.15rem; }
p, li { overflow-wrap: break-word; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: .4em; }
strong, b { font-weight: 650; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .82em; }
pre { padding: var(--space-4); background: var(--site-section); white-space: pre-wrap; overflow-wrap: anywhere; }
blockquote { border-left: 2px solid var(--site-rule); padding-left: var(--space-4); color: var(--site-muted); }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { padding: var(--space-2); border-bottom: 1px solid var(--site-rule); text-align: left; vertical-align: top; }
th { font-weight: 600; }
figcaption { font-size: .75rem; color: var(--site-muted); margin-top: var(--space-1); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
::selection { background: var(--site-accent-soft); color: var(--site-text); }

/* Shell and interactive components own their states, not page layouts. */
.tv-header {
  --rule-fade: 5%;
  --rule-outset: min(var(--space-4), calc(var(--site-gutter) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding-block: var(--space-4); border-bottom: 1px solid var(--site-rule);
  border-image: linear-gradient(to right, transparent, var(--site-rule) var(--rule-fade), var(--site-rule) calc(100% - var(--rule-fade)), transparent) 1;
  border-image-outset: 0 var(--rule-outset);
}
.tv-brand { display: inline-flex; align-items: center; gap: var(--space-3); font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; letter-spacing: -.035em; color: var(--site-text); text-decoration: none; white-space: nowrap; }
.tv-brand:hover { color: var(--site-text); }
.tv-logo { width: 42px; height: 46px; display: block; }
.tv-nav { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center; font-size: .88rem; }
.tv-nav :where(a) { color: var(--site-text); text-decoration: none; padding-block: .4rem; border-bottom: 2px solid transparent; }
.tv-nav :where(a:hover, a[aria-current]) { color: var(--site-text); border-bottom-color: var(--site-accent); }
.tv-skip { position: absolute; transform: translateY(-200%); left: var(--space-3); top: var(--space-3); padding: var(--space-2); background: var(--site-panel); z-index: 2; }
.tv-skip:focus { transform: none; }
/* Keep initial fragment navigation clear until the masthead is measured. */
html:not([data-header-ready]) { scroll-padding-block-start: calc(var(--space-7) + var(--space-4)); }
html[data-header-sticky] {
  --site-header-scroll-range: 90; /* CSS pixels, matching the browser's scrollY measurement. */
  --site-header-progress: clamp(0, calc(var(--site-scroll-y, 0) / var(--site-header-scroll-range)), 1);
  --site-header-compact-padding: max(calc(var(--site-focus-width) + var(--site-focus-offset)), .4rem);
  --site-header-cut: calc((var(--space-4) - var(--site-header-compact-padding)) * 2 * var(--site-header-progress, 0));
  scroll-padding-block-start: calc(var(--site-header-height) - var(--site-header-cut) + var(--space-4));
}
/* Trim the visible padding while preserving the masthead's original document space. */
html[data-header-sticky] body > header { position: sticky; top: calc(-1 * var(--site-header-cut)); z-index: 1; background: var(--site-canvas); }
html[data-header-sticky] .tv-header > * { transform: translateY(calc(var(--site-header-cut) / 2)); }
@media (prefers-reduced-motion: reduce) {
  html[data-header-sticky] { --site-header-cut: 0px; }
  html[data-header-sticky] .tv-header { padding-block: var(--site-header-compact-padding); }
}
@media (max-width: 950px) {
  .tv-header { flex-wrap: wrap; gap: var(--space-3); }
}
@media (max-width: 500px) {
  .tv-brand { font-size: 1.12rem; gap: var(--space-2); }
  .tv-logo { width: 32px; height: 35px; }
  .tv-nav { width: 100%; justify-content: space-between; gap: var(--space-2); }
}
.tv-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-4); padding: .6rem 1.15rem; border: 1px solid var(--site-accent); border-radius: 3px; background: var(--site-accent); color: var(--site-on-accent); text-decoration: none; font: inherit; font-size: .94rem; font-weight: 600; line-height: 1.5; }
.tv-btn:hover { background: var(--site-accent-hover); border-color: var(--site-accent-hover); color: var(--site-on-accent); }
.tv-btn-outline { background: transparent; color: var(--site-accent); }
.tv-btn-outline:hover { background: var(--site-accent-soft); color: var(--site-accent); }
.tv-tag { display: inline-block; color: var(--site-accent); background: var(--site-accent-soft); border-radius: 3px; padding: .15rem .45rem; font-family: var(--font-body); font-size: .72rem; font-weight: 400; letter-spacing: 0; line-height: 1.5; white-space: nowrap; }
.tv-feature { display: grid; row-gap: var(--space-2); align-content: start; }
.tv-feature > :where(h2, h3, h4) { grid-row: 1; }
.tv-icon { display: inline-flex; width: .9em; height: .9em; margin-inline-end: .35em; vertical-align: -.1em; color: var(--site-accent); }
.tv-icon svg { display: block; width: 100%; height: 100%; }
@media (min-width: 761px) {
  .tv-feature-grid > .tv-feature { grid-row: span 2; grid-template-rows: subgrid; }
}
.tv-media { width: 100%; }
.tv-media :where(figure) { width: 100%; }
.tv-media :where(a:has(> picture)) { display: block; border: 1px solid var(--site-rule); border-radius: 4px; background: var(--site-panel); }
.tv-img { display: block; width: 100%; border-radius: 3px; }
.tv-trace svg { display: block; width: 100%; height: auto; }
.tv-trace-branch, .tv-trace-block { color: var(--site-muted); opacity: .32; }
.tv-trace-path, .tv-trace-nodes { color: var(--site-accent); }
.tv-trace ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); padding: 0; list-style: none; }
.tv-trace li { display: grid; gap: var(--space-1); min-width: 0; margin: 0; }
.tv-trace :where(code, span) { overflow-wrap: anywhere; font-size: .85rem; }
.tv-trace span { color: var(--site-muted); }
@media (max-width: 760px) { .tv-trace ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tv-panel { padding: var(--space-4); background: var(--site-panel); border: 1px solid var(--site-rule); border-radius: 4px; }
.tv-form { padding: var(--space-5); border: 1px solid var(--site-rule); border-radius: 4px; background: var(--site-panel); }
.tv-field :where(label) { display: block; font-size: .9rem; font-weight: 600; margin-bottom: var(--space-1); }
.tv-field :where(input) { width: 100%; min-width: 0; padding: .6rem .75rem; border: 1px solid var(--site-muted); border-radius: 3px; background: var(--site-canvas); color: var(--site-text); }
.tv-field :where(input[aria-invalid="true"]) { border-color: var(--site-error); }
.tv-error { color: var(--site-error); font-size: .9rem; }
.tv-footer { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding-block: var(--space-4) var(--space-5); border-top: 1px solid var(--site-rule); font-size: .8rem; color: var(--site-muted); }
body:has(> main > .tv-surface:last-child) > .tv-footer { border-top: 0; }
.tv-footer :where(a) { text-decoration: none; }
.tv-footer-info { display: grid; gap: calc(var(--space-1) / 2); text-align: end; }
@media (max-width: 760px) {
  .tv-footer { flex-direction: column; gap: var(--space-3); }
  .tv-footer-info { text-align: start; }
}
@media (max-width: 500px) {
  .tv-panel { padding: var(--space-4); background: var(--site-panel); border: 1px solid var(--site-rule); border-radius: 4px; }
.tv-form { padding: var(--space-4); }
}

/* Utilities are content-neutral and load last; gap modifiers override defaults. */
.tv-wrap { width: min(100% - 2 * var(--site-gutter), var(--site-width)); margin-inline: auto; }
.tv-stack { display: flex; flex-direction: column; gap: var(--space-3); }
.tv-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.tv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--tv-grid-gap, var(--space-6)); }
.tv-grid > :where(*) { min-width: 0; }
.tv-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tv-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tv-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tv-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
.tv-gap-1 { gap: var(--space-1); }
.tv-gap-2 { gap: var(--space-2); }
.tv-gap-3 { gap: var(--space-3); }
.tv-gap-4 { gap: var(--space-4); }
.tv-gap-5 { gap: var(--space-5); }
.tv-gap-6 { gap: var(--space-6); }
.tv-gap-7 { gap: var(--space-7); }
.tv-gap-8 { gap: var(--space-8); }
.tv-push { margin-block-start: auto; }
.tv-section { padding-block: var(--space-6); }
.tv-hero { padding-block: var(--space-7) var(--space-6); }
.tv-surface { background: var(--site-section); }
.tv-rule { border-top: 1px solid var(--site-rule); }
.tv-surface + .tv-rule { border-top: 0; }
.tv-center { text-align: center; }
.tv-row.tv-center { justify-content: center; }
.tv-stack.tv-center { align-items: center; }
.tv-prose { max-width: 65ch; }
.tv-img-wide { aspect-ratio: 8 / 5; object-fit: cover; }
.tv-img-crop-end { aspect-ratio: 1; object-fit: cover; object-position: right; }
.tv-prose > :where(* + *) { margin-top: var(--space-3); }
.tv-prose > :where(h2, h3, h4) { margin-top: var(--space-6); }
.tv-lead { font-family: var(--font-heading); font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.4; letter-spacing: -.015em; max-width: 48ch; }
.tv-muted { color: var(--site-muted); }
.tv-text-sm { font-size: .88rem; line-height: 1.45; }
.tv-title-xl { font-size: clamp(2.5rem, 5.4vw, 4rem); max-width: 15ch; }
.tv-title-lg { font-size: clamp(2.3rem, 4.5vw, 3.5rem); }
.tv-title-md { font-size: clamp(1.5rem, 2.5vw, 1.8rem); }
.tv-title-sm { font-size: 1.45rem; }
.tv-title-xs { font-size: 1.05rem; letter-spacing: -.02em; }
/* Dividers follow the active grid columns, including incomplete rows. */
.tv-divide { --tv-divide-pad: var(--space-4); }
.tv-divide > :where(*) { border-inline-start: 1px solid var(--site-rule); padding-inline-start: var(--tv-divide-pad); }
.tv-divide.tv-cols-2 { --tv-divide-pad: var(--space-6); }
.tv-divide.tv-cols-2 > :where(:nth-child(2n+1)),
.tv-divide.tv-cols-3 > :where(:nth-child(3n+1)),
.tv-divide.tv-cols-4 > :where(:nth-child(4n+1)) { border-inline-start: 0; padding-inline-start: 0; }
@media (min-width: 761px) {
  .tv-align-rows > :where(*) { display: grid; grid-row: span 4; grid-template-rows: subgrid; gap: var(--space-3); }
  .tv-divide.tv-cols-2 > :where(:nth-child(odd)) { padding-inline-end: calc(var(--tv-divide-pad) + 1px); }
}
@media (max-width: 950px) {
  .tv-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tv-divide.tv-cols-4 > :where(*) { border-inline-start: 1px solid var(--site-rule); padding-inline-start: var(--tv-divide-pad); }
  .tv-divide.tv-cols-4 > :where(:nth-child(2n+1)) { border-inline-start: 0; padding-inline-start: 0; }
  .tv-divide.tv-cols-4 > :where(:nth-child(odd)) { padding-inline-end: calc(var(--tv-divide-pad) + 1px); }
  .tv-divide.tv-cols-2 { --tv-divide-pad: var(--space-5); }
}
@media (max-width: 760px) {
  .tv-cols-2, .tv-cols-3, .tv-split { grid-template-columns: minmax(0, 1fr); }
  .tv-section { padding-block: var(--space-5); }
  .tv-hero { padding-block: var(--space-6); }
  .tv-grid:is(.tv-cols-2, .tv-cols-3, .tv-split) { --tv-grid-gap: var(--space-4); }
  .tv-grid:is(.tv-cols-2, .tv-cols-3, .tv-split).tv-gap-6 { row-gap: var(--space-4); }
  .tv-grid:is(.tv-cols-2, .tv-cols-3, .tv-split).tv-gap-7 { row-gap: var(--space-5); }
  .tv-divide:is(.tv-cols-2, .tv-cols-3) > :where(*) { border-inline-start: 0; padding-inline-start: 0; }
  .tv-divide:is(.tv-cols-2, .tv-cols-3) > :where(* + *) { border-top: 1px solid var(--site-rule); padding-top: var(--space-4); }
}
@media (max-width: 500px) {
  .tv-grid.tv-cols-4 { column-gap: var(--space-3); row-gap: var(--space-4); }
  .tv-divide.tv-cols-4 { --tv-divide-pad: var(--space-2); }
}

