/* ===========================================================================
   Highs & Lows Reporting — Quorra IT

   Dark throughout. Brand cyan is reserved for the mark and navigation, so the
   only colours on the working surface are coral (running high) and aqua
   (running low). Both mean something; nothing decorative uses them.
   =========================================================================== */

:root {
  --brand:      #1caade;
  --brand-dim:  #1789b3;
  --brand-glow: rgba(28, 170, 222, 0.13);

  --bg:         #0c0b09;
  --surface:    #15140f;
  --raised:     #1c1a15;
  --raised-2:   #23211b;
  --line:       #2e2b24;
  --line-soft:  #24221c;

  --text:       #f1efe9;
  --text-2:     #b6b1a6;
  --text-3:     #837e73;

  --high:       #ff7a4d;
  --high-tint:  rgba(255, 122, 77, 0.13);
  --high-edge:  rgba(255, 122, 77, 0.35);
  --low:        #4fd1c5;
  --low-tint:   rgba(79, 209, 197, 0.12);
  --low-edge:   rgba(79, 209, 197, 0.34);

  --s-00: 0.6875rem;
  --s-0:  0.8125rem;
  --s-1:  0.9375rem;
  --s-2:  1.0625rem;
  --s-3:  1.375rem;
  --s-4:  2.125rem;
}

html[data-theme="light"] {
  --bg:         #f4f6f7;
  --surface:    #ffffff;
  --raised:     #f7f9fa;
  --raised-2:   #eef2f3;
  --line:       #d8dee1;
  --line-soft:  #e8edee;

  --text:       #15140f;
  --text-2:     #4a4f52;
  --text-3:     #82898d;

  --brand:      #1789b3;
  --brand-glow: rgba(28, 170, 222, 0.12);

  --high:       #b0431a;
  --high-tint:  rgba(176, 67, 26, 0.09);
  --high-edge:  rgba(176, 67, 26, 0.3);
  --low:        #16717e;
  --low-tint:   rgba(22, 113, 126, 0.09);
  --low-edge:   rgba(22, 113, 126, 0.3);
}

