/* ==========================================================================
   TFC — design system
   White, quiet, editorial. One accent colour, used sparingly.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f3;
  --line: #e5e7eb;
  --line-strong: #d4d7dd;
  --ink: #0b0d12;
  --text: #2a2f3a;
  --muted: #616776;
  --accent: #2442e6;
  --accent-ink: #1b33b8;
  --accent-soft: #eef1fe;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --container: 1200px;
  --gutter: 24px;
  --header-h: 72px;

  --shadow-sm: 0 1px 2px rgb(11 13 18 / 0.05);
  --shadow: 0 1px 2px rgb(11 13 18 / 0.04), 0 8px 24px rgb(11 13 18 / 0.06);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

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

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

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

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  max-width: calc(760px + var(--gutter) * 2);
}

.section {
  padding-block: 112px;
}

.section-tight {
  padding-block: 72px;
}

.section-alt {
  background: var(--surface);
}

.section:not(.section-alt) + .section:not(.section-alt) {
  padding-top: 0;
}

.section-alt + .section-alt {
  padding-top: 0;
}

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

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

.text-center {
  text-align: center;
}

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

.nowrap {
  white-space: nowrap;
}

/* ---------- Typography ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* Keeps the home eyebrow on one line on 320px screens. */
@media (max-width: 359px) {
  .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
  }
}

.display {
  font-size: clamp(2.625rem, 6.2vw, 5.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.625rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.h2 {
  font-size: clamp(1.875rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.6;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head .lead {
  margin-top: 20px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head.center .eyebrow {
  justify-content: center;
}

/* Two-column heading row: title left, short text or link right */
.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-bottom: 56px;
}

.section-head-row > :first-child {
  max-width: 640px;
}

.section-head-row > :last-child {
  max-width: 420px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #262a35;
  color: #fff;
}

.btn-secondary {
  border-color: var(--line-strong);
  background: var(--bg);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-light:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.9375rem;
}

.btn-lg {
  min-height: 56px;
  padding: 14px 28px;
  font-size: 1.0625rem;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

/* The arrow is decorative: the second declaration gives it empty alt text where supported. */
.btn-link::after {
  content: "→";
  content: "→" / "";
  transition: transform 0.15s ease;
}

.btn-link:hover {
  color: var(--accent);
}

.btn-link:hover::after {
  transform: translateX(3px);
}

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

@media (max-width: 480px) {
  .btn-row > .btn {
    flex: 1 1 auto;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--ink);
}

.logo-mark {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--ink);
}

.logo-mark::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--ink);
}

.logo-word {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

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

.site-nav a:not(.btn) {
  color: var(--text);
  font-size: 0.9875rem;
  font-weight: 500;
  text-decoration: none;
}

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

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

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bar {
  top: 21px;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  left: 0;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* The dropdown only applies when main.js can open it: layout() adds .js to <html>. */
@media (max-width: 860px) {
  .js .nav-toggle {
    display: block;
  }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 12px 24px rgb(11 13 18 / 0.06);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .js .site-nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.0625rem;
  }

  .site-nav a[aria-current="page"] {
    text-decoration: none;
    color: var(--accent);
  }

  .site-nav .btn {
    min-height: 48px;
  }

  .js .site-nav .btn {
    margin-top: 20px;
  }

  /* Without JavaScript the links stay in the page flow, in rows below the logo. */
  html:not(.js) .site-header {
    position: static;
  }

  html:not(.js) .header-inner {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-h);
    padding-block: 12px;
  }

  html:not(.js) .site-nav {
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding-bottom: 12px;
  }
}

/* ---------- Home hero ---------- */

.hero {
  padding-top: 96px;
  padding-bottom: 72px;
}

.hero-title {
  max-width: 15ch;
}

.hero-lead {
  max-width: 620px;
  margin-top: 28px;
}

.hero-actions {
  margin-top: 40px;
}

.hero-media {
  margin-top: 72px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  aspect-ratio: 21 / 9;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The hero already ends with generous padding; don't add a full section's worth on top. */
.hero + .section:not(.section-alt) {
  padding-top: 40px;
}

/* ---------- Inner page hero ---------- */

.page-hero {
  padding-block: 88px 72px;
  border-bottom: 1px solid var(--line);
}

.page-hero .lead {
  max-width: 680px;
  margin-top: 24px;
}

.page-hero.has-media {
  padding-bottom: 0;
  border-bottom: 0;
}

.page-hero-media {
  margin-top: 56px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  aspect-ratio: 5 / 2;
}

.page-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Grids ---------- */

.grid {
  display: grid;
  gap: 24px;
}

.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));
}

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

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

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

