/* Design tokens carried over from the current build. Retune the look in one place, here. */
:root {
  --ink: #1E2430;
  --ink-soft: #4A5364;
  --paper: #EEEAE0;
  --paper-deep: #E4DFD1;
  --field: #FBF9F4;
  --line: #C7BFA9;
  --brass: #9C6F2B;
  --slate: #4E6E88;
  --moss: #5C7A5C;
  --rust: #A2573A;
  --display: 'Fraunces', serif;
  --body: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
::placeholder { color: #9C9484; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wordmark { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: 0.04em; text-decoration: none; color: var(--ink); }
.wordmark small { font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: 0.14em; color: var(--brass); margin-left: 10px; text-transform: uppercase; }
.note-fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; background: var(--ink, #1c2330); color: #fff; border: 0; border-radius: 2px; padding: 10px 14px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.note-panel { position: fixed; right: 16px; bottom: 64px; z-index: 51; width: min(360px, calc(100vw - 32px)); background: var(--field); border: 1px solid var(--line); border-radius: 2px; padding: 14px; box-shadow: 0 6px 24px rgba(0,0,0,0.25); display: none; }
.note-panel.open { display: block; }
.note-panel textarea { width: 100%; min-height: 110px; box-sizing: border-box; }
.note-panel .ctx { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin: 4px 0 8px; word-break: break-word; }
@media print { .note-fab, .note-panel { display: none !important; } }
.who { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; text-align: right; }

main { max-width: 720px; margin: 0 auto; padding: 28px 16px 64px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--brass); text-transform: uppercase; }
h1 { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.15; margin: 6px 0 0; }
h2 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 36px 0 10px; }
.lede { color: var(--ink-soft); margin: 10px 0 0; }
.muted { color: var(--ink-soft); font-size: 13px; }

.card { background: var(--field); border: 1px solid var(--line); border-radius: 2px; padding: 16px; margin-top: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }

label.field { display: block; font-size: 13px; font-weight: 500; }
label.field .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: 12px; }
input[type=text], input[type=email], input[type=date], select, textarea {
  width: 100%; margin-top: 4px; font-size: 14px; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 2px; padding: 9px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); }

.choice { display: flex; gap: 10px; margin-top: 6px; }
.choice label { flex: 1; text-align: center; border: 1px solid var(--ink); border-radius: 2px; padding: 9px 0; cursor: pointer; font-size: 14px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice input:checked + span { font-weight: 600; }
.choice label.on { background: var(--ink); color: var(--paper); }

.btn { font-size: 14px; font-weight: 500; padding: 10px 18px; border-radius: 2px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.link { background: none; border: none; padding: 0; font-size: inherit; color: var(--slate); text-decoration: underline; }
.link.danger { color: var(--rust); }

.chip { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 2px; padding: 2px 6px; white-space: nowrap; }
.chip.owner { color: var(--brass); }
.chip.contributor { color: var(--slate); }
.chip.advisor { color: var(--moss); }
.chip.type { color: var(--ink-soft); }

.notice { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--slate); background: #EDF1F3; font-size: 13px; }
.notice.error { border-color: var(--rust); background: #F4E6E0; }
.notice.ok { border-color: var(--moss); background: #E6EDE4; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tablewrap { overflow-x: auto; }

ol.stages { list-style: none; padding: 0; margin: 14px 0 0; }
ol.stages li { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
ol.stages li .n { font-family: var(--mono); font-size: 12px; color: var(--brass); width: 16px; flex: none; }
ol.stages li.current { font-weight: 600; }
ol.stages li.grey { opacity: 0.55; }
ol.stages li a { color: inherit; }
ol.stages .tail { margin-left: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
ol.stages .state { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 400; }
ol.stages input.due { width: auto; margin: 0; padding: 4px 6px; font-size: 12px; }
.chip.overdue { color: var(--rust); }

.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 14px; margin: 6px 0 8px; }
.checks label { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 400; padding: 3px 0; }
.checks input { width: auto; margin: 0; }
ul.problems { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
ul.problems li { margin: 3px 0; }

/* completion ticks */
.tickwrap { display: inline-flex; align-items: center; gap: 6px; }
.tick { width: 22px; height: 22px; border-radius: 50%; background: var(--moss); color: #fff; font-size: 14px; line-height: 22px; text-align: center; font-weight: 700; flex: none; }
.ticklabel { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--moss); }
.bigtick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-left: 16px; }
.bigtick .tick { width: 56px; height: 56px; line-height: 56px; font-size: 32px; }
ol.stages li.current.grey .tick { opacity: 1; }

@media (max-width: 520px) {
  h1 { font-size: 25px; }
  .who span.email { display: none; }
}
