/* Additions a page needs and the design's stylesheet (app.css) does not have. app.css is the design and is not to be
   changed here; a rule added to this file uses its variables and never a new colour or typeface. */

/* A source the association has silenced stays in the table, quieter than the others: it is a choice, not a fact that
   disappeared, and the button in its row is the way to bring it back. */
.source-muted td {
  color: var(--muted);
}

/* A short mark beside the name of a row, such as the device a person is using: the same shape as "nuovo", in the
   instrument's colours. */
.badge {
  display: inline-block;
  margin-left: var(--s-2);
  padding: 0.1rem var(--s-2);
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 0.15em;
}

.badge {
  border: 1px solid var(--edge);
}

/* The opening sentence of the legal pages: quieter than the title, larger than the list under it. */
.lead {
  color: var(--ink-soft);
  font-size: var(--step-1);
}

/* Forms that sit inside a sentence or a table cell, such as a button on one row. */
.inline {
  display: inline;
}

/* A trial that is ending, and one that already ended: the notice's left edge carries the difference. */
.notice-trial {
  border-left-color: var(--alert);
  background: var(--alert-tint);
}

.notice-suspended {
  border-left-color: var(--alert);
  background: var(--alert-tint);
  font-weight: 700;
}

/* The reasons a verdict can be corrected, offered as buttons under the call. */
.reasons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* The sources table is read row by row: a long address wraps instead of widening the page. */
.sources td {
  overflow-wrap: anywhere;
}

/* What the model calls cost, and what they would have cost at list price. */
.cost-total {
  font-weight: 700;
}

.cost-list {
  color: var(--muted);
  font-size: var(--step--1);
}

.cost-warning {
  padding: var(--s-2) var(--s-3);
  border-left: 4px solid var(--alert);
  background: var(--alert-tint);
  color: var(--alert);
  font-weight: 700;
}

/* The sections of the administrator's pages follow each other with the same rhythm. */
.admin-profile,
.admin-plan,
.admin-members,
.admin-question,
.admin-matches,
.admin-events,
.admin-feedback-messages,
.admin-feedback-message,
.admin-feedback-answer,
.admin-review-calls,
.admin-review-items,
.admin-review-sources,
.admin-review-set-aside,
.admin-catalogue,
.admin-import,
.admin-costs-month {
  margin-top: var(--s-7);
}

/* The administrator's tables are dense: numbers line up and long addresses stay readable. */
.admin-calls,
.admin-orgs,
.admin-costs,
.admin-import-outcomes,
.admin-sources {
  font-variant-numeric: tabular-nums;
}

/* A source's state, and what an import did with an address: only what needs attention is marked. An active source is
   a plain row, because a table where every row is coloured says nothing. */
.outcome-created {
  background: var(--good-tint);
}

.outcome-failed,
.source-broken {
  background: var(--alert-tint);
}

.outcome-duplicate,
.source-paused,
.source-pending {
  color: var(--muted);
}

/* A source that still answers but brings nothing new is warned about rather than failed: the yellow says it needs a
   person, the red of a broken source says the reads themselves broke. */
.source-silent {
  background: var(--mark-tint);
}

/* The second line of a cell: the kind and the scope of a source, or the reason it is broken. Quieter than the value
   above it, and on its own line so a narrow screen can still read the table. */
.cell-note {
  display: block;
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 400;
}

/* A date is read as one thing: the day and the year never fall on two lines. */
.cell-date {
  white-space: nowrap;
}

/* The buttons of a row's last column stay together: a source is approved or paused with one press. */
.source-actions {
  white-space: nowrap;
}

/* The sites that published a call, when more than one did: a short list under the actions, each name a link to the
   page of that site. */
.site-list {
  margin-top: var(--s-2);
  padding-left: var(--s-5);
  color: var(--muted);
  font-size: var(--step--1);
  overflow-wrap: anywhere;
}

/* A group of checkboxes that answers one question is a fieldset of its own inside the section's fieldset. It keeps the
   question a legend and loses the box, so the page still reads as the sections of the design. */
.form fieldset.choice-group {
  margin-top: var(--s-5);
  padding: 0;
  border: 0;
  background: none;
}

.form fieldset.choice-group > legend {
  margin-bottom: var(--s-2);
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 700;
}

legend + .choice-group,
.form > fieldset.choice-group:first-child {
  margin-top: 0;
}

/* A link and the form beside it in the last column of a row: the same distance two forms keep, and the same line. */
td > a.button-plain {
  vertical-align: middle;
}

td > a.button-plain + form,
td > form + a.button-plain {
  margin-left: var(--s-2);
}

/* The control that stops a waiting page from reloading itself: it comes before the message, so a person meets the way
   out before the thing that moves. */
.waiting {
  margin-bottom: 0;
}
