/* Generated by design/scripts/build.mjs from design/tokens.json. Do not edit; run `npm run build` in design/. */

/* Geist Serif has one weight and no italic, and only Geist Sans has real weights. Set font-synthesis: none where the
   serif or the wordmark is used, so a browser never draws a fake bold or italic. Licences: fonts/*-OFL.txt. */

@font-face {
  font-family: "Geist Serif";
  src: url("fonts/GeistSerif-Regular.98979c19f1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.3626eba547.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Prociono";
  src: url("fonts/Prociono-Regular.cfc641117f.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

/* Generated by design/scripts/build.mjs from design/tokens.json. Do not edit; run `npm run build` in design/. */

/* Light is the default. Dark follows the reader's setting unless data-theme on an element says otherwise;
   data-theme="light" or "dark" on any element sets that appearance for everything inside it. */
:root,
[data-theme="light"] {
  color-scheme: light;
  --color-background: #f6f7f8;
  --color-surface: #ffffff;
  --color-sunken: #f1f3f5;
  --color-ink: #0a0b0d;
  --color-body: #3b434c;
  --color-meta: #5f6b7b;
  --color-suffix: #b4bcc6;
  --color-line: #e3e7eb;
  --color-line-strong: #cfd5dc;
  --color-hover: #f2f4f6;
  --color-selected: #e9ecef;
  --color-on-ink: #ffffff;
  --color-danger: #c2341d;
  --color-danger-tint: #fdf1ee;
  --color-success: #17774d;
  --color-success-tint: #ecf6f0;
  --color-attention: #8a5300;
  --color-attention-tint: #fff1d6;
  --color-focus: #0a0b0d;
  --color-hat-red-fill: #b53031;
  --color-hat-red-on: #ffffff;
  --color-hat-red-tint: #ffeeec;
  --color-hat-orange-fill: #a34a00;
  --color-hat-orange-on: #ffffff;
  --color-hat-orange-tint: #feefe7;
  --color-hat-amber-fill: #875f02;
  --color-hat-amber-on: #ffffff;
  --color-hat-amber-tint: #fdf1dc;
  --color-hat-olive-fill: #666e11;
  --color-hat-olive-on: #ffffff;
  --color-hat-olive-tint: #f1f5e0;
  --color-hat-green-fill: #277a40;
  --color-hat-green-on: #ffffff;
  --color-hat-green-tint: #e5f9e8;
  --color-hat-teal-fill: #077771;
  --color-hat-teal-on: #ffffff;
  --color-hat-teal-tint: #e1f8f5;
  --color-hat-sky-fill: #027196;
  --color-hat-sky-on: #ffffff;
  --color-hat-sky-tint: #e4f6ff;
  --color-hat-blue-fill: #285fcd;
  --color-hat-blue-on: #ffffff;
  --color-hat-blue-tint: #edf3fe;
  --color-hat-violet-fill: #714cbd;
  --color-hat-violet-on: #ffffff;
  --color-hat-violet-tint: #f3f0ff;
  --color-hat-plum-fill: #914396;
  --color-hat-plum-on: #ffffff;
  --color-hat-plum-tint: #fdecfe;
  --color-hat-pink-fill: #a9356c;
  --color-hat-pink-on: #ffffff;
  --color-hat-pink-tint: #feedf3;
  --color-hat-slate-fill: #5a697c;
  --color-hat-slate-on: #ffffff;
  --color-hat-slate-tint: #eff3f8;
  --elevation-raised: 0 1px 2px 0 rgb(16 24 40 / 0.04), 0 1px 3px 0 rgb(16 24 40 / 0.05);
  --elevation-floating: 0 2px 4px 0 rgb(16 24 40 / 0.04), 0 8px 24px 0 rgb(16 24 40 / 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-background: #0a0b0d;
    --color-surface: #121417;
    --color-sunken: #0e1013;
    --color-ink: #f5f6f7;
    --color-body: #c3cbd4;
    --color-meta: #8a96a5;
    --color-suffix: #4f5661;
    --color-line: #22262c;
    --color-line-strong: #323840;
    --color-hover: #181b20;
    --color-selected: #1f2329;
    --color-on-ink: #0a0b0d;
    --color-danger: #ff7a66;
    --color-danger-tint: #2a1512;
    --color-success: #4cc38a;
    --color-success-tint: #10241a;
    --color-attention: #f5c36b;
    --color-attention-tint: #3a2a0a;
    --color-focus: #f5f6f7;
    --color-hat-red-fill: #fe9088;
    --color-hat-red-on: #0a0b0d;
    --color-hat-red-tint: #361a18;
    --color-hat-orange-fill: #f29d6c;
    --color-hat-orange-on: #0a0b0d;
    --color-hat-orange-tint: #341c0e;
    --color-hat-amber-fill: #d4ae6b;
    --color-hat-amber-on: #0a0b0d;
    --color-hat-amber-tint: #2d2008;
    --color-hat-olive-fill: #b2bb79;
    --color-hat-olive-on: #0a0b0d;
    --color-hat-olive-tint: #22250e;
    --color-hat-green-fill: #87c694;
    --color-hat-green-on: #0a0b0d;
    --color-hat-green-tint: #132818;
    --color-hat-teal-fill: #75c5be;
    --color-hat-teal-on: #0a0b0d;
    --color-hat-teal-tint: #0b2826;
    --color-hat-sky-fill: #6fc0e6;
    --color-hat-sky-on: #0a0b0d;
    --color-hat-sky-tint: #092633;
    --color-hat-blue-fill: #8bb4fe;
    --color-hat-blue-on: #0a0b0d;
    --color-hat-blue-tint: #172338;
    --color-hat-violet-fill: #baa3fe;
    --color-hat-violet-on: #0a0b0d;
    --color-hat-violet-tint: #241e36;
    --color-hat-plum-fill: #db99de;
    --color-hat-plum-on: #0a0b0d;
    --color-hat-plum-tint: #2e1b2f;
    --color-hat-pink-fill: #f490b8;
    --color-hat-pink-on: #0a0b0d;
    --color-hat-pink-tint: #341924;
    --color-hat-slate-fill: #a9b6c6;
    --color-hat-slate-on: #0a0b0d;
    --color-hat-slate-tint: #1f2329;
    --elevation-raised: 0 0 0 1px rgb(255 255 255 / 0.03);
    --elevation-floating: 0 0 0 1px rgb(255 255 255 / 0.05), 0 10px 30px 0 rgb(0 0 0 / 0.5);
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --color-background: #0a0b0d;
  --color-surface: #121417;
  --color-sunken: #0e1013;
  --color-ink: #f5f6f7;
  --color-body: #c3cbd4;
  --color-meta: #8a96a5;
  --color-suffix: #4f5661;
  --color-line: #22262c;
  --color-line-strong: #323840;
  --color-hover: #181b20;
  --color-selected: #1f2329;
  --color-on-ink: #0a0b0d;
  --color-danger: #ff7a66;
  --color-danger-tint: #2a1512;
  --color-success: #4cc38a;
  --color-success-tint: #10241a;
  --color-attention: #f5c36b;
  --color-attention-tint: #3a2a0a;
  --color-focus: #f5f6f7;
  --color-hat-red-fill: #fe9088;
  --color-hat-red-on: #0a0b0d;
  --color-hat-red-tint: #361a18;
  --color-hat-orange-fill: #f29d6c;
  --color-hat-orange-on: #0a0b0d;
  --color-hat-orange-tint: #341c0e;
  --color-hat-amber-fill: #d4ae6b;
  --color-hat-amber-on: #0a0b0d;
  --color-hat-amber-tint: #2d2008;
  --color-hat-olive-fill: #b2bb79;
  --color-hat-olive-on: #0a0b0d;
  --color-hat-olive-tint: #22250e;
  --color-hat-green-fill: #87c694;
  --color-hat-green-on: #0a0b0d;
  --color-hat-green-tint: #132818;
  --color-hat-teal-fill: #75c5be;
  --color-hat-teal-on: #0a0b0d;
  --color-hat-teal-tint: #0b2826;
  --color-hat-sky-fill: #6fc0e6;
  --color-hat-sky-on: #0a0b0d;
  --color-hat-sky-tint: #092633;
  --color-hat-blue-fill: #8bb4fe;
  --color-hat-blue-on: #0a0b0d;
  --color-hat-blue-tint: #172338;
  --color-hat-violet-fill: #baa3fe;
  --color-hat-violet-on: #0a0b0d;
  --color-hat-violet-tint: #241e36;
  --color-hat-plum-fill: #db99de;
  --color-hat-plum-on: #0a0b0d;
  --color-hat-plum-tint: #2e1b2f;
  --color-hat-pink-fill: #f490b8;
  --color-hat-pink-on: #0a0b0d;
  --color-hat-pink-tint: #341924;
  --color-hat-slate-fill: #a9b6c6;
  --color-hat-slate-on: #0a0b0d;
  --color-hat-slate-tint: #1f2329;
  --elevation-raised: 0 0 0 1px rgb(255 255 255 / 0.03);
  --elevation-floating: 0 0 0 1px rgb(255 255 255 / 0.05), 0 10px 30px 0 rgb(0 0 0 / 0.5);
}

/* Values that are the same in light and dark. Type sizes are rem, so they follow the reader's text size. */
:root {
  --font-family-serif: "Geist Serif", "Georgia", serif;
  --font-family-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-family-mono: ui-monospace, "SF Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;
  --font-family-wordmark: "Prociono", "Georgia", serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --type-display-family: var(--font-family-serif);
  --type-display-size: 2.125rem;
  --type-display-weight: 400;
  --type-display-line-height: 1.15;
  --type-display-tracking: -0.01em;
  --type-display: 400 2.125rem/1.15 var(--font-family-serif);
  --type-title-family: var(--font-family-serif);
  --type-title-size: 1.625rem;
  --type-title-weight: 400;
  --type-title-line-height: 1.2;
  --type-title-tracking: -0.005em;
  --type-title: 400 1.625rem/1.2 var(--font-family-serif);
  --type-heading-family: var(--font-family-serif);
  --type-heading-size: 1.25rem;
  --type-heading-weight: 400;
  --type-heading-line-height: 1.3;
  --type-heading-tracking: 0;
  --type-heading: 400 1.25rem/1.3 var(--font-family-serif);
  --type-reading-family: var(--font-family-serif);
  --type-reading-size: 1.0625rem;
  --type-reading-weight: 400;
  --type-reading-line-height: 1.55;
  --type-reading-tracking: 0;
  --type-reading: 400 1.0625rem/1.55 var(--font-family-serif);
  --type-body-family: var(--font-family-sans);
  --type-body-size: 0.9375rem;
  --type-body-weight: 400;
  --type-body-line-height: 1.5;
  --type-body-tracking: 0;
  --type-body: 400 0.9375rem/1.5 var(--font-family-sans);
  --type-label-family: var(--font-family-sans);
  --type-label-size: 0.8125rem;
  --type-label-weight: 500;
  --type-label-line-height: 1.35;
  --type-label-tracking: 0;
  --type-label: 500 0.8125rem/1.35 var(--font-family-sans);
  --type-caption-family: var(--font-family-sans);
  --type-caption-size: 0.75rem;
  --type-caption-weight: 400;
  --type-caption-line-height: 1.35;
  --type-caption-tracking: 0;
  --type-caption: 400 0.75rem/1.35 var(--font-family-sans);
  --type-mono-family: var(--font-family-mono);
  --type-mono-size: 0.8125rem;
  --type-mono-weight: 400;
  --type-mono-line-height: 1.5;
  --type-mono-tracking: 0;
  --type-mono: 400 0.8125rem/1.5 var(--font-family-mono);
  --type-wordmark-family: var(--font-family-wordmark);
  --type-wordmark-size: 1.375rem;
  --type-wordmark-weight: 400;
  --type-wordmark-line-height: 1;
  --type-wordmark-tracking: 0;
  --type-wordmark: 400 1.375rem/1 var(--font-family-wordmark);
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --size-icon-sm: 16px;
  --size-icon-md: 20px;
  --size-icon-lg: 24px;
  --size-dot: 8px;
  --size-control: 28px;
  --size-target: 44px;
  --size-line: 1px;
  --size-measure: 640px;
  --motion-duration-fast: 120ms;
  --motion-duration-base: 200ms;
  --motion-duration-slow: 320ms;
  --motion-duration-fade: 150ms;
  --motion-easing-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion-easing-enter: cubic-bezier(0, 0, 0.2, 1);
  --motion-easing-exit: cubic-bezier(0.4, 0, 1, 1);
}

/* Movement stops for readers who ask for reduced motion; fades keep their duration. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-duration-fast: 0ms;
    --motion-duration-base: 0ms;
    --motion-duration-slow: 0ms;
  }
}

/* A company's hat: data-hat="<name>" sets --hat-fill, --hat-on and --hat-tint for everything inside. */
[data-hat="red"] {
  --hat-fill: var(--color-hat-red-fill);
  --hat-on: var(--color-hat-red-on);
  --hat-tint: var(--color-hat-red-tint);
}

[data-hat="orange"] {
  --hat-fill: var(--color-hat-orange-fill);
  --hat-on: var(--color-hat-orange-on);
  --hat-tint: var(--color-hat-orange-tint);
}

[data-hat="amber"] {
  --hat-fill: var(--color-hat-amber-fill);
  --hat-on: var(--color-hat-amber-on);
  --hat-tint: var(--color-hat-amber-tint);
}

[data-hat="olive"] {
  --hat-fill: var(--color-hat-olive-fill);
  --hat-on: var(--color-hat-olive-on);
  --hat-tint: var(--color-hat-olive-tint);
}

[data-hat="green"] {
  --hat-fill: var(--color-hat-green-fill);
  --hat-on: var(--color-hat-green-on);
  --hat-tint: var(--color-hat-green-tint);
}

[data-hat="teal"] {
  --hat-fill: var(--color-hat-teal-fill);
  --hat-on: var(--color-hat-teal-on);
  --hat-tint: var(--color-hat-teal-tint);
}

[data-hat="sky"] {
  --hat-fill: var(--color-hat-sky-fill);
  --hat-on: var(--color-hat-sky-on);
  --hat-tint: var(--color-hat-sky-tint);
}

[data-hat="blue"] {
  --hat-fill: var(--color-hat-blue-fill);
  --hat-on: var(--color-hat-blue-on);
  --hat-tint: var(--color-hat-blue-tint);
}

[data-hat="violet"] {
  --hat-fill: var(--color-hat-violet-fill);
  --hat-on: var(--color-hat-violet-on);
  --hat-tint: var(--color-hat-violet-tint);
}

[data-hat="plum"] {
  --hat-fill: var(--color-hat-plum-fill);
  --hat-on: var(--color-hat-plum-on);
  --hat-tint: var(--color-hat-plum-tint);
}

[data-hat="pink"] {
  --hat-fill: var(--color-hat-pink-fill);
  --hat-on: var(--color-hat-pink-on);
  --hat-tint: var(--color-hat-pink-tint);
}

[data-hat="slate"] {
  --hat-fill: var(--color-hat-slate-fill);
  --hat-on: var(--color-hat-slate-on);
  --hat-tint: var(--color-hat-slate-tint);
}

/* The dashboard's own styles. Every colour, type value, space, radius and size is a variable from the design system's
   tokens.css; this file defines no variables and no literals of its own (test/css.test.ts checks). The pieces follow
   design/specs: the hat, the reason line and the brief card's highlights. Surfaces are solid. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-body);
  font: var(--type-body);
  letter-spacing: var(--type-body-tracking);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
body.tinted { background: var(--hat-tint); }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--color-ink); text-underline-offset: calc(var(--size-line) * 3); }
a:hover { text-decoration-thickness: calc(var(--size-line) * 2); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: calc(var(--size-line) * 2) solid var(--color-focus); outline-offset: calc(var(--size-line) * 2); }
.icon { width: var(--size-icon-md); height: var(--size-icon-md); flex: none; }
.icon-sm { width: var(--size-icon-sm); height: var(--size-icon-sm); flex: none; }
.visually-hidden {
  position: absolute;
  width: var(--size-line);
  height: var(--size-line);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip { position: absolute; left: var(--space-16); top: var(--space-8); padding: var(--space-8) var(--space-12); background: var(--color-surface); border-radius: var(--radius-sm); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Top bar, page and footer */
.top { background: var(--color-surface); border-bottom: var(--size-line) solid var(--color-line); }
.top-inner, .page, .foot-inner {
  width: 100%;
  max-width: calc(var(--size-measure) + var(--space-64) * 2);
  margin: 0 auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}
.top-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-24); padding-top: var(--space-12); padding-bottom: var(--space-12); }
.brand { text-decoration: none; display: inline-flex; align-items: center; min-height: var(--size-target); }
.wordmark { font: var(--type-wordmark); letter-spacing: var(--type-wordmark-tracking); color: var(--color-ink); }
.wordmark span { color: var(--color-suffix); }
.nav { display: flex; flex-wrap: wrap; gap: var(--space-4); flex: 1; }
.nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--size-target);
  padding: 0 var(--space-12);
  border-radius: var(--radius-full);
  font: var(--type-label);
  color: var(--color-meta);
  text-decoration: none;
}
.nav a:hover { background: var(--color-hover); color: var(--color-ink); }
.nav a[aria-current="page"] { background: var(--color-selected); color: var(--color-ink); }
.page { padding-top: var(--space-32); padding-bottom: var(--space-64); display: grid; gap: var(--space-32); align-content: start; }
.page.narrow { max-width: calc(var(--size-measure) * 0.75); }
.foot { border-top: var(--size-line) solid var(--color-line); }
.foot-inner { padding-top: var(--space-16); padding-bottom: var(--space-24); font: var(--type-caption); color: var(--color-meta); display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-16); }
.foot a { color: var(--color-meta); }

