/* FULLPASS console — palette taken from the logo:
   blue → purple gradient, with the check-mark green as the "passing" colour. */

:root {
  --ink: #12141a;
  --ink-2: #4a5160;
  --ink-3: #79818e;
  --line: #e5e7ec;
  --line-2: #f1f2f5;
  --bg: #ffffff;
  --surface: #fafafc;
  --sidebar: #fbfbfd;

  --brand-blue: #3b6fe0;
  --brand-purple: #8b3fd4;
  --accent: #5b3fd4;
  --accent-soft: #efecfd;
  --grad: linear-gradient(120deg, var(--brand-blue), var(--brand-purple));

  --critical: #d92d20;
  --critical-soft: #fef3f2;
  --major: #b54708;
  --major-soft: #fffaeb;
  --minor: #175cd3;
  --minor-soft: #eff8ff;
  --info: #667085;
  --info-soft: #f4f4f6;
  --pass: #4a9e22;
  --pass-soft: #f0fae9;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 28px -14px rgba(16, 24, 40, .22);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 268px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f3f5; --ink-2: #b4bac4; --ink-3: #848c99;
    --line: #262a33; --line-2: #1b1e25;
    --bg: #0c0e12; --surface: #13161c; --sidebar: #0f1116;
    --accent: #9b8bff; --accent-soft: #1d1a3d;
    --critical-soft: #2a1414; --major-soft: #2a1f0e; --minor-soft: #101d33;
    --info-soft: #1a1d24; --pass-soft: #12240b;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.7);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }
[hidden] { display: none !important; }

/* ============================================================ shared bits */
.btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: border-color .12s, background .12s, opacity .12s;
}
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.danger { color: var(--critical); border-color: color-mix(in srgb, var(--critical) 32%, transparent); }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 7px; }

.field { margin-bottom: 14px; }
/* The caption, whether the field is a <div> wrapping a <label>, or a <label>
   wrapping a <span>. Both shapes exist in this app. */
.field label, label.field > span {
  display: block; font-size: 13px; font-weight: 550; color: var(--ink-2); margin-bottom: 5px;
}
label.field { display: block; }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }

.notice { border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px; }
.notice.error { background: var(--critical-soft); color: var(--critical); border: 1px solid color-mix(in srgb, var(--critical) 26%, transparent); }
.notice.ok { background: var(--pass-soft); color: var(--pass); border: 1px solid color-mix(in srgb, var(--pass) 30%, transparent); }
.notice.warn { background: var(--major-soft); color: var(--major); border: 1px solid color-mix(in srgb, var(--major) 28%, transparent); }

/* ================================================================== auth */
/* Every screen that is just a card: signing in, an invitation, a reset link,
   confirming an email. */
#authScreen, #inviteScreen, #resetScreen, #verifyScreen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(900px 500px at 50% -10%, var(--accent-soft), transparent 70%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 32px;
  box-shadow: var(--shadow);
}

.auth-logo { display: block; width: 190px; margin: 4px auto 14px; }
.auth-card h1 { font-size: 21px; letter-spacing: -.02em; text-align: center; margin: 6px 0 4px; }
.auth-card .sub { text-align: center; color: var(--ink-3); font-size: 13.5px; margin: 0 0 24px; }

.tabs { display: flex; gap: 4px; background: var(--surface); padding: 4px; border-radius: 10px; margin-bottom: 22px; }
.tabs button {
  flex: 1; border: none; background: none; padding: 8px; border-radius: 7px;
  font-size: 14px; font-weight: 550; color: var(--ink-2); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.auth-card .btn.primary { width: 100%; padding: 11px; margin-top: 4px; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 18px; }

/* The sign-in code step. */
.code-sent { font-size: 14px; line-height: 1.55; color: var(--ink-2); margin: 0 0 16px; }
.code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px !important; letter-spacing: .3em; text-align: center;
}
.code-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.link-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--accent); text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: var(--ink); }
.forgot-link { display: block; margin: 6px 0 0 auto; }

/* ================================================================= shell */
#app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-head { padding: 18px 18px 14px; }
/* The wordmark is a line, so it starts where the menu's words start. */
.sidebar-logo { width: 150px; display: block; margin: 4px 0 2px 4px; }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 0 12px; }

.nav-group { margin-bottom: 20px; }
.nav-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-3); font-weight: 650; padding: 0 8px; margin-bottom: 7px;
}

