:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #18221f;
  background: #f3f7f5;
  font-size: 16px;
  line-height: 1.5;
  --ink: #18221f;
  --muted: #53645e;
  --line: #d7e1dc;
  --surface: #fff;
  --teal: #075e57;
  --amber: #92400e;
  --amber-bg: #fff4d4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { min-height: 48px; border: 1px solid #aabbb4; border-radius: 7px; padding: 10px 14px; color: var(--ink); background: var(--surface); font-weight: 750; cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, input:focus-visible + span { outline: 3px solid #2563eb; outline-offset: 2px; }
.shell { width: min(100%, 1100px); margin: 0 auto; padding: 20px 16px 40px; }
.masthead { display: grid; gap: 8px; margin-bottom: 16px; }
.masthead h1 { margin: 0; font-size: 1.75rem; line-height: 1.15; }
.masthead p { margin: 0; }
.eyebrow { color: var(--teal); font-size: .78rem; font-weight: 850; text-transform: uppercase; }
.notice { border: 1px solid #e3c975; border-radius: 7px; padding: 10px 12px; background: var(--amber-bg); color: #57390c; font-weight: 700; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--surface); }
.panel h2, .panel h3 { margin: 0 0 8px; line-height: 1.25; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 14px; }
.choice-list { display: grid; gap: 4px; margin: 8px 0; padding: 0; border: 0; }
.choice { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; padding: 10px 8px; border-bottom: 1px solid #e9efec; cursor: pointer; }
.choice input { width: 20px; height: 20px; flex: 0 0 20px; margin: 2px 0 0; accent-color: var(--teal); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions button { flex: 1 1 180px; }
.primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.quiet { background: transparent; }
.status { min-height: 24px; color: var(--muted); }
.task-grid { display: grid; gap: 14px; }
.task-grid.calendar-task { grid-template-columns: minmax(0, 1fr); }
.task-prompt { border-left: 4px solid var(--teal); padding: 10px 12px; background: #edf5f2; }
.mock { border: 1px solid var(--line); border-radius: 7px; background: #fbfdfc; padding: 12px; }
.mock-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mock h3 { font-size: 1.05rem; }
.badge { display: inline-flex; align-items: center; min-height: 28px; border-radius: 5px; padding: 4px 8px; background: #fff0c2; color: #713b0d; font-size: .8rem; font-weight: 850; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.metric { min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 8px; background: #fff; }
.metric small { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; }
.metric strong { display: block; overflow-wrap: anywhere; font-size: 1rem; }
.rows { display: grid; gap: 6px; margin: 8px 0; }
.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 1px solid #e5ece8; padding: 9px 4px; }
.row-main { min-width: 0; }
.row strong, .row span { display: block; }
.row span { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.row .amount { flex: 0 0 auto; text-align: right; font-weight: 850; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-week, .calendar-title-week { display: none; }
.calendar > span { min-width: 0; min-height: 45px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .7rem; overflow-wrap: anywhere; }
.calendar .day-label { min-height: 28px; text-align: center; color: var(--muted); font-weight: 800; }
.calendar .marked { background: #e5f2ed; font-weight: 800; }
.calendar .day-event { display: block; color: var(--teal); font-size: .58rem; line-height: 1.1; }
.locked-field { display: grid; gap: 4px; margin: 10px 0; color: var(--muted); font-size: .88rem; }
.locked-field input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 6px; padding: 9px; background: #edf1ef; color: var(--ink); opacity: 1; }
.inline-note { border-radius: 6px; padding: 9px 10px; background: #edf5f2; }
.progress { height: 8px; overflow: hidden; border-radius: 5px; background: #e4ebe7; }
.progress span { display: block; height: 100%; background: var(--teal); }
.task-top { display: grid; gap: 8px; }
.task-label { color: var(--muted); font-size: .84rem; font-weight: 800; }
.end-state { text-align: center; padding: 28px 12px; }
.end-state h2 { font-size: 1.5rem; }
footer { padding: 18px 2px 0; color: var(--muted); font-size: .8rem; }

@media (min-width: 800px) {
  .shell { padding: 28px 24px 52px; }
  .masthead { margin-bottom: 20px; }
  .masthead h1 { font-size: 2rem; }
  .panel { padding: 22px; }
  .task-grid { grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr); align-items: start; }
}

@media (max-width: 380px) {
  .shell { padding: 14px 10px 28px; }
  .masthead h1 { font-size: 1.5rem; }
  .panel { padding: 12px; }
  .metrics { grid-template-columns: 1fr; }
  .calendar > span { min-height: 40px; padding: 3px; font-size: .68rem; }
  .calendar .day-event { font-size: .52rem; }
  .actions button { flex-basis: 100%; }
}

@media (max-width: 599px) {
  .calendar-month, .calendar-title-month { display: none; }
  .calendar-week { display: grid; }
  .calendar-title-week { display: block; }
}
