:root {
  --ink: #26362e;
  --muted: #7c8780;
  --line: #e4e5dd;
  --paper: #ffffff;
  --canvas: #f5f6f2;
  --green: #1d3b32;
  --green-2: #294b3c;
  --lime: #e8f0d1;
  --lime-ink: #456243;
  --violet: #eee8fb;
  --violet-ink: #68569b;
  --orange: #f9eadb;
  --orange-ink: #a1673b;
  --radius: 20px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a, select, input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.app { min-height: 100vh; }
.sidebar { display: none; }
.main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px calc(92px + var(--safe-bottom));
}

.brand { display: flex; gap: 11px; align-items: center; }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: #d9f96d;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.08em;
}
.brand strong { display: block; font-size: 14px; }
.brand small { display: block; margin-top: 3px; color: #8b948e; font-size: 10px; }
.eyebrow { margin: 0 0 12px; color: #a0a7a1; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

.topbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 20px;
}
.topbar h1 { margin: 8px 0 8px; font-size: clamp(32px, 10vw, 44px); line-height: .98; letter-spacing: -.07em; }
.topbar p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.label { display: flex; align-items: center; gap: 8px; color: #87918a; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.label:before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b8d06f; }
.actions { display: flex; gap: 8px; width: 100%; }
.actions > * { min-width: 0; }
.btn {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--green);
  color: #f6f7f0;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease;
}
.btn:active { transform: scale(.98); }
.btn:hover { background: var(--green-2); }
.btn.light { border: 1px solid #dedfd7; background: var(--paper); color: #647169; }

.grid-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px;
  background: var(--paper);
  box-shadow: 0 8px 26px rgba(38, 54, 46, .035);
}
.hero { grid-column: 1 / -1; min-height: 160px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; border: 0; background: var(--green); color: #f6f7f0; }
.hero:after { content: ""; position: absolute; width: 180px; height: 180px; border: 24px solid #385b45; border-radius: 50%; right: -80px; top: -85px; }
.hero .muted { color: #b9cbb8; }
.hero .big { font-size: 48px; font-weight: 750; letter-spacing: -.08em; }
.hero .bar { height: 6px; overflow: hidden; border-radius: 8px; background: #395a48; }
.hero .bar i { display: block; width: 22%; height: 100%; background: #d9f96d; }
.metric { min-height: 104px; padding: 13px; }
.metric .icon { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 10px; background: #f3f5ef; color: #6f9164; font-size: 15px; }
.metric small, .metric em { display: block; color: #8b948e; font-size: 10px; }
.metric strong { display: block; margin-top: 3px; font-size: 19px; letter-spacing: -.05em; }
.metric em { display: block; overflow: hidden; margin-top: 5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.content-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.commitment-card { overflow: hidden; }
.commitment-percent { color: var(--forest); font-size: 24px; letter-spacing: -.06em; }
.commitment-bar { height: 9px; overflow: hidden; border-radius: 20px; background: #e9eee4; }
.commitment-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a9c55e, #526f5a); }
.commitment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.commitment-grid div { padding: 10px; border-radius: 12px; background: #f7f8f3; }
.commitment-grid small { display: block; color: #89938c; font-size: 9px; }
.commitment-grid strong { display: block; margin-top: 4px; color: var(--ink); font-size: 15px; }
.commitment-note, .commitment-warning { margin: 14px 0 0; color: #89938c; font-size: 10px; line-height: 1.5; }
.commitment-warning { color: #a45e4d; font-weight: 700; }
.calendar-card { overflow: hidden; }
.calendar-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(66px, 1fr); gap: 7px; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: none; }
.calendar-strip::-webkit-scrollbar { display: none; }
.calendar-day { display: grid; min-height: 76px; place-items: center; align-content: center; gap: 4px; border: 1px solid transparent; border-radius: 14px; color: #89938c; text-decoration: none; }
.calendar-day small { font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.calendar-day strong { color: var(--ink); font-size: 21px; letter-spacing: -.06em; }
.calendar-day span { font-size: 9px; }
.calendar-day.selected { border-color: #cfddb1; background: var(--lime); color: var(--lime-ink); }
.calendar-day.selected strong { color: var(--lime-ink); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; font-size: 19px; letter-spacing: -.05em; }
.card-head p { margin: 5px 0 0; color: #8b948e; font-size: 11px; line-height: 1.4; }
.live { display: inline-flex; white-space: nowrap; border-radius: 30px; padding: 6px 8px; background: #eef3df; color: #63764b; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.task { display: grid; grid-template-columns: 42px 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 62px; padding: 10px 6px; border-radius: 14px; text-decoration: none; }
.task:active, .task:hover, .task.selected { background: #f3f6ea; }
.edit-link { display: block; margin: -4px 0 8px 54px; color: #6f9164; font-size: 10px; font-weight: 750; text-decoration: none; }
.edit-link:active, .edit-link:hover { text-decoration: underline; }
.task-actions { display: flex; align-items: center; gap: 12px; margin: -4px 0 9px 54px; }
.task-actions .edit-link { margin: 0; }
.task-actions form { margin: 0; }
.delete-link { border: 0; padding: 0; background: transparent; color: #a45e4d; font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; }
.task-time { text-align: right; color: #9aa39c; font-size: 10px; }
.dot { width: 12px; height: 12px; border: 2px solid #cdd3c9; border-radius: 50%; position: relative; }
.dot:after { content: ""; position: absolute; top: 10px; left: 3px; width: 1px; height: 40px; background: #e7e9e1; }
.task:last-child .dot:after { display: none; }
.task-main { min-width: 0; }
.task-main strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.task-main small { display: block; overflow: hidden; margin-top: 4px; color: #99a19b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; border-radius: 8px; padding: 5px 7px; background: var(--violet); color: var(--violet-ink); font-size: 9px; font-weight: 750; }
.tag.orange { background: var(--orange); color: var(--orange-ink); }
.tag.lime { background: var(--lime); color: var(--lime-ink); }
.side-stack { display: grid; gap: 14px; }
.focus { border: 0; background: var(--lime); }
.focus h2 { margin: 9px 0; font-size: 23px; letter-spacing: -.06em; }
.focus .meta { color: #70826b; font-size: 11px; }
.focus .timer { display: flex; justify-content: space-between; margin-top: 12px; padding: 10px 12px; border-radius: 11px; background: #dbe9bd; color: #58734d; font-size: 11px; }
.signal .signal-row { display: flex; gap: 11px; }
.signal-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 11px; background: var(--orange); color: var(--orange-ink); }
.signal strong { font-size: 12px; }
.signal p { margin: 5px 0 0; color: #8a938d; font-size: 11px; line-height: 1.5; }
.resolve { width: 100%; min-height: 42px; margin-top: 13px; border: 0; background: transparent; color: #718078; font-size: 11px; text-align: left; cursor: pointer; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { padding: 14px; }
.mini strong { display: block; font-size: 17px; }
.mini small { display: block; margin-top: 7px; color: #8b948e; font-size: 10px; }
.footer-note { margin-top: 18px; color: #a0a7a1; font-size: 10px; text-align: center; }

.mobile-nav {
  position: fixed;
  z-index: 20;
  right: 12px;
  bottom: calc(10px + var(--safe-bottom));
  left: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(228, 229, 221, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 35px rgba(38, 54, 46, .12);
  backdrop-filter: blur(16px);
}
.mobile-nav a { display: grid; min-height: 48px; place-items: center; border-radius: 14px; color: #8b948e; font-size: 10px; font-weight: 750; text-decoration: none; }
.mobile-nav a.active { background: var(--lime); color: var(--lime-ink); }

@media (min-width: 700px) {
  .main { padding: 32px 24px 48px; }
  .topbar { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .topbar .actions { width: auto; }
  .content-grid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 18px; }
  .mobile-nav { display: none; }
}

@media (min-width: 1050px) {
  .app { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
  .sidebar { display: flex; flex-direction: column; padding: 26px 16px; border-right: 1px solid var(--line); background: #fbfbf8; }
  .sidebar .brand { margin: 0 10px 44px; }
  .sidebar .nav { display: grid; gap: 5px; }
  .sidebar .nav a { padding: 12px; border-radius: 12px; color: #6e7972; font-size: 13px; font-weight: 600; text-decoration: none; }
  .sidebar .nav a.active, .sidebar .nav a:hover { background: var(--lime); color: #284c3e; }
  .profile { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--line); color: #58665e; font-size: 12px; }
  .profile span { display: block; margin-top: 3px; color: #97a09a; font-size: 11px; }
  .main { max-width: 1500px; padding: 38px clamp(24px, 4vw, 60px); }
  .grid-metrics { grid-template-columns: 1.6fr repeat(3, 1fr); gap: 14px; }
  .hero { grid-column: auto; }
  .metric { min-height: 165px; padding: 22px; }
  .metric .icon { width: 36px; height: 36px; margin-bottom: 27px; }
}
