/* Page styling for the public site.
   Loaded after base.css, on every page.

   Every colour here comes from a variable defined in base.css, which is
   where the contrast checking happens. The only literal colours are the
   translucent glows and contour lines, which carry no text and sit behind
   nothing that has to be read through them, and the four risk levels, which
   are the phone app's own and are checked in check-contrast.mjs.

   The look is the Take 5 Live website's, taken from its site.css: a night
   band across the top of every page, the colour of site lighting before a
   shift, with faint contour lines like a mine plan. Amber is the only
   accent. Headlines are condensed capitals, like a site sign. What is
   different is only what JSA Live needs: the ticks in the headline, the
   card that walks through a JSA, the risk matrix, and the integration
   lists. */

.wrap--site { max-width: calc(var(--site) + 40px); }

/* The header carries one call to action. On a phone it sits beside the name
   and the links take a scrolling row of their own, rather than the whole
   navigation wrapping into a block. */
.headCta { margin-left: 8px; }
@media (max-width: 640px) {
  .siteHeader:has(.headCta) .wrap { padding-top: 8px; padding-bottom: 2px; gap: 2px 8px; }
  .headCta { order: 2; margin-left: 0; }
  .siteHeader:has(.headCta) .nav { order: 3; width: calc(100% + 16px); flex-wrap: nowrap; overflow-x: auto; margin: 0 -8px; }
  .siteHeader:has(.headCta) .nav a:not(.btn) { white-space: nowrap; padding: 9px 10px; }
}

/* ---------------------------------------------------------------- *
 * Night bands: the home page's opening, every other page's head, and the
 * closing call to action
 * ---------------------------------------------------------------- */

.onNight { background: var(--night); color: var(--night-ink); }
.onNight .fine, .onNight .lede { color: var(--night-muted); }
.onNight a:not(.btn) { color: var(--amber); }

/* Contour lines, drawn with gradients so they cost no request. They drift
   very slowly, which is the only ambient motion on the site. */
.contours { position: relative; overflow: hidden; isolation: isolate; }
.contours::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -2;
  background:
    repeating-radial-gradient(circle at 72% 34%, transparent 0 27px, rgba(245, 163, 0, .085) 28px 29px),
    repeating-radial-gradient(circle at 10% 118%, transparent 0 35px, rgba(255, 255, 255, .045) 36px 37px);
}
@media (prefers-reduced-motion: no-preference) {
  .contours::before { animation: drift 46s linear infinite alternate; }
}
@keyframes drift { to { transform: translate3d(-3%, 2%, 0) rotate(2deg); } }

/* A short label above a heading, for scanning. Not a heading itself, so it
   is not marked up as one. */
.eyebrow {
  display: block;
  font-family: var(--display);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: .5em;
}
.onNight .eyebrow { color: var(--amber); }

/* The pill above the home and page headlines. The dot pulses, gently. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .9rem;
  color: var(--night-muted);
  border: 1px solid var(--night-hair);
  border-radius: 999px;
  padding: 5px 14px 5px 11px;
  margin: 0 0 22px;
}
.kicker::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex: 0 0 auto;
}
@media (prefers-reduced-motion: no-preference) {
  .kicker::before { animation: pulse 2.4s ease-out infinite; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 163, 0, .6); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(245, 163, 0, 0); }
}

/* The one sentence under a headline. Larger than body text because it is
   doing the actual explaining and most visitors read only this far.
   text-wrap: pretty stops it ending on one word alone; a browser without it
   wraps as usual. */
.lede { font-size: 1.18rem; color: var(--muted); max-width: 34em; margin: 0 0 1.6em; text-wrap: pretty; }

/* ---------------------------------------------------------------- *
 * The home page's opening
 * ---------------------------------------------------------------- */

.hero { padding: 72px 0 128px; }
.heroGrid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .heroGrid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; }
}
.hero h1 { font-size: clamp(2.9rem, 1.6rem + 4.6vw, 5.6rem); margin: 0 0 24px; }
.hero .lede { font-size: 1.2rem; margin-bottom: 30px; }

/* "same JSA" in amber, followed by three ticks that land one after another,
   the way signatures arrive on the author's phone. They are the app icon's
   own three ticks. With motion reduced all three are simply there. */
