/* The site's own tokens: dark first, light by choice or by the system. Every colour of a page is one of these. */
:root {
  color-scheme: dark;
  --bg: #050506;
  --surface: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.74);
  --accent: #ff7a5c;
  --accent-2: #ff4f9a;
  --on-accent: #0b0b0d;
  --glow: color-mix(in oklab, var(--accent) 34%, transparent);
  --glow-2: color-mix(in oklab, var(--accent-2) 22%, transparent);
  --top: color-mix(in oklab, var(--bg) 72%, transparent);
  --control: rgba(255, 255, 255, 0.08);
  --chosen: #ffffff;
  --on-chosen: #0b0b0d;
  --focus: #ffa58f;
  --warn: #ffa58f;
  --field: rgba(255, 255, 255, 0.06);
  --field-line: #7e7e80;
  /* The app's quieter layers: a stronger edge, a fainter word, the rail's ground and the ring round a field in use. */
  --line-strong: rgba(255, 255, 255, 0.2);
  --text-faint: rgba(255, 255, 255, 0.56);
  --rail-bg: rgba(255, 255, 255, 0.025);
  --ring: rgba(255, 122, 92, 0.32);
  /* A UI test run's lights (good, watch, problem), each with a word beside it: never a colour alone. */
  --light-green: #5fd38d;
  --light-amber: #f2c14e;
  --light-red: #ff6b6b;
  --shadow: none;
  --pop-shadow: 0 1.5rem 3rem -1rem rgba(0, 0, 0, 0.6);
  /* What dims the page behind a sheet the browser opens. */
  --scrim: rgba(0, 0, 0, 0.45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --size-small: 0.8125rem;
  --size-body: 1rem;
  --size-label: 0.875rem;
  --size-title: clamp(1.6rem, 4vw, 2.125rem);
  --size-heading: 1.5rem;
  --size-page: clamp(1.75rem, 1.2rem + 1.4vw, 2.375rem);
  --size-count: 2.5rem;
  --radius: 20px;
  --radius-small: 12px;
  --radius-tiny: 8px;
  --radius-pill: 999px;
  --tap: 44px;
  /* The signed-in app's rail on a wide screen: its width, the brand's band at its top and the account's at its foot. */
  --rail: 16rem;
  --rail-head: 4.5rem;
  --rail-foot: 7.75rem;
  /* The opening's times: the ring draws, the x pops, the cursor blinks; the bar's mark settles; lines rise a step apart. */
  --mark-draw: 700ms;
  --mark-pop: 250ms;
  --mark-blink: 500ms;
  --mark-settle: 300ms;
  --rise-time: 500ms;
  --rise-step: 75ms;
}

:root[data-theme='light'] {
  color-scheme: light;
  --warn: #b3261e;
  --field: #ffffff;
  --field-line: #767679;
  --bg: #fafafa;
  --surface: #ffffff;
  --line: rgba(0, 0, 0, 0.14);
  --text: #1d1d1f;
  --text-soft: #515154;
  --accent: #c23a22;
  --accent-2: #c2185b;
  --on-accent: #ffffff;
  --glow: color-mix(in oklab, var(--accent) 16%, transparent);
  --glow-2: color-mix(in oklab, var(--accent-2) 12%, transparent);
  --control: rgba(0, 0, 0, 0.06);
  --chosen: #1d1d1f;
  --on-chosen: #ffffff;
  --focus: #c23a22;
  --line-strong: rgba(0, 0, 0, 0.2);
  --text-faint: #6b6b70;
  --rail-bg: rgba(0, 0, 0, 0.025);
  --ring: rgba(194, 58, 34, 0.22);
  --light-green: #1b7f45;
  --light-amber: #946200;
  --light-red: #b3261e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --warn: #b3261e;
    --field: #ffffff;
    --field-line: #767679;
    --bg: #fafafa;
    --surface: #ffffff;
    --line: rgba(0, 0, 0, 0.14);
    --text: #1d1d1f;
    --text-soft: #515154;
    --accent: #c23a22;
    --accent-2: #c2185b;
    --on-accent: #ffffff;
    --glow: color-mix(in oklab, var(--accent) 16%, transparent);
    --glow-2: color-mix(in oklab, var(--accent-2) 12%, transparent);
    --control: rgba(0, 0, 0, 0.06);
    --chosen: #1d1d1f;
    --on-chosen: #ffffff;
    --focus: #c23a22;
    --line-strong: rgba(0, 0, 0, 0.2);
    --text-faint: #6b6b70;
    --rail-bg: rgba(0, 0, 0, 0.025);
    --ring: rgba(194, 58, 34, 0.22);
    --light-green: #1b7f45;
    --light-amber: #946200;
    --light-red: #b3261e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  }
}

[hidden] { display: none !important; }

p { text-wrap: pretty; }

/* The bar stays on top, so whatever takes focus or is scrolled to lands clear of it. */
html { scroll-padding-block-start: 9rem; }

/* The page's scroller says which way it was last scrolled: scrolling down moves the bar out of view, scrolling up
   brings it back, and it stays while focus is in it. A browser without the query keeps the bar where it is. */
html { container-type: scroll-state; }
@container scroll-state((scrolled: bottom) and (scrollable: top)) {
  .top:not(:focus-within) { translate: 0 -100%; }
}

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

