/* Design C from docs/mockup/App.dc.html: warm dark for everyone; colleagues get it larger and simpler. */
:root {
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --accent: #F0B454;
  --on-accent: #16140F;
}
body.owner {
  --bg: #16140F; --surface: #1F1C15; --raised: #2B2720; --field: #16140F;
  --line: #37322A; --edge: #6B6456; --text: #EAE5D9; --muted: #A8A08F; --hot: #F0806A; --note: #6E5F45;
  --ctl: 32px;
  color-scheme: dark; font-size: 14px;
}
/* colleagues get the same dark palette, only larger: bigger type and 44px controls */
body.requester {
  --bg: #16140F; --surface: #1F1C15; --raised: #2B2720; --field: #16140F;
  --line: #37322A; --edge: #6B6456; --text: #EAE5D9; --muted: #A8A08F; --hot: #F0806A; --note: #6E5F45;
  --ctl: 44px;
  color-scheme: dark; font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg, #16140F); color: var(--text, #EAE5D9); font-family: var(--sans); line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.hide { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.filebtn:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.small { font-size: 14px; }
.filebtn { display: inline-flex; align-items: center; }
.stack.tight { gap: 8px; }
#main { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
body.requester .mono { font-size: 13px; }

/* controls */
.btn { min-height: var(--ctl); padding: 0 12px; border: 1px solid var(--edge); border-radius: 4px; background: transparent; }
.btn.primary { border: 0; background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 0 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.link { padding: 0; border: 0; background: none; color: var(--muted); text-decoration: underline; }
.field { min-height: var(--ctl); padding: 0 8px; border: 1px solid var(--edge); border-radius: 4px; background: var(--field); }
textarea.field { width: 100%; padding: 6px 8px; resize: vertical; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button { min-height: var(--ctl); padding: 0 10px; border: 1px solid var(--edge); border-radius: 4px; background: transparent; color: var(--muted); }
.seg .btn:not(.primary) { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--text); border-color: var(--accent); }

/* ---------- owner ---------- */
.shell { display: flex; flex-direction: column; min-height: 100vh; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 8px 20px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--mono); font-weight: 500; color: var(--accent); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs button { min-height: var(--ctl); padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: var(--raised); color: var(--text); font-weight: 600; }
.tabs .n { font-family: var(--mono); font-weight: 400; color: var(--muted); }
.tabs .n.hot { color: var(--hot); }
.cmd { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; min-height: var(--ctl); padding: 0 10px; background: var(--surface); border: 1px solid var(--edge); border-radius: 4px; }
.cmd label { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--muted); white-space: nowrap; }
.cmd input { flex: 1 1 60px; min-width: 0; height: 28px; border: 0; background: transparent; color: var(--text); outline: 0; }
.cmd:focus-within { border-color: var(--accent); }
.notice { padding: 8px 20px; background: var(--raised); border-bottom: 1px solid var(--accent); }

.split { flex: 1 1 auto; display: flex; align-items: stretch; min-height: 0; }
.list { flex: 1 1 440px; min-width: 0; padding: 8px 0 16px; }
.detail { flex: 1 1 520px; min-width: 0; padding: 20px 24px 24px; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.group { display: flex; align-items: baseline; gap: 10px; padding: 12px 20px 6px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--st, var(--muted)); }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 110px 84px; column-gap: 12px; align-items: center; width: 100%; min-height: 36px; padding: 0 20px; border: 0; background: transparent; text-align: left; }
.row:hover { background: var(--surface); }
.row.on { background: var(--raised); }
.row .id { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.row.on .id { color: var(--accent); }
.row.on .title { font-weight: 600; }
.row .title, .row .tool { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tool { color: var(--muted); }
.row .prio { margin-right: 8px; font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); }
.row .prio.p1 { color: var(--hot); }
.row .tag { font-family: var(--mono); font-size: 12px; text-align: right; white-space: nowrap; color: var(--muted); }
.tag.warm { color: var(--accent); }
.tag.hot { color: var(--hot); }
.empty { display: block; padding: 6px 20px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tip { padding: 20px 20px 0; font-size: 12px; color: var(--muted); }

.listbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 20px 6px; }
.listbar .btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.head { display: flex; flex-direction: column; gap: 8px; }
.head h1 { font-size: 22px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { padding: 3px 10px; border: 1px solid var(--edge); border-radius: 4px; }
.chip.status { border-color: var(--st); color: var(--st); font-weight: 600; }
.chips .btn { margin-left: auto; }
.st-triage { --st: #EAE5D9; } .st-urgent { --st: #F0806A; } .st-now { --st: #F0B454; } .st-next { --st: #8FB8F0; }
.st-later, .st-declined, .st-duplicate { --st: #A8A08F; } .st-waiting { --st: #C3A6F2; } .st-done { --st: #9BCF8E; }
.block { padding: 8px 10px; border: 1px solid var(--hot); border-radius: 4px; color: var(--hot); font-weight: 600; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.shots { display: flex; flex-wrap: wrap; gap: 8px; }
.shots img { display: block; width: 132px; height: 88px; object-fit: cover; border: 1px solid var(--edge); border-radius: 4px; }
/* what a report button captured: facts, then foldable lists */
.capbox { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.capbox summary { cursor: pointer; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.cap { margin: 4px 0 0; padding: 0; list-style: none; }
.cap li { padding: 2px 0; }
.cap .bad { color: var(--hot); }
.props { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.props label, .stack { display: flex; flex-direction: column; gap: 4px; }
.props label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.props .field { font-family: var(--sans); font-size: 14px; color: var(--text); width: 100%; }
.modeform { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--accent); border-radius: 4px; }
.modeform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.modeform .field { color: var(--text); }
.modeform .rowline { display: flex; flex-wrap: wrap; gap: 10px; }
.modeform .rowline .grow { flex: 1 1 220px; }
.modeform .dup { text-align: left; padding: 6px 10px; background: var(--field); }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.ev { display: flex; flex-direction: column; gap: 2px; }
.ev .who { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ev .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.ev.quiet .body { color: var(--muted); }
.ev.note { padding: 8px 10px; border: 1px dashed var(--note); border-radius: 4px; }
.ev.note .who { color: var(--accent); }
.composer { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
.composer label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.composer.note label { color: var(--accent); }
.composer.note textarea { border-style: dashed; }
.composer textarea { background: var(--surface); color: var(--text); font-size: 14px; }
.composer label.filebtn { flex-direction: row; font-size: inherit; color: var(--text); }
.composer .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.acts { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--edge); border-radius: 6px; }

.backdrop { position: fixed; inset: 0; z-index: 10; }
.backdrop.dim { background: rgba(0, 0, 0, .5); }
.pop { position: fixed; z-index: 11; width: min(600px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; padding: 18px; gap: 14px; background: #26221A; border: 1px solid var(--edge); border-radius: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
.pop .rowline { display: flex; flex-wrap: wrap; gap: 8px; }
.menu { position: fixed; z-index: 11; width: 248px; padding: 4px 0; display: flex; flex-direction: column; background: #26221A; border: 1px solid var(--edge); border-radius: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
.mhead { padding: 8px 12px 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.mhead:not(:first-child) { border-top: 1px solid var(--line); margin-top: 4px; }
.mitem { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 30px; padding: 0 12px; border: 0; background: transparent; text-align: left; }
.mitem:hover, .mitem:focus-visible { background: var(--raised); outline: 0; }
.mitem .hint { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.page { width: 100%; max-width: 900px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.page h1 { font-size: 22px; font-weight: 600; }
.recur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; width: 100%; min-height: 36px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: default; }
.recur.hot { cursor: context-menu; }
.recur.hot .n { color: var(--hot); }
.box { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; }

/* ---------- colleague ---------- */
body.requester .top { padding: 10px 20px; }
body.requester .tabs { flex: 1 1 260px; gap: 6px; }
body.requester .tabs button { padding: 0 14px; border-radius: 6px; }
body.requester .tabs .n { color: var(--hot); font-size: 13px; font-weight: 500; }
body.requester .notice { margin: 0; padding: 12px 16px; background: var(--raised); border: 1px solid var(--accent); border-radius: 6px; }
.col { width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 20px 40px; display: flex; flex-direction: column; gap: 18px; }
.col h1 { font-size: 26px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.card.strong { border: 2px solid var(--accent); }
.mine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; width: 100%; min-height: 64px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.mine:hover { background: var(--raised); }
.mine.unread { border-color: var(--accent); }
.mine .txt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.mine .txt b { font-weight: 600; overflow-wrap: anywhere; }
.mine .txt span { font-size: 14px; color: var(--muted); }
.pill { padding: 3px 12px; border: 1px solid var(--st, var(--edge)); border-radius: 999px; color: var(--st, var(--text)); font-size: 14px; font-weight: 600; white-space: nowrap; }
body.requester .btn, body.requester .field, body.requester .seg button { border-radius: 6px; }
body.requester .seg button { padding: 0 14px; }
body.requester .btn.primary { min-height: 48px; padding: 0 22px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form label.stack { font-weight: 600; gap: 6px; }
.form .field { font-weight: 400; width: 100%; padding: 0 12px; }
.form textarea.field { padding: 10px 12px; }
.form .check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.form .check input { width: 22px; height: 22px; accent-color: var(--accent); }
.form .two { display: flex; flex-wrap: wrap; gap: 14px; }
.form .two > * { flex: 1 1 240px; }
.drop { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--edge); border-radius: 6px; }
.err { color: var(--hot); font-weight: 600; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 100%; }
.thumb { position: relative; display: block; }
.thumb > button:first-child { display: block; padding: 0; border: 1px solid var(--edge); border-radius: 4px; background: var(--bg); overflow: hidden; cursor: pointer; }
.thumb img { display: block; width: 132px; height: 88px; object-fit: cover; }
.thumb .x { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border: 1px solid var(--edge); border-radius: 50%; background: var(--raised); color: var(--text); cursor: pointer; }

/* marking a screenshot */
dialog.editor { inset: 0; width: auto; max-width: none; height: auto; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg, #16140F); color: var(--text, #EAE5D9); color-scheme: dark; }
dialog.editor[open] { display: flex; flex-direction: column; }
dialog.editor .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #37322A; }
dialog.editor .bar .btn, dialog.editor .seg button { min-height: 36px; }
dialog.editor .grow { flex: 1; }
dialog.editor .err { margin: 0; padding: 0 12px; }
dialog.editor .err:empty { display: none; }
dialog.editor .stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; }
dialog.editor canvas { max-width: 100%; max-height: 100%; touch-action: none; cursor: crosshair; border: 1px solid #6B6456; }
body.requester .ev { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
body.requester .ev.quiet { padding: 8px 16px; background: transparent; border: 1px dashed var(--note); }
body.requester .ev .who { font-size: 13px; }

/* sign-in */
dialog.signin { width: min(380px, calc(100vw - 32px)); padding: 24px; border: 1px solid #6B6456; border-radius: 8px; background: #1F1C15; color: #EAE5D9; color-scheme: dark; }
dialog.signin::backdrop { background: #16140F; }
dialog.signin form { display: flex; flex-direction: column; gap: 14px; }
dialog.signin h1 { font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--accent); }
dialog.signin label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #A8A08F; }
dialog.signin input { min-height: 44px; padding: 0 10px; border: 1px solid #6B6456; border-radius: 4px; background: #16140F; color: #EAE5D9; }
dialog.signin button { min-height: 44px; border: 0; border-radius: 4px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
dialog.signin .err { color: #F0806A; min-height: 1.4em; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  body.owner { --ctl: 44px; }
  .top { padding: 8px 12px; gap: 8px 12px; }
  .top .link { order: 1; margin-left: auto; }
  .top .tabs { order: 2; flex: 1 1 100%; }
  .top .cmd { order: 3; flex: 1 1 100%; }
  .cmd .hint, .tip { display: none; }
  .split .detail { display: none; border-left: 0; padding: 16px; }
  .split.open .list { display: none; }
  .split.open .detail { display: flex; }
  .row { grid-template-columns: 40px minmax(0, 1fr) 84px; min-height: 48px; padding: 0 12px; }
  .row .tool { display: none; }
  .row.on { background: transparent; }
  .row.on .id { color: var(--muted); }
  .row.on .title { font-weight: 400; }
  .group { padding: 12px 12px 6px; }
  .listbar { padding: 4px 12px 6px; }
  .pop { left: 8px !important; top: 8px !important; }
  .mitem { min-height: 44px; }
  .recur { min-height: 48px; cursor: pointer; }
  .col { padding: 16px 12px 32px; }
  dialog.editor .bar .btn, dialog.editor .seg button { min-height: 44px; }
  .thumb .x { width: 36px; height: 36px; }
}
@media (min-width: 761px) {
  .back { display: none; }
}