/* Headings and blocks */
.head { display: grid; gap: var(--space-8); }
.head h1 { font: var(--type-title); letter-spacing: var(--type-title-tracking); color: var(--color-ink); }
.head .lede { font: var(--type-reading); letter-spacing: var(--type-reading-tracking); color: var(--color-body); max-width: var(--size-measure); }
.crumb { display: inline-flex; align-items: center; gap: var(--space-4); font: var(--type-label); color: var(--color-meta); text-decoration: none; min-height: var(--size-control); }
.crumb:hover { color: var(--color-ink); }
.block { display: grid; gap: var(--space-12); }
.block > h2, .card > h2 { font: var(--type-heading); letter-spacing: var(--type-heading-tracking); color: var(--color-ink); }
.block > .note, .card > .note { font: var(--type-caption); color: var(--color-meta); max-width: var(--size-measure); }
.card {
  display: grid;
  gap: var(--space-16);
  padding: var(--space-24);
  background: var(--color-surface);
  border: var(--size-line) solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-raised);
}
.list { display: grid; gap: var(--space-8); }
.meta { font: var(--type-caption); color: var(--color-meta); }
.empty { font: var(--type-reading); letter-spacing: var(--type-reading-tracking); color: var(--color-meta); }
.prose { max-width: var(--size-measure); }
/* What leaves the server when AI is turned on for an inbox: shown before the button that does it. */
.disclosure { display: grid; gap: var(--space-8); max-width: var(--size-measure); }
.sent { display: grid; gap: var(--space-6); margin: 0; padding-left: var(--space-20); font: var(--type-body); color: var(--color-body); }
.sent b { font-weight: var(--font-weight-medium); color: var(--color-ink); }