.hl { color: var(--amber); white-space: nowrap; }
.ticks { display: inline-flex; align-items: center; gap: .1em; margin-left: .2em; height: .62em; vertical-align: .04em; }
.ticks i {
  display: block; width: .3em; height: .16em;
  border-left: .075em solid var(--amber); border-bottom: .075em solid var(--amber);
  border-radius: 0 0 0 .02em;
  transform: translateY(-.06em) rotate(-45deg);
}
@media (prefers-reduced-motion: no-preference) {
  .ticks i:nth-child(1) { animation: tick1 6s infinite; }
  .ticks i:nth-child(2) { animation: tick2 6s infinite; }
  .ticks i:nth-child(3) { animation: tick3 6s infinite; }
}
@keyframes tick1 { 0%, 12% { opacity: .16; } 16%, 88% { opacity: 1; } 94%, 100% { opacity: .16; } }
@keyframes tick2 { 0%, 30% { opacity: .16; } 34%, 88% { opacity: 1; } 94%, 100% { opacity: .16; } }
@keyframes tick3 { 0%, 48% { opacity: .16; } 52%, 88% { opacity: 1; } 94%, 100% { opacity: .16; } }

.heroPoints { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; font-size: .98rem; }
.heroPoints li { position: relative; padding-left: 30px; margin: 0; }
/* A tick drawn in CSS rather than loaded as an image, so it costs no
   request and inherits the theme. */
.heroPoints li::before {
  content: "";
  position: absolute;
  left: 3px; top: .42em;
  width: 13px; height: 7px;
  border-left: 2.5px solid var(--amber);
  border-bottom: 2.5px solid var(--amber);
  transform: rotate(-45deg);
}

/* ---- the phone, and what happens to the JSA on it ----
   The screenshot is a real capture of the app. The notices beside it walk
   through one JSA from sharing to close-out, one after another, and are all
   simply shown when motion is reduced. They are decoration for something
   the page also says in words, so they are hidden from screen readers. */
