/* Zest design system. Tokens mirror the Zest system's tokens.json:
   https://claude.ai/artifact/5Ej6fdjiW3K9JQhx9291oL
   Brand colours are exact. Do not re-tint them. */

@font-face { font-family: "Clash Grotesk"; src: url("assets/fonts/ClashGrotesk-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Clash Grotesk"; src: url("assets/fonts/ClashGrotesk-Semibold.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Clash Grotesk"; src: url("assets/fonts/ClashGrotesk-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Zest brand */
  --yellow: #fff700;
  --lime: #01b94a;
  --saffron: #ff5e00;
  --cream: #faeccf;
  --steel: #e7e8ea;
  --charcoal: #1a1a1a;

  /* Roles, light */
  --surface: #ffffff;
  --surface-sunk: #fbfbf8;
  --card: #ffffff;
  --panel: #1a1a1a;
  --on-panel: #ffffff;
  --panel-track: #3a3a3a;
  --ink: #1a1a1a;
  --ink-soft: #5c5c5c;
  --line: #e7e8ea;
  --field: #ffffff;
  --field-line: #c9cacc;
  --nav-active-bg: #1a1a1a;
  --nav-active-ink: #ffffff;
  --badge-ink: #1a1a1a;

  --radius-card: 20px;
  --radius-panel: 28px;
  --radius-pill: 999px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #141414;
    --surface-sunk: #101010;
    --card: #1f1f1f;
    --panel: #000000;
    --panel-track: #333333;
    --ink: #f4f4f2;
    --ink-soft: #a5a5a2;
    --line: #313131;
    --field: #1f1f1f;
    --field-line: #4a4a4a;
    --nav-active-bg: #ffffff;
    --nav-active-ink: #1a1a1a;
    --steel: #2c2c2c;
    --cream: #4a4030;
    --badge-ink: #f4f4f2;
  }
}
:root[data-theme="dark"] {
  --surface: #141414;
  --surface-sunk: #101010;
  --card: #1f1f1f;
  --panel: #000000;
  --panel-track: #333333;
  --ink: #f4f4f2;
  --ink-soft: #a5a5a2;
  --line: #313131;
  --field: #1f1f1f;
  --field-line: #4a4a4a;
  --nav-active-bg: #ffffff;
  --nav-active-ink: #1a1a1a;
  --steel: #2c2c2c;
  --cream: #4a4030;
  --badge-ink: #f4f4f2;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--surface);
  color: var(--ink);
  font-family: "Clash Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 4px; }

.app { display: flex; min-height: 100%; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.brand {
  width: 64px; height: 64px; margin-left: 10px;
  background-image: url("assets/zest-icon-black-yellow.png");
  background-repeat: no-repeat; background-position: left center; background-size: contain;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand { background-image: url("assets/zest-icon-yellow-black.png"); }
}
:root[data-theme="dark"] .brand { background-image: url("assets/zest-icon-yellow-black.png"); }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 14px 20px; border: none; border-radius: var(--radius-pill);
  background: transparent; font-size: 16px; font-weight: 500; cursor: pointer; text-align: left;
}
.nav button:hover { background: var(--surface-sunk); }
.nav button[aria-current="true"] { background: var(--nav-active-bg); color: var(--nav-active-ink); font-weight: 600; }
.nav .count { font-size: 14px; opacity: 0.65; font-variant-numeric: tabular-nums; }

main { flex-grow: 1; min-width: 0; padding: 44px 48px 64px; }
.inner { max-width: 820px; display: flex; flex-direction: column; gap: 26px; }

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 40px; line-height: 1.02; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.date { margin: 8px 0 0; font-size: 16px; font-weight: 500; color: var(--ink-soft); }

.primary {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 15px 26px; border: none; border-radius: var(--radius-pill);
  background: var(--yellow); color: #1a1a1a;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.primary:hover { filter: brightness(0.95); }

.progress {
  background: var(--panel); color: var(--on-panel);
  border-radius: var(--radius-panel); padding: 28px 30px;
  display: flex; flex-direction: column; gap: 18px;
}
.progress .top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: #c9c9c9; }
.progress .line { font-size: 28px; font-weight: 700; line-height: 1; margin-top: 9px; }
.pct { font-size: 44px; font-weight: 700; line-height: 1; color: var(--lime); font-variant-numeric: tabular-nums; }
.track { height: 12px; border-radius: var(--radius-pill); background: var(--panel-track); overflow: hidden; }
.fill { height: 100%; border-radius: var(--radius-pill); background: var(--lime); transition: width 240ms ease; }
@media (prefers-reduced-motion: reduce) { .fill { transition: none; } }

.form {
  border: 2px solid var(--ink); border-radius: 26px; padding: 24px 26px;
  display: flex; flex-direction: column; gap: 18px; background: var(--card);
}
.form h2 { margin: 0; font-size: 19px; font-weight: 700; }
.fields { display: flex; gap: 14px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.grow { flex: 1 1 240px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select {
  height: 50px; padding: 0 16px; border: 1px solid var(--field-line);
  border-radius: var(--radius-pill); background: var(--field);
}
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.ghost {
  padding: 14px 24px; border: 1px solid var(--ink); border-radius: var(--radius-pill);
  background: transparent; font-size: 15px; font-weight: 600; cursor: pointer;
}

.list { display: flex; flex-direction: column; gap: 12px; }
.task {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--card);
}
.task.done { background: var(--surface-sunk); }
.task label { display: flex; align-items: center; gap: 15px; flex-grow: 1; min-width: 0; cursor: pointer; }
.task input[type="checkbox"] { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--ink); cursor: pointer; }
.task .title { font-size: 17px; font-weight: 600; word-break: break-word; }
.task.done .title { text-decoration: line-through; color: var(--ink-soft); }
.meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.badge { padding: 6px 13px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--badge-ink); }
.badge.high { background: var(--saffron); color: #1a1a1a; }
.badge.medium { background: var(--cream); }
.badge.low { background: var(--steel); }
.when { font-size: 15px; font-weight: 500; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.remove {
  width: 34px; height: 34px; border: none; border-radius: var(--radius-pill); background: transparent;
  color: var(--ink-soft); cursor: pointer; display: grid; place-items: center;
}
.remove:hover { background: var(--steel); color: var(--ink); }

.empty {
  border: 1px dashed var(--line); border-radius: var(--radius-card); padding: 34px 26px;
  text-align: center; color: var(--ink-soft); font-size: 16px;
}
.notice { border-radius: 16px; padding: 14px 18px; background: var(--cream); color: #1a1a1a; font-size: 14px; font-weight: 500; }

.tabbar { display: none; }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { display: none; }
  main { padding: 26px 16px 120px; }
  h1 { font-size: 30px; }
  .primary { width: 100%; justify-content: center; }
  .head { flex-direction: column; align-items: stretch; }
  .progress { border-radius: 24px; padding: 22px; }
  .progress .line { font-size: 21px; }
  .pct { font-size: 30px; }
  .task { flex-wrap: wrap; }
  .task label { flex-basis: 100%; }
  .meta { margin-left: 37px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
  }
  .tabbar button {
    flex: 1 1 0; padding: 12px 6px; border: none; border-radius: var(--radius-pill);
    background: transparent; font-size: 15px; font-weight: 500; cursor: pointer;
  }
  .tabbar button[aria-current="true"] { background: var(--nav-active-bg); color: var(--nav-active-ink); font-weight: 600; }
}
