:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #8a8a8a;
  --line: #d8d8d8;
  --orange: #ff6a00;
  --sand: #f3ede8;
  --gray-atom: #d4d0cc;
  --font: "Roboto Flex", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  font-variation-settings: "wdth" 100, "opsz" 14;
  line-height: 1.4;
}

#app {
  min-height: 100vh;
}

.page {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.hero {
  margin-bottom: 28px;
}

.hero__title {
  margin: 0;
  font-size: 40px;
  font-weight: 500;
  font-variation-settings: "wdth" 151, "opsz" 40;
  line-height: 1.15;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 40px;
}

.select {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 132px;
}

.select__label {
  color: var(--muted);
  font-size: 12px;
}

.select select {
  width: 100%;
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23111111' d='M0 0h10L5 6z'/></svg>") no-repeat right 10px center;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  appearance: none;
}

.select select:focus {
  outline: 1px solid var(--ink);
  outline-offset: -1px;
}

.reset {
  height: 36px;
  padding: 0 14px;
  border: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.select--view {
  position: relative;
  min-width: 168px;
}

.select__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  background: var(--bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23111111' d='M0 0h10L5 6z'/></svg>") no-repeat right 10px center;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.select--view.is-open .select__btn {
  outline: 1px solid var(--ink);
  outline-offset: -1px;
}

.select__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--ink);
}

.select__menu li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}

.select__menu li:hover,
.select__menu li.is-active {
  background: var(--sand);
}

.swatch {
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.swatches {
  display: flex;
  gap: 2px;
}

.swatches i {
  display: block;
  width: 8px;
  height: 12px;
}

.buildings {
  margin-top: 56px;
}

.buildings__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 20px;
}

.buildings__title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  font-variation-settings: "wdth" 151, "opsz" 24;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  max-width: min(920px, 100%);
}

.legend__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.legend__item:hover,
.legend__item.is-active {
  border-color: var(--ink);
}

.legend__pct {
  color: var(--muted);
}

.legend__shape {
  display: block;
  height: 10px;
  background: #d8d8d8;
  box-sizing: border-box;
}

.legend__shape--1 {
  width: 10px;
}

.legend__shape--2 {
  width: 20px;
}

.legend__shape--3 {
  width: 30px;
}

.legend__shape--sold {
  width: 10px;
  background: #ffffff;
  border: 2.5px solid var(--orange);
}

.chart-shell--buildings {
  min-height: 360px;
}

.chart-shell .floor-label {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 12px;
}

.chart-shell .bldg-name {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 500;
  font-variation-settings: "wdth" 151, "opsz" 18;
}

.chart-shell .bldg-stat,
.chart-shell .bldg-pct {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 12px;
}

.chart-shell .bldg-pct--sold {
  fill: var(--orange);
}

.board {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(300px, 340px);
  grid-template-areas:
    "facts-sold chart-sold mgrs"
    "facts-unsold chart-unsold mgrs";
  gap: 12px 28px;
  align-items: start;
}

.facts--sold {
  grid-area: facts-sold;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
}

.chart-shell--sold {
  grid-area: chart-sold;
  min-height: 220px;
}

.mgrs {
  grid-area: mgrs;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding-top: 8px;
}

.mgrs__label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.facts--unsold {
  grid-area: facts-unsold;
  align-self: start;
  padding-top: 4px;
}

.chart-shell--unsold {
  grid-area: chart-unsold;
  min-height: 80px;
}

.mgr-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.mgr-table th,
.mgr-table td {
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.mgr-table thead th {
  color: var(--muted);
  text-align: right;
  border-bottom: 1px solid var(--line);
}

.mgr-table thead th:first-child {
  text-align: left;
}

.mgr-table tbody th {
  text-align: left;
  font-weight: 500;
  font-variation-settings: "wdth" 151, "opsz" 12;
}

.mgr-table tbody td {
  text-align: right;
}

.mgr-table tbody tr {
  cursor: pointer;
}

.mgr-table tbody tr:hover,
.mgr-table tbody tr.is-active {
  background: var(--sand);
}

.mgr-table tbody tr.is-active th {
  color: var(--orange);
}

.term-table tbody th {
  vertical-align: top;
}

.term-table tbody th .swatch {
  display: inline-block;
  vertical-align: -1px;
  margin-right: 6px;
}

.fact__label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.fact__value {
  margin: 0;
  color: var(--orange);
  font-size: 28px;
  font-weight: 500;
  font-variation-settings: "wdth" 151, "opsz" 28;
  line-height: 1.15;
}

.fact__value--ink {
  color: var(--ink);
}

.fact__sub {
  margin: 6px 0 0;
  font-size: 13px;
}

.fact__tags {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 8px;
  font-size: 12px;
}

.chart-shell {
  min-width: 0;
}

.chart-shell svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.chart-shell .atom {
  cursor: pointer;
}

.chart-shell .week-label {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 12px;
}

.chart-shell .week-count {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  font-variation-settings: "wdth" 151, "opsz" 12;
}

.chart-shell .match-count {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
}

.chart-shell .match-badge {
  fill: #ffffff;
  stroke: var(--ink);
  stroke-width: 1;
}

.chart-shell .axis-line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-shell .trend {
  fill: rgba(255, 106, 0, 0.1);
  stroke: none;
}

.chart-shell .revenue-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  pointer-events: none;
}

.chart-shell .revenue-seg {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  opacity: 0;
  pointer-events: none;
}

.chart-shell .revenue-seg.is-on {
  opacity: 1;
  stroke-width: 2.75;
}

.chart-shell .revenue-seg-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  stroke-linecap: round;
  cursor: pointer;
}

.chart-shell .revenue-dot {
  fill: #ffffff;
  stroke: var(--ink);
  stroke-width: 1.5;
  pointer-events: none;
}

.chart-shell .revenue-label {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  font-variation-settings: "wdth" 151, "opsz" 12;
  pointer-events: none;
}

.status {
  margin: 80px 0;
  color: var(--muted);
  font-size: 16px;
}

.status--error {
  color: var(--orange);
}

.tooltip {
  position: fixed;
  z-index: 30;
  min-width: 248px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--orange);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.08);
  pointer-events: none;
  opacity: 0;
  transform: translate(12px, 12px);
  transition: opacity 0.12s ease;
}

.tooltip--on {
  opacity: 1;
}

.tooltip__id {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  font-variation-settings: "wdth" 151, "opsz" 13;
  color: var(--orange);
}

.tooltip__list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.tooltip__list > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
}

.tooltip dt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.tooltip dd {
  margin: 0;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .board {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas:
      "facts-sold chart-sold"
      "mgrs mgrs"
      "facts-unsold chart-unsold";
  }
}

@media (max-width: 900px) {
  .page {
    width: calc(100% - 32px);
    padding-top: 28px;
  }

  .hero__title {
    font-size: 28px;
    font-variation-settings: "wdth" 151, "opsz" 28;
  }

  .board {
    grid-template-columns: 1fr;
    grid-template-areas:
      "facts-sold"
      "chart-sold"
      "mgrs"
      "facts-unsold"
      "chart-unsold";
  }
}
