:root {
  color-scheme: light;
  --surface: #fcfcfb;
  --surface-2: #f3f2ef;
  --border: #e3e2de;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #7a7974;
  --link: #2a78d6;
  --good: #0a7d3b;
  --bad: #c0392b;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --surface: #1a1a19;
    --surface-2: #242423;
    --border: #383835;
    --text: #ffffff;
    --text-2: #c3c2b7;
    --muted: #97968d;
    --link: #3987e5;
    --good: #4cc47e;
    --bad: #ef7a6d;
  }
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font:
    15px/1.5 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}
main,
.top,
footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}
footer {
  font-size: 13px;
  padding-top: 32px;
  padding-bottom: 32px;
}
a {
  color: var(--link);
}
.muted {
  color: var(--muted);
}
h1 {
  font-size: 26px;
  margin: 16px 0 4px;
}
h2 {
  font-size: 17px;
  margin: 32px 0 10px;
}
.up {
  color: var(--good);
}
.down {
  color: var(--bad);
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.card p {
  margin: 0;
}
.card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.card li {
  margin: 4px 0;
}

/* Key data on the stock page */
.keydata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.keydata .label {
  font-size: 12px;
  color: var(--muted);
}
.keydata .value {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 9px 12px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
th:first-child,
td:first-child {
  text-align: left;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--surface-2);
}

/* Financials: the line-item column stays visible while the quarters scroll sideways. */
.financials th:first-child,
.financials td:first-child {
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 1;
}
.financials thead th:first-child,
.financials tr.group td {
  background: var(--surface-2);
}
.financials tr.group td {
  font-weight: 600;
  color: var(--text-2);
  font-size: 13px;
}
.financials .yoy {
  border-left: 1px solid var(--border);
}
.financials th a {
  color: inherit;
}

.back {
  display: inline-block;
  margin-top: 12px;
  text-decoration: none;
}
.empty {
  text-align: center;
  padding: 32px 16px;
}
