/* Tokens follow the Troop Weekly Funnel dashboard: neutral light grey page, white
   panels with a hairline border, a serif title, near-black for what is on. */
:root {
  color-scheme: light;
  --bg: #f9f9f9;
  --text: #1a1a1a;
  --muted: #737373;
  --line: #e5e5e5;
  --card: #ffffff;
  --card-hover: #f5f5f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --primary: #1a1a1a;
  --primary-text: #ffffff;
  --link: #2a6bb8;
  --danger: #b3261e;
  --ok: #1e7a3c;
  --warn: #8a5a00;
  --field: #ffffff;
  --radius: 8px;
  --serif: "Tiempos Text", ui-serif, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --gray-bg: #f3f3f3;   --gray-pill: #e8e8e8;   --gray-text: #4d4d4d;
  --purple-bg: #f7f4f9; --purple-pill: #e8deee; --purple-text: #6940a5;
  --pink-bg: #fbf3f5;   --pink-pill: #f5e0e6;   --pink-text: #a3264f;
  --orange-bg: #fbf5ef; --orange-pill: #f6dfca; --orange-text: #9a4f17;
  --yellow-bg: #fbf8ee; --yellow-pill: #f6eabb; --yellow-text: #7d5f0b;
  --green-bg: #f2f7f2;  --green-pill: #d8ead9;  --green-text: #1e7a3c;
  --blue-bg: #f1f5f9;   --blue-pill: #d6e4f0;   --blue-text: #245f9e;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1c1c1c;
    --text: #ededed;
    --muted: #a3a3a3;
    --line: #363636;
    --card: #262626;
    --card-hover: #2e2e2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    --primary: #ededed;
    --primary-text: #1c1c1c;
    --link: #7fb2ec;
    --danger: #f08a80;
    --ok: #7ccf95;
    --warn: #e2b55c;
    --field: #222222;

    --gray-bg: #232323;   --gray-pill: #3a3a3a;   --gray-text: #c8c8c8;
    --purple-bg: #262229; --purple-pill: #3e3049; --purple-text: #c9a8ef;
    --pink-bg: #2a2125;   --pink-pill: #4e2c3a;   --pink-text: #f0a3c0;
    --orange-bg: #2a231d; --orange-pill: #573a24; --orange-text: #f1b183;
    --yellow-bg: #29261d; --yellow-pill: #524228; --yellow-text: #eccb7a;
    --green-bg: #1f2721;  --green-pill: #2b4632;  --green-text: #8fd3a5;
    --blue-bg: #1f252b;   --blue-pill: #2a4462;   --blue-text: #8cc0f0;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }

button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius);
  padding: 5px 10px;
  font-size: 13px;
}
button:hover { background: var(--card); }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
button.primary:hover { background: var(--primary); opacity: 0.88; }
button.quiet, a.quiet { border-color: transparent; background: none; color: var(--muted); text-decoration: none; }
button.quiet:hover, a.quiet:hover { background: var(--card-hover); color: var(--text); }
button.danger { color: var(--danger); }
a.quiet { padding: 5px 10px; border-radius: var(--radius); }

.error { color: var(--danger); }
.empty { color: var(--muted); }

/* Header */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 24px 32px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.tabs { display: flex; gap: 16px; margin-right: 12px; align-self: stretch; align-items: stretch; }
.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  padding: 6px 2px;
}
.tab:hover { background: none; color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); }
/* The switcher sits under the tabs, on the left, where the eye starts. */
.views { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 32px 4px; }
.view { color: var(--text); }
.view.active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }

/* Boards */