/* Messages */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-md);
  border: var(--size-line) solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-ink);
}
.alert .icon-sm { margin-top: calc((var(--type-body-size) * var(--type-body-line-height) - var(--size-icon-sm)) / 2); }
.alert.notice { background: var(--color-success-tint); border-color: var(--color-success); }
.alert.notice .icon-sm { color: var(--color-success); }
.alert.error { background: var(--color-danger-tint); border-color: var(--color-danger); }
.alert.error .icon-sm { color: var(--color-danger); }
.alert.attention { background: var(--color-attention-tint); border-color: var(--color-attention); }
.alert.attention .icon-sm { color: var(--color-attention); }

/* Forms */
.form { display: grid; gap: var(--space-20); max-width: var(--size-measure); }
.field { display: grid; gap: var(--space-6); }
.field > label, fieldset > legend { font: var(--type-label); color: var(--color-ink); }
.hint { font: var(--type-caption); color: var(--color-meta); }
.field-error { font: var(--type-caption); color: var(--color-danger); }
.row-fields { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.row-fields > .field { flex: 1 1 calc(var(--size-measure) / 3); }
.row-fields > .field.short { flex: 0 1 calc(var(--size-measure) / 5); }
input[type="text"], input[type="password"], input[type="number"], input[type="email"], select, textarea {
  width: 100%;
  min-height: var(--size-target);
  padding: var(--space-8) var(--space-12);
  background: var(--color-surface);
  color: var(--color-ink);
  border: var(--size-line) solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  font: var(--type-body);
}
textarea { font: var(--type-mono); min-height: calc(var(--size-target) * 4); resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--color-danger); }
input[type="radio"], input[type="checkbox"] { width: var(--size-icon-sm); height: var(--size-icon-sm); margin: 0; flex: none; accent-color: var(--color-ink); }
fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: var(--space-8); min-width: 0; }
fieldset > legend { padding: 0; margin-bottom: var(--space-8); }
.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  padding: var(--space-12);
  border: var(--size-line) solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
}
.choice input { margin-top: calc((var(--type-label-size) * var(--type-label-line-height) - var(--size-icon-sm)) / 2); }
.choice:has(input:checked) { border-color: var(--color-ink); background: var(--color-selected); }
.choice-text { display: grid; gap: var(--space-2); }
.choice-text b { font: var(--type-label); color: var(--color-ink); display: inline-flex; align-items: center; gap: var(--space-6); }
.choice-text span { font: var(--type-caption); color: var(--color-meta); }
.check { display: flex; align-items: center; gap: var(--space-8); min-height: var(--size-control); font: var(--type-body); color: var(--color-ink); cursor: pointer; }