.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: none; background: none; text-align: left;
  padding: 8px 10px; border-radius: 9px; cursor: pointer;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
}
.nav-item:hover { background: var(--line-2); color: var(--ink); }
.nav-item[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ico { width: 16px; flex-shrink: 0; display: grid; place-items: center; }

.course-item {
  display: block; width: 100%; text-align: left; border: none; background: none;
  padding: 9px 10px; border-radius: 9px; cursor: pointer; margin-bottom: 2px;
}
.course-item:hover { background: var(--line-2); }
.course-item[aria-current="true"] { background: var(--accent-soft); }
.course-item .row { display: flex; align-items: center; gap: 8px; }
.course-item .name {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 550; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.course-item .meta { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; display: flex; gap: 6px; align-items: center; }

.score-pill {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
  background: var(--info-soft); color: var(--info); flex-shrink: 0;
}
.score-pill.good { background: var(--pass-soft); color: var(--pass); }
.score-pill.mid { background: var(--major-soft); color: var(--major); }
.score-pill.bad { background: var(--critical-soft); color: var(--critical); }

.trend { font-size: 11px; font-weight: 700; }
.trend.up { color: var(--pass); }
.trend.down { color: var(--critical); }

.sidebar-foot { border-top: 1px solid var(--line); padding: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-chip .who { flex: 1; min-width: 0; }
.user-chip .who b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .who span { font-size: 11.5px; color: var(--ink-3); }

.main { min-width: 0; padding: 30px 34px 80px; max-width: 1120px; }

.page-head { margin-bottom: 24px; }
/* Deleting a report: at its foot, away from the buttons used every day. */
.report-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-2);
}
.page-head h1 { font-size: 25px; letter-spacing: -.028em; margin: 0 0 5px; }
.page-head p { color: var(--ink-2); margin: 0; font-size: 14.5px; }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: var(--bg); margin-bottom: 18px;
}
.card h2 { font-size: 16px; margin: 0 0 4px; letter-spacing: -.015em; }
.card .card-sub { color: var(--ink-3); font-size: 13.5px; margin: 0 0 18px; }

/* ================================================================ upload */
.dropzone {
  border: 1.5px dashed var(--line); border-radius: 18px; background: var(--surface);
  padding: 34px 28px; cursor: pointer; text-align: center;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.busy { cursor: progress; opacity: .7; }
.dropzone .icon {
  width: 46px; height: 46px; margin: 0 auto 15px; border-radius: 13px;
  background: var(--grad); display: grid; place-items: center; color: #fff;
}
.dropzone .primary { font-weight: 600; font-size: 16px; }
.dropzone .secondary { color: var(--ink-3); font-size: 13.5px; margin-top: 6px; }

/* A left-aligned stack, not a centred wrap. Three labels of different lengths
   wrapping around a centre line read as scattered; one per row reads as a
   list of choices, which is what it is. */
.options { margin-top: 22px; }
.options-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); font-weight: 650; margin-bottom: 10px;
}
.option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 11px; border-radius: 10px; cursor: pointer;
  font-size: 13.5px; color: var(--ink);
}
.option:hover { background: var(--line-2); }
.option input[type=checkbox] {
  accent-color: var(--accent); width: 16px; height: 16px;
  margin-top: 1px; flex-shrink: 0;
}
.option em {
  display: block; font-style: normal; font-size: 12.5px;
  color: var(--ink-3); margin-top: 2px; line-height: 1.45;
}

/* Storyboard and brand palette: two optional files beside the course. */
.options-label .optional { text-transform: none; letter-spacing: 0; font-weight: 500; }
.companion {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center;
  padding: 10px 11px; border-radius: 10px;
}
.companion:hover { background: var(--line-2); }
.companion-text { font-size: 13.5px; color: var(--ink); }
.companion-text em {
  display: block; font-style: normal; font-size: 12.5px;
  color: var(--ink-3); margin-top: 2px; line-height: 1.45;
}
.companion label.btn { cursor: pointer; white-space: nowrap; }
.companion-name { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); }
.companion-name:empty { display: none; }
@media (max-width: 560px) {
  .companion { grid-template-columns: 1fr; }
  .companion label.btn { justify-self: start; }
}
/* Transcribing only makes sense alongside reading the frames. That dependency
   is enforced in the script — ticking it ticks the one above — so it does not
   also need indenting, which just left the three boxes misaligned. */

.run-row {
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2);
}

