/* Worklog's look: dark surfaces, amber accent, Georgia headings ending in an amber dot. */
:root {
  color-scheme: dark;
  --bg: #121212;
  --panel: #1a1a1a;
  --panel-2: #202020;
  --sunk: #161616;
  --fg: #d6d6d6;
  --strong: #f2f2f2;
  --muted: #8f8f8f;
  --line: #2b2b2b;
  --line-strong: #414141;
  --accent: #e68e0d;
  --accent-text: #f0a73c;
  --on-accent: #000000;
  --accent-soft: #2a1f0e;
  --button: #232323;
  --button-hover: #2e2e2e;
  --ok: #6fc28b;
  --ok-soft: #15261b;
  --bad: #f07b6c;
  --bad-soft: #2e1814;
  --warn: #e3b25a;
  --warn-soft: #2a2312;
  --code-bg: #0c0c0c;
  --code-fg: #e2e2e2;
  --s-draft: #a3a3a3; --s-draft-bg: #262626;
  --s-open: #a9b9cf; --s-open-bg: #1c232c;
  --s-progress: #f0a73c; --s-progress-bg: #2a1f0e;
  --s-totest: #8fb8ff; --s-totest-bg: #18233a;
  --s-clientreview: #c4a5f2; --s-clientreview-bg: #261e33;
  --s-monitoring: #6fd0c3; --s-monitoring-bg: #12292a;
  --s-hold: #f07b6c; --s-hold-bg: #2e1814;
  --s-closed: #6fc28b; --s-closed-bg: #15261b;
  --radius: 9px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14.5px/1.55 var(--sans); }
a { color: var(--accent-text); }
h1 { font-family: var(--serif); font-size: 40px; font-weight: 400; line-height: 1.15; letter-spacing: -1.2px; color: var(--strong); margin: 0 0 10px; }
h1 span, .brand span { color: var(--accent); }
h2 { font-size: 15px; font-weight: 600; color: var(--strong); margin: 0 0 10px; }
h3 { font-size: 13px; margin: 14px 0 6px; color: var(--strong); }
ul, ol { margin: 0; padding-left: 1.3em; }
li + li { margin-top: 4px; }
code { font-family: var(--mono); font-size: .86em; background: var(--panel-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

.preview-bar { background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 13px; padding: 7px 20px; text-align: center; }
.preview-bar a { color: var(--on-accent); margin-left: 8px; }
.top { display: flex; align-items: center; gap: 24px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--sunk); }
.brand { font-family: var(--serif); font-size: 22px; letter-spacing: -.5px; color: var(--strong); text-decoration: none; }
.top nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--fg); }
.top nav a[aria-current] { color: var(--strong); border-bottom-color: var(--accent); }
.who, .signout { color: var(--muted); font-size: 13px; }

main { max-width: 1280px; margin: 0 auto; padding: 26px 20px 64px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.page-header p { margin: 0; }
.header-actions { display: flex; gap: 8px; }
.eyebrow { color: var(--muted); font-size: 10px; letter-spacing: 2px; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; }
.eyebrow a { color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--line-strong); }
.eyebrow a:hover { color: var(--accent-text); }
.muted, .hint, .meta { color: var(--muted); }
.hint, .meta { font-size: 13px; }
.meta { margin: 8px 0 0; }
.empty { color: var(--muted); padding: 32px 0; }
.nowrap { white-space: nowrap; }
.crumb { margin: 0 0 14px; font-size: 13px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--fg); }
.section-h { margin-top: 32px; }
.ok-text { color: var(--ok); font-weight: 600; }