/* Sizes in rem, line height without a unit, and no font size on the root, so that the reader's own text size holds. */
body {
  margin: 0;
  min-block-size: 100dvh;
  background: radial-gradient(60rem 34rem at 50% -10rem, var(--glow), transparent 70%) no-repeat, var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* The bar at the top: the mark on one side, the reader's choices on the other; they wrap below on a narrow screen. */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.625rem clamp(1rem, 4vw, 2rem);
  border-block-end: 1px solid var(--line);
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  background: var(--top);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-inline-end: auto;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

/* The Quixes mark: the Q's open ring in the text colour, the x as its tail and a typing cursor in the accent. */
.mark { color: var(--text); }
.mark-accent { stroke: var(--accent); }
/* The large mark over the headline, with the glow behind it. */
.hero-mark { inline-size: clamp(5.5rem, 16vw, 7.5rem); block-size: auto; filter: drop-shadow(0 0 1.75rem var(--glow)); }

/* On a phone the choices of language and theme sit behind one button, in a popover that the browser opens and
   closes itself; on a wider screen they stay in the bar. */
.settings { display: inline-grid; place-items: center; inline-size: var(--tap); block-size: var(--tap); padding: 0; border: 1px solid var(--field-line); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.prefs:popover-open { position: fixed; inset: 4.25rem 1rem auto auto; margin: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0.875rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); box-shadow: var(--pop-shadow); }
.prefs:popover-open .pref { justify-content: space-between; gap: 1rem; }
.prefs:popover-open .pref-name { position: static; inline-size: auto; block-size: auto; overflow: visible; clip-path: none; font-size: var(--size-small); font-weight: 600; color: var(--text-soft); }
@media (min-width: 30.0625em) {
  .settings { display: none; }
  .prefs[popover]:not(:popover-open) { position: static; inset: auto; display: flex; inline-size: auto; block-size: auto; margin: 0; padding: 0; border: 0; overflow: visible; background: none; color: inherit; }
}

/* The account line and the way out, or the way in, at the end of the bar. */
.top .account { display: flex; align-items: center; gap: 0.625rem; }
.top .account p { margin: 0; font-size: var(--size-small); color: var(--text-soft); overflow-wrap: anywhere; }
.top .account strong { color: var(--text); }

/* No display of its own: closed, the popover is hidden by the browser; open, or on a wide screen, it is a row. */
.prefs { flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pref { display: flex; align-items: center; }
/* Read out, never shown: the name of each group of choices, and the full name of each choice. */
.pref-name, .sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* A small pill of choices: two-letter codes for the language, icons for the theme. The pill is slim; each button
   reaches past it to a full target, so it is as easy to press as any other. */
.seg { display: flex; gap: 0.125rem; padding: 0.125rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.seg button {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-inline-size: 2rem;
  block-size: 2rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font: 700 0.75rem var(--font);
  letter-spacing: 0.06em;
  cursor: pointer;
}
.seg button::after { content: ''; position: absolute; inset: -0.375rem -0.125rem; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed='true'] { background: var(--chosen); color: var(--on-chosen); }
.icon { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
/* The name shows as a tip under the button while the pointer or the focus is on it. */
.seg button:is(:hover, :focus-visible) .sr { inset: calc(100% + 0.5rem) auto auto 50%; inline-size: auto; block-size: auto; overflow: visible; clip-path: none; translate: -50% 0; padding: 0.25rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-weight: 600; letter-spacing: 0; z-index: 1; pointer-events: none; }

/* One column, wide enough for a list with its buttons on one line; each part of the page is a card of its own. */
main {
  inline-size: 100%;
  max-inline-size: 48rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

h1 { margin: 0; font-size: var(--size-title); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; max-inline-size: 22ch; }
/* Once someone is signed in the page is theirs to work in: the line that says what Quixes is steps aside. */
body:has(#state-in:not([hidden])) :is(h1, .eyebrow, .lede) { display: none; }
body:has(#state-in:not([hidden])) .hero-mark { display: none; }

/* Before sign-in the page is one centred hero: the mark, a short line, the headline, the way in and three cards. */
.eyebrow { margin: 0; padding: 0.375rem 0.875rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: var(--size-small); font-weight: 600; color: var(--text-soft); }
body:has(#state-failed:not([hidden])) main, body:has(#state-loading:not([hidden])) main, body:has(#state-out:not([hidden])) main { align-items: center; text-align: center; max-inline-size: 66rem; padding-block-start: clamp(2.5rem, 9vw, 6rem); }
body:has(#state-out:not([hidden])) h1 { font-size: clamp(2.375rem, 7vw, 4.5rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.04; max-inline-size: 15ch; }
/* One sentence under the headline on what Quixes holds. */
.lede { margin: 0; max-inline-size: 34ch; font-size: 1.125rem; color: var(--text-soft); text-wrap: pretty; }
/* A small mark on what is not on the site yet. */
.soon { display: inline-block; margin-inline-start: 0.375rem; padding: 0.0625rem 0.5rem; border: 1px solid var(--line); border-radius: 999px; font-size: var(--size-small); font-weight: 600; letter-spacing: 0; color: var(--accent); vertical-align: 0.125em; }
/* The sign-in card: a title, the one way in, and two short lines on what is read. */
#state-out { align-self: center; inline-size: min(100%, 28rem); align-items: stretch; gap: 1.25rem; text-align: start; padding: clamp(1.5rem, 4vw, 2.25rem); }
#state-out > h2 { font-size: 1.5rem; }
.sign-in { gap: 0.625rem; min-block-size: 3.25rem; }
.gh { flex: none; fill: currentColor; }
.checks { display: flex; flex-direction: column; gap: 0.625rem; margin: 0; padding: 0; list-style: none; font-size: var(--size-label); color: var(--text-soft); }
.checks li { display: flex; gap: 0.625rem; text-wrap: pretty; }
/* A tick for the eye only: its alternative text is empty, so a screen reader reads the sentence alone. */
.checks li::before { content: '✓'; content: '✓' / ''; flex: none; font-weight: 700; color: var(--accent); }
/* What Quixes does, before sign-in only. */
body:not(:has(#state-out:not([hidden]))) #features { display: none; }
.features { align-self: stretch; inline-size: min(100%, 66rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: clamp(1.5rem, 5vw, 3.5rem) 0 0; padding: 0; list-style: none; text-align: start; counter-reset: feature; }
.features li { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); counter-increment: feature; }
.features li::before { content: counter(feature, decimal-leading-zero); content: counter(feature, decimal-leading-zero) / ''; font-size: var(--size-small); font-weight: 700; color: var(--accent); }
.features li:hover { border-color: color-mix(in oklab, var(--accent), transparent 50%); }
.features h2 { font-size: 1.125rem; }
.features p { margin: 0; }

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  position: relative;
}
.card p { margin: 0; max-inline-size: 60ch; }
.soft { color: var(--text-soft); }
.warn { color: var(--warn); }
/* A line that speaks stays in the page while it is empty, so that what is written into it is said; it only takes
   no room. */
.card p:empty, .part p:empty, .stack > p:empty, .sidebar p:empty { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }

h2 { margin: 0; font-size: 1.3125rem; font-weight: 750; letter-spacing: -0.03em; overflow-wrap: anywhere; text-wrap: balance; }
h3 { margin: 0.5rem 0 0; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }

/* What a signed-in reader sees: the cards, one under another (the account line is in the bar at the top). */
.stack { display: flex; flex-direction: column; gap: 1.5rem; position: relative; }
.stack:focus { outline: none; }

.part { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; position: relative; }
.part:focus { outline: none; }
.part.stack { gap: 1.5rem; }
.title { font-size: clamp(1.375rem, 1rem + 1.5vw, 1.75rem); }
/* A project's name opens it; the whole line answers to the pointer, and a mark at its end says it leads on. */
.open { padding: 0; border: 0; background: none; color: var(--text); font: 600 var(--size-body) var(--font); text-align: start; cursor: pointer; overflow-wrap: anywhere; min-block-size: var(--tap); }
.open::after { content: ''; position: absolute; inset: 0; }
/* A line's full-line target stays on its own line, in every list (code review of pull request 152, again in the teams page). */
li:has(> .open) { position: relative; }
/* The name, its role and the mark that leads on stay on one line; a long name wraps inside its own room. */
#projects li, #teams li { position: relative; flex-wrap: nowrap; }
#projects li:hover, #teams li:hover { background: var(--control); }
/* The mark is for the eye only: its alternative text is empty, so a screen reader does not read it out. */
#projects li::after, #teams li::after { content: '›'; content: '›' / ''; font-size: var(--size-body); line-height: 1; color: var(--text-soft); }
#projects li:first-child, #teams li:first-child { border-start-start-radius: 11px; border-start-end-radius: 11px; }
#projects li:last-child, #teams li:last-child { border-end-start-radius: 11px; border-end-end-radius: 11px; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.start select { align-self: stretch; min-block-size: var(--tap); padding: 0 0.75rem; border: 1px solid var(--field-line); border-radius: 12px; background: var(--field); color: var(--text); font: 400 var(--size-body) var(--font); }
#invite-link { align-self: stretch; min-block-size: var(--tap); padding: 0 0.875rem; border: 1px solid var(--field-line); border-radius: 12px; background: var(--field); color: var(--text); font: 400 var(--size-small) var(--font); }

/* A part the reader opens: its summary is a quiet pill with a mark that turns; what it holds follows it. */
.disclose { align-self: stretch; }
.disclose > summary { display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: var(--tap); padding: 0 1rem; border: 1px solid var(--field-line); border-radius: 999px; font-weight: 600; font-size: var(--size-label); cursor: pointer; list-style: none; }
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary::before { content: '+'; content: '+' / ''; font-weight: 700; color: var(--accent); }
.disclose[open] > summary::before { content: '−'; content: '−' / ''; }
.disclose[open] > summary { margin-block-end: 0.75rem; }

/* A list: one line per thing, its name first, what it is after it, and its buttons together at the end. */
.list { align-self: stretch; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; min-block-size: var(--tap); padding: 0.5rem 1rem; overflow-wrap: anywhere; }
.list li > :first-child { flex: 1 1 12rem; min-inline-size: 0; }
/* A line that begins with what it is (a link's kind): the badge keeps its size, and what follows takes the room. */
.list li > .role:first-child { flex: 0 0 auto; }
/* What to do about a repository's playbook state: soft text that wraps, on a line of its own after the state. */
.list li > .why { flex: 1 0 100%; white-space: normal; }
.list li > .role:first-child + span { flex: 1 1 12rem; min-inline-size: 0; text-align: end; }
/* A task: its number, its title read from the start, then its status and the button that moves it, together at the end. */
.tasks li > .role:first-child + span { text-align: start; }
.tasks li > button { margin-inline-start: auto; }
/* A meeting's notes keep their lines, on a line of their own below it (B10 slice 5b). */
.meetings li > :first-child { flex: 1 1 100%; font-weight: 600; }
.meetings li > .role { flex: 0 0 auto; }
.meetings li > .assignee { flex: 1 1 0; min-inline-size: 0; text-align: start; font-size: var(--size-small); color: var(--text-soft); }
.meetings .notes { white-space: pre-line; flex-basis: 100%; font-size: var(--size-small); color: var(--text-soft); }
/* The start and the length side by side where there is room (UI review of pull request 159). */
.start .pair { align-self: stretch; display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.start .pair .field { display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 40em) { .start .pair { grid-template-columns: 1fr 1fr; } }
/* Who is in it: chips that wrap, the chosen ones edged in the accent. */
#meeting-people { display: flex; flex-wrap: wrap; gap: 0.5rem; border: 0; border-radius: 0; }
#meeting-people li { border: 1px solid var(--field-line); border-radius: 999px; padding: 0 0.875rem; }
#meeting-people li > :first-child { flex: 0 0 auto; }
#meeting-people li:has(input:checked) { border-color: var(--accent); background: var(--control); }
#meeting-people li { position: relative; }
#meeting-people li:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
#meeting-people li:has(input:checked) label::before { content: '✓' / ''; font-weight: 700; color: var(--accent); }
/* Who is in a meeting: a group without the browser's frame; its people are chips (below). */
.picks { align-self: stretch; margin: 0; padding: 0; border: 0; }
.picks legend { padding: 0; margin-block-end: 0.5rem; font-size: var(--size-small); font-weight: 600; color: var(--text-soft); }
.start .picks label { display: flex; align-items: center; gap: 0.75rem; flex: 1 1 auto; min-block-size: var(--tap); font-size: var(--size-body); font-weight: 400; color: var(--text); cursor: pointer; }
.list li + li { border-block-start: 1px solid var(--line); }
/* A role, or what something is, as a small badge. */
.role, #project-role { display: inline-flex; align-items: center; padding: 0.125rem 0.625rem; border-radius: 999px; background: var(--control); font-size: var(--size-small); font-weight: 600; color: var(--text-soft); white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-inline-start: auto; }
.stacked { display: flex; flex-direction: column; gap: 0.125rem; }
.small { font-size: var(--size-small); }

.start { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.start label, .start legend { font-size: var(--size-small); font-weight: 600; color: var(--text-soft); }
/* The field and its button on one line where there is room for both. */
.inline { align-self: stretch; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.inline input { flex: 1 1 16rem; min-inline-size: 0; }
.start input {
  align-self: stretch;
  min-block-size: var(--tap);
  padding: 0 0.875rem;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font: 400 var(--size-body) var(--font);
}
/* A field over several lines looks like the others: the same edge, ground and font. */
.start textarea { align-self: stretch; padding: 0.75rem 0.875rem; border: 1px solid var(--field-line); border-radius: 12px; background: var(--field); color: var(--text); font: 400 var(--size-body)/1.5 var(--font); resize: vertical; }
/* A chip's box is hidden from sight but not from a keyboard or a screen reader: the chip shows its state (polish after pull request 159). */
#meeting-people input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.button:disabled { opacity: 0.55; cursor: default; }
/* A field the server refused, by the page's own mark: a heavier edge in the warning colour, never on a field the
   script emptied after a success. */
.start input[aria-invalid='true'] { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
#login { overflow-wrap: anywhere; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--tap);
  padding: 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 600 var(--size-body) var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button:hover:not(:disabled) { background: var(--control); }
/* One primary look everywhere, as on the landing page: the accent, solid. */
.button.primary { border-color: transparent; background: var(--accent); color: var(--on-accent); box-shadow: 0 0.75rem 2rem -1rem var(--glow); }
.button.primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.08); }
/* A quiet button: a way back or out, which should not draw the eye from the work on the page. */
/* Smaller words and less room, the same target to press. */
.button.quiet { min-block-size: var(--tap); padding: 0 1rem; font-size: var(--size-small); }
.list .button { min-block-size: var(--tap); padding: 0 1rem; font-size: var(--size-small); }
/* The way in or out at the top right: a small button with a short word, 32 px high; an overlay reaches past it
   above and below, so it is still a 44 px target (review of pull request 189). */
.top .compact { position: relative; min-block-size: 2rem; padding: 0 0.875rem; font-size: var(--size-small); }
.top .compact::after { content: ''; position: absolute; inset: -0.375rem 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* A card takes focus only when the script puts it there after a press; it is not a control and shows no ring. */
.card:focus { outline: none; }

/* On a narrow screen the two choices share one line under the mark: their names are still read out, not shown. */
@media (max-width: 30em) {
  /* The mark stands for the name in a one-row bar; the name is still read out. */
  .brand > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* The last button's tip opens towards the page, so it never runs off the screen. */
  .seg button:last-child:is(:hover, :focus-visible) .sr { inset-inline-start: auto; inset-inline-end: 0; translate: none; }
}

/* On a wide screen the hero and the card sit side by side: the words and what Quixes does on one side, the card on
   the other. The order in the page stays mark, words, card, features, so Tab and screen readers meet the card first. */
@media (min-width: 60em) {
  body:has(#state-out:not([hidden])) main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(22rem, 0.9fr); column-gap: clamp(2.5rem, 6vw, 6rem); row-gap: 1.25rem; align-content: center; justify-items: start; text-align: start; max-inline-size: 72rem; min-block-size: calc(100dvh - 5rem); padding-block: 3rem; }
  body:has(#state-out:not([hidden])) main > :is(.hero-mark, .eyebrow, h1, .lede, #features) { grid-column: 1; }
  body:has(#state-out:not([hidden])) #state-out { grid-column: 2; grid-row: 3 / span 2; align-self: start; justify-self: stretch; inline-size: auto; margin-block-start: 0.5rem; }
  body:has(#state-out:not([hidden])) #features { grid-template-columns: 1fr; gap: 0.75rem; margin: 0.75rem 0 0; inline-size: 100%; }
  /* The number in a column of its own, so every title and line starts at the same place. */
  body:has(#state-out:not([hidden])) #features li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); align-items: baseline; column-gap: 0.75rem; row-gap: 0.25rem; padding: 1rem 1.25rem; }
  body:has(#state-out:not([hidden])) #features li p { grid-column: 2; }
  body:has(#state-out:not([hidden])) h1 { max-inline-size: 13ch; font-size: clamp(2.5rem, 4.5vw, 3.75rem); }
  body:has(#state-out:not([hidden])) .hero-mark { inline-size: 4.5rem; }
}

/* Signed in, the page is an app: the projects in a sidebar, and the work beside them in the width of the screen. */
body:has(#state-in:not([hidden])) main { max-inline-size: 80rem; }
.shell { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding: clamp(1.25rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); position: relative; }
.sidebar h2 { font-size: 1.125rem; }
.workspace { display: flex; flex-direction: column; gap: 1.5rem; min-inline-size: 0; }
/* Up to a wide screen the list is the home: a project, once open, has the width to itself. */
@media (max-width: 74.99em) {
  .home-hint { display: none; }
  body:has(#project:not([hidden])) .sidebar { display: none; }
  body:has(#team:not([hidden])) .sidebar { display: none; }
  /* The sidebar shows only with the home part here, so its way to Today has nowhere to go. */
  .sidebar .rail-today { display: none; }
  .rail-group:first-of-type { margin-block-start: 0; }
}
/* On a wide screen the page is an app shell. The bar becomes a slim rail down the left edge: the brand at its top, the
   reader's choices and account at its foot. The sidebar's lists fill the rail between the two and scroll there; the
   work has the rest of the width. In the page the order stays bar, then lists, then work, so Tab meets them so. */
@media (min-width: 75em) {
  .shell { display: block; }
  body:has(#state-in:not([hidden])) { padding-inline-start: var(--rail); }
  body:has(#state-in:not([hidden])) .top { position: fixed; inset: 0 auto 0 0; inline-size: var(--rail); flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0 1rem; border-block-end: 0; border-inline-end: 1px solid var(--line); background: var(--rail-bg); }
  body:has(#state-in:not([hidden])) .top:not(:focus-within) { translate: none; }
  body:has(#state-in:not([hidden])) .brand { flex: none; min-block-size: var(--rail-head); margin: 0; padding-inline: 0.5rem; font-size: 1.125rem; }
  body:has(#state-in:not([hidden])) .prefs { margin-block-start: auto; justify-content: space-between; padding: 0.875rem 0 0.75rem; border-block-start: 1px solid var(--line); }
  body:has(#state-in:not([hidden])) .top .account { justify-content: space-between; gap: 0.5rem; padding-block-end: 1rem; }
  /* A long login stays on one line in the rail, so the account is one row high (review of pull request 190); its
     full text is still read out. */
  body:has(#state-in:not([hidden])) .top .account p { flex: 1 1 auto; }
  body:has(#state-in:not([hidden])) #login { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar { position: fixed; inset-block: var(--rail-head) var(--rail-foot); inset-inline-start: 0; inline-size: var(--rail); overflow-y: auto; z-index: 11; padding: 0 1rem 1rem; border: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* Where the browser can, the lists end where the reader's choices begin, however tall the foot is. */
  @supports (anchor-name: --rail-foot) {
    body:has(#state-in:not([hidden])) .prefs { anchor-name: --rail-foot; }
    .sidebar { inset-block-end: anchor(--rail-foot top); }
  }
  body:has(#state-in:not([hidden])) main { padding-block-start: 2.5rem; }
}

/* A project's head: a quiet way back, then its name with the reader's role beside it. */
.back { display: inline-flex; align-items: center; gap: 0.375rem; min-block-size: var(--tap); padding: 0; border: 0; background: none; color: var(--text-soft); font: 600 var(--size-small) var(--font); cursor: pointer; }
.back::before { content: '‹'; content: '‹' / ''; font-size: 1.375rem; line-height: 1; }
.back:hover { color: var(--text); }
.project-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }

/* The tasks as a board: four columns, one per status, each card in its own; on a narrow screen the board scrolls
   sideways a column at a time. The column heads are for the eye: each card still names its status for a reader. */
.board { align-self: stretch; display: flex; flex-direction: column; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-block-end: 0.25rem; }
.board-head, #project-tasks { display: grid; grid-template-columns: repeat(4, minmax(13rem, 1fr)); column-gap: 0.75rem; }
.board-head:has(+ #project-tasks[hidden]) { display: none; }
.board-head span { padding-inline: 0.25rem; font-size: var(--size-small); font-weight: 700; color: var(--text-soft); scroll-snap-align: start; }
#project-tasks.list { border: 0; align-items: start; }
/* A column: its own stack of cards (polish after pull request 159). */
#project-tasks > li { display: block; min-block-size: 0; padding: 0; border: 0; scroll-snap-align: start; }
#project-tasks .cards { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
#project-tasks .cards > li { position: relative; scroll-snap-align: start; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0.5rem; padding: 0.875rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
#project-tasks .cards > li > * { flex: none; }
/* The card's two text buttons share one line: everything else spans the card (UI review of pull request 155). */
#project-tasks .cards > li { display: grid; grid-template-columns: auto 1fr; align-items: center; justify-items: start; column-gap: 0.75rem; }
#project-tasks .cards > li > :not(.task-link) { grid-column: 1 / -1; }
#project-tasks .cards > li > .role:first-child { align-self: flex-start; }
#project-tasks .cards > li > :nth-child(3) { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#project-tasks .cards > li > button { align-self: flex-start; margin-inline-start: 0; }
/* The assign control: a quiet text button, so the step stays the card's one pill; still a full target. */
.task-link { align-self: flex-start; display: inline-flex; align-items: center; justify-content: flex-start; min-block-size: var(--tap); min-inline-size: var(--tap); padding: 0; border: 0; background: none; color: var(--text-soft); font: 600 var(--size-small) var(--font); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.task-link:hover { color: var(--text); }
/* A step that loses something (taking someone out, leaving, deleting) is marked in the warning colour, never by colour alone: its words say it. */
.task-link.danger { color: var(--warn); }
.button.danger { border-color: var(--warn); color: var(--warn); }
/* Deleting a team sits apart, under a line, so it does not read as part of the projects above it. */
.danger-zone { align-self: stretch; margin-block-start: 1rem; padding-block-start: 1rem; border-block-start: 1px solid var(--line); }
#team-people .task-link, #project-people .task-link { margin-inline-start: 0; }
.danger-zone:not(:has(> :not([hidden]))) { display: none; }
/* Whom the task is given to: a quiet line under its title. */
#project-tasks .cards > li > .assignee { font-size: var(--size-small); color: var(--text-soft); }
/* A task's details: a sheet the browser opens and closes, its fields stacked, its history under them. */
.task-sheet:popover-open { display: flex; flex-direction: column; gap: 0.75rem; inline-size: min(32rem, calc(100vw - 2rem)); max-block-size: 85dvh; overflow-y: auto; margin: auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); box-shadow: var(--pop-shadow); }
.task-sheet:popover-open::backdrop { background: var(--scrim); }
.task-sheet h3 { margin: 0; font-size: 1.125rem; }
.task-sheet h4 { margin: 0.5rem 0 0; font-size: var(--size-label); }
.task-sheet textarea { align-self: stretch; min-block-size: 6rem; padding: 0.625rem 0.875rem; border: 1px solid var(--field-line); border-radius: 12px; background: var(--field); color: var(--text); font: 400 var(--size-body) var(--font); resize: vertical; }
.task-sheet [readonly] { border-style: dashed; }
/* The lead's menu of people for one task: a small panel the browser opens and closes. */
.assign-menu:popover-open { display: flex; flex-direction: column; gap: 0.75rem; inline-size: min(22rem, calc(100vw - 2rem)); max-block-size: 70dvh; overflow-y: auto; margin: auto; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); box-shadow: var(--pop-shadow); }
.assign-menu h3 { margin: 0; }
/* Each choice's full-line target stays on its own line (code review of pull request 152). */
#assign-list li { position: relative; }
#assign-list li:hover { background: var(--control); }
#project-tasks > li[data-status='todo'] { grid-column: 1; }
#project-tasks > li[data-status='in_progress'] { grid-column: 2; }
#project-tasks > li[data-status='in_review'] { grid-column: 3; }
#project-tasks > li[data-status='done'] { grid-column: 4; }
/* From a tablet up the four columns fit without a sideways scroll; a task's button wraps its words in a narrow card. */
@media (min-width: 48em) {
  .board-head, #project-tasks { grid-template-columns: repeat(4, minmax(9.5rem, 1fr)); }
}
#project-tasks .button { white-space: normal; text-align: center; }

/* Each state its own look. Loading: a small pill with a mark that turns for a reader who allows motion. */
#state-loading { flex-direction: row; align-items: center; align-self: center; gap: 0.75rem; padding: 0.75rem 1.25rem; border-radius: 999px; }
#state-loading::before { content: ''; flex: none; inline-size: 1rem; block-size: 1rem; border: 2px solid var(--line); border-block-start-color: var(--accent); border-radius: 50%; }
/* A failure: a centred card with a warning edge and a mark, the way to try again under the sentence. */
#state-failed { align-self: center; align-items: center; inline-size: min(100%, 28rem); text-align: center; border-color: color-mix(in oklab, var(--warn), transparent 40%); }
#state-failed::before { content: '!'; content: '!' / ''; display: grid; place-items: center; inline-size: 2.5rem; block-size: 2.5rem; border-radius: 50%; background: color-mix(in oklab, var(--warn), transparent 82%); color: var(--warn); font-weight: 800; font-size: 1.25rem; }
/* An invitation to join: a banner in the accent, above the work. */
#join-part { border-color: color-mix(in oklab, var(--accent), transparent 45%); background: linear-gradient(135deg, color-mix(in oklab, var(--accent), transparent 88%), var(--surface)); }
/* The project that is open, marked in the sidebar: a tinted line with an accent edge. */
#projects li:has([aria-current='page']) { background: var(--control); box-shadow: inset 3px 0 0 var(--accent); }
#teams li:has([aria-current='page']) { background: var(--control); box-shadow: inset 3px 0 0 var(--accent); }
#projects li:has([aria-current='page']) .open { color: var(--text); }
#teams li:has([aria-current='page']) .open { color: var(--text); }

/* Today: two short lists, each line pressed where it is; an empty list and its heading are not shown. */
#today-part li { position: relative; }
#today-part li:hover { background: var(--control); }
#today-part h3:has(+ .today[hidden]) { display: none; }

/* The sidebar's own look, as a card on a narrow screen and as the rail on a wide one: Today first, then each group
   with a quiet heading, its "+" at the heading's end, and its lines as plain rows. */
.sidebar { gap: 0.25rem; align-items: stretch; }
.rail-today { display: flex; align-items: center; gap: 0.625rem; min-block-size: 2.5rem; padding: 0 0.75rem; border: 0; border-radius: var(--radius-tiny); background: none; color: var(--text-soft); font: 600 var(--size-label) var(--font); text-align: start; cursor: pointer; }
.rail-today:hover { background: var(--control); color: var(--text); }
body:has(#home:not([hidden])) .rail-today { background: var(--control); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.rail-group { position: relative; display: flex; flex-direction: column; gap: 0.25rem; margin-block-start: 1.25rem; }
.rail-group > h2 { display: flex; align-items: center; min-block-size: 1.75rem; padding-inline: 0.75rem 2.5rem; font-size: var(--size-small); font-weight: 600; letter-spacing: 0; color: var(--text-faint); }
.rail-group > .disclose > summary { position: absolute; inset-block-start: 0; inset-inline-end: 0.25rem; justify-content: center; inline-size: 1.75rem; min-block-size: 1.75rem; padding: 0; border-color: var(--line); border-radius: var(--radius-tiny); font-size: 0; }
.rail-group > .disclose > summary::before { font-size: var(--size-body); line-height: 1; color: var(--text-soft); }
.rail-group > .disclose > summary:hover { background: var(--control); }
.rail-group > .disclose > summary:hover::before { color: var(--accent); }
.rail-group > .disclose > summary::after { content: ''; position: absolute; inset: -0.5rem; }
.rail-group > .disclose[open] > summary { margin: 0; border-color: var(--accent); }
.rail-group > .disclose[open] > .start { margin-block: 0.25rem 0.75rem; padding: 0.875rem; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); }
.sidebar .inline .button { flex: 1 1 auto; }
.sidebar .inline input { flex-basis: 100%; }
.sidebar p.soft, .sidebar p.warn { padding-inline: 0.75rem; font-size: var(--size-small); }
.sidebar .list { border: 0; border-radius: 0; }
.sidebar .list li { min-block-size: 2.5rem; padding: 0.25rem 0.75rem; border-radius: var(--radius-tiny); gap: 0.5rem; }
.sidebar .list li + li { border-block-start: 0; }
.sidebar .list li > :first-child { flex: 1 1 0; }
.sidebar .open { min-block-size: 2rem; font-weight: 500; font-size: var(--size-label); color: var(--text-soft); }
.sidebar .list li:hover .open { color: var(--text); }
.sidebar .role { padding: 0 0.5rem; background: none; border: 1px solid var(--line); font-size: var(--size-small); color: var(--text-faint); }
.sidebar #projects li::after, .sidebar #teams li::after { content: none; }
.sidebar #projects li:has([aria-current='page']), .sidebar #teams li:has([aria-current='page']) { box-shadow: inset 2px 0 0 var(--accent); }

/* The account at the rail's foot: a small round mark, the login, and the way out. */
.top .account p { display: flex; align-items: center; gap: 0.5rem; min-inline-size: 0; }
.top .account p::before { content: ''; flex: none; inline-size: 1.5rem; block-size: 1.5rem; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* A page's head: its title large, one line of context, and the page's one primary action at the end. */
.page-head { align-self: stretch; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.page-head-text { display: flex; flex-direction: column; gap: 0.375rem; min-inline-size: 0; }
.page-title, #project-title, #team-title { font-size: var(--size-page); font-weight: 750; letter-spacing: -0.035em; line-height: 1.1; }
.page-head p { margin: 0; color: var(--text-soft); }

/* Today: three counts in a row, each a number large and the words it counts; the late one takes the accent only
   when something is late (its words say it too). */
.stats { align-self: stretch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.5rem, 1.5vw, 1rem); margin: 0; padding: 0; list-style: none; }
.stat { display: flex; flex-direction: column; gap: 0.375rem; padding: clamp(0.875rem, 2vw, 1.25rem) clamp(0.875rem, 2.4vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat-count { font-size: clamp(1.75rem, 1.2rem + 1.6vw, var(--size-count)); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-name { font-size: var(--size-label); font-weight: 500; color: var(--text-soft); }
.stat-late .stat-count:not([data-zero]) { color: var(--accent); }
.stat .stat-count[data-zero] { color: var(--text-faint); }
/* With no project yet, the counts step aside for the empty state. */
body:has(#projects-note[data-text='projectsNone']) #today-stats { display: none; }
#today-part { gap: 1.25rem; }
/* Nothing waiting: a calm line with a tick, in place of empty lists. */
#today-note[data-text='todayNone'] { align-self: stretch; max-inline-size: none; padding: 1rem 1.25rem; border: 1px dashed var(--line-strong); border-radius: var(--radius-small); }
#today-note[data-text='todayNone']::before { content: '✓'; content: '✓' / ''; margin-inline-end: 0.625rem; font-weight: 700; color: var(--accent); }
.today-lists { align-self: stretch; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); gap: 1rem; }
.today-lists .panel:has(> .today[hidden]) { display: none; }
.today-lists:not(:has(> .panel > .today:not([hidden]))) { display: none; }
/* With no project yet the empty state's button is the one way on; the head's own steps aside. */
body:has(#projects-note[data-text='projectsNone']) #home-start { display: none; }
#today-part .today li { flex-wrap: nowrap; }
#today-part .today li > .role { flex: none; max-inline-size: 40%; overflow: hidden; text-overflow: ellipsis; }
#today-part .today li > :last-child { flex: none; font-size: var(--size-small); }

/* A panel: one section of the work, edged and on the surface; its lists inside are rows, not boxes in a box. */
.panel { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; gap: 0.875rem; min-inline-size: 0; padding: 1.25rem 1.5rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel > h3 { margin: 0; font-size: var(--size-body); font-weight: 700; letter-spacing: -0.015em; }
.panel .list { border: 0; border-radius: 0; margin-inline: -0.75rem; align-self: stretch; }
.panel .list li { padding-inline: 0.75rem; border-radius: var(--radius-tiny); }
.panel .list li + li { border-block-start: 1px solid var(--line); }
/* The board keeps its own columns and cards, flush with the panel's edge. */
#project-tasks.list { margin-inline: 0; }
/* A link's address reads from the start, beside its kind. */
.panel .list li > .role:first-child + span { text-align: start; }
/* An empty part says so in a quiet line. */
.panel > p.soft { font-size: var(--size-label); }

/* The home's two cards: a hint to pick a project, or, with none yet, the way to start the first one. */
.home-hint { gap: 0.25rem; padding: 1.25rem 1.5rem; border-style: dashed; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.home-hint h2 { font-size: var(--size-body); }
.home-hint p { font-size: var(--size-label); }
body:has(#projects-note[data-text='projectsNone']) .home-hint { display: none; }
body:not(:has(#projects-note[data-text='projectsNone'])) .home-empty { display: none; }
.home-empty { align-items: flex-start; gap: 0.75rem; padding: clamp(1.75rem, 4vw, 2.75rem); background: radial-gradient(28rem 14rem at 0% 0%, var(--glow-2), transparent 70%) no-repeat, var(--surface); }
.home-empty h2 { font-size: var(--size-heading); }
.home-empty .button { margin-block-start: 0.5rem; }

/* An open project: no card of its own, but a head over panels; on a wide screen the panels sit two to a row, the
   tasks and the meetings across the whole width. */
#project { gap: 1.25rem; padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
#project > .back { margin-block-end: -0.75rem; }
#project-role { border: 1px solid var(--line); background: var(--control); color: var(--text); }
#invite-part, #project-history { padding: 1.25rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
#project-history > summary { border: 0; padding: 0; min-block-size: 2rem; }
#invite-part h3 { margin: 0; font-size: var(--size-body); }
@media (min-width: 64em) {
  #project { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; column-gap: 1.25rem; }
  #project > :not(.panel, #invite-part) { grid-column: 1 / -1; }
  /* The way back spans the row, but only its words take a press (review of pull request 190). */
  #project > .back { justify-self: start; }
  .panel-wide { grid-column: 1 / -1; }
}

/* UI tests: a project's runs as rows; the run's name opens it, the rest is quiet detail on one line when it fits. */
.runs li { gap: 0.25rem 1rem; }
.runs li > .run-open { flex: 1 1 14rem; min-block-size: var(--tap); padding: 0; border: 0; background: none; color: var(--text); font: 650 var(--size-body) var(--font); text-align: start; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.25em; cursor: pointer; overflow-wrap: anywhere; }
.runs li > .run-open:hover { text-decoration-color: var(--accent); }
.runs li > span { font-size: var(--size-small); color: var(--text-soft); white-space: nowrap; }
.runs li > .run-day { color: var(--text); font-weight: 600; }
.runs li > .task-link { margin-inline-start: auto; }

/* Incremental UI tests: the last tested commit, then each flow with its state, in the tone of the four questions. */
.coverage { align-self: stretch; display: flex; flex-direction: column; gap: 0.5rem; }
.coverage-head { margin: 0; font-size: var(--size-label); font-weight: 600; color: var(--text); }
.flows .flow-name { font-family: var(--mono); font-size: var(--size-small); }
.flow-state { --tone: var(--text-soft); font-size: var(--size-small); font-weight: 650; color: var(--tone); white-space: nowrap; }
.flow-tested { --tone: var(--light-green); }
.flow-failed { --tone: var(--light-red); }
/* Not tested is owed work, not a failure: the soft tone, bold, so red stays for a failure alone. */
.flow-not-tested { font-weight: 750; }
/* Its missing profiles can be a long line: it wraps, where the short states stay on one line. */
.flow-state.flow-not-tested { white-space: normal; overflow-wrap: anywhere; }
#run-more > .start { gap: 0.75rem; }
#run-file { align-self: stretch; padding: 0.625rem; border: 1px dashed var(--field-line); border-radius: 10px; background: var(--field); color: var(--text); font: 400 var(--size-small) var(--font); }

/* A run's page: a head, the four questions, the top findings, and the session step by step beside its video. */
.run-page { gap: 2rem; }
.run-head { display: flex; flex-direction: column; align-items: flex-start; gap: 0.625rem; max-inline-size: 60rem; }
.run-meta { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; }
.run-meta > span { padding: 0.125rem 0.625rem; border: 1px solid var(--line); border-radius: 999px; background: var(--control); font-size: var(--size-small); font-weight: 600; color: var(--text-soft); }
.run-headline { margin: 0; font-size: var(--size-heading); font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; max-inline-size: 48ch; text-wrap: pretty; }
.run-points { margin: 0; padding-inline-start: 1.125rem; color: var(--text-soft); max-inline-size: 70ch; }
.run-points li + li { margin-block-start: 0.25rem; }
.run-section { align-self: stretch; display: flex; flex-direction: column; gap: 0.875rem; min-inline-size: 0; }
.run-section > h3 { margin: 0; font-size: var(--size-body); }

/* The four questions: the one loud part of the page. Each light is a ring with its word, the question, the verdict. */
.questions { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.question { --tone: var(--text-faint); display: flex; flex-direction: column; gap: 0.5rem; padding: 1.125rem 1.25rem 1.25rem; border: 1px solid var(--line); border-block-start: 3px solid var(--tone); border-radius: var(--radius-small); background: var(--surface); }
.question-green { --tone: var(--light-green); }
.question-amber { --tone: var(--light-amber); }
.question-red { --tone: var(--light-red); }
.light { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--size-small); font-weight: 700; color: var(--tone); }
.light::before { content: ''; inline-size: 0.875rem; block-size: 0.875rem; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px color-mix(in oklab, var(--tone) 22%, transparent); }
.light-unknown::before { background: none; border: 2px dashed var(--tone); box-shadow: none; }
.question-text { font-weight: 650; line-height: 1.3; text-wrap: balance; }
.verdict { font-size: var(--size-label); color: var(--text-soft); text-wrap: pretty; }

/* The top findings: severity on the edge, the words in a column, the evidence beside them on a wide screen. */
.run-findings { display: flex; flex-direction: column; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.finding { --tone: var(--text-faint); display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1.5rem; row-gap: 0.375rem; padding: 1.125rem 1.25rem; border: 1px solid var(--line); border-inline-start: 4px solid var(--tone); border-radius: var(--radius-small); background: var(--surface); }
.severity-2 { --tone: var(--light-amber); }
.severity-3, .severity-4 { --tone: var(--light-red); }
.finding > * { margin: 0; grid-column: 1; }
.finding > .severity, .finding > .verified { justify-self: start; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: var(--size-small); font-weight: 700; }
.finding > .severity { grid-row: 1; background: color-mix(in oklab, var(--tone) 18%, transparent); color: var(--text); }
.finding > .verified { grid-row: 1; justify-self: end; color: var(--text-soft); border: 1px solid var(--line); }
.verified-plausible { border-style: dashed; }
.finding-title { font-size: var(--size-body); font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.finding-summary { color: var(--text); max-inline-size: 70ch; }
.finding-why { color: var(--text-soft); font-style: italic; }
.finding-where, .finding-principles { font-size: var(--size-small); color: var(--text-soft); }
.finding-code { justify-self: start; padding: 0.125rem 0.5rem; border-radius: var(--radius-tiny); background: var(--control); font-size: var(--size-small); overflow-wrap: anywhere; }
.finding-shot { inline-size: 100%; max-inline-size: 22rem; block-size: auto; max-block-size: 14rem; object-fit: cover; object-position: top; margin-block: 0.5rem 0.25rem; border: 1px solid var(--line); border-radius: var(--radius-tiny); background: var(--control); }
.finding > .watch { margin-inline-start: 0; }
/* On a wide screen the evidence sits at the card's end, cut to the top of the screen it shows, as tall as the words. */
@media (min-width: 52em) {
  .finding { position: relative; }
  .finding:has(> .finding-shot) { min-block-size: 13rem; padding-inline-end: calc(16rem + 2.5rem); }
  .finding > .finding-shot { position: absolute; inset-block: 1.125rem; inset-inline-end: 1.25rem; inline-size: 16rem; block-size: calc(100% - 2.25rem); margin: 0; object-fit: cover; object-position: top; }
}

/* Step by step: the screenshot as the persona saw it, their words beside it, and the session's video. */
.run-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.run-pick label { font-size: var(--size-small); font-weight: 600; color: var(--text-soft); }
#run-session { min-block-size: var(--tap); max-inline-size: 100%; padding: 0 0.75rem; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--text); font: 400 var(--size-body) var(--font); }
.run-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.flow:focus-visible, #run-video:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.flow-shot { display: grid; place-items: center; border-radius: var(--radius-small); overflow: hidden; }
.flow-shot:has(> img) { min-block-size: 8rem; background: var(--control); }
.flow-image { display: block; inline-size: 100%; max-block-size: 28rem; object-fit: contain; }
.flow-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; min-inline-size: 0; }
.flow-text > p { margin: 0; }
.flow-count { font-size: var(--size-small); font-weight: 700; color: var(--accent); }
.flow-screen { font-weight: 700; font-size: var(--size-body); }
.flow-action { font-size: var(--size-small); color: var(--text-soft); }
.flow-thought { margin: 0.25rem 0; padding: 0.75rem 1rem; border-inline-start: 3px solid var(--accent); border-radius: 0 var(--radius-tiny) var(--radius-tiny) 0; background: var(--control); font-size: var(--size-body); line-height: 1.45; quotes: '“' '”'; }
.flow-thought:not(:empty)::before { content: open-quote; }
.flow-thought:not(:empty)::after { content: close-quote; }
.flow-outcome { color: var(--text-soft); }
.flow-steps { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 0.25rem; }
.run-video { display: flex; flex-direction: column; gap: 0.5rem; min-inline-size: 0; }
#run-video { inline-size: 100%; max-block-size: 30rem; border-radius: var(--radius-small); background: var(--control); }
@media (min-width: 52em) {
  .flow { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}
@media (min-width: 80em) {
  .run-stage { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
}

/* Fields look like fields: a filled ground and a visible edge, and the accent with a soft ring where the reader types. */
.start input, .start select, .start textarea { border-radius: 10px; }
:is(.start input, .start select, .start textarea, .task-sheet textarea):focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); outline: none; }

/* Two slow lights behind the page. */
body::before, body::after { content: ''; position: fixed; z-index: -1; inline-size: 34rem; block-size: 34rem; border-radius: 50%; pointer-events: none; filter: blur(4rem); }
body::before { inset-block-start: 30vh; inset-inline-start: -14rem; background: var(--glow-2); }
body::after { inset-block-start: 60vh; inset-inline-end: -16rem; background: var(--glow); opacity: 0.6; }
body:has(#state-in:not([hidden]))::before, body:has(#state-in:not([hidden]))::after { opacity: 0.35; }

@media (prefers-reduced-motion: no-preference) {
  .top { transition: translate 200ms ease; }
  #state-loading::before { animation: turn 0.8s linear infinite; }
  @keyframes turn { to { rotate: 1turn; } }
  .button, .seg button { transition: background-color 120ms ease, filter 120ms ease, transform 120ms ease; }
  .button.primary:active:not(:disabled) { transform: scale(0.98); }
  /* In the app: a view fades in a step when it opens, and the rail's rows and the fields answer the pointer softly. */
  :is(#home, #project, #team):not([hidden]) { animation: enter 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  #ux-run:not([hidden]) { animation: enter 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .rail-today, .sidebar .list li, .rail-group > .disclose > summary { transition: background-color 120ms ease, color 120ms ease; }
  .start input, .start select, .start textarea { transition: border-color 120ms ease, box-shadow 120ms ease; }
  @keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .features li { transition: border-color 160ms ease, transform 160ms ease; }
  .features li:hover { transform: translateY(-3px); }
  /* The mark draws itself: the ring strokes in, the x pops in with a small overshoot, then the cursor blinks twice
     and stays; the glow breathes. In the bar the mark only settles in. */
  .hero-mark .mark-ring { stroke-dasharray: 100; animation: draw var(--mark-draw) ease-out both; }
  .hero-mark .mark-x { transform-box: fill-box; transform-origin: center; animation: pop var(--mark-pop) var(--mark-draw) cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .hero-mark .mark-cursor { animation: caret var(--mark-blink) calc(var(--mark-draw) + var(--mark-pop)) step-end 2 both; }
  .hero-mark { animation: breathe 5s 1.5s ease-in-out infinite; }
  .top .mark { animation: settle var(--mark-settle) ease-out both; }
  /* The hero rises in, one line after another. */
  :is(.eyebrow, h1, .lede, #state-out, #features) { animation: rise var(--rise-time) cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  h1 { animation-delay: var(--rise-step); }
  .lede { animation-delay: calc(var(--rise-step) * 2); }
  #state-out { animation-delay: calc(var(--rise-step) * 2); }
  #features { animation-delay: calc(var(--rise-step) * 3); }
  body::before { animation: drift 22s ease-in-out infinite alternate; }
  body::after { animation: drift 28s ease-in-out infinite alternate-reverse; }
  /* On a phone the two lights stand still: they are costly to move on a small device. */
  @media (max-width: 30em) { body::before, body::after { animation: none; } }
  @keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
  @keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
  @keyframes caret { 0% { opacity: 0; } 50%, 100% { opacity: 1; } }
  @keyframes settle { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
  @keyframes breathe { 0%, 100% { filter: drop-shadow(0 0 1.25rem var(--glow)); } 50% { filter: drop-shadow(0 0 2.75rem var(--glow)); } }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6rem, -4rem) scale(1.15); } }
}

/* Organizations (Quixes slice 13): the org home's checklist and playbook, and the onboarding wizard. */
.steps { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding-inline-start: 1.25rem; font-size: var(--size-label); color: var(--text-soft); }
/* Starting a company (Quixes slice 14): each step's control on a line of its own, under its words, so the two line up. */
#company-part .steps .button { display: flex; width: fit-content; margin-block-start: 0.5rem; }
/* The two places to start, each a short line: who it is for, then how. */
.company-paths { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; padding: 0; list-style: none; font-size: var(--size-label); }
.panel > h4, .start > h4 { margin: 0; font-size: var(--size-label); font-weight: 600; color: var(--text-soft); }
.list.files li { font: 400 var(--size-small) var(--mono); }
.preview { align-self: stretch; margin: 0; max-inline-size: 80ch; max-block-size: 24rem; overflow: auto; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--field); color: var(--text); font: 400 var(--size-small)/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.preview:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#wizard { max-inline-size: 46rem; }
#wizard-question { margin: 0; text-wrap: balance; }
.progress { align-self: stretch; inline-size: auto; block-size: 0.375rem; border: 0; border-radius: var(--radius-pill); background: var(--control); appearance: none; overflow: hidden; }
.progress::-webkit-progress-bar { background: var(--control); border-radius: var(--radius-pill); }
.progress::-webkit-progress-value { background: var(--accent); border-radius: var(--radius-pill); }
.progress::-moz-progress-bar { background: var(--accent); border-radius: var(--radius-pill); }
.choices { display: flex; flex-wrap: wrap; gap: 0.625rem; margin: 0; padding: 0; list-style: none; }
.choice { min-block-size: var(--tap); padding: 0 1.125rem; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font: 600 var(--size-label) var(--font); cursor: pointer; }
.choice:hover:not(:disabled) { background: var(--control); }
.choice[aria-pressed='true'] { border-color: transparent; background: var(--chosen); color: var(--on-chosen); }
.choice:active:not(:disabled) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice:disabled { opacity: 0.55; cursor: default; }
#wizard .start { align-self: stretch; }
#wizard .start textarea, #wizard .start input { font-family: var(--mono); }
#wizard #wizard-text { font-family: var(--font); }

/* The library (2026-11-25): items as quiet cards in a grid, desktop first; the company's own part on the org home. */
.rail-today[aria-current='page'] { background: var(--control); color: var(--text); }
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; align-self: stretch; margin: 0; padding: 0; list-style: none; }
.library > li { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); }
.library h3 { margin: 0; font-size: var(--size-body); font-weight: 600; overflow-wrap: anywhere; }
.library p { margin: 0; font-size: var(--size-label); overflow-wrap: anywhere; }
.library .row { flex-wrap: wrap; gap: 0.5rem; margin-block-start: auto; }
.library .preview { max-block-size: 16rem; }
#org-own .start { align-self: stretch; }
#org-add-text { font-family: var(--font); }
/* The kind is a group of two pills: a fieldset with no frame of its own, its legend set as the form's labels. */
.start .kinds { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.start .kinds > legend { padding: 0; margin-block-end: 0.5rem; }
#org-add-note:focus { outline: none; }
#org-add-note:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
