/*
 * karez.io — the public site (US-977). Hand-written, no build step: the file
 * here is the file served. Tokens follow DESIGN.md ("The Sovereign Ledger") and
 * karez-ui/src/app.css, so the site and the portal read as one product.
 *
 * DESIGN.md rules this file keeps: sections are separated by a change of
 * surface, never by a line; Manrope speaks, Inter works; radius stays at sm/md;
 * the primary action is the black-to-navy gradient; floating chrome is frosted
 * glass. The one liberty is the deep-sea hero: primary_container taken as a
 * full surface, with the ledger grid drawn in light on it.
 *
 * The Worker's Content-Security-Policy allows no inline style and no script, so
 * everything visual is a class in this file.
 */

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --surface: #f7f9fb;
  --surface-low: #eef1f5;
  --surface-lowest: #ffffff;
  --surface-high: #e3e8ee;
  --on-surface: #1f2228;
  --on-surface-variant: #45464d;
  --primary: #000000;
  --primary-container: #111c2d;
  --on-primary: #ffffff;
  --secondary: #515f74;

  /* The deep-sea surface and what sits on it. */
  --deep: #0a111d;
  --deep-raised: #16233a;
  --on-deep: #f3f6fa;
  --on-deep-variant: #a9b4c4;
  --on-deep-faint: #6f7d92;
  --glint: #8fb4ff;

  --success: #0b7a52;
  --success-container: #dff3ea;
  --success-bright: #4ade9a;
  --warning: #8a5a00;
  --warning-container: #fbecc8;
  --error: #9b2c1f;
  --error-container: #f9dedb;

  --ghost: rgb(81 95 116 / 0.15);
  --shadow-lift: 0 2px 16px 0 rgb(84 95 115 / 0.05);
  --shadow-float: 0 24px 64px -12px rgb(3 8 18 / 0.55);
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --font-display: "Manrope Variable", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --measure: 72rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--deep);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--primary);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}

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

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip {
  position: absolute;
  left: -100rem;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--surface-lowest);
  color: var(--primary);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
}

/* ---------------------------------------------------------------- header -- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(10 17 29 / 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  color: var(--on-deep);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
  color: var(--on-deep);
  text-decoration: none;
}

.brand svg {
  width: 1.85rem;
  height: 1.85rem;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9rem;
  color: var(--on-deep-variant);
}

.masthead nav a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] {
  color: var(--on-deep);
}

.masthead nav .section-link {
  display: none;
}

@media (min-width: 48rem) {
  .masthead nav .section-link {
    display: inline;
  }
}

/* --------------------------------------------------------------- buttons -- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button .arrow {
  transition: transform 0.15s ease;
}

.button:hover .arrow {
  transform: translateX(3px);
}

/* On a light surface: the etched black-to-navy gradient DESIGN.md asks for. */
.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  box-shadow: 0 6px 20px -8px rgb(17 28 45 / 0.6);
}

.button.secondary {
  background: var(--surface-high);
  color: var(--primary);
}

.button.secondary:hover {
  background: #d8dee6;
}

/* On the deep surface the hierarchy inverts: light is the action. */
.button.light {
  background: var(--on-deep);
  color: var(--deep);
  box-shadow: 0 8px 28px -10px rgb(143 180 255 / 0.55);
}

.button.light:hover {
  background: #ffffff;
}

.button.glass {
  background: rgb(255 255 255 / 0.08);
  color: var(--on-deep);
}

.button.glass:hover {
  background: rgb(255 255 255 / 0.14);
}

.button.small {
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
}

.masthead nav a.button.light,
.masthead nav a.button.light:hover {
  color: var(--deep);
}

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

