/* MumPA Development Checklists — self-contained stylesheet.
   Colour, radius, spacing and type values mirror the MumPA design-system tokens (v1.1.0). */

:root {
  /* brand + accents */
  --brand: #3ec5bc;
  --brand-strong: #2ca59c;
  --brand-soft: #e9f8f6;
  --brand-bright: #4ed4c8;
  --accent-1: #ff6b6b;
  --accent-1-strong: #e8505b;
  --accent-1-soft: rgba(255, 107, 107, 0.12);
  --accent-2: #ffa940;
  --accent-3: #7c5ce8;
  --accent-3-soft: rgba(124, 92, 232, 0.12);
  --accent-5-strong: #4a9a63;

  /* surfaces + text */
  --bg-app: #ebe6dc;
  --bg-screen: #f6f3ed;
  --surface-card: #ffffff;
  --surface-soft: #faf7f1;
  --surface-sunken: #f0ebe1;
  --text-primary: #1f1d2b;
  --text-secondary: #4a4858;
  --text-muted: #8a8898;
  --text-faint: #b8b6c4;
  --text-on-color: #ffffff;
  --divider: rgba(31, 29, 43, 0.06);
  --border: rgba(31, 29, 43, 0.10);
  --nav-bg: #1f1d2b;

  /* elevation */
  --shadow-sm: 0 2px 8px rgba(31, 29, 43, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 29, 43, 0.08);
  --shadow-lg: 0 12px 36px rgba(31, 29, 43, 0.12);

  /* type */
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --track-tight: -0.015em;
  --track-tighter: -0.025em;
  --track-wide: 0.12em;
  --leading-normal: 1.45;

  /* space + radius + motion */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --radius-2: 7px;
  --radius-3: 12px;
  --radius-4: 14px;
  --radius-5: 20px;
  --radius-6: 24px;
  --radius-pill: 100px;
  --duration-fast: 150ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: var(--leading-normal);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-sunken);
  border-radius: var(--radius-2);
  padding: 1px 5px;
  color: var(--text-secondary);
  word-break: break-word;
}

output { font-variant-numeric: tabular-nums; }

.wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html:not(.has-js) .js-only { display: none !important; }

/* ---------- masthead ---------- */
.masthead {
  background:
    radial-gradient(120% 140% at 8% -20%, rgba(62, 197, 188, 0.30), transparent 58%),
    radial-gradient(120% 150% at 96% 0%, rgba(124, 92, 232, 0.22), transparent 55%),
    var(--nav-bg);
  color: var(--text-on-color);
  padding: var(--space-7) 0 var(--space-6);
  border-bottom-left-radius: var(--radius-6);
  border-bottom-right-radius: var(--radius-6);
  box-shadow: var(--shadow-lg);
}

.brandline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.bloom { display: inline-flex; }

.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.masthead h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.08;
  letter-spacing: var(--track-tighter);
  font-weight: 800;
}

.sub {
  margin: 0 0 var(--space-6);
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.sub strong { color: #fff; font-weight: 600; }

/* overall progress */
.overall {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-4);
  padding: var(--space-4);
}

.overall-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.overall-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.overall-count { font-size: 14px; font-weight: 600; }

.bar {
  display: block;
  height: 8px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand), var(--brand-bright));
  transition: width var(--duration-fast) var(--ease);
}

/* controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-4);
}

.field { flex: 1 1 240px; display: block; }

#filter {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 10px var(--space-5);
  box-shadow: var(--shadow-sm);
}

#filter::placeholder { color: var(--text-faint); }

#filter:focus-visible {
  outline: 3px solid var(--brand-bright);
  outline-offset: 2px;
}

.btns { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-pill);
  padding: 9px var(--space-4);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}

.btn:hover { background: rgba(255, 255, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-bright); outline-offset: 2px; }

.btn-danger {
  background: var(--accent-1-soft);
  border-color: rgba(255, 107, 107, 0.55);
  color: #ffd7d7;
}

.btn-danger:hover { background: rgba(255, 107, 107, 0.32); }

.filter-status {
  margin: var(--space-3) 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- modules ---------- */
main { padding: var(--space-7) var(--space-4) var(--space-8); }

.module { margin-bottom: var(--space-4); }

.module > details {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-5);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.module > details[open] { box-shadow: var(--shadow-md); }

summary {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  list-style: none;
  background: var(--surface-card);
}

summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
summary:hover { background: var(--surface-soft); }
summary:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }

.chev {
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--text-muted);
  border-bottom: 2.5px solid var(--text-muted);
  transform: rotate(-45deg);
  transition: transform var(--duration-fast) var(--ease);
  margin-left: 3px;
}

