:root {
  --page-bg: #bdbdbd;
  --panel-bg: #d8d8d8;
  --panel-light: #ffffff;
  --panel-shadow: #7a7a7a;
  --ink: #101010;
  --muted: #555555;
  --line: #444444;
  --title-red: #263955;
  --title-blue: #742f3c;
  --title-green: #405744;
  --marker-blue: #355377;
  --warning: #c6a64f;
  --danger: #b00020;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-width: 300px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    var(--page-bg);
  background-size: 16px 16px;
  color: var(--ink);
  font-family: Arial, Verdana, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

body.app-loading {
  overflow: hidden;
}

.initial-loading-screen {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    var(--page-bg);
  background-size: 16px 16px;
  opacity: 1;
  transition: opacity 180ms ease-out, visibility 180ms ease-out;
}

.initial-loading-screen.is-complete {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.initial-loading-screen[hidden] {
  display: none;
}

.initial-loading-window {
  width: min(390px, 100%);
  padding: 24px;
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid #222222;
  border-bottom: 2px solid #222222;
  background: var(--panel-bg);
  box-shadow: 4px 4px 0 var(--panel-shadow);
  text-align: center;
}

.initial-loading-window strong {
  display: block;
  color: var(--title-red);
  font: bold clamp(19px, 6vw, 27px)/1.1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.04em;
}

.initial-loading-window p {
  margin: 10px 0 15px;
  color: var(--title-green);
  font: bold 13px/1.2 "Courier New", monospace;
}

.initial-loading-mark {
  position: relative;
  width: 78px;
  height: 36px;
  margin: 0 auto 13px;
}

.initial-loading-mark::before,
.initial-loading-mark::after {
  content: "";
  position: absolute;
  top: 17px;
  width: 30px;
  height: 2px;
  background: var(--line);
}

.initial-loading-mark::before {
  left: 9px;
  transform: rotate(-25deg);
}

.initial-loading-mark::after {
  right: 9px;
  transform: rotate(25deg);
}

.initial-loading-mark span {
  position: absolute;
  z-index: 1;
  width: 14px;
  height: 14px;
  border: 2px solid #222222;
  background: var(--marker-blue);
  box-shadow: 1px 1px 0 var(--panel-shadow);
}

.initial-loading-mark span:nth-child(1) { bottom: 0; left: 0; }
.initial-loading-mark span:nth-child(2) { top: 0; left: 32px; background: var(--title-blue); }
.initial-loading-mark span:nth-child(3) { right: 0; bottom: 0; background: var(--title-green); }

.initial-loading-track {
  height: 18px;
  padding: 2px;
  overflow: hidden;
  border-top: 2px solid #6f6f6f;
  border-left: 2px solid #6f6f6f;
  border-right: 2px solid var(--panel-light);
  border-bottom: 2px solid var(--panel-light);
  background: #efefef;
}

.initial-loading-track span {
  display: block;
  width: 38%;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--title-red) 0 12px, transparent 12px 15px);
  animation: initial-loading-progress 1.15s steps(12, end) infinite;
}

@keyframes initial-loading-progress {
  from { transform: translateX(-105%); }
  to { transform: translateX(275%); }
}

a {
  color: #111111;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--title-blue);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.4;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 10px;
  align-items: center;
  width: min(1180px, calc(100% - 16px));
  margin: 0 auto;
  padding: 14px 10px 10px;
}

.title-wrap {
  min-width: 0;
}

.site-icon {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
  image-rendering: pixelated;
}

.site-header h1 {
  margin: 0;
  overflow: hidden;
  color: var(--title-red);
  font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
  font-size: clamp(27px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.02;
  text-overflow: clip;
  text-shadow: none;
}

.subtitle,
.site-header p {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--title-green);
  font-size: clamp(14px, 2vw, 21px);
  font-weight: bold;
  line-height: 1.15;
  text-overflow: clip;
}

.page-shell {
  width: min(1180px, calc(100% - 16px));
  margin: 0 auto;
  padding: 0 0 20px;
}

.page-panel {
  min-height: 360px;
  background: var(--panel-bg);
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid #222222;
  border-bottom: 2px solid #222222;
  box-shadow: 1px 1px 0 var(--panel-shadow);
}

.newsletter,
.product-ticker,
.company-search,
.online-strip,
.instruction-box,
.legal-copy {
  margin: 10px;
  padding: 9px;
  border: 1px dashed var(--line);
  background: #e7e7e7;
}

.product-ticker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 4px 6px;
  overflow: hidden;
}