/* ---------- Cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.section-alt .card {
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.card .h3,
.card h3 {
  margin-bottom: 10px;
  font-size: 1.1875rem;
}

.card p {
  color: var(--muted);
  font-size: 1rem;
}

.card > .btn-link,
.card-body > .btn-link {
  margin-top: auto;
  padding-top: 20px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-number {
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Card with an image on top */
.card-media {
  padding: 0;
  overflow: hidden;
}

.card-media > img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card-media > .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px 32px 32px;
}

/* ---------- Split (text + image) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 80px;
}

.split-reverse > .media {
  order: -1;
}

.split + .split {
  margin-top: 112px;
}

.media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
}

.media-tall {
  aspect-ratio: 4 / 5;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .split-reverse > .media {
    order: 0;
  }

  .split + .split {
    margin-top: 72px;
  }

  .media-tall {
    aspect-ratio: 4 / 3;
  }

  /* Keep stacked copy to a readable measure. */
  .split:not(.contact-split) > :not(.media) {
    max-width: 680px;
  }
}

@media (min-width: 681px) and (max-width: 900px) {
  .media,
  .media-tall {
    aspect-ratio: 16 / 9;
  }
}

/* ---------- Lists ---------- */

.check-list {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 34px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232442e6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.check-list.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px;
}

@media (max-width: 680px) {
  .check-list.two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tags / pills */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
}

a.pill {
  min-height: 44px;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

a.pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 32px 32px 0 0;
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.steps h3 {
  margin-bottom: 10px;
  font-size: 1.1875rem;
}

.steps p {
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }
}

@media (max-width: 680px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps li {
    padding-right: 0;
  }
}

/* ---------- Feature rows (label + text, divided) ---------- */

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

.feature-rows > li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 16px 48px;
  padding-block: 36px;
  border-bottom: 1px solid var(--line);
}

.feature-rows h3 {
  font-size: 1.375rem;
}

.feature-rows p {
  color: var(--muted);
}