.device { position: relative; justify-self: center; width: min(300px, 82%); perspective: 1500px; }
@media (min-width: 960px) { .device { justify-self: end; } }
.device::before {
  content: "";
  position: absolute;
  inset: 6% -30% -6%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(245, 163, 0, .26), transparent 72%);
}
.handset {
  border-radius: 46px;
  padding: 11px;
  background: linear-gradient(150deg, #323a44, #0b0e11 60%);
  box-shadow: inset 0 0 0 1px #3d4652, 0 44px 90px rgba(0, 0, 0, .6);
  transform: rotateY(-13deg) rotateX(5deg) rotateZ(1.5deg);
}
.handset img { display: block; width: 100%; height: auto; border-radius: 36px; background: #14181d; }
@media (prefers-reduced-motion: no-preference) {
  .handset { animation: handsetIn 1.3s var(--ease) both, float 8s ease-in-out 1.3s infinite; }
}
@keyframes handsetIn { from { opacity: 0; transform: translateY(40px) rotateY(-24deg) rotateX(8deg); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.feed { position: absolute; left: -205px; top: 16%; width: 232px; display: grid; gap: 11px; z-index: 3; }
.toast {
  display: flex; gap: 12px; align-items: center;
  background: rgba(24, 29, 36, .92);
  border: 1px solid #303944;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .5);
  color: var(--night-ink);
  font-size: .9rem;
  line-height: 1.25;
}
.toast b { display: block; }
.toast span { display: block; font-size: .78rem; color: var(--night-muted); margin-top: 2px; }
.toast i {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center; background: var(--night-3); color: var(--amber);
}
.toast i.go { color: #4ecb84; }
.toast svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .toast { opacity: 0; }
  .toast:nth-child(1) { animation: toast1 13s var(--ease) infinite; }
  .toast:nth-child(2) { animation: toast2 13s var(--ease) infinite; }
  .toast:nth-child(3) { animation: toast3 13s var(--ease) infinite; }
  .toast:nth-child(4) { animation: toast4 13s var(--ease) infinite; }
  .toast:nth-child(5) { animation: toast5 13s var(--ease) infinite; }
}
@keyframes toast1 { 0%, 3% { opacity: 0; transform: translateY(12px); } 7%, 84% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes toast2 { 0%, 13% { opacity: 0; transform: translateY(12px); } 17%, 84% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes toast3 { 0%, 23% { opacity: 0; transform: translateY(12px); } 27%, 84% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes toast4 { 0%, 33% { opacity: 0; transform: translateY(12px); } 37%, 84% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes toast5 { 0%, 50% { opacity: 0; transform: translateY(12px); } 54%, 84% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 959px) {
  .feed { left: -120px; }
}
@media (max-width: 640px) {
  .hero { padding: 40px 0 100px; }
  .hero .lede { font-size: 1.06rem; }
  .heroGrid .btnRow .btn { flex: 1 1 auto; }
  .device { width: min(250px, 74%); justify-self: end; margin-right: 4%; }
  .feed { left: -34%; top: auto; bottom: 8%; width: 200px; gap: 8px; }
  .toast { padding: 8px 11px; }
  .toast i { width: 28px; height: 28px; }
}

/* ---------------------------------------------------------------- *
 * The fact strip, lifted over the bottom edge of the opening band
 * ---------------------------------------------------------------- */

.facts { position: relative; z-index: 2; margin-top: -60px; }
.factsGrid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none; padding: 0; margin: 0;
  background: var(--raised); border: 1px solid var(--hair);
  border-radius: 18px; box-shadow: var(--shadow-lift); overflow: hidden;
}
.factsGrid li { margin: 0; padding: 22px 24px; border-left: 1px solid var(--hair); }
.factsGrid li:nth-child(odd) { border-left: 0; }
.factsGrid li:nth-child(n+3) { border-top: 1px solid var(--hair); }
@media (min-width: 900px) {
  .factsGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .factsGrid li:nth-child(odd) { border-left: 1px solid var(--hair); }
  .factsGrid li:first-child { border-left: 0; }
  .factsGrid li:nth-child(n+3) { border-top: 0; }
}
.factsGrid b {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(2.4rem, 2rem + 1.4vw, 3.3rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.factsGrid b.amber { color: var(--amber-text); }
.factsGrid span { display: block; color: var(--muted); font-size: .95rem; margin-top: 6px; line-height: 1.4; }

/* ---------------------------------------------------------------- *
 * Sections
 * ---------------------------------------------------------------- */

.section--big { padding: 96px 0; }
@media (max-width: 640px) { .section--big { padding: 64px 0; } }

.sectionHead { max-width: 46em; margin-bottom: 40px; }
.sectionHead h2 { margin-top: 0; }
.sectionHead p { color: var(--muted); margin-bottom: 0; font-size: 1.08rem; text-wrap: pretty; }
h2.title { font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3.4rem); margin: 0 0 16px; }
.sectionHead h2.title { font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.6rem); }

/* ---- a route: four stops joined by a dashed line, with an amber dot
   travelling along it. The home page uses it for what happens with no
   signal, and the integrations page for what happens to a delivery. ---- */
.routeWrap { position: relative; }
.route { display: grid; gap: 28px; list-style: none; padding: 0; margin: 0; }
.routeWrap::before {
  content: "";
  position: absolute;
  left: 28px; top: 30px; bottom: 30px; width: 3px;
  background: repeating-linear-gradient(180deg, var(--line) 0 10px, transparent 10px 18px);
}
.route li { position: relative; margin: 0; padding-left: 80px; min-height: 58px; }
.routeNode {
  position: absolute; top: 0; left: 0; z-index: 2;
  width: 58px; height: 58px; border-radius: 16px;
  background: var(--raised); border: 1px solid var(--hair); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--ink);
}
.routeNode svg { width: 28px; height: 28px; }
.route .tag {
  display: inline-block; font-family: var(--display); font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; font-size: .82rem; padding: 2px 9px; border-radius: 6px;
  background: var(--amber-soft); color: var(--amber-text); margin-bottom: 10px;
}
.route h3 { font-size: 1.14rem; margin: 0 0 .5em; }
.route p { margin: 0; color: var(--muted); font-size: .97rem; }
.runner {
  position: absolute; top: 22px; left: 22px; z-index: 1;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 7px rgba(245, 163, 0, .22);
}
@media (prefers-reduced-motion: no-preference) {
  .runner { animation: runDown 8s cubic-bezier(.45, .05, .55, .95) infinite; }
}
@keyframes runDown { 0% { top: 22px; } 88%, 100% { top: calc(100% - 37px); } }
@media (min-width: 860px) {
  .route { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
  .routeWrap::before {
    left: 29px; right: 29px; top: 28px; bottom: auto; width: auto; height: 3px;
    background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 18px);
  }
  .route li { padding: 82px 0 0; }
  @media (prefers-reduced-motion: no-preference) {
    .runner { animation-name: runAcross; }
  }
}
@keyframes runAcross { 0% { left: 22px; } 88%, 100% { left: calc(100% - 37px); } }

/* ---- how a JSA runs ----
   Six stages as tabs. It moves to the next stage on its own, timed by the
   amber line filling under the current one, and stops while the pointer or
   focus is on it. With motion reduced it waits to be pressed. Without the
   script there are no tabs at all, just the six stages one after another.
   The same card as the Take 5 on the Take 5 Live site. */
.runCard { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .runCard { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; } }
.runTabs { display: none; gap: 6px; }
.js .runTabs { display: grid; }
.runTab {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 18px; width: 100%;
  text-align: left; background: none; border: 1px solid transparent; border-radius: 16px;
  padding: 8px 18px; font: inherit; color: var(--muted); cursor: pointer;
  transition: background-color .25s, color .25s, box-shadow .25s, transform .25s var(--ease);
}
.runTab:hover { color: var(--ink); transform: translateX(4px); }
.runTab .n {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  background: var(--raised); border: 1px solid var(--hair); color: var(--muted);
  transition: background-color .25s, color .25s, border-color .25s;
}
.runTab .w { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 2.3rem; line-height: 1; }
.runTab[aria-selected="true"] { color: var(--ink); background: var(--raised); border-color: var(--hair); box-shadow: var(--shadow); }
.runTab[aria-selected="true"] .n { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.runTab .fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--amber); }
@media (prefers-reduced-motion: no-preference) {
  /* .live is added when the card scrolls into view, so a visitor who reaches
     it a minute after the page loaded still starts at Write. */
  .runCard.live .runTab[aria-selected="true"] .fill { animation: fillLine 5.5s linear forwards; }
  .runTabs:hover .fill, .runTabs:focus-within .fill { animation-play-state: paused; }
}
@keyframes fillLine { to { width: 100%; } }

.runPanels {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 24px; padding: 38px 38px 34px;
  box-shadow: var(--shadow-lift);
}
.runPanels::after {
  content: ""; position: absolute; right: -60px; top: -60px; z-index: -1;
  width: 260px; height: 260px;
  background: repeating-radial-gradient(circle, transparent 0 16px, rgba(245, 163, 0, .1) 17px 18px);
}
.runPanel + .runPanel { margin-top: 28px; }
.js .runPanel + .runPanel { margin-top: 0; }
.js .runPanel[hidden] { display: none; }
.js .runPanels { min-height: 300px; }
@media (prefers-reduced-motion: no-preference) {
  .js .runPanel { animation: swapIn .45s var(--ease); }
}
@keyframes swapIn { from { opacity: 0; transform: translateY(14px); } }
.runPanel h3 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 3.4rem; line-height: .9; color: var(--amber); margin: 0 0 14px;
}
.runPanel p { color: var(--night-muted); font-size: 1.08rem; max-width: 30em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.chips li {
  margin: 0; border: 1px solid var(--night-hair); border-radius: 999px;
  padding: 6px 13px; font-size: .86rem; color: var(--night-ink); background: var(--night-2);
}
.chips .go { border-color: #2f6d4a; color: #7fe0a6; }
@media (max-width: 640px) {
  .runTab { gap: 12px; padding: 6px 12px; }
  .runTab .w { font-size: 1.7rem; }
  .runTab .n { width: 32px; height: 32px; font-size: 1rem; }
  .runPanels { padding: 28px 24px; }
  .runPanel h3 { font-size: 2.6rem; }
}

/* ---- feature cards ---- */
.feature { display: block; text-decoration: none; color: inherit; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.feature h3 { margin: 0 0 .45em; font-size: 1.14rem; }
.feature p { color: var(--muted); font-size: .97rem; }
.feature p:last-child { margin-bottom: 0; }
.feature .more { font-weight: 700; font-size: .9rem; color: var(--link); }
a.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--line); }
.ico {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px;
  background: var(--amber-soft); color: var(--amber-text); margin-bottom: 18px;
  transition: transform .35s var(--ease);
}
.ico svg { width: 26px; height: 26px; }
.feature:hover .ico { transform: rotate(-7deg) scale(1.08); }

/* ---- who it is for, beside the app in a browser frame ---- */
.roles { display: grid; gap: 44px; align-items: center; }
@media (min-width: 960px) { .roles { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 60px; } }
.roleList { display: grid; gap: 26px; list-style: none; padding: 0; margin: 0; }
.roleList li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; margin: 0; }
.roleIcon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--night); color: var(--amber); }
.roleIcon svg { width: 24px; height: 24px; }
.roleList h3 { font-size: 1.12rem; margin: 2px 0 .3em; }
.roleList p { margin: 0; color: var(--muted); }

.browser {
  margin: 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--hair); background: var(--raised); box-shadow: var(--shadow-lift);
}
.browserBar { display: flex; gap: 7px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--hair); background: var(--panel); }
.browserBar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.browserBar span {
  margin-left: 10px; font-size: .78rem; color: var(--muted);
  background: var(--raised); border: 1px solid var(--hair); border-radius: 6px; padding: 2px 10px;
}
.browser img { display: block; width: 100%; height: 440px; object-fit: cover; object-position: top; }
@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .browser { transform: perspective(1700px) rotateY(-9deg) rotateX(3deg); transition: transform .7s var(--ease); }
  .browser:hover { transform: perspective(1700px); }
}
@media (max-width: 640px) { .browser img { height: 300px; } }