/* The colour picker: the twelve hats as chips around a radio button */
.swatches { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.swatches > legend { flex-basis: 100%; }
.swatch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--size-target);
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-full);
  background: var(--hat-tint);
  color: var(--hat-fill);
  font: var(--type-label);
  cursor: pointer;
}
.swatch input { accent-color: var(--hat-fill); }
.swatch:has(input:checked) { background: var(--hat-fill); color: var(--hat-on); }
.swatch:has(input:checked) .hat-dot { background: var(--hat-on); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: var(--size-control);
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-sm);
  border: var(--size-line) solid var(--color-line-strong);
  background: var(--color-surface);
  color: var(--color-ink);
  font: var(--type-label);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--motion-duration-fast) var(--motion-easing-standard);
}
.button:hover { background: var(--color-hover); }
.button:disabled { color: var(--color-meta); border-color: var(--color-line); background: var(--color-surface); cursor: not-allowed; }
.button.primary { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-on-ink); }
.button.danger { color: var(--color-danger); border-color: var(--color-danger); }
.button.danger:hover { background: var(--color-danger-tint); }
.button.quiet { border-color: transparent; background: transparent; color: var(--color-meta); }
.button.quiet:hover { background: var(--color-hover); color: var(--color-ink); }
.button.large { min-height: var(--size-target); padding: var(--space-8) var(--space-16); }
.inline-form { display: inline; }