main { padding: 0 32px 48px; }
.foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 32px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.board h2 { font-size: 16px; font-weight: 500; margin: 24px 0 10px; }
.columns {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: flex-start;
}
.column {
  flex: 0 0 260px;
  border-radius: var(--radius);
  padding: 8px;
  background: var(--gray-bg);
  border: 1px solid var(--line);
}
.column-head { display: flex; align-items: center; gap: 8px; margin: 2px 4px 8px; font-size: 13px; font-weight: 500; }
.count { color: var(--col-text); opacity: 0.8; font-weight: 400; }
.column-body { min-height: 8px; display: flex; flex-direction: column; gap: 6px; }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  padding: 8px 10px;
  cursor: pointer;
}
.card:hover { background: var(--card-hover); }
.card:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.card.dragging { opacity: 0.4; }
.card-title { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.card-meta {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.has-notes { font-size: 13px; }
.task-id { color: var(--muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; user-select: all; }
.card-item { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.card-item::before { content: "◆ "; font-size: 9px; vertical-align: 1px; }
.drop-marker { height: 3px; border-radius: 2px; background: var(--text); }

.add, .more {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 6px;
  border: none;
  background: none;
  color: var(--col-text);
  opacity: 0.85;
}
.add:hover, .more:hover { background: var(--col-pill); opacity: 1; }

.pill-gray, .color-gray { --col-bg: var(--gray-bg); --col-pill: var(--gray-pill); --col-text: var(--gray-text); }
.pill-purple, .color-purple { --col-bg: var(--purple-bg); --col-pill: var(--purple-pill); --col-text: var(--purple-text); }
.pill-pink, .color-pink { --col-bg: var(--pink-bg); --col-pill: var(--pink-pill); --col-text: var(--pink-text); }
.pill-orange, .color-orange { --col-bg: var(--orange-bg); --col-pill: var(--orange-pill); --col-text: var(--orange-text); }
.pill-yellow, .color-yellow { --col-bg: var(--yellow-bg); --col-pill: var(--yellow-pill); --col-text: var(--yellow-text); }
.pill-green, .color-green { --col-bg: var(--green-bg); --col-pill: var(--green-pill); --col-text: var(--green-text); }
.pill-blue, .color-blue { --col-bg: var(--blue-bg); --col-pill: var(--blue-pill); --col-text: var(--blue-text); }
.pill { background: var(--col-pill); color: var(--col-text); }

/* Pipelines */

.muted { color: var(--muted); }
.item { margin: 24px 0 40px; max-width: 1180px; }
.item-head { display: flex; align-items: center; gap: 10px; }
.item-head h2, .item-head h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0; }
.part-head { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 36px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); max-width: 1180px; }
.context { margin: 0 0 32px; }
.context > :not(.context-head) { max-width: 760px; }
.context-head { display: flex; align-items: center; gap: 10px; }
.context-head.part-head { margin-top: 20px; }
.context-head h2 { font: inherit; margin: 0; }
.context-head button { font-family: var(--sans); font-size: 14px; }
.context-head + * { margin-top: 10px; }
.context-block { margin-top: 12px; }
.context-name { margin: 0 0 4px; font-size: 14px; }
.context-body ul { margin: 0; padding-left: 20px; }
.context-input { display: block; width: 100%; margin-top: 8px; border: 1px solid var(--line); background: var(--field); color: var(--text); border-radius: var(--radius); padding: 8px 10px; font: inherit; font-size: 14px; }
.context-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.plan-q .context-actions { align-items: center; }
.part-head.part-first { margin-top: 20px; }
.pipelines-intro { max-width: 760px; margin: 14px 0 0; }
.pipeline-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 16px 0 48px; max-width: 1180px; }
.pipeline-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font-size: 13px; }
.pipeline-card strong { font-size: 15px; font-weight: 500; }
.pipeline-card:hover { background: var(--card-hover); }
.part-empty { margin: 16px 0 40px; font-size: 14px; line-height: 1.7; }
.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 6px 0 14px;
  color: var(--muted);
}
.item-meta strong { color: var(--text); font-weight: 500; }
.item-summary { color: var(--muted); white-space: pre-wrap; margin: 0 0 8px; max-width: 760px; }

.stages {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 4px;
}
.stage {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  border-radius: var(--radius);
  padding: 4px 10px;
  background: var(--gray-bg);
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 13px;
  white-space: nowrap;
}
.stage-name { font-weight: 500; }
.stage-count { font-size: 12px; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; }
.stage.past { background: var(--card); color: var(--ok); border-color: var(--line); }
.stage.current { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.stage.working { border-color: var(--text); border-style: dashed; color: var(--text); }

.plan-stage h4 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  margin: 22px 0 6px;
}
.plan-stage .count { color: var(--muted); font-size: 12px; font-weight: 400; }
.plan { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plan-task {
  display: grid;
  grid-template-columns: 28px minmax(200px, 2.4fr) 80px minmax(150px, 1.1fr) 92px minmax(160px, 1.6fr);
  gap: 4px 12px;
  align-items: center;
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.plan-task:hover { background: var(--card-hover); }
.plan-task:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.plan-no { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.plan-title { font-weight: 500; overflow-wrap: anywhere; }
.plan-who, .plan-waiting { color: var(--muted); font-size: 13px; }
.plan-owner .pill { white-space: normal; }
.state-done .plan-title { color: var(--muted); font-weight: 400; }
.state-blocked .plan-waiting { color: var(--danger); }

/* Funnel */

.funnel-section { margin: 24px 0 40px; }
.funnel-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.funnel { border-collapse: collapse; width: 100%; min-width: 1060px; }
.funnel th, .funnel td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.funnel thead th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--card); white-space: nowrap; }
.funnel tbody tr { cursor: pointer; }
.funnel tbody tr:hover { background: var(--card-hover); }
.funnel tbody tr:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.funnel tbody tr:last-child > * { border-bottom: none; }
.funnel tbody th { font-weight: 500; white-space: nowrap; }
.funnel-value { display: block; font-weight: 500; font-variant-numeric: tabular-nums; }
.funnel-rate { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.funnel-rate.down { color: var(--danger); }
.funnel-rate.up { color: var(--ok); }
.funnel td.no-data { color: var(--muted); font-size: 12px; }
.funnel td.drop { background: var(--pink-bg); box-shadow: inset 0 0 0 1px var(--pink-pill); }
.funnel-task-count { display: block; font-size: 12px; font-weight: 400; color: var(--link); text-decoration: none; }
.funnel-task-count:hover { text-decoration: underline; }
.funnel-tasks .item-head .count { color: var(--muted); font-size: 13px; }
.funnel-drop-text { color: var(--muted); font-size: 13px; min-width: 220px; }

.funnel-drop { margin: 0 0 8px; }
.funnel-stages { list-style: none; margin: 0; padding: 0; }
.funnel-stages li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 2px 12px;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}
.funnel-stages li.drop { background: var(--pink-bg); }
.funnel-stage-name { font-weight: 500; grid-row: span 3; }
.funnel-stage-value { font-variant-numeric: tabular-nums; }
.funnel-stage-rate, .funnel-stage-note { font-size: 13px; color: var(--muted); grid-column: 2; }

/* Dialogs */

dialog {
  border: none;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  width: min(640px, calc(100vw - 32px));
  padding: 24px;
}
dialog::backdrop { background: rgba(15, 15, 15, 0.45); }
dialog h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 22px; }

