/* ---------------------------------------------------------------
   TRS Infinity — design system
   --------------------------------------------------------------- */

:root {
  --ink:        #14121a;
  --ink-2:      #504a5c;
  --ink-3:      #837c90;
  --paper:      #ffffff;
  --canvas:     #f7f5fa;
  --canvas-2:   #f1eef7;

  --line:        rgba(20, 18, 26, 0.09);
  --line-strong: rgba(20, 18, 26, 0.16);

  --accent:       #67399f;
  --accent-2:     #8a5cc4;
  --accent-wash:  #f3edfb;

  --ok:  #2f9e6b;
  --bad: #cf4e4e;

  --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: 2rem;
  --maxw: 1180px;

  /* Hanging label column used by every section header */
  --label-col: 9.5rem;
  --label-gap: 3rem;
}

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

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

body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

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

strong { color: var(--ink); font-weight: 600; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--accent);
  background: var(--accent-wash);
  padding: 0.1em 0.36em;
  border-radius: 3px;
}

::selection { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------
   Layout primitives
   --------------------------------------------------------------- */

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

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

.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.mono--accent { color: var(--accent); }

/* Section scaffolding ------------------------------------------ */

.section { padding: 6rem 0; }
.section--tight { padding: 4rem 0; }
.section--canvas { background: var(--canvas); }

.section-head {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  column-gap: var(--label-gap);
  row-gap: 1rem;
  align-items: start;
  padding-bottom: 3rem;
}

/* Number and word sit on deliberate separate lines so the label can never
   wrap into the heading column. */
.section-head__index {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.55rem;
}

.section-head__index .mono { white-space: nowrap; }

.section-head__num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line-strong);
}

.section-head__body { min-width: 0; }

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  max-width: 20ch;
  margin-bottom: 0.75rem;
}

.section-head p {
  max-width: 56ch;
  font-size: 1.02rem;
}

/* Body content aligns with the heading, label hangs in the margin. */
.section-body { padding-left: calc(var(--label-col) + var(--label-gap)); }

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

/* Launch strip — scrolls away above the sticky masthead */

.launch {
  background: var(--accent-wash);
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  line-height: 1;
}

.launch__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.6rem;
  height: 36px;
  overflow: hidden;
  white-space: nowrap;
}

.launch__tag {
  position: relative;
  flex: none;
  padding-left: 0.8rem;
  color: var(--accent);
  line-height: 1;
}