.hero {
  position: relative;
  overflow: hidden;
  margin-top: -4.25rem;
  padding: 10rem 0 6.5rem;
  background:
    radial-gradient(60rem 34rem at 82% 8%, rgb(64 110 200 / 0.28), transparent 62%),
    radial-gradient(40rem 26rem at 8% 96%, rgb(26 122 102 / 0.2), transparent 60%),
    linear-gradient(180deg, var(--deep), #0d1626 70%, var(--primary-container));
  color: var(--on-deep);
}

/* The ledger: ruled lines, fading out towards the edges. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 4rem 4rem;
  -webkit-mask-image: radial-gradient(70% 70% at 60% 30%, #000 20%, transparent 78%);
  mask-image: radial-gradient(70% 70% at 60% 30%, #000 20%, transparent 78%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 62rem) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 3.5rem;
  }
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.07);
  color: var(--on-deep-variant);
  letter-spacing: 0.12em;
}

.hero .eyebrow::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: var(--glint);
}

.hero h1 {
  margin-top: 1.5rem;
  color: var(--on-deep);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #ffffff 10%, var(--glint) 55%, #7fe0c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  margin-top: 1.75rem;
  max-width: 34rem;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--on-deep-variant);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.hero .aside {
  margin-top: 1.6rem;
  max-width: 34rem;
  font-size: 0.9rem;
  color: var(--on-deep-faint);
}

.hero .aside a {
  color: var(--on-deep-variant);
  text-underline-offset: 3px;
}

.hero .aside a:hover {
  color: var(--on-deep);
}

/* The hero's picture: one document's delivery, as the portal tells it. */
.receipt {
  position: relative;
  padding: 1.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(160deg, rgb(255 255 255 / 0.11), rgb(255 255 255 / 0.035));
  box-shadow:
    var(--shadow-float),
    inset 0 1px 0 rgb(255 255 255 / 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.receipt-head .kind {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-deep-faint);
}

.receipt-head .number {
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--on-deep);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  background: rgb(74 222 154 / 0.14);
  color: var(--success-bright);
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background: currentColor;
}

.parties {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgb(4 9 18 / 0.35);
}

.parties .label {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-deep-faint);
}

.parties .id {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--on-deep);
  overflow-wrap: anywhere;
}

.parties .to {
  text-align: right;
}

.parties svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--glint);
}

.timeline {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 1rem;
  padding: 0 0 1.25rem 1.9rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.35rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 9999px;
  background: var(--success-bright);
  box-shadow: 0 0 0 4px rgb(74 222 154 / 0.14);
}

.timeline li::after {
  content: "";
  position: absolute;
  left: 0.46rem;
  top: 1.2rem;
  bottom: 0.1rem;
  width: 1px;
  background: linear-gradient(rgb(74 222 154 / 0.5), rgb(74 222 154 / 0.08));
}

.timeline li:last-child::after {
  display: none;
}

.timeline .step {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--on-deep);
}

.timeline .at {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--on-deep-faint);
}

.timeline .what {
  grid-column: 1 / -1;
  font-size: 0.86rem;
  color: var(--on-deep-variant);
}

.receipt-foot {
  margin-top: 1.5rem;
  font-size: 0.72rem;
  color: var(--on-deep-faint);
}

/* ----------------------------------------------------------------- facts -- */

.facts-band {
  background: var(--primary-container);
  color: var(--on-deep);
}

.facts {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 2.75rem 0;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.facts div {
  margin: 0;
}

.facts dt {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-deep-faint);
}

.facts dd {
  margin: 0.45rem 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 620;
  letter-spacing: -0.018em;
  color: var(--on-deep);
}

.facts dd small {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--on-deep-variant);
}

/* -------------------------------------------------------------- sections -- */

.band {
  padding: 6.5rem 0;
  /* The masthead is sticky: without this an in-page link lands under it. */
  scroll-margin-top: 3rem;
}

.band.low {
  background: var(--surface-low);
}

.band.tight {
  padding: 4.5rem 0;
}

.band > .wrap > header {
  max-width: 42rem;
}

.band > .wrap > header h2 {
  margin-top: 0.9rem;
}

.band > .wrap > header p:not(.eyebrow) {
  margin-top: 1.1rem;
  font-size: 1.08rem;
  color: var(--on-surface-variant);
}

.grid {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

/* Six cards read as two rows of three, not four and a remainder. */
@media (min-width: 62rem) {
  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface-lowest);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  padding: 1.75rem;
}

.band:not(.low) .card {
  background: var(--surface-low);
  box-shadow: none;
}