details[open] > summary .chev { transform: rotate(45deg); }

.mod-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

.mod-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: var(--track-tight);
}

.mod-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.module.complete .mod-count { color: var(--accent-5-strong); }

.bar-sm {
  grid-column: 2;
  height: 6px;
  background: var(--surface-sunken);
  margin-top: 2px;
}

.items {
  list-style: none;
  margin: 0;
  padding: 0 var(--space-5) var(--space-4);
  border-top: 1px solid var(--divider);
}

.item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--divider);
}

.item:last-child { border-bottom: 0; }

.item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border: 2px solid var(--text-faint);
  border-radius: var(--radius-2);
  background: var(--surface-card);
  cursor: pointer;
  flex: none;
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.item input[type="checkbox"]:hover { border-color: var(--brand); }

.item input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 16px 16px;
  background-position: center;
  background-repeat: no-repeat;
}

.item input[type="checkbox"]:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.item label {
  cursor: pointer;
  display: block;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.item input[type="checkbox"]:checked + label .txt {
  text-decoration: line-through;
  color: var(--text-faint);
}

.item input[type="checkbox"]:checked + label .cite { opacity: 0.5; }

.txt { display: inline; }

.cite {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: 1px;
}

/* ---------- notes / coverage ---------- */
.notes > details { background: var(--surface-soft); }

.notes .mod-title { color: var(--text-primary); }

#open-decisions > details { border-color: rgba(255, 169, 64, 0.45); }
#open-decisions summary { background: rgba(255, 169, 64, 0.10); }
#open-decisions summary:hover { background: rgba(255, 169, 64, 0.16); }

.note-intro {
  margin: 0;
  padding: var(--space-4) var(--space-5) 0;
  font-size: 13.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--divider);
}

.notes-list { border-top: 0; padding-top: var(--space-2); }

.item.note {
  grid-template-columns: 12px 1fr;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.item.note .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  margin-top: 8px;
}

.coverage-list .item.note { grid-template-columns: 1fr; font-size: 13.5px; }

.site-foot {
  padding: 0 var(--space-4) var(--space-8);
  font-size: 13px;
  color: var(--text-secondary);
}

.site-foot p { margin: 0 0 var(--space-2); }
.site-foot .muted { color: var(--text-muted); }

/* filtering */
.item[hidden], .module[hidden] { display: none !important; }

/* ---------- mobile ---------- */
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .masthead { padding-top: var(--space-6); border-radius: 0 0 var(--radius-5) var(--radius-5); }
  summary { padding: var(--space-4); grid-template-columns: 16px 1fr; }
  .items { padding: 0 var(--space-4) var(--space-3); }
  .mod-title { font-size: 15.5px; }
  .btns { width: 100%; }
  .btn { flex: 1 1 auto; }
  .cite { display: inline-block; margin-left: 0; margin-top: var(--space-1); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 14mm; }

  body { background: #fff; color: #000; font-size: 10.5pt; }

  .masthead {
    background: none;
    color: #000;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 2px solid #000;
    padding: 0 0 8pt;
    margin-bottom: 12pt;
  }

  .masthead h1 { font-size: 20pt; }
  .sub { color: #333; margin-bottom: 6pt; }
  .kicker, .overall, .controls, .filter-status, .btns, .chev { display: none !important; }

  .wrap { max-width: none; padding: 0; }
  main { padding: 0; }

  .module { margin-bottom: 10pt; break-inside: auto; }

  .module > details,
  .notes > details {
    background: none;
    border: 0;
    border-top: 1px solid #999;
    border-radius: 0;
    box-shadow: none;
  }

  /* force every section open for print */
  details > summary ~ * { display: revert !important; }
  summary { padding: 6pt 0 2pt; background: none !important; grid-template-columns: 1fr; }
  .mod-title { font-size: 12.5pt; }
  .mod-count { color: #555; }
  .bar, .bar-sm { display: none !important; }

  .items { padding: 0; border: 0; }
  .item { padding: 2pt 0; border-bottom: 1px dotted #ccc; break-inside: avoid; }
  .item label { color: #000; font-size: 10.5pt; }

  .item input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #000;
    background: none;
    width: 11pt;
    height: 11pt;
  }

  .item input[type="checkbox"]:checked { background: none; }
  .item input[type="checkbox"]:checked + label .txt { text-decoration: none; color: #000; }

  .cite {
    background: none;
    color: #444;
    border: 1px solid #bbb;
    font-size: 8pt;
  }

  .note-intro { color: #444; padding: 4pt 0 0; border: 0; }
  .item.note .dot { background: #000; }
  .site-foot { padding: 8pt 0 0; border-top: 1px solid #999; color: #444; }
}
