/* Visbers homepage styles
   Plain CSS, no build step. Sections follow the order of index.html. */

/* ---------- Tokens ---------- */
:root {
  --white: #ffffff;
  --mist: #f4f7fb;
  --ink: #18283f;
  --slate: #526176;
  --blue: #2454d6;
  --blue-dark: #1b42ad;
  --rule: #d9e2ee;
  --field: #7f8ea3;      /* form control borders, 3.3:1 on white */
  --skeleton: #dbe3ef;   /* placeholder value bars in diagrams */
  --line: #2454d6;       /* diagram connectors */
  --muted-data: #a7b3c4; /* secondary series in illustrations */
  --error: #b42318;      /* form errors, 6.6:1 on white */

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --max: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(52px, 1.5rem + 6.5vw, 104px);
  --header-h: 72px;
  --radius-control: 8px;
  --radius-panel: 16px;
  --radius-node: 10px;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }

/* The hidden attribute must win over component display rules */
[hidden] { display: none !important; }
ul, ol { padding: 0; }
ul[role="list"] { list-style: none; }
svg { display: block; }

a { color: var(--blue); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

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

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

/* ---------- Type ---------- */
.h1 {
  font-size: clamp(2.375rem, 1.35rem + 3.9vw, 4.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2rem, 1.4rem + 1.9vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.h3 {
  font-size: clamp(1.1875rem, 1.05rem + 0.45vw, 1.375rem);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

.lead {
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
}

.section-intro {
  color: var(--slate);
  max-width: 36rem;
}

/* ---------- Buttons and links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--blue);
  color: var(--white);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--blue-dark); }

.button--small {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 0.9375rem;
}

.button:disabled,
.button:disabled:hover {
  background: #c9d3e6;
  color: #34445c;
  cursor: not-allowed;
}

.text-link {
  font-weight: 650;
  font-size: 1rem;
  padding-block: 12px;
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color 0.15s ease; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--rule);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
  }
}

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

.wordmark {
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-decoration: none;
}

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

.nav-list {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-list a {
  display: block;
  padding-block: 8px;
  color: var(--ink);
  font-size: 0.96875rem;
  font-weight: 550;
  text-decoration: none;
}
.nav-list a:hover { color: var(--blue); }
.nav-list a[aria-current="page"] {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.nav-toggle { display: none; }

@media (max-width: 979.98px) {
  /* With JavaScript: a toggled panel under the header */
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--field);
    border-radius: var(--radius-control);
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 650;
    cursor: pointer;
  }

  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
  }
  .nav-toggle-icon { position: relative; }
  .nav-toggle-icon::before,
  .nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-icon::before { top: -5px; }
  .nav-toggle-icon::after { top: 5px; }

  .site-header.is-open .nav-toggle-icon { background: transparent; }
  .site-header.is-open .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
  .site-header.is-open .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 16px 32px -16px rgba(24, 40, 63, 0.22);
  }
  .js .site-header.is-open .site-nav { display: flex; }

  .js .nav-list { flex-direction: column; gap: 0; }
  .js .nav-list a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 1.0625rem;
  }
  .js .nav-cta { margin-top: 20px; min-height: 48px; }

  /* Without JavaScript: links wrap under the wordmark */
  .no-js .site-header { position: static; }
  .no-js .header-inner { flex-wrap: wrap; padding-block: 14px; gap: 10px 24px; }
  .no-js .site-nav { flex-wrap: wrap; gap: 12px 24px; }
  .no-js .nav-list { flex-wrap: wrap; gap: 4px 20px; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }

.section--mist { background: var(--mist); }

.section--ruled { padding-top: 0; }
.section--ruled > .container {
  border-top: 1px solid var(--rule);
  padding-top: var(--section);
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(36px, 1rem + 5vw, 96px) var(--section); }

.hero-grid {
  display: grid;
  gap: 48px;
}

/* The headline is sized to its column so each line of
   "Connect the systems / behind your business." fits whole. */