.card h3 + p,
.card .label + .value {
  margin-top: 0.55rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--on-surface-variant);
}

.card p + p {
  margin-top: 0.6rem;
}

.card .icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: #ffffff;
}

.card .icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
}

.value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 620;
  letter-spacing: -0.018em;
  color: var(--primary);
  overflow-wrap: anywhere;
}

a.card {
  display: block;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

a.card:hover {
  transform: translateY(-2px);
  background: var(--surface-lowest);
  box-shadow: 0 10px 32px -8px rgb(84 95 115 / 0.22);
}

.text-link {
  color: var(--primary);
  font-weight: 560;
  text-decoration: underline;
  text-decoration-color: var(--ghost);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}

.text-link:hover {
  text-decoration-color: var(--primary);
}

/* ----------------------------------------------------------- how it works -- */

.split {
  display: grid;
  gap: 3rem;
  margin-top: 3.5rem;
  align-items: start;
}

@media (min-width: 62rem) {
  .split {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 4rem;
  }
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 2.25rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0 1rem;
}

.steps li::before {
  content: "0" counter(step);
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--surface-high);
  -webkit-text-stroke: 1px var(--secondary);
}

.steps p {
  margin-top: 0.4rem;
  color: var(--on-surface-variant);
}

.terminal {
  border-radius: 0.6rem;
  background: var(--deep);
  color: var(--on-deep);
  box-shadow: 0 24px 60px -20px rgb(10 17 29 / 0.55);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  background: var(--deep-raised);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--on-deep-faint);
}

.terminal-bar .dots {
  display: inline-flex;
  gap: 0.35rem;
}

.terminal-bar .dots i {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.16);
}

.terminal pre {
  margin: 0;
  padding: 1.35rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--on-deep-variant);
}

.terminal pre + pre {
  background: rgb(4 9 18 / 0.45);
}

.terminal .k {
  color: var(--glint);
}

.terminal .s {
  color: #9be3c8;
}

.terminal .c {
  color: var(--on-deep-faint);
}

.terminal .w {
  color: var(--on-deep);
}

/* ------------------------------------------------------- support / terms -- */

.terms {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
}

.terms li {
  display: grid;
  gap: 0.25rem 2rem;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.terms li:nth-child(odd) {
  background: var(--surface-low);
}

.band.low .terms li:nth-child(odd) {
  background: var(--surface-lowest);
}

.terms .term {
  font-weight: 620;
  color: var(--primary);
}

.terms .detail {
  color: var(--on-surface-variant);
}

@media (min-width: 46rem) {
  .terms li {
    grid-template-columns: 17rem 1fr;
  }
}

.prose {
  margin-top: 2rem;
  max-width: 44rem;
  color: var(--on-surface-variant);
}

.prose ul {
  margin: 0;
  padding-left: 1.1rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

/* The link from the home page to the status page. It states no status of its
   own: one place to edit during an incident, not two. */
.status-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 2rem 2.25rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-deep);
  text-decoration: none;
  box-shadow: 0 24px 60px -24px rgb(10 17 29 / 0.6);
  transition: transform 0.15s ease;
}

.status-link:hover {
  transform: translateY(-2px);
}

.status-link h2 {
  color: var(--on-deep);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.status-link p {
  margin-top: 0.5rem;
  color: var(--on-deep-variant);
}

.status-link .go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 560;
  white-space: nowrap;
}

.status-link .arrow {
  transition: transform 0.15s ease;
}

.status-link:hover .arrow {
  transform: translateX(4px);
}

/* ------------------------------------------------------------ closing cta -- */

.closing {
  position: relative;
  overflow: hidden;
  padding: 6.5rem 0;
  background:
    radial-gradient(48rem 26rem at 50% 120%, rgb(64 110 200 / 0.32), transparent 65%),
    linear-gradient(180deg, var(--primary-container), var(--deep));
  color: var(--on-deep);
  text-align: center;
}

.closing h2 {
  color: var(--on-deep);
  max-width: 18ch;
  margin: 0 auto;
}

.closing p {
  margin: 1.25rem auto 0;
  max-width: 34rem;
  font-size: 1.08rem;
  color: var(--on-deep-variant);
}

