/* David's Projects — same warm palette family as Penny's Lookbook
   (cream / paper / warm brown / burgundy), single column, mobile-first:
   he reads this on his phone. Steps are rows, not cards in a grid, so
   the order and the per-step statuses scan top to bottom. */
:root {
  --cream: #faf5ee;
  --paper: #fffdf9;
  --pink: #f6dfe4;
  --pink-deep: #e8b7c3;
  --brown: #4a3428;
  --brown-soft: #7a6353;
  --burgundy: #7a2230;
  --burgundy-dark: #5f1a25;
  --line: #e7d9c8;
  --gold: #b98a2f;
  --st-not-started: #8a7a6a;
  --st-in-progress: #b98a2f;
  --st-waiting: #7a5aa0;
  --st-done: #3e7d4e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}
.site-header {
  padding: 18px 20px 12px;
  border-bottom: 3px double var(--pink-deep);
  background: var(--paper);
}
.site-header h1 { margin: 0; font-size: 28px; color: var(--burgundy); letter-spacing: .2px; }
.tagline { margin: 2px 0 0; color: var(--brown-soft); font-style: italic; font-size: 15px; }

.main { padding: 18px 16px 30px; max-width: 760px; margin: 0 auto; }
.status-line { color: var(--brown-soft); font-style: italic; }
.status-line.error { color: var(--burgundy); font-style: normal; }

/* --- home: project cards --- */
.project-card {
  display: block; width: 100%; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--burgundy);
  border-radius: 12px; padding: 14px 16px; margin: 0 0 14px;
  font: inherit; color: inherit; cursor: pointer;
}
.project-card:hover { background: #fff; border-color: var(--pink-deep); }
.project-card h2 { margin: 0 0 4px; font-size: 21px; color: var(--burgundy); }
.project-card .summary { margin: 0 0 10px; line-height: 1.45; }
.progress-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.progress-bar { flex: 1; height: 10px; background: var(--pink); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--burgundy); border-radius: 999px; }
.progress-text { font-size: 14px; color: var(--brown-soft); white-space: nowrap; }
.next-step { margin: 6px 0 0; font-size: 15px; }
.next-step strong { color: var(--burgundy-dark); }

/* --- status chips --- */
.chip {
  display: inline-block; border-radius: 999px; padding: 2px 10px;
  font-size: 13px; font-weight: bold; letter-spacing: .2px; white-space: nowrap;
  color: #fff; background: var(--st-not-started);
}
.chip.not_started { background: var(--st-not-started); }
.chip.in_progress { background: var(--st-in-progress); }
.chip.waiting { background: var(--st-waiting); }
.chip.done { background: var(--st-done); }

/* --- project page --- */
.back-link {
  display: inline-block; margin-bottom: 12px; color: var(--burgundy);
  font-size: 16px; text-decoration: none; background: none; border: none;
  font: inherit; cursor: pointer; padding: 0;
}
.back-link:hover { text-decoration: underline; }
.project-head h2 { margin: 0 0 4px; font-size: 24px; color: var(--burgundy); }
.project-head .summary { margin: 0 0 6px; line-height: 1.5; white-space: pre-wrap; }
.project-head .meta { display: flex; align-items: center; gap: 10px; margin: 8px 0 16px; flex-wrap: wrap; }

.step {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin: 0 0 10px;
}
.step.done { opacity: .82; }
.step-top { display: flex; align-items: flex-start; gap: 10px; }
.step-num {
  flex: none; width: 26px; height: 26px; border-radius: 999px;
  background: var(--pink); color: var(--burgundy-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: bold; margin-top: 1px;
}
.step.done .step-num { background: var(--st-done); color: #fff; }
.step-title { flex: 1; font-size: 17px; line-height: 1.35; padding-top: 2px; }
.step-detail { margin: 8px 0 0 36px; line-height: 1.5; font-size: 15px; color: var(--brown); }
.step-link { margin: 6px 0 0 36px; font-size: 15px; }
.step-link a { color: var(--burgundy); }
.step-date { margin: 6px 0 0 36px; font-size: 14px; color: var(--brown-soft); font-style: italic; }

/* The chip IS the control: a select styled as a chip, so tapping the
   status opens the status menu and the choice is saved at once. */
select.chip {
  appearance: none; -webkit-appearance: none;
  border: none; cursor: pointer; font-family: inherit;
  padding-right: 22px;
  background-image: linear-gradient(45deg, transparent 48%, #fff 48%, #fff 52%, transparent 52%),
                    linear-gradient(-45deg, transparent 48%, #fff 48%, #fff 52%, transparent 52%);
  background-position: right 11px center, right 6px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
select.chip:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; }
select.chip.saving { opacity: .55; }

.site-footer {
  max-width: 760px; margin: 0 auto; padding: 0 16px 26px;
  color: var(--brown-soft); font-size: 14px; line-height: 1.5;
}
.empty { color: var(--brown-soft); font-style: italic; }
