:root {
  --substrate: #ecebe8;
  --rule: #a1a1a1;
  --black: #0d0d0d;
  --cobalt: #1a428a;
  --crimson: #cb2a2a;
  --ochre: #c48c31;
  --paper-dark: #d9d7d1;
  --soft-ink: #5b5a56;
  --lane-h: 72px;
  --index-w: 236px;
  font-family: Helvetica, Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: auto;
  background: var(--substrate);
  color: var(--black);
}

.plate-frame {
  display: block;
  width: 100vw;
  height: 100vh;
  border: 0;
  background: var(--substrate);
}

button {
  border-radius: 0;
  font: inherit;
}

.tectonic-app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  background: var(--substrate);
}

.index-header {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 470px;
  border-bottom: 1px solid var(--rule);
}

.mark {
  display: grid;
  min-height: 118px;
  place-items: center;
  border-right: 1px solid var(--rule);
  background: var(--black);
  color: var(--substrate);
  font-size: 22px;
  font-weight: 800;
}

.index-header > div:nth-child(2) {
  padding: 18px 26px 14px;
}

.micro {
  margin: 0 0 8px;
  color: var(--soft-ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  max-width: 920px;
  font-size: clamp(34px, 5.2vw, 78px);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--rule);
}

.header-metrics span {
  display: grid;
  align-content: end;
  min-height: 118px;
  padding: 14px 12px;
  border-right: 1px solid var(--rule);
  color: var(--soft-ink);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.header-metrics b {
  display: block;
  color: var(--black);
  font-size: 34px;
  line-height: 1;
}

.control-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
}

.phase-tab {
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--rule);
  background: var(--substrate);
  color: var(--black);
  cursor: pointer;
  padding: 0 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.phase-tab.active,
.phase-tab:hover {
  background: var(--black);
  color: var(--substrate);
}

.phase-tab.plotter {
  background: var(--ochre);
  color: var(--black);
}

.chronograph {
  display: grid;
  grid-template-columns: var(--index-w) minmax(0, 1fr);
  min-height: 0;
}

.lane-index {
  z-index: 2;
  border-right: 1px solid var(--rule);
  background: var(--substrate);
}

.index-cell,
.lane-button {
  width: 100%;
  height: var(--lane-h);
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: var(--substrate);
  color: var(--black);
  padding: 0 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.axis-title {
  display: grid;
  align-items: center;
  color: var(--soft-ink);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.lane-button {
  cursor: pointer;
}

.lane-button.active,
.lane-button:hover {
  background: var(--paper-dark);
}

.timeline-viewport {
  overflow: auto hidden;
  min-width: 0;
}

.timeline-canvas {
  position: relative;
  width: 2160px;
  min-height: calc(var(--lane-h) * 8);
  background:
    linear-gradient(90deg, transparent 0 119px, var(--rule) 120px, transparent 121px),
    var(--substrate);
  background-size: 216px 100%;
}

.ghost-taxonomy {
  position: absolute;
  top: 92px;
  color: #d0cec8;
  font-size: 118px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  pointer-events: none;
}

.ghost-taxonomy.datum {
  left: 360px;
}

.ghost-taxonomy.release {
  left: 1110px;
}

.ghost-taxonomy.surge {
  left: 1690px;
}

.time-axis {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(10, 216px);
  height: var(--lane-h);
  border-bottom: 1px solid var(--rule);
}

.time-axis span {
  align-self: end;
  padding: 0 0 10px 8px;
  border-right: 1px solid var(--rule);
  color: var(--soft-ink);
  font-size: 10px;
  font-weight: 800;
}

.lane-row {
  position: relative;
  height: var(--lane-h);
  border-bottom: 1px solid var(--rule);
}

.time-block {
  position: absolute;
  top: 14px;
  left: calc(var(--start) * 1%);
  width: calc(var(--span) * 1%);
  height: 44px;
  overflow: hidden;
  border: 0;
  color: var(--substrate);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.time-block::before {
  content: attr(data-score);
  display: block;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
}

.time-block.cobalt {
  background: var(--cobalt);
}

.time-block.crimson {
  background: var(--crimson);
}

.time-block.ochre {
  background: var(--ochre);
  color: var(--black);
}

.time-block.black {
  background: var(--black);
}

.time-block.active,
.lane-row.isolated .time-block.active {
  background: var(--black);
  color: var(--substrate);
}

.timeline-canvas.isolating .lane-row:not(.isolated) .time-block {
  background: var(--paper-dark);
  color: var(--soft-ink);
}

.guide-line {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--black);
  pointer-events: none;
}

.annotation {
  position: absolute;
  z-index: 3;
  top: 78px;
  left: 24px;
  width: 360px;
  border: 1px solid var(--black);
  background: var(--substrate);
  padding: 12px;
}

.annotation h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
}

.annotation p:last-child {
  margin-bottom: 0;
  color: var(--soft-ink);
  font-size: 12px;
  line-height: 1.35;
}

.detail-register {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 430px;
  border-top: 1px solid var(--rule);
  background: var(--substrate);
}

.detail-register > * {
  min-height: 94px;
  padding: 14px 18px;
  border-right: 1px solid var(--rule);
}

.detail-register h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
}