.title-input {
  width: 100%;
  border: none;
  background: none;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  padding: 0 0 12px;
  outline: none;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}
.fields label, .notes-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.fields label.wide { grid-column: span 2; }
.fields input:not([type]), .fields input[type="text"] {
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: var(--radius);
  padding: 6px 8px;
  font-size: 14px;
  color: var(--text);
}
.pipeline-fields { border-top: 1px solid var(--line); padding-top: 12px; }
.fields label.check { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; color: var(--text); padding-top: 18px; }
.fields select, .fields input[type="date"], textarea {
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: var(--radius);
  padding: 6px 8px;
  font-size: 14px;
  color: var(--text);
}
textarea { width: 100%; resize: vertical; line-height: 1.5; }
.meta { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 0; font-size: 13px; }
.links:empty { display: none; }
.links a { color: var(--link); overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.spacer { flex: 1; }

/* A task opens as a panel down the right, over the board, like a Notion peek:
   a big title, one row per property, comments, then the notes as the page. */
dialog.peek {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(760px, 100vw);
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: none;
  padding: 0;
  border-radius: 0;
  border-left: 1px solid var(--line);
  background: var(--card);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
}
dialog.peek[open] { animation: peek-in 0.16s ease-out; }
@keyframes peek-in { from { transform: translateX(24px); opacity: 0.6; } }
dialog.peek::backdrop { background: rgba(15, 15, 15, 0.12); }
.peek form { display: flex; flex-direction: column; height: 100%; }
.peek-bar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; }
.peek-bar #close-task { font-size: 20px; line-height: 1; padding: 2px 8px; }
.peek-id { font-size: 13px; color: var(--muted); }
.save-state { font-size: 12px; color: var(--muted); }
.peek-foot[hidden] { display: none; }
.peek-body > .error { margin: -8px 0 12px; }
.peek-body { flex: 1; overflow-y: auto; padding: 24px 64px 32px; }
.peek .title-input {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  padding: 0 0 20px;
  color: var(--text);
}
.props { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.prop {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
  font-size: 14px;
}
.prop[hidden] { display: none; }
.prop > span { color: var(--muted); }
.prop select, .prop input:not([type="checkbox"]) {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  border: none;
  border-radius: 4px;
  background: transparent;
  padding: 6px 8px;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.prop input:not([type]), .prop input[type="text"] { cursor: text; }
.prop select:hover, .prop input:not([type="checkbox"]):hover,
.prop select:focus, .prop input:not([type="checkbox"]):focus { background: var(--card-hover); outline: none; }
.prop select:has(option[value=""]:checked), .prop input.is-empty, .prop input::placeholder { color: var(--muted); }
.prop input[type="checkbox"] { justify-self: start; margin: 0 8px; width: 16px; height: 16px; }
.peek .comments { margin-top: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.peek .comment-list { max-height: none; }
.peek .title-input { resize: none; overflow: hidden; display: block; }
.peek .comment-new textarea { min-height: 38px; height: 38px; resize: none; }
.peek .comment-new:focus-within textarea { height: 88px; }
.peek .comment-actions { display: none; }
.peek .comment-new:focus-within .comment-actions,
.peek .comment-new:has(textarea:not(:placeholder-shown)) .comment-actions { display: flex; }
.peek-notes {
  display: block;
  margin-top: 20px;
  border: none;
  background: transparent;
  padding: 0;
  resize: none;
  overflow: hidden;
  min-height: 120px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  outline: none;
}
.peek .links { display: none; }
.notes-view {
  margin-top: 20px;
  min-height: 120px;
  font-size: 15px;
  line-height: 1.6;
  cursor: text;
  overflow-wrap: anywhere;
  outline: none;
}
.notes-view[hidden] { display: none; }
.notes-view > :first-child { margin-top: 0; }
.notes-view p { margin: 0 0 12px; }
.notes-view h3 { font-size: 22px; font-weight: 700; margin: 24px 0 8px; }
.notes-view h4 { font-size: 18px; font-weight: 700; margin: 20px 0 6px; }
.notes-view h5 { font-size: 15px; font-weight: 700; margin: 16px 0 4px; }
.notes-view ul, .notes-view ol { margin: 0 0 12px; padding-left: 24px; }
.notes-view li { margin: 2px 0; }
.notes-view code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--card-hover); border-radius: 4px; padding: 1px 4px; }
.notes-view a { color: var(--link); }
.notes-view .notes-empty { color: var(--muted); }
.peek-notes[hidden] { display: none; }
.peek-foot { display: flex; align-items: center; gap: 8px; padding: 12px 64px; border-top: 1px solid var(--line); }
.peek-foot .error { margin: 0; }

.archived-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.archived-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  padding: 8px 14px;
  margin: 0;
  max-width: calc(100vw - 32px);
}

