/* Huddy — Excalidraw-flavoured, server-rendered. No inline styles (CSP). */
@font-face {
  font-family: "Excalifont";
  src: url("/static/excalifont.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/static/nunito.woff2") format("woff2");
  font-display: swap;
}
:root {
  --ink: #1e1e1e;
  --muted: #868e96;
  --paper: #ffffff;
  --grid: #e9ecef;
  --goal: #1971c2;  --goal-bg: #a5d8ff;
  --task: #2f9e44;  --task-bg: #b2f2bb;
  --dec:  #f08c00;  --dec-bg:  #ffec99;
  --red:  #e03131;
  --hand: "Excalifont", "Comic Sans MS", "Segoe Print", cursive;
  --text: "Nunito", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--paper); }   /* keeps body's background off the (unfiltered) canvas */
body {
  min-height: 100vh;
  background-color: var(--paper);
  background-image: radial-gradient(var(--grid) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--text);
  font-size: 15px;
}
/* Dark mode = Excalidraw's own trick: invert the whole canvas. */
@media (prefers-color-scheme: dark) {
  html { background: #121212; }
  body { filter: invert(93%) hue-rotate(180deg); }
}
a { color: inherit; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
pre { white-space: pre-wrap; word-break: break-all; background: #f8f9fa; padding: 10px 12px; border-radius: 6px; }

/* sketched frames: server-generated SVG stretched over the element */
.sk { position: relative; isolation: isolate; }
.sk > svg.frame {
  position: absolute; left: -5px; top: -5px;
  width: calc(100% + 10px); height: calc(100% + 10px);
  overflow: visible; pointer-events: none; z-index: -1;
}
svg.icon { flex: none; vertical-align: middle; }
.k-ink { stroke: var(--ink); } .k-red { stroke: var(--red); }
.k-goal { stroke: var(--goal); } .k-goal-bg { stroke: var(--goal-bg); }
.k-task { stroke: var(--task); } .k-task-bg { stroke: var(--task-bg); }
.k-dec { stroke: var(--dec); } .k-dec-bg { stroke: var(--dec-bg); }
.f-dec { fill: var(--dec); }

.board { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; }

header.top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
header.top h1 { font-family: var(--hand); font-weight: normal; font-size: 40px; margin: 0; letter-spacing: .5px; }
header.top h1 a { text-decoration: none; }
.team { font-family: var(--hand); font-size: 20px; color: var(--muted); }
.stats { margin-left: auto; font-family: var(--hand); font-size: 18px; display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.stats a { text-decoration: none; }
.blk { color: var(--red); }
.live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 2px; }
.live.on::before { background: var(--task); }
.banner { flex-basis: 100%; color: var(--red); font-family: var(--hand); font-size: 18px; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }

.agents { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 6px 0 22px; align-items: center; }
.chip { padding: 3px 12px 4px; font-family: var(--hand); font-size: 16px; white-space: nowrap; text-decoration: none; }
.chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--task); vertical-align: 1px; }
.chip.away { color: var(--muted); }
.chip.away .dot { background: transparent; border: 1.5px solid var(--muted); }
.clear { font-family: var(--hand); color: var(--muted); }
.muted { color: var(--muted); }

.zone { margin-bottom: 26px; }
.zone h2 { font-family: var(--hand); font-weight: normal; font-size: 26px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.zone h2 small { font-size: 17px; color: var(--muted); }
.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr); } }

