:root {
  --paper: #d8dbcf;
  --ink: #10130f;
  --dim: #5d6257;
  --bg: #151713;
  --panel: #22251f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: #f3f4ec;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.board {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 18px 40px;
}

.intro {
  margin-bottom: 24px;
}

.intro p,
.note {
  color: #b6baad;
  margin: 0;
}

.intro h1 {
  margin: 4px 0 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.prototype-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 18px;
}

.prototype {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.prototype h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.note {
  font-size: 14px;
  line-height: 1.45;
}

.screen {
  width: min(100%, 260px);
  aspect-ratio: 4 / 9;
  justify-self: center;
  position: relative;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  border: 10px solid #080906;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  font-family: "Arial Narrow", Arial, ui-sans-serif, system-ui, sans-serif;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(16, 19, 15, 0.04) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 34%, rgba(0, 0, 0, 0.08));
}

.topbar,
.footer-line {
  position: absolute;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.topbar {
  top: 8px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
}

.radar {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 42px;
  height: 48%;
  border: 2px solid var(--ink);
  overflow: hidden;
}

.own,
.center-dot,
.mini-own {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 50%;
}

.own {
  left: calc(50% - 4px);
  top: calc(50% - 4px);
}

.ring,
.mini-ring,
.big-ring {
  position: absolute;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.r1 {
  width: 78px;
  height: 48px;
  left: calc(50% - 39px);
  top: calc(50% - 24px);
}

.r3 {
  width: 180px;
  height: 112px;
  left: calc(50% - 90px);
  top: calc(50% - 56px);
}

.north,
.range {
  position: absolute;
  font-size: 12px;
  font-weight: 900;
}

.north {
  left: 54%;
  top: 9%;
}

.range-1 {
  right: 60px;
  top: 48%;
}

.range-3 {
  right: 8px;
  top: 48%;
}

.track {
  position: absolute;
  height: 2px;
  background: var(--ink);
  transform-origin: left center;
}

.danger-track {
  width: 115px;
  left: 51%;
  top: 52%;
  transform: rotate(66deg);
}

.soft-track {
  width: 86px;
  border-top: 2px dashed var(--ink);
  background: transparent;
}

.t2 {
  left: 30%;
  top: 28%;
  transform: rotate(8deg);
}

.plane {
  position: absolute;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  background: var(--paper);
}

.danger-plane {
  right: 19px;
  bottom: 22px;
}

.p2 {
  left: 30px;
  top: 44px;
}

.p3 {
  right: 24px;
  top: 76px;
}

.digits {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 3px solid var(--ink);
  border-left: 2px solid var(--ink);
}

.digits div {
  min-height: 57px;
  padding: 5px 5px 3px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.digits b,
.alarm-metrics b {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
}

.digits small,
.alarm-metrics small {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 900;
}

.alarm {
  background: var(--ink);
  color: var(--paper);
}

.alarm::after {
  background: repeating-linear-gradient(0deg, rgba(216, 219, 207, 0.04) 0 1px, transparent 1px 4px);
}

.alarm-head {
  margin: 9px 8px 0;
  padding: 6px 4px;
  border: 3px solid var(--paper);
  text-align: center;
  font-size: 21px;
  font-weight: 900;
}

.alarm-time {
  margin-top: 8px;
  text-align: center;
  font-size: 60px;
  line-height: 0.95;
  font-weight: 900;
}

.arrow-zone {
  position: relative;
  height: 198px;
  margin: 7px 12px;
  border-top: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
}

.big-ring {
  width: 136px;
  height: 136px;
  left: calc(50% - 68px);
  top: 28px;
  border-color: var(--paper);
}

.center-dot {
  left: calc(50% - 4px);
  top: 95px;
  background: var(--paper);
  z-index: 3;
}

.h-cpa-vector {
  position: absolute;
  left: 50%;
  top: 99px;
  width: 72px;
  height: 0;
  border-top: 5px solid var(--paper);
  transform: rotate(-64deg);
  transform-origin: left center;
  z-index: 2;
}

.h-cpa-vector::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -10px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid var(--paper);
}

.h-cpa-dot {
  position: absolute;
  left: calc(50% + 27px);
  top: 31px;
  width: 15px;
  height: 15px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  z-index: 3;
}

.h-cpa-label {
  position: absolute;
  left: calc(50% + 45px);
  top: 31px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  z-index: 3;
}

.alarm-arrow {
  position: absolute;
  left: calc(50% - 3px);
  top: 48px;
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(26deg);
  transform-origin: 50% 80%;
  z-index: 4;
}

.dir-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
  text-align: center;
  font-size: 23px;
  font-weight: 900;
}

.alarm-metrics {
  margin: 0 8px;
  display: grid;
  gap: 6px;
}

.alarm-metrics div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--paper);
  padding-bottom: 5px;
}

