/* Tessere placeholder site */

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

:root {
  /* The logo's teal and graphite, white, and one light neutral. */
  --teal: #0088aa;          /* logo teal: large text and marks only (4.1:1 on white) */
  --teal-text: #00708c;     /* links and small teal text: 5.7:1 on white, 5.2:1 on --bg-alt */
  --ink: #4d4d4d;           /* graphite: body text, 8.4:1 on white */
  --ink-strong: #2e3133;    /* headings */
  --ink-muted: #5f6366;     /* secondary text: 5.5:1 on --bg-alt */
  --bg: #ffffff;
  --bg-alt: #f4f5f5;
  --rule: #d9dcdd;
  --rule-strong: #838a8e;   /* control borders: 3.5:1 on white, 3.2:1 on --bg-alt */

  /* Code windows and editor mockups, which are dark. */
  --code-bg: #1c1f20;
  --code-pane: #222627;
  --code-rule: #383d3f;
  --code-edge: #0f1112;
  --code-text: #d7dbdc;
  --code-muted: #a3abae;
  --code-gutter: #8c9699;
  --code-hl: #1d2f35;
  --code-strong: #203b43;
  --code-accent: #6cc4dc;

  /* The four token colors. */
  --tok-type: #6cc4dc;
  --tok-literal: #e3b778;
  --tok-expr: #b5cf8a;
  --tok-comment: #9aa4a7;

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lede: clamp(1.125rem, 1.04rem + 0.4vw, 1.3125rem);
  --fs-h3: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --fs-h2: clamp(1.625rem, 1.3rem + 1.4vw, 2.375rem);
  --fs-h1: clamp(2.125rem, 1.45rem + 2.8vw, 3.5rem);
  --fs-code: 0.875rem;
  --lh-code: 1.7;

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section-pad: clamp(3.5rem, 2.5rem + 5vw, 6.5rem);
  --measure: 66ch;
  --radius: 6px;
  --header-h: 4rem;
}

/* ------------------------------------------------------------------
   Reset
   ------------------------------------------------------------------ */

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

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

body,
h1, h2, h3, h4,
p, ul, ol, figure, pre, table {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
}

[hidden] {
  display: none !important;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
  /* A safety net only: no element is meant to be wider than the viewport. */
  overflow-x: clip;
}

h1, h2, h3, h4 {
  color: var(--ink-strong);
  line-height: 1.2;
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.015em;
}

h3,
.h-like-3 {
  font-size: var(--fs-h3);
  font-weight: 650;
}

h4 {
  font-size: 1.0625rem;
  font-weight: 650;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--teal-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:not(pre) > code {
  color: var(--ink-strong);
}

strong {
  font-weight: 650;
  color: var(--ink-strong);
}

:focus-visible {
  outline: 3px solid var(--teal-text);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

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

.icon {
  display: inline-block;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--bg);
  color: var(--teal-text);
  font-weight: 650;
  border: 2px solid var(--teal-text);
  border-radius: 4px;
  transform: translateY(-200%);
}

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

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

.container {
  width: 100%;
  max-width: 75rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section--alt {
  background: var(--bg-alt);
}

main section[id] {
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
}

.section-head {
  margin-bottom: var(--space-7);
}

.prose > * {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: 1em;
}

.prose > * + h3 {
  margin-top: 2em;
}

.prose > .status + h2,
.prose > .eyebrow + h2,
.prose > .eyebrow + h3 {
  margin-top: var(--space-3);
}

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-text);
}

.split {
  display: grid;
  gap: var(--space-6) var(--space-8);
}

.stack {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 60em) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .split--roles {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  }

  .split--agent,
  .split--handler {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .split__sticky {
    position: sticky;
    top: calc(var(--header-h) + var(--space-6));
  }

  .split__rule {
    padding-left: var(--space-8);
    border-left: 1px solid var(--rule);
  }

  .split--even {
    gap: var(--space-6) 0;
  }

  .split--even > :first-child {
    padding-right: var(--space-8);
  }
}

/* ------------------------------------------------------------------
   Status labels: the only capsule shapes on the page
   ------------------------------------------------------------------ */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  width: fit-content;
  padding: 0.125rem 0.75rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-strong);
  font-size: var(--fs-xs);
  font-weight: 650;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.status--today {
  border-color: var(--teal-text);
  background: var(--teal-text);
  color: #ffffff;
}