.hero-copy { container-type: inline-size; }
.hero .h1 {
  font-size: clamp(2.375rem, 1.35rem + 3.9vw, 4.25rem);
  font-size: clamp(2.375rem, 10cqi, 4.25rem);
}

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

.hero-sub {
  margin-top: 16px;
  max-width: 36em;
  color: var(--slate);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}
.hero-actions { margin-top: 36px; }

/* Providers page headline is longer, so it is set a step smaller */
.hero--page .h1 {
  font-size: clamp(2.375rem, 1.6rem + 2.6vw, 3.75rem);
  font-size: clamp(2.375rem, 8.4cqi, 3.75rem);
}

@media (min-width: 600px) {
  .h1 .line { display: block; }
}

@media (max-width: 959.98px) {
  .hero-visual { max-width: 560px; }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 57fr) minmax(0, 43fr);
    align-items: center;
    gap: clamp(40px, 4vw, 56px);
  }
}

/* ---------- Diagram language (shared) ---------- */
.diagram {
  background: var(--mist);
  border: 1px solid #e4eaf3;
  border-radius: var(--radius-panel);
  padding: clamp(18px, 2.6vw, 30px);
}

.diagram-label {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 3px 11px;
  background: var(--white);
  border: 1px dashed #98a6ba;
  border-radius: 999px;
  color: var(--slate);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.5;
}

.diagram-label--data {
  border-style: solid;
  border-color: var(--ink);
  color: var(--ink);
}

.node {
  position: relative;
  min-width: 0;
  padding: 12px 14px 13px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-node);
  box-shadow: 0 1px 2px rgba(24, 40, 63, 0.05);
  font-size: 0.875rem;
  line-height: 1.4;
}

.node--hub {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 84, 214, 0.1);
}

.node-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.node-title svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.node-text {
  margin-top: 4px;
  color: var(--slate);
  font-size: 0.8125rem;
}

.fields {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.fields > div {
  display: grid;
  grid-template-columns: 4.6em minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.fields dt {
  color: var(--slate);
  font-size: 0.8125rem;
}

.fields dd {
  min-width: 0;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 650;
}

.bar {
  display: block;
  width: var(--w, 70%);
  height: 8px;
  background: var(--skeleton);
  border-radius: 4px;
}

.link { position: relative; }

.link-label {
  position: absolute;
  color: var(--slate);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

/* Vertical link with arrowhead, centred */
.link--v { height: 46px; }
.link--v::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 6px;
  width: 2px;
  margin-left: -1px;
  background: var(--line);
}
.link--v::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--line);
}
.link--v .link-label {
  top: 50%;
  left: calc(50% + 14px);
  transform: translateY(-50%);
}

/* ---------- Hero workflow ---------- */
.wf { --gap: 14px; }

.link--fork { height: 42px; }
.link--fork::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  height: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--line);
}
.link--fork::after {
  content: "";
  position: absolute;
  top: calc(50% - 2px);
  bottom: 7px;
  left: calc((100% - var(--gap)) / 4 - 1px);
  right: calc((100% - var(--gap)) / 4 - 1px);
  border: 2px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.branches {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
}

.branches .node::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--line);
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  gap: 40px;
}

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

.service-list {
  display: grid;
  gap: 0 48px;
}

.service {
  padding-block: 26px 30px;
  border-top: 1px solid var(--rule);
}
.service p {
  margin-top: 10px;
  color: var(--slate);
}

@media (min-width: 720px) {
  .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .services-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 64px;
  }
}

/* ---------- Selected work ---------- */
.work-head { max-width: 46rem; }
.work-head .section-intro { margin-top: 20px; }
.project {
  display: grid;
  gap: 28px;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
}
.project + .project { margin-top: 0; }
.project:not(:last-of-type) { padding-bottom: 48px; }

