/* Fuyu Labs — two models, the same documents, side by side.
 *
 * One surface colour, one line colour, three colours that mean something:
 *
 *   navy    the interface's own affirmative controls — sign in, save
 *   orange  the one button that spends money, and nothing else
 *   flag    a warning or a removal: a chunk that failed, a quote that is not in
 *           the document it names, a file about to be taken out
 *
 * Nothing else is coloured. Orange is one button on one page, which is what
 * makes it readable as "this costs something" rather than as decoration.
 *
 * There is no elevation and no border-drawing: surfaces are raised by a hairline
 * ring and a shadow so faint it reads as paper rather than as chrome. Everything
 * that can be pressed is at least 44px tall, because this gets used on a tablet
 * beside a bench.
 */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --surface: #fafbfd;
  --fg: #152033;
  --muted: #5a6a7c;
  --faint: #8494a6;
  --line: #dde3ec;
  --soft: #eef2f7;

  /* The grounded leap: inside the corpus. */
  --primary: #1e3a5f;
  --primary-fg: #f4f8fc;

  /* The beyond leap: rooted here, reaching out. */
  --leap: #c9560d;
  --leap-fg: #fff7f0;
  --leap-soft: #f7ddc8;

  --flag: #9a2f2f;
  --flag-soft: #f3d9d9;

  --radius: 0.75rem;
  --radius-lg: 1rem;
  --sans: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --ring: 0 0 0 1px rgba(21, 32, 51, 0.08), 0 1px 2px -1px rgba(21, 32, 51, 0.08),
    0 2px 8px 0 rgba(21, 32, 51, 0.05);
  --ring-hover: 0 0 0 1px rgba(21, 32, 51, 0.14), 0 2px 8px -1px rgba(21, 32, 51, 0.12);
}

/* The design is a light one. This is the same design after dark: the same
 * roles, the same two accents, moved down rather than reinvented — so that
 * somebody who works late is looking at this app and not a different one. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1620;
    --surface: #16212e;
    --fg: #e6edf5;
    --muted: #9aabbd;
    --faint: #7c8b9c;
    --line: #27394d;
    --soft: #20303f;
    --primary: #8fb4dd;
    --primary-fg: #0e1620;
    --leap: #f0904a;
    --leap-fg: #2a1305;
    --leap-soft: #3a2314;
    --flag: #e9a0a0;
    --flag-soft: #3b1f1f;
    --ring: 0 0 0 1px rgba(180, 205, 230, 0.12), 0 2px 8px 0 rgba(0, 0, 0, 0.3);
    --ring-hover: 0 0 0 1px rgba(180, 205, 230, 0.22), 0 2px 8px -1px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.5 var(--sans);
}

h1,
h2,
h3 {
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
}

p {
  text-wrap: pretty;
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

/* Every control that goes somewhere is an anchor now, because a place you can
 * be sent has to have an address. None of them should look like a link: each is
 * dressed by whatever it sits in, exactly as the button it replaced was. */