.alarm-metrics small {
  color: var(--paper);
  font-size: 15px;
}

.metric-bearing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bearing-arrow {
  display: inline-block;
  font-size: 28px;
  line-height: 1;
}

.compact-radar {
  position: relative;
  height: 185px;
  margin: 8px;
  border: 2px solid var(--ink);
}

.mini-own {
  left: calc(50% - 4px);
  top: calc(50% - 4px);
}

.mini-ring.one {
  width: 58px;
  height: 40px;
  left: calc(50% - 29px);
  top: calc(50% - 20px);
}

.mini-ring.three {
  width: 142px;
  height: 94px;
  left: calc(50% - 71px);
  top: calc(50% - 47px);
}

.mini-track {
  position: absolute;
  left: 51%;
  top: 54%;
  width: 90px;
  height: 3px;
  background: var(--ink);
  transform-origin: left center;
  transform: rotate(62deg);
}

.mini-plane {
  position: absolute;
  right: 24px;
  bottom: 20px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.mini-north {
  position: absolute;
  left: 52%;
  top: 14px;
  font-size: 13px;
  font-weight: 900;
}

.traffic-table {
  margin: 0 8px;
  display: grid;
  gap: 5px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 46px 45px;
  gap: 5px;
  align-items: center;
  min-height: 41px;
  padding: 0 5px;
  border: 2px solid var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.row.hot {
  background: var(--ink);
  color: var(--paper);
}

.row.muted {
  color: var(--dim);
  border-color: var(--dim);
}

.footer-line {
  bottom: 8px;
  display: block;
  border-top: 2px solid var(--ink);
  padding-top: 5px;
  font-size: 14px;
}

@media (max-width: 920px) {
  .prototype-grid {
    grid-template-columns: 1fr;
  }

  .screen {
    width: min(96vw, 560px);
  }
}

/* Memory LCD 400 x 240 layout */
.prototype-grid {
  grid-template-columns: 1fr;
  gap: 28px;
}

.prototype {
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
}

.prototype h2 {
  grid-column: 1 / -1;
}

.prototype .note {
  align-self: center;
}

.screen {
  width: min(100%, 640px);
  aspect-ratio: 400 / 240;
  justify-self: stretch;
  border-width: 8px;
}

.topbar {
  left: 9px;
  right: 9px;
  top: 7px;
  font-size: 18px;
}

.radar {
  left: 9px;
  top: 38px;
  width: 56%;
  height: calc(100% - 48px);
}

.r1 {
  width: 86px;
  height: 54px;
  left: calc(50% - 43px);
  top: calc(50% - 27px);
}

.r3 {
  width: 204px;
  height: 128px;
  left: calc(50% - 102px);
  top: calc(50% - 64px);
}

.danger-track {
  width: 132px;
  left: 51%;
  top: 51%;
  transform: rotate(56deg);
}

.danger-plane {
  right: 32px;
  bottom: 30px;
}

.p2 {
  left: 42px;
  top: 34px;
}

.p3 {
  right: 34px;
  top: 54px;
}

.digits {
  left: calc(56% + 20px);
  right: 9px;
  top: 38px;
  bottom: 9px;
  grid-template-columns: 1fr;
  border-top-width: 2px;
}

.digits div {
  min-height: 0;
  padding: 5px 7px;
}

.digits b,
.alarm-metrics b {
  font-size: 28px;
}

.digits small,
.alarm-metrics small {
  font-size: 12px;
}

.alarm-head {
  position: absolute;
  left: 9px;
  top: 8px;
  width: 31%;
  margin: 0;
  padding: 5px 4px;
  font-size: 18px;
}

.alarm-time {
  position: absolute;
  left: 9px;
  top: 55px;
  width: 31%;
  margin: 0;
  font-size: 54px;
}

.arrow-zone {
  position: absolute;
  left: 35%;
  top: 8px;
  width: 29%;
  height: calc(100% - 16px);
  margin: 0;
  border: 2px solid var(--paper);
}

.big-ring {
  width: 118px;
  height: 118px;
  left: calc(50% - 59px);
  top: 42px;
}

.center-dot {
  left: calc(50% - 4px);
  top: 96px;
}

.h-cpa-vector {
  left: 50%;
  top: 100px;
  width: 66px;
  border-top-width: 5px;
}

.h-cpa-dot {
  left: calc(50% + 24px);
  top: 37px;
}

.h-cpa-label {
  left: calc(50% + 42px);
  top: 37px;
  font-size: 14px;
}

.alarm-arrow {
  left: calc(50% - 6px);
  top: 57px;
  font-size: 46px;
}

.dir-label {
  bottom: 21px;
  font-size: 20px;
}

.alarm-metrics {
  position: absolute;
  right: 9px;
  top: 8px;
  width: 31%;
  margin: 0;
  gap: 0;
}

.alarm-metrics div {
  min-height: 54px;
  padding: 6px 0 5px;
}

.metric-bearing {
  gap: 7px;
}

.bearing-arrow {
  font-size: 31px;
}

.compact-radar {
  position: absolute;
  left: 9px;
  top: 9px;
  width: 44%;
  height: calc(100% - 39px);
  margin: 0;
}

.traffic-table {
  position: absolute;
  left: calc(44% + 20px);
  right: 9px;
  top: 9px;
  margin: 0;
  gap: 4px;
}

.row {
  min-height: 39px;
  grid-template-columns: 1fr 62px 58px;
  font-size: 17px;
}

.footer-line {
  left: 9px;
  right: 9px;
  bottom: 7px;
  font-size: 15px;
}

@media (max-width: 820px) {
  .prototype {
    grid-template-columns: 1fr;
  }

  .prototype .note {
    align-self: start;
  }
}

.demo-link {
  margin: 18px 0 0;
}

.demo-link a {
  color: #f3f4ec;
  font-weight: 800;
}

/* Alarm screen final layout: map left, all numbers right */
.screen-b .arrow-zone {
  left: 9px;
  top: 8px;
  width: calc(64% - 14px);
  height: calc(100% - 16px);
  border: 2px solid var(--paper);
}

.screen-b .big-ring {
  width: 164px;
  height: 164px;
  left: calc(50% - 82px);
  top: 25px;
}

.screen-b .center-dot {
  left: calc(50% - 5px);
  top: 103px;
  width: 10px;
  height: 10px;
}

.screen-b .h-cpa-vector {
  left: 50%;
  top: 108px;
  width: 92px;
  border-top-width: 5px;
  transform: rotate(-45deg);
}

.screen-b .h-cpa-dot {
  left: calc(50% + 57px);
  top: 39px;
  width: 16px;
  height: 16px;
}

.screen-b .h-cpa-label {
  left: calc(50% + 76px);
  top: 38px;
  font-size: 15px;
}

.screen-b .alarm-arrow {
  left: calc(50% + 22px);
  top: 55px;
  font-size: 58px;
  transform: rotate(45deg);
}

.screen-b .dir-label {
  left: 10px;
  right: auto;
  bottom: 8px;
  font-size: 20px;
}

.target-track {
  position: absolute;
  left: calc(50% - 88px);
  top: 33px;
  width: 160px;
  border-top: 4px dashed var(--paper);
  transform: rotate(27deg);
  transform-origin: left center;
}

.target-plane {
  position: absolute;
  left: calc(50% - 102px);
  top: 20px;
  padding: 2px 5px;
  border: 2px solid var(--paper);
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.screen-b .alarm-metrics {
  right: 9px;
  top: 8px;
  width: calc(36% - 10px);
  height: calc(100% - 16px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.screen-b .alarm-metrics div {
  min-height: 0;
  padding: 0 0 6px;
}

.screen-b .alarm-metrics small {
  margin: 0 0 2px;
  font-size: 14px;
}

.screen-b .alarm-metrics b {
  font-size: 34px;
  line-height: 0.95;
  text-align: right;
}

.screen-b .time-row b {
  font-size: 52px;
}

.screen-b .alarm-title-row {
  border: 2px solid var(--paper);
  padding: 4px 6px;
}

.screen-b .alarm-title-row b {
  font-size: 26px;
}

.screen-b .bearing-arrow {
  font-size: 37px;
}