.status--draft {
  border: 1px dashed var(--teal-text);
  color: var(--teal-text);
}

.status--planned {
  border-style: dotted;
  border-width: 2px;
  padding: 0.0625rem 0.6875rem;
}

.status--dev::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--teal);
}

/* ------------------------------------------------------------------
   Header and navigation
   ------------------------------------------------------------------ */

.site-header {
  position: relative;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink-strong);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand__logo {
  width: 40px;
  height: 40px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
  list-style: none;
}

.nav-list a {
  display: inline-block;
  padding-block: var(--space-2);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--teal-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink-strong);
  font-size: var(--fs-sm);
  font-weight: 650;
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--ink);
}

/* Without JavaScript the links wrap below the logo on small screens. */
@media (max-width: 61.99em) {
  .site-nav {
    flex-basis: 100%;
    padding-bottom: var(--space-2);
  }

  .js .site-header {
    position: sticky;
    top: 0;
  }

  .js .site-nav {
    flex-basis: auto;
    padding-bottom: 0;
  }

  .js .nav-list {
    display: none;
  }

  .js .nav-toggle[aria-expanded="true"] + .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: var(--space-2) var(--gutter) var(--space-4);
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }

  .js .nav-toggle[aria-expanded="true"] + .nav-list a {
    display: block;
    padding-block: var(--space-3);
    font-size: var(--fs-base);
    border-top: 1px solid var(--rule);
  }
}

@media (min-width: 62em) {
  .site-header {
    position: sticky;
    top: 0;
  }

  .nav-toggle {
    display: none;
  }
}

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */

.hero {
  padding-block: clamp(2rem, 1rem + 4vw, 4.5rem);
  background: var(--bg);
}

.hero h1 {
  margin-top: var(--space-5);
  font-size: var(--fs-h1);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero__tagline {
  margin-top: var(--space-4);
  color: var(--teal-text);
  font-size: var(--fs-lede);
  font-weight: 650;
}

.hero__lede {
  margin-top: var(--space-5);
  max-width: 34em;
  font-size: var(--fs-lede);
  line-height: 1.55;
}

.hero__note {
  margin-top: var(--space-5);
  max-width: 40em;
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

/* ------------------------------------------------------------------
   The example: the hello service, step by step
   ------------------------------------------------------------------ */

.build-section .section-head {
  margin-bottom: var(--space-6);
}

.build {
  display: grid;
  gap: var(--space-7);
  list-style: none;
}

.build-step {
  display: grid;
  gap: var(--space-4);
}

.build-step__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.build-step__text > p {
  max-width: 34em;
  margin-top: var(--space-2);
  padding-left: 2.75rem;
}

.build-step__code {
  max-width: 40rem;
}

/* Side by side: each step's text on the left and its code on the right. The
   code's column is wide enough for the longest line, in step 6. */
@media (min-width: 72em) {
  .build-step {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-8);
    align-items: start;
  }

  .build-step__code {
    max-width: none;
  }
}

/* ------------------------------------------------------------------
   The problem
   ------------------------------------------------------------------ */

.pull {
  padding-left: var(--space-4);
  border-left: 3px solid var(--teal);
  color: var(--ink-strong);
  font-size: var(--fs-lede);
  font-weight: 650;
}

.h-like-2 {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------
   Code frames
   ------------------------------------------------------------------ */

.code-frame {
  min-width: 0;
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--code-edge);
  border-radius: var(--radius);
}

.code-frame__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--code-rule);
  color: var(--code-muted);
  font-size: var(--fs-xs);
}

.code-frame__file {
  color: var(--code-text);
  font-family: var(--font-mono);
}

.code {
  padding: var(--space-4) var(--space-5);
  overflow-x: auto;
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: var(--fs-code);
  line-height: var(--lh-code);
  tab-size: 2;
  scrollbar-color: #5a6265 var(--code-bg);
}

.code code {
  font-size: inherit;
  color: inherit;
}

.code:focus-visible {
  outline: 3px solid var(--code-accent);
  outline-offset: -3px;
}

/* Numbered code: one block per line, the number drawn from data-n. */
.code--numbered {
  padding-left: var(--space-2);
  padding-right: var(--space-4);
}

