:root {
  --ink: #e8eef2;
  --muted: #909ba2;
  --dim: #5d686d;
  --ground: #071112;
  --panel: #0c1718;
  --panel-2: #101d1f;
  --line: #374347;
  --line-soft: rgba(128, 143, 149, .22);
  --steel: #c8d0d6;
  --steel-dark: #89939a;
  --orange: #ff7214;
  --orange-pale: #ffb072;
  --green: #62f57d;
  --red: #ff675a;
  --amber: #e8bc57;
  --display: "Nanum Gothic Coding", "Bahnschrift Condensed", "Arial Narrow", monospace;
  --body: "Bahnschrift", "Segoe UI", sans-serif;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { background: var(--ground); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--ground);
  background-image: url("/static/plates/dark-steel-sample.png");
  background-size: 1086px 362px;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.45;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-180%);
  background: var(--orange);
  color: #111;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 2px solid var(--orange-pale);
  outline-offset: 2px;
}

.masthead {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 400px 264px;
  align-items: center;
  gap: 22px;
  padding: 8px 14px 8px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 18, .97);
  box-shadow: inset 0 -1px rgba(0, 0, 0, .7);
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  font-family: var(--display);
  font-size: 39px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .035em;
  text-decoration: none;
  color: #dce6f4;
  white-space: nowrap;
}

.brand-lockup > span {
  width: 1px;
  height: 34px;
  flex: none;
  background: var(--steel-dark);
}

.brand-lockup p {
  margin: 0;
  color: #b9c2c8;
  font-family: var(--display);
  font-size: 17px;
  white-space: nowrap;
}

.global-search {
  width: 400px;
  height: 40px;
  transform: translateY(3px);
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  border: 1px solid #59686c;
  border-radius: var(--radius);
  background: #122024;
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, .45);
}

.global-search i {
  width: 14px;
  height: 14px;
  justify-self: center;
  border: 2px solid #d8e0e4;
  border-radius: 50%;
  position: relative;
}

.global-search i::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  background: #d8e0e4;
  transform: rotate(45deg);
}

.global-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  padding: 9px 12px 9px 0;
  font-family: var(--display);
  font-size: 18px;
}

.global-search input::placeholder { color: #818d92; }

.operating-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
  min-width: 0;
  font-family: var(--display);
  color: #cfd7dc;
}

.operating-state time { white-space: nowrap; }

.live-lamp,
.health-lamp,
.web-lamp {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(98, 245, 125, .9), 0 0 20px rgba(98, 245, 125, .25);
}

.demo-chip,
.rail-demo {
  color: #9da8ad;
  font-size: 10px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.demo-chip { display: none; }

.logout-button {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 7px 0 7px 13px;
  cursor: pointer;
}

.logout-button:hover { color: var(--ink); }

main { padding: 8px; }

.counter-bank {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.instrument-counter {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid #354144;
  border-radius: var(--radius);
  background: #0b1415;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .5), 0 1px rgba(255, 255, 255, .03);
  animation: panel-settle 420ms cubic-bezier(.2, .75, .2, 1) both;
}

.instrument-counter:nth-child(2) { animation-delay: 55ms; }
.instrument-counter:nth-child(3) { animation-delay: 110ms; }
.instrument-counter:nth-child(4) { animation-delay: 165ms; }
.instrument-counter:hover { border-color: #66757a; }

.instrument-counter::before,
.instrument-counter::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d8dde0 0 13%, #5c666a 18% 35%, #121719 40% 63%, #899296 68% 74%, #222 78%);
}

.instrument-counter::before { left: 8px; }
.instrument-counter::after { right: 8px; }

.instrument-counter header {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #293336;
  font-family: var(--display);
  letter-spacing: .09em;
  color: #e5eaed;
}

.instrument-counter header i {
  position: absolute;
  right: 26px;
  width: 22px;
  height: 1px;
  background: #526065;
}

.nixie-rig {
  position: relative;
  width: 100%;
  height: 102px;
  min-height: 102px;
  overflow: hidden;
  background: #101516;
}

.nixie-rig img {
  position: absolute;
  inset: 0 auto 0 0;
  width: 82%;
  height: calc(100% - 10px);
  margin-block: 5px;
  object-fit: fill;
}

.nixie-digits {
  position: absolute;
  z-index: 1;
  top: 11%;
  right: 24%;
  bottom: 10%;
  left: 30%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  pointer-events: none;
  animation: nixie-warm 720ms ease-out both;
}

.nixie-digits b {
  text-align: center;
  color: rgba(255, 116, 23, .18);
  font-family: var(--display);
  font-size: clamp(46px, 4vw, 68px);
  line-height: 1;
  font-weight: 300;
  transform: scaleX(.72);
  -webkit-text-stroke: 1.7px #ff7a1a;
  text-shadow: 0 0 2px #fff0c2, 0 0 6px #ff6b0e, 0 0 13px rgba(255, 92, 5, .68);
}

.instrument-counter > p {
  margin: 0;
  padding: 3px 12px 5px;
  border-top: 1px solid rgba(255, 255, 255, .035);
  color: #6d797d;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: .08em;
  text-align: right;
  text-transform: uppercase;
}

.control-rail {
  min-height: 74px;
  margin-top: 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 23, 24, .96);
}

.filters-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(88px, 1fr)) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  min-width: 0;
}

