/*
 * About, contact, changelog and status pages (WP5). Layout only: colors, type, radii and shadows come from the tokens in site.css.
 */

/* One page width for the company and legal pages: the 220px rail, a gap and
   the reading column. legal.css sets the same measure. */
.company {
  --page: calc(220px + var(--space-7) + var(--prose));

  padding-inline: max(var(--gutter), calc((100% - var(--page)) / 2));
}

.company-head {
  max-width: 760px;
  margin: 0 auto var(--section-head-space);
  text-align: center;
}

.company-head > h1 {
  margin-bottom: var(--space-4);
}

.company-head > .lede {
  margin-inline: auto;
}

.company-head > :last-child {
  margin-bottom: 0;
}

.company-actions {
  margin-top: var(--space-6);
}

/* ------------------------------------------------------------------- about */

.company-notes {
  margin-top: var(--section-head-space);
  color: var(--muted);
  text-align: center;
}

.company-notes > p {
  margin: 0 auto var(--space-2);
}

/* ----------------------------------------------------------------- contact */

.contact-email {
  max-width: none;
  margin: var(--space-5) 0 0;
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.contact-email > a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  color: var(--text);
}

.contact-email + .company-actions {
  margin-top: var(--space-3);
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-card > h3 {
  margin-bottom: var(--space-2);
}

/* The link sits straight under the title on every card, so the three
   links are on one line and no card has a hole in its middle. A card's one
   line of help, where it has one, is drawn under its link. */
.contact-card > .card-arrow {
  min-height: var(--control-height);
  margin-top: 0;
}

.contact-card > p {
  order: 1;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* ------------------------------------------------------------------ status */

.company-head > .status-state {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  max-width: none;
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.status-state-dot {
  flex: none;
  width: var(--space-3);
  height: var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--ok-text);
}

.company-head > .banner-error {
  max-width: var(--prose);
  margin: 0 auto;
  text-align: left;
}

.status-panel {
  max-width: var(--prose);
  margin-inline: auto;
}

.status-table {
  border-top: 1px solid var(--line);
}

.status-table .table tbody tr:first-child > * {
  border-top: 0;
}

.status-table .table :where(th, td) {
  padding-block: var(--space-4);
  font-size: var(--text-base);
  line-height: 1.4;
  vertical-align: middle;
}

.status-table .table td {
  text-align: right;
}

.status-detail {
  display: block;
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.4;
}

.status-down {
  border-color: var(--error-line);
  background: var(--error-bg);
  color: var(--error-text);
}

.status-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  color: var(--muted);
  font-size: var(--text-sm);
}

.status-foot > p {
  margin: 0;
}

/* The quiet link's text lines up with the table's right edge. */
.status-foot > .button {
  margin-right: calc(var(--space-3) * -1);
}

/* --------------------------------------------------------------- changelog */

.changelog,
.changelog-entries {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.changelog {
  max-width: var(--page);
}

/* One date in the left rail, then everything that shipped that day. The
   rail is as wide as the contents rail on the legal pages. */
.changelog-day {
  display: grid;
  grid-template-columns: 220px minmax(0, var(--prose));
  gap: var(--space-7);
  align-items: start;
  max-width: none;
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}

.changelog-day > h2 {
  position: sticky;
  top: calc(var(--header-height) + var(--space-5));
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 26px;
  letter-spacing: 0;
}

.changelog-entry {
  max-width: none;
  padding-bottom: var(--space-6);
}

.changelog-entry > h3 {
  margin-bottom: var(--space-2);
}

.changelog-entry > p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 899px) {
  .changelog-day {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: var(--space-5);
  }
}

/* On a phone the date sits above its entries and scrolls with them. */
@media (max-width: 640px) {
  .changelog-day {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
    padding-top: var(--space-5);
  }

  .changelog-day > h2 {
    position: static;
  }

  .changelog-entry {
    padding-bottom: var(--space-5);
  }
}

/* -------------------------------------------------------------------- stop */

.stop-panel {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
}

.stop-panel > .form {
  width: 100%;
  text-align: left;
}

.stop-panel .input {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stop-note {
  max-width: 440px;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--field-line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
}

/* ----------------------------------------------------------- letter review */

.review-meta {
  max-width: var(--prose);
  margin: var(--space-5) auto 0;
  color: var(--muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.review-letters {
  display: grid;
  gap: var(--space-6);
  max-width: var(--prose);
  margin: var(--space-6) auto 0;
}

.review-letter {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.review-letter h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
}

.review-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-4);
}

.review-facts dt {
  color: var(--muted);
}

.review-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.review-text {
  margin: 0;
  padding: var(--space-4);
  border-radius: var(--radius-code);
  background: var(--code-bg);
  color: var(--code-text);
  font-size: var(--text-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-problem {
  max-width: var(--prose);
  margin: 0 auto var(--space-3);
  color: var(--error-text);
}

.review-answer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  max-width: var(--prose);
  margin: var(--space-6) auto 0;
}