/* ---------------------------------------------------------------- *
 * Inner page heads
 * ---------------------------------------------------------------- */

.pageHead { padding: 60px 0 64px; }
.pageHead h1 { font-size: clamp(2.6rem, 1.7rem + 3.4vw, 4.8rem); margin: 0 0 16px; }
.pageHead .lede { margin-bottom: 0; }
.pageHead--lift { padding-bottom: 124px; }
.pageHead--small h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); }
@media (max-width: 640px) {
  .pageHead { padding: 40px 0 46px; }
  .pageHead--lift { padding-bottom: 96px; }
}
/* A long text page under a page head starts closer to it. */
.pageHead + .wrap { padding-top: 40px; }

/* ---------------------------------------------------------------- *
 * Phone screenshots and wide screenshots, on the features page
 * ---------------------------------------------------------------- */

.phone { margin: 0; max-width: 300px; justify-self: center; }
.phone img {
  display: block; width: 100%;
  border-radius: 26px; border: 8px solid #11161b;
  box-shadow: var(--shadow-lift); background: #14181d;
  transition: transform .5s var(--ease);
}
.phone:hover img { transform: translateY(-6px); }
.phone figcaption { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 12px; }

.shotRow { display: grid; gap: 34px; align-items: center; }
/* A grid item is never narrower than its content unless told otherwise, and
   the risk matrix's table is 560px wide: on a phone it widened the single
   column, and the text in it ran off the screen. Its box scrolls instead. */
