/*
 * Stellar Design System tokens — taken verbatim from
 * projects/stellar/src/styles/partials/properties.css, with the type families
 * swapped from Bull/Bull Text to the new Red Bull family.
 * Component styles follow rb-button, rb-fileupload, rb-appbar and the
 * stellar-demo e2e reference renders.
 */

@font-face {
  font-family: 'Red Bull';
  src: url('/static/fonts/RedBull-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Red Bull';
  src: url('/static/fonts/RedBull-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Red Bull Condensed';
  src: url('/static/fonts/RedBull-Condensed.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* SPACING */
  --rb-3-x-tight: 2px;
  --rb-2-x-tight: 4px;
  --rb-x-tight: 8px;
  --rb-tight: 12px;
  --rb-normal: 16px;
  --rb-loose: 24px;
  --rb-x-loose: 32px;
  --rb-2-x-loose: 40px;
  --rb-3-x-loose: 48px;

  /* COLOR PRIMITIVES */
  --rb-color-yellow-lightest: #fff4e5;
  --rb-color-yellow: #ff9000;
  --rb-color-yellow-darker: #9f530d;

  --rb-color-red-lightest: #fbe7ec;
  --rb-color-red-lighter: #f50b48;
  --rb-color-red: #db0a40;
  --rb-color-red-darker: #c3093b;

  --rb-color-sky-lightest: #e8f0fd;
  --rb-color-sky-lighter: #3279f0;
  --rb-color-sky: #1b6aee;
  --rb-color-sky-darker: #175aca;

  --rb-color-blue-lighter: #001c39;
  --rb-color-blue: #00162b;
  --rb-color-blue-darker: #000f1e;

  --rb-color-green-lightest: #e8f5ed;
  --rb-color-green: #12873f;
  --rb-color-green-darker: #0f6e33;

  --rb-color-white: #fff;
  --rb-color-grey-1: #f8f8f8;
  --rb-color-grey-2: #efefef;

  --rb-color-glass-dark-05: #000f1e0d;
  --rb-color-glass-dark-10: #000f1e1a;
  --rb-color-glass-dark-20: #000f1e33;
  --rb-color-glass-dark-40: #000f1e66;
  --rb-color-glass-dark-60: #000f1e99;

  --rb-color-glass-light-05: #ffffff0d;
  --rb-color-glass-light-10: #ffffff1a;
  --rb-color-glass-light-20: #ffffff33;
  --rb-color-glass-light-40: #ffffff66;
  --rb-color-glass-light-60: #ffffff99;

  /* SEMANTIC */
  --rb-color-surface-dark-lighter: var(--rb-color-blue-lighter);
  --rb-color-surface-dark: var(--rb-color-blue);
  --rb-color-surface-dark-darker: var(--rb-color-blue-darker);
  --rb-color-surface-light-lighter: var(--rb-color-white);
  --rb-color-surface-light: var(--rb-color-grey-1);
  --rb-color-surface-light-darker: var(--rb-color-grey-2);

  --rb-color-text-dark-primary: var(--rb-color-blue-darker);
  --rb-color-text-dark-secondary: var(--rb-color-glass-dark-60);
  --rb-color-text-dark-disabled: var(--rb-color-glass-dark-40);
  --rb-color-text-light-primary: var(--rb-color-white);
  --rb-color-text-light-secondary: var(--rb-color-glass-light-60);
  --rb-color-text-light-disabled: var(--rb-color-glass-light-40);

  --rb-color-primary-lightest: var(--rb-color-sky-lightest);
  --rb-color-primary-lighter: var(--rb-color-sky-lighter);
  --rb-color-primary: var(--rb-color-sky);
  --rb-color-primary-darker: var(--rb-color-sky-darker);

  --rb-color-accent-negative-lightest: var(--rb-color-red-lightest);
  --rb-color-accent-negative-lighter: var(--rb-color-red-lighter);
  --rb-color-accent-negative: var(--rb-color-red);
  --rb-color-accent-negative-darker: var(--rb-color-red-darker);
  --rb-color-accent-positive-lightest: var(--rb-color-green-lightest);
  --rb-color-accent-positive: var(--rb-color-green);
  --rb-color-accent-positive-darker: var(--rb-color-green-darker);
  --rb-color-accent-info-lightest: var(--rb-color-yellow-lightest);
  --rb-color-accent-info: var(--rb-color-yellow);
  --rb-color-accent-info-darker: var(--rb-color-yellow-darker);

  /* ELEVATION */
  --rb-elevation-1-above: 0 0.2rem 0.4rem 0 rgba(0, 15, 30, 0.02), 0 0.8rem 1.2rem 0 rgba(0, 15, 30, 0.04);
  --rb-elevation-2-above: 0 1.6rem 2.4rem 0 rgba(0, 15, 30, 0.06), 0 0.4rem 0.8rem 0 rgba(0, 15, 30, 0.02);

  /* FOCUS */
  --rb-focus-outline: 2px solid var(--rb-color-primary);
  --rb-focus-outline-offset: 2px;

  /* ANIMATION */
  --rb-ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);

  /* TYPOGRAPHY — Red Bull family replaces Bull / Bull Text */
  --rb-font-family-heading: 'Red Bull Condensed', 'Red Bull', Helvetica, sans-serif;
  --rb-font-family-default: 'Red Bull', Helvetica, sans-serif;
  --rb-font-family-monospace: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;

  --rb-font-size-large: 1.8rem;
  --rb-font-size-default: 1.6rem;
  --rb-font-size-small: 1.4rem;
  --rb-font-size-x-small: 1.2rem;
  --rb-line-height-large: 2.2rem;
  --rb-line-height-default: 2rem;
  --rb-line-height-small: 2rem;
  --rb-line-height-x-small: 1.6rem;
  --rb-font-weight-bold: 700;
  --rb-font-weight-medium: 500;
  --rb-font-weight-regular: 400;

  /* BORDER */
  --rb-border-radius-x-small: 2px;
  --rb-border-radius-small: 4px;
  --rb-border-radius-medium: 6px;
  --rb-border-radius-large: 8px;
  --rb-border-radius-full: 999px;
  --rb-border-width: 1px;
  --rb-border-color: var(--rb-color-glass-dark-05);
  --rb-border-color-dark: var(--rb-color-glass-dark-20);

  /* FORMS */
  --rb-input-height-big: 3.4rem;
  --rb-input-border: var(--rb-border-width) solid var(--rb-border-color-dark);
  --rb-input-border-radius: var(--rb-border-radius-medium);

  /* HEADER */
  --rb-header-height: 6rem;
  --rb-appbar-z-index: 550;
}

/* ---- base -------------------------------------------------------------- */

* { box-sizing: border-box; }

html { font-size: 62.5%; }

body {
  margin: 0;
  font-family: var(--rb-font-family-default);
  font-size: var(--rb-font-size-small);
  line-height: 1.5;
  color: var(--rb-color-text-dark-primary);
  background: var(--rb-color-surface-light);
}

h1, h2, h3 {
  font-family: var(--rb-font-family-default);
  font-weight: var(--rb-font-weight-bold);
  margin: 0 0 var(--rb-normal);
}
h1 { font-size: 2.4rem; line-height: 3rem; }
h1.page-title {
  font-family: var(--rb-font-family-heading);
  font-size: 3.2rem;
  line-height: 3.6rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h2 { font-size: 1.8rem; line-height: 2.2rem; }
h3 { font-size: 1.6rem; line-height: 2rem; }

a { color: var(--rb-color-primary); text-decoration: none; }
a:hover { color: var(--rb-color-primary-darker); text-decoration: underline; }
:focus-visible { outline: var(--rb-focus-outline); outline-offset: var(--rb-focus-outline-offset); }

/* ---- appbar (rb-appbar) ------------------------------------------------ */

.app-header {
  height: var(--rb-header-height);
  /* the brand texture runs the full width of the top row; navy underneath
     so nothing flashes before the image lands */
  background: var(--rb-color-surface-dark-lighter) url("/static/img/header-texture.jpg") center / cover no-repeat;
  display: flex;
  align-items: center;
  gap: var(--rb-loose);
  padding: 0 var(--rb-loose);
  position: sticky;
  top: 0;
  z-index: var(--rb-appbar-z-index);
}

.app-header .brand {
  display: flex;
  align-items: center;
  gap: var(--rb-tight);
  color: var(--rb-color-text-light-primary);
}
.app-header .brand:hover { text-decoration: none; color: var(--rb-color-text-light-primary); }
.app-header .brand img.brand-logo { height: 2rem; display: block; }
.app-header .brand .brand-word {
  font-family: var(--rb-font-family-default);
  font-weight: 700;
  font-size: 2.3rem;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}
.app-header .brand .brand-sub {
  font-size: var(--rb-font-size-small);
  color: var(--rb-color-text-light-secondary);
  border-left: 1px solid var(--rb-color-glass-light-20);
  padding-left: var(--rb-tight);
  white-space: nowrap;
  /* the wordmark art has a little bottom bearing, so a plain flex row sits the
     subtitle slightly low against it; centre it optically */
  display: flex;
  align-items: center;
  align-self: stretch;
}

.app-header nav { display: flex; gap: var(--rb-2-x-tight); margin-left: auto; align-items: center; }
.app-header nav a {
  color: var(--rb-color-text-light-primary);
  padding: var(--rb-x-tight) var(--rb-normal);
  border-radius: var(--rb-border-radius-medium);
  font-size: var(--rb-font-size-small);
  line-height: var(--rb-line-height-small);
}
.app-header nav a:hover {
  background: var(--rb-color-glass-light-10);
  color: var(--rb-color-text-light-primary);
  text-decoration: none;
}
.app-header nav a.active {
  background: var(--rb-color-glass-light-20);
  font-weight: var(--rb-font-weight-medium);
}

.user-chip { color: var(--rb-color-text-light-secondary); font-size: var(--rb-font-size-x-small); padding: 0 var(--rb-x-tight); }
.user-chip b { color: var(--rb-color-text-light-primary); font-weight: var(--rb-font-weight-medium); }

/* ---- layout ------------------------------------------------------------ */

.container { max-width: 1115px; margin: 0 auto; padding: var(--rb-x-loose) var(--rb-loose); }
.container--wide { max-width: 1920px; }

.card {
  background: var(--rb-color-surface-light-lighter);
  border: var(--rb-border-width) solid var(--rb-border-color);
  border-radius: var(--rb-border-radius-large);
  box-shadow: var(--rb-elevation-1-above);
  padding: var(--rb-loose);
  margin-bottom: var(--rb-loose);
}

/* ---- buttons (rb-button, medium) --------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--rb-border-width) solid transparent;
  border-radius: var(--rb-border-radius-full);
  padding: var(--rb-x-tight) var(--rb-normal);
  font-family: var(--rb-font-family-default);
  font-size: var(--rb-font-size-default);
  font-weight: var(--rb-font-weight-medium);
  line-height: 2.2rem;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition:
    border-color 120ms var(--rb-ease-out-cubic),
    background-color 120ms var(--rb-ease-out-cubic),
    color 120ms var(--rb-ease-out-cubic);
  background-color: var(--rb-color-primary);
  color: var(--rb-color-text-light-primary);
}
.btn:hover {
  border-color: var(--rb-color-primary-lighter);
  background-color: var(--rb-color-primary-lighter);
  color: var(--rb-color-text-light-primary);
  text-decoration: none;
}
.btn:active {
  border-color: var(--rb-color-primary-darker);
  background-color: var(--rb-color-primary-darker);
}
.btn:disabled {
  border-color: var(--rb-color-surface-light-darker);
  background-color: var(--rb-color-surface-light-darker);
  color: var(--rb-color-text-dark-disabled);
  cursor: not-allowed;
}

.btn--secondary {
  border-color: var(--rb-color-glass-dark-20);
  background-color: transparent;
  color: var(--rb-color-text-dark-primary);
}
.btn--secondary:hover {
  border-color: var(--rb-color-glass-dark-20);
  background-color: var(--rb-color-glass-dark-05);
  color: var(--rb-color-text-dark-primary);
}
.btn--secondary:active {
  border-color: var(--rb-color-glass-dark-40);
  background-color: var(--rb-color-glass-dark-10);
}

.btn--danger {
  border-color: var(--rb-color-accent-negative);
  background-color: var(--rb-color-accent-negative);
}
.btn--danger:hover {
  border-color: var(--rb-color-accent-negative-lighter);
  background-color: var(--rb-color-accent-negative-lighter);
}

.btn--block { width: 100%; }

/* subtle text button on dark appbar (rb-button is-light is-subtle) */
.btn--appbar-subtle {
  background: none;
  border: none;
  border-radius: var(--rb-border-radius-full);
  color: var(--rb-color-text-light-secondary);
  font-family: var(--rb-font-family-default);
  font-size: var(--rb-font-size-small);
  padding: var(--rb-x-tight) var(--rb-normal);
  cursor: pointer;
}
.btn--appbar-subtle:hover { background: var(--rb-color-glass-light-05); color: var(--rb-color-text-light-primary); }

/* ---- forms ------------------------------------------------------------- */

label {
  display: block;
  font-size: var(--rb-font-size-x-small);
  line-height: var(--rb-line-height-x-small);
  color: var(--rb-color-text-dark-secondary);
  margin-bottom: var(--rb-2-x-tight);
}

input[type='text'], input[type='email'], input[type='password'], select {
  width: 100%;
  height: var(--rb-input-height-big);
  padding: var(--rb-x-tight);
  font-family: var(--rb-font-family-default);
  font-size: var(--rb-font-size-small);
  color: var(--rb-color-text-dark-primary);
  background: var(--rb-color-white);
  border: var(--rb-input-border);
  border-radius: var(--rb-input-border-radius);
  margin-bottom: var(--rb-normal);
}
input:focus, select:focus { outline: none; box-shadow: var(--rb-elevation-1-above); border-color: var(--rb-color-glass-dark-40); }
::placeholder { color: var(--rb-color-text-dark-disabled); }

/* ---- messages ---------------------------------------------------------- */

.alert {
  padding: var(--rb-tight) var(--rb-normal);
  border-radius: var(--rb-border-radius-medium);
  margin-bottom: var(--rb-normal);
  font-size: var(--rb-font-size-small);
}
.alert--error { background: var(--rb-color-accent-negative-lightest); color: var(--rb-color-accent-negative-darker); }
.alert--success { background: var(--rb-color-accent-positive-lightest); color: var(--rb-color-accent-positive-darker); }

/* ---- drop zone (rb-fileupload dragzone) -------------------------------- */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--rb-tight);
  padding: calc(var(--rb-loose) * 1.4) var(--rb-loose);
  border: 2px dashed #9a9aa6;
  border-radius: var(--rb-border-radius-large);
  background: var(--rb-color-surface-light-lighter);
  cursor: pointer;
  text-align: center;
  transition: border-color 120ms var(--rb-ease-out-cubic), background-color 120ms var(--rb-ease-out-cubic),
              transform 120ms var(--rb-ease-out-cubic), box-shadow 120ms var(--rb-ease-out-cubic);
}
.dropzone:hover { border-color: var(--rb-color-primary); background: var(--rb-color-sky-lightest); }
/* a file is being dragged over the page: make the target impossible to miss */
.dropzone.is-dragover, .dropzone.is-page-drag {
  border-color: var(--rb-color-primary);
  border-style: solid;
  background: var(--rb-color-sky-lightest);
  box-shadow: 0 0 0 4px rgba(219, 10, 64, .12);
}
.dropzone.is-dragover { transform: scale(1.01); }
.dropzone.is-dragover .dz-title::after { content: " — release to add them"; color: var(--rb-color-primary); }
.dropzone .dz-icon { width: 4.4rem; height: 4.4rem; color: var(--rb-color-primary); margin-bottom: .2rem; }
.dropzone .dz-or { color: var(--rb-color-text-dark-secondary); font-size: var(--rb-font-size-small); }
.dropzone .dz-title {
  font-size: var(--rb-font-size-default);
  line-height: var(--rb-line-height-default);
  font-weight: var(--rb-font-weight-medium);
  color: var(--rb-color-text-dark-primary);
}
.dropzone .dz-button {
  display: inline-flex;
  padding: var(--rb-x-tight) var(--rb-normal);
  border: var(--rb-border-width) solid var(--rb-color-glass-dark-20);
  border-radius: var(--rb-border-radius-full);
  color: var(--rb-color-text-dark-primary);
  font-size: var(--rb-font-size-default);
  font-weight: var(--rb-font-weight-medium);
  line-height: 2.4rem;
}
.dropzone:hover .dz-button { background-color: var(--rb-color-glass-dark-05); }
.dropzone .allowed-files {
  color: var(--rb-color-text-dark-secondary);
  font-size: var(--rb-font-size-x-small);
  line-height: var(--rb-line-height-x-small);
}
.dropzone input[type='file'] { display: none; }

/* Another page of the site, shown over My Updates while uploads run (app.js,
   "browsing the site while uploads run"). A slim amber bar says how the
   uploads are going; the page asked for fills the rest. */
.up-stay { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: var(--rb-color-surface-light); }
.up-dock {
  flex: none; display: flex; align-items: center; gap: var(--rb-normal);
  padding: var(--rb-x-tight) var(--rb-normal);
  background: #fff6e5; border-bottom: 1px solid #f0d093; color: #6b4e00;
  font-size: var(--rb-font-size-small);
}
.up-dock-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #ffb400; animation: up-dock-pulse 1.4s ease-in-out infinite; }
@keyframes up-dock-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.up-dock-say { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--rb-font-weight-bold); }
.up-dock-track { flex: 1; min-width: 6rem; height: 4px; border-radius: 2px; overflow: hidden; background: #f0dfba; }
.up-dock-track > i { display: block; height: 100%; width: 0; background: #d59200; transition: width 200ms var(--rb-ease-out-cubic); }
.up-dock.is-done { background: var(--rb-color-accent-positive-lightest); border-bottom-color: var(--rb-color-accent-positive-lightest); color: var(--rb-color-accent-positive-darker); }
.up-dock.is-done .up-dock-dot { animation: none; background: var(--rb-color-accent-positive); }
.up-dock.is-done .up-dock-track > i { background: var(--rb-color-accent-positive); }
.up-dock .btn { flex: none; }
.up-frame { flex: 1; width: 100%; border: 0; background: var(--rb-color-surface-light); }
html.is-up-stay, html.is-up-stay body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .up-dock-dot { animation: none; } }

/* client upload queue */
/* Uploads not finished, listed at the foot of every page (uploads.js, #323):
   one row a session, with the button that carries it on. */
.up-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1900; background: #fff6e5; border-top: 1px solid #f0d093;
  color: #6b4e00; font-size: var(--rb-font-size-small); box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
.up-bar-head { padding: var(--rb-2-x-tight) var(--rb-normal) 0; font-weight: var(--rb-font-weight-bold); font-size: var(--rb-font-size-x-small);
  text-transform: uppercase; letter-spacing: .06em; }
.up-bar-row { display: flex; align-items: center; gap: var(--rb-normal); padding: var(--rb-x-tight) var(--rb-normal); }
.up-bar-row + .up-bar-row { border-top: 1px solid #f6e4bd; }
.up-bar-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #ffb400; }
.up-bar-row.is-busy .up-bar-dot { animation: up-dock-pulse 1.4s ease-in-out infinite; }
.up-bar-say { min-width: 0; flex: 1; }
.up-bar-track { flex: none; width: 10rem; height: 4px; border-radius: 2px; overflow: hidden; background: #f0dfba; }
.up-bar-track > i { display: block; height: 100%; width: 0; background: #d59200; transition: width 200ms var(--rb-ease-out-cubic); }
.up-bar-row.is-ok { color: var(--rb-color-accent-positive-darker); }
.up-bar-row.is-ok .up-bar-dot, .up-bar-row.is-ok .up-bar-track > i { background: var(--rb-color-accent-positive); }
.up-bar-row.is-err { color: var(--rb-color-accent-negative-darker); }
.up-bar-row.is-err .up-bar-dot { background: var(--rb-color-accent-negative); }
.up-bar .btn { flex: none; }
.up-bar [hidden] { display: none; }
@media (max-width: 640px) { .up-bar-track { display: none; } }
@media (prefers-reduced-motion: reduce) { .up-bar-row.is-busy .up-bar-dot { animation: none; } }

.upload-queue { display: flex; flex-direction: column; gap: var(--rb-2-x-tight); margin-top: var(--rb-tight); }
.uq-item {
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: center; gap: var(--rb-normal);
  background: var(--rb-color-surface-light-lighter);
  border: 1px solid var(--rb-color-glass-dark-05);
  border-radius: var(--rb-border-radius-large);
  padding: var(--rb-x-tight) var(--rb-normal);
  font-size: var(--rb-font-size-small);
}
.uq-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: transparent; }
.uq-bar > i { display: block; height: 100%; width: 0; background: var(--rb-color-primary); transition: width 200ms var(--rb-ease-out-cubic); }
.uq-item--ok .uq-bar > i { background: var(--rb-color-accent-positive); }
.uq-name, .uq-status { position: relative; }
.uq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uq-status { white-space: nowrap; color: var(--rb-color-text-dark-secondary); font-size: var(--rb-font-size-x-small); }
.uq-item--busy { border-color: var(--rb-color-primary); }
.uq-item--busy .uq-status { color: var(--rb-color-primary-darker); }
.uq-item--ok { border-color: var(--rb-color-accent-positive-lightest); background: var(--rb-color-accent-positive-lightest); }
.uq-item--ok .uq-status { color: var(--rb-color-accent-positive-darker); }
.uq-item--err { border-color: var(--rb-color-accent-negative-lightest); background: var(--rb-color-accent-negative-lightest); }
.uq-item--err .uq-status { color: var(--rb-color-accent-negative-darker); }
.uq-item--cancelled { opacity: .6; }
.uq-item--cancelled .uq-name { text-decoration: line-through; }
.uq-status { margin-left: auto; }
.uq-cancel {
  position: relative; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 999px;
  border: 1px solid var(--rb-color-glass-dark-10); background: #fff; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--rb-color-text-dark-secondary);
}
.uq-cancel:hover { border-color: var(--rb-color-primary); color: var(--rb-color-primary); }
.uq-cancel-all { margin-top: var(--rb-tight); }
/* a button's own display would otherwise outrank the hidden attribute */
.uq-cancel-all[hidden], .uq-cancel[hidden] { display: none; }

/* upload/conversion progress state */
.dropzone .dz-busy { display: none; flex-direction: column; align-items: center; gap: var(--rb-tight); }
.dropzone.is-busy { cursor: progress; border-style: solid; border-color: var(--rb-color-primary); }
.dropzone.is-busy .dz-idle { display: none; }
.dropzone.is-busy .dz-busy { display: flex; }
.dz-spinner {
  width: 3.2rem; height: 3.2rem;
  border: 3px solid var(--rb-color-sky-lightest);
  border-top-color: var(--rb-color-primary);
  border-radius: var(--rb-border-radius-full);
  animation: dz-spin 0.8s linear infinite;
}
@keyframes dz-spin { to { transform: rotate(360deg); } }
.dropzone .dz-idle { display: flex; flex-direction: column; align-items: center; gap: var(--rb-tight); }

/* ---- tables ------------------------------------------------------------ */

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--rb-font-size-small);
}
table.data th {
  text-align: left;
  font-size: var(--rb-font-size-x-small);
  line-height: var(--rb-line-height-x-small);
  font-weight: var(--rb-font-weight-medium);
  color: var(--rb-color-text-dark-secondary);
  border-bottom: var(--rb-border-width) solid var(--rb-color-glass-dark-20);
  padding: var(--rb-tight);
}
table.data td {
  padding: var(--rb-tight);
  border-bottom: var(--rb-border-width) solid var(--rb-color-glass-dark-05);
  vertical-align: middle;
}
table.data tr:hover td { background: var(--rb-color-surface-light); }
td.num, th.num { text-align: right; }

/* ---- badges (rb-badge / tag) ------------------------------------------- */

.badge {
  display: inline-block;
  font-size: var(--rb-font-size-x-small);
  line-height: 1;
  font-weight: var(--rb-font-weight-medium);
  padding: var(--rb-2-x-tight) var(--rb-x-tight);
  border-radius: var(--rb-border-radius-full);
  white-space: nowrap;
}
.badge--uploaded { background: var(--rb-color-sky-lightest); color: var(--rb-color-primary-darker); }
.badge--processing { background: var(--rb-color-accent-info-lightest); color: var(--rb-color-accent-info-darker); }
.badge--converted { background: var(--rb-color-accent-positive-lightest); color: var(--rb-color-accent-positive-darker); }
.badge--quarantined { background: var(--rb-color-accent-info-lightest); color: var(--rb-color-accent-negative-darker); }
.badge--failed { background: var(--rb-color-accent-negative-lightest); color: var(--rb-color-accent-negative-darker); }
.badge--admin { background: var(--rb-color-accent-negative); color: var(--rb-color-text-light-primary); }

.btn--pill-sm {
    display: inline-flex; align-items: center; justify-content: center;
    border: var(--rb-border-width) solid transparent;
    border-radius: var(--rb-border-radius-full);
    padding: 0.5rem 1.4rem;
    font-family: var(--rb-font-family-default);
    font-size: 1.3rem; font-weight: var(--rb-font-weight-medium); line-height: 1.8rem;
    cursor: pointer; white-space: nowrap;
    background: var(--rb-color-primary); color: var(--rb-color-text-light-primary);
    transition: background-color 120ms var(--rb-ease-out-cubic);
  }
.btn--pill-sm:hover { background: var(--rb-color-primary-lighter); }
.btn--pill-sm.is-secondary {
    background: transparent; color: var(--rb-color-text-dark-primary);
    border-color: var(--rb-color-glass-dark-20);
  }
.btn--pill-sm.is-secondary:hover { background: var(--rb-color-glass-dark-05); }

/* subtle round delete button — red only on hover */
.sg-delete {
  background: none; border: none; cursor: pointer;
  width: 2.8rem; height: 2.8rem; border-radius: var(--rb-border-radius-full);
  color: var(--rb-color-text-dark-disabled); font-size: 1.6rem; line-height: 1;
  transition: background-color 120ms var(--rb-ease-out-cubic), color 120ms var(--rb-ease-out-cubic);
}
.sg-delete:hover { background: var(--rb-color-accent-negative-lightest); color: var(--rb-color-accent-negative-darker); }

.muted { color: var(--rb-color-text-dark-secondary); }
.mono { font-family: var(--rb-font-family-monospace); font-size: var(--rb-font-size-x-small); }

.pagination { display: flex; gap: var(--rb-tight); align-items: center; margin-top: var(--rb-normal); font-size: var(--rb-font-size-x-small); }

.empty {
  text-align: center;
  color: var(--rb-color-text-dark-disabled);
  padding: var(--rb-x-loose) 0;
}

/* ---- auth window (dark Stellar surface) -------------------------------- */

body.auth-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* the house sign-in backdrop: slate navy, lit from the top */
  background: radial-gradient(120% 80% at 50% 0%, #27405f 0%, #1b2d47 45%, #13223a 100%);
  padding: var(--rb-loose);
}

.auth-card {
  width: 100%;
  max-width: 44rem;
  background: #1e2f47;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  padding: 3.2rem 3rem 2.4rem;
  color: #fff;
  text-align: center;
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.4rem;
}
.auth-brand .auth-name {
  margin: 0.6rem 0 0;
  font-family: var(--rb-font-family-default);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: #fff;
}
.auth-brand .auth-tagline { margin: 0; font-size: 1.5rem; color: rgba(255, 255, 255, 0.62); }

.auth-card .auth-alt {
  margin: 1.6rem 0 0;
  font-size: var(--rb-font-size-x-small);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* the message box: light blue for information, light red for a problem */
.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  background: #e8f1fb;
  color: #17304d;
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.6rem;
  font-size: 1.5rem;
  line-height: 1.4;
}
.auth-note .auth-note-i {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%; margin-top: 0.1rem;
  background: #2f6de1; color: #fff; font-weight: 700; font-size: 1.2rem; line-height: 2rem; text-align: center;
}
.auth-note--error { background: #fdeaee; color: #6d1020; }
.auth-note--error .auth-note-i { background: #db0a40; }

/* the house sign-in button: a dark pill with a thin light edge */
.auth-card .btn--employees {
  display: inline-flex; align-items: center; justify-content: center; gap: 1.2rem;
  height: 6rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff; font-weight: 700; font-size: 1.9rem;
}
.auth-card .btn--employees:hover { background: rgba(255, 255, 255, 0.10); color: #fff; text-decoration: none; }
.auth-card .btn--employees:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.auth-card .ms-logo { width: 2rem; height: 2rem; display: block; }

.auth-foot { margin-top: 2.2rem; font-size: var(--rb-font-size-x-small); color: rgba(255, 255, 255, 0.55); }
.auth-foot a { color: rgba(255, 255, 255, 0.8); }

/* ---- searchable/scrollable tables (Conversion Schema, report, logs) ----- */

.scroll-table {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid var(--rb-color-glass-dark-10);
  border-radius: var(--rb-border-radius-large);
}

.scroll-table thead th {
  position: sticky;
  top: 0;
  background: var(--rb-color-surface-light-lighter);
  z-index: 2;
  box-shadow: 0 1px 0 var(--rb-color-glass-dark-10);
}

.table-search {
  max-width: 420px;
  font-size: 1.4rem;
  height: 3.8rem;
  padding: 0 1.2rem;
  border-radius: var(--rb-border-radius-large);
  margin-bottom: 1rem;
}

.search-row {
  display: flex;
  align-items: center;
  gap: var(--rb-tight);
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.search-row .table-search { margin-bottom: 0; }

.search-count {
  font-size: 1.3rem;
  color: var(--rb-color-text-dark-secondary);
}

mark.hit {
  background: var(--rb-color-yellow, #ffdd00);
  color: inherit;
  padding: 0 0.2em;
  border-radius: 2px;
}

/* ---- how a conversion reports itself ----------------------------------- *
 * The verdict block, the three facts and the checklist, shared by the report
 * page, My Updates and the Microsoft 365 list so one conversion cannot
 * look like two different things. See fontswap/templates/_conversion.html. */

.co-hero {
  display: flex;
  align-items: flex-start;
  gap: var(--rb-loose);
  padding: var(--rb-loose);
  margin-bottom: var(--rb-normal);
  border: var(--rb-border-width) solid var(--rb-border-color);
  border-left-width: 4px;
  border-radius: var(--rb-border-radius-large);
  background: var(--rb-color-surface-light-lighter);
}
.co-hero--converted { border-left-color: var(--rb-color-accent-positive); }
.co-hero--check     { border-left-color: var(--rb-color-accent-info); }
.co-hero--failed    { border-left-color: var(--rb-color-accent-negative); }
.co-hero--running   { border-left-color: var(--rb-color-primary); }

.co-hero-text { flex: 1 1 24rem; min-width: 0; }
.co-hero-acts { display: flex; gap: var(--rb-tight); flex-wrap: wrap; align-items: center; }
.co-headline { margin: 0; font-size: 2.4rem; line-height: 1.2; }
.co-name { margin: 0.4rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.co-detail { margin: 0.6rem 0 0; max-width: 70ch; color: var(--rb-color-text-dark-secondary); }

.co-mark { width: 3.2rem; height: 3.2rem; flex: none; fill: none; stroke-width: 2;
           stroke-linecap: round; stroke-linejoin: round; }
.co-mark--converted { stroke: var(--rb-color-accent-positive); }
.co-mark--check     { stroke: var(--rb-color-accent-info-darker); }
.co-mark--failed    { stroke: var(--rb-color-accent-negative); }
.co-mark--running   { stroke: var(--rb-color-primary); }

.co-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem var(--rb-normal);
  margin: 0 0 var(--rb-loose);
  padding: 0 var(--rb-loose);
  font-size: 1.4rem;
}
.co-facts dt { color: var(--rb-color-text-dark-secondary); }
.co-facts dd { margin: 0; overflow-wrap: anywhere; }

.co-checks { list-style: none; margin: 0; padding: 0; }
.co-checks .co-where { font-weight: 700; margin-top: var(--rb-normal); }
.co-checks .co-where:first-child { margin-top: 0; }
.co-check { margin: 0.4rem 0 0.8rem 1.6rem; }
.co-quote { display: block; overflow-wrap: anywhere; }
.co-what { display: block; max-width: 80ch; color: var(--rb-color-text-dark-secondary); font-size: 1.3rem; }
.co-low { margin-top: var(--rb-normal); }
.co-low > summary { cursor: pointer; color: var(--rb-color-text-dark-secondary); }

.co-detail > summary { cursor: pointer; font-size: 1.6rem; list-style-position: outside; }
.co-detail-body { margin-top: var(--rb-normal); }
.co-downloads { display: flex; gap: var(--rb-tight); flex-wrap: wrap; }
.co-counters { display: flex; gap: var(--rb-loose); flex-wrap: wrap; align-items: flex-start; }
.co-counters table { min-width: 34rem; flex: 1 1 34rem; }

@media (max-width: 640px) {
  .co-hero { flex-wrap: wrap; }
  .co-facts { grid-template-columns: 1fr; padding: 0; }
  .co-facts dt { margin-top: 0.6rem; font-size: 1.2rem; }
}

/* ---- the full-detail page ---------------------------------------------- */

.co-more { display: flex; align-items: center; gap: var(--rb-normal); text-decoration: none; color: inherit; }
.co-more:hover { box-shadow: var(--rb-elevation-2-above); }
.co-more-text { flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }
.co-more-text b { font-size: 1.7rem; }
.co-more-text .muted { max-width: 78ch; }
.co-more-go { font-size: 2.4rem; color: var(--rb-color-primary); }

.rd-back { margin: 0 0 var(--rb-tight); font-size: 1.3rem; }
.rd-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--rb-tight); }
.rd-filters .doc-chip { text-decoration: none; display: inline-block; }
.rd-places { max-height: 12rem; overflow-y: auto; }
.rd-hint { margin: 0 0 var(--rb-normal); font-size: 1.3rem; }

.rd-list { list-style: none; margin: var(--rb-normal) 0 0; padding: 0; }
.rd-where { font-weight: 700; margin: var(--rb-normal) 0 0.4rem; }
.rd-list > li:first-child .rd-where, .rd-list > .rd-where:first-child { margin-top: 0; }

.rd-block { border-bottom: 1px solid var(--rb-border-color); }
.rd-block > summary {
  display: flex; align-items: baseline; gap: var(--rb-tight);
  padding: 0.6rem 0.4rem; cursor: pointer; flex-wrap: wrap;
}
.rd-block > summary:hover { background: var(--rb-color-surface-light-darker, rgba(0,0,0,.03)); }
.rd-block[open] > summary { font-weight: 600; }
.rd-text { flex: 1 1 24rem; min-width: 0; overflow-wrap: anywhere; }
.rd-meta { flex: 0 0 auto; font-size: 1.3rem; }
.rd-delta { flex: 0 0 6rem; text-align: right; font-variant-numeric: tabular-nums; font-size: 1.3rem; }
.rd-wider { color: var(--rb-color-accent-negative-darker); }
.rd-facts { padding: 0.4rem 0.4rem 1.2rem 2rem; margin: 0; }
.rd-block--check > summary { border-left: 3px solid var(--rb-color-accent-negative); padding-left: 0.8rem; }
