/* Document shell: reset, page chrome, banners. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Respect a reduced-motion preference; the timeline animates scroll position. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -- Classification ---------------------------------------------------------------- */

.classification {
  background: var(--brand-secondary);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: var(--sp-1) var(--sp-4);
  text-align: center;
  text-transform: uppercase;
}

/* Deliberately unlike the classification marking rather than a variation on it. The two are read at
   a glance and never together, so the demonstration banner has to be distinguishable from the real
   one in a small screenshot, in greyscale, and by someone who has only ever seen the other. Hence a
   different colour, a stripe, and a larger type size — three cues rather than one, because colour
   alone survives none of those three conditions. */
.classification--demo {
  background: repeating-linear-gradient(
    135deg,
    #7a3ba8,
    #7a3ba8 12px,
    #5f2e84 12px,
    #5f2e84 24px
  );
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
}

/* -- Chrome ------------------------------------------------------------------------ */

.chrome {
  align-items: center;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-8);
}

.chrome__product {
  color: var(--tx);
  font-size: var(--fs-lg);
  font-weight: 600;
}

.chrome__product::before {
  background: var(--brand-primary);
  border-radius: 2px;
  content: '';
  display: inline-block;
  height: 1em;
  margin-right: var(--sp-2);
  vertical-align: -0.125em;
  width: 3px;
}

.chrome__identity {
  align-items: center;
  color: var(--tx2);
  display: flex;
  font-size: var(--fs-sm);
  gap: var(--sp-5);
}

.chrome__actor--anonymous {
  color: var(--red);
}

.chrome__signout {
  color: var(--brand-secondary);
}

.main {
  margin: 0 auto;
  max-width: 1600px;
  padding: var(--sp-7) var(--sp-8);
}

@media (max-width: 900px) {
  .chrome,
  .main {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }
}

/* -- Banners ----------------------------------------------------------------------- */

.banner {
  align-items: flex-start;
  border-left: 3px solid;
  border-radius: var(--radius);
  display: flex;
  font-size: var(--fs-base);
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
}

.banner--warning {
  background: var(--amber-bg);
  border-color: var(--amber);
  color: #6b4a05;
}

.banner--error {
  background: var(--red-bg);
  border-color: var(--red);
  color: #7d2626;
}

.banner__title {
  font-weight: 600;
}

.banner__detail {
  font-size: var(--fs-sm);
}

/* The attribute means what it says, whatever a component's own display rule says.
   A control rendered `hidden` until a module gives it something to do — the session's close, the
   results list's way out of the fold — is laid out by a class that sets `display`, and an author rule
   beats the browser's own `[hidden]` rule at any specificity. Without this the control that is not
   supposed to exist yet is on screen until a script takes it away, and stays on screen for good if no
   script runs, which is the opposite of what rendering it hidden was for. */
[hidden] {
  display: none !important;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