a[data-action] {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.small {
  font-size: 0.875rem;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ shell */

.page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 24px 16px 96px;
  min-height: 100dvh;
}

@media (min-width: 768px) {
  .page {
    padding: 32px 32px 96px;
  }
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

/* The trail takes what it needs; the two controls keep the right-hand edge.
 * Where there is no room for both the trail wraps to its own line and they
 * stay right, which is the one thing that must not change with width. */
.topnav .crumbs {
  flex: 1 1 auto;
}

.topnav .pills {
  margin-left: auto;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  min-width: 0;
}

.crumbs .sep {
  color: var(--faint);
}

.crumbs .here {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crumbs .back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.crumbs .back:hover {
  color: var(--fg);
  text-decoration-color: currentColor;
}

/* ------------------------------------------------------------- the buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--ring);
  font-size: 0.9375rem;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  box-shadow: var(--ring-hover);
}

.btn:disabled {
  opacity: 0.4;
}

.btn.primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: none;
}

.btn.leap {
  background: var(--leap);
  color: var(--leap-fg);
  box-shadow: none;
}

.btn.quiet {
  background: none;
  box-shadow: none;
  color: var(--muted);
  padding: 0 12px;
}

.btn.quiet:hover:not(:disabled) {
  color: var(--fg);
  box-shadow: none;
}

.btn.danger {
  color: var(--flag);
}

/* Every icon in the app is one of the five inline SVGs, drawn in the colour of
 * whatever it sits in. Sized here rather than per context so a new one cannot
 * arrive at 24px inside a 44px button. */
svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------- form fields */

.field {
  display: grid;
  gap: 8px;
  font-size: 0.9375rem;
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--ring);
  line-height: 1.55;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

/* ------------------------------------------------------------- the notices */

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8125rem;
  background: var(--soft);
  color: var(--primary);
  white-space: nowrap;
}

.chip.leap {
  background: var(--leap-soft);
  color: var(--leap);
}

.chip.flagged {
  background: var(--flag-soft);
  color: var(--flag);
}

.error,
.busy {
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.9375rem;
}

.error {
  background: var(--flag-soft);
  color: var(--flag);
}

.busy {
  background: var(--surface);
  box-shadow: var(--ring);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* A call takes minutes. The dot is the only thing on this screen that moves,
 * and it is here so that a wait is legible as a wait. */
.busy::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--leap);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--ring);
  padding: 20px;
}

/* --------------------------------------------------------------- sign in */

.signin {
  max-width: 22rem;
  margin: 18vh auto 0;
  padding: 0 16px;
}

.signin h1 {
  font-size: 1.75rem;
}

.signin p {
  color: var(--muted);
  margin: 8px 0 24px;
}

/* ------------------------------------------------------------------- intro */

.intro {
  padding: 40px 0 24px;
}

.intro .eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.intro h1 {
  font-size: 2rem;
  margin-top: 4px;
}

.intro-head h1 {
  margin-top: 0;
}

@media (min-width: 768px) {
  .intro h1 {
    font-size: 2.25rem;
  }
}

.intro .lead {
  color: var(--muted);
  max-width: 36rem;
  margin-top: 12px;
}

/* --------------------------------------------------------- lists and files */