.decisions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card { padding: 14px 16px 12px; min-height: 120px; }
.card .title { font-family: var(--hand); font-size: 21px; line-height: 1.25; margin: 2px 0 6px; overflow-wrap: anywhere; }
.meta { font-size: 13px; color: var(--muted); }
.detail { font-size: 14px; margin: 6px 0 10px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
details.detail summary, details.sub summary { cursor: pointer; }
.tag { position: absolute; top: -16px; right: 14px; padding: 1px 9px 2px; font-family: var(--hand); font-size: 16px; color: var(--red); transform: rotate(3deg); background: var(--paper); }
.ic { position: absolute; top: -12px; left: 12px; background: var(--paper); padding: 0 3px; }
.yours { font-family: var(--hand); font-size: 16px; color: var(--goal); white-space: nowrap; }
.options { font-size: 14px; margin: 0 0 10px; }
.options b { font-weight: 600; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; align-items: center; }
.seen { font-family: var(--hand); font-size: 16px; color: var(--muted); }
.btn { font-family: var(--hand); font-size: 17px; padding: 2px 12px 3px; background: none; border: 0; color: var(--ink); cursor: pointer; }
details.hide { font-family: var(--hand); font-size: 16px; color: var(--muted); }
details.hide summary { cursor: pointer; list-style: none; }
details.hide summary::-webkit-details-marker { display: none; }
details.hide form { display: flex; gap: 8px; margin-top: 6px; }
details.hide input { font: 14px var(--text); padding: 3px 6px; border: 1px solid var(--grid); border-radius: 4px; min-width: 0; }
details.comment { font-family: var(--hand); font-size: 16px; color: var(--muted); }
details.comment summary { cursor: pointer; list-style: none; }
details.comment summary::-webkit-details-marker { display: none; }
details.comment[open] { flex-basis: 100%; }
details.comment form { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 6px; width: 100%; max-width: 360px; }
.task .side details.comment form { width: min(320px, 60vw); }
details.comment textarea { font: 14px var(--text); padding: 4px 6px; border: 1px solid var(--grid); border-radius: 4px; width: 100%; box-sizing: border-box; resize: vertical; background: var(--paper); color: var(--ink); }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { font: 15px var(--hand); padding: 2px 10px 3px; background: var(--dec-bg); border: 1.5px solid var(--dec); border-radius: 12px; color: var(--ink); cursor: pointer; }
.thread { margin: 6px 0 8px; display: flex; flex-direction: column; gap: 3px; }
.cm { font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; border-left: 2px solid var(--grid); padding-left: 8px; }
.cm b { font-weight: 600; }
.cm.agent { border-left-color: var(--goal); }
.cm.agent b { color: var(--goal); }
.cm .age { color: var(--muted); }
.cm .receipt { display: block; font-size: 12px; color: var(--muted); }
.thread details.earlier { font-size: 13px; color: var(--muted); }
.thread details.earlier summary { cursor: pointer; }
.hint { font-family: var(--hand); font-size: 17px; color: var(--muted); margin-top: 14px; }
.more { font-family: var(--hand); font-size: 18px; color: var(--muted); padding: 6px 4px; }

.goals { display: flex; flex-direction: column; gap: 18px; }
.goal { display: flex; align-items: center; gap: 12px; }
.goal .bubble { padding: 14px 18px 16px; font-family: var(--hand); font-size: 20px; line-height: 1.2; flex: 1; min-width: 0; text-align: center; overflow-wrap: anywhere; }
.goal .who { display: flex; flex-direction: column; gap: 4px; font-family: var(--hand); font-size: 14px; color: var(--muted); flex: none; width: 190px; overflow-wrap: anywhere; }
.goal .who .away { opacity: .6; }
.goal { flex-wrap: wrap; }
.goal > .thread, .goal > details.comment { flex-basis: 100%; margin-top: 0; }

.tasks { display: flex; flex-direction: column; gap: 6px; }
.task { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 8px 6px; }
.task .t { font-family: var(--hand); font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.task .side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.task .meta { white-space: nowrap; padding-top: 4px; }
.sub { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.task.stale { opacity: .45; }
.overlap { color: var(--goal); font-family: var(--hand); font-size: 16px; }
@media (max-width: 560px) {
  .task { grid-template-columns: 26px minmax(0, 1fr); }
  .task .side { grid-column: 2; align-items: flex-start; }
  .goal { flex-direction: column; align-items: stretch; }
  .goal .who { width: auto; }
}

.legend { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--hand); font-size: 16px; color: var(--muted); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.faded { opacity: .45; }
footer { font-family: var(--hand); font-size: 15px; color: var(--muted); margin-top: 18px; display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline; }
form.inline { display: inline; }

/* small pages: login, settings, consent */
.narrow { max-width: 640px; margin: 0 auto; padding: 24px 16px 60px; }
header.mini { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
header.mini .logo { font-family: var(--hand); font-size: 34px; text-decoration: none; }
.narrow .card { padding: 22px 24px 18px; background: transparent; }
.narrow h1 { font-family: var(--hand); font-weight: normal; font-size: 30px; margin: 0 0 12px; }
.narrow h2 { font-family: var(--hand); font-weight: normal; font-size: 24px; margin: 26px 0 8px; }
.narrow h3 { font-family: var(--hand); font-weight: normal; font-size: 20px; margin: 18px 0 6px; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-size: 14px; }
.field input, .field select { font: 16px var(--text); padding: 6px 8px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); }
.check { display: block; margin: 8px 0; font-size: 14px; }
.notice { color: var(--dec); }
.error { color: var(--red); }
.rows { padding-left: 18px; }
.rows li { margin: 6px 0; font-size: 14px; }
.rows form.inline { margin-left: 8px; }
.secret pre { border: 1.5px dashed var(--dec); }
.row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 14px; align-items: end; }

/* documents */
.page { max-width: 860px; margin: 0 auto; padding: 24px 16px 60px; }
.page h1 { font-family: var(--hand); font-weight: normal; font-size: 32px; margin: 0 0 8px; overflow-wrap: anywhere; }
.page > h1 + p { margin-top: 0; }
header.mini .links { margin-left: auto; display: flex; gap: 14px; font-family: var(--hand); font-size: 18px; }
header.mini .links a { text-decoration: none; }
.search input { font: 15px var(--text); padding: 6px 8px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); width: 100%; max-width: 360px; margin: 6px 0 14px; }
.doclist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.docrow { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.docrow .t { font-family: var(--hand); font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.docs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 6px; justify-content: inherit; }
.goal .bubble .docs { justify-content: center; margin-bottom: 0; }
.doclink { display: inline-flex; align-items: center; gap: 4px; font-family: var(--hand); font-size: 16px; color: var(--goal); text-decoration: none; overflow-wrap: anywhere; }
.doclink:hover { text-decoration: underline; }
.doclink svg.icon { width: 18px; height: 18px; }
.dochead { margin-bottom: 18px; }
.crumbs { font-size: 14px; margin-top: 4px; }
.doc-src { white-space: pre-wrap; word-break: normal; overflow-wrap: anywhere; }
.doc-body { line-height: 1.55; overflow-wrap: anywhere; }
.doc-body h1, .doc-body h2, .doc-body h3 { font-family: var(--hand); font-weight: normal; line-height: 1.2; margin: 1.3em 0 .4em; }
.doc-body h1 { font-size: 30px; } .doc-body h2 { font-size: 25px; } .doc-body h3 { font-size: 21px; }
.doc-body h4, .doc-body h5, .doc-body h6 { margin: 1.2em 0 .4em; }
.doc-body img { max-width: 100%; height: auto; }
.doc-body pre { white-space: pre; overflow-x: auto; word-break: normal; }
.doc-body :not(pre) > code { background: #f1f3f5; padding: 1px 4px; border-radius: 4px; }
.doc-body blockquote { margin: 1em 0; padding: 2px 14px; border-left: 3px solid var(--grid); color: #495057; }
.doc-body table { border-collapse: collapse; display: block; overflow-x: auto; margin: 1em 0; }
.doc-body th, .doc-body td { border: 1px solid #dee2e6; padding: 5px 9px; text-align: left; vertical-align: top; }
.doc-body hr { border: 0; border-top: 1.5px dashed var(--muted); margin: 2em 0; }
.docside { margin-top: 34px; padding-top: 6px; border-top: 1.5px dashed var(--grid); }
.docside h2 { font-family: var(--hand); font-weight: normal; font-size: 22px; margin: 16px 0 6px; }
.docside .opts { margin-top: 16px; gap: 18px; }
.docside a.btn { text-decoration: none; }
/* the dark-mode canvas inversion would invert pictures too: undo it for them */
@media (prefers-color-scheme: dark) {
  .doc-body img { filter: invert(100%) hue-rotate(180deg); }
}