.launch__tag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.launch__msg {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.launch__dot {
  flex: none;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.launch__link {
  flex: none;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.launch__link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Drop the trailing link before the message is ever allowed to truncate */
@media (max-width: 620px) {
  .launch { font-size: 0.75rem; }
  .launch__dot,
  .launch__link { display: none; }
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  height: 60px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}

.wordmark__mark {
  width: auto;
  height: 22px;
}

.wordmark__name {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wordmark__sep {
  width: 1px;
  height: 16px;
  background: var(--line-strong);
}

.masthead__nav {
  display: flex;
  gap: 1.75rem;
  margin-right: auto;
}

.masthead__nav a {
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--ink-2);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}

.masthead__nav a:hover { color: var(--ink); }
.masthead__nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.masthead__meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.masthead__domain { letter-spacing: 0.06em; text-transform: none; }

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1.25rem;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button--solid {
  background: var(--ink);
  color: #fff;
}
.button--solid:hover { background: #2a2534; color: #fff; }

.button--accent {
  background: var(--accent);
  color: #fff;
}
.button--accent:hover { background: #552f87; color: #fff; }

.button--quiet {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.button--quiet:hover { border-color: var(--ink); color: var(--ink); }

.button--invert {
  background: #fff;
  color: var(--ink);
}
.button--invert:hover { background: #ece7f5; color: var(--ink); }

.button--quiet-invert {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}
.button--quiet-invert:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.button--sm { height: 34px; padding: 0 0.9rem; font-size: 0.84rem; }

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

/* Clips the console's ambient glow so it cannot widen the document */
.hero {
  padding: 5.5rem 0 5rem;
  overflow-x: clip;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 4.5rem;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.hero__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 3.9rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin-bottom: 1.5rem;
}

.hero__lead {
  font-size: 1.0625rem;
  line-height: 1.62;
  max-width: 46ch;
  margin-bottom: 2.25rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.hero__facts div {
  padding: 1.25rem 1rem 0 0;
}

.hero__facts div + div {
  border-left: 1px solid var(--line);
  padding-left: 1.25rem;
}

.hero__facts dt {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.hero__facts dd {
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.45;
  min-height: 2.9em; /* keeps all three cells level at 2 lines */
}

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

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

/* Soft brand-coloured ambience behind the console */
.hero__visual::before {
  content: "";
  position: absolute;
  inset: -14% -6% -18%;
  background:
    radial-gradient(60% 55% at 62% 40%, rgba(138, 92, 196, 0.24), transparent 70%),
    radial-gradient(45% 45% at 28% 78%, rgba(103, 57, 159, 0.16), transparent 72%);
  filter: blur(14px);
  pointer-events: none;
  z-index: 0;
}

.hero__visual .console {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

/* ---------------------------------------------------------------
   Ticker band
   --------------------------------------------------------------- */

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

.band__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.band__row > div {
  padding: 1.5rem 1.5rem 1.5rem 0;
}

.band__row > div + div {
  border-left: 1px solid var(--line);
  padding-left: 1.75rem;
}

.band__row b {
  display: block;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
  letter-spacing: -0.015em;
}

.band__row p {
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.45;
}

/* ---------------------------------------------------------------
   Prose
   --------------------------------------------------------------- */

.prose { max-width: 62ch; }

.prose > * + * { margin-top: 1.15rem; }

.prose h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
  margin-bottom: 0.25rem;
}

.prose h3 {
  font-size: 1.1875rem;
  margin-top: 2.5rem;
  letter-spacing: -0.025em;
}

.prose p { font-size: 1.0125rem; }

.editorial {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 4rem;
  align-items: start;
}

.editorial__side {
  position: sticky;
  top: 6rem;
}

.editorial__side h2 {
  margin-top: 1.25rem;
  max-width: 15ch;
}

/* Company block --------------------------------------------------- */

.company {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.company__intro {
  max-width: 62ch;
  margin: 1.5rem 0 2.75rem;
}

.company__intro p { font-size: 1.0125rem; }
.company__intro p + p { margin-top: 1.15rem; }

.company__lead {
  font-family: var(--sans);
  font-size: 1.5rem !important;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.3;
  color: var(--ink);
  max-width: 24ch;
  margin-bottom: 1.6rem;
}

.company__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}

.company__grid li {
  position: relative;
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
}

.company__grid li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.company__value {
  display: block;
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.company__label {
  display: block;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-3);
}

/* Checklist ----------------------------------------------------- */

.ticks { list-style: none; display: grid; gap: 0.7rem; }

.ticks li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 9px;
  height: 5px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------
   Bordered grid (features)
   --------------------------------------------------------------- */

.matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.matrix > article {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.25rem 2.25rem 2.5rem;
  background: var(--paper);
  transition: background-color 0.2s ease;
}

.matrix > article:hover { background: var(--canvas); }

.matrix__index {
  display: block;
  margin-bottom: 1.5rem;
}

.matrix h3 {
  font-size: 1.1875rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.025em;
}

.matrix p {
  font-size: 0.9375rem;
  line-height: 1.62;
  max-width: 44ch;
}

.matrix p + p { margin-top: 0.65rem; }

/* ---------------------------------------------------------------
   Terminal
   --------------------------------------------------------------- */

.console-block {
  margin-top: 3.25rem;
  max-width: 620px;
}

.console-block > .mono { margin-bottom: 0.85rem; }

.console {
  border-radius: 9px;
  overflow: hidden;
  background: #16131d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px -28px rgba(20, 18, 26, 0.5);
}

.console__chrome {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.console__lights { display: flex; gap: 6px; }

.console__lights i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.console__path {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
}

.console pre {
  padding: 1.15rem 1.25rem 1.35rem;
  font-family: var(--mono);
  font-size: 0.78125rem;
  line-height: 1.85;
  color: #b6adc6;
  overflow-x: auto;
}

.console .prompt { color: #6f6684; }
.console .ok  { color: #6ecf9d; }
.console .bad { color: #f08c8c; }
.console .dim { color: #6f6684; }

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

.rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.rail > li {
  list-style: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem 1.4rem 2.25rem;
}

/* Opt-in step reads as an aside rather than part of the required path */
.rail__optional { background: var(--canvas); }

.rail__optional .rail__step { color: var(--ink-3); }

.rail__optional h4 { color: var(--ink-2); }

.rail__step {
  display: inline-block;
  margin-bottom: 1.25rem;
}

.rail h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.rail p {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: var(--ink-3);
}

.snippet {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.6rem 0.75rem;
  overflow-x: auto;
  white-space: pre;
}

/* ---------------------------------------------------------------
   Closing band
   --------------------------------------------------------------- */

.closing {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.62);
  padding: 4.5rem 0;
}

.closing__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 3.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.closing__mark {
  display: block;
  width: auto;
  height: 30px;
}

.closing__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 4rem;
  align-items: start;
}

.closing h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.04em;
  max-width: 20ch;
  margin: 0 0 0.9rem;
}

.closing p { max-width: 52ch; font-size: 1rem; }

.closing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.closing__actions .button { min-width: 188px; }

.closing .mono { color: rgba(255, 255, 255, 0.42); }

.closing__meta > .mono {
  display: block;
  margin-bottom: 0.9rem;
}

.closing__meta p { font-size: 0.9375rem; max-width: 40ch; }

.closing__contact {
  list-style: none;
  margin-top: 1.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.closing__contact li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.875rem;
}

.closing__contact .mono { flex: none; }
.closing__contact a { color: #fff; text-align: right; }
.closing__contact a:hover { color: rgba(255, 255, 255, 0.68); }
.closing__val { color: rgba(255, 255, 255, 0.62); text-align: right; }

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

.footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}

.footer__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer__mark {
  width: auto;
  height: 18px;
  opacity: 0.85;
}

.footer__links { display: flex; gap: 1.5rem; }

.footer__links a { font-size: 0.8125rem; color: var(--ink-3); }
.footer__links a:hover { color: var(--ink); }

.footer__legal { font-size: 0.8125rem; color: var(--ink-3); }

/* ---------------------------------------------------------------
   Docs
   --------------------------------------------------------------- */

.docs { padding: 3.5rem 0 5rem; }

.docs__grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}

.docs__grid > article {
  min-width: 0;
}

.docs__toc {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.docs__toc .mono { margin-bottom: 0.85rem; }

.docs__toc a {
  font-size: 0.875rem;
  color: var(--ink-2);
  padding: 0.35rem 0 0.35rem 0.85rem;
  border-left: 1px solid var(--line);
}

.docs__toc a:hover {
  color: var(--ink);
  border-left-color: var(--accent);
}

.docs__intro {
  padding-bottom: 2.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.docs__intro h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.04em;
  margin: 1.25rem 0 1rem;
}

.docs__intro p { max-width: 60ch; font-size: 1.0625rem; }

.docs section {
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.docs section:last-of-type { border-bottom: none; }

.docs h2 {
  font-size: 1.625rem;
  letter-spacing: -0.035em;
  margin-bottom: 0.85rem;
}

.docs h3 {
  font-size: 1.0625rem;
  margin: 2.25rem 0 0.75rem;
}

.docs p { max-width: 62ch; margin-bottom: 1rem; font-size: 0.9875rem; }

.cmd {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 1.25rem 0;
}

.cmd__caption {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.55rem;
}

.cmd pre {
  background: #16131d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 1rem 1.15rem;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cmd pre code {
  display: block;
  background: none;
  padding: 0;
  color: #c5bad4;
  font-size: 0.78125rem;
  line-height: 1.85;
  white-space: pre;
}

.cmd__note {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-top: 0.6rem;
}

.notice {
  border-left: 2px solid var(--accent);
  background: var(--accent-wash);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.9375rem;
  margin: 1.5rem 0;
  max-width: none;
}

kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.12em 0.4em;
  color: var(--ink);
}

.docs__help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--canvas);
}

.docs__help p { margin: 0; font-size: 0.9375rem; max-width: 52ch; }

.docs__help-note {
  margin-top: 0.5rem !important;
  font-size: 0.8125rem !important;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */

@media (max-width: 1020px) {
  :root { --label-col: 8rem; --label-gap: 2rem; }
  .hero__grid { gap: 3rem; }
  .company__grid { grid-template-columns: 1fr 1fr; }
  .rail { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  :root { --gutter: 1.5rem; }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .shell { min-width: 0; }

  .masthead__nav { display: none; }
  .masthead__inner { gap: 1rem; justify-content: space-between; }
  .masthead__domain { display: none; }
  .wordmark__sep { display: none; }

  /* Cells are single-line once the row has room, so drop the reserved height */
  .hero__facts dd { min-height: 0; }

  .hero { padding: 3rem 0 3.5rem; }
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .section { padding: 4rem 0; }

  /* Label moves above the heading and lies flat on one line */
  .section-head {
    grid-template-columns: 1fr;
    row-gap: 1rem;
    padding-bottom: 2rem;
  }
  .section-head__index {
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding-top: 0;
  }
  .section-head__num {
    padding-bottom: 0;
    border-bottom: none;
    border-right: 1px solid var(--line-strong);
    padding-right: 0.65rem;
  }

  .section-body { padding-left: 0; }
  .company { margin-top: 3rem; }

  .band__row { grid-template-columns: 1fr 1fr; }
  .band__row > div { padding: 1.25rem 1.25rem 1.25rem 0; }
  .band__row > div:nth-child(3) { border-left: none; padding-left: 0; }
  .band__row > div:nth-child(n+3) { border-top: 1px solid var(--line); }

  .matrix { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
  .rail > li { padding: 1.75rem 1.5rem 2rem; }

  .closing__grid { grid-template-columns: 1fr; gap: 3rem; }
  .closing__meta p { max-width: none; }

  .docs__grid { grid-template-columns: 1fr; gap: 2rem; }
  .docs,
  .docs__grid,
  .docs__grid > article,
  .docs section {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .docs code {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .cmd pre code {
    overflow-wrap: normal;
    word-break: normal;
  }
  .docs__toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .docs__toc .mono { width: 100%; margin-bottom: 0.35rem; }
  .docs__toc a { border-left: none; padding-left: 0; }
}

@media (max-width: 560px) {
  .footer__links { flex-wrap: wrap; }
  .company__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero__facts { grid-template-columns: 1fr; }
  .hero__facts div + div {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }
  .hero__facts div { padding: 1rem 0 0; }

  .band__row { grid-template-columns: 1fr; }
  .band__row > div + div {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

  .matrix > article { padding: 1.75rem 1.5rem 2rem; }
  .footer__grid { flex-direction: column; align-items: flex-start; }
}
