:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #17201b;
  --muted: #617066;
  --line: #d9ded8;
  --primary: #166a4f;
  --primary-ink: #ffffff;
  --accent: #c94d2f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 14px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
}
.compact {
  max-width: 460px;
  margin: 10vh auto 0;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; color: var(--muted); }
label { display: grid; gap: 6px; font-weight: 650; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 84px; resize: vertical; }
button, .primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
}
.primary {
  background: var(--primary);
  color: var(--primary-ink);
}
.secondary {
  color: var(--primary);
  background: #eef6f2;
  border-color: #c9ded4;
}
.stack { display: grid; gap: 14px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.topbar p { color: var(--muted); margin-bottom: 0; }
.category { border-top: 1px solid var(--line); padding-top: 10px; }
.category summary {
  cursor: pointer;
  font-weight: 750;
  color: var(--muted);
  min-height: 42px;
  display: flex;
  align-items: center;
}
.quick-list {
  margin-bottom: 16px;
}
.activity-list {
  display: grid;
  gap: 8px;
}
.quick-activity {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}
.search-box {
  margin: 12px 0;
}
.activity {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}
.activity-main {
  grid-template-columns: 28px 1fr;
  align-items: start;
  font-weight: 500;
}
.activity-main input {
  width: 24px;
  height: 24px;
  margin: 0;
}
.activity-main strong { display: inline-block; min-width: 44px; }
.activity-main small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.activity-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}
.time-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}
.time-details summary {
  cursor: pointer;
  font-weight: 650;
}
.time-details select,
.time-details input {
  margin-top: 8px;
}
.is-hidden {
  display: none !important;
}
.sticky-submit {
  position: sticky;
  bottom: 0;
  background: rgba(246, 247, 244, 0.95);
  padding: 10px 0;
}
.sticky-submit .primary { width: 100%; }
.error, .errorlist { color: var(--accent); }
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.metrics strong { display: block; font-size: 1.6rem; }
.metrics span { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
@media (max-width: 640px) {
  .topbar { align-items: stretch; flex-direction: column; }
  .topbar .primary, .actions { width: 100%; }
}
