/* marIA landing page. System fonts only; nothing is loaded from the web. */

:root {
  /* Page */
  --navy: #0e2e47;        /* logo navy: text */
  --navy-deep: #091d2e;
  --sky: #85c4dd;         /* logo light blue: secondary */
  --rose: #e11d63;        /* strong rose pink: accents */
  --rose-soft: #ff6f9f;   /* rose that reads on the dark hero */
  --rose-pale: #fdeef3;   /* pale pink tint */
  --rose-line: #f6cfdc;
  --muted: #4a6072;
  --white: #ffffff;

  /* Monokai Sun, the light Monokai scheme, written by hand */
  --sun-bg: #f8efe7;
  --sun-bg-deep: #efe3d9;
  --sun-fg: #2c232e;
  --sun-dim: #72696d;
  --sun-red: #ce4770;
  --sun-orange: #d4572b;
  --sun-yellow: #b16803;
  --sun-green: #218871;
  --sun-blue: #2473b6;
  --sun-purple: #6851a2;

  /* Monokai, the dark scheme of the hero terminal, written by hand */
  --mono-bg: #0b1622;
  --mono-fg: #eef1f4;
  --mono-dim: #8a96a3;
  --mono-pink: #ff6188;
  --mono-orange: #fc9867;
  --mono-yellow: #ffd866;
  --mono-green: #a9dc76;
  --mono-blue: #78dce8;
  --mono-purple: #ab9df2;

  /* The board's own colours, from its theme */
  --b-ink: #1d2129;
  --b-soft: #6d7482;
  --b-line: #e4e1d9;
  --b-paper: #f6f5f1;
  --b-todo: #cfd3da;
  --b-building: #3b6cd5;
  --b-built: #9db8ee;
  --b-review: #e9a23b;
  --b-reviewed: #8fd6b4;
  --b-merged: #2fa873;
  --b-needs: #ee7949;
  --b-alert: #dc3b30;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: linear-gradient(165deg, #f3f8fb 0%, #fbf4f7 45%, #f1f6fa 100%) fixed;
  color: var(--navy);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}

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

/* ---------- The living ground: lights that drift, a grid of pluses, and the pluses under the pointer lit ---------- */