/* Sign in */

body.sign-in { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.sign-in-form { display: flex; flex-direction: column; gap: 8px; width: min(320px, 100%); }
.sign-in-form h1 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.sign-in-form label { font-size: 12px; color: var(--muted); }
.sign-in-form input {
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.sign-in-form .error { margin: 0; }
.sign-in-form button { margin-top: 8px; padding: 8px; }

@media (max-width: 700px) {
  .top { padding: 16px 16px 8px; }
  .views { padding: 8px 16px 4px; }
  .foot { padding: 16px; }
  main { padding: 0 16px 32px; }
  .column { flex-basis: 240px; }
  .tabs { margin-right: 0; }
  .plan-task { grid-template-columns: 24px 1fr auto; }
  .plan-title { grid-column: 2 / 3; }
  .plan-state { grid-column: 3; grid-row: 1; }
  .plan-who, .plan-owner, .plan-waiting { grid-column: 2 / 4; }
  .plan-who:empty, .plan-waiting:empty { display: none; }
  .fields label.wide { grid-column: auto; }
  dialog { padding: 16px; }
  dialog.peek { padding: 0; }
  .peek-body { padding: 16px 16px 24px; }
  .peek-foot { padding: 12px 16px; }
  .peek .title-input { font-size: 26px; }
  .prop { grid-template-columns: 110px minmax(0, 1fr); }
}

/* A pipeline's dashboard: a pipeline tool's tables, such as Expenses subscriptions. */
.dashboard {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.dashboard > summary { cursor: pointer; padding: 12px 16px; font-weight: 500; }
.dashboard summary .muted { color: var(--muted); font-weight: 400; }
.dashboard > :not(summary) { margin-left: 16px; margin-right: 16px; }
.dashboard h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 16px 16px 8px; }
.dashboard-stats { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0 16px 8px; }
.dashboard-stats dt { font-size: 12px; color: var(--muted); }
.dashboard-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.dashboard-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.dashboard-table { border-collapse: collapse; width: 100%; min-width: 1060px; font-size: 13px; }
.dashboard-table th, .dashboard-table td { padding: 7px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dashboard-table td.wide { white-space: normal; min-width: 180px; }
.dashboard-table thead th { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.dashboard-table tbody th { font-weight: 500; white-space: nowrap; }
.dashboard-table tbody tr:last-child > * { border-bottom: none; }
.dashboard-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dashboard-fold { margin-top: 16px; }
.dashboard-fold > summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.dashboard-source { font-size: 12px; margin-top: 12px; margin-bottom: 16px; }

/* A pipeline page's overview, such as the weekly funnel, with its full page in a popout. */
.page-overview { margin: 0 0 24px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); max-width: 1180px; }
.page-overview-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.page-overview-head h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 20px; }
.page-overview-range { font-size: 13px; }
.page-overview-body > p { margin: 12px 0 0; font-size: 14px; }
.page-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 0; }
.page-tiles > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.page-tiles dt { font-size: 12px; color: var(--muted); }
.page-tiles dd { margin: 2px 0 0; font-family: var(--serif); font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.page-tiles dd + dd { font-family: var(--sans); font-size: 12px; }
.page-delta { color: var(--muted); }
.page-delta.up { color: var(--ok); }
.page-delta.down { color: var(--danger); }
.page-signals { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; }
.page-signals li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.page-signals li > span { flex: 1; }
.page-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); transform: translateY(-1px); }
.page-dot.good { background: var(--ok); }
.page-dot.bad { background: var(--danger); }
.page-dot.warn { background: var(--warn); }
@media (max-width: 700px) {
  .page-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

dialog.page-dialog { width: calc(100vw - 32px); max-width: 1280px; height: calc(100vh - 32px); max-height: none; padding: 0; display: none; flex-direction: column; overflow: hidden; }
dialog.page-dialog[open] { display: flex; }
.page-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.page-bar h2 { margin: 0; font-size: 18px; }
.page-dialog iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }
@media (max-width: 700px) {
  dialog.page-dialog { width: 100vw; height: 100vh; max-width: none; border-radius: 0; }
}

