:root {
  --ink: #241a3f;
  --soft: #6b6385;
  --paper: #f7f5fb;
  --card: #ffffff;
  --line: #e1dcee;
  --brand: #3b2a6b;
  --brand-ink: #ffffff;
  --warn: #8a4b00;
  --bad: #a3202a;
  --good: #1c6b3a;
  --good-bg: #e3f3e8;
  --bad-bg: #fbe7e8;
  --brand-bg: #ece7fb;
  --t-title: 1.0625rem;
  --t-meta: .8125rem;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
[hidden] { display: none !important; }
#root { height: 100%; height: 100dvh; display: flex; flex-direction: column; max-width: 44rem; margin: 0 auto; }
button, input { font: inherit; }
select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: .6rem; padding: .6rem .8rem; }
textarea { width: 100%; min-height: 5rem; resize: vertical; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.btn {
  background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 0.6rem;
  padding: 0.6rem 1rem; min-height: 2.75rem; cursor: pointer;
}
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.armed { background: var(--warn); }
.btn.quiet { background: transparent; color: var(--brand); border: 1px solid var(--line); }
/* After .btn.quiet, so an armed Drop or Forget looks armed, not only reads it. */
.btn.quiet.armed { background: var(--warn); color: var(--brand-ink); border-color: var(--warn); }
/* A text button: Sign out, so it is not the loudest thing in the header. */
.btn.link { background: none; border: 0; color: var(--soft); padding: .6rem .5rem; min-height: 2.75rem; }
.btn.link:hover { color: var(--brand); }

.top { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1rem; padding-top: calc(0.6rem + env(safe-area-inset-top)); }
.top h1 { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; margin: 0; }
/* Scrolls sideways when the tabs outgrow a phone; on desktop flex: 1 0 auto still fills the row. */
.tabs { display: flex; border-bottom: 1px solid var(--line); background: transparent; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.tabs::-webkit-scrollbar { display: none; }
/* Only when the tabs outgrow the row: the last 2.5rem fades, so a cut-off tab says "scroll". The end padding lets the last tab scroll clear of the fade. */
.tabs.overflows {
  padding-inline-end: 2.5rem;
  scroll-padding-inline-end: 2.5rem;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
}
/* Once scrolled, the first 2.5rem fades too, so the tabs gone off the left say "scroll back". */
.tabs.overflows.scrolled {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
}
.tab { flex: 1 0 auto; background: none; border: 0; padding: .8rem 1rem; min-height: 2.75rem; color: var(--soft); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; scroll-snap-align: start; }
.tab:focus-visible { outline-offset: -3px; }
.tab[aria-selected='true'] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.panel { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem; }
.panel.chat { display: flex; flex-direction: column; padding: 0; }
/* A tab still loading: a shimmer where its list will be. :last-child, so Ideas' check-in list,
   empty for good when there are no sites, never shimmers. */
.panel > .list:empty:last-child::before, .panel:empty::before {
  content: ''; display: block; height: 5rem; border-radius: .8rem;
  background: linear-gradient(90deg, var(--card), var(--line), var(--card)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .panel > .list:empty:last-child::before, .panel:empty::before { animation: none; } }

.log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.msg { max-width: 88%; padding: 0.6rem 0.8rem; border-radius: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.client { align-self: flex-end; background: var(--brand); color: var(--brand-ink); }
.msg.opal { align-self: flex-start; background: var(--card); border: 1px solid var(--line); }
.msg p, .msg ul, .msg ol { margin: 0 0 0.5rem; white-space: normal; }
.msg ul, .msg ol { padding-left: 1.2rem; }
.msg li + li { margin-top: 0.2rem; }
.msg > :first-child { margin-top: 0; }
.msg > :last-child { margin-bottom: 0; }
.msg.opal a { color: var(--brand); }
.msg code { font-size: 0.9em; padding: 0 0.2rem; border-radius: 0.3rem; background: var(--line); }
.msg .cards { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.6rem; white-space: normal; }
.hint { color: var(--soft); text-align: center; margin: 0.5rem 0; }
.notice { color: var(--warn); margin: 0.4rem 1rem; }

.composer { display: flex; gap: 0.5rem; padding: 0.6rem 1rem; padding-bottom: calc(0.6rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.composer input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.6rem 0.8rem; min-height: 2.75rem; }
.mic { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mic.live { background: var(--bad); color: var(--brand-ink); border-color: var(--bad); }
.btn.stop { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 2.75rem; min-height: 2.75rem; }
.btn.stop[hidden] { display: none; }
.btn.stop::before { content: ''; width: 0.7rem; height: 0.7rem; background: currentColor; border-radius: 0.1rem; }
@media (max-width: 520px) {
  .composer.speaking { flex-wrap: wrap; }
  .composer.speaking input { flex-basis: 100%; }
  .composer.speaking .btn { flex: 1; justify-content: center; }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.8rem; }
.card h3 { font-size: var(--t-title); font-weight: 650; margin: 0 0 .35rem; }
.card p { margin: 0.25rem 0; }
.card ul { margin: 0.25rem 0; padding-left: 1.1rem; }
.card a { color: var(--brand); }
.card .actions { margin-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.card .actions textarea { flex-basis: 100%; }
.card .hint { text-align: left; margin: .15rem 0; }
.card a.btn { color: var(--brand-ink); text-decoration: none; display: inline-flex; align-items: center; }
.card pre {
  white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.4rem 0; padding: 0.5rem 0.6rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 0.5rem; font-size: 0.85rem;
}
.card-status { color: var(--soft); min-height: 1.2em; }
/* Kept in the DOM when empty, so the live region still announces. */
.card-status:empty { min-height: 0; margin: 0; }
.offers { margin-top: 1.5rem; }
.offers h2 { font-size: 1.05rem; margin: 0 0 0.25rem; }
.offers > .hint { text-align: left; margin: 0 0 0.6rem; }
.offer h3 { overflow-wrap: anywhere; }
.unavailable { color: var(--soft); }
.card h4 { margin: 0.6rem 0 0.2rem; font-size: 0.9rem; }
.card-plan li { margin: 0.25rem 0; }
.card-plan li.pick { font-weight: 500; }
.card-plan .agreed { color: var(--good); }
.card-plan li.chosen { border-left: 3px solid var(--brand); padding-left: 0.5rem; }
.card-plan .choice { font-weight: 600; color: var(--brand); }
.card-plan li .btn.quiet { display: block; width: fit-content; min-height: 2.75rem; padding: 0.3rem 0.75rem; margin: 0.35rem 0 0; }
.when { color: var(--soft); font-size: var(--t-meta); }
/* A long link in a title or in the words breaks inside the card on a phone. */
.card-idea { overflow-wrap: anywhere; }
.card-idea .still-worth { margin-top: 0.8rem; padding-left: 0.7rem; border-left: 4px solid var(--brand); }
.card-idea .still-worth h4 { margin: 0 0 0.3rem; font-size: 1rem; }
.card-idea .still-worth p { margin: 0.2rem 0; }
.card-checkin select { width: 100%; min-height: 2.75rem; font: inherit; }
.idea-status { font-weight: 500; font-size: var(--t-meta); display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: var(--paper); color: var(--ink); margin: 0 0 .4rem; }
.idea-building, .idea-asking { background: var(--brand-bg); color: var(--brand); }
.idea-shipped, .idea-maintained { background: var(--good-bg); color: var(--good); }
.card-idea[data-status='dropped'] { opacity: .65; }
.card-idea[data-status='dropped'] h4, .card-idea[data-status='dropped'] h4 + ul, .card-idea[data-status='dropped'] .hint { display: none; }
.card-form, .card-entry { overflow-wrap: anywhere; }
.card-form .when { margin: .1rem 0; }
.list > .btn.quiet { margin: 0 0 .6rem; align-self: flex-start; }
.entries { display: flex; flex-direction: column; gap: .6rem; margin-top: .6rem; }
.entry-field { white-space: pre-wrap; }
.entry-field.blank { color: var(--soft); }
.entry-flag { font-weight: 600; color: var(--warn); }
.entry-flag.ok { color: var(--good); }
.card a.btn.quiet { color: var(--brand); border: 1px solid var(--line); background: transparent; }
.settings summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; font-weight: 600; list-style: none; }
.settings summary::-webkit-details-marker { display: none; }
.settings summary::after { content: '\25BE'; margin-left: auto; color: var(--soft); }
.settings[open] summary::after { content: '\25B4'; }
.checkins { display: flex; flex-direction: column; gap: .8rem; margin-top: .4rem; }
.checkin p { margin: 0 0 .3rem; }
.checkin select { width: 100%; min-height: 2.75rem; font: inherit; }
.memory-body { font-size: var(--t-title); margin: 0 0 .3rem; }
.card-memory .actions { justify-content: flex-end; margin-top: .25rem; }
.card-memory .actions .btn.quiet:not(.armed) { border-color: transparent; color: var(--soft); }
.card-memory .actions .btn.quiet:not(.armed):hover { color: var(--brand); }
.status-pass { color: var(--good); }
.status-fail { color: var(--bad); }
.status-unavailable { color: var(--soft); }
/* After an install (#220): the connected card in the good colour, and the first check's findings. */
.card-install.connected { border-left: 3px solid var(--good); }
.card-install.connected h3 { color: var(--good); }
.card-first-check ul { margin: 0; }
.card-first-check li { margin: .25rem 0; }
.health { font-weight: 600; font-size: var(--t-meta); padding: .15rem .6rem; border-radius: 999px; background: var(--paper); margin: 0; white-space: nowrap; }
.health-good { color: var(--good); background: var(--good-bg); }
.health-look { color: var(--bad); background: var(--bad-bg); }
.health-partial, .health-none { color: var(--soft); }
.spark { width: 100%; height: auto; }
.spark-line { stroke: var(--brand); }
.chart-label { color: var(--soft); font-size: var(--t-meta); }
.list { display: flex; flex-direction: column; gap: 0.6rem; }
.assistants { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.assistants > .hint { text-align: left; margin: 0 0 0.6rem; }
.help { margin-top: 1.5rem; }
.assistants > .help { margin-top: 0.8rem; }
.help a { color: var(--brand); }
.card-assistant h4 { margin: 0 0 0.4rem; font-size: 1rem; }
.more { margin-top: 0.8rem; }

.signin { padding: 2rem 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.signin h1 { margin: 0 0 .25rem; font-size: 1.75rem; }
.signin p { margin: 0; }
.signin label { font-weight: 600; margin-top: .5rem; }
.signin input { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.6rem 0.8rem; min-height: 2.75rem; }

/* Projects: the stage strip and the start form. Every control keeps a 44px target. */
/* The stage strip is a record, not controls: no button border or height, the stage now a pill (#238). */
.stages { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin: 0.4rem 0 0.8rem; padding: 0; }
.stage { padding: 0.15rem 0.55rem; display: inline-flex; align-items: center; border-radius: 999px; color: var(--soft); font-size: var(--t-meta); }
.stage.now { color: var(--brand); background: var(--brand-bg); font-weight: 600; }
/* Waiting on you: the same pill as an idea that needs you. */
.waiting { display: inline-block; font-weight: 500; font-size: var(--t-meta); padding: .15rem .6rem; border-radius: 999px; background: var(--brand-bg); color: var(--brand); margin: 0 0 .4rem; }
/* A project's name in the list reads like a card heading, and still opens it. Two classes, to beat .btn.quiet. */
.btn.project-open { width: 100%; text-align: left; min-height: 2.75rem; border: 0; background: none; padding: 0; color: var(--ink); font-weight: 650; font-size: var(--t-title); }
.project-form { display: flex; flex-direction: column; gap: 0.6rem; }
.project-label { display: flex; flex-direction: column; gap: 0.25rem; }
.project-form .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.panel > .hint + .btn { margin-top: 0.6rem; }
.panel > .btn + .list, .panel > .btn + .card { margin-top: 0.8rem; }
.project-form input, .project-form select, .project-form textarea { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.6rem 0.8rem; min-height: 2.75rem; font: inherit; }
/* A project's proposal: each page's purpose beside its name, your words when you sent one back, and the answer buttons between rules, above the brief. */
.card-project li span { color: var(--soft); }
.card-project blockquote { margin: 0 0 0.6rem; padding: 0.5rem 0.8rem; border-left: 3px solid var(--brand); background: var(--brand-bg); border-radius: 0 0.6rem 0.6rem 0; }
.project-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-block: 0.4rem; padding-block: 0.8rem; border-block: 1px solid var(--line); }
.project-actions .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.send-back { display: flex; flex-direction: column; gap: 0.6rem; flex: 1 1 100%; }
.send-back .btn { align-self: flex-start; }
.card-project h4 { font-size: 1rem; }
.card-project :is(ul, p:not(.when)) + .when { margin-top: 0.75rem; }
.card-project .decided { color: var(--good); font-weight: 600; font-size: var(--t-meta); margin-top: 0.75rem; }
.card-project .next { color: var(--brand); font-weight: 600; font-size: var(--t-meta); margin-top: 0.75rem; }
.proposal-past { margin-top: 0.4rem; }
.proposal-past summary { font-size: var(--t-meta); font-weight: 600; }
.card-project .decided + h4 { border-top: 1px solid var(--line); padding-top: 0.8rem; margin-top: 0.8rem; }
/* Review rounds: each round a block, its preview link and buttons at 44px so they are easy to tap at 390. */
.rounds { display: flex; flex-direction: column; gap: 0.6rem; margin-block: 0.4rem; padding-block: 0.8rem; border-block: 1px solid var(--line); }
/* The actions block's 0.4rem bottom margin is cancelled, so rounds after it sit as they do elsewhere. */
.project-actions + .rounds { border-top: 0; margin-top: -0.4rem; }
/* A flex column keeps its heading's margin: 0.2rem plus the 0.8rem padding puts the heading 1rem under
   the rule, like the others (.liked and the brief after it). */
.rounds > h4, .directions > h4 { margin: 0.2rem 0 0; }
.round { display: flex; flex-direction: column; gap: 0.4rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.round:last-of-type { border-bottom: 0; padding-bottom: 0; }
.round h5 { font-size: 0.95rem; font-weight: 600; margin: 0; }
.round p { margin: 0; }
.round a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.round .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
/* Pictures and sites you like (#202 slice 5): small pictures in a grid that wraps, sites as a list. */
.liked { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.liked h4 { margin: 0; }
/* The brief under it starts as far below the rule as the section starts above it (#314). */
.liked + h4 { margin-top: 1rem; }
.liked .hint { margin: 0; }
.liked-pictures { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.8rem; }
.liked-picture { margin: 0; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.liked-picture img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--brand-bg); }
.liked-picture figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; overflow-wrap: anywhere; }
.liked-picture figcaption span { font-size: var(--t-meta); color: var(--soft); }
.liked .liked-sites { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.liked-site { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0.6rem; min-width: 0; }
.liked-site a { overflow-wrap: anywhere; min-width: 0; }
.liked-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
.liked-url { flex: 1 1 14rem; min-width: 0; }
.liked-url input { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.6rem 0.8rem; min-height: 2.75rem; font: inherit; background: var(--card); color: var(--ink); }
/* Three directions at the design stage: each look's home page in a frame, one under another, so none sits alone in a row. */
.directions { display: flex; flex-direction: column; gap: 0.6rem; margin-block: 0.8rem; padding-block: 0.8rem; border-block: 1px solid var(--line); }
.direction-list { display: flex; flex-direction: column; gap: 0.8rem; }
.direction { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0.8rem; min-width: 0; }
.direction.chosen { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.direction-view { height: 27rem; overflow: hidden; border: 1px solid var(--line); border-radius: 0.6rem; }
.direction-frame { display: block; width: 100%; height: 27rem; border: 0; }
/* On a phone, the page is drawn at twice the frame's width and shown at half, so it shows the same whole hero as on a desktop. */
@media (max-width: 39.98rem) {
  .direction-view { height: 24rem; }
  .direction-frame { width: 200%; height: 48rem; transform: scale(0.5); transform-origin: 0 0; }
}
.direction figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.direction .decided { margin: 0; min-height: 2.75rem; display: flex; align-items: center; }
/* Open on your phone: a header button (not shown under 520px, where you are already on a phone) and its dialog. */
.top-actions { display: flex; gap: 0.5rem; align-items: center; }
@media (max-width: 519.98px) { .handoff-open { display: none; } }
.handoff { border: 1px solid var(--line); border-radius: 0.8rem; background: var(--card); color: var(--ink); padding: 1.2rem; width: min(22rem, calc(100% - 2rem)); }
.handoff::backdrop { background: rgba(36, 26, 63, 0.5); }
.handoff h2 { font-size: 1.1rem; margin: 0 0 0.6rem; }
.handoff p { margin: 0.6rem 0; }
.handoff-body { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.handoff-qr { width: 15rem; height: 15rem; min-width: 220px; min-height: 220px; background: #fff; }
.handoff-clock { color: var(--soft); font-variant-numeric: tabular-nums; }
.handoff-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.8rem; }
/* The setup card at the top of the chat while a client has no working site. */
.onboarding { background: var(--card); border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; }
.onboarding h2 { margin: 0; font-size: 1.1rem; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 0.6rem; color: var(--soft); }
.steps li::before { content: counter(step); flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.steps li.done { color: var(--ink); }
.steps li.done::before { content: '\2713'; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.steps li.current { color: var(--brand); font-weight: 600; }
.steps li.current::before { border-color: var(--brand); border-width: 2px; }
.onboarding p { margin: 0; }
.onboarding-form { display: flex; flex-direction: column; gap: 0.5rem; }
.onboarding-form input { min-width: 0; border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.6rem 0.8rem; min-height: 2.75rem; }
.onboarding-form .btn, .add-site { min-height: 2.75rem; }
.add-site { display: block; margin: 0.5rem auto 0; }
@media (min-width: 40rem) {
  .steps { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 0.9rem; }
  .onboarding-form { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .onboarding-form label { flex-basis: 100%; }
  .onboarding-form input { flex: 1; }
}
/* The Brand tab. Colours and fonts from a kit reach the chips and samples through the CSSOM only. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.panel-brand .brand-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.2rem; }
.panel-brand .card .actions { flex-wrap: wrap; }
.card-brand, .brand-edit { overflow-wrap: anywhere; }
.card-brand h4 { margin-top: 1rem; }
.brand-files h3:not(:first-child) { margin-top: 1rem }
.brand-files { overflow-wrap: anywhere; margin-bottom: 1rem; }
.brand-files .hint { text-align: left; margin: 0 }
/* A file picker's label is its button; the hidden input's focus shows on the label. */
.brand-files label.btn, .liked label.btn { display: inline-flex; align-items: center; min-height: 2.75rem; }
.brand-files input[type='file']:focus-visible + label, .liked input[type='file']:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; }
.brand-files .logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.brand-files .logo-preview { max-width: 10rem; max-height: 5rem; border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.4rem; background: var(--card); }
.brand-files .brief-files { list-style: none; padding: 0; margin: 0.4rem 0; }
.brand-files .brief-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.brand-files .file-name { flex: 1; min-width: 8rem; }
.brand-files .file-size { color: var(--soft); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.card .swatches { list-style: none; padding: 0; margin: 0.4rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; }
.swatch { display: flex; align-items: flex-start; gap: 0.6rem; min-width: 0; }
.swatch-chip { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 0.5rem; border: 1px solid var(--soft); background: var(--paper); }
.swatch-words { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.swatch-hex { color: var(--soft); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
/* Where a choice of a kit drafted from the brief came from (#260 slice 2). */
.card-brand .source { display: block; color: var(--soft); font-size: 0.8rem; line-height: 1.35; overflow-wrap: anywhere; }
.type-sample { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.5rem 0.7rem; margin: 0.5rem 0; }
.card .type-demo { margin: 0.3rem 0 0.1rem; line-height: 1.3; }
.type-heading { font-weight: 600; }
.brand-sample { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.7rem 0.9rem; margin: 0.5rem 0; }
.card-brand .brand-sample h4 { margin: 0 0 0.3rem; }
.brand-sample-button { display: inline-block; margin-top: 0.4rem; padding: 0.6rem 1rem; border-radius: 0.6rem; background: var(--brand); color: var(--brand-ink); font-weight: 600; cursor: default; }
.brand-edit .fields { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; }
.brand-edit legend { font-weight: 600; padding: 0; }
.brand-edit select { max-width: 100%; text-overflow: ellipsis; }
.brand-edit .field { display: flex; flex-direction: column; gap: 0.3rem; margin: 0.7rem 0; }
.brand-edit .field > label { font-weight: 500; }
.brand-edit input[type='text'], .brand-edit textarea, .brand-edit select {
  font: inherit; color: var(--ink); background: var(--card); width: 100%; min-width: 0; min-height: 2.75rem;
  border: 1px solid var(--soft); border-radius: 0.6rem; padding: 0.55rem 0.7rem;
}
.brand-edit textarea { resize: vertical; }
.color-row { display: flex; gap: 0.5rem; align-items: center; }
.color-row input[type='text'] { flex: 1; font-variant-numeric: tabular-nums; }
.pick { display: inline-flex; flex: none; position: relative; }
.brand-edit input[type='color'] { width: 2.75rem; height: 2.75rem; padding: 0.2rem; border: 1px solid var(--soft); border-radius: 0.6rem; background: var(--card); cursor: pointer; }
.brand-edit input[aria-invalid='true'] { border: 2px solid var(--bad); }
.field-hint p, .brand-edit .errors { color: var(--bad); font-size: 0.9rem; }
.field-hint p { margin: 0.1rem 0; }
.brand-edit .card-status, .brand-files .card-status { color: var(--ink); }
.brand-edit .card-status.refused, .brand-files .card-status.refused { border-left: 4px solid var(--bad); padding: 0.2rem 0 0.2rem 0.7rem; margin: 0.8rem 0; }
.panel-brand .list > .card-status { margin: 0; min-height: 0; }
.card .sizes { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1rem; line-height: 1.2; }
.brand-edit .card-status .btn { margin-top: 0.4rem; }
.signin .or { margin: 0; text-align: center; color: var(--soft); font-size: 0.9rem; }
.btn.github { display: flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; }
.btn.github svg { width: 1.2rem; height: 1.2rem; fill: currentColor; flex: none; }

/* Design pass part 2 (#238): Chat, Sites, Activity. */
/* C1: "That's a miss" is a footnote under her answer, still a 44px target. */
.msg .miss-row { flex-direction: row; justify-content: flex-end; flex-wrap: wrap; margin-top: .25rem; }
.msg .miss-row:has(> span) { justify-content: flex-start; align-items: center; }
.btn.quiet.miss { border: 0; color: var(--soft); font-size: var(--t-meta); padding: .3rem .5rem; min-height: 2.75rem; }
.btn.quiet.miss:hover { color: var(--brand); }
/* C2: on a phone the mic is an icon, so the field keeps its room. */
.mic svg { display: none; }
@media (max-width: 520px) {
  .mic { width: 2.75rem; padding: 0; justify-content: center; display: inline-flex; align-items: center; flex: none; }
  .mic .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mic svg { display: block; width: 1.25rem; height: 1.25rem; fill: currentColor; }
}
/* C3: Thinking reads as waiting, not as a reply. */
.msg.opal.thinking { color: var(--soft); }
.msg.opal.thinking::after { content: '...'; animation: dots 1.2s steps(4) infinite; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; white-space: nowrap; overflow-wrap: normal; }
@keyframes dots { from { width: 0; } to { width: 1.2em; } }
@media (prefers-reduced-motion: reduce) { .msg.opal.thinking::after { animation: none; } }
/* C4: on a wide screen the composer is a card, not a flat strip. */
@media (min-width: 48rem) { .composer { margin: 0 1rem 1rem; border: 1px solid var(--line); border-radius: .9rem; } }
/* SI1, SI2: the domain and its health in one row, the rest as meta. */
.site-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.site-head h3 { margin: 0; overflow-wrap: anywhere; }
.checks li { color: var(--soft); font-size: var(--t-meta); }
.checks li.check-fail, .checks li.check-unavailable { color: var(--ink); }
.card-idea ul + .when, .card-idea .when:last-child { margin-top: 0.75rem; }
.step-done { color: var(--soft); }
.card-site .when { margin: .2rem 0; overflow-wrap: anywhere; }
/* A1: a day heading, then plain rows; only what needs the client stays a card. */
.panel .day { font-size: var(--t-meta); color: var(--soft); text-transform: uppercase; letter-spacing: .06em; margin: 1rem 0 .25rem; }
.list > .card-feed { border-radius: 0; border-width: 0 0 1px; padding: .6rem 0; background: transparent; }
.list:has(> .card-feed) { gap: 0; }
.list > .card-pr { margin: .6rem 0; }
.card-feed .when { margin: 0; }
/* #238: a folded group's disclosure is a control (44px, chevron, brand colour); its times match the row's own time. */
.card-group summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; font-weight: 600; color: var(--brand); list-style: none; }
.card-group summary::-webkit-details-marker { display: none; }
.card-group summary::after { content: '\25BE'; margin-left: auto; color: var(--soft); }
.card-group details[open] summary::after { content: '\25B4'; }
.card-group ul { list-style: none; margin: 0; padding: 0; font-size: var(--t-meta); color: var(--soft); }
/* A2: links in feed and PR cards are 44px targets. */
.card-feed a, .card-pr a:not(.btn) { display: inline-flex; align-items: center; min-height: 2.75rem; margin-right: 1rem; }
/* The secure form for a login (#205), the logins I hold on Sites, and what I saw on a site card. */
.secure { border: 1px solid var(--line); border-radius: 0.8rem; background: var(--card); color: var(--ink); padding: 1.2rem; width: min(26rem, calc(100% - 2rem)); }
.secure::backdrop { background: rgba(36, 26, 63, 0.5); }
.secure h2 { font-size: 1.1rem; margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.secure p { margin: 0.6rem 0; }
.secure-form { display: flex; flex-direction: column; gap: 0.5rem; }
.secure-form label { font-weight: 600; }
.secure-form input { min-width: 0; border: 1px solid var(--soft); border-radius: 0.6rem; padding: 0.6rem 0.8rem; min-height: 2.75rem; font: inherit; color: var(--ink); background: var(--card); }
.secure-form .btn { min-height: 2.75rem; }
.secure-actions { display: flex; justify-content: flex-end; margin-top: 0.8rem; }
.access { margin-top: 1.5rem; }
.access h2 { font-size: 1.05rem; margin: 0 0 0.25rem; }
.access > .hint { text-align: left; margin: 0 0 0.6rem; }
.card-access h3, .card-secure h3 { overflow-wrap: anywhere; }
.card-site .review { color: var(--soft); margin: 0.2rem 0; overflow-wrap: anywhere; }

/* Your kit on a real page: one frame that runs nothing, at a phone's width or the full width. */
.brand-preview { margin-top: 1rem; }
.brand-preview .preview-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.brand-preview .preview-controls select, .brand-preview .preview-controls .btn { min-height: 44px; }
.brand-preview .btn[aria-pressed="true"] { font-weight: 700; border-color: currentColor; }
.preview-stage { margin-top: 0.75rem; }
.preview-frame { display: block; border: 1px solid var(--line); border-radius: 0.6rem; background: #fff; }
.preview-stage.phone .preview-frame { width: 390px; max-width: 100%; height: 44rem; margin: 0 auto; }
.preview-modes { display: flex; gap: 0.5rem; }
/* Computer: laid out at 1280 by 800 and scaled down to the stage by brand.js (transform), so the desktop layout shows. */
.preview-stage.computer { overflow: hidden; }
.preview-stage.computer .preview-frame { width: 1280px; height: 800px; max-width: none; transform-origin: 0 0; }