/* Every moving piece is moved by transform alone, so the browser only composites it; nothing here blurs what is behind. */
.ground {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.light {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  will-change: transform;
}

.light-sky {
  left: -22vmax;
  top: -26vmax;
  background: radial-gradient(circle closest-side, rgba(133, 196, 221, 0.42), rgba(133, 196, 221, 0) 100%);
  animation: drift-a 46s ease-in-out infinite alternate;
}

.light-rose {
  right: -26vmax;
  top: 10vmax;
  background: radial-gradient(circle closest-side, rgba(225, 29, 99, 0.13), rgba(225, 29, 99, 0) 100%);
  animation: drift-b 58s ease-in-out infinite alternate;
}

.light-blue {
  left: 12vmax;
  bottom: -38vmax;
  background: radial-gradient(circle closest-side, rgba(59, 108, 213, 0.14), rgba(59, 108, 213, 0) 100%);
  animation: drift-c 52s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to { transform: translate3d(28vmax, 16vmax, 0) scale(1.1); }
}

@keyframes drift-b {
  to { transform: translate3d(-30vmax, 14vmax, 0) scale(0.92); }
}

@keyframes drift-c {
  to { transform: translate3d(22vmax, -20vmax, 0) scale(1.08); }
}

/* A notebook's grid of pluses: one layer draws the bars across, the other the bars down, each cut short by a repeating mask. */
.pluses,
.lamp-pluses {
  --ink: rgba(14, 46, 71, 0.105);
  --arm: 3.5px;
  --bar: 0.5px;
}

.pluses {
  position: absolute;
  inset: 0;
}

.pluses::before,
.pluses::after,
.lamp-pluses::before,
.lamp-pluses::after,
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pluses::before,
.lamp-pluses::before,
.hero::before {
  background: linear-gradient(to bottom, transparent calc(50% - var(--bar)), var(--ink) calc(50% - var(--bar)), var(--ink) calc(50% + var(--bar)), transparent calc(50% + var(--bar))) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(to right, transparent calc(50% - var(--arm)), #000 calc(50% - var(--arm)), #000 calc(50% + var(--arm)), transparent calc(50% + var(--arm))) 0 0 / 22px 22px;
  mask: linear-gradient(to right, transparent calc(50% - var(--arm)), #000 calc(50% - var(--arm)), #000 calc(50% + var(--arm)), transparent calc(50% + var(--arm))) 0 0 / 22px 22px;
}

/* The bar down leaves out the middle, where the bar across already is, so the centre is not darker. */
.pluses::after,
.lamp-pluses::after,
.hero::after {
  background: linear-gradient(to right, transparent calc(50% - var(--bar)), var(--ink) calc(50% - var(--bar)), var(--ink) calc(50% + var(--bar)), transparent calc(50% + var(--bar))) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(to bottom, transparent calc(50% - var(--arm)), #000 calc(50% - var(--arm)), #000 calc(50% - var(--bar)), transparent calc(50% - var(--bar)), transparent calc(50% + var(--bar)), #000 calc(50% + var(--bar)), #000 calc(50% + var(--arm)), transparent calc(50% + var(--arm))) 0 0 / 22px 22px;
  mask: linear-gradient(to bottom, transparent calc(50% - var(--arm)), #000 calc(50% - var(--arm)), #000 calc(50% - var(--bar)), transparent calc(50% - var(--bar)), transparent calc(50% + var(--bar)), #000 calc(50% + var(--bar)), #000 calc(50% + var(--arm)), transparent calc(50% + var(--arm))) 0 0 / 22px 22px;
}

/* A round window that follows the pointer; inside it the same grid in blue, moved back so its pluses sit on the page's pluses. */
.lamp {
  position: absolute;
  left: 0;
  top: 0;
  width: 440px;
  height: 440px;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle closest-side, rgba(59, 108, 213, 0.08), rgba(59, 108, 213, 0));
  -webkit-mask-image: radial-gradient(circle closest-side, #000 20%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 20%, transparent 100%);
  transition: opacity 0.4s ease;
  will-change: transform, opacity;
}

.lamp.is-on {
  opacity: 1;
}

.lamp-pluses {
  --ink: rgba(59, 108, 213, 0.62);
  --arm: 4px;
  --bar: 0.7px;
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  will-change: transform;
}

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

.top,
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.intro {
  --pad-top: 26px;
}

.intro-pin {
  padding-top: var(--pad-top);
}

/* The logo file is 1,616 px wide; shown at a fraction of that it stays sharp on dense screens. */
.logo {
  display: block;
  width: 312px;
  max-width: 72%;
  height: auto;
  margin: 0 auto;
}

/* While the intro plays only transforms move: the layout is the static page's throughout. */
.intro.is-live .logo {
  transform-origin: 50% 0;
  transform: translateY(var(--ty, 0px)) scale(var(--s, 1));
}

.intro.is-live .headline {
  transform: translateY(var(--hy, 0px));
}

.intro.is-live .step {
  opacity: var(--a, 0);
  transform: translateY(calc((1 - var(--a, 0)) * 0.35em));
}

.is-intro .hero {
  transform: translateY(var(--rise, 0px));
}

/* A twinkle is the pointer's lamp at a random spot, smaller, and snapped to the grid so its pluses need no shift. */
.lamp.twinkle {
  width: var(--w);
  height: var(--w);
  transition: opacity 0.6s ease;
  will-change: opacity;
}

.twinkle .lamp-pluses {
  width: 100%;
  height: 100%;
  will-change: auto;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

section {
  scroll-margin-top: 24px;
}

/* The page's headline stands alone between the logo and the hero. */
.headline {
  max-width: 940px;
  margin: 68px auto 0;
  text-align: center;
}

/* Each step is a box of its own: it fades in alone and the phrase wraps only between steps. */
.headline .step {
  display: inline-block;
}

.headline .arrow {
  font-weight: 400;
  color: var(--sky);
}

.headline h1 {
  font-size: clamp(30px, 4.05vw, 54.5px);
  text-wrap: balance;
}

.eyebrow {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--rose);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  word-spacing: 0.1em;
  font-weight: 800;
}

/* Tight tracking shrinks each space too, so spaces get it back; the slanted word is padded so it does not lean into a comma. */
h1 em,
h2 em {
  font-style: italic;
  color: var(--rose);
  padding: 0 0.02em 0 0.04em;
}

h2 {
  margin: 0 0 20px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  word-spacing: 0.1em;
  font-weight: 800;
}

.section-lead {
  margin: 0 0 40px;
  max-width: 44em;
  font-size: 18px;
  color: var(--muted);
}

code.inline {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.08em 0.38em;
  border-radius: 6px;
  background: rgba(14, 46, 71, 0.07);
}

.card-label {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--rose);
}

/* ---------- Hero: a dark panel, the words on the left, the terminal on the right ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: 44px;
  align-items: center;
  margin: 36px 0 96px;
  padding: 52px 48px;
  border-radius: 32px;
  color: #eaf2f8;
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(133, 196, 221, 0.2), transparent 60%),
    radial-gradient(60% 80% at 100% 100%, rgba(225, 29, 99, 0.18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  box-shadow: 0 40px 80px -48px rgba(9, 29, 46, 0.75);
  overflow: hidden;
}

.hero {
  --ink: rgba(255, 255, 255, 0.075);
  --arm: 3.5px;
  --bar: 0.5px;
}

.hero::before,
.hero::after {
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow-dark {
  color: var(--rose-soft);
}

/* With the headline above it, the panel opens on a short line of its own, set large. */
.hero-say {
  margin: 0;
  font-size: clamp(24px, 2.3vw, 31px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  word-spacing: 0.06em;
  font-weight: 700;
  color: var(--white);
}

.lead {
  margin: 20px 0 0;
  font-size: 18px;
  color: #c3d3e0;
}

.hero code.inline {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 5px 12px;
  border: 1px solid rgba(133, 196, 221, 0.35);
  border-radius: 999px;
  background: rgba(133, 196, 221, 0.1);
  color: #d9e9f3;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* The terminal window */
.term {
  margin: 0;
  min-width: 0;
  border: 1px solid rgba(133, 196, 221, 0.22);
  border-radius: 16px;
  background: var(--mono-bg);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  background: #101f2e;
  border-bottom: 1px solid rgba(133, 196, 221, 0.14);
}

.term-lights {
  display: flex;
  gap: 6px;
  flex: none;
}

.term-lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}

.term-lights i:nth-child(2) { background: #febc2e; }
.term-lights i:nth-child(3) { background: #28c840; }

.term-tabs {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.term-tab {
  position: relative;
  flex: none;
  padding: 6px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--mono-dim);
  font-family: var(--mono);
  font-size: 12.5px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.term-tab:hover {
  color: var(--mono-fg);
}

.term-tab[aria-selected="true"] {
  color: var(--white);
  background: rgba(133, 196, 221, 0.14);
}

/* A thin bar under the chosen tab fills while its session plays. */
.term-tab::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--rose-soft);
  transform: scaleX(0);
  transform-origin: left center;
}

.term-tab[aria-selected="true"]::after {
  transform: scaleX(var(--done, 1));
  transition: transform 0.3s linear;
}

.term-screen {
  height: 430px;
  overflow: auto;
  padding: 18px 20px 20px;
}

.term-run {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--mono-fg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.term-run code {
  font-family: inherit;
}

/* With the script on, each line is a block and the screen scrolls only as the session types. */
.term-run.is-js .ln {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .term-screen.is-js {
    overflow: hidden;
  }
}

/* While a session plays, lines not reached yet are left out, so the screen fills from the top. */
.term-run .ln.is-later {
  display: none;
}

/* The untyped rest of a command, and a card's lines not reached yet, keep their place unseen so nothing moves. */
.rest,
.card-code .ln.is-later {
  visibility: hidden;
}

/* In a card the cursor takes no room, so a full line never wraps because of it. */
.card-code .cursor {
  margin-right: calc(-0.6em - 1px);
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--rose-soft);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.term .mk-prompt { color: var(--mono-pink); font-weight: 700; }
.term .mk-cmd    { color: var(--mono-green); }
.term .mk-arg    { color: var(--mono-purple); }
.term .mk-model  { color: var(--mono-blue); }
.term .mk-head   { color: var(--mono-pink); font-weight: 700; }
.term .mk-key    { color: var(--mono-orange); }
.term .mk-str    { color: var(--mono-yellow); }
.term .mk-task   { color: var(--mono-purple); }
.term .mk-num    { color: var(--mono-orange); }
.term .mk-ok     { color: var(--mono-green); }
.term .mk-dim    { color: var(--mono-dim); }

/* ---------- Light code panels, Monokai Sun ---------- */

.code {
  margin: 0;
  padding: 16px 18px 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--sun-fg);
  background: var(--sun-bg);
  border: 1px solid var(--rose-line);
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code code {
  font-family: inherit;
}

.mk-prompt { color: var(--sun-red); font-weight: 700; }
.mk-cmd    { color: var(--sun-green); }
.mk-arg    { color: var(--sun-purple); }
.mk-model  { color: var(--sun-blue); }
.mk-head   { color: var(--sun-red); font-weight: 700; }
.mk-key    { color: var(--sun-orange); }
.mk-str    { color: var(--sun-yellow); }
.mk-task   { color: var(--sun-purple); }
.mk-num    { color: var(--sun-orange); }
.mk-ok     { color: var(--sun-green); }
.mk-dim    { color: var(--sun-dim); }

/* ---------- Shared light surfaces ---------- */

.way,
.tile,
.ex,
.req,
.card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--rose-line);
  border-radius: 20px;
  box-shadow: 0 18px 40px -32px rgba(14, 46, 71, 0.45);
}

h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.way p,
.tile p,
.ex p,
.req p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 16px;
}

.ticks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--rose);
  border-bottom: 2.5px solid var(--rose);
  transform: rotate(-45deg);
}

/* A small mono label above a title, whatever surface it sits on. */
.way .card-label,
.tile .card-label,
.ex .card-label,
.req .card-label {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--rose);
}

/* ---------- How you use it ---------- */

.ways {
  padding: 0 0 96px;
}

.ways h2 {
  margin-bottom: 36px;
}

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

.way {
  padding: 26px 26px 24px;
}

.way .code {
  margin-top: 4px;
}

/* ---------- Spec-driven ---------- */

.how {
  padding: 0 0 96px;
}

/* Two flows side by side: the feature's seven steps, and beside them what happens to a request under review. */
.flows {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 44px;
  align-items: start;
  margin: 0 0 56px;
}

.flow {
  --fill: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The line that joins the steps, and over it the part already passed, drawn by scaling it to --fill. */
.flow::before,
.flow::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 30px;
  bottom: 30px;
  width: 2px;
  border-radius: 2px;
  background: var(--rose-line);
}

.flow::after {
  background: linear-gradient(to bottom, var(--rose), #3b6cd5);
  transform: scaleY(var(--fill));
  transform-origin: top center;
}

.fl-step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  scroll-margin-top: 140px;
}

.fl-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: 8px;
  border: 2px solid var(--rose-line);
  border-radius: 50%;
  background: var(--white);
  color: var(--white);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
}