.project-title {
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.project-text > p {
  margin-top: 14px;
  max-width: 34rem;
}

.project-meta {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  max-width: 34rem;
}
.project-meta > div {
  padding-left: 16px;
  border-left: 2px solid var(--blue);
}
.project-meta dt {
  color: var(--slate);
  font-size: 0.875rem;
  font-weight: 650;
}
.project-meta dd {
  margin-top: 2px;
  font-size: 1rem;
}

.project-visual {
  container: visual / inline-size;
}

.also-work {
  margin-top: 48px;
  padding-top: 32px;
  padding-right: max(0px, 100% - 46rem);
  border-top: 1px solid var(--rule);
  color: var(--slate);
}

@media (min-width: 1024px) {
  .project {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
    align-items: start;
    padding-top: 64px;
  }
  .project:not(:last-of-type) { padding-bottom: 64px; }
  .project-text { padding-top: 8px; }
}

/* Event registration: calendar -> listing -> registration, which then
   branches to the CRM record and the confirmation email.
   Narrow first: a centred vertical chain ending in a fork. */
.chain {
  --gap: 14px;
  display: grid;
}
.chain > .node,
.chain-fork,
.chain-branches {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
}

.chain-link { height: 40px; }
.chain-link::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 6px;
  width: 2px;
  margin-left: -1px;
  background: var(--line);
}
.chain-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--line);
}
.chain-link .link-label {
  top: calc(50% - 3px);
  left: calc(50% + 14px);
  transform: translateY(-50%);
}

.chain-fork { height: 42px; }
.chain-fork::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  height: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--line);
}
.chain-fork::after {
  content: "";
  position: absolute;
  top: calc(50% - 2px);
  bottom: 7px;
  left: calc((100% - var(--gap)) / 4 - 1px);
  right: calc((100% - var(--gap)) / 4 - 1px);
  border: 2px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.chain-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.chain-branches .node::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--line);
}

.chain .fields > div { grid-template-columns: 3.4em minmax(0, 1fr); }

/* Wide: the top row runs left to right; the registration page sits in
   the right column and branches down to both outputs. */
@container visual (min-width: 600px) {
  .chain {
    --gap: 58px;
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr) 58px minmax(0, 1fr);
    grid-template-rows: auto 52px auto;
    align-items: center;
  }
  .chain > .node,
  .chain-fork { max-width: none; }
  .chain-branches { display: contents; }

  .chain-cal { grid-area: 1 / 1; }
  .chain-link--a { grid-area: 1 / 2; }
  .chain-listing { grid-area: 1 / 3; }
  .chain-link--b { grid-area: 1 / 4; }
  .chain-reg { grid-area: 1 / 5; align-self: stretch; }
  .chain-fork { grid-area: 2 / 3 / 3 / 6; height: auto; align-self: stretch; }
  .chain-email { grid-area: 3 / 3; align-self: start; }
  .chain-rec { grid-area: 3 / 5; align-self: start; }

  /* Horizontal links with right-pointing arrows */
  .chain-link { height: auto; align-self: stretch; }
  .chain-link::before {
    left: 0;
    right: 6px;
    top: calc(50% - 1px);
    bottom: auto;
    width: auto;
    height: 2px;
    margin-left: 0;
  }
  .chain-link::after {
    left: auto;
    right: 0;
    top: 50%;
    bottom: auto;
    margin: -5px 0 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid var(--line);
    border-right: 0;
  }
  .chain-link .link-label {
    left: 50%;
    top: calc(50% - 7px);
    transform: translate(-50%, -100%);
  }

  /* Straight down from the registration page to the CRM record... */
  .chain-fork::before {
    left: auto;
    right: calc((100% - var(--gap)) / 4 - 1px);
    top: 0;
    bottom: 7px;
    height: auto;
    margin-left: 0;
  }
  /* ...and a branch across to the confirmation email */
  .chain-fork::after {
    top: calc(50% - 1px);
    border-right: 0;
    border-radius: 10px 0 0 0;
  }
}

/* Email examples: two separate panels, deliberately unconnected */
.visual-pair {
  display: grid;
  gap: 16px;
}

.seq { display: grid; }
.seq > .node {
  width: 100%;
  max-width: 20rem;
  margin-inline: auto;
}
.seq .link--v { height: 42px; }

