/*
  SE Monitor styles (DESIGN.md §7.7). Mobile-first, works from 360 px; light and dark follow prefers-color-scheme.
  Status colours are tokens with at least 4.5:1 contrast against --bg, --surface and their own tint (--*-bg) in both
  themes. Brand green (#00B050) is only used for the logo accent, never for status. No inline styles exist anywhere:
  every visual state is a class.
*/

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f6f7;
  --surface-2: #e9ecef;
  --text: #1a1c1e;
  --muted: #4d5359;
  --border: #c9ced3;
  --input-border: #6b7177;
  --link: #1558b0;
  --focus: #1558b0;
  --brand: #00b050;

  --red: #b00020;
  --red-bg: #fdecee;
  --amber: #8a5a00;
  --amber-bg: #fdf3e0;
  --green: #007a33;
  --green-bg: #e7f5ec;
  --blue: #1558b0;
  --blue-bg: #e8f0fb;
  --grey: #5f6368;
  --grey-bg: #eef0f2;

  /* Solid fills with white text (buttons, TEST badge, not-live banner). */
  --red-strong: #b00020;
  --blue-strong: #1558b0;
  --on-strong: #ffffff;
  --icon-mark: #ffffff;

  --radius: 8px;
  --tap: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --surface: #1c1f23;
    --surface-2: #272b30;
    --text: #eceff2;
    --muted: #b3b9bf;
    --border: #3a3f45;
    --input-border: #8a9097;
    --link: #8ab4f8;
    --focus: #8ab4f8;

    --red: #ff8a80;
    --red-bg: #3b1418;
    --amber: #f5b74a;
    --amber-bg: #33260d;
    --green: #5fd38d;
    --green-bg: #11291b;
    --blue: #8ab4f8;
    --blue-bg: #14233a;
    --grey: #a9afb6;
    --grey-bg: #25292e;

    --icon-mark: #121417;
  }
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

code,
pre,
.token {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

code {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--link);
  border: 2px solid var(--focus);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 0.5rem;
}

/* ---------- Status colour plumbing: every coloured element sets --c / --c-bg through one of these. ---------- */

.is-red { --c: var(--red); --c-bg: var(--red-bg); }
.is-amber { --c: var(--amber); --c-bg: var(--amber-bg); }
.is-green { --c: var(--green); --c-bg: var(--green-bg); }
.is-grey { --c: var(--grey); --c-bg: var(--grey-bg); }

.text-red { color: var(--red); }
.text-amber { color: var(--amber); }

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.25em;
}

.icon--red { --icon: var(--red); }
.icon--amber { --icon: var(--amber); }
.icon--green { --icon: var(--green); }
.icon--grey { --icon: var(--grey); }

.icon__shape { fill: var(--icon); }
.icon__mark { fill: var(--icon-mark); }

/* ---------- Header, navigation, banners ---------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.25rem 1rem;
  background: var(--surface);
  border-bottom: 3px solid var(--brand);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand__logo {
  width: 40px;
  height: 24px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.25rem;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-height: var(--tap);
  padding: 0 0.5rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}

.nav__link:hover {
  background: var(--surface-2);
}

.nav__link[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--brand);
  text-underline-offset: 0.4em;
}

.nav__form {
  margin: 0;
}

.nav__button {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.nav__user {
  display: none;
  color: var(--muted);
}

.attention {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0.25rem 1rem;
  background: var(--c-bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.attention__text {
  color: var(--text);
}

a.attention__text,
.banner__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  padding: 0.6rem 0.9rem;
  background: var(--c-bg, var(--surface));
  border: 1px solid var(--border);
  border-left: 6px solid var(--c, var(--grey));
  border-radius: var(--radius);
}

.banner > p,
.banner > ol {
  margin: 0.25rem 0;
}

/* The text sits beside the icon and wraps there, instead of dropping below it. */
.banner > span:not(.visually-hidden) {
  flex: 1 1 12rem;
  min-width: 0;
}

.banner.push-ios {
  display: block;
}

.banner__link {
  margin-left: auto;
  font-weight: 600;
}

.banner--demo {
  margin: 0;
  border-radius: 0;
  border: 2px dashed var(--blue);
  background: var(--blue-bg);
}

/* Shown by live.js: a solid red strip so it cannot be mistaken for content. */
.not-live {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  border-radius: 0;
  background: var(--red-strong);
  color: var(--on-strong);
  border-color: var(--red-strong);
  font-weight: 700;
}

.main {
  max-width: 76rem;
  margin: 0 auto;
  padding: 1rem;
}