.shotRow > * { min-width: 0; }
@media (min-width: 760px) { .shotRow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; } }
.shotRow h2 { margin-top: 0; }

/* ---------------------------------------------------------------- *
 * The risk matrix, on the features page
 *
 * The phone app's own default matrix, in the app's own colours, so what a
 * visitor sees here is what a crew sees on a JSA. One change: High carries
 * dark text here, because the app's white on that orange is 3.1 to 1 and
 * this text is small. A real table, because it is one: a screen reader can
 * say which likelihood and consequence a cell belongs to. Wider than a
 * phone, so it scrolls inside its own box.
 * ---------------------------------------------------------------- */

/* The caption sits outside the scrolling box, above it: inside, it would be
   as wide as the table and its end would scroll off a phone screen. */
.matrixWrap { margin: 0; }
.matrixWrap figcaption { font-weight: 700; margin-bottom: .6em; }
.matrixWrap .tableWrap { margin-bottom: 0; }
.matrix { min-width: 560px; border-collapse: separate; border-spacing: 4px; font-size: .9rem; }
.matrix th, .matrix td { border: 0; padding: 10px 8px; text-align: center; }
.matrix thead th { font-size: .82rem; color: var(--muted); font-weight: 700; vertical-align: bottom; }
.matrix tbody th { text-align: right; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.matrix td { border-radius: 8px; font-weight: 700; }
.matrix .corner { text-align: left; }
.lvLow { background: #2e7d32; color: #ffffff; }
.lvModerate { background: #f9a825; color: #1f1600; }
.lvHigh { background: #ef6c00; color: #1f1600; }
.lvExtreme { background: #c62828; color: #ffffff; }

/* ---------------------------------------------------------------- *
 * Short definition lists: team settings, delivery rules
 * ---------------------------------------------------------------- */

.defs { display: grid; gap: 0; margin: 0 0 1.2em; border-top: 1px solid var(--hair); }
.defs > div { display: grid; gap: 4px 24px; padding: 16px 2px; border-bottom: 1px solid var(--hair); }
@media (min-width: 760px) { .defs > div { grid-template-columns: minmax(0, 15em) minmax(0, 1fr); } }
.defs dt { font-weight: 700; }
.defs dd { margin: 0; color: var(--muted); }
.defs dd > :last-child { margin-bottom: 0; }

/* Enterprise-style call-out: a conversation rather than a list, so a night
   card. */
.nightCard {
  display: grid; gap: 22px 40px; align-items: center;
  border-radius: 24px; padding: 42px;
}
@media (min-width: 860px) { .nightCard { grid-template-columns: minmax(0, 1.3fr) auto; } }
.nightCard h2 { margin: 0 0 12px; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); }
.nightCard p { color: var(--night-muted); max-width: 40em; }
.nightCard p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .nightCard { padding: 30px 24px; } }

/* A heading that opens a card carries the spacing meant for one that opens a
   SECTION. A first child has nothing to be spaced away from. */
.card > :first-child { margin-top: 0; }

/* ---------------------------------------------------------------- *
 * Frequently asked questions
 * ---------------------------------------------------------------- */

.faq { border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); padding: 4px 0; }
.faq summary {
  cursor: pointer; font-weight: 700; padding: 16px 4px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--muted); flex: 0 0 auto; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: -2px; }
.faq .answer { padding: 0 4px 18px; }
.faq .answer > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- *
 * The closing call to action, with a moving hazard stripe on its top edge
 * ---------------------------------------------------------------- */

.cta { position: relative; padding: 100px 0 104px; text-align: center; }
/* After plain page content rather than a section, which brings its own
   padding, the band needs the space put in front of it. */
.wrap + .cta { margin-top: 80px; }
.cta::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 18px, var(--night) 18px 36px);
  background-size: 50.9px 14px;
}
@media (prefers-reduced-motion: no-preference) {
  .cta::after { animation: stripes 1.8s linear infinite; }
}
@keyframes stripes { to { background-position: 50.9px 0; } }
.cta h2 { margin: 0 0 14px; font-size: clamp(2.4rem, 1.6rem + 2.6vw, 4rem); }
.cta p { color: var(--night-muted); max-width: 36em; margin: 0 auto 28px; font-size: 1.1rem; }
.cta .btnRow { justify-content: center; }
@media (max-width: 640px) { .cta { padding: 72px 0 76px; } }