/* A step that can't be undone: a disclosure that says what happens, then the button that does it */
.confirm > summary { list-style: none; width: max-content; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm-body {
  display: grid;
  gap: var(--space-12);
  margin-top: var(--space-8);
  padding: var(--space-12) var(--space-16);
  background: var(--color-danger-tint);
  border-radius: var(--radius-md);
  color: var(--color-ink);
  max-width: var(--size-measure);
}

/* Changing a connected inbox's details: a disclosure with the form inside */
.reconnect > summary { list-style: none; width: max-content; }
.reconnect > summary::-webkit-details-marker { display: none; }
.reconnect-body { display: grid; gap: var(--space-12); margin-top: var(--space-12); }

/* Piece: a company's hat (design/specs/hat.md) */
.hat-label { display: inline-flex; align-items: center; gap: var(--space-6); font: var(--type-label); color: var(--color-ink); }
.hat-label.small { font: var(--type-caption); color: var(--color-meta); }
.hat-label.large { font: var(--type-heading); letter-spacing: var(--type-heading-tracking); }
.hat-dot { width: var(--size-dot); height: var(--size-dot); border-radius: var(--radius-full); background: var(--hat-fill); flex: none; }
.hat-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--size-control);
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-full);
  background: var(--hat-tint);
  color: var(--hat-fill);
  font: var(--type-label);
  text-decoration: none;
}
.hat-chip[aria-current="page"], .hat-chip.selected { background: var(--hat-fill); color: var(--hat-on); }
.hat-chip[aria-current="page"] .hat-dot, .hat-chip.selected .hat-dot { background: var(--hat-on); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.chip-all { display: inline-flex; align-items: center; min-height: var(--size-control); padding: var(--space-4) var(--space-12); border-radius: var(--radius-full); background: var(--color-sunken); color: var(--color-body); font: var(--type-label); text-decoration: none; }
.chip-all[aria-current="page"] { background: var(--color-ink); color: var(--color-on-ink); }
.hat-attention { font: var(--type-caption); color: var(--color-attention); }

/* Inboxes */
.inbox { gap: var(--space-12); }
.inbox-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-8); }
.inbox-head h2 { font: inherit; }
.inbox-head a { text-decoration: none; }
.inbox-head a:hover .hat-name { text-decoration: underline; }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); }
.facts > div { display: grid; gap: var(--space-2); }
.facts dt { font: var(--type-caption); color: var(--color-meta); }
.facts dd { font: var(--type-label); color: var(--color-ink); display: inline-flex; align-items: center; gap: var(--space-4); }
.status-attention { color: var(--color-attention); }
.status-ok { color: var(--color-success); }