button, .button {
  font: inherit; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--button); color: var(--fg); cursor: pointer; text-decoration: none; white-space: nowrap;
}
button:hover, .button:hover { background: var(--button-hover); }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
button.primary:hover, .button.primary:hover { background: #f09b20; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.small, .button.small { padding: 4px 11px; font-size: 12px; }
button.icon { padding: 3px 10px; font-size: 16px; color: var(--muted); }
button.danger { color: var(--bad); border-color: var(--bad-soft); }
.button.quiet { border-color: transparent; background: none; color: var(--muted); }

input[type=text], input[type=email], input[type=url], input[type=date], select, textarea {
  font: inherit; color: var(--fg); background: var(--sunk);
  border: 1px solid var(--line-strong); border-radius: 7px; padding: 8px 10px; width: 100%;
}
input[type=file] { color: var(--muted); font: inherit; font-size: 13px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 10px; }

.pill, .prio, .chip, .tag, .count-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; white-space: nowrap; }
.s-draft { color: var(--s-draft); background: var(--s-draft-bg); }
.s-open { color: var(--s-open); background: var(--s-open-bg); }
.s-progress { color: var(--s-progress); background: var(--s-progress-bg); }
.s-totest { color: var(--s-totest); background: var(--s-totest-bg); }
.s-clientreview { color: var(--s-clientreview); background: var(--s-clientreview-bg); }
.s-monitoring { color: var(--s-monitoring); background: var(--s-monitoring-bg); }
.s-hold { color: var(--s-hold); background: var(--s-hold-bg); }
.s-closed { color: var(--s-closed); background: var(--s-closed-bg); }
.prio { font-weight: 500; color: var(--muted); background: var(--panel-2); }
.p-high { color: #ffb36b; background: #33210f; font-weight: 600; }
.chip { font-weight: 500; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.chip.env-prod { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.chip.env-sbx { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.tag { font-size: 11px; color: var(--accent-text); background: var(--accent-soft); }
.count-chip { font-weight: 500; font-size: 11.5px; color: var(--muted); background: var(--panel-2); }
.new { font-size: 11px; font-weight: 700; color: var(--on-accent); background: var(--accent); padding: 1px 7px; border-radius: 999px; vertical-align: 1px; }

.banner { background: var(--warn-soft); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; }
.banner.error { background: var(--bad-soft); border-color: #5a2a22; }
.banner ul { margin-top: 4px; }
.message { max-width: 600px; margin: 48px auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.message h1 { font-size: 32px; }

/* dashboard */
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 18px; }
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); min-width: 160px; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
table.tasks { width: 100%; border-collapse: collapse; }
.tasks th { text-align: left; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tasks td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tasks tr:last-child td { border-bottom: 0; }
.tasks tbody tr:hover { background: var(--panel-2); }
.t-title a { color: var(--strong); font-weight: 600; text-decoration: none; }
.t-title a:hover { color: var(--accent-text); }
.client-link { color: var(--fg); text-decoration: none; border-bottom: 1px dashed var(--line-strong); }
.client-link:hover { color: var(--accent-text); border-bottom-color: var(--accent); }
.tasks tr.inactive td { color: var(--muted); }

/* task page */
.task-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.task-head .eyebrow { margin-bottom: 0; }
.task-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
h1.task-title { font-size: 34px; margin: 0; max-width: 30ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.progress { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-weight: 600; }
.progress progress { flex: 1; min-width: 160px; height: 7px; border: 0; border-radius: 4px; background: var(--panel-2); overflow: hidden; appearance: none; }
.progress progress::-webkit-progress-bar { background: var(--panel-2); }
.progress progress::-webkit-progress-value { background: var(--ok); border-radius: 4px; }
.progress progress::-moz-progress-bar { background: var(--ok); }
.task-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1040px) {
  .task-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .thread { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
  .thread > .comments { overflow-y: auto; min-height: 0; flex: 1; }
}
.brief, .thread, .panel, .review-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; min-width: 0; }
.b-sec { padding: 18px 0; border-top: 1px solid var(--line); }
.b-sec:first-child { border-top: 0; padding-top: 0; }
.b-sec > h2, .group-h { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.group-h { margin: 6px 0 10px; }
.group-h ~ .group-h { margin-top: 22px; }
.goal-text { font-size: 17px; color: var(--strong); }
.ask-sec .md { border-left: 3px solid var(--accent); padding-left: 14px; }
.never-sec li { color: var(--strong); }
.sub { display: block; color: var(--muted); font-size: 13px; }
.md p, .md ul, .md ol, .md h4 { margin: 0 0 10px; }
.md > :last-child { margin-bottom: 0; }
.md h4 { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin-top: 16px; }
.md img { display: block; max-width: 100%; max-height: 520px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; margin: 6px 0; }
.md .shot { display: inline-block; }
.md .clip { margin: 8px 0 14px; max-width: 760px; }
.md .clip video { display: block; width: 100%; border-radius: 8px; background: #000; border: 1px solid var(--line-strong); }
.md .clip figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.pass, .fail { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; margin-right: 4px; }
.pass { color: var(--ok); background: var(--ok-soft); }
.fail { color: var(--bad); background: var(--bad-soft); }

.codebox { margin: 4px 0 12px; min-width: 0; }
.cb-bar { display: flex; align-items: center; gap: 12px; background: var(--code-bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; padding: 8px 10px; }
.cb-bar button.copy { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; padding: 6px 13px; }
.cb-bar button.copy.ok { background: var(--ok); border-color: var(--ok); }
.cb-count { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.codebox pre { margin: 0; max-height: 420px; overflow: auto; background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 12px 14px; font: 12.5px/1.5 var(--mono); tab-size: 4; }
.codebox pre code { background: none; border: 0; padding: 0; font-size: inherit; white-space: pre; overflow-wrap: normal; }

.checks { list-style: none; padding: 0; }
.checks > li { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--sunk); }
.checks > li + li { margin-top: 8px; }
.checks > li.ticked { background: var(--ok-soft); border-color: transparent; }
.check-row { display: flex; gap: 12px; align-items: flex-start; }
.check-text { flex: 1; min-width: 0; }
.check-text small { display: block; color: var(--muted); font-size: 12px; }
.done-box { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; flex: none; padding-top: 2px; }
.done-box input { width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: var(--ok); }
.done-box input:disabled { cursor: not-allowed; }
.ev { display: flex; gap: 6px; margin: 10px 0 0; }
.ev input { padding: 5px 9px; font-size: 13px; }
.ev-text { margin: 8px 0 0; font-size: 13px; }
.tick .meta { margin-top: 6px; }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 16px; }
.item > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; }
.item > summary::-webkit-details-marker { display: none; }
.item[open] > summary { border-bottom: 1px solid var(--line); }
.num { font: 400 24px/1 var(--serif); color: var(--accent); min-width: 2.2em; font-variant-numeric: tabular-nums; }
.sum-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sum-head { font-size: 10px; letter-spacing: 1.6px; color: var(--muted); font-weight: 600; }
.sum-title { font-weight: 600; color: var(--strong); }
.item.is-done { background: var(--ok-soft); border-color: transparent; }
.item.is-done .num { color: var(--ok); }
.item.is-done .sum-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--ok); }
.item .body { padding: 14px 18px 16px; min-width: 0; }
li:target, .item:target { box-shadow: 0 0 0 2px var(--accent); }

.item-thread { margin-top: 10px; }
.item-thread .comments { margin: 0 0 8px; border-left: 2px solid var(--line-strong); padding-left: 12px; }
details.say > summary { display: inline-block; cursor: pointer; color: var(--accent-text); font-size: 13px; list-style: none; }
details.say > summary::-webkit-details-marker { display: none; }
details.say > summary::before { content: "+ "; }
details.say[open] > summary::before { content: "− "; }
details.say form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
details.say form > button { align-self: flex-start; }

.handin-sec .creator-note { color: var(--warn); margin: 0 0 12px; }
.handed { margin: 10px 0 14px; }
.handin { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin-top: 12px; }
.handin > label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.handin > button { align-self: flex-start; }

.thread h2 { margin-bottom: 12px; }
.comments { list-style: none; padding: 0; margin: 0 0 16px; }
.c { padding: 10px 0; border-bottom: 1px solid var(--line); }
.c + .c { margin-top: 0; }
.c-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 4px; }
.c-h b { color: var(--strong); }
.c-h time, .c.system time { color: var(--muted); font-size: 12px; }
.c-ref { display: inline-block; font-size: 12px; color: var(--accent-text); margin-bottom: 4px; text-decoration: none; }
.c-ref:hover { text-decoration: underline; }
.c-b { overflow-wrap: anywhere; }
.c-b .md img { max-height: 260px; }
.c.backbrief .c-b { background: var(--accent-soft); border-radius: 7px; padding: 8px 10px; }
.c.system { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.change { display: inline-flex; align-items: center; gap: 4px; }
.composer { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.composer label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.composer button { align-self: flex-end; }
.need { margin: 0; font-size: 13px; color: var(--warn); }
.need:empty { display: none; }
.need.error { color: var(--bad); font-weight: 600; }
.feed { list-style: none; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.feed .c { padding: 14px 18px; }
.feed .c:last-child { border-bottom: 0; }

.review-card { border-color: var(--accent); margin-bottom: 22px; }
.review-card > p { margin: 0 0 12px; }
.flags { list-style: none; padding: 0; }
.flags li + li { margin-top: 8px; }
.flags label { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.flags label input { margin-top: 3px; flex: none; }
.flags b { color: var(--strong); margin-right: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }

.dialog { background: var(--panel); color: var(--fg); border: 1px solid var(--line-strong); border-radius: 14px; padding: 22px 24px; width: min(560px, calc(100vw - 32px)); }
.dialog::backdrop { background: #000000b8; }
.dialog h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 6px; }
.dialog form { display: flex; flex-direction: column; gap: 12px; }
.field-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

/* task form */
.form-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1040px) {
  .form-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .form-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
}
fieldset { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px 20px; margin: 0 0 22px; min-width: 0; }
fieldset.audit { border-style: dashed; }
legend { font-family: var(--serif); font-size: 19px; color: var(--strong); padding: 0 8px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-top: 16px; min-width: 0; }
.field .label { font-weight: 600; color: var(--strong); font-size: 13.5px; }
.field .hint { margin-top: -3px; }
.cols { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cols { grid-template-columns: 1fr 1fr; } }
.due { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.due input[type=date] { flex: 1; min-width: 150px; }
.due label.check { margin-top: 0; }
.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; gap: 6px; align-items: center; }
.row input { flex: 1; min-width: 0; }
.rows.multi .row { flex-wrap: wrap; }
.rows.multi .row input { flex: 1 1 200px; }
.rows.multi .row input.narrow { flex: 0 1 190px; }
.rows.multi .row input.tiny { flex: 0 0 70px; }
.row.block { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); }
.row.block textarea { flex: 1 1 100%; font-family: var(--mono); font-size: 12.5px; }
button.add { align-self: flex-start; margin-top: 4px; }
.ready { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 18px; }
.ready.is-ok { border-left-color: var(--ok); }
.checks-list { list-style: none; padding: 0; font-size: 13.5px; }
.checks-list > li { padding-left: 22px; position: relative; }
.checks-list > li::before { position: absolute; left: 0; font-weight: 700; }
.checks-list > li.ok::before { content: "✓"; color: var(--ok); }
.checks-list > li.no::before { content: "✕"; color: var(--bad); }

/* clients */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.client-card { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--fg); }
.client-card:hover { border-color: var(--accent); }
.client-name { font-family: var(--serif); font-size: 21px; color: var(--strong); }
.client-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1040px) { .client-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.client-grid > div, .client-grid > aside { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.secrets { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.secret { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.secret-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.secret-h b { color: var(--strong); }
.secret-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; margin-top: 4px; }
.lbl { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 600; min-width: 82px; }
.secret-value { font-size: 13px; }
form.inline { display: inline; }
.secret-form { display: flex; flex-direction: column; gap: 10px; }
.secret-form label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.secret-form .cols { gap: 10px 16px; }
.plain { list-style: none; padding: 0; }
.plain li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plain li + li { margin-top: 8px; }
.log { list-style: none; padding: 0; font-size: 13px; }
.log b { color: var(--strong); }

/* people */
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.inline-form label.check.full { flex: 1 1 100%; flex-direction: row; margin-top: 0; color: var(--fg); }
.people-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.people-actions form { margin: 0; }
.people-actions .meta { margin: 0; }
.inline-form.compact { background: none; border: 0; padding: 12px 0 0; }
.inline-form.compact select { flex: 1; }
.inline-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); flex: 1 1 220px; }

/* client colors: Frank picks one of twelve on the client page */
.cl-0 { --cc: #6ea8fe; } .cl-1 { --cc: #f6a35b; } .cl-2 { --cc: #7bd88f; } .cl-3 { --cc: #f58fc7; }
.cl-4 { --cc: #5ccfe6; } .cl-5 { --cc: #f2d16b; } .cl-6 { --cc: #b69cff; } .cl-7 { --cc: #f4847a; }
.cl-8 { --cc: #4fd1c5; } .cl-9 { --cc: #d7b98e; } .cl-10 { --cc: #8c9eff; } .cl-11 { --cc: #c3e07a; }
.client-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--cc); background: color-mix(in srgb, var(--cc) 13%, transparent); border: 1px solid color-mix(in srgb, var(--cc) 32%, transparent); padding: 2px 10px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.client-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cc); }
a.client-chip:hover { background: color-mix(in srgb, var(--cc) 22%, transparent); }
.eyebrow .client-chip { font-size: 12px; }
.client-card { border-left: 4px solid var(--cc); }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -8px 0 20px; }
.swatch { width: 22px; height: 22px; padding: 0; border-radius: 50%; background: var(--cc); border: 2px solid transparent; }
.swatch:hover { background: var(--cc); filter: brightness(1.15); }
.swatch.on { border-color: var(--strong); box-shadow: 0 0 0 2px var(--bg) inset; }

/* sortable columns */
.tasks th a.sort { color: inherit; text-decoration: none; }
.tasks th a.sort:hover, .tasks th[aria-sort] a.sort { color: var(--strong); }

/* Frank edits in place */
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-h h2 { margin: 0 0 10px; }
.edit-btn { padding: 3px 10px; font-size: 12px; color: var(--accent-text); background: transparent; border-color: var(--line-strong); }
.edit-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.chips .edit-btn { margin-left: 4px; }
.step-edit { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; }
.linkish { background: none; border: 0; padding: 0; color: var(--bad); font: inherit; text-decoration: underline dotted; cursor: pointer; }
.flags { list-style: none; padding: 0; }
button.flag { display: block; width: 100%; text-align: left; white-space: normal; font-weight: 400; line-height: 1.5; background: var(--sunk); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 9px 12px; }
button.flag:hover { border-color: var(--accent); background: var(--accent-soft); }
button.flag b { color: var(--strong); margin-right: 6px; }
button.flag .tag { margin-right: 6px; }
button.flag.kept { border-left-color: var(--line-strong); opacity: .7; }
details.kept { margin-top: 12px; }
details.kept > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.kept .flags { margin-top: 8px; }
.flag-list { padding-left: 1.1em; font-size: 13px; }
.flag-list b { color: var(--strong); }
.dialog.wide { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
.dialog .field { margin-top: 10px; }
.flag-note { margin: 0; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 6px; padding: 8px 12px; font-size: 13.5px; color: var(--fg); }
.cols.three { grid-template-columns: minmax(0, 1fr); gap: 10px 14px; }
@media (min-width: 640px) { .cols.three { grid-template-columns: 110px 220px minmax(0, 1fr); } }
.dialog .cols label, .dialog .field-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
textarea.mono { font-family: var(--mono); font-size: 12.5px; }

/* images in text boxes and comments */
textarea.dropping { border-color: var(--accent); background: var(--accent-soft); }
.paste-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.paste-preview img { height: 56px; width: auto; border-radius: 5px; border: 1px solid var(--line-strong); background: #fff; display: block; }
.c-b .md img, .item-thread .md img, .handin-sec .comments .md img { max-height: 120px; max-width: 220px; }
.md a.shot { cursor: zoom-in; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: #000000d9; }
.lightbox img { display: block; max-width: 96vw; max-height: 94vh; border-radius: 8px; background: #fff; cursor: zoom-out; }
.handin-note { margin-top: -4px; }

/* sign-in */
.signin { max-width: 440px; margin: 9vh auto 0; }
.signin h1 { font-size: 44px; }
.signin-form { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 12px; }
.signin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.signin-form input { font-size: 16px; padding: 11px 12px; }
.signin-form button { padding: 11px 16px; font-size: 14px; }
.code-input { letter-spacing: 6px; font-family: var(--mono); }
form.signout { margin: 0; }
form.signout button { color: var(--muted); }

/* phones: each table row becomes a short card */
@media (max-width: 640px) {
  h1 { font-size: 32px; }
  h1.task-title { font-size: 26px; }
  .tasks thead { display: none; }
  table.tasks, .tasks tbody, .tasks tr { display: block; }
  .tasks tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tasks tr:last-child { border-bottom: 0; }
  .tasks td { display: inline-block; padding: 0; border: 0; margin: 3px 8px 0 0; color: var(--muted); font-size: 13px; }
  .tasks td.t-title { display: block; margin: 0 0 2px; font-size: 15px; }
  .item > summary { flex-wrap: wrap; gap: 8px 12px; }
  .brief, .thread, .panel, .review-card { padding: 16px; }
}