/* ---------------------------------------------------------------- *
 * Numbered steps: how early access works, and the support guides
 * ---------------------------------------------------------------- */

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 64px; margin-bottom: 28px; }
.steps > li::before {
  content: counter(s);
  position: absolute; left: 0; top: -4px;
  width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--raised); border: 1px solid var(--hair); box-shadow: var(--shadow);
  font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--ink);
}
.steps > li:first-child::before { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 46px; bottom: -22px; width: 2px; background: var(--hair);
}
.steps h3 { margin: 0 0 .5em; font-size: 1.05rem; }
.steps > li > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- *
 * A card lifted over the page head, beside what it is about: the contact
 * and early access pages
 * ---------------------------------------------------------------- */

/* The card comes first in the markup, so a phone shows it straight under the
   page head and a screen reader reaches it first. On a wide screen it moves
   to the right-hand column, beside what it is for. */
.splitGrid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) {
  .splitGrid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 56px; }
  .splitGrid > .liftCard { grid-column: 2; grid-row: 1; }
  .splitGrid > :not(.liftCard) { grid-column: 1; grid-row: 1; padding-top: 40px; }
}

.liftCard {
  position: relative; z-index: 2;
  background: var(--raised); border: 1px solid var(--hair); border-radius: 22px;
  padding: 30px; box-shadow: var(--shadow-lift); max-width: 640px;
}
.liftCard h2 { margin: 0 0 6px; font-size: 2.2rem; }
.splitGrid > :not(.liftCard) > h2:first-child { margin: 0 0 18px; font-size: 2.2rem; }
@media (min-width: 960px) { .liftCard--lift { margin-top: -96px; } }
@media (max-width: 959px) { .liftCard--lift { margin-top: -64px; } }
@media (max-width: 640px) { .liftCard { padding: 24px 20px; } }

/* The addresses on the contact card: one per line, each with what it is for. */
.mailList { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--hair); }
.mailList li { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.mailList b { display: block; }
.mailList a { font-weight: 600; overflow-wrap: anywhere; }
.mailList span { display: block; color: var(--muted); font-size: .92rem; margin-top: 2px; }
.liftCard .btn--wide { width: 100%; margin-top: 22px; }
