:root {
  color-scheme: light;
  --report-paper: #ffffff;
  --report-canvas: #edf1f5;
  --report-navy: #143964;
  --report-ink: #172235;
  --report-text: #33415a;
  --report-muted: #536273;
  --report-mauve: #a85f9e;
  --report-action: #7d3f76;
  --report-green: #3d6a48;
  --report-green-soft: #edf5ef;
  --report-rule: #cbd4df;
  --report-rule-strong: #8e9caf;
  --report-radius: 3px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--report-canvas); }
body {
  margin: 0;
  color: var(--report-text);
  background: var(--report-canvas);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1rem;
  line-height: 1.55;
}
button, input, textarea { font: inherit; }
button, a { touch-action: manipulation; }
a { color: var(--report-navy); }
a:hover { color: var(--report-action); }
:focus-visible {
  outline: 3px solid var(--report-mauve);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: .6rem .8rem;
  color: var(--report-paper);
  background: var(--report-navy);
  transform: translateY(-180%);
}
.skip-link:focus-visible { transform: translateY(0); }

.shell {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  min-height: 100vh;
  max-width: 90rem;
  margin: 0 auto;
  background: var(--report-paper);
  border-inline: 1px solid var(--report-rule);
}
.rail {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  padding: 1.75rem 1rem;
  color: var(--report-ink);
  background: var(--report-paper);
  border-right: 1px solid var(--report-rule);
}
.brand, .login-brand {
  display: grid;
  gap: .55rem;
  color: var(--report-ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}
.site-logo {
  display: block;
  max-width: 10rem;
  max-height: 2.75rem;
  object-fit: contain;
  object-position: left center;
}
.eyebrow {
  margin: 0;
  color: var(--report-navy);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.35;
  text-transform: uppercase;
}
.rail nav { display: grid; gap: .2rem; }
.rail nav button, .sign-out {
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 2px;
  padding: .65rem .7rem;
  color: var(--report-text);
  background: transparent;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.rail nav button:hover { background: #f5f7fa; }
.rail nav button.active {
  color: var(--report-ink);
  background: var(--report-green-soft);
  border-left-color: var(--report-green);
  font-weight: 700;
}
.sign-out { margin-top: auto; color: var(--report-muted); }

.content {
  min-width: 0;
  width: 100%;
  padding: 2.25rem clamp(1.25rem, 4vw, 3.5rem) 3.5rem;
}
.masthead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: .85rem 0;
  border-block: 3px double var(--report-navy);
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--report-ink); line-height: 1.18; text-wrap: balance; }
h1 { margin-bottom: 0; font-size: clamp(1.8rem, 4vw, 2.35rem); font-weight: 700; }
h2 { margin-bottom: 0; font-size: 1.45rem; }
h3 { margin-bottom: .35rem; font-size: 1.08rem; }
.mode-note, .fine-print { margin: 0; color: var(--report-muted); font-size: .9rem; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.25rem;
  border-block: 1px solid var(--report-rule-strong);
}
.metric-card {
  min-width: 0;
  padding: 1rem 1.1rem;
  background: var(--report-paper);
  border-right: 1px solid var(--report-rule);
}
.metric-card:last-child { border-right: 0; }
.metric-card p { margin-bottom: .25rem; color: var(--report-muted); font-size: .85rem; }
.metric-card strong {
  color: var(--report-navy);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.panel {
  margin-top: 1rem;
  padding: clamp(1.15rem, 2.5vw, 1.75rem);
  background: var(--report-paper);
  border: 1px solid var(--report-rule);
  border-radius: var(--report-radius);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--report-rule);
}
.count {
  display: grid;
  place-items: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding-inline: .45rem;
  color: var(--report-paper);
  background: var(--report-green);
  border-radius: 99px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.activity-list { display: grid; padding: 0; margin: 0; list-style: none; }
.activity-list li {
  display: grid;
  grid-template-columns: minmax(12rem, 1.25fr) minmax(8rem, 1fr) auto;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--report-rule);
}
.activity-list li:last-child { border-bottom: 0; }
.activity-list span, .activity-list time { color: var(--report-muted); }
.activity-list time { font-variant-numeric: tabular-nums; }

.trend-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: .55rem;
  height: 8.5rem;
  margin-top: .25rem;
}
.trend-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  height: 100%;
  min-width: 0;
}
.trend-num {
  color: var(--report-navy);
  font-size: .82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.trend-bar {
  width: 100%;
  max-width: 2.5rem;
  min-height: 3px;
  background: var(--report-green);
  border-radius: 3px 3px 0 0;
}
.trend-day { color: var(--report-muted); font-size: .78rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: .75rem .65rem; border-bottom: 1px solid var(--report-rule); }
th {
  color: var(--report-navy);
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
tbody tr:hover { background: #f7f9fb; }

.library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .85rem; }
.library-item { padding: 1rem; border: 1px solid var(--report-rule); border-radius: 2px; }
.library-item p { margin-bottom: .4rem; color: var(--report-action); font-size: .82rem; font-weight: 700; }
.library-item span { color: var(--report-green); font-size: .85rem; font-weight: 700; }

.editor { max-width: 48rem; }
label { display: block; margin: 1rem 0 .35rem; color: var(--report-ink); font-weight: 700; }
input, textarea {
  width: 100%;
  border: 1px solid var(--report-rule-strong);
  border-radius: var(--report-radius);
  padding: .8rem;
  color: var(--report-ink);
  background: var(--report-paper);
}
input::placeholder, textarea::placeholder { color: var(--report-muted); }
button[type="submit"], #save-draft {
  margin-top: 1rem;
  border: 1px solid var(--report-navy);
  border-radius: var(--report-radius);
  padding: .75rem 1rem;
  color: var(--report-paper);
  background: var(--report-navy);
  font-weight: 700;
  cursor: pointer;
}
button[type="submit"]:hover, #save-draft:hover { background: var(--report-ink); }

.login-body { display: grid; min-height: 100vh; place-items: center; padding: 1.25rem; }
.login-card {
  width: min(100%, 32rem);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  background: var(--report-paper);
  border: 1px solid var(--report-rule-strong);
  border-top: 4px solid var(--report-navy);
  border-radius: 4px;
}
.login-brand { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--report-rule); }
.login-card h1 { margin-bottom: 1rem; font-size: clamp(1.9rem, 8vw, 2.6rem); }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; border: 0; }
  .rail { min-height: auto; padding: 1rem; border-right: 0; border-bottom: 1px solid var(--report-rule); }
  .rail nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sign-out { width: fit-content; margin-top: 0; }
  .content { padding-top: 1.5rem; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--report-rule); }
  .masthead { align-items: start; flex-direction: column; }
  .activity-list li { grid-template-columns: 1fr; gap: .15rem; }
}

@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card, .metric-card:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--report-rule); }
  .metric-card:last-child { border-bottom: 0; }
  .panel-heading { align-items: start; }
}
