/* The HR dashboard's appearance, matched to FN Knowledge (Open WebUI).
 *
 * WHY THESE EXACT NUMBERS. The dashboard is a second front door to the same
 * system: a person signs into FN Knowledge to talk to the onboarding agent and
 * into this app to author what it says. Two houses styles made them read as two
 * products. The greys, the font stack and the focus ring below are copied
 * verbatim out of Open WebUI v0.11.3 -- `src/tailwind.css`, the `@theme` block
 * -- which is the tag docker-compose.yml pins. They are not approximations:
 * every step is `oklch(L 0 0)`, pure neutral, so there is no hue to get wrong
 * and no reason to translate them into hex and lose a digit.
 *
 * WHAT CAN ROT. If the pinned image moves and upstream re-tunes its ramp, this
 * file keeps the old one and the two surfaces drift apart -- visibly, but
 * harmlessly. `tests/hr_dashboard/test_theme.py` pins the ramp and the font
 * stack so the drift shows up as a failing test rather than as a thing someone
 * notices six months later.
 *
 * WHERE THIS DELIBERATELY DIVERGES. Open WebUI is very nearly colourless. This
 * dashboard is not, because it has a job Open WebUI does not: the employees
 * table exists to be scanned for who is stuck. Blocked, ready, converting and
 * the current wave keep their colours. Everything that is not carrying meaning
 * is grey.
 *
 * DARK MODE follows the operating system, because Open WebUI's own default is
 * `localStorage.theme = 'system'` (src/app.html), so the two agree for anyone
 * who has not overridden it. A person who has overridden it there will see the
 * two disagree; the setting cannot be read across an origin boundary, and the
 * subdomains are separate origins.
 */

:root {
  /* Open WebUI v0.11.3, src/tailwind.css @theme -- copied exactly. */
  --gray-50: oklch(0.98 0 0);
  --gray-100: oklch(0.94 0 0);
  --gray-200: oklch(0.92 0 0);
  --gray-300: oklch(0.85 0 0);
  --gray-400: oklch(0.77 0 0);
  --gray-500: oklch(0.69 0 0);
  --gray-600: oklch(0.51 0 0);
  --gray-700: oklch(0.42 0 0);
  --gray-800: oklch(0.32 0 0);
  --gray-850: oklch(0.27 0 0);
  --gray-900: oklch(0.2 0 0);
  --gray-950: oklch(0.16 0 0);

  /* Upstream's stack, also verbatim. The leading -apple-system is theirs: on
   * macOS it resolves to San Francisco, so the two apps set text in the same
   * face without this one shipping a font file. */
  --font:
    -apple-system, BlinkMacSystemFont, "Inter", "Vazirmatn", ui-sans-serif,
    system-ui, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif,
    "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Semantic names. Only these are remapped for dark mode; the ramp above is
   * one ramp read from both ends, which is how upstream does it too. */
  --bg: #ffffff;
  --chrome: var(--gray-50);
  --surface: var(--gray-50);
  --surface-raised: #ffffff;
  --border: var(--gray-200);
  --border-soft: var(--gray-100);
  --text: var(--gray-900);
  --text-muted: var(--gray-500);

  /* Primary is black-on-white / white-on-black, which is Open WebUI's button
   * convention rather than an accent hue. */
  --on-primary: #ffffff;
  --primary: var(--gray-900);
  --primary-hover: var(--gray-800);

  /* Upstream focuses with `ring-2 ring-blue-500`. Tailwind blue-500/600. */
  --focus: #3b82f6;
  --checked: #2563eb;

  /* Status. These carry meaning, so they survive the reskin -- retuned to sit
   * on a white ground here and on gray-900 below. */
  --ok: #157a52;
  --ok-bg: rgba(21, 122, 82, 0.1);
  --warn: #9a6700;
  --warn-bg: rgba(154, 103, 0, 0.1);
  --blocked: #b42318;
  --blocked-bg: rgba(180, 35, 24, 0.08);
  --wave: #2563eb;
  --wave-bg: rgba(37, 99, 235, 0.1);

  --radius: 0.75rem;
  --radius-sm: 0.5rem;

  /* Lets the browser paint native widgets -- select menus, the file picker,
   * scrollbars, form controls -- in the matching scheme. Without it those stay
   * light on a dark page and the result is half-dark. */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Upstream: content is gray-900, chrome is gray-950, raised is gray-850. */
    --bg: var(--gray-900);
    --chrome: var(--gray-950);
    --surface: var(--gray-850);
    --surface-raised: var(--gray-850);
    --border: var(--gray-800);
    --border-soft: var(--gray-850);
    --text: var(--gray-100);
    /* Upstream's own `.app-muted` is text-gray-500 dark:text-gray-400. */
    --text-muted: var(--gray-400);

    --on-primary: var(--gray-900);
    --primary: var(--gray-100);
    --primary-hover: #ffffff;

    --ok: #4ade80;
    --ok-bg: rgba(74, 222, 128, 0.12);
    --warn: #f0b429;
    --warn-bg: rgba(240, 180, 41, 0.12);
    --blocked: #f97066;
    --blocked-bg: rgba(249, 112, 102, 0.12);
    --wave: #60a5fa;
    --wave-bg: rgba(96, 165, 250, 0.14);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  /* 0.9375rem is upstream's body size for prose (`!text-[0.9375rem]`). */
  font-size: 0.9375rem;
  color: var(--text);
  /* Flat. The gradient wash this replaces was the single loudest tell that the
   * two apps were built by different hands. */
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-underline-offset: 2px;
}