/* A repo file, read in a window over the page. */
dialog.file-dialog { max-width: 900px; }
.file-body { flex: 1; overflow-y: auto; padding: 24px 48px 48px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.file-body > * { max-width: 760px; }
.file-body .file-path { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.file-body h3 { font-size: 26px; font-weight: 700; margin: 28px 0 10px; }
.file-body h3:first-of-type { margin-top: 0; }
.file-body h4 { font-size: 19px; font-weight: 700; margin: 24px 0 8px; }
.file-body h5, .file-body h6 { font-size: 15px; font-weight: 700; margin: 18px 0 6px; }
.file-body p, .file-body ul, .file-body ol, .file-body blockquote, .file-body pre, .file-body .md-table { margin: 0 0 14px; }
.file-body ul, .file-body ol { padding-left: 24px; }
.file-body a { color: var(--link); }
.file-body hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
@media (max-width: 700px) { .file-body { padding: 16px; } }

/* What notes and files share beyond a little Markdown. */
.notes-view pre, .file-body pre { background: var(--card-hover); border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: 13px; }
.file-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--card-hover); border-radius: 4px; padding: 1px 4px; }
.notes-view pre code, .file-body pre code { background: none; padding: 0; }
.notes-view blockquote, .file-body blockquote { margin-left: 0; padding-left: 14px; border-left: 3px solid var(--line); color: var(--muted); }
.notes-view hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.md-table { overflow-x: auto; margin: 0 0 12px; }
.md-table table { border-collapse: collapse; font-size: 14px; }
.md-table th, .md-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.md-table th { background: var(--card-hover); font-weight: 600; overflow-wrap: normal; }

/* Markdown text: a person's context, and an idea's shaped summary. */
.overview-body {
  padding: 0 16px 16px;
  max-width: 820px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.overview-body h3, .overview-body h4, .overview-body h5 { margin: 20px 0 8px; }
.overview-body p, .overview-body ul, .overview-body ol { margin: 0 0 12px; }
.overview-body code { background: var(--gray-bg); border-radius: 4px; padding: 1px 4px; font-size: 0.9em; }
.overview-body pre { background: var(--gray-bg); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; }
.overview-body pre code { background: none; padding: 0; }
.overview-table { overflow-x: auto; margin: 0 0 12px; }
.overview-body table { border-collapse: collapse; font-size: 0.92em; }
.overview-body th, .overview-body td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.overview-body th { background: var(--gray-bg); }

/* Ideas: the suggest button and open ideas above a pipeline, and an idea's answers. */
.suggest-wrap { margin: 0 0 24px; }
.feedback-share { margin: 18px 0 8px; }
.feedback-list { list-style: none; margin: 12px 0 40px; padding: 0; max-width: 760px; }
.feedback-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line, #e5e5e5); font-size: 14px; }
.feedback-list .muted { color: var(--muted); }
.suggest-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 14px; }
.suggest-bar .muted { color: var(--muted); }
.idea-link { color: var(--link); }
.idea dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 12px; max-width: 760px; }
.idea-row { display: contents; }
.idea dt { color: var(--muted); font-size: 13px; }
.idea dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.idea-shaped { padding: 0; }
.suggest-dialog { width: min(560px, calc(100vw - 32px)); }
.suggest-dialog .notes-label { margin-top: 12px; }