.report-head,
.report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 10px;
}
.report-head {
  margin-top: 12px;
  padding-bottom: 6px;
  color: var(--slate);
  font-size: 0.75rem;
  font-weight: 650;
}
.report-row {
  padding-block: 9px;
  border-top: 1px solid #e8edf4;
  font-size: 0.8125rem;
}
.state { color: var(--slate); }
.state--on {
  color: var(--ink);
  font-weight: 650;
}
.state--on::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: 1px;
}

@container visual (min-width: 540px) {
  .visual-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Dashboard layout */
.dash {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-node);
}

.dash-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8edf4;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 650;
}
.chip::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1.5px solid var(--slate);
  border-bottom: 1.5px solid var(--slate);
  transform: rotate(45deg);
}

.dash-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  background: var(--mist);
  border-radius: 8px;
}
.tile-label {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.25;
}
.spark {
  width: 100%;
  height: 28px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.spark polyline { vector-effect: non-scaling-stroke; }
.spark--muted { stroke: var(--muted-data); }

.dash-main {
  display: grid;
  gap: 10px;
}
.panel {
  padding: 12px;
  border: 1px solid #e8edf4;
  border-radius: 8px;
}
.panel-title {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 650;
}

.chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 96px;
  margin-top: 12px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--rule);
}
.chart-group {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
  flex: 1;
  justify-content: center;
}
.col {
  width: min(12px, 40%);
  height: var(--h);
  background: var(--blue);
  border-radius: 3px 3px 0 0;
}
.col--muted { background: var(--muted-data); }

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 10px;
  color: var(--slate);
  font-size: 0.75rem;
}
.key {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--blue);
}
.key--muted { margin-left: 10px; background: var(--muted-data); }

.pipes {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  list-style: none;
}
.pipes li {
  display: grid;
  grid-template-columns: 5.6em minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--slate);
  font-size: 0.75rem;
  font-weight: 650;
}
.pipe {
  display: block;
  height: 10px;
  background: var(--mist);
  border-radius: 5px;
  overflow: hidden;
}
.pipe > span {
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--blue);
  border-radius: 5px;
}

@container visual (min-width: 560px) {
  .dash-main { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

/* Phones: diagrams keep their labels and connections but drop
   placeholder fields (.detail), icons and sparklines. */
@media (max-width: 599.98px) {
  .diagram .detail,
  .diagram .node-title svg { display: none; }
  .tile { padding: 9px 10px; }
  .tile-label { font-size: 0.75rem; }
}

/* ---------- School-program providers ---------- */
.schools-grid {
  display: grid;
  gap: 40px;
}

.schools-copy > p {
  margin-top: 20px;
  max-width: 34rem;
  color: var(--slate);
}
.schools-copy .actions { margin-top: 32px; }

.rail-list {
  position: relative;
  display: grid;
  gap: 28px;
  padding-left: 34px;
}

.rail-list li { position: relative; }
.rail-list li p {
  margin-top: 4px;
  color: var(--slate);
}

/* port on the rail */
.rail-list li::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: 50%;
}
/* rail between ports */
.rail-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: -28px;
  top: 18px;
  bottom: -32px;
  width: 2px;
  background: var(--line);
}

@media (min-width: 960px) {
  .schools-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 72px;
    align-items: center;
  }
}

/* ---------- Process ---------- */
.steps {
  --step-gap: 48px;
  display: grid;
  gap: 32px;
  margin-top: 44px;
  list-style: none;
}

.step {
  position: relative;
  padding-left: 60px;
}
.step p {
  margin-top: 8px;
  color: var(--slate);
  max-width: 24rem;
}

.step-num {
  position: absolute;
  left: 0;
  top: -6px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  font-size: 1rem;
  font-weight: 700;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -30px;
  width: 2px;
  background: var(--rule);
}

