/* Shared look copied from Content Studio (webapp/static/app.css there); Montserrat from Google Fonts. */
:root {
  --ink: #1E1E1E; --muted: #5F676C; --line: #D7DEE2; --faint: #EEF2F3; --bg: #F6F8F8; --card: #FFFFFF;
  /* UCT OHS logo blue (accents, never small text) and navy from the illustration palette (text, buttons):
     docs/decisions.md, 16 October 2026. Subject colours appear only as each module's subject chip. */
  --blue: #009BDB; --navy: #0D4B68; --navy-d: #002F4D; --tint: #E1F5FF;
  --gold: #B49741; --goldl: #D6B44D; --goldt: #F7F0DB; --red: #C42139; --redt: #FBE9EC;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Montserrat, system-ui, sans-serif; font-weight: 500; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--navy); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 20px; font-weight: 700; } h3 { font-size: 16px; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: 13px; }

header.top { background: var(--card); border-bottom: 1px solid var(--line); }
header.top .in { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.brand { font-weight: 800; color: var(--navy); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand .logo { height: 34px; width: auto; display: block; }
.brand { flex-shrink: 0; }
.brand span { border-left: 1px solid var(--line); padding-left: 12px; line-height: 1.2; white-space: nowrap; }
header.top .in { flex-wrap: wrap; row-gap: 8px; }
nav a { white-space: nowrap; }
@media (max-width: 640px) { .brand span { display: none; } }
.login .logo { height: 52px; width: auto; display: block; margin-bottom: 18px; }
nav a { text-decoration: none; font-weight: 600; color: var(--muted); margin-right: 18px; }
nav a.on, nav a:hover { color: var(--navy); }
nav a.on { box-shadow: inset 0 -3px 0 var(--blue); padding-bottom: 4px; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-block; font: 700 14px Montserrat, sans-serif; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--navy); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-d); border-color: var(--navy-d); }
.btn.gold { background: var(--goldt); border-color: var(--goldl); color: #5B4A17; }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.link { border: 0; background: none; padding: 0; color: var(--muted); font-weight: 600; }
.btn.link:hover { color: var(--red); }

.pill { display: inline-block; font: 700 12px Montserrat, sans-serif; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.busy { background: var(--faint); color: var(--muted); }
.pill.you { background: var(--goldt); color: #6E5A1F; }
.pill.done { background: var(--tint); color: var(--navy); }
.pill.fail { background: var(--redt); color: var(--red); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--faint); }
td { padding: 10px; border-bottom: 1px solid var(--faint); vertical-align: top; }
tr.mod:hover td { background: var(--bg); cursor: pointer; }

label { display: block; font-weight: 700; color: var(--navy); margin: 14px 0 6px; font-size: 14px; }
input, select, textarea { font: 500 15px Montserrat, sans-serif; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--tint); border-color: var(--blue); }
textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

.note { background: var(--tint); border-left: 5px solid var(--blue); border-radius: 10px; padding: 12px 16px; color: var(--navy); }
.note.gold { background: var(--goldt); border-left-color: var(--goldl); color: #5B4A17; }
.note.warn { background: var(--redt); border-left-color: var(--red); color: #8A1729; }
.q { background: var(--tint); border-radius: 10px; padding: 10px 14px; margin: 6px 0; color: var(--navy); }

details.c summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--navy); margin-top: 6px; }
details.c summary::-webkit-details-marker { display: none; }
details.c form { margin-top: 8px; }

/* comments */
.comments .item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--faint); }
.comments .where { font-weight: 700; color: var(--navy); white-space: nowrap; min-width: 96px; }
.comments .where button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.comments .text { flex: 1; }

