/* ==========================================================================
   Competitor Portal
   An instrument panel, not a website. The chrome stays graphite and quiet so
   that the one thing carrying colour - how cold a competitor's trail has gone -
   is legible at a glance across a dense table.
   ========================================================================== */

:root {
  /* Housing: cool graphite, the colour of an instrument case */
  --ink:        #101720;
  --ink-2:      #34414f;
  --ink-3:      #6b7c8d;
  --rule:       #d5dce4;
  --rule-soft:  #e6ebf0;
  --surface:    #ffffff;
  --canvas:     #eaeef2;
  --raised:     #f5f7f9;

  /* Interactive: the cold end of the thermal ramp, so the palette is one family */
  --accent:     #4a2d7a;
  --accent-ink: #ffffff;
  --accent-soft:#efeaf7;

  /* Thermal ramp - cold trail to hot trail */
  --t-0:  #2b1a4d;
  --t-25: #5f206e;
  --t-50: #a62d5a;
  --t-72: #d85c2a;
  --t-88: #ed9121;
  --t-100:#facc79;

  /* States */
  --ok:     #1c6b52;
  --ok-bg:  #e3f2ec;
  --warn:   #8a5a08;
  --warn-bg:#fbf0d9;
  --bad:    #a32020;
  --bad-bg: #fbe6e6;

  --rail-w: 232px;
  --radius: 3px;
  --shadow: 0 1px 2px rgba(16, 23, 32, .06), 0 4px 14px rgba(16, 23, 32, .04);

  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, "Courier New", monospace;
}

