:root {
  color-scheme: light;
  --paper: #f7f7f2;
  --ink: #232922;
  --muted: #596257;
  --green: #456a43;
  --line: #d9ddd2;
  --chart: #547952;
  --chart-muted: #c5d3be;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}
[hidden] { display: none !important; }
a { color: inherit; }

.site-header, main {
  width: min(calc(100% - 36px), 1000px);
  margin-inline: auto;
}
.site-header { padding: 23px 0; border-bottom: 1px solid var(--line); }
.site-header a { color: var(--green); text-underline-offset: 4px; }
main { padding-block: 36px 50px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px, 5vw, 43px); letter-spacing: -.04em; line-height: 1.25; }
h2 { font-size: 18px; }
.dashboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
#data-date, #status, .scope, .axis, .chart-caption, .notices { color: var(--muted); }
#data-date { margin-top: 7px; font-size: 14px; }
#status { margin: 0 0 15px; font-size: 14px; }
button {
  min-height: 44px;
  padding: 0 15px;
  background: var(--paper);
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}
button:disabled { opacity: .65; cursor: wait; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.metric {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px 20px;
  background: #fdfdf9;
}
.metric:first-child { grid-column: 1 / -1; }
.purpose { font-size: 14px; }
.value { margin-top: 2px; font-size: clamp(17px, 3vw, 24px); font-weight: 650; overflow-wrap: anywhere; }
.value, #data-date, .axis, .chart-caption { font-variant-numeric: tabular-nums; }
.scope, .axis, .chart-caption, .notices { font-size: 13px; }
.plot { margin-block: 9px 3px; }
.chart-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
}
.axis { display: flex; flex-direction: column; justify-content: space-between; text-align: right; }
.bars {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  gap: 3px;
  height: 112px;
}
.bar { display: block; background: var(--chart-muted); border-radius: 2px 2px 0 0; }
.bar:last-of-type { background: var(--chart); }
.average {
  position: absolute;
  inset-inline: 0;
  border-top: 1px dashed var(--green);
  pointer-events: none;
}
.chart-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 14px; margin-top: 6px; }
.distribution { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); }
.distribution .up { background: #b75548; }
.distribution .down { background: var(--chart); }
.distribution .flat { background: var(--line); }
.distribution .opened { background: #b57928; }
.finance-previous { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.notices { padding-left: 21px; margin-top: 17px; }

@media (max-width: 570px) {
  main { padding-top: 27px; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .metric { padding-inline: 14px; }
}