.progress { margin: 26px auto 0; max-width: 460px; }
.bar { height: 5px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 35%; background: var(--grad); border-radius: 99px; animation: slide 1.15s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(400%); } }
/* A bar that says how far: no sweeping, the fill is the percentage. */
.bar.determinate { height: 7px; }
.bar.determinate > i { animation: none; transform: none; transition: width .5s ease; }
.progress .stage { font-size: 13px; color: var(--ink-2); }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.progress-head .pct { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-note { margin-top: 9px; font-size: 12.5px; color: var(--ink-3); }
.card.progress { max-width: none; margin: 0 0 16px; }
.progress-file { font-weight: 650; font-size: 14px; margin-bottom: 8px; overflow-wrap: anywhere; }

/* The sidebar's scans in progress. */
.job-item { display: flex; align-items: flex-start; gap: 2px; margin-bottom: 2px; }
.job-main {
  flex: 1; min-width: 0; display: block; text-align: left; border: none; background: none;
  padding: 8px 10px; border-radius: 9px; font: inherit; color: inherit;
}
.job-main[data-job-open] { cursor: pointer; }
.job-main[data-job-open]:hover { background: var(--line-2); }
.job-main .row { display: flex; align-items: center; gap: 8px; }
.job-main .name { flex: 1; min-width: 0; font-size: 13px; font-weight: 550; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-main .job-pct { font-size: 11.5px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.job-item.failed .job-pct { color: var(--critical); }
.job-item.done .job-pct { color: var(--pass); }
.job-main .bar { display: block; margin: 6px 0 4px; height: 4px; }
.job-main .bar > i { display: block; }
.job-main .meta { display: block; font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-x { border: none; background: none; color: var(--ink-3); font-size: 16px; line-height: 1; padding: 8px 6px; cursor: pointer; border-radius: 6px; }
.job-x:hover { background: var(--line-2); color: var(--ink); }

.quota-line { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 14px; }

/* =============================================================== results */
.gate {
  display: flex; align-items: center; gap: 15px; border-radius: var(--radius);
  padding: 17px 20px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 20px;
}
.gate.blocked { background: var(--critical-soft); border-color: color-mix(in srgb, var(--critical) 25%, transparent); }
.gate.passed, .gate.pass { background: var(--pass-soft); border-color: color-mix(in srgb, var(--pass) 28%, transparent); }
.gate.pass-with-errors { background: var(--major-soft); border-color: color-mix(in srgb, var(--major) 30%, transparent); }
.gate .badge {
  font-weight: 700; font-size: 11.5px; letter-spacing: .055em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 8px; white-space: nowrap;
}
.gate.blocked .badge { background: var(--critical); color: #fff; }
.gate.passed .badge, .gate.pass .badge { background: var(--pass); color: #fff; }
.gate.pass-with-errors .badge { background: var(--major); color: #fff; }
.gate .sub { color: var(--ink-2); font-size: 13.5px; }

.summary {
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  margin-bottom: 22px; box-shadow: var(--shadow);
}
.ring { position: relative; width: 106px; height: 106px; }
.ring svg { transform: rotate(-90deg); }
.ring .value { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .value b { font-size: 26px; letter-spacing: -.03em; display: block; line-height: 1; }
.ring .value span { font-size: 11px; color: var(--ink-3); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 14px 20px; }
.fact .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.fact .v { font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }

/* Filters on the left, actions on the right, each wrapping as a unit. The
   actions keep to the right whether they share a line with the filters or drop
   below them, so they no longer shift about as the filter counts change. */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  justify-content: space-between; margin-bottom: 16px; }
.toolbar-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar-group.actions { margin-left: auto; }
.chip {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  border-radius: 99px; padding: 6px 13px; font-size: 13px; font-weight: 550; cursor: pointer;
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .count { opacity: .65; margin-left: 5px; }

.cat-head { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 650; margin: 24px 0 9px; }

.finding { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 9px; background: var(--bg); overflow: hidden; }
.finding.dismissed { opacity: .55; background: var(--surface); }
.finding > summary { display: flex; gap: 13px; align-items: flex-start; padding: 13px 15px; cursor: pointer; list-style: none; }
.finding > summary::-webkit-details-marker { display: none; }
.finding[open] > summary { border-bottom: 1px solid var(--line-2); }

.sev {
  flex-shrink: 0; margin-top: 2px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px;
}
.sev.critical { background: var(--critical-soft); color: var(--critical); }
.sev.major { background: var(--major-soft); color: var(--major); }
.sev.minor { background: var(--minor-soft); color: var(--minor); }
.sev.info { background: var(--info-soft); color: var(--info); }

.finding .headline { flex: 1; min-width: 0; }
.finding .title { font-weight: 550; }
.finding.dismissed .title { text-decoration: line-through; }
.finding .where { color: var(--ink-3); font-size: 13px; margin-top: 2px; }

/* The Excel columns, shown inline: where in the course, and what kind. */
.finding .meta-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px;
}
.finding .meta-row > span {
  font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 5px; white-space: nowrap;
}
.finding .meta-slide { background: var(--accent-soft); color: var(--accent); }
.finding .meta-loc {
  background: var(--line-2); color: var(--ink-2); font-weight: 500;
  max-width: 320px; overflow: hidden; text-overflow: ellipsis;
}
.finding .meta-cat {
  background: transparent; color: var(--ink-3); font-weight: 500;
  border: 1px solid var(--line);
}
.finding .times { font-size: 12px; color: var(--ink-3); background: var(--line-2); border-radius: 6px; padding: 2px 7px; align-self: center; }

.finding .body { padding: 14px 15px 15px; font-size: 14px; }
.finding .body p { margin: 0 0 10px; color: var(--ink-2); }
.finding code {
  display: block; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  color: var(--ink); white-space: pre-wrap; word-break: break-word;
}
.finding .fix { display: flex; gap: 8px; background: var(--pass-soft); border-radius: 8px; padding: 10px 12px; color: var(--pass); font-size: 13.5px; }
.finding .actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.finding .dismiss-note { font-size: 12.5px; color: var(--ink-3); font-style: italic; }

.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ================================================================= admin */
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-org { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.admin-org.open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.admin-org-head {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: none; padding: 13px 15px; cursor: pointer; font: inherit; color: var(--ink);
  flex-wrap: wrap;
}
.admin-org-head:hover { background: var(--surface); }
.admin-org-head .ao-name { font-weight: 600; flex: 1; min-width: 160px; display: flex; align-items: center; gap: 7px; }
.admin-org-head .ao-meta { font-size: 12.5px; color: var(--ink-3); width: 100%; }

.tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; background: var(--line-2); color: var(--ink-3); white-space: nowrap;
}
.tag.platform { background: var(--accent-soft); color: var(--accent); }
.tag.override { background: var(--major-soft); color: var(--major); }
.tag.plan-trial { background: var(--info-soft); color: var(--info); }
.tag.plan-solo { background: var(--minor-soft); color: var(--minor); }
.tag.plan-team { background: var(--pass-soft); color: var(--pass); }

.admin-org-body { padding: 0 15px 16px; border-top: 1px solid var(--line-2); }
.admin-section { margin-top: 18px; }
.admin-section h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin: 0 0 9px; font-weight: 650;
}
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.admin-limits { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.admin-limits label { font-size: 12.5px; font-weight: 550; color: var(--ink-2); display: block; }
.admin-limits input {
  display: block; margin-top: 4px; width: 130px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit;
}
.admin-limits input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* Creating an organisation, and inviting into one. Same shape as the allowance
   form above, with wider fields because these hold names and addresses. */
.admin-new-org, .admin-invite { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.admin-new-org label, .admin-invite label {
  font-size: 12.5px; font-weight: 550; color: var(--ink-2); display: block;
}
.admin-new-org input, .admin-new-org select,
.admin-invite input, .admin-invite select {
  display: block; margin-top: 4px; min-width: 200px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--ink); font: inherit;
}
.admin-new-org select, .admin-invite select { min-width: 140px; }
.admin-new-org input:focus, .admin-new-org select:focus,
.admin-invite input:focus, .admin-invite select:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}

.admin-sub {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin: 20px 0 4px; font-weight: 650;
}

.avatar.pending { background: var(--line-2); color: var(--ink-3); }

@media (max-width: 620px) {
  .admin-new-org, .admin-invite { flex-direction: column; align-items: stretch; }
  .admin-new-org input, .admin-new-org select,
  .admin-invite input, .admin-invite select { min-width: 0; width: 100%; }
}

/* ======================================================== profile picture */
.avatar.lg { width: 64px; height: 64px; font-size: 24px; flex-shrink: 0; }
.avatar.xs { width: 20px; height: 20px; font-size: 10px; border-radius: 6px; }
img.avatar { object-fit: cover; }
.avatar-row {
  display: flex; align-items: center; gap: 16px;
  padding: 4px 0 18px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2);
}
.avatar.has-photo, #userAvatar.has-photo {
  background-size: cover; background-position: center; color: transparent;
}

/* ================================================================ upload */
.run-hint { font-size: 13px; color: var(--ink-3); }
.dropzone.has-file { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }

/* The terms checkbox on the signup form. */
.terms {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 4px 0 16px; font-size: 13px; line-height: 1.5; color: var(--ink-2);
}
.terms input[type=checkbox] {
  accent-color: var(--accent); width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0;
}
.terms a { color: var(--accent); }

/* Deleting an account is not an everyday action and should not look like one. */
.card.danger-zone { border-color: #f3c9c6; }
.card.danger-zone h2 { color: #b3261e; }

/* ============================================================ ask dialog */
/* Replaces window.confirm and window.prompt. Those cannot be styled, look like
   the browser talking rather than the app, and a prompt() puts whatever is
   typed — including a password — in plain text in a chrome-level box. */
.ask-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(18, 20, 26, .42);
  display: grid; place-items: center; padding: 20px;
}
.ask-card {
  background: var(--bg); border-radius: 16px; box-shadow: var(--shadow-lg, 0 24px 60px rgba(16,24,40,.22));
  width: min(440px, 100%); padding: 24px; border: 1px solid var(--line);
}
.ask-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.ask-card p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.ask-card .field { margin-bottom: 16px; }
.ask-card .actions { display: flex; gap: 8px; justify-content: flex-end; }
.ask-card .notice { margin-bottom: 12px; }
@media (max-width: 480px) {
  .ask-card .actions { flex-direction: column-reverse; }
  .ask-card .actions .btn { width: 100%; justify-content: center; }
}

/* ================================================ shared, read-only report */
/* Everything that changes something is hidden rather than disabled: a reader
   with no account should not be shown buttons that cannot work for them.
   Only a finding's own actions: the toolbar's group carries the class too,
   and hiding it took the exports away from the people a report is shared with. */
body.read-only .sidebar { display: none; }
body.read-only #app { grid-template-columns: 1fr; }
body.read-only .finding .actions,
body.read-only .dismiss-form,
body.read-only [data-dismiss],
body.read-only [data-restore],
body.read-only [data-dismiss-group] { display: none !important; }
body.read-only .main { max-width: 980px; margin: 0 auto; padding: 32px 24px; }

/* ==================================================== what changed panel */
.card.changes .fact .v.ok  { color: #0f9d58; }
.card.changes .fact .v.bad { color: #d93025; }
.change-list { list-style: none; margin: 0 0 14px; padding: 0; }
.change-list li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px;
}
.change-list li:last-child { border-bottom: none; }
.change-list em { font-style: normal; color: var(--ink-3); font-size: 12.5px; }

/* ============================================== grouped repeated findings */
.finding.grouped > summary .times {
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.group-list {
  margin-top: 4px; max-height: 320px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 9px;
}
.group-item {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 11px; border-bottom: 1px solid var(--line-2); font-size: 13px;
}
.group-item:last-child { border-bottom: none; }
.group-item.dismissed { opacity: .55; }
.gi-where { flex: 1; min-width: 0; color: var(--ink-2); }

/* ========================================================= course dashboard */
.nav-count {
  margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  background: var(--line-2); border-radius: 20px; padding: 1px 7px; min-width: 20px; text-align: center;
}

.course-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.course-filters input, .course-filters select {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 13.5px;
}
.course-filters input { flex: 1; min-width: 200px; }
.course-filters input:focus, .course-filters select:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}

/* Columns are declared once and shared by the header and every row, so they
   stay aligned without a <table>'s layout quirks. */
.course-table { --ct-cols: 1fr 70px 90px 130px; }
.course-table:has(.ct-who) { --ct-cols: 1fr 70px 90px 140px 130px; }

.ct-head, .ct-row {
  display: grid; grid-template-columns: var(--ct-cols); gap: 12px; align-items: center;
}
.ct-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); font-weight: 650; padding: 0 10px 8px;
  border-bottom: 1px solid var(--line);
}
.ct-row {
  width: 100%; border: none; background: none; text-align: left; font: inherit;
  color: var(--ink); cursor: pointer; padding: 11px 10px; border-radius: 9px;
  border-bottom: 1px solid var(--line-2);
}
.ct-row:last-child { border-bottom: none; }
.ct-row:hover { background: var(--line-2); }
.ct-name { font-weight: 600; font-size: 14px; min-width: 0; }
.ct-name em {
  display: block; font-style: normal; font-size: 12px; color: var(--ink-3); font-weight: 400; margin-top: 2px;
}
.ct-verdict { font-size: 12.5px; font-weight: 650; }
.ct-verdict.pass { color: #0f9d58; }
.ct-verdict.pass-with-errors { color: #c77700; }
.ct-verdict.blocked { color: #d93025; }
.ct-who, .ct-date { font-size: 12.5px; color: var(--ink-2); }

@media (max-width: 760px) {
  /* The grid stops helping at this width; each row becomes a stacked card. */
  .ct-head { display: none; }
  .ct-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .ct-verdict, .ct-who, .ct-date { font-size: 12px; }
  .ct-name { grid-column: 1 / -1; }
}

/* ============================================================== versions */
.version-list { display: flex; flex-direction: column; gap: 2px; }
.version {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: none; background: none; text-align: left; cursor: pointer;
  padding: 9px 10px; border-radius: 9px; font: inherit; color: var(--ink);
}
.version:hover { background: var(--line-2); }
.version.current { background: var(--accent-soft); }
.version .v-num { font-weight: 700; font-size: 12.5px; color: var(--ink-3); width: 30px; flex-shrink: 0; }
.version .v-date { font-size: 13px; color: var(--ink-2); width: 110px; flex-shrink: 0; }
.version .v-counts { flex: 1; display: flex; gap: 6px; font-size: 12px; }
.version .v-counts b { font-weight: 700; padding: 1px 7px; border-radius: 5px; }
.version .c-critical { background: var(--critical-soft); color: var(--critical); }
.version .c-major { background: var(--major-soft); color: var(--major); }
.version .c-minor { background: var(--minor-soft); color: var(--minor); }
.version .c-clean { background: var(--pass-soft); color: var(--pass); }
.version .v-delta { font-size: 12px; font-weight: 700; width: 42px; text-align: right; }
.version .v-delta.up { color: var(--pass); }
.version .v-delta.down { color: var(--critical); }
.version .v-current { font-size: 11px; color: var(--accent); font-weight: 650; }

@media (max-width: 620px) {
  .version { flex-wrap: wrap; }
  .version .v-date { width: auto; }
}

/* ================================================================== team */
.member-list { display: flex; flex-direction: column; }
.member {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line-2);
}
.member:last-child { border-bottom: none; }
.member.pending { opacity: .72; }
.member .who { flex: 1; min-width: 0; }
.member .who b { display: block; font-size: 14px; font-weight: 600; }
.member .who span { font-size: 12.5px; color: var(--ink-3); }

.role-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px; flex-shrink: 0;
  background: var(--info-soft); color: var(--info);
}
.role-tag.manager { background: var(--accent-soft); color: var(--accent); }

.member-actions { display: flex; gap: 6px; flex-shrink: 0; }

@media (max-width: 620px) {
  .member { flex-wrap: wrap; }
  .member-actions { width: 100%; padding-left: 44px; }
}

/* ================================================================ tables */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.plan {
  border: 1px solid var(--line); border-radius: 13px; padding: 18px; display: flex; flex-direction: column;
}
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan h3 { margin: 0 0 2px; font-size: 15px; }
.plan .price { font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 2px; }
.plan .blurb { color: var(--ink-3); font-size: 12.5px; min-height: 34px; margin-bottom: 12px; }
.plan .price-note { font-size: 12px; font-weight: 600; color: var(--pass); margin-bottom: 4px; }
/* Monthly or yearly, above the plans. */
.plans-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 16px; }
.interval-switch { display: flex; gap: 6px; margin-bottom: 16px; }
.interval-switch .save { font-size: 11px; font-weight: 650; margin-left: 4px; color: var(--pass); }
.interval-switch .chip[aria-pressed="true"] .save { color: inherit; opacity: .8; }
.plan ul { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; color: var(--ink-2); }
.plan li { padding: 3px 0 3px 18px; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--pass); font-weight: 700; }
.plan .btn { margin-top: auto; width: 100%; }
.plan .current-tag { font-size: 11.5px; font-weight: 650; color: var(--accent); text-align: center; padding: 9px; }

/* The phone bar. Its own row at the top, so the page starts below it: the
   floating button it replaced sat on top of headings and checkboxes. */
.mobile-bar {
  display: none;
  position: sticky; top: 0; z-index: 30;
  height: 56px; padding: 0 12px;
  align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.menu-toggle {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  /* Set, not inherited: a button's own default is black, which drew a black
     icon on the dark theme's near-black button — an empty black square. */
  color: var(--ink);
}
.menu-toggle:hover { border-color: var(--ink-3); }
.mobile-brand { display: inline-flex; align-items: center; }
.mobile-brand img { height: 24px; width: auto; display: block; }
.sidebar-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(12, 14, 18, .45); }
/* Keeps the page from scrolling behind an open menu. */
body.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  #app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 40; width: min(288px, 86vw); height: 100dvh;
    left: 0; transform: translateX(-105%); transition: transform .22s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: none; }
  .main { padding: 18px 16px 70px; }
  /* `:not([hidden])`, and no !important: showOnly() hides the bar on the
     sign-in and invitation screens with the hidden attribute, and an
     !important here once outranked that and left it on every phone. */
  .mobile-bar:not([hidden]) { display: flex; }
  .summary { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
@media (min-width: 901px) {
  .sidebar-scrim { display: none; }
}

/* Phones. The desktop layout fits, but wastes the width a phone does not
   have: cards inside cards each adding 22px a side, a verdict squeezed into a
   strip beside its badge, and finding titles wrapping at three words because
   the severity label kept a column of its own. */
@media (max-width: 560px) {
  .page-head { margin-bottom: 18px; }
  .page-head h1 { font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
  .card { padding: 16px; border-radius: 12px; }
  .dropzone { padding: 26px 16px; }
  .options { margin-top: 18px; }
  .option, .companion { padding-left: 4px; padding-right: 4px; }

  .gate { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }

  /* Severity and count on the first line, the title the full width below. */
  .finding > summary { flex-wrap: wrap; row-gap: 6px; padding: 12px 13px; }
  .finding .headline { order: 3; flex-basis: 100%; }
  .finding .times { margin-left: auto; }
  .finding .body { padding: 12px 13px 13px; }
  .finding .meta-loc { max-width: 100%; }

  .facts { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 12px 14px; }
  .summary .facts { grid-template-columns: 1fr 1fr; }
  .toolbar-group.actions { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

@media print {
  .sidebar, .toolbar, .mobile-bar, .sidebar-scrim, .finding .actions, .dropzone, .options { display: none !important; }
  #app { grid-template-columns: 1fr; }
  .main { padding: 0; max-width: none; }
  .finding { break-inside: avoid; }
  .finding .body { display: block !important; }
  .finding.dismissed { display: none !important; }
}

/* ===================================== learner playthrough and pictures */
.finding-pic { margin: 0 0 12px; }
.finding-pic .pic-wrap { position: relative; display: inline-block; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; line-height: 0; }
.finding-pic img { max-width: 100%; max-height: 420px; height: auto; display: block; }
.finding-pic .pic-box { position: absolute; border: 2.5px solid var(--critical); border-radius: 3px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); pointer-events: none; }
.finding-pic .pic-box.major { border-color: var(--major); }
.finding-pic .pic-box.minor { border-color: var(--minor); }
.finding-pic .pic-box.info { border-color: var(--info); }
.finding-pic figcaption { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.4; }
.playthrough .pt-block { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.playthrough .pt-block:first-of-type { border-top: 0; padding-top: 0; }
.playthrough .pt-block h3 { margin: 0 0 8px; font-size: 15px; }
.pt-result { border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; border-left: 4px solid var(--major); background: var(--major-soft); }
.pt-result.ok { border-left-color: var(--pass); background: var(--pass-soft); }
.pt-result.bad { border-left-color: var(--critical); background: var(--critical-soft); }
.pt-result span { color: var(--ink-2); }
.pt-steps { margin-top: 10px; font-size: 13px; }
.pt-steps summary { cursor: pointer; color: var(--accent); }
.pt-steps ol { margin: 8px 0 0; padding-left: 20px; }
.pt-steps li { margin-bottom: 6px; }
.pt-acts { color: var(--ink-2); }
.pt-next { color: var(--ink-3); font-size: 12px; }
.option.disabled { opacity: .6; }

/* =========================================== admin: tabs, logs, support */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.admin-log { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.log-row { display: grid; grid-template-columns: 150px minmax(120px, 220px) 1fr auto; gap: 12px; align-items: start; padding: 9px 12px; border-top: 1px solid var(--line-2); font-size: 13px; }
.log-row:first-child { border-top: 0; }
.log-when { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.log-who { color: var(--ink-2); overflow-wrap: anywhere; }
.log-what { overflow-wrap: anywhere; }
.log-acct { color: var(--ink-3); font-size: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line-2); vertical-align: top; }
.admin-table th { color: var(--ink-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-top: 0; }
.tag.ok { background: var(--pass-soft); color: var(--pass); }
.support-banner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.support-banner .btn { margin-left: auto; }
/* A customer's report read as support: nothing on it can be changed. */
body.support-view .finding .actions,
body.support-view .dismiss-form,
body.support-view [data-dismiss],
body.support-view [data-restore],
body.support-view [data-dismiss-group] { display: none !important; }
@media (max-width: 720px) {
  .log-row { grid-template-columns: 1fr; gap: 2px; }
}

/* =========================================== support requests and answers */
.support-req { border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; background: var(--bg); }
.support-req > summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.support-req > summary::-webkit-details-marker { display: none; }
.support-req > summary .card-sub { margin: 0; margin-left: auto; font-size: 12px; }
.support-req[open] > summary { border-bottom: 1px solid var(--line-2); }
.support-meta { padding: 8px 12px 0; margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.support-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
.support-file { display: inline-flex; flex-direction: column; gap: 4px; font-size: 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); text-decoration: none; max-width: 220px; overflow-wrap: anywhere; }
.support-file.pic img { display: block; max-width: 200px; max-height: 130px; object-fit: contain; border-radius: 4px; background: var(--surface); }
.support-thread { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.support-msg { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; }
.support-msg.from-support { border-left-color: var(--accent); }
.support-msg-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-3); margin-bottom: 3px; }
.support-msg-head b { color: var(--ink); }
.support-msg-body { white-space: pre-wrap; font-size: 14px; overflow-wrap: anywhere; }
.support-follow { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.support-follow textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); resize: vertical; }
.support-follow .btn { align-self: flex-start; }
.support-follow .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tag.warn { background: var(--major-soft); color: var(--major); }
.count-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--major); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* =========================================== who is online (admin screen) */
.member .avatar { position: relative; }
.presence-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--line); border: 2px solid var(--bg); }
.presence-dot.on { background: #22c55e; box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 25%, transparent); }
.member .who .seen { display: block; font-size: 11.5px; color: var(--ink-3); }
/* The Team page: when each person was last on, beside who they are. */
.member .team-who { display: flex; align-items: center; gap: 8px 28px; flex-wrap: wrap; }
.member .team-who > div { min-width: min(220px, 100%); }
.member .team-who .seen { font-size: 12.5px; white-space: nowrap; }
.member .team-who .seen.on { color: #15803d; font-weight: 600; }
.org-online { display: none; }
.org-online.on { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; padding: 1px 8px 1px 6px; border-radius: 99px; font-size: 11.5px; font-weight: 650; color: #15803d; background: color-mix(in srgb, #22c55e 14%, transparent); vertical-align: 1px; }
.org-online i, .online-now i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.online-now { display: inline-flex; align-items: center; gap: 6px; color: #15803d; font-weight: 650; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .org-online.on, :root:not([data-theme="light"]) .online-now { color: #4ade80; } }
:root[data-theme="dark"] .org-online.on, :root[data-theme="dark"] .online-now { color: #4ade80; }

/* ====================================== working through a report together */
.work { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.work-group { margin: 0 0 12px; padding-top: 0; border-top: 0; }
.work-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.work-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-3); }
.work-field select, .chip-select {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 150px;
}
.chip-select { border-radius: 99px; padding: 5px 10px; min-width: 0; }
.work-note { font-size: 12px; color: var(--ink-3); padding-bottom: 7px; }
.comments { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.comment { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; }
.comment.system { border-left-color: var(--major); }
.comment-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-3); }
.comment-head b { color: var(--ink); }
.comment-body { white-space: pre-wrap; font-size: 13.5px; overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.link-btn { border: none; background: none; padding: 0; color: var(--ink-3); font-size: 12px; text-decoration: underline; cursor: pointer; }
.work-tag { display: inline-block; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 99px; margin-left: 6px; background: var(--line-2); color: var(--ink-2); }
.work-tag.fixed { background: var(--pass-soft); color: var(--pass); }
.work-tag.wontfix { background: var(--major-soft); color: var(--major); }
.work-tag.who { background: var(--accent-soft); color: var(--accent); }

/* Admin, Emails: each provider's allowance. */
.usage-providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 14px; }
.usage-provider { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
.usage-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.usage-name .card-sub { margin: 0; }
.usage-name .usage-plan { margin-left: auto; }
.usage-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.usage-line .pct { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.usage-bar.near > i { background: var(--major); }
.usage-bar.over > i { background: var(--critical); }
.usage-refused { color: var(--major); }
.usage-days { display: flex; align-items: flex-end; gap: 3px; height: 56px; margin-top: 10px; }
.usage-days > i { flex: 1; background: var(--accent); opacity: .75; border-radius: 2px 2px 0 0; min-width: 0; }
.usage-days-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

/* Pictures that follow their report (app.js picturesPendingNotice). */
.notice.pictures-pending { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.notice.pictures-pending .spinner { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--line, #e6e8ec); border-top-color: var(--accent, #5b3fd4); animation: fp-spin 0.9s linear infinite; }
.notice.pictures-pending.done .spinner { display: none; }
@keyframes fp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .notice.pictures-pending .spinner { animation: none; } }

/* The logo is the way home (app.js .home-link). */
.home-link { text-decoration: none; border-radius: 8px; }
.sidebar-head .home-link { display: inline-block; }
.home-link:focus-visible { outline: 2px solid var(--accent, #5b3fd4); outline-offset: 3px; }