/* The lit node: a rose disc with a soft ring, faded and scaled in when the line reaches it. */
.fl-node::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 5px rgba(225, 29, 99, 0.14);
}

.fl-card {
  min-width: 0;
  padding: 16px 20px 18px;
  border: 1px solid var(--rose-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 40px -32px rgba(14, 46, 71, 0.45);
}

.fl-card > b {
  display: block;
  margin-bottom: 3px;
  font-size: 18px;
}

.fl-card > span {
  display: block;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* With the script on, a step not reached yet waits dim and lower, and settles into place when the line reaches it. */
@media (prefers-reduced-motion: no-preference) {
  .flow.is-live .fl-card {
    transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .flow.is-live .fl-node::before {
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .flow.is-live .fl-step:not(.is-seen) .fl-card {
    opacity: 0.22;
    transform: translate3d(0, 28px, 0) scale(0.985);
  }

  .flow.is-live .fl-step:not(.is-seen) .fl-node {
    color: var(--muted);
  }

  .flow.is-live .fl-step:not(.is-seen) .fl-node::before {
    opacity: 0;
    transform: scale(0.4);
  }
}

/* Build: the tasks split into lanes built at once, and join again. */
.par {
  position: relative;
  margin-top: 16px;
  padding-top: 18px;
}

.par-lanes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.par-lanes::before,
.par-lanes::after {
  content: "";
  position: absolute;
  left: calc((100% - 20px) / 6);
  right: calc((100% - 20px) / 6);
  height: 2px;
  background: var(--b-built);
}

.par-lanes::before {
  top: -18px;
}

.par-lanes::after {
  bottom: -18px;
}

.par-lanes li {
  position: relative;
  padding: 8px 8px 9px;
  border: 1px solid #c5d5f6;
  border-radius: 10px;
  background: #eef3fd;
  text-align: center;
}

.par-lanes li::before,
.par-lanes li::after {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  width: 2px;
  height: 18px;
  background: var(--b-built);
}

.par-lanes li::before {
  bottom: 100%;
}

.par-lanes li::after {
  top: 100%;
}

.par-lanes b {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: #2a52ad;
}

.par-lanes small {
  display: block;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--muted);
}

.par-join {
  position: relative;
  margin: 28px 0 0;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}

.par-join::before {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  top: -10px;
  width: 2px;
  height: 10px;
  background: var(--b-built);
}

/* Council: review, fix, review again, with the way back drawn under them. */
.loop {
  position: relative;
  margin-top: 16px;
  padding-bottom: 40px;
}

.loop-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loop-row li {
  position: relative;
  display: grid;
  place-items: center;
  padding: 9px 8px;
  border: 1px solid #f1dca6;
  border-radius: 10px;
  background: #fdf5e1;
  color: #7d5a08;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.loop-row li + li::before {
  content: "";
  position: absolute;
  right: 100%;
  top: calc(50% - 1px);
  width: 22px;
  height: 2px;
  background: var(--b-review);
}

.loop-row li + li::after {
  content: "";
  position: absolute;
  right: calc(100% + 1px);
  top: calc(50% - 5px);
  border: 5px solid transparent;
  border-left: 7px solid var(--b-review);
  border-right: 0;
}

.loop-back {
  position: absolute;
  left: calc((100% - 52px) / 6);
  right: calc((100% - 52px) / 6);
  bottom: 12px;
  height: 28px;
  margin: 0;
  border: 2px dashed var(--b-review);
  border-top: 0;
  border-radius: 0 0 16px 16px;
}

.loop-back::before {
  content: "";
  position: absolute;
  left: -6px;
  top: -6px;
  border: 5px solid transparent;
  border-bottom: 7px solid var(--b-review);
  border-top: 0;
}

.loop-back span {
  position: absolute;
  left: 50%;
  bottom: -12px;
  padding: 1px 10px;
  border: 1px solid #f1dca6;
  border-radius: 999px;
  background: #ffffff;
  color: #7d5a08;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
  transform: translateX(-50%);
}

/* What the loop leaves goes aside, to the project's maintenance list. */
.keep {
  position: relative;
  margin: 24px 0 0;
  padding: 12px 14px;
  border: 1.5px dashed #c3ccd6;
  border-radius: 12px;
  background: rgba(14, 46, 71, 0.03);
}

/* A dashed line drops from the loop's badge to the list where its leftovers are kept. */
.keep::before {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  top: -26px;
  height: 25px;
  border-left: 2px dashed #c3ccd6;
}

.keep .card-label {
  margin-bottom: 2px;
}

.keep p:last-child {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* A request under review: a cycle of five stops, the way back drawn on its left, and the way out below. */
.prflow {
  position: sticky;
  top: 24px;
  padding: 22px 20px 20px;
  border: 1px solid var(--rose-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 40px -32px rgba(14, 46, 71, 0.45);
}

.prflow h3 {
  font-size: 19px;
}

.pr-loop {
  position: relative;
  margin-top: 16px;
  padding-left: 36px;
}

.pr-cycle {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pr-st {
  position: relative;
  padding: 8px 12px 10px;
  border: 1px solid var(--rose-line);
  border-radius: 12px;
  background: rgba(253, 238, 243, 0.9);
}

.pr-st b {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.pr-st span {
  display: block;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

.pr-st + .pr-st::before {
  content: "";
  position: absolute;
  left: 24px;
  top: -15px;
  width: 2px;
  height: 14px;
  background: var(--rose-line);
}

/* The stop the cycle is at, ringed; the script moves the ring round while the panel is in view. */
.pr-st::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 0 3px rgba(225, 29, 99, 0.28);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.pr-st.is-now::after {
  opacity: 1;
}

.pr-again {
  position: absolute;
  left: 8px;
  top: 22px;
  bottom: 30px;
  width: 24px;
  margin: 0;
  border: 2px dashed var(--rose);
  border-right: 0;
  border-radius: 14px 0 0 14px;
}

.pr-again::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -6px;
  border: 5px solid transparent;
  border-left: 7px solid var(--rose);
  border-right: 0;
}

.pr-again span {
  position: absolute;
  left: -1px;
  top: 50%;
  padding: 2px 6px;
  background: #ffffff;
  color: var(--rose);
  font-family: var(--mono);
  font-size: 12px;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.pr-exit {
  position: relative;
  margin: 26px 0 0 36px;
  padding: 9px 12px 10px;
  border: 1px solid #bfe6d3;
  border-radius: 12px;
  background: #e3f4ec;
}

.pr-exit::before {
  content: "";
  position: absolute;
  left: 24px;
  top: -26px;
  width: 2px;
  height: 25px;
  background: var(--b-merged);
}

.pr-exit b {
  display: block;
  font-size: 15px;
  color: #1c7a52;
}

.pr-exit span {
  display: block;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 14px 26px;
  background: rgba(253, 238, 243, 0.9);
}

.card-full {
  grid-column: 1 / -1;
}

.card-code {
  flex: 1 0 auto;
  margin-bottom: 22px;
}

.card .card-label,
.card h3,
.card-text {
  margin-left: 12px;
  margin-right: 12px;
}

.card-text {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- Plain files ---------- */

.own {
  padding: 0 0 96px;
}

.own h2 {
  margin-bottom: 36px;
}

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

.tile {
  padding: 24px 24px 10px;
}

.tile h3 {
  font-size: 19px;
}

/* A column so each card's row of products sits on its bottom and the three rows line up. */
.own-grid .tile {
  display: flex;
  flex-direction: column;
}

.brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: auto 0 14px;
  padding: 4px 0 0;
  list-style: none;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.3;
}

.brands li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.brands svg {
  flex: none;
  width: 17px;
  height: 17px;
  fill: var(--navy);
}

/* The memory trio: three workflows, in the order they run. */
.memory {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 2fr);
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--rose-line);
  border-radius: 20px;
  background: rgba(253, 238, 243, 0.9);
  box-shadow: 0 18px 40px -32px rgba(14, 46, 71, 0.45);
}

.memory-head h3 {
  font-size: 19px;
}

.memory-head p:last-child {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mem {
  position: relative;
  padding: 14px 16px 16px;
  border: 1px solid var(--rose-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.mem + .mem::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 18px;
  height: 2px;
  background: var(--rose-line);
}

.mem-when {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--rose);
}

.mem h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.mem p:last-child {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

.tree {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

.tree .code {
  font-size: 13px;
  white-space: pre;
  overflow-x: auto;
}

/* ---------- The board ---------- */

.board-section {
  padding: 0 0 96px;
}

.mini {
  margin: 0 0 32px;
}

/* The board's own ground: paper, soft blue and grey lights, and its grid of dots. */
.mini-frame {
  padding: 16px;
  border: 1px solid rgba(29, 33, 41, 0.1);
  border-radius: 24px;
  background:
    radial-gradient(circle, rgba(29, 33, 41, 0.1) 1.1px, transparent 1.6px) 0 0 / 22px 22px,
    radial-gradient(60% 70% at 4% 6%, rgba(59, 108, 213, 0.13), transparent 62%),
    radial-gradient(52% 70% at 98% 38%, rgba(109, 116, 130, 0.16), transparent 64%),
    #f4f5f8;
  box-shadow: 0 30px 60px -40px rgba(14, 46, 71, 0.5);
  color: var(--b-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.mini-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(226, 228, 234, 0.75);
  font-size: 14px;
}

.mini-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  color: var(--b-soft);
  font-weight: 600;
  white-space: nowrap;
}

.mini-tab-on {
  background: #ffffff;
  color: var(--b-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.mini-tab svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-bell {
  position: relative;
  display: inline-flex;
}

.mini-bell i {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--b-alert);
  box-shadow: 0 0 0 2px #ffffff;
}

.mini-count {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--b-paper);
  color: var(--b-soft);
  font-size: 11px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.mini-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.mini-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.mini-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mini-n {
  font-size: 13px;
  color: var(--b-soft);
  font-variant-numeric: tabular-nums;
}

.mini-arrow {
  width: 14px;
  height: 12px;
  margin-left: auto;
  flex: none;
  fill: none;
  stroke: var(--b-ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A column's title as a pill in its colour, as the board draws it. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 3px 12px;
  border: 1px solid;
  border-radius: 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
  white-space: nowrap;
}

.tag i {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.tone-needs    { border-color: #f6c9b3; background: #fef1ea; color: #b24a1d; }
.tone-todo     { border-color: #d6d9e0; background: #ffffff; color: #555b68; }
.tone-build    { border-color: #c5d5f6; background: #eef3fd; color: #2a52ad; }
.tone-review   { border-color: #f1dca6; background: #fdf5e1; color: #7d5a08; }
.tone-reviewed { border-color: #bfe6d3; background: rgba(227, 244, 236, 0.5); color: #1c7a52; }
.tone-merged   { border-color: #bfe6d3; background: #e3f4ec; color: #1c7a52; }

.lane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 266px;
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgba(29, 33, 41, 0.08);
  border-radius: 14px;
  background: rgba(229, 231, 237, 0.9);
}

.lane-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed #d6d9e0;
  border-radius: 10px;
  color: var(--b-soft);
  font-size: 12px;
  text-align: center;
}

.fcard {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--b-line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: opacity 0.35s ease;
}

.fcard.is-new {
  opacity: 0;
}

.fcard h4 {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 600;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fcard p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--b-soft);
}

.squares {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* A task as the board's square: its label above, the turn it is built in below. */
.sq {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 40px;
  height: 32px;
  border-radius: 6px;
  line-height: 1;
  color: #ffffff;
  transition: background-color 0.3s ease;
}

.sq small {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9px;
}

.sq b {
  font-size: 11px;
  font-weight: 700;
}

.s-needs    { background: var(--b-needs); }
.s-todo     { background: var(--b-todo); color: rgba(29, 33, 41, 0.7); }
.s-build    { background: var(--b-building); }
.s-built    { background: var(--b-built); color: rgba(29, 33, 41, 0.7); }
.s-review   { background: var(--b-review); }
.s-reviewed { background: var(--b-reviewed); color: rgba(29, 33, 41, 0.7); }
.s-merged   { background: var(--b-merged); }

/* A task being built breathes, as on the board. */
.s-build.is-live {
  animation: working 1.1s ease-in-out infinite;
}

@keyframes working {
  50% { transform: scale(0.72); }
}

.mini-caption {
  margin: 12px 4px 0;
  font-size: 13.5px;
  color: var(--muted);
}

.explain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.ex {
  padding: 24px 24px 12px;
}

.ex .tag {
  margin: 2px 0;
  font-size: 12px;
  padding: 2px 9px;
  vertical-align: 1px;
}

.ex .tag i {
  width: 7px;
  height: 7px;
}

.alert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* An alert's tag: a square-cornered pill with its drawing, as on the board's Alerts tab. */
.atag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid;
  border-radius: 8px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

.atag svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.atag-bad  { border-color: #f4c4bf; background: #fdeceb; color: #a32a20; }
.atag-warn { border-color: #f1dca6; background: #fdf5e1; color: #7d5a08; }
.atag-go   { border-color: #c5d5f6; background: #eef3fd; color: #2a52ad; }

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

.req {
  padding: 26px 26px 24px;
}

.req .ticks li {
  margin-bottom: 10px;
}

/* ---------- Closing ---------- */

.contact {
  padding: 0 0 112px;
}

.contact-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 32px 60px;
  border: 1px solid var(--rose-line);
  border-radius: 32px;
  background:
    radial-gradient(60% 90% at 50% 0%, rgba(225, 29, 99, 0.1), transparent 70%),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 60px -44px rgba(14, 46, 71, 0.5);
  text-align: center;
}

.contact-face {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
}

.contact h2 {
  margin-bottom: 12px;
}

.contact p {
  margin: 0 0 30px;
  font-size: 18px;
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 18px 40px;
  background: var(--rose);
  color: var(--white);
  border-radius: 999px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 14px 30px -16px rgba(225, 29, 99, 0.7);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

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

.button:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 4px;
}

/* ---------- Why marIA: the home page's teaser ---------- */

.teaser {
  padding: 0 0 96px;
}

.teaser-box {
  padding: 40px 44px 36px;
  border: 1px solid var(--rose-line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 40px -32px rgba(14, 46, 71, 0.45);
}

.teaser h2,
.why-open h1 {
  text-wrap: balance;
}

.teaser h2 {
  margin-bottom: 16px;
}

.nowrap {
  white-space: nowrap;
}

.teaser-text {
  max-width: 44em;
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

.pairs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 24px;
  margin: 28px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rose-line);
  list-style: none;
}

.pairs span {
  display: block;
  font-size: 14.5px;
  color: var(--muted);
}

.pairs b {
  display: block;
  font-size: 17px;
  line-height: 1.3;
}

.more {
  display: inline-block;
  margin-top: 28px;
  color: var(--rose);
  font-weight: 700;
  text-decoration: none;
}

.more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Why marIA: its own page ---------- */

.why-top {
  padding-top: 26px;
}

.logo-link {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.why-open {
  max-width: 820px;
  margin: 72px auto 0;
  padding: 0 0 88px;
}

.why-open h1 {
  margin-bottom: 32px;
}

.prose p {
  margin: 0 0 18px;
  font-size: 18.5px;
  line-height: 1.65;
}

.standards {
  margin-top: 40px;
  padding: 22px 26px 24px;
  border: 1px solid var(--rose-line);
  border-radius: 20px;
  background: rgba(253, 238, 243, 0.9);
}

.standards p:last-child {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.principles,
.others {
  padding: 0 0 96px;
}

.principles h2,
.others h2 {
  margin-bottom: 32px;
}

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

.pr {
  padding: 24px 26px 22px;
  border: 1px solid var(--rose-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 40px -32px rgba(14, 46, 71, 0.45);
}

.pr h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.pr p {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--muted);
}

/* What marIA does because of it is set apart from the story by colour and a thin rose rule. */
.pr .pr-so {
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid var(--rose);
  color: var(--navy);
}

.others .section-lead {
  margin-bottom: 28px;
}

.compare-box {
  overflow: hidden;
  border: 1px solid var(--rose-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 40px -32px rgba(14, 46, 71, 0.45);
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.compare th,
.compare td {
  padding: 16px 22px;
  text-align: left;
  vertical-align: top;
}

.compare thead th {
  padding-top: 18px;
  padding-bottom: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--rose);
  background: rgba(253, 238, 243, 0.9);
}

.compare tbody tr + tr > * {
  border-top: 1px solid var(--rose-line);
}

.compare tbody th {
  width: 24%;
  font-weight: 700;
}

.compare tbody th small {
  display: block;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
}

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

.compare td + td {
  color: var(--navy);
}

.others-end {
  max-width: 44em;
  margin: 24px 0 0;
  font-size: 17px;
  color: var(--muted);
}

.why-close .contact-box > p:not(.close-line) {
  max-width: 40em;
  line-height: 1.6;
}

.contact .close-line {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--navy);
}

.back {
  margin-top: 22px;
  color: var(--muted);
  font-size: 15.5px;
  text-decoration: none;
}

.back:hover {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- The 404 page: one box under the logo ---------- */

.lost {
  max-width: 820px;
  margin: 72px auto 0;
}

.lost h1 {
  margin-bottom: 16px;
}

/* Restated because .contact p would otherwise size and colour it as body text. */
.lost .eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--rose);
}

@media (max-width: 860px) {
  .lost {
    margin-top: 44px;
  }
}

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

@media (max-width: 860px) {
  .teaser {
    padding-bottom: 64px;
  }

  .teaser-box {
    padding: 28px 20px 26px;
    border-radius: 24px;
  }

  .teaser-text {
    font-size: 16.5px;
  }

  .pairs {
    gap: 16px 14px;
  }

  .pairs b {
    font-size: 16px;
  }

  .why-top {
    padding-top: 20px;
  }

  .why-open {
    margin-top: 44px;
    padding-bottom: 64px;
  }

  .prose p {
    font-size: 17px;
  }

  .standards {
    padding: 18px 18px 20px;
  }

  .principles,
  .others {
    padding-bottom: 64px;
  }

  .pr-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .pr {
    padding: 20px 18px 18px;
  }

  /* On a phone each product is a small card of its own, each cell under its label. */
  .compare,
  .compare tbody,
  .compare tr,
  .compare th,
  .compare td {
    display: block;
    width: auto;
  }

  .compare thead {
    display: none;
  }

  .compare tbody tr {
    padding: 16px 18px 6px;
  }

  .compare tbody tr + tr {
    border-top: 1px solid var(--rose-line);
  }

  .compare tbody tr + tr > * {
    border-top: 0;
  }

  .compare th,
  .compare td {
    padding: 0 0 12px;
  }

  .compare tbody th {
    width: auto;
    font-size: 17px;
  }

  .compare td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--rose);
  }

  .contact .close-line {
    font-size: 19px;
  }
}

/* ---------- Middle widths ---------- */

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

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

  .prflow {
    position: static;
  }

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

  .mini-arrow {
    display: none;
  }
}

/* ---------- Narrow screens: stack ---------- */

@media (max-width: 860px) {
  .top,
  main {
    padding: 0 16px;
  }

  .intro {
    --pad-top: 20px;
  }

  .logo {
    width: 204px;
  }

  .hero {
    margin: 18px 0 64px;
    padding: 30px 18px 18px;
    border-radius: 24px;
  }

  .lead {
    font-size: 16.5px;
  }

  .chip {
    font-size: 12px;
  }

  .term-bar {
    padding: 6px 8px;
    gap: 8px;
  }

  .term-lights {
    display: none;
  }

  .term-tabs {
    flex-wrap: wrap;
  }

  .term-tab {
    padding: 6px 8px;
    font-size: 11.5px;
  }

  .term-screen {
    height: 400px;
    padding: 14px 12px 14px;
  }

  .term-run {
    font-size: 11px;
  }

  h2 {
    margin-bottom: 16px;
  }

  .section-lead {
    font-size: 16.5px;
    margin-bottom: 28px;
  }

  .ways,
  .how,
  .own,
  .board-section {
    padding-bottom: 64px;
  }

  .ways-grid,
  .own-grid,
  .explain,
  .requests,
  .cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .flow {
    gap: 14px;
  }

  .flow::before,
  .flow::after {
    left: 16px;
  }

  .fl-step {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    scroll-margin-top: 90px;
  }

  .fl-node {
    width: 34px;
    height: 34px;
    margin-top: 10px;
    font-size: 13px;
  }

  .fl-card {
    padding: 14px 14px 16px;
    border-radius: 16px;
  }

  .fl-card > span {
    font-size: 15px;
  }

  .par-lanes,
  .loop-row {
    gap: 14px;
  }

  .par-lanes::before,
  .par-lanes::after {
    left: calc((100% - 28px) / 6);
    right: calc((100% - 28px) / 6);
  }

  .loop-row li + li::before {
    width: 10px;
  }

  .loop-row li {
    font-size: 13px;
    padding: 8px 4px;
  }

  .loop-back {
    left: calc((100% - 28px) / 6);
    right: calc((100% - 28px) / 6);
  }

  .prflow {
    padding: 20px 14px 16px;
  }

  .memory {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 14px 16px;
  }

  .trio {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .mem + .mem::before {
    left: 26px;
    top: -12px;
    width: 2px;
    height: 12px;
  }

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

  .headline {
    margin-top: 43px;
  }

  .way,
  .req {
    padding: 22px 18px 20px;
  }

  .tile,
  .ex {
    padding: 20px 18px 8px;
  }

  .code {
    padding: 14px 14px 16px;
    font-size: 12px;
  }

  .card {
    padding: 10px 10px 22px;
    border-radius: 16px;
  }

  .card .card-label,
  .card h3,
  .card-text {
    margin-left: 8px;
    margin-right: 8px;
  }

  h3 {
    font-size: 19px;
  }

  .mini-frame {
    padding: 10px;
    border-radius: 18px;
  }

  .mini-tabs {
    font-size: 12.5px;
  }

  .mini-tab {
    gap: 6px;
    padding: 6px 9px;
  }

  .mini-tab svg {
    width: 15px;
    height: 15px;
  }

  .mini-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
  }

  .tag {
    padding: 3px 9px;
    font-size: 12px;
  }

  .lane {
    height: 252px;
  }

  .fcard {
    padding: 9px 8px;
  }

  .squares {
    gap: 4px;
  }

  .fcard h4 {
    font-size: 12.5px;
  }

  .contact {
    padding-bottom: 72px;
  }

  .contact-box {
    padding: 40px 20px 44px;
    border-radius: 24px;
  }

  .contact p {
    font-size: 16.5px;
  }

  .button {
    padding: 16px 36px;
    font-size: 18px;
  }
}

/* ---------- Less motion when asked ---------- */

@media (prefers-reduced-motion: reduce) {
  .light,
  .s-build.is-live,
  .cursor {
    animation: none;
  }

  .term-tab::after,
  .pr-st::after,
  .fcard,
  .sq,
  .lamp,
  .button {
    transition: none;
  }
}