.main:focus {
  outline: none;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.page-title {
  margin: 0.5rem 0;
  font-size: 1.5rem;
}

.breadcrumb {
  margin: 0;
  font-size: 0.9rem;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.chip {
  min-height: var(--tap);
  padding: 0 1rem;
  border: 2px solid var(--blue);
  border-radius: 999px;
  background: var(--blue-bg);
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.site-footer {
  max-width: 76rem;
  margin: 2rem auto 0;
  padding: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

/* ---------- Overview cards ---------- */

.banners:empty {
  display: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.card {
  min-width: 0;
  padding: 0.5rem 1rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 8px solid var(--c, var(--grey));
  border-radius: 10px;
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.card__title {
  margin: 0;
  font-size: 1.2rem;
}

.card__title a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text);
}

.card__pid {
  color: var(--muted);
  font-size: 0.875rem;
}

.headline {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.25rem 0 0;
  color: var(--c);
  font-size: 1.1rem;
  font-weight: 700;
}

.headline__text {
  flex: 1 1 12rem;
  min-width: 0;
}

.headline__since {
  margin: 0.1rem 0 0 1.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.conditions {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.cond {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.25rem 0.5rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--border);
}

.cond__text {
  flex: 1 1 12rem;
  min-width: 0;
  font-weight: 600;
}

.cond__subject {
  font-weight: 700;
}

.cond.is-stale .cond__text {
  font-weight: 400;
}

.cond__since {
  flex-basis: 100%;
  padding-left: 1.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.card__testmode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  color: var(--blue);
  font-weight: 600;
}

.card__foot {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.badge--test {
  background: var(--blue-strong);
  border-color: var(--blue-strong);
  color: var(--on-strong);
  letter-spacing: 0.05em;
}

.badge--count {
  min-height: var(--tap);
  padding: 0 0.75rem;
  border-color: var(--c, var(--text));
  text-decoration: none;
}

.badge--ack { border-color: var(--green); color: var(--green); }
.badge--late,
.badge--warn { border-color: var(--amber); color: var(--amber); }
.badge--open { border-color: var(--red); color: var(--red); }
.badge--resolved,
.badge--stale { border-color: var(--grey); color: var(--grey); }
.badge--severity { color: var(--muted); }
/* "Email": the site's status is worked out from its emails (DESIGN.md §16.8). */
.badge--feed { border-color: var(--grey); color: var(--grey); }

/* ---------- Email-fed sites ---------- */

/* The red "cannot read the reporting inbox" strip under the attention banner, on every signed-in page (§16.5). */
.inbox-alert:empty {
  display: none;
}

.inbox-alert .banner {
  margin: 0;
  border-radius: 0;
  font-weight: 600;
}

.email-note {
  margin: 0.25rem 0 0.5rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--grey);
}

.email-list li {
  padding: 0.35rem 0;
  border-top: 1px solid var(--border);
}

.email-text {
  display: block;
  overflow-wrap: anywhere;
}

.email-sitetime {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.field__hint {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Site detail ---------- */

.site-head {
  margin-bottom: 1rem;
}

.site-head .page-title {
  margin: 0.25rem 0;
}

.muted,
.hint,
.note {
  color: var(--muted);
}

.hint,
.note {
  font-size: 0.9rem;
}

.notes {
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  border-radius: 6px;
}

.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}

.panel {
  min-width: 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.panel--wide {
  grid-column: 1 / -1;
}

.panel__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.panel__subtitle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem 0 0.25rem;
  font-size: 1rem;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.25rem 0 0.5rem;
  color: var(--c, var(--text));
  font-weight: 700;
}

.hub {
  margin-top: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  padding: 0.2rem 0;
}

.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
  margin: 0.5rem 0;
}

.kv dt {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.kv dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.kv--compact {
  font-size: 0.925rem;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

.table caption {
  padding: 0.25rem 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: left;
}

.table th,
.table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.table thead th {
  color: var(--muted);
  font-size: 0.85rem;
}

.section {
  margin: 1.5rem 0;
}

.section__title {
  margin: 0 0 0.5rem;
  padding-bottom: 0.25rem;
  font-size: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

/* ---------- Alerts and events ---------- */

.alerts,
.events,
.admin-list,
.devices {
  margin: 0;
  padding: 0;
  list-style: none;
}

.alert,
.event,
.admin-item,
.help-item {
  min-width: 0;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.9rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--c, var(--border));
  border-radius: var(--radius);
}

.alert.is-resolved {
  border-left-style: dashed;
}

.alert__head,
.event__head,
.admin-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.alert__title,
.event__title {
  flex: 1 1 12rem;
  min-width: 0;
  font-weight: 700;
}

.event__meta {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.event__message {
  max-height: 20rem;
  margin: 0.25rem 0;
  padding: 0.5rem;
  overflow: auto;
  background: var(--surface-2);
  border-radius: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}

details > summary {
  min-height: var(--tap);
  padding: 0.6rem 0;
  cursor: pointer;
  font-weight: 600;
}

.event__details > summary {
  color: var(--link);
}

.ack-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ack-form .field {
  flex: 1 1 14rem;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1rem 0;
}

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

/* ---------- Forms and buttons ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
}

.filters .field {
  flex: 1 1 11rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  align-items: end;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

.form-stack {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 0.5rem 0;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.inline-form .field {
  flex: 1 1 14rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.field--wide {
  grid-column: 1 / -1;
}

.field__label {
  font-size: 0.9rem;
  font-weight: 600;
}

.field__input {
  width: 100%;
  min-height: var(--tap);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

textarea.field__input {
  min-height: 4.5rem;
  resize: vertical;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.5rem 1rem;
  border: 2px solid var(--blue-strong);
  border-radius: 6px;
  background: var(--blue-strong);
  color: var(--on-strong);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button--secondary {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}

.button--danger {
  background: var(--red-strong);
  border-color: var(--red-strong);
  color: var(--on-strong);
}

.button--link {
  border-color: transparent;
  background: none;
  color: var(--link);
  text-decoration: underline;
  font-weight: 600;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.message {
  margin: 0.5rem 0;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-left-width: 6px;
  border-radius: var(--radius);
}

.message--ok {
  background: var(--green-bg);
  border-left-color: var(--green);
}

.message--error {
  background: var(--red-bg);
  border-left-color: var(--red);
}

.auth {
  max-width: 30rem;
  margin: 1rem auto;
}

/* ---------- Two-step login (DESIGN.md §15.3) ---------- */

.auth--wide {
  max-width: 36rem;
}

.steps {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Large, spaced digits that are easy to check against the app; numeric keypad via inputmode in the markup. */
.field__input--code {
  max-width: 14rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.5rem;
  letter-spacing: 0.2em;
}

.setup-steps {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.setup-steps > li {
  margin-bottom: 1.25rem;
}

.setup-steps__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

/* The QR code PNG keeps its quiet zone and must stay on white, also in dark mode, to scan reliably. */
.qr {
  display: block;
  width: min(100%, 18rem);
  height: auto;
  margin: 0.75rem 0;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  image-rendering: pixelated;
}

.manual-key {
  margin: 0.5rem 0;
  padding: 0 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.manual-key .token {
  letter-spacing: 0.08em;
}

.recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
  gap: 0.5rem 1.5rem;
  margin: 0.75rem 0;
  padding-left: 2rem;
}

.recovery-code {
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  user-select: all;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--tap);
  font-weight: 600;
}

.check input {
  width: 1.4rem;
  height: 1.4rem;
  flex: none;
}

@media print {
  .recovery-codes {
    font-size: 1.2rem;
  }
}

/* ---------- Settings, admin, help ---------- */

.push-status,
.push-result {
  font-weight: 600;
}

.push-result:empty {
  display: none;
}

.device {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
}

.device__name {
  font-weight: 700;
}

.device__status {
  flex-basis: 100%;
}

.install {
  margin: 0.25rem 0;
  padding: 0 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-item.is-inactive {
  border-style: dashed;
}

.admin-actions {
  margin-top: 0.25rem;
}

.token-box {
  padding: 0.75rem 1rem;
  background: var(--amber-bg);
  border: 2px solid var(--amber);
  border-radius: var(--radius);
}

.token {
  display: block;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  font-size: 1rem;
  word-break: break-all;
  user-select: all;
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
}

.toc a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
}

/* Standalone links on their own line ("All events for this site"). */
.link-row a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

/* Links inside a line of text keep the line height but get a 44 px tall hit area. */
.kv dd > a,
.event__meta a,
.admin-item__head a {
  display: inline-block;
  padding-block: 12px;
  margin-block: -12px;
}

.legend {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  padding: 0.4rem 0;
  border-top: 1px solid var(--border);
}

.help-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 0.75rem;
}

.help-item {
  margin: 0;
}

.help-item__title {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.25rem 0;
  color: var(--c);
  font-size: 1rem;
}

/* ---------- Wider screens ---------- */

@media (min-width: 40rem) {
  .nav__user {
    display: inline;
  }

  .kv {
    grid-template-columns: minmax(9rem, max-content) 1fr;
    gap: 0.35rem 1rem;
  }

  .kv dt {
    margin-top: 0;
  }

  .kv--grid {
    grid-template-columns: minmax(12rem, max-content) 1fr;
  }
}

@media (min-width: 64rem) {
  .main {
    padding: 1.5rem;
  }

  .topbar {
    padding: 0.25rem 1.5rem;
  }
}

@media print {
  .topbar,
  .nav,
  .chip,
  form {
    display: none;
  }
}