.code--numbered code {
  display: block;
  width: max-content;
  min-width: 100%;
  white-space: normal;
}

.code--numbered .ln {
  position: relative;
  display: block;
  min-height: calc(1em * var(--lh-code));
  white-space: pre;
}

.code--numbered .ln::before {
  content: attr(data-n);
  display: inline-block;
  width: 3.5ch;
  margin-right: 2ch;
  color: var(--code-gutter);
  text-align: right;
  user-select: none;
}

.t { color: var(--tok-type); }
.s { color: var(--tok-literal); }
.e { color: var(--tok-expr); }
.c { color: var(--tok-comment); }

.after-code {
  max-width: var(--measure);
  margin-top: var(--space-4);
  color: var(--ink);
}

.code-frame--after {
  margin-top: var(--space-6);
}

/* ------------------------------------------------------------------
   How it works: the steps and the codebase window
   ------------------------------------------------------------------ */

/* minmax(0, 1fr): a column may be narrower than its widest code, which then
   scrolls inside its frame instead of widening the page. Without JavaScript
   the steps show their excerpts, and these are wider than a phone. */
.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
}

.flow__steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  max-width: 54rem;
  list-style: none;
}

.flow-step__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.flow-step__num {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--teal);
  border-radius: 50%;
  color: var(--teal-text);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-0.1em);
}

.flow-step__num--sub {
  border-style: dashed;
}

.flow-step__text {
  max-width: 60ch;
  margin-top: var(--space-2);
  padding-left: 2.75rem;
}

.flow-step--sub {
  margin-top: var(--space-6);
  margin-left: 2.75rem;
}

.flow-step--sub > .flow-step__title,
.flow-step--sub > .flow-step__text {
  margin-left: 0;
}

.excerpt {
  margin-top: var(--space-4);
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--code-edge);
  border-radius: var(--radius);
}

.excerpt__caption {
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--code-rule);
  color: var(--code-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

/* With JavaScript: the steps choose what the codebase window shows. */
.js .excerpt {
  display: none;
}

.js .flow__steps {
  gap: var(--space-3);
}

.js .flow-step--sub {
  margin-top: var(--space-3);
}

.flow-step__button {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-1) 0;
  border: 0;
  background: none;
  color: var(--ink-strong);
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.flow-step__button:hover {
  color: var(--teal-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.flow-step__button[aria-pressed="true"] {
  color: var(--teal-text);
}

.flow-step__button[aria-pressed="true"] .flow-step__num {
  border-color: var(--teal-text);
  border-style: solid;
  background: var(--teal-text);
  color: #ffffff;
}

/* On narrower screens the steps sit above the window, so only the chosen step's text shows. */
@media (max-width: 71.99em) {
  .js .flow-step:not(.is-active) > .flow-step__text {
    display: none;
  }
}

.codebase-wrap {
  min-width: 0;
  container-type: inline-size;
}

.codebase {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: clamp(24rem, 70vh, 38rem);
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--code-edge);
  border-radius: var(--radius);
}

.codebase__tree {
  display: none;
  min-height: 0;
  padding-block: var(--space-3);
  overflow: auto;
  background: var(--code-pane);
  border-right: 1px solid var(--code-rule);
  font-size: var(--fs-xs);
  scrollbar-color: #5a6265 var(--code-pane);
}

.codebase__project {
  padding: 0 var(--space-4) var(--space-2);
  color: var(--code-muted);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tree,
.tree ul {
  list-style: none;
}

.tree ul {
  padding-left: 0.75rem;
}

.tree__item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem var(--space-3);
  color: #c3c9cb;
  white-space: nowrap;
}

.tree .icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 1.5;
  color: var(--code-gutter);
}

.tree li.is-current > .tree__item {
  background: var(--code-strong);
  color: #ffffff;
}

.tree li.is-current > .tree__item .icon {
  color: var(--code-accent);
}

.codebase__editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}

.codebase__tabs {
  display: flex;
  background: var(--code-pane);
  border-bottom: 1px solid var(--code-rule);
}

.codebase__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  padding: var(--space-2) var(--space-4);
  background: var(--code-bg);
  border-top: 2px solid var(--code-accent);
  border-right: 1px solid var(--code-rule);
  margin-bottom: -1px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  white-space: nowrap;
}