a:hover { color: var(--text-muted); }

/* —— shell —— */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--chrome);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  color: var(--text);
  min-width: 9rem;
}

.brand:hover { color: var(--text); }

.brand-mark {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.95rem;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.nav {
  display: flex;
  gap: 0.15rem;
  flex: 1;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.1s ease, color 0.1s ease;
}

/* Upstream's own interactive-hover ground: `.app-interactive-active` is
 * bg-gray-50/40 dark:bg-gray-800/40 in their app.css. */
.nav a:hover {
  color: var(--text);
  background: color-mix(in oklab, var(--gray-500) 16%, transparent);
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: color-mix(in oklab, var(--gray-500) 22%, transparent);
  font-weight: 600;
}

.session {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.session-upn {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  padding: 2rem 1.25rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* —— typography —— */

h1, h2, h3 {
  /* Upstream sets headings at medium, not bold -- `prose-headings:font-medium`. */
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: 1.5rem; margin: 0 0 0.35rem; }
h2 { font-size: 1.125rem; margin: 2rem 0 0.75rem; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.lede {
  margin: 0;
  color: var(--text-muted);
  max-width: 44rem;
}

.meta, .muted { color: var(--text-muted); }

.hint, .usage-meta, .replace-note, .failure-reason {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* —— messages —— */

.warning, .warnings {
  color: var(--warn);
  border: 1px solid color-mix(in oklab, var(--warn) 30%, transparent);
  background: var(--warn-bg);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
}

.error, .conflict, .errors {
  color: var(--blocked);
  padding: 0.7rem 0.9rem;
  border: 1px solid color-mix(in oklab, var(--blocked) 30%, transparent);
  background: var(--blocked-bg);
  border-radius: var(--radius-sm);
}

.errors, .warnings {
  margin: 0 0 1rem;
  padding-left: 2rem;
}

.errors li, .warnings li { margin: 0.25rem 0; }

/* —— controls —— */

button,
.btn {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background-color 0.1s ease, border-color 0.1s ease;
}

button:hover,
.btn:hover {
  background: color-mix(in oklab, var(--gray-500) 14%, var(--surface-raised));
  color: var(--text);
}

button.primary,
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

button.primary:hover,
.btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--on-primary);
}

button.danger,
.btn.danger {
  background: var(--blocked);
  border-color: var(--blocked);
  color: #ffffff;
}

button.danger:hover,
.btn.danger:hover {
  background: color-mix(in oklab, var(--blocked) 85%, #000);
  border-color: color-mix(in oklab, var(--blocked) 85%, #000);
  color: #ffffff;
}

button.ghost,
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

button.ghost:hover,
.btn.ghost:hover {
  background: color-mix(in oklab, var(--gray-500) 16%, transparent);
  color: var(--text);
}

button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

input,
select,
textarea {
  font: inherit;
  font-size: 0.875rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  background: var(--surface-raised);
  width: 100%;
  max-width: 100%;
}

input::placeholder,
textarea::placeholder { color: var(--gray-400); }

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  /* Upstream focuses with a 2px blue ring and no outline. */
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

textarea { min-height: 5rem; resize: vertical; }

label {
  display: block;
  margin: 0.75rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

label > input,
label > select,
label > textarea {
  display: block;
  margin-top: 0.3rem;
  font-weight: 400;
  color: var(--text);
}

/* Open WebUI replaces the native checkbox entirely (tailwind.css, @layer base):
 * a 14px rounded square that fills blue-600 when checked. Stock checkboxes are
 * the most recognisable "this is a different app" tell on the editor's file
 * picker and Gating toggle, so the same treatment is reproduced here. */
input[type="checkbox"] {
  appearance: none;
  width: 0.875rem;
  height: 0.875rem;
  flex: none;
  vertical-align: middle;
  background: var(--surface-raised);
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  cursor: pointer;
  position: relative;
  display: inline-block;
  padding: 0;
  transition: background-color 0.1s ease, border-color 0.1s ease;
}

@media (prefers-color-scheme: dark) {
  input[type="checkbox"] {
    background: var(--gray-800);
    border-color: var(--gray-600);
  }
}

input[type="checkbox"]:checked {
  background-color: var(--checked);
  border-color: var(--checked);
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  background:
    url('data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M4 8l3 3l5-5"/></svg>')
    center / 80% no-repeat;
}

input[type="checkbox"]:checked::after { opacity: 1; }

input[type="file"] {
  padding: 0.3rem;
  cursor: pointer;
}

/* The browser paints this button itself, and color-scheme alone leaves it a
 * pale OS grey sitting on a near-black page -- the loudest remaining foreign
 * element on the files page. */
input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-right: 0.6rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: color-mix(in oklab, var(--gray-500) 14%, var(--surface));
}

/* —— panels & tables —— */

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

.panel + .panel,
.panel + .table-wrap,
.upload-panel + .table-wrap,
form + .table-wrap {
  margin-top: 1.25rem;
}

/* The rounded corners need `overflow: hidden` on the table, which also clips
 * any column that does not fit -- on a phone that put Progress and Status out
 * of reach entirely. The scrolling belongs one level out. */
.table-wrap {
  overflow-x: auto;
  /* Keeps the table's own shadowless edge from being cropped by the scroll
   * box on the pixel. */
  padding: 1px;
  margin: -1px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* Separation is the ground colour and one hairline -- upstream puts no drop
   * shadow on a surface, and a shadow here read as a different design system. */
  overflow: hidden;
  font-size: 0.875rem;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover td {
  background: color-mix(in oklab, var(--gray-500) 8%, transparent);
}

th {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  background: transparent;
  border-bottom-color: var(--border);
}

td a { text-decoration: underline; }

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

.empty:hover { background: transparent; }

/* —— status —— */

.status-blocked td:last-child,
.step-blocked td:nth-child(2) {
  color: var(--blocked);
  font-weight: 600;
}

.current-wave td:first-child {
  box-shadow: inset 3px 0 0 var(--wave);
}

.state {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.75rem;
  border-radius: 999px;
  color: var(--text-muted);
  background: color-mix(in oklab, var(--gray-500) 16%, transparent);
}

.journey { margin: 2.5rem 0; }

.audit ul {
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.audit li { margin: 0.3rem 0; }

/* —— badges —— */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-ready {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: color-mix(in oklab, var(--ok) 25%, transparent);
}

.badge-converting {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: color-mix(in oklab, var(--warn) 25%, transparent);
}

.badge-failed,
.badge-retired {
  color: var(--blocked);
  background: var(--blocked-bg);
  border-color: color-mix(in oklab, var(--blocked) 25%, transparent);
}

.failure-reason {
  display: block;
  margin-top: 0.3rem;
  font-weight: 400;
}

.usage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.35rem;
  padding: 0;
  list-style: none;
}

.usage-chip {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: color-mix(in oklab, var(--gray-500) 12%, transparent);
  border: 1px solid var(--border-soft);
  border-radius: 0.35rem;
  padding: 0.1rem 0.4rem;
}

.filename {
  font-weight: 500;
  word-break: break-word;
}

/* —— files page —— */

.upload-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
}

.upload-panel .hint { margin: 0.35rem 0 0; font-weight: 400; }

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.row-actions form.inline { margin: 0; display: inline; }

.row-actions details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  background: var(--surface-raised);
  min-width: 14rem;
}

.row-actions summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.8125rem;
}

.replace-note { margin: 0.5rem 0; }

.delete-box {
  border: 1px solid color-mix(in oklab, var(--blocked) 30%, transparent);
  background: var(--blocked-bg);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.delete-box label { margin: 0; }

/* —— editor —— */

.editor-nav {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
  flex-wrap: wrap;
}

.editor-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

.editor-nav a:hover {
  color: var(--text);
  background: color-mix(in oklab, var(--gray-500) 14%, var(--surface-raised));
}

/* A step is a disclosure: shut, the whole journey is one scannable list; open,
 * it is the same form as before. The summary is the only part visible most of
 * the time, so it carries the position, the title and whether the step
 * withholds project documents. */
.step-card {
  margin: 0.5rem 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  border-radius: var(--radius);
  list-style: none;
  user-select: none;
}

/* Safari draws its own triangle through ::-webkit-details-marker, which
 * list-style alone does not remove. */
.step-head::-webkit-details-marker { display: none; }

.step-head:hover {
  background: color-mix(in oklab, var(--gray-500) 10%, transparent);
}

.step-card[open] > .step-head {
  border-bottom: 1px solid var(--border-soft);
  border-radius: var(--radius) var(--radius) 0 0;
}

/* The disclosure arrow, drawn rather than inherited so it can rotate. */
.step-head::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.step-card[open] > .step-head::before { transform: rotate(45deg); }

.step-index {
  flex: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 3.5rem;
}

.step-name {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-badges {
  flex: none;
  display: flex;
  gap: 0.35rem;
}

.badge-gating {
  color: var(--wave);
  background: var(--wave-bg);
  border-color: color-mix(in oklab, var(--wave) 25%, transparent);
}

.step-body { padding: 0.35rem 1.15rem 1.15rem; }

/* Gating is switched on here, and what it does is invisible from this page --
 * the new starter simply retrieves nothing. The control is a row, not the
 * stacked label the other fields use, so the sentence reads as a sentence. */
.gating-field {
  margin: 0.75rem 0 0.25rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
}

.checkbox-row input[type="checkbox"] { margin: 0; }

.gating-field .hint { margin: 0.4rem 0 0; }

.deadlock { margin: 0.6rem 0 0; font-size: 0.8125rem; }

.deadlock[hidden], .badge-gating[hidden] { display: none; }

label > .hint {
  display: block;
  margin: 0.3rem 0 0;
  font-weight: 400;
}

.step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.step-grid .span-2 { grid-column: 1 / -1; }

.file-picker {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin: 0.75rem 0;
  background: transparent;
}

.file-picker legend {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

.file-picker-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 0;
}

.file-picker-list > p {
  margin: 0;
  font-size: 0.8125rem;
}

.file-picker label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--text);
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-raised);
  cursor: pointer;
}

.file-picker input[type="checkbox"] { width: 0.875rem; margin: 0; }

.step-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.editor-footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  position: sticky;
  bottom: 0.75rem;
  padding: 0.7rem;
  background: var(--chrome);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.new-journey {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.new-journey button { justify-self: start; }

/* —— sign-in —— */

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--chrome);
}

.login-card {
  width: min(24rem, 100%);
  background: var(--surface-raised);
  text-align: center;
  padding: 1.75rem 1.5rem;
}

.login-card h1 { font-size: 1.375rem; margin-bottom: 0.75rem; }
.login-card label { text-align: left; }
.login-card .meta { font-size: 0.8125rem; }
.login-card button,
.login-card .btn { width: 100%; margin-top: 0.75rem; }

.inline { display: inline; margin: 0 0 0 0.5rem; }

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

ul.panel li {
  margin: 0.6rem 0;
  font-size: 0.875rem;
}

@media (max-width: 800px) {
  .site-header { flex-wrap: wrap; }

  .nav { order: 3; width: 100%; }

  .upload-panel,
  .step-grid,
  .new-journey {
    grid-template-columns: 1fr;
  }

  /* Below this width the columns cannot all fit, so the table keeps its
   * natural width and the wrapper scrolls rather than the page. */
  table { min-width: 34rem; }

  .session-upn { display: none; }

  main { padding: 1.5rem 1rem 3rem; }
}
