:root {
  color-scheme: light dark;
  --ink: #16181d;
  --muted: #5f6673;
  --line: #e3e6ec;
  --surface: #ffffff;
  --ground: #f6f7f9;
  --accent: #2f5d50;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceef2;
    --muted: #9aa3b2;
    --line: #2a2f38;
    --surface: #191c22;
    --ground: #101318;
    --accent: #7fb8a5;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

main { max-width: 60rem; margin: 0 auto; padding: 3rem 1.5rem; }

h1 { font-size: 1.5rem; margin: 0 0 0.25rem; }

.subtle { color: var(--muted); margin: 0 0 2rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem;
}

.empty { color: var(--muted); text-align: center; padding: 2.5rem 1rem; }

label { display: block; font-weight: 600; margin-bottom: 0.35rem; }

input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--ground);
  color: var(--ink);
  font: inherit;
}

button {
  padding: 0.6rem 1.1rem;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: var(--surface);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.error { color: #b0413e; margin: 0 0 1rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }

h2 { font-size: 1.05rem; margin: 0 0 0.25rem; }

.panel + .panel { margin-top: 1.5rem; }

.panel ul { margin: 0 0 1rem; padding-left: 1.2rem; }

.panel > .subtle:last-child { margin: 1rem 0 0; }

input[type="file"] { background: transparent; padding: 0.5rem 0; }

/* The Leader Dashboard's availability overlay: days down, blocks across. */
.grid-scroll { overflow-x: auto; }

table.overlay { min-width: 32rem; }
table.overlay caption { text-align: left; padding-bottom: 0.6rem; font-size: 0.9rem; }
table.overlay th[scope="row"] { font-weight: 600; color: var(--ink); white-space: nowrap; }
table.overlay td.slot { height: 2.4rem; border: 1px solid var(--line); }
/* The highlight is an outline rather than a fill, so it can sit on top of the
   green or yellow a one-participant grid already shades the cell with. */
table.overlay td.recommended { outline: 2px solid var(--accent); outline-offset: -2px; }

.dots { display: flex; gap: 3px; flex-wrap: wrap; }
.dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  vertical-align: middle;
}

/* A list because each line is a separate relationship, not a run of prose. It reads
   as lines rather than as bullets, which is what a table cell has room for. */
ul.bare { list-style: none; margin: 0; padding: 0; }

ul.legend { list-style: none; margin: 0.75rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
ul.legend li { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }

.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

h3 { font-size: 0.95rem; margin: 1.5rem 0 0.5rem; }

.material-body { white-space: pre-wrap; }

/* Present to a screen reader, absent to everybody else. The overlay's colours are
   how the grid reads at a glance and never the only way it can be read. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The Ministry's QR code. White in its own right rather than in the theme's
   colours -- an inverted QR code is one most phones will not read -- with a
   border keeping the quiet zone visible against a white panel. */
img.qr {
  display: block;
  /* The size is the page's and is stated on the element. This caps it so the square
     cannot run past the panel on a narrow screen; it never decides how large it is
     drawn, and it never enlarges it. */
  max-width: 100%;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 1rem;
}

/* The Ministry's Intake link and the button that copies it. One row, because the
   button is an action on the field beside it rather than on the panel. */
.copyable {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.copyable input { margin-bottom: 0; }
.copyable button { white-space: nowrap; }

/* Reserved rather than sized to its contents, so the field does not jump narrower
   the moment the confirmation appears. */
.copied {
  color: var(--muted);
  font-size: 0.9rem;
  min-width: 4.5rem;
}