.closing .actions {
  justify-content: center;
}

/* ----------------------------------------------------------- status page -- */

.page-head {
  position: relative;
  overflow: hidden;
  margin-top: -4.25rem;
  padding: 9rem 0 4.5rem;
  background:
    radial-gradient(50rem 26rem at 85% 0%, rgb(64 110 200 / 0.24), transparent 62%),
    linear-gradient(180deg, var(--deep), var(--primary-container));
  color: var(--on-deep);
}

.page-head h1 {
  margin-top: 1.1rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--on-deep);
}

.page-head .eyebrow {
  color: var(--on-deep-faint);
}

.page-head p:not(.eyebrow) {
  margin-top: 1.1rem;
  max-width: 38rem;
  font-size: 1.08rem;
  color: var(--on-deep-variant);
}

.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1.75rem 2rem;
  background: var(--surface-lowest);
  border-radius: 0.6rem;
  box-shadow: 0 18px 48px -18px rgb(84 95 115 / 0.3);
}

/* Lifts the status block over the edge of the dark header. */
.band.stage {
  padding-top: 0;
}

.status-stage {
  margin-top: -2.25rem;
  position: relative;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.chip::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: currentColor;
}

.chip.operational {
  background: var(--success-container);
  color: var(--success);
}

.chip.operational::before {
  animation: pulse 2.4s ease-out infinite;
}

.chip.maintenance,
.chip.degraded {
  background: var(--warning-container);
  color: var(--warning);
}

.chip.outage {
  background: var(--error-container);
  color: var(--error);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(11 122 82 / 0.45);
  }
  70%,
  100% {
    box-shadow: 0 0 0 0.55rem rgb(11 122 82 / 0);
  }
}

.status .summary {
  flex: 1 1 18rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--primary);
}

.status .updated {
  font-size: 0.85rem;
  color: var(--on-surface-variant);
}

.notices {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.notices .card {
  background: var(--surface-low);
  box-shadow: none;
}

.notices .card p strong {
  color: var(--primary);
}

/* ---------------------------------------------------------------- footer -- */

.colophon {
  background: var(--deep);
  color: var(--on-deep-variant);
  padding: 4rem 0 3rem;
  font-size: 0.9rem;
}

.colophon .wrap {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.colophon p {
  margin-top: 0.9rem;
  max-width: 24rem;
}

.colophon h3 {
  color: var(--on-deep-faint);
  font-size: 0.7rem;
  font-family: var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.colophon ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.colophon li + li {
  margin-top: 0.5rem;
}

.colophon a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.colophon a:hover {
  color: var(--on-deep);
}

/* ------------------------------------------------------------- not found -- */

.lost {
  min-height: 100vh;
  margin-top: -4.25rem;
  display: grid;
  align-content: center;
  padding: 8rem 0 5rem;
  background:
    radial-gradient(50rem 30rem at 80% 10%, rgb(64 110 200 / 0.26), transparent 62%),
    linear-gradient(180deg, var(--deep), var(--primary-container));
  color: var(--on-deep);
}

.lost .eyebrow {
  color: var(--on-deep-faint);
}

.lost h1 {
  margin-top: 1rem;
  color: var(--on-deep);
}

.lost p:not(.eyebrow) {
  margin-top: 1.4rem;
  max-width: 34rem;
  color: var(--on-deep-variant);
}

.lost p a {
  color: var(--on-deep);
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------------- motion -- */

@media (prefers-reduced-motion: no-preference) {
  .hero .copy > *,
  .receipt {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero .copy > :nth-child(2) {
    animation-delay: 0.06s;
  }

  .hero .copy > :nth-child(3) {
    animation-delay: 0.12s;
  }

  .hero .copy > :nth-child(4) {
    animation-delay: 0.18s;
  }

  .hero .copy > :nth-child(5) {
    animation-delay: 0.24s;
  }

  .receipt {
    animation-delay: 0.2s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

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

/* ------------------------------------------------------------------ bento --
   The service, shown rather than listed: each of the larger cards carries a
   small piece of what the API really returns (the shapes are the customer
   documentation's, and site.test.mjs keeps them so). */

.bento {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 62rem) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
  }

  .bento .span-7 {
    grid-column: span 7;
  }

  .bento .span-5 {
    grid-column: span 5;
  }

  .bento .span-4 {
    grid-column: span 4;
  }

  .bento .span-3 {
    grid-column: span 3;
  }
}

.bento .card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border-radius: 0.6rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.bento .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px -16px rgb(84 95 115 / 0.28);
}

.bento .card h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.bento .card > p {
  max-width: 34rem;
}

.bento .mini {
  margin-top: auto;
  padding-top: 1.75rem;
}

/* A card that is itself the deep surface. */
.bento .card.deep {
  background:
    radial-gradient(28rem 16rem at 100% 0%, rgb(64 110 200 / 0.3), transparent 65%),
    linear-gradient(150deg, var(--primary-container), var(--deep));
  color: var(--on-deep);
  box-shadow: 0 24px 60px -24px rgb(10 17 29 / 0.6);
}

.bento .card.deep h3 {
  color: var(--on-deep);
}

.bento .card.deep > p {
  color: var(--on-deep-variant);
}

.snippet {
  margin: 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--deep);
  color: var(--on-deep-variant);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.75;
  /* Wrap, not scroll: a long message is read, and a scrollbar inside a card is not. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.card.deep .snippet {
  background: rgb(4 9 18 / 0.5);
}

.snippet .k {
  color: var(--glint);
}

.snippet .s {
  color: #9be3c8;
}

.snippet .c {
  color: var(--on-deep-faint);
}

.snippet .e {
  color: #ffb4a8;
}

.snippet .w {
  color: var(--on-deep);
}

/* The signed receipt, as a stamp. */
.stamp {
  display: grid;
  gap: 0.9rem;
  padding: 1.25rem 1.3rem;
  border-radius: var(--radius-md);
  background: var(--surface-low);
}

.stamp-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
}

.stamp-row dt {
  color: var(--secondary);
}

.stamp-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--primary);
  text-align: right;
}

.stamp-row dd.ok {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 620;
  color: var(--success);
}

.stamp-row dd.ok::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: currentColor;
}