@media (max-width: 760px) {
  .feature-rows > li {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.faq {
  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: 24px;
  padding: 24px 0;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details > div {
  max-width: 720px;
  padding-bottom: 24px;
  color: var(--muted);
}

/* ---------- CTA band ---------- */

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 64px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: rgb(255 255 255 / 0.72);
}

.cta-band h2 {
  max-width: 22ch;
  color: #fff;
}

.cta-band p {
  max-width: 520px;
  margin-top: 16px;
}

/* The accent focus ring is too faint on the dark band. */
.cta-band :focus-visible {
  outline-color: #fff;
}

@media (max-width: 680px) {
  .cta-band {
    padding: 40px 28px;
  }
}

/* ---------- Contact / info ---------- */

.info-list {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.info-list > div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 8px 24px;
  align-items: baseline;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.info-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 560px) {
  .info-list > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Forms ---------- */

.form {
  display: grid;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #858b98;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Controls stay disabled until the company email is confirmed (contact.mjs). */
.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background-color: var(--surface);
  border-color: var(--line-strong);
  color: var(--muted);
  cursor: not-allowed;
}

.form-note,
.card .form-note {
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- Legal pages ---------- */

.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  font-size: 0.9375rem;
  line-height: 1.35;
}

.legal-toc p {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-toc ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-toc .legal-toc-sub {
  margin-top: 32px;
}

@media (min-width: 961px) {
  .legal-toc {
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

.legal-toc a {
  color: var(--muted);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--ink);
}

/* Collapsed "On this page" bar that replaces the sidebar on smaller screens. */
.legal-toc-mobile {
  display: none;
}

@media (max-width: 960px) {
  .legal {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .legal-toc {
    display: none;
  }

  .legal-toc-mobile {
    display: block;
    max-width: 760px; /* same measure as .prose */
    border-radius: var(--radius);
    background: var(--surface);
  }

  .legal-toc-mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 14px 20px;
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
  }

  .legal-toc-mobile summary::-webkit-details-marker {
    display: none;
  }

  .legal-toc-mobile summary::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
  }

  .legal-toc-mobile[open] summary::after {
    content: "\2212";
  }

  .legal-toc-mobile ol {
    margin: 0;
    padding: 0 20px 8px;
    list-style: none;
  }

  .legal-toc-mobile a {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-top: 1px solid var(--line);
    color: var(--text);
    font-size: 0.9375rem;
    text-decoration: none;
  }

  .legal-toc-mobile a:hover {
    color: var(--ink);
  }
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.prose {
  max-width: 760px;
  color: var(--text);
}

.prose h2 {
  margin: 56px 0 16px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 32px 0 12px;
  font-size: 1.125rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li + li {
  margin-top: 8px;
}

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

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

.prose table {
  width: 100%;
  margin: 8px 0 24px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--ink);
  font-weight: 600;
}

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

/* Short row labels stay on one line; the stacking tables have sentence-length row headers, so they wrap. */
@media (min-width: 681px) {
  .prose tbody th {
    min-width: 10em;
  }

  .prose table:not(.rtable) tbody th {
    white-space: nowrap;
  }
}

/* Tables that stack into labelled blocks on small screens: give each <td> a data-label. */
@media (max-width: 600px) {
  .rtable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .rtable,
  .rtable tbody,
  .rtable tr,
  .rtable th,
  .rtable td {
    display: block;
  }

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

  .rtable tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .prose .rtable th,
  .prose .rtable td {
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .rtable td {
    margin-top: 10px;
  }

  .rtable td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 600;
  }
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
}

/* ---------- Pending company detail ---------- */

.pending {
  padding: 1px 6px;
  border: 1px dashed #d9a400;
  border-radius: 6px;
  background: #fff8db;
  color: #7a5b00;
  font-size: 0.92em;
  font-weight: 500;
  white-space: nowrap;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding-block: 72px 56px;
}

.footer-brand p {
  max-width: 300px;
  margin-top: 16px;
  color: var(--muted);
}

.footer-title {
  margin-bottom: 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links,
.footer-contact {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.footer-contact li {
  text-wrap: balance;
}

.footer-links a,
.footer-contact a {
  color: var(--text);
  text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 24px 32px;
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px no-repeat;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 700px) and (max-width: 960px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .footer-links {
    gap: 0;
  }

  .footer-links a,
  .footer-contact a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 24px;
  }

  .footer-brand,
  .footer-grid > :last-child {
    grid-column: 1 / -1;
  }
}

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

@media (max-width: 760px) {
  :root {
    --gutter: 20px;
    --header-h: 64px;
  }

  .section {
    padding-block: 72px;
  }

  .section-tight {
    padding-block: 48px;
  }

  .section-head,
  .section-head-row {
    margin-bottom: 40px;
  }

  .hero {
    padding-top: 56px;
    padding-bottom: 48px;
  }

  .hero + .section:not(.section-alt) {
    padding-top: 24px;
  }

  .hero-media {
    margin-top: 48px;
    aspect-ratio: 4 / 3;
  }

  .page-hero {
    padding-block: 56px 48px;
  }

  .page-hero-media {
    margin-top: 40px;
    aspect-ratio: 4 / 3;
  }

  .card {
    padding: 26px;
  }

}

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

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