html[dir="rtl"] {
  --sans: "IBM Plex Sans Hebrew", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --cond: "IBM Plex Sans Hebrew", "IBM Plex Sans Condensed", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------------------------------------------------------------- shell */

.shell { display: flex; min-height: 100vh; }

.rail {
  width: var(--rail-w);
  flex: 0 0 var(--rail-w);
  background: var(--ink);
  color: #c3ccd6;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.rail-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.15rem 1.25rem 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* A reticle, drawn in CSS: crosshair with a ranging gap. */
.rail-mark {
  width: 17px; height: 17px; flex: none;
  border: 1.5px solid var(--t-88);
  border-radius: 50%;
  position: relative;
}
.rail-mark::before, .rail-mark::after {
  content: ""; position: absolute; background: var(--t-88);
}
.rail-mark::before { left: 50%; top: -4px; bottom: -4px; width: 1.5px; margin-left: -.75px; }
.rail-mark::after  { top: 50%; left: -4px; right: -4px; height: 1.5px; margin-top: -.75px; }

.rail-name {
  font: 600 14px/1 var(--cond);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
}

.rail-nav { padding: .75rem 0; flex: 1; overflow-y: auto; }

.rail-link {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .5rem 1.25rem;
  color: #aeb9c5;
  font: 500 13.5px/1.35 var(--cond);
  letter-spacing: .025em;
  border-inline-start: 2px solid transparent;
}
.rail-link:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.rail-link.is-active {
  background: rgba(255,255,255,.07);
  border-inline-start-color: var(--t-88);
  color: #fff;
}

.rail-badge {
  background: var(--t-72); color: #fff;
  font: 500 11px/1 var(--mono);
  padding: .2rem .38rem; border-radius: 2px;
}

.rail-foot { border-top: 1px solid rgba(255,255,255,.08); padding: .85rem 1.25rem 1rem; }

.rail-user { display: block; color: inherit; }
.rail-user:hover { text-decoration: none; }
.rail-user-name { display: block; color: #fff; font-weight: 500; font-size: 13px; }
.rail-user-role { display: block; font: 400 11px/1.4 var(--mono); color: #7d8b99; text-transform: uppercase; }

.rail-tools { display: flex; gap: .4rem; margin-top: .6rem; }
.rail-tool {
  font: 500 11px/1 var(--mono);
  color: #97a3b1;
  border: 1px solid rgba(255,255,255,.14);
  padding: .3rem .45rem; border-radius: 2px;
}
.rail-tool:hover { color: #fff; border-color: rgba(255,255,255,.35); text-decoration: none; }

.main { flex: 1; min-width: 0; padding: 1.6rem 2rem 3rem; }

/* ---------------------------------------------------------------- head */

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.page-title {
  margin: 0;
  font: 600 25px/1.15 var(--cond);
  letter-spacing: -.005em;
}
.page-sub { margin: .3rem 0 0; color: var(--ink-3); font-size: 13.5px; max-width: 62ch; }
.page-actions { display: flex; gap: .5rem; align-items: center; }

/* ---------------------------------------------------------------- flash */

.flash {
  padding: .65rem .9rem; margin-bottom: 1rem;
  border-radius: var(--radius);
  border-inline-start: 3px solid;
  font-size: 13.5px;
}
.flash-ok    { background: var(--ok-bg);   border-color: var(--ok);   color: var(--ok); }
.flash-warn  { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.flash-error { background: var(--bad-bg);  border-color: var(--bad);  color: var(--bad); }

/* ---------------------------------------------------------------- panels */

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .85rem 1.1rem; border-bottom: 1px solid var(--rule-soft);
}
.panel-title {
  margin: 0; font: 600 12px/1 var(--cond);
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2);
}
.panel-sub { color: var(--ink-3); font-size: 12.5px; margin: .25rem 0 0; }
.panel-body { padding: 1.1rem; }
.panel-body.is-flush { padding: 0; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* ---------------------------------------------------------------- stats */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .75rem; margin-bottom: 1.25rem; }

.stat {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: .85rem 1rem;
}
.stat-n { font: 500 26px/1.1 var(--mono); letter-spacing: -.02em; }
.stat-label {
  font: 500 11px/1.3 var(--cond); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin-top: .2rem;
}
.stat.is-alert .stat-n { color: var(--t-72); }

/* ---------------------------------------------------------------- thermal
   The signature element. A competitor's row carries a bar whose colour is its
   time-since-check on a thermal ramp - the same way a sight renders heat. */

.thermal {
  display: inline-block;
  width: 46px; height: 6px;
  border-radius: 1px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
  vertical-align: middle;
}
.thermal-fill { display: block; height: 100%; border-radius: 1px; }

.thermal-legend {
  display: flex; align-items: center; gap: .55rem;
  font: 400 11.5px/1 var(--mono); color: var(--ink-3);
}
.thermal-scale {
  height: 7px; width: 130px; border-radius: 1px;
  background: linear-gradient(to right,
    var(--t-0), var(--t-25), var(--t-50), var(--t-72), var(--t-88), var(--t-100));
}
html[dir="rtl"] .thermal-scale { transform: scaleX(-1); }

/* Row emphasis grows with staleness, not with a hard red/green flag */
.trail { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.trail-text { font: 400 12.5px/1 var(--mono); color: var(--ink-2); }
.trail.is-cold-trail .trail-text { color: var(--t-72); font-weight: 500; }

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

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
table.data th {
  text-align: start;
  font: 600 11px/1.3 var(--cond);
  letter-spacing: .075em; text-transform: uppercase;
  color: var(--ink-3);
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--rule);
  background: var(--raised);
  white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.data td {
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
}
table.data tbody tr:hover { background: #f7f9fb; }
table.data tbody tr:last-child td { border-bottom: 0; }

td.num, th.num { text-align: end; font-family: var(--mono); font-size: 12.5px; }
td.nowrap { white-space: nowrap; }

.cell-name { font-weight: 600; }
.cell-name a { color: var(--ink); }
.cell-name a:hover { color: var(--accent); }
.cell-meta { display: block; font: 400 11.5px/1.4 var(--mono); color: var(--ink-3); }

.sort { color: inherit; display: inline-flex; align-items: center; gap: .3rem; }
.sort:hover { color: var(--accent); text-decoration: none; }
.sort.is-active { color: var(--ink); }
.sort-arrow { font-size: 9px; }

.empty {
  padding: 2.5rem 1.25rem; text-align: center; color: var(--ink-3); font-size: 13.5px;
}

/* ---------------------------------------------------------------- chips */

.chips { display: flex; flex-wrap: wrap; gap: .3rem; }

.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font: 500 11px/1 var(--cond);
  letter-spacing: .045em; text-transform: uppercase;
  padding: .28rem .45rem;
  border-radius: 2px;
  background: var(--raised);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  white-space: nowrap;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.chip.is-core { border-color: #c9b8e4; background: var(--accent-soft); color: #43266f; }

.pill {
  display: inline-block; font: 500 11px/1 var(--mono);
  padding: .25rem .4rem; border-radius: 2px;
  background: var(--raised); border: 1px solid var(--rule); color: var(--ink-2);
}
.pill-competitor { background: var(--accent-soft); border-color: #cbbce3; color: #43266f; }
.pill-partner    { background: var(--ok-bg);  border-color: #b6ded0; color: var(--ok); }
.pill-customer   { background: #e6eef8; border-color: #bed3ec; color: #1c4f8a; }

/* Threat: a five-step block meter rather than a coloured word */
.threat { display: inline-flex; gap: 2px; align-items: center; }
.threat-step { width: 5px; height: 12px; background: var(--rule); border-radius: 1px; }
.threat-step.is-on { background: var(--ink-2); }
.threat-step.is-on.is-high { background: var(--t-72); }
.threat-none { font: 400 11.5px/1 var(--mono); color: var(--ink-3); }

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

.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field.is-wide { grid-column: 1 / -1; }

.label {
  font: 600 11px/1.3 var(--cond);
  letter-spacing: .075em; text-transform: uppercase; color: var(--ink-2);
}
.label-note { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-3); }

input[type="text"], input[type="password"], input[type="email"], input[type="url"],
input[type="date"], input[type="number"], input[type="search"], select, textarea {
  font: 400 13.5px/1.4 var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: .48rem .6rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 0;
}
textarea { resize: vertical; min-height: 88px; }
select { cursor: pointer; }

.check { display: flex; align-items: center; gap: .45rem; font-size: 13px; }
.check input { width: auto; }

.form-actions {
  display: flex; gap: .5rem; align-items: center;
  padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--rule-soft);
}

.hint { font-size: 12px; color: var(--ink-3); }

/* Keyword picker: a scrollable field of checkboxes */
.tagpick {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .3rem .8rem;
  max-height: 230px; overflow-y: auto;
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .7rem;
  background: var(--raised);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: .35rem;
  font: 600 12px/1 var(--cond);
  letter-spacing: .055em; text-transform: uppercase;
  padding: .55rem .85rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); text-decoration: none; }

.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.btn-primary:hover { background: #3b2263; border-color: #3b2263; color: #fff; }

.btn-danger { color: var(--bad); border-color: #e5c2c2; background: var(--surface); }
.btn-danger:hover { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }

.btn-sm { padding: .35rem .55rem; font-size: 11px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { border-color: var(--rule); }

/* ---------------------------------------------------------------- filters */

.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: .5rem; align-items: end;
}
.filters .field { gap: .25rem; }
.filters-row2 { display: flex; gap: 1rem; align-items: center; margin-top: .7rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- pager */

.pager {
  display: flex; align-items: center; gap: .3rem; flex-wrap: wrap;
  padding: .8rem 1.1rem; border-top: 1px solid var(--rule-soft);
  font-size: 12.5px;
}
.pager-count { color: var(--ink-3); font-family: var(--mono); font-size: 12px; margin-inline-end: auto; }
.pager-page {
  min-width: 26px; text-align: center;
  padding: .28rem .4rem; border: 1px solid var(--rule); border-radius: 2px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
}
.pager-page:hover { border-color: var(--ink-3); text-decoration: none; }
.pager-page.is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager-gap { color: var(--ink-3); padding: 0 .15rem; }

/* ---------------------------------------------------------------- profile */

.profile-head {
  display: flex; gap: 1.25rem; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap;
}
.profile-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .9rem 1.5rem;
}
.fact-label {
  font: 600 10.5px/1.3 var(--cond);
  letter-spacing: .085em; text-transform: uppercase; color: var(--ink-3);
}
.fact-value { font-size: 13.5px; margin-top: .15rem; }
.fact-value.is-mono { font-family: var(--mono); font-size: 12.5px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 92px 1fr; gap: .8rem;
  padding: .7rem 0; border-bottom: 1px solid var(--rule-soft);
}
.timeline li:last-child { border-bottom: 0; }
.timeline-date { font: 400 12px/1.5 var(--mono); color: var(--ink-3); }
.timeline-body { font-size: 13.5px; }
.timeline-meta { font: 400 11.5px/1.4 var(--mono); color: var(--ink-3); margin-top: .15rem; }

.sig { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: .35rem; }
.sig-none  { background: var(--rule); }
.sig-minor { background: var(--t-88); }
.sig-major { background: var(--t-72); }

/* ---------------------------------------------------------------- coverage */

.coverage-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: center;
  padding: .8rem 0; border-bottom: 1px solid var(--rule-soft);
}
.coverage-row:last-child { border-bottom: 0; }
.coverage-name { font: 600 14px/1.3 var(--cond); }
.coverage-sub { font: 400 11.5px/1.4 var(--mono); color: var(--ink-3); }
.coverage-bar { display: flex; height: 26px; border-radius: 2px; overflow: hidden; background: var(--raised); }
.coverage-seg {
  display: flex; align-items: center; justify-content: center;
  font: 500 11px/1 var(--mono); color: #fff; min-width: 2px;
}

/* ---------------------------------------------------------------- login
   The first screen anyone sees. A ranging reticle on the housing side, the form
   on the light side - the same two-tone split as the rest of the application,
   turned on its side. */

.login-page { margin: 0; background: var(--ink); }

.login-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

/* --- identity panel --- */

.login-aside {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
  /* Faint range rings, drawn rather than drawn on. */
  background-image:
    radial-gradient(circle at 42% 42%, rgba(255,255,255,.045) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 42% 42%, transparent 0 27%, rgba(255,255,255,.028) 27% 27.25%, transparent 27.25%),
    radial-gradient(circle at 42% 42%, transparent 0 40%, rgba(255,255,255,.022) 40% 40.2%, transparent 40.2%);
}

.login-aside::after {
  /* The thermal ramp, bled in from the top edge - the system's one signal. */
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(to right,
    var(--t-0), var(--t-25), var(--t-50), var(--t-72), var(--t-88), var(--t-100));
  opacity: .8;
}

.login-reticle {
  position: absolute;
  top: 42%; left: 42%;
  width: 320px; height: 320px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.reticle-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(237, 145, 33, .22);
}
.reticle-ring-1 { width: 96px;  height: 96px;  border-color: rgba(237,145,33,.38); }
.reticle-ring-2 { width: 190px; height: 190px; }
.reticle-ring-3 { width: 300px; height: 300px; border-color: rgba(237,145,33,.12); }

.reticle-cross { position: absolute; background: rgba(237, 145, 33, .30); }
/* Broken at the centre, the way a ranging reticle leaves the target clear. */
.reticle-cross-v {
  left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -.5px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0 38%, transparent 38% 62%, #000 62% 100%);
          mask-image: linear-gradient(to bottom, #000 0 38%, transparent 38% 62%, #000 62% 100%);
}
.reticle-cross-h {
  top: 50%; left: 0; right: 0; height: 1px; margin-top: -.5px;
  -webkit-mask-image: linear-gradient(to right, #000 0 38%, transparent 38% 62%, #000 62% 100%);
          mask-image: linear-gradient(to right, #000 0 38%, transparent 38% 62%, #000 62% 100%);
}

.reticle-pip {
  position: absolute; top: 50%; left: 50%;
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--t-88);
  box-shadow: 0 0 14px rgba(237, 145, 33, .55);
}

.login-aside-copy { position: relative; max-width: 34ch; }

.login-aside-title {
  margin: 0;
  font: 600 20px/1.15 var(--cond);
  letter-spacing: .05em; text-transform: uppercase;
  color: #fff;
}
.login-aside-text { margin: .5rem 0 0; color: #8f9dab; font-size: 13.5px; line-height: 1.55; }

.login-aside-scale { display: flex; align-items: center; gap: .6rem; margin-top: 1.6rem; }
.login-aside-scalelabel {
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .06em; text-transform: uppercase; color: #6d7b89;
}

/* --- form side --- */

.login-main {
  background: var(--canvas);
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
}

.login-card {
  width: 100%; max-width: 366px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2rem 1.8rem 1.7rem;
  box-shadow: var(--shadow);
}

.login-brand { display: flex; align-items: center; gap: .55rem; margin-bottom: 1.5rem; }
.login-brand .rail-mark { border-color: var(--accent); }
.login-brand .rail-mark::before, .login-brand .rail-mark::after { background: var(--accent); }

.login-title {
  font: 600 13px/1 var(--cond);
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}

.login-heading {
  margin: 0 0 1.25rem;
  font: 600 24px/1.1 var(--cond);
  letter-spacing: -.005em;
}

.login-card .field { margin-bottom: 1rem; }
.login-card .btn { width: 100%; justify-content: center; padding: .68rem; margin-top: .3rem; }
.login-card .flash { margin-bottom: 1rem; }

.login-code {
  display: block;
  margin-top: .4rem;
  font: 400 11.5px/1.5 var(--mono);
  color: var(--ink-2);
  background: rgba(255,255,255,.6);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: .3rem .45rem;
  word-break: break-all;
}

/* Password field with an inline reveal control */
.login-pw { position: relative; display: flex; }
.login-pw input { padding-inline-end: 3.6rem; }

.login-reveal {
  position: absolute;
  inset-inline-end: .3rem;
  top: 50%; transform: translateY(-50%);
  border: 0; background: transparent;
  color: var(--ink-3);
  font: 500 11px/1 var(--cond);
  letter-spacing: .06em; text-transform: uppercase;
  padding: .35rem .4rem;
  cursor: pointer;
  border-radius: 2px;
}
.login-reveal:hover { color: var(--accent); background: var(--accent-soft); }

.login-caps { margin: .35rem 0 0; color: var(--warn); }
.login-caps::before { content: "▲ "; font-size: 9px; }

.login-foot { margin-top: 1.2rem; text-align: center; font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 860px) {
  .login-split { grid-template-columns: minmax(0, 1fr); }
  .login-aside {
    min-height: 190px;
    padding: 2rem 1.5rem 1.5rem;
    justify-content: flex-end;
  }
  .login-reticle { width: 210px; height: 210px; top: 34%; left: 76%; }
  .reticle-ring-3 { width: 200px; height: 200px; }
  .login-aside-scale { margin-top: 1rem; }
  .login-main { padding: 1.75rem 1.25rem 3rem; }
  .login-card { border: 0; box-shadow: none; background: transparent; padding: 0; max-width: 400px; }
  .login-card .btn { padding: .75rem; }
}

/* ---------------------------------------------------------------- signals
   A detected change reads like a diff, because that is what it is. Added text
   leans on the warm end of the thermal ramp, removed text stays grey - what
   appeared on a competitor's site matters more than what left it. */

.signal .panel-head { align-items: flex-start; }

.diff {
  border-inline-start: 3px solid var(--rule);
  padding: .55rem .8rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: .6rem;
}
.diff:last-of-type { margin-bottom: 0; }

.diff-added   { border-inline-start-color: var(--t-72); background: #fdf4ee; }
.diff-removed { border-inline-start-color: var(--ink-3); background: var(--raised); color: var(--ink-2); }

.diff-label {
  font: 600 10px/1.3 var(--cond);
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .25rem;
}

.signal-actions {
  display: flex; gap: .4rem; align-items: center; flex-wrap: wrap;
  margin-top: .9rem; padding-top: .8rem;
  border-top: 1px solid var(--rule-soft);
}
.signal-note { flex: 1 1 220px; min-width: 0; }

@media (max-width: 620px) {
  .signal-actions { flex-direction: column; align-items: stretch; }
  .signal-actions .btn { width: 100%; justify-content: center; }
}

/* ---------------------------------------------------------------- misc */

.inline-form { display: flex; gap: .4rem; align-items: end; flex-wrap: wrap; }
.inline-form .field { min-width: 120px; }

.divider { height: 1px; background: var(--rule-soft); margin: 1rem 0; }

.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.small { font-size: 12.5px; }
.stack > * + * { margin-top: .75rem; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .grid-main, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .rail {
    width: 100%; flex: none; height: auto; position: static;
    flex-direction: row; align-items: center; flex-wrap: wrap;
    padding-bottom: .5rem;
  }
  .rail-brand { border-bottom: 0; }
  .rail-nav { display: flex; overflow-x: auto; padding: 0 .5rem; flex: 1 0 100%; }
  .rail-link { border-inline-start: 0; border-bottom: 2px solid transparent; }
  .rail-link.is-active { border-inline-start: 0; border-bottom-color: var(--t-88); }
  .rail-foot { border-top: 0; padding: 0 1rem; margin-inline-start: auto; }
  .rail-user { display: none; }
  .main { padding: 1.1rem 1rem 2.5rem; }
  .grid-2, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .timeline li { grid-template-columns: 1fr; gap: .2rem; }
}

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

@media print {
  .rail, .page-actions, .form-actions, .pager { display: none; }
  body { background: #fff; }
  .panel { box-shadow: none; break-inside: avoid; }
}
