:root {
  color-scheme: dark;
  --bg: #081230;
  --surface: #0d1b41;
  --surface-raised: #122248;
  --red: #c72127;
  --text: #f5f6fa;
  --muted: #b7becf;
  --gray: #999999;
  --line: #ffffff16;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0 auto;
  max-width: 1120px;
  padding: env(safe-area-inset-top) 24px
    calc(112px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.65 Manrope,
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: Antonio, "Arial Narrow", sans-serif;
  line-height: 1.2;
  text-wrap: balance;
}
h1 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -1px;
}
h2 {
  font-size: 25px;
  margin: 0 0 20px;
}
h3 {
  font-size: 28px;
  margin: 0 0 8px;
}
p {
  margin: 8px 0;
  text-wrap: pretty;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.brand-logo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}
.brand h1 {
  font:
    700 11px/1.4 Manrope,
    system-ui,
    sans-serif;
  letter-spacing: 2px;
}
.brand h1 span {
  margin-left: 8px;
  padding-left: 10px;
  color: var(--muted);
  border-left: 1px solid var(--line);
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
#account {
  color: var(--muted);
  font-size: 11px;
}
#refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button,
input {
  font: inherit;
}
button {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #ffffff25;
  border-radius: 10px;
  background: #ffffff05;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
button:hover:not(:disabled) {
  background: #ffffff0c;
  border-color: #ffffff50;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--red);
  border-color: var(--red);
  font-weight: 700;
  box-shadow: 0 2px 8px #0002;
}
button.primary:hover:not(:disabled) {
  background: #a91c22;
  border-color: #a91c22;
}
:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid #68748d;
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
}
label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 600;
}
.dashboard-intro {
  padding: 28px 0 20px;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.dashboard-intro h2 {
  font-size: 44px;
  letter-spacing: -0.5px;
  margin: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.metric {
  padding: 20px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border-right: 0;
}
.metric strong {
  font:
    600 28px/1.2 Antonio,
    sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.metric span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.metric.unknown strong {
  font-size: 23px;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.metric:nth-child(5) strong {
  color: #ff888d;
}
#freshness {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  padding: 12px 0;
}
#notice {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid #ffffff25;
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
}
#notice:empty {
  display: none;
}
#main[data-stale="true"] #freshness {
  color: #ffb4b7;
}
nav {
  display: flex;
  gap: 4px;
  padding: 8px;
  border: 1px solid #ffffff25;
  border-radius: 20px;
  background: #0d1b41f5;
  box-shadow: 0 8px 32px #0005;
  position: fixed;
  z-index: 4;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 32px));
}
nav button {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 8px 4px;
  border-color: transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}
nav button[aria-current="page"] {
  color: var(--text);
  background: #ffffff0e;
  border-color: #ffffff10;
}
nav button[aria-current="page"] svg {
  color: #ff888d;
}
section.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 16px 0;
}
section.panel > h2 {
  font-size: 24px;
}
section.next {
  background: var(--surface-raised);
  border-color: #ffffff25;
  box-shadow: 0 8px 24px #0001;
  position: relative;
  overflow: hidden;
}
.next::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red);
}
section.next > h2 {
  color: var(--muted);
  font:
    700 10px/1.4 Manrope,
    sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.next .row {
  padding-top: 0;
  border: 0;
}
.next .row strong {
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.5px;
}
.row {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.row:last-child {
  padding-bottom: 0;
}
.row strong {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}
.row strong,
.row p,
.row small {
  overflow-wrap: anywhere;
}
.row p {
  color: #d4d9e4;
  font-size: 13px;
}
.row .badge + strong {
  margin-top: 12px;
}
.row > small {
  display: block;
  margin-top: 8px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.actions button {
  flex: 1;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--muted);
  border: 1px solid #ffffff20;
  border-radius: 6px;
}
.month-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.month-pair h3 {
  font:
    600 12px/1.6 Manrope,
    sans-serif;
  color: var(--muted);
}
.month-pair strong {
  font:
    600 28px Antonio,
    sans-serif;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#login {
  max-width: 440px;
  padding: 40px 0 16px;
  margin: auto;
}
#login h2 {
  font-size: 40px;
}
#login p {
  color: var(--muted);
}
#signin {
  margin-top: 24px;
  width: 100%;
}
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}
footer button {
  font-size: 12px;
}
footer p {
  width: 100%;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 2px;
  margin: 8px 0;
}
dialog {
  width: calc(100% - 32px);
  max-width: 440px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid #ffffff30;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 64px #0008;
}
dialog::backdrop {
  background: #020817d9;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  background: var(--bg);
  z-index: 5;
  padding: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 767px) {
  body {
    padding-inline: 20px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    padding: 16px;
  }
  .metric:nth-child(2n) {
    border-right: 0;
  }
  .metric:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .metric:nth-child(-n + 2) {
    background: #ffffff03;
  }
  .metric strong {
    font-size: 28px;
  }
  .header-controls {
    flex-direction: column-reverse;
    gap: 4px;
    flex-shrink: 0;
    min-width: 64px;
  }
  #account {
    max-width: 72px;
    text-align: center;
    font-size: 10px;
  }
  #refresh {
    width: 48px;
    padding: 12px;
  }
  #refresh span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  #content {
    padding-bottom: 8px;
  }
  section.panel {
    padding: 20px;
  }
}
@media (max-width: 360px) {
  body {
    padding-inline: 16px;
  }
  .dashboard-intro h2 {
    font-size: 38px;
  }
  .metric {
    padding: 16px 12px;
  }
  .metric strong {
    font-size: 26px;
  }
  .metric.unknown strong {
    font-size: 21px;
  }
  .next .row strong {
    font-size: 19px;
  }
  .actions button {
    padding-inline: 12px;
  }
  nav {
    width: calc(100% - 24px);
    padding: 4px;
    border-radius: 16px;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric:nth-child(2n) {
    border-right: 0;
  }
  .metric:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
@media (min-width: 1024px) {
  body {
    padding-inline: 32px;
  }
  .dashboard-intro {
    padding-top: 36px;
  }
  .dashboard-intro h2 {
    font-size: 52px;
  }
  section.panel {
    padding: 28px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background-color 0.15s ease-out,
      border-color 0.15s ease-out,
      transform 0.15s ease-out;
  }
  button:active:not(:disabled) {
    transform: scale(0.96);
  }
}
@media (prefers-reduced-transparency: reduce) {
  nav {
    background: var(--surface);
  }
}