html[data-theme="light"] .masthead { background: #15140f; }
html[data-theme="light"] .masthead .wordmark { color: #fff; }
html[data-theme="light"] .masthead .wordmark .q { color: #1caade; }
html[data-theme="light"] .masthead nav a { color: #b3bcc0; }
html[data-theme="light"] .masthead nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
html[data-theme="light"] .masthead nav a.here { color: #1caade; background: rgba(28,170,222,.14); }
html[data-theme="light"] .masthead .tenant { color: #cfd5d8; border-left-color: rgba(255,255,255,.16); }
html[data-theme="light"] .masthead .product { color: #9aa3a7; }
html[data-theme="light"] .badge-admin { background: #1caade; color: #15140f; }
html[data-theme="light"] .signin .wordmark .q { color: #1789b3; }
html[data-theme="light"] .btn-brand { color: #fff; background: #1789b3; border-color: #1789b3; }
html[data-theme="light"] .btn-brand:hover { background: #1caade; border-color: #1caade; color: #06232e; }
html[data-theme="light"] .bands a.on { background: var(--raised-2); }
html[data-theme="light"] .entry:hover,
html[data-theme="light"] tbody tr:hover { background: #fafcfc; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--s-1);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: #4cc3ee; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* --- chrome -------------------------------------------------------------- */

.masthead {
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.75rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--brand-glow);
}

.mark { display: flex; align-items: center; gap: 0.8rem; }
.mark img { display: block; height: 32px; width: auto; }

.wordmark {
  font-family: Syne, Inter, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  display: block;
  color: var(--text);
}

.wordmark .q { color: var(--brand); }

.product {
  display: block;
  font-size: var(--s-00);
  color: var(--text-3);
  letter-spacing: 0.03em;
  margin-top: 0.15rem;
}

.tenant {
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
  font-size: var(--s-0);
  color: var(--text-2);
}

.badge-admin {
  font-size: var(--s-00);
  color: var(--bg);
  background: var(--brand);
  padding: 0.1rem 0.45rem;
  font-weight: 600;
  margin-left: 0.45rem;
  border-radius: 2px;
}

.masthead nav { margin-left: auto; display: flex; align-items: center; gap: 0.2rem; }

.masthead nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--s-0);
  padding: 0.45rem 0.85rem;
  border-radius: 2px;
}

.masthead nav a:hover { color: var(--text); background: var(--raised); }
.masthead nav a.here { color: var(--brand); background: var(--brand-glow); }

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

.wrap { max-width: 81rem; margin: 0 auto; padding: 2.25rem 1.75rem 5rem; }
.narrow { max-width: 25rem; padding-top: 4rem; }

h1 {
  font-family: Syne, Inter, sans-serif;
  font-size: var(--s-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}

h2 {
  font-family: Syne, Inter, sans-serif;
  font-size: var(--s-2);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}

.sub { color: var(--text-2); font-size: var(--s-0); margin: 0 0 1.5rem; }
.sub a { color: var(--text-2); }
.sub a:hover { color: var(--brand); }

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

.flash {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  padding: 0.8rem 1rem;
  margin-bottom: 1.25rem;
  font-size: var(--s-0);
}

.flash input { margin-top: 0.6rem; margin-bottom: 0; }

/* --- sign-in ------------------------------------------------------------- */

.signin { text-align: left; }
.signin img { height: 54px; width: auto; display: block; margin-bottom: 1.1rem; }
.signin .wordmark { font-size: 1.5rem; margin-bottom: 0.35rem; }

.signin-tag {
  font-family: Syne, Inter, sans-serif;
  font-size: var(--s-2);
  font-weight: 600;
  color: var(--brand);
  letter-spacing: -0.01em;
  margin: 0 0 1.75rem;
}

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

label { display: block; font-size: var(--s-0); color: var(--text-2); margin-bottom: 0.3rem; }

input[type="text"], input[type="email"], input[type="password"],
input[type="file"], textarea, select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--raised);
  font: inherit;
  color: var(--text);
  margin-bottom: 1rem;
  border-radius: 2px;
}

input::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); background: var(--raised-2); }
input[type="file"] { padding: 0.45rem; color: var(--text-2); }
input[type="file"]::file-selector-button {
  background: var(--raised-2); color: var(--text); border: 1px solid var(--line);
  padding: 0.3rem 0.7rem; margin-right: 0.7rem; border-radius: 2px; cursor: pointer;
  font: inherit; font-size: var(--s-0);
}

button, .btn {
  background: var(--raised-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.55rem 1.2rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 2px;
}

button:hover, .btn:hover { background: #2c2922; border-color: #3a362e; }

.btn-brand { background: var(--brand); border-color: var(--brand); color: #06232e; font-weight: 600; }
.btn-brand:hover { background: #38bced; border-color: #38bced; color: #06232e; }

.btn-quiet {
  background: transparent;
  color: var(--text-2);
  border-color: var(--line);
  padding: 0.3rem 0.6rem;
  font-size: var(--s-0);
}

.btn-quiet:hover { background: var(--raised); color: var(--text); }

.inline-form { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { flex: 1 1 16rem; }
.inline-form input, .inline-form select { margin-bottom: 0; }
.inline-form .tight { flex: 0 0 auto; }

/* --- health rail --------------------------------------------------------- */

.rail { background: var(--surface); border: 1px solid var(--line); padding: 1.25rem 1.375rem 1.125rem; margin-bottom: 1.25rem; }

.rail-figures { display: flex; gap: 2.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.rail-figures div { line-height: 1.1; }

.rail-figures .n {
  font-family: Syne, Inter, sans-serif;
  font-size: var(--s-4);
  font-weight: 700;
  letter-spacing: -0.03em;
  display: block;
}

.rail-figures .k { font-size: var(--s-0); color: var(--text-2); }
.rail-figures .n-high { color: var(--high); }
.rail-figures .n-low { color: var(--low); }

.ticks { display: flex; align-items: flex-end; gap: 1px; height: 34px; }
.tick { flex: 1 1 auto; min-width: 1px; background: var(--raised-2); height: 26%; }
.tick-high { background: var(--high); }
.tick-low { background: var(--low); }
.tick-meter, .tick-data { background: var(--text-3); }

.rail-caption { font-size: var(--s-00); color: var(--text-3); margin: 0.6rem 0 0; }

/* --- bands --------------------------------------------------------------- */

.bands { display: flex; border: 1px solid var(--line); background: var(--surface); margin-bottom: 1.25rem; overflow-x: auto; }

.bands a {
  padding: 0.75rem 1.3rem;
  text-decoration: none;
  color: var(--text-2);
  border-right: 1px solid var(--line);
  white-space: nowrap;
  font-size: var(--s-0);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.bands a:last-child { border-right: 0; }
.bands a:hover { background: var(--raised); color: var(--text); }
.bands a.on { background: var(--raised-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.bands a .n { font-weight: 600; font-size: var(--s-1); color: var(--text); }

/* --- queue --------------------------------------------------------------- */

.queue { background: var(--surface); border: 1px solid var(--line); }

.entry {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) 10rem 7.5rem 8rem;
  gap: 1.25rem;
  padding: 1.05rem 1.375rem;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}

.entry:last-child { border-bottom: 0; }
.entry:hover { background: var(--raised); }

.entry-high { box-shadow: inset 3px 0 0 var(--high); }
.entry-low { box-shadow: inset 3px 0 0 var(--low); }
.entry-meter, .entry-data { box-shadow: inset 3px 0 0 var(--text-3); }

.score { font-family: Syne, Inter, sans-serif; font-size: var(--s-3); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.score small { display: block; font-family: Inter, sans-serif; font-size: var(--s-00); font-weight: 400; color: var(--text-3); letter-spacing: 0; margin-top: 0.2rem; }
.entry-high .score { color: var(--high); }
.entry-low .score { color: var(--low); }

.who a { font-weight: 600; color: var(--text); text-decoration: none; font-size: var(--s-2); letter-spacing: -0.01em; }
.who a:hover { color: var(--brand); }
.who .addr { color: var(--text-2); font-size: var(--s-0); }

.why { margin: 0.45rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.why li { font-size: var(--s-00); color: var(--text-2); background: var(--raised-2); padding: 0.15rem 0.45rem; border: 1px solid var(--line); }
.entry-high .why li.key { background: var(--high-tint); border-color: var(--high-edge); color: var(--high); font-weight: 500; }
.entry-low .why li.key { background: var(--low-tint); border-color: var(--low-edge); color: var(--low); font-weight: 500; }

.reading { text-align: right; }
.reading .units { font-family: Syne, Inter, sans-serif; font-size: var(--s-3); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.reading .meta { font-size: var(--s-00); color: var(--text-2); }
.reading .vs { font-size: var(--s-00); color: var(--text-3); margin-top: 0.2rem; }

.state select { font-size: var(--s-00); padding: 0.3rem; margin-bottom: 0.3rem; }
.state button { width: 100%; }

.done { opacity: 0.4; }

/* --- sparkline ----------------------------------------------------------- */

.spark { display: block; width: 100%; height: 38px; }
.spark-line { fill: none; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.spark-last { stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.spark-ref { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; opacity: 0.6; }
.spark-fill { opacity: 0.16; }

.spark-high .spark-line, .spark-high .spark-last { stroke: var(--high); }
.spark-high .spark-dot { fill: var(--high); }
.spark-high .spark-fill { fill: var(--high); }
.spark-low .spark-line, .spark-low .spark-last { stroke: var(--low); }
.spark-low .spark-dot { fill: var(--low); }
.spark-low .spark-fill { fill: var(--low); }

.spark-big { height: 190px; border: 1px solid var(--line); background: var(--surface); padding: 0.5rem; }
.spark-big .spark { height: 174px; }

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

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); }
th, td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line-soft); font-size: var(--s-0); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--raised); }
th { font-weight: 600; color: var(--text-2); background: var(--raised); border-bottom-color: var(--line); }
td.num, th.num { text-align: right; }

tr.flag-register_reset td, tr.flag-new_register td, tr.flag-removed_meter td { background: var(--raised); }

.empty { background: var(--surface); border: 1px solid var(--line); padding: 3.5rem 1.5rem; text-align: center; color: var(--text-2); }
.empty img { height: 48px; width: auto; opacity: 0.75; margin-bottom: 1rem; }

.stack { display: flex; gap: 0.4rem; }

@media (max-width: 56rem) {
  .entry { grid-template-columns: 3rem minmax(0, 1fr); gap: 0.75rem 1rem; }
  .entry .sparkcell, .entry .state, .entry .reading { grid-column: 2; }
  .reading { text-align: left; }
  .state select, .state button { width: auto; }
  .tenant { margin-left: 0; padding-left: 0; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


/* --- theme toggle -------------------------------------------------------- */

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-2);
  padding: 0.35rem 0.6rem;
  margin-left: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--s-00);
  line-height: 1;
}

.masthead .theme-toggle { border-color: rgba(255, 255, 255, 0.18); color: #b3bcc0; background: transparent; }
.masthead .theme-toggle:hover { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.theme-toggle svg { display: block; }
.theme-toggle .lbl-dark { display: none; }
html[data-theme="light"] .theme-toggle .lbl-dark { display: inline; }
html[data-theme="light"] .theme-toggle .lbl-light { display: none; }

/* --- review box ---------------------------------------------------------- */

.entry { grid-template-columns: 3.5rem minmax(0, 1fr) 10rem 8rem; }

.review-box {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) 9rem auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  background: var(--raised);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
}

.review-box label { font-size: var(--s-00); margin-bottom: 0.25rem; color: var(--text-3); }
.review-box select, .review-box input, .review-box textarea { margin-bottom: 0; font-size: var(--s-0); padding: 0.4rem 0.5rem; }
.review-box textarea { min-height: 2.6rem; resize: vertical; line-height: 1.4; }
.rb-save { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.rb-when { font-size: var(--s-00); color: var(--text-3); white-space: nowrap; }

.entry.reviewed { opacity: 0.72; }
.entry.reviewed:hover { opacity: 1; }

@media (max-width: 56rem) {
  .review-box { grid-template-columns: 1fr; }
}

/* --- company groups in the admin console --------------------------------- */

.org-group { border: 1px solid var(--line); background: var(--surface); margin-bottom: 0.6rem; }
.org-group > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  background: var(--raised);
  user-select: none;
}
.org-group > summary::-webkit-details-marker { display: none; }
.org-group > summary::before {
  content: "▸";
  color: var(--text-3);
  font-size: 0.75rem;
  transition: none;
}
.org-group[open] > summary::before { content: "▾"; }
.org-group > summary:hover { background: var(--raised-2); }
.og-name { font-weight: 600; letter-spacing: -0.01em; }
.og-count { font-size: var(--s-00); color: var(--text-3); margin-left: auto; }
.org-group table { border: 0; border-top: 1px solid var(--line); }

/* --- month blocks inside a year ------------------------------------------ */

.month-block { border-top: 1px solid var(--line); }
.month-label {
  font-size: var(--s-00);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0.7rem 1rem 0.4rem;
}
.month-block table { border: 0; }
.month-block th { background: transparent; border-bottom: 1px solid var(--line-soft); }
a.btn-quiet { text-decoration: none; line-height: 1.35; }

/* --- activity log -------------------------------------------------------- */

td.dim { color: var(--text-3); font-size: var(--s-00); }
tr.row-alert td:first-child { box-shadow: inset 3px 0 0 var(--high); }

/* --- register strip ------------------------------------------------------- */
/* One mark per register, account order. Flagged marks stand tall off a thin
   baseline so the eye reads position and density, not a wall of ticks.        */

.strip {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 46px;
  padding-bottom: 7px;
}

.strip-base {
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 1px;
  background: var(--line);
}

.mk { position: relative; flex: 1 1 auto; min-width: 1px; border-radius: 1px 1px 0 0; }

.mk-clear {
  height: 5px;
  background: var(--text-3);
  opacity: 0.3;
}

.mk-high, .mk-low, .mk-meter, .mk-data { height: 100%; }
.mk-high { background: linear-gradient(to top, var(--high) 0%, var(--high) 55%, transparent 100%); }
.mk-low { background: linear-gradient(to top, var(--low) 0%, var(--low) 55%, transparent 100%); }
.mk-meter, .mk-data {
  height: 60%;
  background: linear-gradient(to top, var(--text-3) 0%, var(--text-3) 60%, transparent 100%);
}

.mk-high::after, .mk-low::after, .mk-meter::after, .mk-data::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: inherit;
}

.mk:hover { outline: 1px solid var(--text); outline-offset: 1px; }

/* --- baseline prompt for a company with no history yet -------------------- */

.baseline-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.baseline-note .bn-title {
  font-family: Syne, Inter, sans-serif;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.baseline-note p { margin: 0; color: var(--text-2); font-size: var(--s-0); max-width: 62ch; }

/* =========================================================================
   Phones

   Data tables become stacked cards -- each row a block, each cell prefixed
   with its column name from data-l. A meter tech is reading this in a truck,
   not pinching and panning a six-column grid.
   ========================================================================= */

@media (max-width: 40rem) {
  :root { --s-4: 1.75rem; }

  .wrap { padding: 1.25rem 0.9rem 4rem; }
  .narrow { padding-top: 2rem; }

  .masthead { padding: 0.7rem 0.9rem; min-height: 0; gap: 0.6rem; align-items: flex-start; }
  .mark img { height: 26px; }
  .wordmark { font-size: 0.95rem; }
  .tenant { margin: 0; padding: 0; border: 0; width: 100%; font-size: var(--s-00); }
  .masthead nav {
    margin: 0.35rem -0.25rem 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .masthead nav::-webkit-scrollbar { display: none; }
  .masthead nav a { padding: 0.4rem 0.6rem; white-space: nowrap; }
  .theme-toggle { margin-left: 0.2rem; }

  .rail, .panel, .empty { padding: 1rem; }
  .rail-figures { gap: 1.25rem 1.75rem; }
  .strip { height: 38px; }

  .bands { margin-bottom: 1rem; }
  .bands a { padding: 0.6rem 0.9rem; }

  .entry { padding: 0.9rem 1rem; }
  .who a { font-size: var(--s-1); }
  .reading .units { font-size: var(--s-2); }
  .review-box { padding: 0.75rem; gap: 0.6rem; }

  .inline-form > div { flex: 1 1 100%; }
  .inline-form button { width: 100%; }

  /* stacked table rows */
  table.stacky, table.stacky thead, table.stacky tbody,
  table.stacky tr, table.stacky td { display: block; width: 100%; }
  table.stacky { border: 0; background: transparent; }
  table.stacky thead { display: none; }
  table.stacky tr {
    background: var(--surface);
    border: 1px solid var(--line);
    margin-bottom: 0.6rem;
    padding: 0.35rem 0.75rem 0.6rem;
  }
  table.stacky tr:hover { background: var(--surface); }
  table.stacky td { border: 0; padding: 0.3rem 0; text-align: left; }
  table.stacky td[data-l]::before {
    content: attr(data-l);
    display: block;
    font-size: var(--s-00);
    color: var(--text-3);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  table.stacky td.num { text-align: left; }
  table.stacky .stack { flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
  table.stacky .stack button, table.stacky .stack a.btn-quiet { flex: 1 1 auto; text-align: center; }

  .org-group > summary { padding: 0.75rem 0.8rem; }
  .month-label { padding: 0.6rem 0.8rem 0.3rem; }
  .month-block table.stacky tr { margin: 0 0.7rem 0.6rem; width: auto; }
}

/* comfortable tap targets on any touch device */
@media (pointer: coarse) {
  .masthead nav a, .bands a { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  button, .btn, select, input { min-height: 2.4rem; }
  .btn-quiet { min-height: 2.1rem; }
}

/* --- scoring overlay ------------------------------------------------------ */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(12, 11, 9, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1.5rem;
}

html[data-theme="light"] .scrim { background: rgba(20, 20, 15, 0.55); }

.scrim-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  padding: 2rem 2.25rem;
  text-align: center;
  max-width: 24rem;
  width: 100%;
}

.scrim-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 1.1rem;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: scrim-spin 0.9s linear infinite;
}

@keyframes scrim-spin { to { transform: rotate(360deg); } }

.scrim-title {
  font-family: Syne, Inter, sans-serif;
  font-size: var(--s-2);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.scrim-note { margin: 0.4rem 0 0; font-size: var(--s-0); color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  .scrim-spinner { animation: none; border-top-color: var(--brand); }
}