.progress-log { font: 500 13px ui-monospace, Menlo, monospace; background: var(--bg); border-radius: 10px; padding: 12px 14px; color: var(--muted); white-space: pre-wrap; max-height: 260px; overflow: auto; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--tint); border-top-color: var(--blue); display: inline-block; animation: spin 1s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.actions { background: var(--card); border: 2px solid var(--navy); border-radius: var(--radius); padding: 18px 22px; }
.stat { font-size: 26px; font-weight: 800; color: var(--navy); }
.login { max-width: 420px; margin: 12vh auto; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .modes { grid-template-columns: 1fr; } }
.mode { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0; font-weight: 500; color: var(--ink); cursor: pointer; }
.mode input { width: auto; margin-top: 4px; }
.mode:has(input:checked) { border-color: var(--blue); background: var(--tint); }
.finding { border-left: 5px solid var(--line); }
.finding.sev-error { border-left-color: var(--red); }
.finding.sev-check { border-left-color: var(--goldl); }
.change { display: grid; gap: 6px; margin: 10px 0; max-width: 75ch; }
.change > div { padding: 8px 12px; border-radius: 8px; }
.change .lbl { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.change .was { background: var(--redt); } .change .was .lbl { color: var(--red); }
.change .now { background: #E5F4EA; } .change .now .lbl { color: #1F6B3A; }
.pill.tag { background: none; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; padding: 2px 8px; }
details.minors > summary { cursor: pointer; color: var(--navy); font-weight: 600; margin: 8px 0; }
.mono { font-family: ui-monospace, Menlo, monospace; }
textarea.mono { font-size: 13px; line-height: 1.5; }
.note + .note { margin-top: 10px; }

/* brief */
.brief fieldset.ab { border: 1px solid var(--line); border-radius: 12px; padding: 6px 18px 14px; margin: 18px 0 0; }
.brief fieldset.ab legend { font-weight: 800; color: var(--navy); padding: 0 6px; }
.choice { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 8px 0; }
.choice label, label.check { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0; font-weight: 600; color: var(--ink); cursor: pointer; }
.choice input, label.check input { width: auto; margin: 0; }
.segs label.check { display: flex; }
details.more { margin-top: 18px; } details.more > summary { cursor: pointer; font-weight: 700; color: var(--navy); }

/* review */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 640px; gap: 20px; align-items: start; }
@media (max-width: 1200px) { .review { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 16px; }
iframe#pv { width: 100%; height: 72vh; min-height: 520px; border: 1px solid var(--line); border-radius: 10px; background: #EAF0F6; }
.pv-controls { margin: 6px 0 10px; gap: 10px; }
.pv-controls select { width: auto; flex: 1; padding: 8px 10px; font-size: 14px; }
.seg-toggle { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-toggle label { margin: 0; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.seg-toggle input { display: none; }
.seg-toggle label:has(input:checked) { background: var(--navy); color: #fff; }
.subjline { font-weight: 700; color: var(--ink); margin: 0 0 10px; min-height: 1.5em; }
.subjects td.pick { width: 44px; } .subjects input { width: auto; }
.blocks td.n { width: 30px; color: var(--muted); font-weight: 700; }
.blocks td.kind { width: 90px; } .blocks td.kind span { font-size: 12px; font-weight: 700; color: var(--navy); text-transform: capitalize; }
.blocks tr.commented td { background: #FFFBEF; }
.blocks .greeting, .blocks .heading { font-weight: 700; color: var(--navy); }
.blocks .closing { font-style: italic; }
.mini { background: var(--faint); border-radius: 8px; padding: 6px 10px; margin: 4px 0; font-size: 14px; }
.mini.callout { background: var(--goldt); }
.fakebtn { display: inline-block; background: #0099D9; color: #fff; font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 5px; margin-top: 4px; }
.version { padding: 12px 0; border-top: 1px solid var(--faint); } .version:first-of-type { border-top: 0; }
.version h3 { margin-bottom: 2px; }
.checks .finding { padding: 8px 12px; margin: 8px 0; background: var(--card); border-radius: 0 8px 8px 0; }
.checks .finding q { background: var(--goldt); padding: 0 3px; border-radius: 3px; }
.actions { margin-top: 20px; }
.actions .grid2 { margin-top: 10px; }
form.reopen { margin-top: 10px; }
ul.pushed { padding-left: 20px; } ul.pushed li { margin: 6px 0; }
.budget textarea { margin: 8px 0; } details.budget-ask { margin: 0 0 16px; }
/* the marketer's own edits */
.tools { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.tools > details.c { flex: 0 1 auto; } .tools > details.c[open] { flex: 1 1 100%; }
form.edit textarea, form.edit input { margin: 4px 0; font-size: 14px; }
form.edit .card-edit { display: flex; gap: 8px; } form.edit .card-edit input.emoji { width: 56px; text-align: center; }
ul.notes { margin: 6px 0 0; padding-left: 20px; } ul.notes li { margin: 3px 0; }
.review > .preview-col { align-self: stretch; }  /* the column runs the full height, so the preview stays in view while scrolling */
.resend label.check { display: flex; }
.segments-edit input { font-size: 13px; padding: 6px 8px; } .segments-edit td { padding: 6px; } .segments-edit td.pick input { width: auto; } .segments-edit tr.new td { background: var(--bg); }
.segments-edit th:nth-child(4) { width: 36%; }