/* ---------------------------------------------------------------- contact -- */

.contact {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.contact .card {
  display: flex;
  flex-direction: column;
  border-radius: 0.6rem;
}

.contact .card .more {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 560;
  color: var(--primary);
}

.contact .card .more .arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}

.contact a.card:hover .more .arrow {
  transform: translateX(4px);
}

.fineprint {
  margin-top: 1.75rem;
  max-width: 46rem;
  font-size: 0.875rem;
  color: var(--on-surface-variant);
}

/* --------------------------------------------------------- small screens -- */

.masthead nav .keep {
  display: inline;
}

@media (max-width: 47.99rem) {
  .hero {
    padding: 8rem 0 4.5rem;
  }

  .band {
    padding: 4.5rem 0;
  }

  .closing {
    padding: 4.5rem 0;
  }

  .masthead nav {
    gap: 1.1rem;
  }

  .receipt {
    padding: 1.25rem;
  }

  .parties {
    grid-template-columns: 1fr;
  }

  .parties svg {
    transform: rotate(90deg);
  }

  .parties .to {
    text-align: left;
  }

  .bento .card {
    padding: 1.5rem;
  }
}

/* ------------------------------------------------------- hero, in motion --
   The delivery plays once: each step lands after the one before it. */

@media (prefers-reduced-motion: no-preference) {
  .timeline li {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .timeline li:nth-child(1) {
    animation-delay: 0.7s;
  }

  .timeline li:nth-child(2) {
    animation-delay: 1.15s;
  }

  .timeline li:nth-child(3) {
    animation-delay: 1.6s;
  }

  .receipt .pill {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 1.9s both;
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 46rem;
    height: 46rem;
    border-radius: 9999px;
    background: radial-gradient(closest-side, rgb(90 140 255 / 0.16), transparent);
    animation: drift 18s ease-in-out infinite alternate;
    pointer-events: none;
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-8rem, 5rem, 0) scale(1.15);
  }
}

::selection {
  background: rgb(143 180 255 / 0.35);
}