.rows {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.rows li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.rows .name {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rows .name[aria-current="true"] {
  font-weight: 600;
}

.rows .size {
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .rows .size {
    display: none;
  }
}

.rows .act {
  /* Centred rather than left to the baseline: half of these are anchors, and an
   * anchor does not centre its own text the way a button does. */
  display: flex;
  align-items: center;
  background: none;
  border: 0;
  padding: 0 8px;
  min-height: 44px;
  font-size: 0.875rem;
  color: var(--muted);
}

.rows .act:hover {
  color: var(--fg);
}

.rows .act.remove {
  color: var(--flag);
}

.drop {
  margin-top: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  background: none;
  width: 100%;
}

.drop.over {
  border-color: var(--leap);
  color: var(--fg);
}

.empty {
  margin-top: 32px;
  color: var(--muted);
}

/* ------------------------------------------------------------- the setup */

/* Three steps and a button, on one page. Numbered because they are a sequence
 * — the models cannot be priced against a corpus that is not there yet — but
 * all visible at once, because none of them is finished before the next one
 * starts and a wizard would make you go back to change a file. */
.step {
  padding-top: 32px;
}

.step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.step-head h2 {
  font-size: 1.25rem;
}

.step-head .num {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  align-self: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.step-head .step-meta {
  font-size: 0.875rem;
  color: var(--muted);
}

/* The two controls on the right of a step heading — Remove all, Edit the
 * library — sit at the far edge, where the same control sits in every row
 * below. */
.step-head .act {
  margin-left: auto;
  display: flex;
  align-items: center;
  background: none;
  border: 0;
  padding: 0 8px;
  min-height: 44px;
  font-size: 0.875rem;
  color: var(--muted);
}

.step-head .act:hover {
  color: var(--fg);
}

.step-head .act.remove {
  color: var(--flag);
}

.step .field,
.step .said {
  margin-top: 16px;
}

.step .said {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Adding to a corpus that already has files in it. The empty state is a
 * target the size of the section; this is a line under a list. */
.drop.slim {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 14px 20px;
  font-size: 0.875rem;
}

/* The two arms, side by side wherever there is room for them, because they are
 * about to be side by side on the screen that reports them. */
.arms {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .arms {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.arm-slot .small {
  margin-top: 6px;
}

/* The button that spends the money, and the sentence that says how much.
 * Separated from the steps by a rule, because everything above it is free and
 * nothing below it is. */
.go {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  justify-items: start;
}

.go .fold {
  margin-top: 0;
  border-top: 0;
  width: 100%;
}

.btn.big {
  min-height: 52px;
  padding: 0 28px;
  font-size: 1.0625rem;
}

/* Visible to a screen reader, and to nothing else. Used where a field's label
 * would repeat the heading directly above it. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ----------------------------------------------------- the drawer + dialog */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(21, 32, 51, 0.25);
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 51;
  width: 100%;
  max-width: 32rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--ring-hover);
}

.drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
}

.drawer h2 {
  font-size: 1.125rem;
}

.drawer .body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: grid;
  /* A grid column's automatic minimum is min-content, and a prompt's fenced
   * code block is one long line of it — enough to push the column past the
   * drawer and the content off the side of the screen. Stated as
   * `minmax(0, 1fr)`, the column is allowed to be narrower than what is in it,
   * which is what lets the block scroll inside itself instead. */
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-content: start;
}

.drawer .card .top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.drawer .card p.why {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--muted);
}

/* A foldable section. The heading is the control: a title somebody has to find
 * a chevron beside is a title with an invisible affordance, so the whole row is
 * the button. */
/* The claim and the chain that supports it, side by side.
 *
 * Beside rather than under, because checking a claim against its reasoning
 * means having both in view — a chain a screen-height below the thing it
 * supports is a chain nobody reads while reading the claim. Under is what a
 * narrow window gets, where there is no beside.
 */
.fold {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.fold-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 0;
  background: none;
  border: 0;
  text-align: left;
  color: var(--fg);
}

.fold-head svg {
  transition: transform 120ms ease;
  color: var(--muted);
}

.fold.shut .fold-head svg {
  transform: rotate(-90deg);
}

.fold-title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.fold-meta {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--muted);
}

.fold-body {
  padding-bottom: 8px;
}

/* A fold's own list should not draw a second line straight under the heading. */
.fold-body > .rows {
  margin-top: 0;
  border-top: 0;
}

/* The path panel is inside a fold now, not beside the claim. */

.wire {
  margin: 0;
  max-height: 22rem;
  overflow: auto;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--soft);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* The numbers above it: what model, how much text. */

/* ------------------------------------------------------------ the prompts */

/* One saved prompt. The text is the point of the screen,
 * so it gets a monospace box with room in it rather than a field: these are
 * paragraphs and JSON, and both read badly wrapped in a two-line input. */