.product-ticker-label { margin: 0; color: var(--title-red); font: bold 11px "Courier New", monospace; letter-spacing: 0.08em; }
.product-ticker-viewport { min-width: 0; overflow: hidden; white-space: nowrap; }
.product-ticker-track { display: flex; width: max-content; align-items: center; }
.product-ticker-track.is-moving { animation: product-ticker-scroll 152s linear infinite; }
.product-ticker-viewport.is-paused .product-ticker-track { animation-play-state: paused; }
.product-ticker-item { display: inline-flex; gap: 8px; align-items: center; min-height: 30px; padding: 5px 18px; border: 0; border-right: 1px solid #777777; background: transparent; color: inherit; appearance: none; cursor: pointer; touch-action: manipulation; font: 11px/1.25 "Courier New", monospace; text-align: left; }
.product-ticker-item:hover,
.product-ticker-item:focus-visible { background: #d7d7d7; outline: 1px dashed #303030; outline-offset: -2px; }
.product-ticker-item b { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.product-ticker-unit { color: var(--muted); font: inherit; }
.product-ticker-item em { color: var(--muted); font-style: normal; font-weight: bold; }
.product-ticker-item em.is-up { color: #26743a; }
.product-ticker-item em.is-down { color: #a12639; }
.product-ticker-item em.is-flat { color: #285f9e; }
.product-ticker-movement { display: inline-block; min-width: 1em; font-size: 12px; line-height: 1; text-align: center; vertical-align: middle; }
.product-ticker-item time { color: var(--muted); }
.product-ticker-empty { color: var(--muted); font-size: 11px; }
.product-explore-button { min-height: 25px; padding: 2px 7px; font-size: 11px; white-space: nowrap; }

@keyframes product-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.newsletter {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  grid-template-rows: 20px minmax(62px, auto);
  column-gap: 8px;
  row-gap: 1px;
  align-items: start;
  min-height: 104px;
}

.newsletter-heading {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: baseline;
  align-self: start;
  gap: 10px;
  min-width: 0;
  height: 20px;
  transform: translateY(-3px);
}

.newsletter-heading .eyebrow {
  margin: 0 !important;
}

.newsletter-category {
  display: inline-block;
  padding: 1px 4px;
  border: 1px solid var(--line);
  background: #f3f0df;
  color: var(--ink);
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: bold;
  line-height: 1.2;
}

.newsletter-category:empty {
  display: none;
}

#news-previous {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}

.newsletter-copy {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  align-self: start;
  padding-top: 3px;
  text-align: left;
}

#news-next {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
}

.newsletter-copy a {
  display: inline;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.newsletter-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.newsletter-source {
  display: inline;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
}

.newsletter-date {
  display: inline-block;
  margin: 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.newsletter-date:not(:empty)::before {
  content: "— ";
}

.aggregate-dashboard {
  margin: 10px;
  padding: 9px;
  border: 1px dashed var(--line);
  background: #cfcfcf;
}

.aggregate-dashboard-heading {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 7px;
  margin-bottom: 8px;
}

.aggregate-dashboard-title {
  margin: 0 !important;
}

.aggregate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  justify-content: start;
}

.aggregate-card {
  min-width: 0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #333333;
  border-bottom: 2px solid #333333;
  background: #e7e7e7;
}

.aggregate-card.is-expanded {
  grid-column: 1 / -1;
}

.aggregate-card:not(.is-expanded) {
  width: 100%;
  min-height: 82px;
  justify-self: center;
}

.aggregate-card:not(.is-expanded) .aggregate-card-title {
  padding-right: 1px;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.05;
}

.aggregate-card:not(.is-expanded) .aggregate-card-toggle {
  min-height: 78px;
  padding: 6px 5px 4px;
}

.aggregate-card:not(.is-expanded) .aggregate-card-summary {
  min-height: 0;
  padding: 0 5px 4px;
}

.aggregate-card:not(.is-expanded) .aggregate-summary-primary {
  font-size: 20px;
}

.aggregate-card-toggle {
  display: flex;
  width: 100%;
  min-height: 80px;
  padding: 7px 8px;
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.aggregate-card-toggle:hover {
  background: #dddddd;
}

.aggregate-card-toggle:active {
  box-shadow: inset 2px 2px 0 #777777;
}

.aggregate-card-title {
  min-width: 0;
  font-weight: bold;
}

.aggregate-card-summary {
  display: block;
  width: 100%;
  min-height: 80px;
  padding: 0 8px 9px;
}

.aggregate-summary-primary {
  display: block;
  overflow-wrap: anywhere;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: clamp(21px, 2.5vw, 30px);
  font-weight: bold;
  line-height: 1.05;
}

.aggregate-summary-secondary,
.aggregate-summary-caption,
.aggregate-summary-period {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
  line-height: 1.3;
}

.aggregate-summary-mobile {
  display: none;
}

.aggregate-card-detail {
  padding: 10px;
  border-top: 1px dashed var(--line);
  background: #ededed;
}

.aggregate-card-detail[hidden] {
  display: none;
}

.retro-dialog.aggregate-dialog {
  width: min(calc(100% - 20px), 920px);
  max-width: 920px;
  overflow-x: hidden;
}

.retro-dialog.instruments-dialog {
  width: min(calc(100% - 20px), 760px);
  max-width: 760px;
}

.retro-dialog.products-dialog {
  width: min(calc(100% - 20px), 960px);
  max-width: 960px;
  max-height: min(90vh, 820px);
}

.product-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
  padding: 9px;
  border: 1px dashed var(--line);
  background: #eeeeee;
}
.product-selector-grid label { display: grid; gap: 5px; min-width: 0; font-weight: bold; }
.product-selector-grid label span { font-size: 12px; }
.product-selector-grid label small { color: var(--muted); font-weight: normal; }
.product-selector-grid select:disabled { color: var(--muted); background: #dddddd; }
.product-info-actions { display: flex; justify-content: flex-start; margin: -6px 0 8px; }
.product-classification-info { max-width: 760px; margin: 0 0 10px; padding: 8px; border: 1px solid #888888; background: #eeeeee; }
.product-classification-info dl { display: grid; gap: 7px; margin: 0; }
.product-classification-info dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; align-items: start; }
.product-classification-info dt { color: var(--muted); font-size: 11px; font-weight: bold; text-transform: uppercase; }
.product-classification-info dd,
.product-classification-info dd > span { display: grid; gap: 2px; min-width: 0; margin: 0; }
.product-classification-info small { color: var(--muted); font-weight: normal; }
.product-info-values { gap: 7px !important; }
.product-analysis-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.product-analysis-summary > div { display: grid; gap: 3px; padding: 8px; border: 1px dashed var(--line); background: #eeeeee; }
.product-analysis-summary small { color: var(--muted); }
.product-analysis-summary strong { overflow-wrap: anywhere; }
.product-normalization-unit { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.product-price-history,
.product-company-market { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #777777; }
.product-price-history h3,
.product-company-market h3 { margin: 0 0 7px; font-size: 14px; }
.product-price-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-price-heading h3 { margin-bottom: 2px; }
.product-price-heading p { margin: 0 0 8px; color: var(--muted); font-size: 11px; }
.product-price-actions { display: grid; justify-items: end; gap: 6px; flex: 0 0 auto; }
.product-price-actions > span { padding: 2px 5px; border: 1px solid #777777; background: #dddddd; font: bold 10px "Courier New", monospace; white-space: nowrap; }
.product-price-actions [data-product-by-company][aria-pressed="true"] { border-top-color: #333333; border-left-color: #333333; border-right-color: #ffffff; border-bottom-color: #ffffff; background: #b8c6d8; }
.product-chart-legend { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 0 0 6px; font: 10px "Courier New", monospace; }
.product-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.product-chart-legend i { display: inline-block; width: 16px; height: 3px; }
.product-chart-scroll { overflow-x: auto; border: 1px solid #777777; background: #f5f5f1; }
.product-chart-scroll svg { display: block; width: 100%; min-width: var(--product-chart-min-width, 760px); height: var(--product-chart-height, 310px); }
.product-chart-grid-line { stroke: #c2c2be; stroke-width: 1; stroke-dasharray: 3 4; }
.product-chart-axis,
.product-chart-x-tick { stroke: #333333; stroke-width: 1.3; }
.product-chart-y-label,
.product-chart-x-label,
.product-chart-axis-title { fill: #303030; font-family: "Courier New", monospace; font-size: 11px; }
.product-chart-axis-title { font-weight: bold; letter-spacing: 0.02em; }
.product-chart-line-shadow { fill: none; stroke: #ffffff; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.product-chart-line { fill: none; stroke: #263955; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.product-chart-point { cursor: pointer; outline: none; }
.product-chart-hit { fill: transparent; stroke: none; }
.product-chart-dot { fill: #f3f0d4; stroke: #263955; stroke-width: 3; transition: r 120ms ease, fill 120ms ease; }
.product-chart-point:hover .product-chart-dot,
.product-chart-point:focus .product-chart-dot,
.product-chart-point.is-selected .product-chart-dot { fill: #c6a64f; stroke: #101010; r: 7px; }
.product-chart-tooltip { visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 100ms ease; }
.product-chart-tooltip.is-visible { visibility: visible; opacity: 1; }
.product-chart-tooltip rect { fill: #f3f0d4; stroke: #101010; stroke-width: 1.5; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.28)); }
.product-chart-tooltip text { fill: #101010; font: bold 9px "Courier New", monospace; }
.product-chart-tooltip .product-chart-tooltip-kicker { fill: #6f1f2a; font-size: 8px; letter-spacing: 0.04em; }
.product-chart-tooltip .product-chart-tooltip-identity { font-size: 9px; }
.product-company-disclosures { display: grid; gap: 7px; }
.product-company-disclosure { border: 1px solid #777777; background: #eeeeee; }
.product-company-disclosure summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 8px; cursor: pointer; list-style: none; font-weight: bold; }
.product-company-disclosure summary::-webkit-details-marker { display: none; }
.product-company-disclosure summary::before { content: "\25B6"; font-size: 10px; }
.product-company-disclosure[open] summary::before { content: "\25BC"; }
.product-company-disclosure summary small { color: var(--muted); font-weight: normal; text-align: right; }
.product-company-disclosure[open] summary { border-bottom: 1px dashed #888888; background: #dddddd; }
.product-company-detail { display: grid; gap: 12px; padding: 9px; }
.product-company-detail h4 { margin: 0 0 3px; font-size: 12px; }
.product-window-caption { margin: 0 0 7px; color: var(--muted); font: 10px "Courier New", monospace; }
.product-transactions-scroll { overflow-x: auto; border: 1px solid #888888; }
.product-transactions-table { width: 100%; min-width: 760px; border-collapse: collapse; background: #f5f5f1; font-size: 11px; }
.product-transactions-table th,
.product-transactions-table td { padding: 6px; border-right: 1px solid #aaaaaa; border-bottom: 1px solid #aaaaaa; text-align: left; vertical-align: top; }
.product-transactions-table th:last-child,
.product-transactions-table td:last-child { border-right: 0; }
.product-transactions-table tbody tr:last-child td { border-bottom: 0; }
.product-transactions-table th { background: #cccccc; font-size: 10px; text-transform: uppercase; white-space: nowrap; }
.product-company-share { padding-top: 9px; border-top: 1px dashed #888888; }
.product-company-share > strong { display: block; margin: 3px 0; font: bold 22px "Courier New", monospace; }
.product-company-share p { margin: 0 0 7px; color: var(--muted); font-size: 11px; }
.product-share-track { height: 12px; border: 1px solid #555555; background: #dddddd; }
.product-share-track span { display: block; height: 100%; background: #263955; }
.company-products-heading { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.company-products-heading p { margin: 8px 0; color: var(--muted); font: 11px "Courier New", monospace; }
.company-product-list { display: grid; gap: 12px; }
.company-product-card { display: grid; gap: 10px; padding: 10px; border: 1px solid #777777; background: #eeeeee; }
.company-product-title { display: flex; align-items: baseline; gap: 8px; padding-bottom: 7px; border-bottom: 1px dashed #888888; }
.company-product-title p,
.company-product-title h3 { margin: 0; }
.company-product-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.company-product-summary div { display: grid; align-content: start; gap: 2px; }
.company-product-card dt { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.company-product-card dd { margin: 0; overflow-wrap: anywhere; font-weight: bold; }
.company-product-destinations { min-width: 0; padding-top: 9px; border-top: 1px dashed #888888; }
.company-product-destinations h4 { margin: 0 0 7px; font-size: 12px; }
.company-product-destinations-scroll { overflow-x: auto; border: 1px solid #888888; }
.company-product-destinations table { width: 100%; min-width: 1040px; border-collapse: collapse; background: #ffffff; font-size: 11px; }
.company-product-destinations th,
.company-product-destinations td { padding: 7px; border-right: 1px solid #aaaaaa; border-bottom: 1px solid #aaaaaa; text-align: left; vertical-align: middle; }
.company-product-destinations th:last-child,
.company-product-destinations td:last-child { border-right: 0; }
.company-product-destinations tbody tr:last-child td { border-bottom: 0; }
.company-product-destinations th { background: #cccccc; text-transform: uppercase; white-space: nowrap; }
.company-product-destinations td:not(:first-child) { white-space: nowrap; }
.company-product-relationship-link { padding: 0; border: 0; background: transparent; color: #172e52; font: inherit; font-weight: bold; text-align: left; text-decoration: underline; cursor: pointer; }
.product-create-fields { margin: 0; padding: 9px; border: 1px solid #999999; background: #eeeeee; }
.product-observation-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 9px; border: 1px solid #999999; background: #eeeeee; }
.product-create-fields legend,
.product-observation-fields legend { padding: 0 5px; font-weight: bold; }
.product-create-fields .source-help { margin-top: 0; }
.product-create-flow { display: grid; gap: 8px; }
.product-create-flow > label { padding-top: 8px; border-top: 1px dashed #999999; }
.product-create-level { display: grid; gap: 8px; margin-left: 18px; padding: 9px; border-left: 3px solid #777777; background: #dddddd; }
.normalization-unit-fields { display: grid; gap: 8px; }
.tracking-revenue-value { display: flex; justify-content: space-between; margin: 5px 0; }

.aggregate-dialog-heading {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line);
  background: var(--panel-bg);
}

.aggregate-dialog-heading h2 {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 22px;
}

.dialog-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  place-items: center;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #222222;
  border-bottom: 2px solid #222222;
  background: #d0d0d0;
  color: #000000;
  font-family: "Courier New", monospace;
  font-size: 15px;
  font-weight: bold;
  line-height: 1;
}

.dialog-close:hover {
  background: #dedede;
}

.dialog-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.form-dialog-close {
  position: sticky;
  top: 0;
  z-index: 6;
  margin-left: auto;
}

.form-dialog #form-content > h2 {
  padding-right: 42px;
}

.suggest-edit-button {
  white-space: nowrap;
}

.aggregate-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.aggregate-metric-block {
  min-width: 0;
}

.aggregate-metric-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.quarter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.quarter-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: var(--quarter-color);
  vertical-align: -1px;
}

.quarter-q1 { --quarter-color: #263955; }
.quarter-q2 { --quarter-color: #742f3c; }
.quarter-q3 { --quarter-color: #55705b; }
.quarter-q4 { --quarter-color: #b18d35; }

.quarter-legend .quarter-negative {
  --quarter-color: #8a8a8a;
}

.quarter-legend .quarter-negative::before,
.quarter-segment.is-negative {
  background-color: var(--quarter-color);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.72) 0 2px,
    rgba(0, 0, 0, 0.42) 2px 4px
  );
}

.annual-bars {
  display: grid;
  gap: 5px;
}

.annual-bar-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 78px;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.annual-bar-track {
  display: flex;
  height: 18px;
  overflow: hidden;
  border-top: 1px solid #777777;
  border-left: 1px solid #777777;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  background: repeating-linear-gradient(135deg, #d6d6d6 0 4px, #e4e4e4 4px 8px);
}

.quarter-segment {
  width: var(--segment-width);
  min-width: 1px;
  height: 100%;
  background: var(--quarter-color);
}

.annual-bar-value {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annual-bar-row.is-incomplete .annual-bar-year::after {
  content: "*";
  color: var(--title-blue);
}

.aggregate-ranking {
  margin-top: 9px;
  border-top: 1px dotted #777777;
}

.aggregate-ranking summary {
  padding-top: 7px;
  cursor: pointer;
  color: #263c56;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
}

.aggregate-ranking ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 22px;
  margin: 7px 0 0;
  padding-left: 24px;
  font-size: 11px;
}

.aggregate-ranking li span {
  float: right;
  margin-left: 5px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.aggregate-ranking li {
  min-width: 0;
}

.aggregate-ranking .ranking-name {
  float: none;
  color: var(--ink);
  font-family: Arial, Verdana, sans-serif;
  font-size: 11px;
}

.aggregate-ranking .ranking-others {
  padding-top: 3px;
  border-top: 1px dotted #777777;
  font-weight: bold;
  list-style-type: none;
}

.income-missing-information ol {
  grid-template-columns: minmax(0, 1fr);
}

.income-missing-information li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.income-missing-information li span {
  float: none;
  text-align: right;
}

.balance-missing-groups {
  display: grid;
  gap: 12px;
  margin-top: 9px;
}

.balance-missing-group h4 {
  margin: 0;
  font-size: 11px;
}

.balance-missing-group p {
  margin: 3px 0 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.balance-missing-group ol {
  margin-top: 5px;
}

.capital-missing-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.capital-missing-information .balance-missing-groups {
  max-height: 430px;
  padding-right: 5px;
  overflow-y: auto;
}

.capital-missing-information li > span:last-child {
  max-width: 68%;
  white-space: normal;
}

.no-data {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.aggregate-scope-empty,
.local-scope-note {
  padding: 10px;
  border: 1px solid #888888;
  background: #e5e5e5;
  font-family: "Courier New", monospace;
}

.aggregate-scope-empty h3 {
  margin: 0 0 7px;
  font-size: 13px;
}

.aggregate-scope-empty p,
.local-scope-note {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}

.tracking-coverage {
  margin: 0 0 12px;
  padding: 9px;
  border: 1px solid #777777;
  background: #dedede;
  box-shadow: inset 1px 1px #ffffff, inset -1px -1px #999999;
}

.tracking-coverage-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.tracking-coverage-heading h3,
.tracking-coverage-card h4 {
  margin: 0;
}

.tracking-coverage-heading h3 {
  color: #263c56;
  font-size: 13px;
}

.tracking-coverage-heading span,
.tracking-coverage-note,
.tracking-overflow-note {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.tracking-coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
}

.tracking-coverage-card {
  min-width: 0;
  padding: 7px;
  border: 1px solid #a0a0a0;
  background: #eeeeee;
}

.tracking-coverage-card h4 {
  min-height: 24px;
  font-size: 11px;
}

.tracking-untracked {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 5px;
  align-items: baseline;
  margin: 2px 0 5px;
  color: #7b2929;
  font-family: "Courier New", monospace;
}

.tracking-untracked span {
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
}

.tracking-untracked strong {
  overflow: hidden;
  font-size: 14px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-untracked b {
  font-size: 10px;
}

.tracking-bar {
  display: flex;
  width: 100%;
  height: 13px;
  overflow: hidden;
  border-top: 1px solid #666666;
  border-left: 1px solid #666666;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  background: #cfcfcf;
}

.tracking-bar i {
  display: block;
  width: var(--coverage-width);
  height: 100%;
}

.tracking-bar-tracked {
  background: #55705b;
}

.tracking-bar-untracked {
  background: repeating-linear-gradient(135deg, #8c3d3d 0 4px, #b85d5d 4px 8px);
}

.tracking-values {
  display: grid;
  gap: 2px;
  margin: 5px 0 0;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.tracking-values div {
  display: flex;
  justify-content: space-between;
  gap: 5px;
}

.tracking-values dt,
.tracking-values dd {
  margin: 0;
}

.tracking-values dd {
  text-align: right;
}

.tracking-coverage-note,
.tracking-overflow-note {
  margin: 6px 0 0;
}

.coverage-actions {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dotted #777777;
}

.coverage-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.coverage-button-row.is-stacked {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
}

.coverage-toggle-button[aria-expanded="true"] {
  border-color: #263955;
  background: #263955;
  color: #ffffff;
}

.coverage-panel {
  margin-top: 9px;
}

.coverage-panel[hidden] {
  display: none;
}

.coverage-panel .tracking-coverage {
  margin-bottom: 0;
}

.tracking-coverage-records ol {
  grid-template-columns: minmax(0, 1fr);
}

.quarterly-bars {
  display: grid;
  gap: 5px;
  max-height: 360px;
  padding-right: 5px;
  overflow-y: auto;
}

.quarter-bar-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 78px;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.quarter-label {
  font-family: "Courier New", monospace;
  font-size: 9px;
  white-space: nowrap;
}

.comparison-section > h3,
.market-share-view > h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.quarter-neutral {
  --quarter-color: #666666;
}

.workforce-comparison .bar-employees {
  background: #555555;
}

.workforce-comparison .bar-open-jobs {
  background: repeating-linear-gradient(135deg, #777777 0 3px, #b5b5b5 3px 6px);
}

.interaction-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.comparison-chart {
  display: grid;
  gap: 8px;
  max-height: 430px;
  padding-right: 5px;
  overflow-y: auto;
}

.comparison-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding-bottom: 7px;
  border-bottom: 1px dotted #999999;
}

.year-drilldown {
  min-height: 42px;
  padding: 4px;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #333333;
  border-bottom: 2px solid #333333;
  background: #d0d0d0;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
}

.year-drilldown[aria-expanded="true"] {
  border-color: #263955;
  background: #263955;
  color: #ffffff;
}

.comparison-bars {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.comparison-line {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 78px;
  gap: 5px;
  align-items: center;
  min-width: 0;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.comparison-line.is-secondary .annual-bar-track {
  height: 11px;
}

.comparison-line b {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-bars small {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
  text-align: right;
}

.ranking-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.income-statement-panel:not(:empty) {
  margin-top: 12px;
  padding: 9px;
  border: 1px dashed var(--line);
  background: #e2e2e2;
}

.income-statement-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.income-statement-heading h3 {
  margin: 0;
  font-size: 14px;
}

.income-statement-heading span {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.income-bridge {
  display: grid;
  gap: 4px;
}

.income-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(80px, 2fr) 88px;
  gap: 7px;
  align-items: center;
  font-size: 10px;
}

.income-line > div {
  height: 12px;
  border: 1px solid #888888;
  background: #f1f1f1;
}

.income-line i {
  display: block;
  width: var(--value-width);
  height: 100%;
  background: #405744;
}

.income-line.deduction i {
  background: #742f3c;
}

.income-line.total {
  font-weight: bold;
}

.income-line b {
  text-align: right;
  white-space: nowrap;
}

.income-margin {
  margin: 8px 0 0;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
  text-align: right;
}

.balance-chart {
  display: grid;
  gap: 9px;
  max-height: 440px;
  padding-right: 5px;
  overflow-y: auto;
}

.balance-sheet-section,
.capital-evolution-section {
  min-width: 0;
  max-width: 100%;
}

.balance-sheet-section {
  overflow: hidden;
}

.balance-year-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding-bottom: 8px;
  border-bottom: 1px dotted #888888;
}

.balance-year-button {
  min-height: 42px;
  line-height: 1.2;
}

.balance-latest-note {
  margin: -3px 0 9px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
  text-align: right;
}

.balance-equation-bars {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.balance-line {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 82px;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.balance-line b {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance-track {
  display: flex;
  height: 19px;
  overflow: hidden;
  border-top: 1px solid #777777;
  border-left: 1px solid #777777;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  background: #e9e9e9;
}

.balance-track i {
  display: block;
  width: var(--value-width);
  height: 100%;
}

.assets-bar {
  background: #555555;
}

.liabilities-bar {
  background: repeating-linear-gradient(135deg, #696969 0 4px, #929292 4px 8px);
}

.equity-bar {
  background: #b8b8b8;
  border-left: 1px solid #333333;
}

.balance-component-values {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
  margin-left: 116px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.balance-component-values span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.balance-component-values i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid #666666;
}

.balance-component-values .liabilities-key {
  background: repeating-linear-gradient(135deg, #696969 0 3px, #929292 3px 6px);
}

.balance-component-values .equity-key {
  background: #b8b8b8;
}

.balance-component-values b {
  color: var(--ink);
}

.balance-equation-bars small {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
  text-align: right;
}

.balance-sheet-panel:not(:empty) {
  margin-top: 12px;
  padding: 9px;
  border: 1px dashed var(--line);
  background: #e2e2e2;
}

.balance-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.balance-detail-grid h4 {
  margin: 0 0 5px;
  font-size: 12px;
}

.balance-detail-grid dl {
  margin: 0;
}

.balance-detail-grid dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dotted #999999;
  font-size: 10px;
}

.balance-detail-grid dt,
.balance-detail-grid dd {
  margin: 0;
}

.balance-detail-grid dd {
  font-family: "Courier New", monospace;
  text-align: right;
}

.balance-detail-grid .total {
  margin-top: 3px;
  border-top: 1px solid #555555;
  border-bottom: 0;
  font-weight: 700;
}

.balance-hierarchy-note {
  margin: 4px 0 10px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.balance-detail-grid .hierarchy-level-1 dt,
.balance-detail-grid .hierarchy-level-2 dt {
  position: relative;
}

.balance-detail-grid .hierarchy-level-1 dt {
  padding-left: 16px;
}

.balance-detail-grid .hierarchy-level-2 dt,
.balance-detail-grid .nested dt {
  padding-left: 34px;
}

.balance-detail-grid .hierarchy-level-2 dt::before {
  content: "↳";
  position: absolute;
  color: #777777;
  font-family: "Courier New", monospace;
  font-weight: normal;
}

.balance-detail-grid .hierarchy-level-2 dt::before {
  left: 18px;
}

.capital-evolution-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.capital-evolution-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.capital-evolution-heading h3 {
  margin: 0;
  font-size: 14px;
}

.capital-line-charts { display: grid; gap: 14px; }
.capital-line-chart { min-width: 0; }
.capital-line-chart .product-chart-scroll { background: #ededed; }

.capital-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 7px;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.capital-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border: 1px solid #555555;
  vertical-align: -2px;
}

.capital-legend .legend-ppe::before { background: #606060; }
.capital-legend .legend-capex::before { background: #4f8759; }
.capital-legend .legend-opex::before { background: #b55252; }
.capital-legend .legend-depreciation::before { background: #873a3a; }

.capital-evolution-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid #777777;
  border-left: 1px solid #777777;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  background: #ededed;
}

.capital-quarter-chart {
  display: grid;
  grid-auto-columns: 140px;
  grid-auto-flow: column;
  gap: 4px;
  width: max-content;
  min-width: 100%;
  padding: 10px;
}

.capital-quarter-group {
  display: grid;
  grid-template-rows: 150px 18px;
  min-width: 0;
  text-align: center;
}

.capital-positive-area {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  border-bottom: 1px solid #333333;
  background: repeating-linear-gradient(180deg, transparent 0 28px, rgba(0, 0, 0, 0.08) 28px 29px);
}

.capital-bar-wrap {
  display: flex;
  width: 28px;
  height: 100%;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
}

.capital-bar-wrap b {
  margin-bottom: 2px;
  font-family: "Courier New", monospace;
  font-size: 6px;
  white-space: nowrap;
}

.capital-bar {
  display: block;
  width: 20px;
  height: var(--bar-height);
  min-height: 1px;
}

.capital-ppe { background: #606060; }
.capital-capex { background: #4f8759; }
.capital-opex { background: #b55252; }
.capital-depreciation { background: #873a3a; }

.capital-quarter-group > strong {
  padding-top: 4px;
  font-family: "Courier New", monospace;
  font-size: 8px;
  white-space: nowrap;
}

.balance-rankings {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.balance-rankings > h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.financial-ranking ol {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.financial-ranking li {
  padding-bottom: 6px;
  border-bottom: 1px dotted #999999;
}

.financial-ranking-primary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.financial-ranking .financial-ranking-primary .ranking-name,
.financial-ranking-primary b {
  float: none;
  margin: 0;
}

.financial-ranking-primary b {
  flex: 0 0 auto;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.financial-ranking dl {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin: 4px 0 0;
}

.financial-ranking dl > div {
  display: flex;
  gap: 3px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.financial-ranking dt,
.financial-ranking dd {
  margin: 0;
}

.financial-ranking dd {
  color: var(--ink);
  font-weight: bold;
}

.aggregate-disclaimer {
  margin: 9px 0 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.eyebrow {
  margin: 0 0 5px !important;
  color: var(--muted) !important;
  font-family: "Courier New", monospace;
  font-size: 11px !important;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.retro-button,
.quiet-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 10px;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #222222;
  border-bottom: 2px solid #222222;
  border-radius: 0;
  background: #d0d0d0;
  color: #000000;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
}

.icon-button {
  width: 38px;
  padding: 0;
  font-family: "Courier New", monospace;
  font-size: 19px;
  font-weight: bold;
}

.retro-button {
  font-weight: bold;
}

.quiet-button {
  color: #333333;
}

.retro-button:hover,
.quiet-button:hover,
.icon-button:hover {
  background: #dedede;
}

.retro-button:active,
.quiet-button:active,
.icon-button:active {
  padding-top: 7px;
  padding-left: 11px;
  border-top-color: #222222;
  border-left-color: #222222;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.retro-button:disabled,
.quiet-button:disabled,
.icon-button:disabled {
  color: #777777;
  cursor: not-allowed;
  filter: grayscale(1);
}

.newsletter .icon-button {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #222222;
  border-bottom: 2px solid #222222;
  background: #d0d0d0;
  font-size: 14px;
  line-height: 1;
}

.newsletter .icon-button:hover {
  background: #dedede;
}

.newsletter .icon-button:active {
  padding: 0;
  border-top-color: #222222;
  border-left-color: #222222;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.newsletter .icon-button:disabled {
  background: #d0d0d0;
  opacity: 0.35;
}

.company-filter-stack {
  display: grid;
  gap: 8px;
}

.company-filter-box {
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid #b0b0b0;
  background: #eeeeee;
}

.company-filter-label {
  font-weight: bold;
}

.search-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}

.company-type-picker {
  position: relative;
  min-width: 0;
}

#company-stage-filter summary {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 7px 28px 6px 8px;
  overflow: hidden;
  border-top: 2px solid #777777;
  border-left: 2px solid #777777;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  list-style: none;
}

#company-stage-filter summary::-webkit-details-marker {
  display: none;
}

#company-stage-filter summary::after {
  position: absolute;
  top: 7px;
  right: 9px;
  content: "▼";
  color: #333333;
  font-size: 10px;
}

#company-stage-filter[open] summary::after {
  content: "▲";
}

#company-stage-filter[open] summary {
  border-top-color: #222222;
  border-left-color: #222222;
  background: #eeeeee;
}

#company-stage-filter.is-filter-locked summary,
#country-filter:disabled {
  color: #777777;
  background: #dddddd;
  cursor: not-allowed;
}

#company-stage-filter.is-filter-locked summary {
  pointer-events: none;
}

.company-stage-options {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 3px);
  right: 0;
  width: max(240px, 100%);
  max-height: 260px;
  padding: 5px;
  overflow-y: auto;
  border: 2px solid #333333;
  background: #eeeeee;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}

.company-stage-option {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 12px;
}

.company-stage-option:hover {
  background: #d9d9d9;
}

.company-stage-option input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #555555;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 6px;
  border-top: 2px solid #777777;
  border-left: 2px solid #777777;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
}

input:focus,
select:focus,
textarea:focus,
#company-stage-filter summary:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px dotted #000000;
  outline-offset: 2px;
}

.form-message {
  min-height: 18px;
  margin: 5px 0 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.form-message.error {
  color: var(--danger);
}

.map-stage {
  position: relative;
  margin: 10px;
}

.coordinate-picker {
  position: absolute;
  z-index: 1001;
  top: 10px;
  left: 50%;
  display: flex;
  box-sizing: border-box;
  width: min(calc(100% - 90px), 620px);
  padding: 8px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateX(-50%);
  border: 1px solid #222222;
  background: rgba(255, 238, 133, 0.97);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.coordinate-picker div {
  display: grid;
  gap: 2px;
}

.coordinate-picker strong {
  font-size: 12px;
}

.coordinate-picker .quiet-button {
  flex: 0 0 auto;
}

.map-box.coordinate-picking,
.map-box.coordinate-picking .leaflet-interactive,
.map-box.coordinate-picking .leaflet-marker-icon {
  cursor: crosshair !important;
}

.map-box {
  width: 100%;
  min-width: 0;
  height: min(67vh, 760px);
  min-height: 510px;
  border-top: 2px solid #777777;
  border-left: 2px solid #777777;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  background: #c7c7c7;
}

.leaflet-container {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12) 1px, transparent 1px),
    #c7c7c7;
  background-size: 32px 32px;
  font-family: Arial, Verdana, sans-serif;
}

.leaflet-tile {
  filter: grayscale(1) contrast(0.95);
}

.leaflet-control-attribution {
  font-size: 10px;
}

.leaflet-bar a,
.leaflet-bar a:hover {
  border-color: #777777;
  border-radius: 0 !important;
  background: #d0d0d0;
  color: #000000;
}

.leaflet-bar {
  border: 1px solid #222222 !important;
  border-radius: 0 !important;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35) !important;
}

.relationship-notice {
  box-sizing: border-box;
  width: min(calc(100% - 20px), 720px);
  margin: 10px auto 0;
  padding: 7px 9px;
  border: 1px dashed #222222;
  background: rgba(255, 238, 133, 0.96);
  color: #111111;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.facility-marker-shell {
  position: relative;
  display: grid;
  place-items: center;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.45));
}

.facility-marker-shell img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.facility-marker-shell.filtered-out {
  opacity: 0.18;
  filter: grayscale(1);
}

.facility-marker-shell.filtered-out .hq-star {
  display: none;
}

.facility-marker-shell.shared-location::before,
.facility-marker-shell.shared-location::after {
  content: "";
  position: absolute;
  inset: 2px -3px -3px 2px;
  z-index: -1;
  border: 1px solid #333333;
  background: #bdbdbd;
}

.facility-marker-shell.shared-location::after {
  inset: 4px -5px -5px 4px;
  z-index: -2;
  background: #8f8f8f;
}

.facility-marker-shell.separated-location {
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.55));
}

.hq-star {
  position: absolute;
  top: -2px;
  right: -2px;
  color: #c6a64f;
  line-height: 1;
  text-shadow: 1px 0 #000000, -1px 0 #000000, 0 1px #000000, 0 -1px #000000;
}

.facility-marker-shell.selected-headquarters {
  filter: drop-shadow(0 0 2px #c6a64f) drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.7));
}

.relationship-arrow {
  position: relative;
  width: 18px;
  height: 18px;
  transform-origin: center;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.35));
}

.relationship-arrow::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 14px solid var(--marker-blue);
}

.relationship-arrow.domestic::before {
  border-left-color: #555555;
}

.relationship-arrow.branch::before {
  border-left-color: var(--title-red);
}

.edge-links {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 680;
  overflow: hidden;
}

.edge-link {
  pointer-events: auto;
  position: absolute;
  max-width: 260px;
  padding: 5px 6px;
  transform: translate(-50%, -50%);
  border: 1px solid #222222;
  background: var(--warning);
  color: #111111;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
  line-height: 1.2;
}

.edge-link span {
  display: block;
  font-weight: normal;
}

.online-strip {
  display: flex;
  justify-content: center;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: bold;
}

.instruction-box p {
  margin: 0 0 5px;
}

.instruction-box p:last-child {
  margin-bottom: 0;
}

.star-key {
  color: #a9842e;
  font-size: 1.1em;
  text-shadow: 1px 0 #000000, 0 1px #000000;
}

.retro-dialog {
  box-sizing: border-box;
  width: min(calc(100% - 20px), 560px);
  max-width: 560px;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 10px;
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid #222222;
  border-bottom: 2px solid #222222;
  border-radius: 0;
  background: var(--panel-bg);
  color: #000000;
  box-shadow: 1px 1px 0 var(--panel-shadow);
}

.retro-dialog::backdrop {
  background: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.35) 0 4px,
    rgba(0, 0, 0, 0.5) 4px 8px
  );
}

.detail-dialog h2,
.form-dialog h2,
.message-dialog h2 {
  margin: 2px 0 6px;
  font-family: "Times New Roman", Times, serif;
  font-size: 24px;
}

.dialog-window-heading {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line);
  background: var(--panel-bg);
}

.dialog-window-heading .eyebrow {
  margin-bottom: 2px;
}

.dialog-window-heading h2 {
  margin-bottom: 0;
}

.detail-location {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.detail-description {
  line-height: 1.5;
}

.geocoding-status {
  margin: 18px 0;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.detected-location {
  display: grid;
  gap: 2px;
  margin: 8px 0 12px;
  padding: 8px;
  border: 1px dashed var(--line);
  background: #e7e7e7;
}

.detected-location small,
.detected-location span,
.detected-location a {
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.detected-location small {
  color: var(--muted);
  text-transform: uppercase;
}

.detected-location strong {
  font-size: 15px;
}

.detected-location a {
  margin-top: 3px;
  color: #263c56;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.detail-meta div {
  padding: 7px;
  border: 1px dashed var(--line);
  background: #e7e7e7;
}

.detail-meta small {
  display: block;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.relationship-actions-grid {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.relationship-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.relationship-action-row:empty {
  display: none;
}

.relationship-detail-values {
  display: block;
  margin: 12px 0;
  border-top: 1px solid #999999;
}

.relationship-detail-values > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dotted #999999;
}

.relationship-detail-values small,
.relationship-detail-values span {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.facility-metrics .relationship-detail-values small,
.facility-metrics .relationship-detail-values span {
  font-size: 11px;
}

.upstream-instance-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.upstream-instance {
  padding: 4px 0 12px;
  border-bottom: 1px solid #777777;
  background: transparent;
  box-shadow: none;
}

.upstream-instance:last-child { border-bottom: 0; }

.upstream-instance-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.upstream-instance-heading h3 {
  margin: 2px 0 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
}

.upstream-instance .relationship-detail-values {
  margin: 9px 0;
}

.upstream-instance .detail-description {
  margin-bottom: 0;
}

.relationship-report-list {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.relationship-report {
  padding: 0 0 14px;
  border-bottom: 1px solid #777777;
}

.relationship-report:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.relationship-report-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.relationship-report-heading h3 {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 19px;
}

.relationship-report-period {
  margin: -3px 0 9px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.relationship-report-facts {
  margin: 0;
  border-top: 1px solid #999999;
}

.relationship-report-facts > div {
  display: grid;
  grid-template-columns: minmax(125px, 0.65fr) minmax(0, 1.35fr);
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dotted #999999;
}

.relationship-report-facts dt,
.relationship-report-facts dd {
  margin: 0;
}

.relationship-report-facts dt {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.relationship-report-facts dd {
  font-weight: bold;
}

.relationship-report-facts dd span {
  color: var(--muted);
  font-weight: normal;
}

.relationship-report-description {
  margin: 11px 0 0;
  line-height: 1.55;
}

.relationship-report-source {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.relationship-report-source strong,
.relationship-report-source a {
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.relationship-report-source strong { color: var(--ink); }

.relationship-product-financials {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 8px;
  border: 1px dashed var(--line);
}

.relationship-product-financials legend {
  padding: 0 4px;
  font-weight: bold;
}

.relationship-product-financials input.is-derived {
  background: #dedede;
  color: #555555;
  box-shadow: inset 1px 1px #999999;
}

.relationship-financial-message {
  min-height: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.relationship-financial-message.is-warning {
  color: #8a2939;
  font-weight: bold;
}

.funding-current-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-action-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin-top: 14px;
}

input[type="range"] {
  width: 100%;
  accent-color: #111;
}

output[data-allocation-output] {
  display: block;
  margin-top: 0.45rem;
  font-weight: 700;
  text-align: center;
}

.funding-current-help {
  grid-column: 1 / -1;
  margin: 0;
}

.instrument-list {
  display: grid;
  gap: 8px;
}

.instrument-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 9px;
  border: 1px dashed var(--line);
  background: #e7e7e7;
}

.instrument-item time {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.instrument-type {
  display: inline-block;
  margin-bottom: 5px;
  padding: 2px 5px;
  border: 1px solid #777777;
  background: #d0d0d0;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
}

.instrument-item p {
  margin: 0 0 6px;
  line-height: 1.4;
}

.instrument-item a {
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.dialog-actions .retro-button {
  flex: 1 1 130px;
}

.dialog-actions .quiet-button {
  flex: 0 1 auto;
}

.data-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.data-form .full {
  grid-column: 1 / -1;
}

.data-form label {
  display: grid;
  gap: 4px;
  font-weight: bold;
}

.coordinate-edit-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border: 1px dashed var(--line);
  background: #e7e7e7;
}

.coordinate-edit-control > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.coordinate-edit-control small,
.coordinate-edit-control span {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.coordinate-edit-control strong {
  overflow-wrap: anywhere;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.coordinate-edit-control .quiet-button {
  flex: 0 0 auto;
}

.data-form textarea {
  min-height: 100px;
  resize: vertical;
}

.source-section,
.local-metrics-fieldset,
.facility-workforce-fieldset {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px;
  border: 1px solid #999999;
  background: #eeeeee;
}

.source-section legend,
.local-metrics-fieldset legend,
.facility-workforce-fieldset legend {
  padding: 0 5px;
  font-weight: bold;
}

.source-help {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.source-list {
  display: grid;
  gap: 6px;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.source-row label {
  font-weight: normal;
}

.add-source-button {
  margin-top: 7px;
}

.local-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.facility-workforce-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.facility-workforce-grid > label {
  grid-column: 1 / -1;
  width: 100%;
}

.facility-workforce-grid.hidden {
  display: none;
}

.facility-workforce-grid input[readonly] {
  color: var(--muted);
  background: #dddddd;
}

.facility-metrics {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #777777;
}

.facility-metrics h3 {
  margin: 0 0 7px;
  font-size: 14px;
}

.facility-quarter-metrics {
  display: grid;
  gap: 6px;
}

.facility-quarter-metrics article {
  padding: 7px;
  border: 1px solid #aaaaaa;
  background: #f3f3f3;
}

.facility-quarter-metrics strong {
  display: block;
  margin-bottom: 5px;
}

.facility-quarter-metrics dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  margin: 0;
}

.facility-quarter-metrics dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.facility-quarter-metrics dt,
.facility-quarter-metrics dd {
  margin: 0;
}

.checkbox-label {
  display: flex !important;
  grid-column: 1 / -1;
  align-items: center;
  gap: 7px !important;
}

.checkbox-label input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

.coordinate-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.legal-copy {
  width: min(820px, calc(100% - 20px));
  margin: 10px auto;
  line-height: 1.55;
}

.legal-copy h2 {
  margin: 0 0 8px;
  font-family: "Times New Roman", Times, serif;
  font-size: 26px;
}

.legal-copy h3 {
  margin: 16px 0 5px;
  font-size: 16px;
}

.site-footer {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 10px 8px 20px;
  color: #222222;
  font-size: 12px;
  text-align: center;
}

.site-footer p {
  margin: 4px;
}

@media (max-width: 900px) {
  .aggregate-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .retro-dialog,
  .retro-dialog.aggregate-dialog,
  .retro-dialog.instruments-dialog,
  .retro-dialog.products-dialog {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    max-height: calc(100vh - 24px);
    max-height: min(90dvh, 760px);
    padding: 8px;
  }

  .site-header {
    width: 100%;
  }

  .page-shell {
    width: 100%;
    padding: 0 8px 20px;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .site-icon {
    width: 72px;
    height: 72px;
  }

  .newsletter {
    min-height: 116px;
  }

  .product-ticker { grid-template-columns: minmax(0, 1fr) auto; }
  .product-ticker-label { display: none; }
  .product-selector-grid { grid-template-columns: 1fr; }
  .product-classification-info dl > div { grid-template-columns: 1fr; gap: 2px; }
  .product-analysis-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-price-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .product-price-actions { width: 100%; grid-template-columns: 1fr auto; align-items: center; justify-items: start; }
  .product-chart-scroll { overflow-x: hidden; }
  .product-chart-scroll svg { min-width: 0; height: auto; }
  .product-company-disclosure summary { grid-template-columns: auto minmax(0, 1fr); }
  .product-company-disclosure summary small { grid-column: 2; text-align: left; }
  .company-product-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-products-heading { align-items: flex-start; flex-direction: column; }
  .product-observation-fields { grid-template-columns: 1fr; }
  .relationship-report-heading { flex-direction: column; }
  .relationship-report-heading .suggest-edit-button { align-self: flex-start; }
  .relationship-report-facts > div,
  .relationship-detail-values > div { grid-template-columns: 1fr; gap: 2px; }

  .aggregate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aggregate-card.is-expanded {
    grid-column: 1 / -1;
  }

  .aggregate-card:not(.is-expanded) {
    width: 100%;
    height: auto;
    min-height: 92px;
    aspect-ratio: auto;
    justify-self: stretch;
    overflow: hidden;
  }

  .aggregate-card:not(.is-expanded) .aggregate-card-toggle {
    min-height: 88px;
    padding: 4px;
    align-items: flex-start;
  }

  .aggregate-card-summary {
    display: block;
    min-height: 0;
    padding: 0 4px 4px;
  }

  .aggregate-summary-primary,
  .aggregate-summary-secondary,
  .aggregate-summary-caption,
  .aggregate-summary-period {
    display: none;
  }

  .aggregate-summary-mobile {
    display: grid;
    gap: 1px;
    overflow-wrap: anywhere;
    font-family: "Courier New", monospace;
    font-size: clamp(7px, 2.35vw, 10px);
    line-height: 1.1;
  }

  .aggregate-card-title {
    padding-right: 1px;
    overflow-wrap: anywhere;
    font-size: clamp(8px, 2.6vw, 11px);
    line-height: 1.05;
  }

  .aggregate-metric-grid {
    grid-template-columns: 1fr;
  }

  .aggregate-dashboard-heading {
    align-items: baseline;
    flex-direction: row;
  }

  .aggregate-ranking ol {
    grid-template-columns: 1fr;
  }

  .ranking-pair {
    grid-template-columns: 1fr;
  }

  .comparison-line {
    grid-template-columns: 54px minmax(0, 1fr) 68px;
  }

  .income-line {
    grid-template-columns: minmax(96px, 1fr) minmax(60px, 1.5fr) 76px;
  }

  .balance-year-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .balance-line {
    grid-template-columns: 72px minmax(0, 1fr) 64px;
  }

  .balance-detail-grid {
    grid-template-columns: 1fr;
  }

  .capital-evolution-heading {
    align-items: flex-start;
  }

  .balance-component-values {
    gap: 7px;
    margin-left: 78px;
  }

  .map-box {
    height: 58vh;
    min-height: 390px;
  }

  .data-form {
    grid-template-columns: 1fr;
  }

  .coordinate-picker {
    top: 8px;
    width: calc(100% - 16px);
  }

  .coordinate-picker,
  .coordinate-edit-control {
    align-items: stretch;
    flex-direction: column;
  }

  .relationship-product-financials {
    grid-template-columns: 1fr;
  }

  .instrument-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .data-form .full,
  .checkbox-label {
    grid-column: auto;
  }

  .source-section,
  .local-metrics-fieldset,
  .facility-workforce-fieldset {
    grid-column: auto;
  }

  .facility-workforce-grid {
    grid-template-columns: 1fr;
  }

  .local-metrics-grid,
  .facility-quarter-metrics dl {
    grid-template-columns: 1fr;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .dialog-window-heading {
    flex-direction: column;
    padding-right: 0;
  }

  .dialog-window-heading .dialog-heading-actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
  }

  .dialog-heading-actions > :not(.dialog-close) {
    min-width: 0;
    min-height: 30px;
    flex: 0 1 auto;
    padding: 4px 6px;
    font-size: 9px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .dialog-window-heading .dialog-close {
    position: static;
    margin-left: 0;
  }

  .aggregate-dialog-heading .dialog-close {
    position: absolute;
    top: 0;
    right: 0;
    margin-left: 0;
  }

  .aggregate-dialog-heading {
    align-items: flex-start;
    padding-right: 40px;
  }

  .aggregate-dialog-heading .dialog-heading-actions {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
  }

  .message-dialog #message-ok {
    position: sticky;
    bottom: 0;
    z-index: 5;
  }
}

@media (max-width: 360px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) 62px;
    gap: 6px;
  }

  .site-icon {
    width: 62px;
    height: 62px;
  }

  .site-header h1 {
    font-size: 25px;
  }

  .subtitle,
  .site-header p {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