/* Piece: the reason line on a handled thread (design/specs/reason-line.md) */
.handled { display: grid; gap: var(--space-8); }
.handled-item { display: grid; gap: var(--space-6); padding: var(--space-12) var(--space-16); background: var(--color-surface); border: var(--size-line) solid var(--color-line); border-radius: var(--radius-lg); }
.handled-subject { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-4) var(--space-8); font: var(--type-label); color: var(--color-ink); }
.reason { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-8); }
.reason > .icon-sm { margin-top: calc((var(--type-caption-size) * var(--type-caption-line-height) - var(--size-icon-sm)) / 2); color: var(--color-meta); }
.reason-text { flex: 1 1 calc(var(--size-measure) / 2); min-width: 0; font: var(--type-caption); color: var(--color-meta); }
.reason-text b { font-weight: var(--font-weight-medium); color: var(--color-body); }
.reason-state { font: var(--type-caption); color: var(--color-meta); white-space: nowrap; }
.reason-actions { display: flex; flex-wrap: wrap; gap: var(--space-6); flex: none; }
.reason.proposed { background: var(--color-attention-tint); border-radius: var(--radius-md); padding: var(--space-8) var(--space-12); }
.reason.proposed > .icon-sm { color: var(--color-attention); }
.reason.proposed .reason-text { color: var(--color-body); }
.reason.proposed .reason-text b { color: var(--color-ink); }
.reason.undone .reason-text b, .reason.rejected .reason-text b { color: var(--color-meta); }
.reason.failed > .icon-sm { color: var(--color-danger); }
/* What the provider said: why it failed or an undo was refused, or a note on a change that worked */
.reason-error, .reason-note { display: block; margin-top: var(--space-2); }
.reason-error { color: var(--color-danger); }
.reason-note { color: var(--color-body); }

/* Rules */
.rule { gap: var(--space-8); }
.rule-text { font: var(--type-reading); letter-spacing: var(--type-reading-tracking); color: var(--color-ink); }
.rule.off .rule-text { color: var(--color-meta); }
.rule-when { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-12); font: var(--type-caption); color: var(--color-meta); }
.rule.suggested { background: var(--color-attention-tint); border-color: var(--color-attention); }

/* Devices and pairing codes */
.device-name { font: var(--type-label); color: var(--color-ink); display: inline-flex; align-items: center; gap: var(--space-6); }
.code {
  font: var(--type-display);
  font-family: var(--font-family-mono);
  letter-spacing: var(--type-display-tracking);
  color: var(--color-ink);
  padding: var(--space-16) var(--space-20);
  background: var(--color-sunken);
  border-radius: var(--radius-md);
  width: max-content;
  max-width: 100%;
  user-select: all;
}
.badge { display: inline-flex; align-items: center; padding: 0 var(--space-6); border-radius: var(--radius-full); background: var(--color-sunken); font: var(--type-caption); color: var(--color-meta); }

/* Home */
.attention-list { display: grid; gap: var(--space-8); }
.pager { display: flex; gap: var(--space-8); }