.detail-register > p {
  color: var(--soft-ink);
  font-size: 14px;
  line-height: 1.35;
}

.status-register {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0;
}

.status-register span {
  display: grid;
  align-items: center;
  min-height: 94px;
  padding: 12px;
  border-right: 1px solid var(--rule);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-register a {
  color: var(--black);
  text-decoration: none;
}

.release-register {
  display: grid;
  grid-template-columns: 1fr 1fr 430px;
  border-top: 1px solid var(--rule);
  background: var(--substrate);
}

.release-register > div {
  min-height: 104px;
  padding: 14px 18px;
  border-right: 1px solid var(--rule);
}

.release-register p:last-child {
  margin: 0;
  color: var(--black);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.datum-chain,
.package-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.package-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.datum-chain li,
.package-list li {
  min-height: 56px;
  padding: 9px 10px;
  border: 1px solid var(--rule);
  border-right: 0;
  color: var(--black);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.datum-chain li:last-child,
.package-list li:nth-child(2n) {
  border-right: 1px solid var(--rule);
}

.datum-chain span {
  display: block;
  margin-bottom: 5px;
  color: var(--soft-ink);
  font-size: 9px;
}

.process-machine {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 420px;
  border-top: 1px solid var(--rule);
  background: var(--substrate);
}

.process-machine > * {
  min-height: 154px;
  border-right: 1px solid var(--rule);
}

.machine-control,
.machine-event {
  padding: 14px 18px;
}

.machine-control h2,
.machine-event h2 {
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 0.95;
  text-transform: uppercase;
}

.machine-event p:last-child {
  margin: 0;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.35;
}

.machine-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.machine-buttons button,
.agent-cell {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--substrate);
  color: var(--black);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.machine-buttons button:hover,
.agent-cell:hover,
.agent-cell.active {
  background: var(--black);
  color: var(--substrate);
}

.agent-register {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.agent-cell {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 96px;
  padding: 12px 10px;
}

.agent-cell span,
.agent-cell strong,
.agent-cell small {
  display: block;
}

.agent-cell strong {
  color: inherit;
  font-size: 10px;
}

.agent-cell small {
  color: inherit;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  opacity: 0.72;
}

.sim-log {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sim-log li {
  min-height: 30px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  color: var(--black);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.sim-log span {
  display: inline-block;
  min-width: 26px;
  color: var(--soft-ink);
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .tectonic-app {
    min-width: 900px;
  }

  .index-header {
    grid-template-columns: 110px 1fr;
  }

  .header-metrics {
    grid-column: 1 / -1;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .release-register {
    grid-template-columns: 1fr;
  }

  .process-machine {
    grid-template-columns: 1fr;
  }

  .agent-register {
    grid-template-columns: repeat(5, 180px);
    overflow: auto hidden;
  }

  h1 {
    font-size: 42px;
  }
}