.prompt {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.prompt:last-child {
  border-bottom: 0;
}

.prompt .top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prompt .why {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.prompt textarea {
  margin-top: 12px;
  width: 100%;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  resize: vertical;
}

.prompt .row {
  margin-top: 12px;
}

/* Write and Read, over one text. A prompt is Markdown that has to be proof-read
 * as prose before it is paid to be sent several hundred times, and it is also
 * the exact characters that go on the wire — so it is two views rather than a
 * choice between them. */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  border-bottom: 1px solid var(--line);
}

.tabs .spacer {
  flex: 1;
}

.tab {
  background: none;
  border: 0;
  padding: 10px 12px;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.9375rem;
  /* The underline is the selected state, so it is drawn on every tab and only
   * coloured on one — otherwise selecting a tab moves the one beside it. */
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

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

.tab[aria-selected="true"] {
  color: var(--fg);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* What the Markdown says. Read-only by construction: there is nothing to type
 * into, which is the difference between this and the box behind the other tab. */
.prose {
  margin-top: 16px;
}

.prose > * + * {
  margin-top: 12px;
}

.prose h2,
.prose h3,
.prose h4,
.prose h5 {
  margin-top: 20px;
  line-height: 1.3;
}

.prose h2 {
  font-size: 1.25rem;
}

.prose h3 {
  font-size: 1.0625rem;
}

.prose h4,
.prose h5 {
  font-size: 0.9375rem;
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 6px;
}

.prose blockquote {
  margin: 0;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--soft);
  border-radius: 4px;
  padding: 1px 4px;
}

/* A fenced block is often the shape of the JSON the prompt asks for back, and
 * its lines are long. It scrolls inside itself, so the drawer never does. */
.prose pre {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--soft);
  overflow-x: auto;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.prompt .wire {
  margin-top: 12px;
}

/* ---------------------------------------------------- the model comparison */

/* One column per model. No new colour: the comparison is read, not navigated,
 * and the two accents already mean something — navy for what this app does,
 * orange for what it charges for. What does carry colour is the flag, and only
 * where a number is a warning: a chunk that failed, a quote that is not in the
 * document it names. Nothing marks one column as the winner, because which
 * model won is the question the reader came to answer. */

/* The left screen and the right screen.
 *
 * Columns rather than rows, because a comparison is read down one side and then
 * down the other. They stack on a narrow screen, which is the one width at
 * which "side by side" is a lie — and stacked with the letter and the model at
 * the head of each is still readable, where a two-column grid squeezed onto a
 * phone is not.
 */
.split {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

.side {
  min-width: 0;
  border-top: 2px solid var(--line);
  padding-top: 16px;
}

.side > header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.side > header h2 {
  font-size: 1.0625rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.side .row {
  margin-top: 16px;
}

.side table.kv {
  margin-top: 16px;
}

/* The three numbers somebody came for, before the twelve that explain them.
 * Big enough to be read from the other side of a desk, because the whole
 * output of this app is two of these rows compared. */
.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.figure {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.figure .value {
  font-size: 1.5rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.figure .label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.figure.flagged .value {
  color: var(--flag);
}

/* A, B, C. The model id is beside it everywhere; this is what the eye follows
 * from one table to the next. */
.arm-letter {
  display: inline-grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* One arm in full. A definition list in a table, because every row is a label
 * and a fact and nothing here is a column. */
table.kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.kv th {
  width: 11rem;
  padding: 8px 16px 8px 0;
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  vertical-align: baseline;
  white-space: nowrap;
}

table.kv td {
  padding: 8px 0;
  vertical-align: baseline;
}

table.kv tr + tr th,
table.kv tr + tr td {
  border-top: 1px solid var(--soft);
}

/* What a table cannot hold: retries, ids echoed wrong, claims the merge
 * introduced after being told not to. Set apart rather than appended, because
 * these are the things somebody comparing two models actually needs to see. */
.worth {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--ring);
  font-size: 0.875rem;
}

.worth strong {
  font-size: 0.8125rem;
  color: var(--muted);
}

.worth ul {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

/* How far along. The number beside it is the one that matters — a bar alone
 * cannot say that four calls failed. */
.progress .bar {
  height: 6px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}

.progress .bar span {
  display: block;
  height: 100%;
  background: var(--leap);
  transition: width 400ms ease;
}

.progress p {
  margin-top: 10px;
}

/* ------------------------------------------------- one model's file, read */

/* Wider than the prompt drawer: a relationship is a claim, a triple, its
 * qualifiers and its quotes, and at 32rem the quotes wrap to five lines each. */
.drawer.wide {
  max-width: 44rem;
}

.rel {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.rel:last-child {
  border-bottom: 0;
}

.rel .top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rid {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

.claim-text {
  margin-top: 8px;
  line-height: 1.55;
}

.triple {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--muted);
}

/* The quotes under the claim rather than over it: reading the evidence for a
 * claim does not mean you have stopped reading the claim. Each one says
 * whether it is actually in the chunk it names, which is the one question
 * somebody reading a generated claim has. */
.prov {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.prov li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  padding-left: 12px;
  border-left: 2px solid var(--soft);
}

.prov li.flagged {
  border-left-color: var(--flag);
}

.prov .where {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

.prov q {
  color: var(--muted);
  line-height: 1.5;
}