.codebase__tab .icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 1.5;
  color: var(--code-accent);
}

.codebase__files {
  display: grid;
  min-height: 0;
}

.codebase__file {
  position: relative;
  min-height: 0;
  padding-block: var(--space-3);
  overflow: auto;
  font-size: 0.8125rem;
  scrollbar-color: #5a6265 var(--code-bg);
}

.codebase__file .ln {
  transition: background-color 0.25s ease;
}

.codebase__file .ln.is-hl {
  background: var(--code-hl);
}

.codebase__file .ln.is-strong {
  background: var(--code-strong);
}

.codebase__file .ln.is-hl::before {
  color: var(--code-muted);
}

.codebase__file .ln.is-hl::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--code-accent);
}

.codebase__status {
  padding: 0.375rem var(--space-4);
  border-top: 1px solid var(--code-rule);
  color: var(--code-muted);
  font-size: var(--fs-xs);
}

.codebase :focus-visible {
  outline: 3px solid var(--code-accent);
  outline-offset: -3px;
}

/* The file tree only once the window has room for it and an editor of about
   560px. Narrower, the tab still names the open file. */
@container (min-width: 50rem) {
  .codebase {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .codebase__tree {
    display: block;
  }
}

@media (min-width: 72em) {
  /* Within the page's usual width: the steps, and the window beside them,
     with its file tree and an editor about 560px wide. */
  .js .flow {
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
  }

  .js .codebase-wrap {
    position: sticky;
    top: calc(var(--header-h) + var(--space-5));
  }

  .js .flow-step.is-active > .flow-step__text {
    color: var(--ink-strong);
  }
}

.calls {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.aside-note {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}

.note {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

/* ------------------------------------------------------------------
   Checked before it runs
   ------------------------------------------------------------------ */

.run-checks {
  margin-top: var(--space-8);
}

.owed {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}

.owed__groups {
  display: grid;
  gap: var(--space-5) var(--space-7);
}

.owed__group .status {
  margin-bottom: var(--space-3);
}

@media (min-width: 48em) {
  .owed__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 52rem;
  }
}

.plain-list {
  list-style: none;
}

.plain-list li {
  position: relative;
  padding-left: 1.25rem;
}

.plain-list li + li {
  margin-top: var(--space-2);
}

/* A short dash as the marker: a drawn line, not a character. */
.plain-list li::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: 0;
  width: 0.625rem;
  height: 2px;
  background: var(--teal);
}

.plain-list--rules li {
  padding-block: var(--space-3);
  border-top: 1px solid var(--rule);
}

.plain-list--rules li + li {
  margin-top: 0;
}

.plain-list--rules li::before {
  top: calc(var(--space-3) + 0.8em);
}

/* ------------------------------------------------------------------
   Who does what
   ------------------------------------------------------------------ */

.roles {
  width: 100%;
  font-size: var(--fs-sm);
  text-align: left;
}

.roles th,
.roles td {
  padding: var(--space-4) var(--space-4) var(--space-4) 0;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.roles thead th {
  padding-block: 0 var(--space-2);
  border-bottom: 2px solid var(--ink);
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.roles tbody th {
  width: 34%;
  color: var(--ink-strong);
  font-weight: 650;
}

@media (max-width: 39.99em) {
  .roles thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .roles tr,
  .roles th,
  .roles td {
    display: block;
  }

  .roles tbody tr {
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--rule);
  }

  .roles tbody th,
  .roles td {
    width: auto;
    padding: 0;
    border: 0;
  }

  .roles td {
    margin-top: var(--space-1);
  }
}

/* ------------------------------------------------------------------
   Feature lists (works today, agents)
   ------------------------------------------------------------------ */

.features {
  display: grid;
  gap: var(--space-6) var(--space-8);
  list-style: none;
}

.features li {
  padding-top: var(--space-4);
  border-top: 2px solid var(--ink-strong);
}

.features p {
  max-width: var(--measure);
  margin-top: var(--space-2);
}

@media (min-width: 48em) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.features--agents {
  margin-top: var(--space-8);
}

.split--handler {
  margin-top: var(--space-7);
}

/* ------------------------------------------------------------------
   Drafts and planned
   ------------------------------------------------------------------ */

.later {
  display: grid;
  gap: var(--space-7) var(--space-8);
}

.later__group h3 {
  margin-top: var(--space-3);
  margin-bottom: var(--space-4);
}

.later__group--draft .plain-list--rules li {
  border-top-style: dashed;
  border-top-color: var(--rule-strong);
}

.later__group--planned .plain-list--rules li {
  border-top-style: dotted;
  border-top-width: 2px;
  border-top-color: var(--rule-strong);
}

.later__group--planned .plain-list li::before {
  background: var(--ink-muted);
}

@media (min-width: 56em) {
  .later {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.site-footer {
  padding-block: var(--space-7);
  background: var(--bg);
  border-top: 1px solid var(--rule);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
}

.credit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 650;
  text-decoration: none;
}

.credit__logo {
  width: 56px;
  height: 56px;
}

.credit__text {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.credit:hover .credit__text {
  text-decoration-thickness: 2px;
}

.site-footer__status {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

@media (min-width: 48em) {
  .site-footer__status {
    margin-left: auto;
  }
}

/* ------------------------------------------------------------------
   Debugging, as planned: the editor mockups

   Each mockup is drawn at a fixed 1200 x 820 design size, in units of
   --u, and --u shrinks with the container so the whole picture scales.
   On phones the picture is cropped to one part of it.
   ------------------------------------------------------------------ */

.split--debug {
  margin-bottom: var(--space-4);
}

.mockup {
  margin-top: var(--space-8);
}

.mockup__wrap {
  container-type: inline-size;
}

.mockup__viewport {
  --u: min(1px, 100cqw / 1200);
  --crop-x: 0;
  position: relative;
  width: 100%;
  height: calc(820 * var(--u));
  overflow: hidden;
  background: #1c1f20;
  border: 1px solid var(--code-edge);
  border-radius: var(--radius);
}

@container (max-width: 37.5em) {
  /* Phones: the side bar alone, or for the third mockup the editor. */
  .mockup__viewport {
    --u: calc(100cqw / 460);
    --crop-x: 48;
  }

  .mockup__viewport--typo {
    --u: calc(100cqw / 520);
    --crop-x: 328;
  }
}

.mockup__caption {
  max-width: var(--measure);
  margin-top: var(--space-4);
  color: var(--ink);
  font-size: var(--fs-sm);
}

.vsc {
  position: absolute;
  top: 0;
  left: calc(var(--crop-x) * var(--u) * -1);
  display: grid;
  grid-template-rows: calc(30 * var(--u)) minmax(0, 1fr) calc(22 * var(--u));
  width: calc(1200 * var(--u));
  height: calc(820 * var(--u));
  background: #1c1f20;
  color: #cfd3d4;
  font-family: var(--font-sans);
  font-size: calc(13 * var(--u));
  line-height: 1.4;
  white-space: nowrap;
  user-select: none;
}

.vsc-i {
  display: block;
  flex: none;
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vsc-title {
  display: grid;
  place-items: center;
  background: #2a2d2e;
  border-bottom: 1px solid #151718;
  color: #a9b0b3;
  font-size: calc(12 * var(--u));
}

.vsc-body {
  display: grid;
  grid-template-columns: calc(48 * var(--u)) calc(460 * var(--u)) minmax(0, 1fr);
  min-height: 0;
}

.vsc--typo .vsc-body {
  grid-template-columns: calc(48 * var(--u)) calc(280 * var(--u)) minmax(0, 1fr);
}

/* Activity bar */
.vsc-activity {
  display: grid;
  align-content: start;
  background: #2c2f30;
  border-right: 1px solid #151718;
}

.vsc-act {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(48 * var(--u));
  color: #858e91;
}

.vsc-act .vsc-i {
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.vsc-act.is-active {
  color: #eef0f1;
}

.vsc-act.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(2 * var(--u));
  background: var(--code-accent);
}

/* Side bar */
.vsc-side {
  min-height: 0;
  overflow: hidden;
  background: #232627;
  border-right: 1px solid #151718;
}

.vsc-side__head {
  display: flex;
  align-items: center;
  height: calc(35 * var(--u));
  padding-left: calc(20 * var(--u));
  color: #bbc1c3;
  font-size: calc(11 * var(--u));
  letter-spacing: 0.04em;
}

.vsc-launch {
  margin: 0 calc(12 * var(--u)) calc(8 * var(--u));
  padding: calc(3 * var(--u)) calc(8 * var(--u));
  background: #1c1f20;
  border: 1px solid #3c4245;
  color: #d7dbdc;
  font-size: calc(12 * var(--u));
}

.vsc-pane__head {
  display: flex;
  align-items: center;
  height: calc(22 * var(--u));
  padding-left: calc(4 * var(--u));
  border-top: 1px solid #34393b;
  color: #c9cfd1;
  font-size: calc(11 * var(--u));
  font-weight: 700;
  letter-spacing: 0.03em;
}

.vsc-pane__body {
  padding-bottom: calc(6 * var(--u));
}

/* Twisties, drawn as a minus (open) or plus (closed) instead of a chevron. */
.tw {
  position: relative;
  display: inline-block;
  flex: none;
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}

.tw::before,
.tw--closed::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(8 * var(--u));
  height: calc(1.5 * var(--u));
  background: #a9b0b3;
  transform: translate(-50%, -50%);
}

.tw--closed::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* Variables */
.vsc-var {
  display: flex;
  align-items: baseline;
  padding: 0 calc(10 * var(--u)) 0 calc(var(--d) * 12 * var(--u) + 24 * var(--u));
  font-family: var(--font-mono);
  font-size: calc(12 * var(--u));
  line-height: calc(18 * var(--u));
}

.vsc-var--node {
  align-items: center;
  padding-left: calc(var(--d) * 12 * var(--u) + 8 * var(--u));
}

.vsc-var__key {
  flex: none;
  color: #9fd6e6;
  margin-right: 1ch;
}

.vsc-var--node .vsc-var__key {
  color: #d7dbdc;
}

.vsc-var--section {
  margin-top: calc(6 * var(--u));
  padding-top: calc(5 * var(--u));
  border-top: 1px solid #34393b;
}

.vsc-var__val {
  min-width: 0;
  color: #d7dbdc;
  white-space: pre-wrap;
}

/* Call Stack and Breakpoints */
.vsc-stack,
.vsc-bprow {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  height: calc(22 * var(--u));
  padding: 0 calc(12 * var(--u)) 0 calc(24 * var(--u));
  font-size: calc(12.5 * var(--u));
}

.vsc-stack:first-child {
  background: #2b3a3f;
}

.vsc-stack__name {
  color: #eef0f1;
}

.vsc-stack__kind,
.vsc-stack__detail {
  color: #a3abae;
}

.vsc-stack__loc,
.vsc-bprow__line {
  margin-left: auto;
  color: #a3abae;
  font-size: calc(11.5 * var(--u));
}

.vsc-box {
  display: grid;
  place-items: center;
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
  background: #0e6e86;
  border: 1px solid #1f8aa5;
  border-radius: calc(3 * var(--u));
  color: #ffffff;
}

.vsc-check {
  width: calc(11 * var(--u));
  height: calc(11 * var(--u));
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vsc-dot,
.vsc-bp {
  display: inline-block;
  flex: none;
  width: calc(9 * var(--u));
  height: calc(9 * var(--u));
  border-radius: 50%;
  background: #e5534b;
}

/* Explorer (third mockup) */
.vsc-tree {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  height: calc(22 * var(--u));
  padding: 0 calc(12 * var(--u)) 0 calc(var(--d) * 12 * var(--u) + 16 * var(--u));
  color: #c3c9cb;
}

.vsc-tree .vsc-i {
  color: #8c9699;
}

.vsc-tree.is-selected {
  background: #2b3a3f;
  color: #ffffff;
}

.vsc-tree.is-error,
.vsc-tree.is-error .vsc-i {
  color: #f19a92;
}

.vsc-tree__count {
  margin-left: auto;
}

/* Editor area */
.vsc-work {
  position: relative;
  display: grid;
  grid-template-rows: calc(35 * var(--u)) minmax(0, 1fr) calc(210 * var(--u));
  min-width: 0;
  min-height: 0;
}

.vsc-tabs {
  display: flex;
  background: #232627;
  border-bottom: 1px solid #151718;
}

.vsc-tab {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: 0 calc(14 * var(--u));
  background: #1c1f20;
  border-top: 1px solid var(--code-accent);
  border-right: 1px solid #151718;
  margin-bottom: -1px;
  color: #ffffff;
}

.vsc-tab .vsc-i {
  color: var(--code-accent);
}

.vsc-editor {
  min-height: 0;
  padding-top: calc(6 * var(--u));
  overflow: hidden;
}

.vsc-lines {
  font-family: var(--font-mono);
  font-size: calc(13 * var(--u));
  line-height: calc(19 * var(--u));
}

.vsc-line {
  display: flex;
}

.vsc-line.is-current {
  background: #2a3b40;
}

.vsc-gut {
  display: flex;
  flex: none;
  align-items: center;
  width: calc(64 * var(--u));
  padding-left: calc(8 * var(--u));
}

.vsc-ln {
  margin-left: auto;
  padding-right: calc(18 * var(--u));
  color: #7f898c;
}

.vsc-line.is-current .vsc-ln {
  color: #eef0f1;
}

.vsc-src {
  white-space: pre;
}

.vsc-squiggle {
  position: relative;
  text-decoration: underline wavy #f0716a;
  text-decoration-thickness: calc(1.2 * var(--u));
  text-decoration-skip-ink: none;
  text-underline-offset: calc(3 * var(--u));
}

.vsc-hover {
  position: absolute;
  bottom: calc(100% + 4 * var(--u));
  left: calc(-120 * var(--u));
  width: calc(410 * var(--u));
  padding: calc(6 * var(--u)) calc(10 * var(--u));
  background: #25292a;
  border: 1px solid #454b4e;
  border-radius: calc(3 * var(--u));
  box-shadow: 0 calc(2 * var(--u)) calc(6 * var(--u)) rgb(0 0 0 / 0.35);
  color: #d7dbdc;
  font-family: var(--font-sans);
  font-size: calc(12.5 * var(--u));
  line-height: 1.45;
  white-space: normal;
}

/* The floating debug toolbar */
.vsc-toolbar {
  position: absolute;
  top: calc(3 * var(--u));
  left: 50%;
  display: flex;
  align-items: center;
  gap: calc(2 * var(--u));
  height: calc(29 * var(--u));
  padding: 0 calc(5 * var(--u));
  background: #2c3133;
  border: 1px solid #474d50;
  border-radius: calc(4 * var(--u));
  box-shadow: 0 calc(2 * var(--u)) calc(6 * var(--u)) rgb(0 0 0 / 0.35);
  color: #c5cacc;
  transform: translateX(-50%);
}

.vsc-toolbar .vsc-i {
  width: calc(26 * var(--u));
  height: calc(18 * var(--u));
  padding: 0 calc(4 * var(--u));
}

.vsc-toolbar .vsc-i:nth-child(2) {
  color: var(--code-accent);
}

.vsc-i--grip {
  width: calc(12 * var(--u)) !important;
  padding: 0 !important;
  color: #7f898c;
}

/* Panel */
.vsc-panel {
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid #34393b;
}

.vsc-panel__tabs {
  display: flex;
  gap: calc(22 * var(--u));
  height: calc(32 * var(--u));
  padding: 0 calc(18 * var(--u));
  color: #959ea1;
  font-size: calc(11 * var(--u));
  letter-spacing: 0.03em;
}

.vsc-panel__tabs span {
  display: flex;
  align-items: center;
}

.vsc-panel__tabs .is-active {
  border-bottom: 1px solid #d7dbdc;
  color: #eef0f1;
}

.vsc-panel__body {
  padding: calc(4 * var(--u)) calc(18 * var(--u));
}

.vsc-con {
  font-family: var(--font-mono);
  font-size: calc(12.5 * var(--u));
  line-height: calc(20 * var(--u));
}

.vsc-con--in {
  color: #a3abae;
}

.vsc-problem {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
  height: calc(24 * var(--u));
}

.vsc-i--error {
  color: #f0716a;
}

.vsc-problem__file {
  color: #eef0f1;
}

.vsc-problem__pos,
.vsc-problem__code {
  color: #a3abae;
}

/* Status bar */
.vsc-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(10 * var(--u));
  background: #2a2d2e;
  border-top: 1px solid #151718;
  color: #cfd3d4;
  font-size: calc(12 * var(--u));
}

.vsc-status--debug {
  background: var(--teal-text);
  color: #ffffff;
}

.vsc-status > span {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
}

.vsc-i--status {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