.filters-form label {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.filters-form label > span {
  color: #aeb8bd;
  font-family: var(--display);
  font-size: 11px;
  white-space: nowrap;
}

select,
textarea,
.login-form input {
  border: 1px solid #445155;
  border-radius: 3px;
  color: var(--ink);
  background: #101d1f;
}

select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 26px 0 9px;
  cursor: pointer;
}

select option { background: #101d1f; }

.filter-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.clear-link {
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.clear-link:hover { color: var(--ink); }

.button,
.export-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #5b686c;
  border-radius: 3px;
  background: #111f21;
  color: #dce3e7;
  padding: 8px 12px;
  text-decoration: none;
  font-family: var(--display);
  cursor: pointer;
}

.button:hover,
.export-button:hover { border-color: #a0abb0; background: #172527; }

.button-primary {
  border-color: #d9570b;
  background: var(--orange);
  color: #1c0e08;
  font-weight: 800;
}

.button-primary:hover { background: #ff8a3c; border-color: #ff8a3c; }
.button-wide { width: 100%; }

.rail-summary {
  display: flex;
  align-items: center;
  align-items: stretch;
  gap: 0;
  border-left: 1px solid var(--line);
}

.rail-summary > * { border-left: 1px solid var(--line); }
.rail-summary > *:first-child { border-left: 0; }

.rail-summary p {
  margin: 0;
  min-width: 135px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
}

.rail-summary p span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.rail-summary p strong { color: var(--orange-pale); font-family: var(--display); font-size: 14px; font-weight: 500; white-space: nowrap; }
.rail-summary .rail-demo { min-width: auto; flex-direction: row; align-items: center; gap: 7px; }

.info-dot {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #738084;
  border-radius: 50%;
  color: #c8d1d5;
  background: transparent;
  font-size: 11px;
  cursor: help;
}

.export-button {
  min-width: 142px;
  height: 42px;
  min-height: 42px;
  margin: 8px 7px;
  border-color: #6f7c84;
  background: linear-gradient(#1b282e, #111c22);
  color: #e3e9ec;
  font-size: 18px;
  transform: translateY(3px);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 1px 3px rgba(0, 0, 0, .45);
}
.export-button > span { position: relative; font-size: 26px; line-height: 1; }
.export-button > span::after { content: ""; position: absolute; right: 1px; bottom: -3px; left: 1px; border-bottom: 2px solid currentColor; }

.source-telemetry {
  min-height: 20px;
  display: none;
  grid-template-columns: 160px repeat(4, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 6px;
  border-block: 1px solid #283437;
  background: rgba(7, 17, 18, .86);
}

.source-telemetry > * { border-right: 1px solid #283437; }
.source-telemetry > *:last-child { border-right: 0; }

.telemetry-label {
  margin: 0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #68757a;
  font: 10px var(--display);
  letter-spacing: .06em;
}

.source-telemetry article {
  display: grid;
  grid-template-columns: 10px 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 1px 10px;
  font-family: var(--display);
  font-size: 9px;
}

.source-telemetry article > span:not(.health-lamp) { color: #8c989d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-telemetry time { color: #647074; }
.health-lamp { width: 7px; height: 7px; }
.health-healthy { background: var(--green); }
.health-delayed { background: var(--amber); box-shadow: 0 0 8px rgba(232, 188, 87, .65); }
.health-error { background: var(--red); box-shadow: 0 0 8px rgba(255, 103, 90, .75); }
.health-red { background: var(--red); box-shadow: 0 0 8px rgba(255, 103, 90, .75); }
.health-amber { background: var(--amber); box-shadow: 0 0 8px rgba(232, 188, 87, .65); }

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 56fr) minmax(500px, 44fr);
  gap: 8px;
  margin-top: 11px;
  align-items: start;
}

.opportunity-ledger,
.dossier {
  min-width: 0;
  border: 1px solid #445055;
  border-radius: var(--radius);
  background: rgba(9, 20, 21, .97);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .02);
}

.ledger-head {
  min-height: 62px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 14px;
  border-bottom: 1px solid #3a474a;
}

.ledger-head p,
.country-board header p,
.dossier-kicker p {
  margin: 0;
  color: #7f8a8f;
  font: 10px var(--display);
  letter-spacing: .1em;
}

.ledger-head > p { padding-bottom: 3px; text-align: right; }

.ledger-head h1 {
  margin: 2px 0 0;
  font: 700 21px/1 var(--display);
  letter-spacing: .035em;
  text-transform: uppercase;
}

.ledger-head h1 span {
  display: inline-flex;
  min-width: 24px;
  height: 21px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  border: 1px solid #4a575b;
  color: var(--orange);
  font-size: 12px;
}

.table-wrap { width: 100%; overflow: auto; scrollbar-color: #5a676a #111a1c; }

.opportunity-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: var(--display);
}

.opportunity-table th {
  height: 58px;
  padding: 8px 10px;
  border-right: 1px solid rgba(30, 39, 42, .25);
  color: #111a1c;
  background: #b8c0c7 url("/static/plates/brushed-steel-sample.png") center / cover;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .045em;
  text-align: left;
  text-transform: uppercase;
}

.opportunity-table th:nth-child(1) { width: 6.4%; text-align: center; }
.opportunity-table th:nth-child(2) { width: 26%; }
.opportunity-table th:nth-child(3) { width: 9.5%; }
.opportunity-table th:nth-child(4) { width: 15.1%; }
.opportunity-table th:nth-child(5) { width: 10.1%; }
.opportunity-table th:nth-child(6) { width: 11.9%; }
.opportunity-table th:nth-child(7) { width: 7.5%; text-align: center; }
.opportunity-table th:nth-child(8) { width: 13.5%; }

.opportunity-table td {
  height: 54px;
  padding: 7px 10px;
  border-right: 1px solid #2b373a;
  border-bottom: 1px solid #2b373a;
  color: #dbe2e6;
  vertical-align: middle;
  font-size: 18px;
}

.opportunity-table th:last-child,
.opportunity-table td:last-child { border-right: 0; }

.opportunity-table tbody tr {
  position: relative;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.opportunity-table tbody tr:hover { background: #122124; }

.opportunity-table tbody tr.is-selected {
  background: linear-gradient(90deg, rgba(255, 114, 20, .13), rgba(255, 114, 20, .02) 40%, transparent);
  box-shadow: inset 3px 0 var(--orange);
}

.row-number { color: #b5c0c5 !important; text-align: center; }
.company-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.registry-mini, .age-label { display: block; margin-top: 2px; color: #637075; font-size: 9px; }
.country-cell { display: inline-flex; align-items: center; gap: 7px; }

.flag { display: inline-block; width: 20px; height: 13px; border: 1px solid rgba(255, 255, 255, .28); }
.flag-es { background: linear-gradient(#b91f2d 0 25%, #f8c626 25% 75%, #b91f2d 75%); }
.flag-ie { background: linear-gradient(90deg, #1c9a64 0 33%, #fff 33% 66%, #ec7a2a 66%); }
.flag-gb { background: linear-gradient(35deg, #254887 35%, #fff 35% 43%, #c82a38 43% 55%, #fff 55% 63%, #254887 63%); }
.flag-fr { background: linear-gradient(90deg, #244da2 0 33%, #fff 33% 66%, #e13e49 66%); }

.score { color: var(--orange); font-size: 17px; font-weight: 700; }
.score-good, .score-maybe { color: #cbd3d7; }
.price-cell { white-space: nowrap; }

.web-lamp { width: 9px; height: 9px; }
.web-none, .web-broken, .web-parked, .web-unknown { background: #727f85; box-shadow: none; }
.web-coming_soon { background: var(--amber); box-shadow: 0 0 8px rgba(232, 188, 87, .65); }

.ledger-foot {
  min-height: 86px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 14px 0 26px;
  color: #778388;
  font: 14px var(--display);
}

.dossier { min-height: 665px; position: sticky; top: 8px; overflow: hidden; }
.dossier-inner { min-height: 663px; position: relative; padding-bottom: 35px; }

.dossier-kicker {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  color: #727e83;
  background: #aeb7bf url("/static/plates/brushed-steel-sample.png") center / cover;
  border-bottom: 1px solid #414d51;
}

.dossier-kicker > div { display: flex; align-items: center; gap: 10px; }
.dossier-kicker p, .dossier-kicker span { color: #162023; font-family: var(--display); font-size: 10px; }
.dossier-kicker p { font-weight: 700; font-size: 12px; }

.dossier-close {
  width: 28px;
  height: 28px;
  border: 1px solid #637075;
  background: rgba(12, 23, 24, .12);
  color: #152024;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dossier-identity {
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
  border-bottom: 1px solid #3a474a;
}

.dossier-identity h2 {
  margin: 0;
  max-width: 100%;
  color: #dce4ed;
  font: 700 clamp(20px, 2.2vw, 31px)/.98 var(--display);
  letter-spacing: .02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.dossier-identity p { margin: 9px 0 0; color: #aab5ba; font-family: var(--display); }

.score-module {
  min-height: 88px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  padding: 8px 12px;
  border: 1px solid #465458;
  border-radius: 3px;
  background: #0e1a1c;
}

.score-module > span { color: #aeb8bd; font: 10px var(--display); letter-spacing: .08em; }
.score-module strong { color: var(--orange); font: 400 29px/1.05 var(--display); text-shadow: 0 0 9px rgba(255, 114, 20, .25); }
.score-module small { color: #7e8a8f; font: 9px var(--display); }

.dossier-tabs { position: absolute; z-index: 3; right: 0; bottom: 0; left: 0; display: flex; min-height: 35px; border-top: 1px solid #344145; background: #0a1517; }
.dossier-tabs button { flex: 1; border: 0; border-right: 1px solid #344145; background: #0a1517; color: #738085; font: 10px var(--display); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.dossier-tabs button:last-child { border-right: 0; }
.dossier-tabs button.is-active { color: var(--ink); background: #122022; box-shadow: inset 0 -2px var(--orange); }

.dossier-panel { display: none; }
.dossier-panel.is-active { display: block; animation: dossier-reveal 180ms ease-out both; }

.fact-grid {
  display: grid;
  grid-template-columns: 1.15fr .98fr .92fr 1.08fr .87fr;
  border-bottom: 1px solid #354246;
}

.fact-grid > div { min-width: 0; min-height: 99px; padding: 9px 10px; border-right: 1px solid #354246; }
.fact-grid > div:last-child { border-right: 0; }
.fact-grid span, .dossier-section > p, .source-proof > p { display: block; color: #7a878c; font: 9px var(--display); letter-spacing: .02em; }
.fact-grid strong { display: block; margin-top: 15px; color: #e4eaed; font: 300 14px/1.15 var(--display); overflow-wrap: anywhere; }
.fact-grid > div:nth-child(2) > strong { white-space: nowrap; overflow-wrap: normal; }
.fact-grid > div:nth-child(2) > strong::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(98, 245, 125, .72); }
.fact-grid strong i { font-style: normal; }
.fact-grid small { display: block; margin-top: 5px; color: #657176; font-size: 8px; }

.dossier-section,
.source-proof { padding: 10px 22px; border-bottom: 1px solid #354246; }
.fact-grid + .dossier-section { min-height: 96px; padding-top: 16px; }
.dossier-section + .dossier-section { min-height: 142px; }
.dossier-section > p, .source-proof > p { margin: 0 0 8px; }
.company-meta { display: flex; align-items: baseline; gap: 9px; color: #8d999e; font: 12px var(--display); }
.company-meta strong { color: #d6dee2; }
.company-meta small { color: #677378; }
.dossier-section > .company-description { max-width: 520px; margin: 7px 0 0; color: #c5ced2; font: 400 18px/1.4 var(--display); }

.reason-list { list-style: none; margin: 0; padding: 0; }
.reason-list li { position: relative; padding-left: 20px; margin: 5px 0; color: #ccd5d9; font-size: 14px; font-weight: 300; }
.reason-list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(98, 245, 125, .72); }

.source-proof { min-height: 185px; }
.source-proof .source-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.source-proof .source-heading p { margin: 0; color: #7a878c; font: 9px var(--display); letter-spacing: .02em; }
.source-proof a { color: #a9c4cc; font-family: var(--display); font-size: 10px; text-decoration: none; }
.source-proof a:hover { color: var(--orange-pale); }
.source-proof .source-matrix { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; margin-top: 7px; padding-top: 2px; border-top: 1px solid #273336; color: #7f8c91; font: 11px var(--display); }
.source-matrix span { display: grid; grid-template-columns: 7px 22px minmax(0, 1fr); align-items: start; gap: 7px; min-width: 0; }
.source-matrix .health-lamp { width: 6px; height: 6px; }
.source-matrix em { min-width: 0; font-style: normal; }
.source-matrix strong { display: block; color: #c1cbd0; font-weight: 400; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.source-matrix small { display: block; margin-top: 3px; color: #68757a; font-size: 10px; }

.dossier-placeholder { min-height: 660px; display: grid; place-content: center; text-align: center; color: #657176; }
.dossier-placeholder span { color: var(--orange); font-family: var(--display); letter-spacing: .16em; }

.presence-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #354246; }
.presence-item { min-height: 78px; display: grid; align-content: center; gap: 5px; padding: 12px 14px; background: #0c1718; }
.presence-item span { color: #778489; font: 9px var(--display); text-transform: uppercase; }
.presence-item strong { color: var(--ink); font-weight: 500; }
.presence-no strong { color: #8b969b; }

.privacy-note { margin: 16px; padding: 12px; border-left: 2px solid var(--orange); color: #909ca1; background: #101d1f; }
.workflow-block, .notes-block { padding: 16px; border-bottom: 1px solid #354246; }
.workflow-block label, .notes-block label { display: grid; gap: 7px; color: #8e9a9f; font: 10px var(--display); text-transform: uppercase; }
.save-status { min-height: 20px; color: var(--green); font-size: 11px; }
.notes-list { display: grid; gap: 8px; margin-bottom: 12px; }
.note-entry { padding: 9px; border-left: 2px solid #536064; background: #101d1f; }
.note-entry p { margin: 0 0 5px; }
.note-entry time { color: #6c787d; font-size: 9px; }
textarea { width: 100%; resize: vertical; padding: 10px; text-transform: none; }
.muted { color: var(--muted); }

@keyframes panel-settle {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nixie-warm {
  0% { opacity: .25; filter: brightness(.55); }
  45% { opacity: 1; filter: brightness(1.3); }
  64% { opacity: .78; filter: brightness(.9); }
  100% { opacity: 1; filter: brightness(1); }
}

@keyframes dossier-reveal {
  from { opacity: .45; transform: translateX(4px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.country-board { margin-top: 44px; padding: 24px 0 12px; border-top: 1px solid #354246; }
.country-board header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.country-board h2 { margin: 0; font: 700 26px var(--display); text-transform: uppercase; }
.country-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.country-grid article { border: 1px solid #3d494d; background: rgba(12, 23, 24, .9); }
.country-heading { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px; border-bottom: 1px solid #3d494d; }
.country-heading b { color: var(--orange); font: 12px var(--display); }
.country-grid dl { margin: 0; }
.country-grid dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 11px; border-bottom: 1px solid #263235; }
.country-grid dl div:last-child { border-bottom: 0; }
.country-grid dt { color: #78858a; }
.country-grid dd { margin: 0; font-family: var(--display); }

.empty-state { min-height: 420px; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.empty-state > span { color: var(--orange); font: 45px var(--display); }
.empty-state h2 { margin: 8px 0; font-family: var(--display); text-transform: uppercase; }
.empty-state p { color: var(--muted); }

.site-footer { min-height: 54px; display: flex; align-items: center; gap: 28px; margin: 38px 8px 0; padding: 0 14px; border-top: 1px solid #3b474a; color: #6c797e; font: 10px var(--display); letter-spacing: .06em; }
.site-footer strong { color: #b7c1c6; }
.site-footer span:last-child { margin-left: auto; }

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-shell { width: min(920px, 100%); display: grid; grid-template-columns: 1.1fr .9fr; padding: 0; border: 1px solid #4a565a; border-radius: var(--radius); overflow: hidden; background: rgba(8, 18, 19, .98); box-shadow: 0 30px 90px rgba(0, 0, 0, .45); }
.login-ledger { min-height: 540px; position: relative; display: flex; flex-direction: column; justify-content: end; padding: 42px; background: #0b1517 url("/static/plates/nixie-today.png") center 68px / 90% auto no-repeat; border-right: 1px solid #465256; }
.login-ledger::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 26%, #0b1517 70%); pointer-events: none; }
.login-ledger > * { position: relative; z-index: 1; }
.ledger-index { position: absolute; z-index: 2; top: 18px; left: 22px; color: var(--orange); font: 12px var(--display); letter-spacing: .14em; }
.eyebrow, .section-number { color: #79858a; font: 10px var(--display); letter-spacing: .11em; text-transform: uppercase; }
.login-ledger h1 { margin: 6px 0 14px; color: #dce5ed; font: 700 clamp(42px, 6vw, 72px)/.88 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.login-intro { max-width: 370px; margin: 0; color: #a8b3b8; font-size: 17px; }
.confidential-stamp { position: absolute; z-index: 2; right: 28px; bottom: 28px; padding: 8px 10px; border: 1px solid #b5511e; color: var(--orange-pale); font: 9px var(--display); text-align: center; text-transform: uppercase; transform: rotate(-3deg); }
.login-panel { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 42px; background: #0d191b; }
.login-panel h2 { margin: 6px 0; font: 700 26px var(--display); text-transform: uppercase; }
.login-panel .muted { margin: 0; }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 7px; color: #9ba7ac; font: 10px var(--display); letter-spacing: .08em; text-transform: uppercase; }
.login-form input { height: 44px; padding: 0 12px; text-transform: none; }
.form-error { padding: 10px 12px; border-left: 2px solid var(--red); background: rgba(255, 103, 90, .08); color: #ffb5ae; }
.login-footnote { margin: 0; color: #637075; font: 9px var(--display); letter-spacing: .06em; text-align: center; text-transform: uppercase; }

@media (max-width: 1500px) and (min-width: 721px) {
  .masthead { min-height: 59px; padding-block: 5px; }
  .brand { font-size: 36px; }
  .brand-lockup p { font-size: 16px; }
  .instrument-counter header { height: 28px; }
  .nixie-rig { height: 94px; min-height: 94px; }
  .nixie-rig img { height: calc(100% - 8px); margin-block: 4px; }
  .instrument-counter > p { padding-block: 2px 4px; font-size: 9px; }
  .control-rail { min-height: 68px; margin-top: 10px; }
  .filters-form { padding-block: 6px; }
  .filters-form label { grid-template-columns: 1fr; gap: 2px; }
  .filters-form label > span { font-size: 9px; }
  .filters-form select { height: 34px; }
  .export-button { height: 39px; min-height: 39px; font-size: 17px; }
  .workbench { margin-top: 10px; }
  .opportunity-table th { height: 52px; font-size: 14px; }
  .opportunity-table td { height: 53px; }
  .opportunity-table .registry-mini,
  .opportunity-table .age-label { display: none !important; }
  .ledger-foot { min-height: 78px; }
  .dossier { min-height: 636px; }
  .dossier-inner { min-height: 634px; }
  .dossier-kicker { min-height: 45px; }
  .dossier-identity { min-height: 101px; }
  .fact-grid > div { min-height: 89px; }
  .fact-grid + .dossier-section { min-height: 86px; }
  .dossier-section + .dossier-section { min-height: 124px; }
  .source-proof { min-height: 154px; }
  .company-meta { display: none; }
  .dossier-section > .company-description { width: 112%; max-width: none; font-weight: 300; transform: scaleX(.89); transform-origin: left top; }
  .reason-list li { font-size: 13px; }
  .source-matrix em { padding-left: 22px; border-left: 1px solid #435055; }
  .source-matrix strong { font-size: 12px; }
  .source-matrix small { font-size: 11px; }
}

@media (max-width: 1320px) {
  .masthead { grid-template-columns: minmax(350px, 1fr) minmax(270px, 390px) auto; }
  .demo-chip { display: none; }
  .control-rail { grid-template-columns: 1fr; }
  .rail-summary { border-top: 1px solid var(--line); border-left: 0; justify-content: flex-end; }
  .filters-form { grid-template-columns: repeat(6, minmax(80px, 1fr)) auto; }
}

@media (max-width: 1100px) {
  .masthead { grid-template-columns: 1fr auto; }
  .global-search { grid-column: 1 / -1; grid-row: 2; }
  .counter-bank { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-form { grid-template-columns: repeat(3, 1fr); }
  .filter-buttons { justify-content: flex-end; }
  .workbench { grid-template-columns: 1fr; }
  .dossier { position: relative; top: auto; min-height: 0; }
  .dossier-inner { min-height: 0; }
  .country-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 13px; }
  .masthead { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .brand-lockup { justify-content: space-between; }
  .brand { font-size: 25px; }
  .brand-lockup p { font-size: 11px; white-space: normal; text-align: right; }
  .global-search { width: 100%; grid-column: 1; grid-row: auto; transform: none; }
  .operating-state { justify-content: space-between; flex-wrap: wrap; }
  .counter-bank { grid-template-columns: 1fr 1fr; }
  .instrument-counter header { height: 27px; font-size: 10px; }
  .nixie-rig { min-height: 78px; }
  .nixie-rig img { width: 100%; }
  .nixie-digits b { font-size: clamp(31px, 9vw, 48px); }
  .instrument-counter > p { display: none; }
  .filters-form { grid-template-columns: repeat(2, 1fr); padding: 10px; }
  .filters-form label { grid-template-columns: 1fr; gap: 3px; }
  .filter-buttons { justify-content: stretch; }
  .filter-buttons > * { flex: 1; }
  .rail-summary { display: grid; grid-template-columns: 1fr 1fr; }
  .rail-summary p { min-width: 0; }
  .rail-summary p:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .rail-summary .rail-demo { display: none; }
  .export-button { margin: 7px; }
  .source-telemetry { grid-template-columns: 1fr 1fr; }
  .telemetry-label { grid-column: 1 / -1; min-height: 28px; }
  .source-telemetry > * { border-bottom: 1px solid #283437; }
  .workbench { margin-top: 6px; }
  .ledger-head { align-items: start; }
  .ledger-head > p { display: none; }
  .dossier-identity { grid-template-columns: 1fr 105px; }
  .dossier-identity h2 { font-size: 21px; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .fact-grid > div { border-bottom: 1px solid #354246; }
  .fact-grid > div:last-child { grid-column: 1 / -1; }
  .country-grid { grid-template-columns: 1fr; }
  .country-board header { align-items: start; flex-direction: column; }
  .site-footer { flex-wrap: wrap; gap: 9px 18px; padding: 14px 0; }
  .site-footer span:last-child { margin-left: 0; }
  .login-shell { grid-template-columns: 1fr; }
  .login-ledger { min-height: 330px; padding: 28px; border-right: 0; border-bottom: 1px solid #465256; }
  .login-panel { padding: 28px; }
}

@media (max-width: 430px) {
  main { padding: 5px; }
  .brand-lockup > span { display: none; }
  .counter-bank { gap: 5px; }
  .nixie-rig { min-height: 65px; }
  .filters-form { grid-template-columns: 1fr 1fr; }
  .rail-summary p:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .dossier-kicker > div:last-child > span { display: none; }
  .dossier-identity { grid-template-columns: 1fr; }
  .score-module { grid-template-columns: auto 1fr auto; gap: 8px; min-height: 54px; align-items: center; }
  .score-module strong { font-size: 24px; }
  .dossier-tabs button { font-size: 9px; }
  .presence-grid { grid-template-columns: 1fr; }
}

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