.page-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
}
.date-circle {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.date-circle strong {
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: -.04em;
}
.date-text {
  padding-right: 1.5rem;
  border-right: 1px solid #d9d9d5;
  color: var(--text-soft);
  line-height: 1.4;
}
.page-title h1 {
  margin: 0;
}
.page-title p {
  margin: .25rem 0 0;
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.dash-card {
  padding: 1.75rem 2rem;
  background: var(--card);
  border-radius: var(--r-lg);
}
.dash-card-wide {
  grid-column: 1 / -1;
}
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.dash-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.dash-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.dash-label {
  margin: 0 0 .5rem;
  color: var(--muted);
}
.dash-figure {
  margin: 0;
  font-size: 3.25rem;
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dash-figure span {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.dash-figure.is-under {
  color: var(--accent);
}
.dash-note {
  margin: .75rem 0 0;
  color: var(--muted);
}

.ring {
  --size: 7rem;
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(var(--ink) calc(var(--p) * 1%), #ebebe8 0);
}
.ring::before {
  content: "";
  position: absolute;
  inset: .7rem;
  border-radius: 50%;
  background: var(--card);
}
.ring span {
  position: relative;
  font-size: 1.05rem;
  font-weight: 600;
}
.ring.is-under {
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #ebebe8 0);
}
.ring-lg {
  --size: 8rem;
}

.dash-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 1.4rem;
  border-radius: 18px;
  background: var(--panel);
}
.dash-foot span {
  color: var(--muted);
}
.dash-foot strong {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.year-compare {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.year-col {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: 22px;
  background: var(--panel);
}
.year-col.is-current {
  background: var(--ink);
  color: #fff;
}
.year-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 1.9rem;
  margin-bottom: 1.25rem;
}
.year-name {
  color: var(--muted);
  font-weight: 500;
}
.year-col.is-current .year-name {
  color: #c9c9c6;
}
.year-amount {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.delta {
  white-space: nowrap;
  align-self: flex-start;
  margin: .75rem 0 1.5rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.delta.is-up {
  background: #e8e8e5;
  color: var(--ink);
}
.delta.is-down {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.delta.is-none {
  padding-top: .2rem;
  padding-bottom: .2rem;
}

.year-forecast {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: #1c1c1b;
}
.year-forecast-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #a5a5a2;
}
.year-forecast strong {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.year-forecast .delta {
  margin: .25rem 0;
}
.year-forecast small {
  color: #a5a5a2;
}
.year-col.is-current .delta.is-up {
  background: #2e2e2d;
  color: #fff;
}
.year-bar {
  position: relative;
  height: .5rem;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  background: #e6e6e3;
  overflow: hidden;
}
.year-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--ink);
}
.year-bar span.is-forecast {
  background: rgba(234, 77, 73, .35);
}
.year-col.is-current .year-bar {
  background: #2e2e2d;
}
.year-col.is-current .year-bar span {
  background: var(--accent);
}

.year-facts {
  margin: auto 0 0;
}
.year-facts div {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem 0;
  border-top: 1px solid #e2e2df;
}
.year-col.is-current .year-facts div {
  border-top-color: #2e2e2d;
}
.year-facts dt {
  white-space: nowrap;
  color: var(--muted);
}
.year-facts dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .year-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dash-card {
    min-width: 0;
    padding: 1.4rem;
  }
  .date-circle {
    width: 4.25rem;
    height: 4.25rem;
  }
  .date-circle strong {
    font-size: 1.75rem;
  }
  .date-text {
    padding-right: 0;
    border-right: 0;
  }
  .dash-figure {
    font-size: 2.5rem;
  }
  .ring,
  .ring-lg {
    --size: 5.5rem;
  }
  .dash-foot {
    flex-wrap: wrap;
    gap: .25rem 1rem;
  }
  .dash-foot strong {
    text-align: left;
  }
}
@media (max-width: 560px) {
  .year-compare {
    grid-template-columns: minmax(0, 1fr);
  }
}
