/*
 * Omni public site: the sheet every page shares.
 *
 * Tokens, the document ground, the mark, controls, the header and footer, the policy pages, the 404
 * and print. The landing page adds home.css. The material is the workspace's own: the warm neutral
 * ramp and teal seed from apps/web/src/styles/tokens.css, the compass mark drawn inline from the
 * logo's geometry, and Plus Jakarta Sans served from this origin. Light and dark follow the system
 * through light-dark(), with a light fallback for engines that lack it. Motion lives in home.css and
 * only runs once motion.js has added `.motion`; without it every page is complete and still.
 *
 * The URLs of this file and of home.css / motion.js carry a content hash (`?v=`) and are cached for
 * a year. Run `node check.mjs --write` from apps/omni-public after changing them.
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------------------------------------
 * Tokens
 * --------------------------------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* Surfaces: the workspace's warm neutral ramp. Dark sits one step further apart than the app's so
     a pane still reads as a pane on a marketing page's larger fields of colour. */
  --bg: light-dark(#fcf9f5, #131210);
  --surface: light-dark(#ffffff, #1b1a17);
  --surface-2: light-dark(#f7f4ef, #22201d);
  --surface-3: light-dark(#f2efe9, #2a2724);
  --surface-4: light-dark(#ede9e3, #35322e);
  --line: light-dark(#e8e4dd, #2f2c28);
  --line-strong: light-dark(#cfc9be, #4c4841);

  /* Ink. --ink-2 is on-surface-variant (8.6:1 light, 11:1 dark); --ink-3 still clears 5:1. */
  --ink: light-dark(#1b1a17, #f1ede6);
  --ink-2: light-dark(#4c4841, #cfc9be);
  --ink-3: light-dark(#6b665e, #a8a196);

  /* Brand teal, from the seed #2F6F6B. */
  --primary: light-dark(#006a66, #78d6d0);
  --on-primary: light-dark(#ffffff, #003735);
  --primary-hover: light-dark(#00504c, #94f3ec);
  --secondary-container: light-dark(#c4eae6, #2b4c4a);
  --on-secondary-container: light-dark(#00201e, #c4eae6);

  /* Status roles, as in the workspace: waiting on you, and went through. */
  --warning: light-dark(#835500, #feb958);
  --warning-container: light-dark(#ffddb6, #633f00);
  --on-warning-container: light-dark(#271900, #ffddb6);
  --success: light-dark(#246b3a, #8fd79e);
  --success-container: light-dark(#abf3b9, #015224);
  --on-success-container: light-dark(#002107, #abf3b9);
  --on-success: light-dark(#ffffff, #003916);

  /* Icon accents, one per node of the mark: 3:1 on their own tint, for icons only. Small text in an
     accent colour uses the -text variant, which clears 4.5:1. */
  --accent-teal: light-dark(#006a66, #78d6d0);
  --accent-blue: light-dark(#2a6fc9, #8cc4ff);
  --accent-blue-text: light-dark(#1f5fae, #8cc4ff);
  --accent-orange: light-dark(#b0470f, #ffab73);
  --accent-sky: light-dark(#1b6f94, #8fd3f5);

  /* The mark's own colours. Navy by day, the page's ink by night; the nodes never change. */
  --mark-ink: light-dark(#142138, #e8e4dd);
  --mark-core: light-dark(#0c6669, #168a86);
  --mark-blue: #329ff0;
  --mark-sky: #59bbe9;
  --mark-orange: #f87c11;

  /* The dark band. By night it is tinted with the mark's teal rather than inverted, so the page
     keeps one tonal break in dark as well as in light. */
  --band-bg: light-dark(#171513, color-mix(in srgb, #168a86 12%, #131210));
  --band-ink: #f4f1ec;
  --band-ink-2: #c3bdb3;
  --band-line: rgb(244 241 236 / 12%);
  --band-accent: #78d6d0;

  /* A passing highlight: bright on paper, barely there at night. */
  --shimmer: light-dark(rgb(255 255 255 / 75%), rgb(255 255 255 / 9%));

  /* Type: 72 / 56 / 24 / 20 / 16 / 14 / 12. */
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-display: clamp(2.25rem, 1.2rem + 4.6vw, 4.5rem);
  --text-h2: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  --text-h3: 1.5rem;
  --text-lede: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);

  /* Layout */
  --page: 1200px;
  --gutter: clamp(20px, 4.5vw, 40px);
  --header-height: 64px;
  --section-space: clamp(88px, 11vw, 152px);

  /* Shape */
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-xl: 32px;

  /* Motion: four durations, three curves. Enter decelerates, exit accelerates. */
  --dur-1: 180ms;
  --dur-2: 320ms;
  --dur-3: 600ms;
  --dur-4: 900ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
}

/* Engines without light-dark() (Safari before 17.5) get the light theme rather than no colour. */
@supports not (color: light-dark(#000, #fff)) {
  :root {
    color-scheme: light;
    --bg: #fcf9f5;
    --surface: #ffffff;
    --surface-2: #f7f4ef;
    --surface-3: #f2efe9;
    --surface-4: #ede9e3;
    --line: #e8e4dd;
    --line-strong: #cfc9be;
    --ink: #1b1a17;
    --ink-2: #4c4841;
    --ink-3: #6b665e;
    --primary: #006a66;
    --on-primary: #ffffff;
    --primary-hover: #00504c;
    --secondary-container: #c4eae6;
    --on-secondary-container: #00201e;
    --warning: #835500;
    --warning-container: #ffddb6;
    --on-warning-container: #271900;
    --success: #246b3a;
    --success-container: #abf3b9;
    --on-success-container: #002107;
    --on-success: #ffffff;
    --accent-teal: #006a66;
    --accent-blue: #2a6fc9;
    --accent-blue-text: #1f5fae;
    --accent-orange: #b0470f;
    --accent-sky: #1b6f94;
    --mark-ink: #142138;
    --mark-core: #0c6669;
    --band-bg: #171513;
    --shimmer: rgb(255 255 255 / 75%);
  }
}

/* Asked for more contrast: hairlines become real borders, and the quietest ink steps up. */
@media (prefers-contrast: more) {
  :root {
    --line: light-dark(#8a8378, #6d675e);
    --line-strong: light-dark(#6b665e, #a8a196);
    --ink-3: var(--ink-2);
  }
}

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

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ol,
ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 700;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

::selection {
  background: color-mix(in srgb, var(--primary) 24%, transparent);
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: none;
}

/* Plus Jakarta's full stop and comma carry a wide left bearing that reads as a gap at display size. */
.stop {
  margin-left: -0.05em;
}

/* ------------------------------------------------------------------------------------------------
 * The mark
 * --------------------------------------------------------------------------------------------- */

.mark {
  display: block;
  flex: none;
  overflow: visible;
}

.mark-ring,
.mark-circuit,
.mark-hub {
  fill: none;
  stroke: var(--mark-ink);
}

.mark-ring {
  stroke-width: 7.5;
}

.mark-circuit {
  stroke-width: 2.7;
}

.mark-hub {
  stroke-width: 2.9;
}

.mark-needles {
  fill: var(--mark-ink);
  transform-box: view-box;
  transform-origin: 50% 50%;
}

.mark-core,
.mark-node-w {
  fill: var(--mark-core);
}

.mark-node-ne {
  fill: var(--mark-blue);
}

.mark-node-e {
  fill: var(--mark-sky);
}

.mark-node-sw {
  fill: var(--mark-orange);
}

.mark-node,
.mark-core {
  transform-box: fill-box;
  transform-origin: center;
}

/* Below 24px the circuit turns to noise: keep the ring, the needles and the core, a little heavier. */
.mark-small :is(.mark-circuit, .mark-hub, .mark-node) {
  display: none;
}

.mark-small .mark-ring {
  stroke-width: 10;
}

.mark-small .mark-core {
  r: 12;
}

/* ------------------------------------------------------------------------------------------------
 * Controls
 * --------------------------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    background-color var(--dur-1) var(--ease),
    border-color var(--dur-1) var(--ease),
    color var(--dur-1) var(--ease),
    scale var(--dur-1) var(--ease);
}

.button .icon {
  font-size: 1.05em;
  transition: translate var(--dur-2) var(--ease-out);
}

.button:active {
  scale: 0.98;
}

.button-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
}

/* The header's sign-in: present, never louder than the page. */
.button-quiet {
  border-color: var(--line-strong);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.button-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.875rem;
}

@media (hover: hover) {
  .button-primary:hover {
    background: var(--primary-hover);
  }

  :is(.button-secondary, .button-quiet):hover {
    background: var(--surface-3);
    border-color: var(--ink-3);
  }

  .button:hover .icon {
    translate: 2px 0;
  }

  .button[href^="#"]:hover .icon {
    translate: 0 2px;
  }

  p a:hover {
    text-decoration-thickness: 2px;
  }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.9375rem;
  font-weight: 600;
}

.link-arrow .icon {
  transition: translate var(--dur-2) var(--ease-out);
}

@media (hover: hover) {
  .link-arrow:hover .icon {
    translate: 3px 0;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 600;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mark-core);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mark-core) 18%, transparent);
}

/* Section labels: small, tracked capitals, so they never read as links. */
.eyebrow {
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
}

/* Clear over the top of the page, then the frosted bar once it moves. No script. */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-settle linear both;
    animation-timeline: scroll(root);
    animation-range: 0 120px;
  }

  @keyframes header-settle {
    from {
      border-bottom-color: transparent;
      background-color: transparent;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
  }
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--page), 100% - 2 * var(--gutter));
  height: var(--header-height);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand .mark {
  width: 28px;
  height: 28px;
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  transition:
    color var(--dur-1) var(--ease),
    background-color var(--dur-1) var(--ease);
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline 2px;
  text-underline-offset: 6px;
}

@media (hover: hover) {
  .nav-link:hover {
    color: var(--ink);
    background: color-mix(in srgb, var(--ink) 6%, transparent);
  }
}

.site-nav .button {
  margin-left: 10px;
}

/* Below 720px the links fold into a disclosure menu that works without script. */
.site-menu {
  position: relative;
  display: none;
}

.site-menu summary {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.25rem;
  cursor: pointer;
  list-style: none;
}

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

.site-menu[open] summary {
  background: var(--surface-3);
}

.site-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  box-shadow: 0 16px 40px -12px rgb(0 0 0 / 22%);
}

.site-menu-link {
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
}

.site-menu-link[aria-current="page"] {
  background: var(--surface-3);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 56px;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand p {
  max-width: 24rem;
  line-height: 1.6;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-col h2 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col a {
  transition: color var(--dur-1) var(--ease);
}

.footer-col a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

@media (hover: hover) {
  .footer-col a:hover {
    color: var(--ink);
  }
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-block: 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.footer-base a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (hover: hover) {
  .footer-base a:hover {
    color: var(--ink);
  }
}

/* ------------------------------------------------------------------------------------------------
 * Policy pages
 * --------------------------------------------------------------------------------------------- */

.doc-hero {
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: clamp(36px, 5vw, 52px);
  border-bottom: 1px solid var(--line);
}

.doc-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.doc-tabs a {
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    color var(--dur-1) var(--ease),
    background-color var(--dur-1) var(--ease);
}

.doc-tabs a[aria-current="page"] {
  background: var(--ink);
  color: var(--bg);
}

@media (hover: hover) {
  .doc-tabs a:not([aria-current]):hover {
    color: var(--ink);
    background: var(--surface-3);
  }
}

.doc-hero h1 {
  max-width: 18ch;
  margin-top: 32px;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.doc-summary {
  max-width: 40rem;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: var(--text-lede);
  line-height: 1.55;
  text-wrap: balance;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 28px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.doc-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.doc-meta .icon {
  color: var(--ink-3);
}

.doc-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  max-width: 44rem;
  margin-top: 32px;
  padding: 18px 20px 18px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
}

/* More than one action in a callout stays together as one group. */
.doc-callout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 38rem);
  gap: clamp(48px, 9vw, 128px);
  padding-block: clamp(48px, 6vw, 80px);
}

.toc {
  position: sticky;
  top: calc(var(--header-height) + 32px);
  align-self: start;
}

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

.toc ol {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line);
}

.toc a {
  display: flex;
  gap: 10px;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 1px solid transparent;
  color: var(--ink-2);
  font-size: 0.875rem;
  transition:
    color var(--dur-1) var(--ease),
    border-color var(--dur-1) var(--ease);
}

.toc .clause-no {
  color: var(--ink-3);
}

@media (hover: hover) {
  .toc a:hover {
    border-left-color: var(--ink);
    color: var(--ink);
  }
}

.clause-no {
  font-variant-numeric: tabular-nums;
}

.doc-body section {
  padding-bottom: 40px;
}

.doc-body section + section {
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.doc-body h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.022em;
}

.doc-body h2 .clause-no {
  color: var(--primary);
  font-size: 0.9375rem;
  letter-spacing: 0;
}

.doc-body p {
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.doc-body p + p {
  margin-top: 16px;
}

.doc-body section:target h2 {
  color: var(--primary);
}

.related {
  padding-bottom: var(--section-space);
}

.related h2 {
  margin-bottom: 20px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

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

.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  transition:
    border-color var(--dur-1) var(--ease),
    background-color var(--dur-1) var(--ease);
}

.related-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.related-card span {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.related-card .icon {
  color: var(--ink-2);
  font-size: 1.25rem;
  transition: translate var(--dur-2) var(--ease-out);
}

@media (hover: hover) {
  .related-card:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
  }

  .related-card:hover .icon {
    translate: 4px 0;
    color: var(--ink);
  }
}

/* ------------------------------------------------------------------------------------------------
 * Not found
 * --------------------------------------------------------------------------------------------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-height) - 180px);
  min-height: calc(100dvh - var(--header-height) - 180px);
  padding-block: 88px;
  text-align: center;
}

.not-found .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.not-found .mark {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
}

.not-found h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.not-found p {
  max-width: 30rem;
  color: var(--ink-2);
  font-size: var(--text-lede);
  text-wrap: balance;
}

.not-found .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.not-found-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: 0.9375rem;
}

.not-found .not-found-links a,
.not-found .not-found-note a {
  color: var(--primary);
  font-weight: 600;
}

.not-found .not-found-note {
  font-size: 0.875rem;
}

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

@media (max-width: 1024px) {
  .doc-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 48px;
  }
}

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

  .toc {
    position: static;
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
  }

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

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

@media (max-width: 720px) {
  .nav-link {
    display: none;
  }

  .site-menu {
    display: block;
  }

  .site-nav .button {
    margin-left: 0;
  }

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

@media (max-width: 360px) {
  .doc-tabs a {
    padding-inline: 12px;
  }
}

@media (forced-colors: active) {
  :is(.button, .chip, .related-card, .doc-tabs, .site-menu-panel) {
    border: 1px solid CanvasText;
  }

  .doc-tabs a[aria-current="page"] {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
}

/* ------------------------------------------------------------------------------------------------
 * Print: the words, on paper, in the light theme.
 * --------------------------------------------------------------------------------------------- */

@media print {
  :root {
    color-scheme: light;
  }

  .site-header,
  .skip-link,
  .doc-tabs,
  .toc,
  .related,
  .doc-callout,
  .footer-grid,
  .not-found .actions {
    display: none !important;
  }

  body {
    background: none;
  }

  .doc-layout {
    display: block;
    padding-block: 24px;
  }

  .doc-body section {
    break-inside: avoid;
  }

  .footer-base {
    margin-top: 24px;
  }
}
