:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: #f3f5f1;
  color: #18282a;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.shell { max-width: 920px; margin: 0 auto; padding: 24px 16px 110px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.eyebrow { display: block; color: #557176; font-size: .72rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 5px 0 0; font-size: clamp(2rem, 7vw, 3.15rem); line-height: 1.06; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.1rem; letter-spacing: -.02em; }
h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
p { line-height: 1.5; }
.intro { color: #5c6c6b; margin: 0 0 22px; }
.topbar .text-button { margin-top: 5px; }
.text-button, .text-link { border: 0; padding: 0; background: none; color: #176b60; font-weight: 650; text-decoration: none; }
.text-link { display: inline-block; margin-top: 10px; }
.text-button:hover, .text-link:hover { text-decoration: underline; }
.panel, .card, .metric-card { background: #fff; border: 1px solid #e0e7e1; border-radius: 17px; box-shadow: 0 2px 12px rgba(20, 45, 40, .035); }
.panel { padding: 18px; margin-bottom: 15px; }
.panel h2 { margin-bottom: 14px; }
.card { padding: 17px; margin: 10px 0; }
.card-head, .task-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.task-card form { flex: 0 0 auto; }
.task-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin-top: 14px; }
.task-actions .inline-form { flex: 1 1 240px; }
.task-actions input { max-width: 220px; }
.card .meta { color: #6c7a76; font-size: .84rem; margin: 5px 0 0; }
.section-block { margin: 28px 0 35px; }
.section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 30px; background: #dceae3; color: #236357; font-size: .78rem; font-weight: 750; }
.subheading { font-size: .82rem; color: #58706d; text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 8px; }
.empty { color: #72807b; font-size: .95rem; margin: 13px 0; }
.badge { display: inline-block; flex: 0 0 auto; border-radius: 30px; background: #d9efe4; color: #22614f; font-size: .72rem; font-weight: 700; padding: 5px 9px; }
.muted-badge { background: #e7ebe8; color: #687571; }
.done-card { opacity: .66; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #b8d0c4; border-radius: 10px; background: #e6f2eb; color: #174d3d; font-weight: 700; min-height: 44px; padding: 9px 15px; white-space: nowrap; }
.button:hover { background: #d5ebdc; }
.button.primary { border-color: #176654; background: #176654; color: #fff; }
.button.primary:hover { background: #0f5446; }
.button.small { min-height: 37px; padding: 7px 11px; font-size: .83rem; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #c9d5ce; border-radius: 10px; background: #fff; color: #18282a; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #89cdb2; outline-offset: 2px; }
label { display: block; font-size: .87rem; font-weight: 650; }
label > input, label > select, label > textarea { margin-top: 6px; }
.stack { display: flex; flex-direction: column; align-items: stretch; gap: 13px; }
.stack .button { align-self: flex-start; }
.stack.compact { gap: 11px; margin-top: 15px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 9px; }
.inline-form input { flex: 1 1 230px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.hint { color: #687873; font-size: .8rem; margin: 0; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.4; }
.check-row input { width: 19px; height: 19px; margin: 1px 0 0; accent-color: #176654; }
.check-row span { flex: 1; }
.create-panel summary { cursor: pointer; font-weight: 700; }
.create-panel .form-body { margin-top: 18px; }
.discard-form { margin-top: 12px; }
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric-card { display: flex; flex-direction: column; padding: 17px; text-decoration: none; }
.metric-card strong { font-size: 1.9rem; line-height: 1; color: #176654; }
.metric-card span { margin-top: 8px; color: #60736d; font-size: .8rem; }
.notice { padding: 12px 15px; margin: 0 0 20px; border: 1px solid #aed7bb; background: #e5f5e9; color: #24543a; border-radius: 11px; }
.notice-error { border-color: #efc2b4; background: #fff0e9; color: #8a3a24; }
.bottom-nav { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: #fff; border-top: 1px solid #dce5de; padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)); box-shadow: 0 -5px 25px rgba(20, 40, 34, .05); }
.bottom-nav a { position: relative; display: flex; flex: 1 1 0; max-width: 160px; flex-direction: column; align-items: center; gap: 3px; padding: 7px 3px; border-radius: 11px; font-size: .71rem; font-weight: 650; text-decoration: none; color: #687a71; }
.bottom-nav a span { font-size: 1.2rem; line-height: 1.15; }
.bottom-nav a[aria-current="page"] { background: #e9f3eb; color: #176654; }
.bottom-nav small { position: absolute; top: 1px; right: 15%; min-width: 17px; padding: 1px 4px; border-radius: 20px; background: #176654; color: white; font-size: .62rem; text-align: center; }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: #e8f1e9; }
.login-card { width: min(100%, 400px); padding: 28px; border: 1px solid #d5e4d7; border-radius: 20px; background: #fff; box-shadow: 0 18px 55px rgba(21, 54, 43, .08); }
.login-card p { color: #62736e; margin-bottom: 24px; }
.login-card .button { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 640px) {
  .shell { padding: 42px 28px 125px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .panel { padding: 23px; }
  .card { padding: 21px; }
}