/* ---- Comments ---------------------------------------------------------- */
.foot #me { border: 1px solid var(--line); background: var(--field); color: var(--text); border-radius: var(--radius); padding: 5px 8px; font-size: 13px; }
.comments { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.comments h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 8px; display: flex; gap: 6px; }
.comment-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 40vh; overflow-y: auto; }
.comment { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.comment.resolved { opacity: 0.6; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12px; }
.comment-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.comment-new { display: flex; flex-direction: column; gap: 6px; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.comment-actions select { border: 1px solid var(--line); background: var(--field); color: var(--text); border-radius: var(--radius); padding: 5px 8px; font-size: 13px; }
button.small { padding: 2px 6px; font-size: 12px; }
.comment-count { font-size: 12px; color: var(--muted); }
.plan-title .comment-count, .plan-title .pill { margin-left: 6px; }
.open-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.open-list li { border-bottom: 1px solid var(--line); }
.open-link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; width: 100%; text-align: left; padding: 10px 0; color: var(--text); }
.open-link .muted { flex-basis: 100%; font-size: 13px; }

/* ---- Planning ---------------------------------------------------------- */
/* Chart series, one per pipeline in pipelines.php order, then Other. Checked
   for color-blind separation in both modes; the legend, hover and table carry
   the names, so color is never alone. */
:root {
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-other: #a3a29d;
  --chart-grid: #e1e0d9; --chart-axis: #c3c2b7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-other: #6b6a66;
    --chart-grid: #2c2c2a; --chart-axis: #383835;
  }
}
.planning { max-width: 980px; margin: 0 auto; padding: 0 0 48px; display: flex; flex-direction: column; gap: 16px; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--card); }
.plan-card h2 { font-size: 15px; font-weight: 500; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.plan-card > p { margin: 0 0 8px; }
.planning > .plan-card { border: 0; padding: 0; background: none; border-radius: 0; }
.planning .plan-card > h2.part-head { font-size: 28px; font-weight: 400; margin: 20px 0 14px; }
.planning > .plan-card:first-of-type > h2.part-head { margin-top: 0; }
.focus-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.focus-row p { margin: 0; flex: 1; min-width: 220px; font-size: 13px; }
.focus-row select, .proposal-note {
  border: 1px solid var(--line); background: var(--field); color: var(--text); border-radius: var(--radius); padding: 6px 8px; font-size: 14px;
}
.proposals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.proposal { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.proposal.status-dropped, .proposal.status-later { opacity: 0.65; }
.proposal-order { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.proposal-rank { font-weight: 600; color: var(--muted); font-size: 13px; }
.proposal-body { flex: 1; min-width: 0; }
.proposal-head, .proposal-size { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 4px; }
.proposal-size { font-size: 13px; color: var(--muted); }
.proposal-summary { margin: 4px 0 8px; white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.proposal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.proposal-note { flex: 1; min-width: 180px; font-size: 13px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 8px; padding: 0; font-size: 12px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.chart-wrap { position: relative; overflow-x: auto; }
.work-chart { width: 100%; min-width: 540px; height: auto; display: block; }
.work-chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.work-chart .axis { stroke: var(--chart-axis); stroke-width: 1; }
.work-chart .tick { fill: var(--muted); font-size: 11px; }
.work-chart .hit { fill: transparent; cursor: default; }
.work-chart .hit:hover, .work-chart .hit:focus { fill: var(--text); fill-opacity: 0.04; outline: none; }
.chart-tip {
  position: absolute; top: 8px; transform: translateX(12px); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); border-radius: 8px; padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 2px;
  pointer-events: none; min-width: 150px; z-index: 2;
}
.chart-tip.flip { transform: translateX(calc(-100% - 12px)); }
.chart-tip[hidden] { display: none; }
.tip-row { display: flex; align-items: center; gap: 6px; }
.work-table, .last-week { margin-top: 10px; font-size: 13px; }
.work-table summary, .last-week summary, .backlogs summary, details.backlog summary { cursor: pointer; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.work-table table { border-collapse: collapse; margin-top: 8px; }
.work-table th, .work-table td { border-bottom: 1px solid var(--line); padding: 4px 10px; text-align: right; white-space: nowrap; }
.work-table th:first-child { text-align: left; }
.last-week h3 { font-size: 13px; margin: 10px 0 4px; }
.last-week ul { margin: 0; padding-left: 18px; }
.backlogs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.backlogs ol { margin: 6px 0 0; padding-left: 22px; font-size: 13px; }
details.backlog { margin-top: 10px; }
details.backlog .plan { margin-top: 6px; }

/* Map: how the pipelines feed each other and the goal. */
/* Overview: every project under way, one card each */

.projects { max-width: 980px; margin: 0 auto; padding: 0 0 48px; display: flex; flex-direction: column; gap: 16px; }
.projects-lede { margin: 0; color: var(--muted); font-size: 14px; }
.projects a { color: inherit; text-decoration: none; }
.projects a:hover { text-decoration: underline; }
.project { scroll-margin-top: 80px; }
.project.focused { border-color: var(--text); }
.project-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
.project-head h2 { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 0 4px 0 0; }
.project-bar { list-style: none; margin: 0 0 8px; padding: 0; display: flex; gap: 3px; }
.project-bar li {
  flex: 1; min-width: 0; padding: 3px 6px; border-radius: 4px; font-size: 11px; text-align: center;
  background: var(--gray-bg); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.project-bar li.past { background: var(--green-pill); color: var(--green-text); }
.project-bar li.current { background: var(--primary); color: var(--primary-text); font-weight: 500; }
.project-where { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.project-where strong { color: var(--text); font-weight: 500; }
.project-people { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.person { border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.project-now { list-style: none; margin: 0 0 10px; padding: 0; border-top: 1px solid var(--line); font-size: 14px; }
.project-now li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.person.lead { border-color: var(--text); font-weight: 500; }
.pipeline-link { margin: 0 0 10px; font-size: 14px; }
.project-facts { margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 700px) {
  .project-bar li { font-size: 0; padding: 4px 0; }
}

.map { max-width: 980px; margin: 0 auto; padding: 0 0 48px; display: flex; flex-direction: column; gap: 16px; }
.map > .meta { margin: 16px 0 0; }
.map-scroll { overflow-x: auto; }
.map-canvas { position: relative; min-width: 620px; display: flex; flex-direction: column; gap: 64px; padding: 4px 0 8px; }
.map-row { display: flex; justify-content: center; gap: 24px; }
.map-row > .map-node { flex: 1 1 0; max-width: 300px; }
.map-canvas .map-row:last-child:not(:first-child) > .map-node:only-child { max-width: none; }
.map-node {
  position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text);
  padding: 14px 16px; font: inherit; cursor: pointer; box-shadow: var(--shadow);
}
.map-node:hover { background: var(--card-hover); }
.map-node.goal { border-color: var(--green-text); background: var(--green-bg); max-width: 380px; }
.map-node.focused { border-color: var(--blue-text); }
.map-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.map-head strong { font-weight: 500; }
.map-line { color: var(--muted); font-size: 13px; }
.map-number b { font-weight: 500; font-size: 15px; }
.map-items { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.map-facts { color: var(--muted); font-size: 12px; }
.map-arrows { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.map-arrows path { fill: none; stroke: var(--muted); stroke-width: 1.25; }
.map-arrows text { fill: var(--muted); font-size: 12px; }
.map-side { border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px 16px; }
.map-side h2 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 10px; }
.map-side h2.part-head { font-size: 28px; font-weight: 400; color: var(--text); margin: 0 0 14px; }
.map-side .map-row { justify-content: flex-start; }
.map-node.side { box-shadow: none; }
.map-period { display: block; font-size: 12px; }
.map-feeds { font-size: 12px; color: var(--text); }

/* Home: AI asks on the left, your work on the right, a line between. */
.home { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.home-open { max-width: 1440px; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr); }
.home-ai { padding: 8px 32px 32px 0; border-right: 1px solid var(--line); }
.home-mine { padding: 8px 0 32px 32px; }
.home-label { margin: 20px 0 8px; font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0.01em; }
.home-label:first-child { margin-top: 0; }
.home-q, .home-done {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow), 0 0 0 1px var(--line);
  padding: 18px 20px;
}
.home-q h3, .home-done h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.3; margin: 10px 0 8px; }
.home-q-where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.home-q-rec { margin: 0 0 10px; }
.home-q-rec strong { font-weight: 500; }
.home-q-data { margin: 0 0 12px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; }
.home-q-data summary { cursor: pointer; color: var(--muted); }
.home-q-data p, .home-q-data ul, .home-q-data ol { margin: 6px 0; }
.home-q-opts { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.home-q-opts strong { font-weight: 500; color: var(--text); }
.home-how { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.home-how code { font-size: 12px; padding: 1px 5px; border-radius: 4px; background: var(--gray-bg); color: var(--text); }
.home-project { margin: 0 0 18px; }
.home-project h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 18px; }
.home-project h3 a { color: inherit; text-decoration: none; margin-right: 2px; }
.home-project h3 a:hover { text-decoration: underline; }
.home-project-wait { margin: 0 0 6px; font-size: 13px; }
.home-next { margin-top: 20px; }
.home-next ul, .home-tasks, .home-answers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.home-next-q, .home-task {
  width: 100%; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--card); border: 0; border-radius: var(--radius); box-shadow: var(--shadow), 0 0 0 1px var(--line); padding: 8px 10px;
}
.home-next-q { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; }
.home-next-q:hover, .home-task:hover { background: var(--card-hover); }
.home-task-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); }
.home-answers li { font-size: 13px; }
.home-none { margin: 0; font-size: 13px; }
.home-add { --col-pill: var(--gray-pill); margin-top: 16px; }
.home-q-pictures { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.home-q-pictures:hover, .home-q-pictures.active { background: var(--card-hover); }
.home-q-thumbs { display: flex; gap: 3px; }
.home-q-thumbs img { width: 34px; height: 34px; object-fit: cover; border-radius: 4px; display: block; }
.home-detail { padding: 8px 0 32px 32px; min-width: 0; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow: auto; }
.home-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: var(--bg); padding: 4px 0; z-index: 1; }
.home-detail-head .home-head { margin: 0; }
.home-detail-close { width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.home-detail-close:hover { background: var(--card-hover); }
.home-detail-q { margin: 6px 0 16px; color: var(--muted); }
.home-detail-group h2 { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 8px; font-family: var(--serif); font-weight: 400; font-size: 18px; }
.home-detail-group h2 .muted { font-family: var(--sans); font-size: 13px; }
.home-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.home-detail-grid figure { margin: 0; }
.home-detail-img { display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--gray-bg); cursor: zoom-in; }
.home-detail-img img { display: block; width: 100%; height: auto; }
.home-detail-grid figcaption { margin-top: 5px; font-size: 13px; line-height: 1.35; }
.picture-dialog { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: none; cursor: zoom-out; }
.picture-dialog::backdrop { background: rgba(0, 0, 0, 0.85); }
.picture-dialog img { display: block; max-width: 96vw; max-height: 90vh; object-fit: contain; margin: 0 auto; }
.picture-dialog p { margin: 8px 0 0; color: #fff; text-align: center; font-size: 14px; }
.home-who { max-width: 420px; margin: 48px auto; text-align: center; }
.home-who h2 { font-family: var(--serif); font-weight: 400; }
.home-who-names { display: flex; justify-content: center; gap: 8px; }
@media (max-width: 800px) {
  .home { grid-template-columns: 1fr; }
  .home-ai { border-right: 0; padding: 8px 0 24px; border-bottom: 1px solid var(--line); }
  .home-mine { padding: 24px 0 32px; }
  .home-detail { position: fixed; inset: 0; z-index: 50; overflow: auto; padding: 12px 16px 32px; background: var(--bg); }
}

/* A project's page: its plan questions, decisions, tasks and comments. */
.project-page { gap: 20px; }
.project-back { display: flex; margin: 0; font-size: 14px; }
.plan-block h2 .plan-count, .decisions h2 .plan-count { font-size: 13px; font-weight: 400; }
.plan-lede { margin: 0 0 12px; font-size: 14px; }
.plan-q { border-top: 1px solid var(--line); padding: 12px 0; }
.plan-q:last-child { padding-bottom: 0; }
.plan-q h3 { font-size: 15px; font-weight: 600; margin: 0; }
.plan-q-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.plan-by { font-size: 12px; }
.plan-hint { margin: 2px 0 8px; font-size: 13px; }
.plan-q:not(.empty-q):not(.editing) .plan-hint { display: none; }
.plan-answer { font-size: 14px; margin-top: 4px; }
.plan-answer > :first-child { margin-top: 0; }
.plan-answer > :last-child { margin-bottom: 0; }
.plan-answer ul { padding-left: 20px; }
.plan-fill { font-size: 13px; }
.plan-block.compact { margin: 8px 0 12px; max-width: 760px; }
.plan-block.compact summary { cursor: pointer; font-size: 14px; font-weight: 500; }
.plan-block.compact .plan-q { padding: 10px 0; }
.item-page-link { font-size: 14px; color: var(--link); text-decoration: none; }
.item-page-link:hover { text-decoration: underline; }
.decision-list { max-height: none; }
.decision-line { margin: 4px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.decision-line .pill { font-size: 11px; }
.decision-fields { display: flex; flex-direction: column; gap: 6px; }
.decision-fields[hidden] { display: none; }
.decision-fields input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--field); color: var(--text); border-radius: var(--radius); padding: 6px 8px; font: inherit; font-size: 13px; }
.project-tasks h2, .decisions h2, .plan-block h2 { font-family: var(--serif); font-weight: 400; font-size: 20px; }
.project-comments { border-top: 0; margin-top: 0; padding-top: 0; }
.project-comments .comment-list { max-height: none; }
.home-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 28px; }
.home-head .muted { font-family: var(--sans); font-size: 14px; }
.progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.progress-bar { flex: 0 0 120px; height: 6px; border-radius: 3px; background: var(--gray-pill); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--green-text); border-radius: 3px; }
.task-decisions { margin-bottom: 16px; }
.task-decisions .decision-list { max-height: none; }
.decisions-ai { font-weight: 400; }
.home-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.home-tab-count { margin-left: 6px; font-size: 12px; opacity: 0.7; }
.person-projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 8px 32px; }
.person-projects .home-project h3 { font-size: 18px; }
.person-count { font-family: var(--sans); font-size: 14px; margin-left: 10px; }
.person-add { margin-top: 4px; border: 1px solid var(--line); background: var(--field); color: var(--muted); border-radius: var(--radius); padding: 4px 8px; font-size: 13px; }

/* The comment form's decision and direction fields. */
.decision-fields [hidden] { display: none; }
.q-ref { font-weight: 500; }