/* Three steps go horizontal from 860px; four steps wait until 1100px */
@media (min-width: 860px) {
  .steps:not(.steps--four) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--step-gap);
  }
  .steps:not(.steps--four) > .step { padding-left: 0; padding-top: 60px; }
  .steps:not(.steps--four) .step-num { top: 0; }
  .steps:not(.steps--four) > .step:not(:last-child)::after {
    left: 52px;
    right: calc(-1 * var(--step-gap) + 12px);
    top: 19px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

@media (min-width: 1100px) {
  .steps--four {
    --step-gap: 36px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--step-gap);
  }
  .steps--four > .step { padding-left: 0; padding-top: 60px; }
  .steps--four .step-num { top: 0; }
  .steps--four > .step:not(:last-child)::after {
    left: 52px;
    right: calc(-1 * var(--step-gap) + 12px);
    top: 19px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

/* Providers page: the pilot steps sit on the mist band, where the
   rule colour is too faint, so the connector uses a light blue. */
.section--mist .step:not(:last-child)::after { background: #b7c6e6; }
.section--mist .step-num { background: var(--mist); }

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

.question {
  display: grid;
  gap: 16px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 36px;
  border-top: 1px solid var(--rule);
}
.question-title {
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.question p {
  max-width: 38rem;
  color: var(--slate);
}

@media (min-width: 960px) {
  .question {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
  }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 24px;
}
.about-body { max-width: 40rem; }

/* Providers page: relevant experience */
.experience-body { max-width: 40rem; }
.experience-list { margin-top: 28px; }
.experience-list li {
  padding-block: 18px 20px;
  border-top: 1px solid var(--rule);
}
.experience-list p {
  margin-top: 6px;
  color: var(--slate);
}
.experience-note {
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--blue);
  color: var(--slate);
  font-size: 1rem;
}
.experience-link { margin-top: 12px; }
.about-body p + p {
  margin-top: 18px;
  color: var(--slate);
}

@media (min-width: 960px) {
  .about-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
  }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 36px;
}
.contact-copy > p {
  margin-top: 20px;
  max-width: 30rem;
  color: var(--slate);
}

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

.field-row {
  display: grid;
  gap: 20px;
}

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

.field label {
  font-size: 0.9375rem;
  font-weight: 650;
}
.optional { color: var(--slate); font-weight: 500; }

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  background: var(--white);
  border: 1px solid var(--field);
  border-radius: var(--radius-control);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.5; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.hint {
  color: var(--slate);
  font-size: 0.875rem;
}

.inquiry .button { justify-self: start; }

/* While sending: keep the button blue so it reads as busy, not unavailable */
.inquiry[aria-busy="true"] .button:disabled {
  background: var(--blue);
  color: var(--white);
  opacity: 0.75;
  cursor: progress;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); }

.field-error {
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Sending, sent and error messages. Always rendered so screen readers
   announce changes; only styled once it has text. */
.form-status {
  font-size: 0.9375rem;
  line-height: 1.5;
}
.form-status:empty { margin-top: -20px; } /* cancel the form's grid gap */
.form-status:not(:empty) {
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--slate);
  border-radius: var(--radius-control);
}
.form-status--success:not(:empty) { border-left-color: var(--blue); }
.form-status--error:not(:empty) {
  border-left-color: var(--error);
  color: var(--error);
  font-weight: 600;
}
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Spam trap: off-screen for everyone */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.inquiry { position: relative; }

@media (min-width: 640px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 72px;
    align-items: start;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 48px 32px;
  border-top: 1px solid var(--rule);
}

.footer-inner {
  display: grid;
  gap: 28px;
}
.footer-brand p {
  margin-top: 8px;
  color: var(--slate);
  font-size: 0.9375rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}
.footer-nav a {
  display: inline-block;
  padding-block: 6px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--blue); text-decoration: underline; }

.footer-base {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--slate);
  font-size: 0.875rem;
}

@media (min-width: 860px) {
  .footer-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: start;
  }
}

/* ---------- Forced colours (Windows high contrast) ---------- */
@media (forced-colors: active) {
  .link--v::before,
  .link--fork::before,
  .chain-link::before,
  .chain-fork::before,
  .rail-list li::after,
  .step:not(:last-child)::after,
  .state--on::before,
  .col,
  .key,
  .pipe > span,
  .bar { background: CanvasText; forced-color-adjust: none; }
  .diagram-label,
  .node { border: 1px solid CanvasText; }
}
