/*
 * MindAccel help desk
 * Paper, ink and one blue. Blue (#2563eb) and amber (#f59e0b) come from
 * www.mindaccel.org; amber is used like a highlighter, sparingly.
 */
:root {
  --paper: #fbfaf6;
  --paper-2: #f3f1ea;
  --white: #ffffff;
  --ink: #1b2130;
  --ink-2: #474f60;
  --ink-3: #7a8090;
  --rule: #e2ded2;
  --rule-2: #cfcabc;
  --blue: #2563eb;
  --blue-dark: #1a47b8;
  --blue-wash: #eaf0fd;
  --amber: #f59e0b;
  --highlight: #fde7b0;
  --red: #b42318;
  --red-wash: #fdeceb;
  --green: #1d7a46;
  --green-wash: #e7f4ec;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--sans); color: var(--ink); background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; color: var(--ink); }
h1 { font: 600 2rem/1.15 var(--serif); letter-spacing: -.005em; }
h2 { font: 600 1.35rem/1.25 var(--serif); }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--paper-2); padding: .05em .3em; border-radius: 3px; }
mark { background: linear-gradient(transparent 55%, var(--highlight) 55%); color: inherit; padding: 0 .1em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: .5rem; background: var(--ink); color: #fff; padding: .4rem .8rem; z-index: 99; }
.skip-link:focus { left: .5rem; }
.hp { position: absolute; left: -10000px; height: 0; overflow: hidden; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 38em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.page { padding-top: 2.25rem; padding-bottom: 4rem; }
.measure { max-width: 680px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; font: 600 .95rem/1.2 var(--sans); padding: .6rem 1rem; border-radius: var(--r); border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; background: none; color: var(--ink); }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue-dark); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { background: var(--white); border-color: var(--rule-2); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-link { padding: .6rem .25rem; color: var(--blue); font-weight: 500; }
.btn-link:hover { text-decoration: underline; }
.btn-danger { background: var(--white); border-color: #e8b4af; color: var(--red); }
.btn-danger:hover { background: var(--red-wash); }
.btn-sm { font-size: .85rem; padding: .35rem .65rem; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- Public header / footer ---------- */
.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); }
.masthead .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 62px; }
.wordmark { display: flex; align-items: baseline; gap: .45rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.wordmark b { font: 700 1.2rem var(--sans); letter-spacing: -.01em; }
.wordmark b::first-letter { color: var(--blue); }
.wordmark i { font: italic 1.05rem var(--serif); color: var(--ink-2); }
.wordmark:hover { color: var(--ink); }
.site-nav { display: flex; gap: 1.25rem; align-items: center; margin-left: auto; font-size: .95rem; }
.site-nav a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.menu-btn { display: none; margin-left: auto; font: 500 .9rem var(--sans); background: none; border: 1px solid var(--rule-2); border-radius: var(--r); padding: .3rem .7rem; cursor: pointer; color: var(--ink); }

.notice-bar { background: var(--highlight); font-size: .95rem; padding: .55rem 0; }
.notice-bar p { margin: 0; }

.site-foot { border-top: 1px solid var(--rule); padding: 2rem 0 2.5rem; font-size: .9rem; color: var(--ink-2); }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-foot h4 { margin: 0 0 .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: .2rem 0; }
.site-foot a { color: var(--ink-2); }
.site-foot p { margin: 0 0 .4rem; max-width: 30em; }

/* ---------- Messages ---------- */
.flash { border-left: 3px solid var(--ink-3); background: var(--white); padding: .7rem 1rem; margin: 0 0 1rem; font-size: .95rem; }
.flash-success { border-color: var(--green); background: var(--green-wash); }
.flash-error { border-color: var(--red); background: var(--red-wash); }
.flash-warning, .flash-message { border-color: var(--amber); background: #fff6df; }

/* ---------- Public home ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3.5rem; padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--rule); }
.intro h1 { font-size: 2.5rem; max-width: 13em; }
.intro .lead { margin-bottom: 1.5rem; }
.ask-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: 1.25rem; font-size: .95rem; color: var(--ink-2); }

.search { position: relative; display: flex; max-width: 34rem; }
.search input { flex: 1; min-width: 0; font: 1rem var(--sans); padding: .7rem .85rem; border: 1px solid var(--rule-2); border-right: 0; border-radius: var(--r) 0 0 var(--r); background: var(--white); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.search button { border-radius: 0 var(--r) var(--r) 0; }
.suggestions { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; background: var(--white); border: 1px solid var(--rule-2); border-radius: var(--r); box-shadow: 0 6px 18px rgba(27, 33, 48, .1); }
.suggestions a { display: block; padding: .6rem .85rem; color: var(--ink); text-decoration: none; border-top: 1px solid var(--rule); }
.suggestions a:first-child { border-top: 0; }
.suggestions a:hover, .suggestions a:focus { background: var(--blue-wash); }
.suggestions small { display: block; color: var(--ink-3); }
.suggestions-inline { position: static; margin-top: .5rem; box-shadow: none; background: var(--paper-2); border-color: var(--rule); }
.suggestions-inline::before { content: "These might already answer it:"; display: block; padding: .55rem .85rem .2rem; font-size: .85rem; color: var(--ink-2); }
.suggestions-inline a { border-top: 0; padding-top: .3rem; padding-bottom: .3rem; }

.quick-answers { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--amber); padding: 1.25rem 1.4rem .4rem; align-self: start; }
.quick-answers h2 { font-size: 1.1rem; margin-bottom: .9rem; }
.quick-answers dl { margin: 0; }
.quick-answers dt { font-weight: 650; }
.quick-answers dd { margin: .15rem 0 1rem; color: var(--ink-2); font-size: .95rem; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2.75rem 0 1.25rem; }
.section-head h2 { margin: 0; }
.topic-index { columns: 3 240px; column-gap: 2.5rem; }
.topic { break-inside: avoid; margin-bottom: 1.75rem; }
.topic h3 { font: 600 1.1rem var(--serif); margin-bottom: .1rem; }
.topic h3 a { color: var(--ink); text-decoration: none; }
.topic h3 a:hover { text-decoration: underline; }
.topic p { margin: 0 0 .4rem; font-size: .9rem; color: var(--ink-3); }
.topic ul { list-style: none; margin: 0; padding: 0; }
.topic li { padding: .18rem 0; font-size: .95rem; }

.closing { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.closing p { margin: 0; max-width: 36em; color: var(--ink-2); }
.closing strong { color: var(--ink); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=search], input[type=number], input:not([type]), select, textarea {
  width: 100%; font: .95rem/1.4 var(--sans); color: var(--ink); background: var(--white); border: 1px solid var(--rule-2); border-radius: var(--r); padding: .55rem .7rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--red); }
textarea { resize: vertical; }
label > input, label > select, label > textarea { margin-top: .3rem; font-weight: 400; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: .4rem; }
.field { margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.help { font-size: .85rem; color: var(--ink-3); margin: .3rem 0 0; }
.error { color: var(--red); font-size: .875rem; margin: .3rem 0 0; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: .25rem; flex: none; }
.actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
details > summary { cursor: pointer; color: var(--blue); font-size: .95rem; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 3rem; align-items: start; }
.form-layout aside { font-size: .92rem; color: var(--ink-2); border-left: 1px solid var(--rule); padding-left: 1.5rem; position: sticky; top: 1.5rem; }
.form-layout aside h2 { font-size: 1.05rem; }
.form-layout aside ol { padding-left: 1.1rem; margin: 0 0 1.25rem; }
.form-layout aside li { margin-bottom: .5rem; }
.paper { background: var(--white); border: 1px solid var(--rule); padding: 1.75rem; }

.topic-choices { border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--white); }
.topic-choice { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; padding: .6rem .8rem; border-top: 1px solid var(--rule); font-weight: 400; cursor: pointer; margin: 0; }
.topic-choice:first-child { border-top: 0; }
.topic-choice input { margin-top: .3rem; grid-row: span 2; }
.topic-choice span { font-weight: 600; }
.topic-choice small { color: var(--ink-3); font-size: .85rem; grid-column: 2; }
.topic-choice:hover { background: var(--paper); }
.topic-choice:has(input:checked) { background: var(--blue-wash); }
.topic-choice.sensitive:has(input:checked) { background: var(--red-wash); }
.safety { border-left: 3px solid var(--red); background: var(--red-wash); padding: .75rem 1rem; margin-top: .75rem; font-size: .95rem; }
.safety p { margin: .2rem 0 0; }

/* ---------- Conversation ---------- */
.ticket-title { margin-bottom: 1.75rem; }
.ticket-title .ref { font-family: var(--mono); font-size: .85rem; color: var(--ink-3); margin-bottom: .3rem; }
.ticket-title h1 { margin-bottom: .5rem; }
.meta-line { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .9rem; color: var(--ink-2); margin: 0; }
.thread { list-style: none; margin: 0 0 2rem; padding: 0; }
.entry { padding: 1.1rem 0 1.2rem; border-top: 1px solid var(--rule); }
.entry:first-child { border-top: 0; padding-top: 0; }
.entry-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .45rem; font-size: .92rem; }
.entry-head strong { font-size: .98rem; }
.entry-head time { margin-left: auto; color: var(--ink-3); font-size: .85rem; }
.role { font-size: .78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.entry-team .role { color: var(--blue); }
.entry-body { overflow-wrap: anywhere; max-width: 44em; }
.entry-body p:last-child { margin-bottom: 0; }
.entry-team .entry-body { border-left: 2px solid var(--blue); padding-left: .9rem; }
.entry-note { background: #fff8e6; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; border-top-color: #f3dca0; }
.entry-note .role { color: #8a5a00; }
.entry-note + .entry { border-top-color: #f3dca0; }
.attachments { list-style: none; margin: .7rem 0 0; padding: 0; font-size: .9rem; }
.attachments li::before { content: "Attachment: "; color: var(--ink-3); }
.event { font-size: .83rem; color: var(--ink-3); padding: .35rem 0; border-top: 1px dashed var(--rule); }
.event + .event { border-top: 0; padding-top: 0; }

.box { border: 1px solid var(--rule); background: var(--white); padding: 1.25rem 1.4rem; margin-bottom: 1.5rem; }
.box h2 { font-size: 1.15rem; }
.box-confirm { border-left: 3px solid var(--green); }
.box-confirm h2 { margin-bottom: .35rem; }
.reply-form textarea { margin-bottom: .75rem; }

.scale { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: .5rem 0 1rem; font-size: .88rem; color: var(--ink-3); }
.scale label { margin: 0; }
.scale input { position: absolute; opacity: 0; }
.scale span { display: inline-block; width: 2.4rem; text-align: center; padding: .4rem 0; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--white); font-weight: 600; color: var(--ink); cursor: pointer; }
.scale input:checked + span { background: var(--blue); border-color: var(--blue-dark); color: #fff; }
.scale input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.request-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.request-list li { border-bottom: 1px solid var(--rule); }
.request-list a { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; padding: .85rem 0; text-decoration: none; color: var(--ink); }
.request-list a:hover strong { text-decoration: underline; }
.request-list small { color: var(--ink-3); }

/* status: a coloured dot + plain words */
.st { white-space: nowrap; font-size: .88rem; }
.st::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .4rem; vertical-align: .08em; background: var(--ink-3); }
.st-new::before { background: var(--blue); }
.st-open::before { background: var(--blue); box-shadow: 0 0 0 2px var(--blue-wash); }
.st-pending::before { background: var(--amber); }
.st-resolved::before { background: var(--green); }
.st-closed::before { background: var(--rule-2); }

/* ---------- Knowledge base ---------- */
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-2); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 3.5rem; align-items: start; }
.article-layout aside { font-size: .92rem; border-left: 1px solid var(--rule); padding-left: 1.5rem; }
.article-layout aside h2 { font-size: 1rem; }
.article-layout aside ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.article-layout aside li { padding: .25rem 0; }
.article-layout aside li.current { font-weight: 650; }
.prose { font-size: 1.05rem; line-height: 1.7; max-width: 40em; }
.prose h2 { margin-top: 1.75em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .3rem; }
.prose blockquote { margin: 1.25rem 0; padding: .1rem 1rem; border-left: 3px solid var(--amber); color: var(--ink-2); }
.prose table { border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--rule); padding: .35rem .6rem; }
.was-helpful { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .95rem; }
.was-helpful form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.article-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.article-list li { padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.article-list a { font-weight: 600; }
.article-list p { margin: .1rem 0 0; color: var(--ink-3); font-size: .92rem; }

.error-page { padding: 4rem 0; max-width: 34rem; }
.error-page .code { font-family: var(--mono); color: var(--ink-3); margin-bottom: .5rem; }

/* =================================================================
   Staff area: a working tool. Denser, sans-serif, sidebar inbox.
   ================================================================= */
.staff { background: var(--white); }
.staff h1 { font: 650 1.45rem/1.25 var(--sans); letter-spacing: -.01em; }
.staff h2 { font: 650 1.05rem/1.3 var(--sans); }
.staff-shell { flex: 1; display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--paper-2); border-right: 1px solid var(--rule); padding: 1rem .75rem; font-size: .92rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .wordmark { padding: .2rem .5rem .9rem; }
.sidebar .wordmark b { font-size: 1.05rem; }
.sidebar .wordmark i { font-size: .95rem; }
.sidebar h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 1.1rem .5rem .3rem; font-weight: 600; }
.sidebar nav a { display: flex; justify-content: space-between; align-items: baseline; padding: .3rem .5rem; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.sidebar nav a:hover { background: rgba(0, 0, 0, .04); }
.sidebar nav a[aria-current] { background: var(--white); box-shadow: 0 0 0 1px var(--rule); font-weight: 600; }
.sidebar .n { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sidebar .n-alert { color: var(--red); font-weight: 700; }
.sidebar .new-btn { display: block; text-align: center; margin: .25rem .25rem 0; }
.sidebar .who { margin-top: 1.5rem; padding: .75rem .5rem 0; border-top: 1px solid var(--rule); font-size: .85rem; color: var(--ink-2); }
.sidebar .who a { color: var(--ink-2); }
.staff-main { min-width: 0; padding: 1.5rem 2rem 3rem; }
.staff-main .flash { max-width: 60rem; }
.staff-topbar { display: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.page-head .count { color: var(--ink-3); font-weight: 400; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; padding: .6rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: .1rem; }
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { width: auto; }
.filters input, .filters select, .bulk select { padding: .35rem .55rem; font-size: .88rem; }
.bulk { display: flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--ink-3); padding: .5rem 0; }
.bulk select { width: auto; }

.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
.list th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: .8rem; padding: .45rem .6rem; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.list td { padding: .55rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.list tbody tr:hover { background: #fafaf7; }
.list .subject a { color: var(--ink); font-weight: 600; text-decoration: none; }
.list .subject a:hover { text-decoration: underline; }
.list .subject .ref { font-family: var(--mono); font-size: .8rem; color: var(--ink-3); font-weight: 400; margin-right: .35rem; }
.list .sub { font-size: .82rem; color: var(--ink-3); margin-top: .1rem; }
.list .empty { color: var(--ink-3); padding: 1.5rem .6rem; }
.list input, .list select { padding: .3rem .45rem; font-size: .88rem; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; }
.w-check { width: 2rem; }
.w-num { width: 4.5rem !important; }
tr.overdue td:first-child { box-shadow: inset 2px 0 0 var(--red); }
.late { color: var(--red); font-weight: 600; }
.soon { color: #8a5a00; }
.prio-urgent { color: var(--red); font-weight: 700; }
.prio-high { color: #a6460b; font-weight: 600; }
.prio-normal, .prio-low { color: var(--ink-3); }
.tag { color: var(--ink-3); font-size: .82rem; margin-right: .35rem; }
.flag { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--red); border: 1px solid #e8b4af; border-radius: 3px; padding: 0 .3rem; }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; font-size: .9rem; }

.summary-line { display: flex; flex-wrap: wrap; gap: .25rem 2rem; font-size: .95rem; margin: 0 0 1.75rem; padding: .8rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.summary-line a { color: var(--ink); text-decoration: none; }
.summary-line a:hover { text-decoration: underline; }
.summary-line b { font-size: 1.25rem; font-variant-numeric: tabular-nums; margin-right: .3rem; }
.summary-line .alert b { color: var(--red); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; }
.block { margin-bottom: 2rem; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem; }
.block-head h2 { margin: 0; }
.block-head a { font-size: .88rem; }

.stats { font-size: .9rem; }
.stats dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0 0 1.5rem; }
.stats dt { color: var(--ink-2); }
.stats dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.stats h3 { font-size: .8rem; color: var(--ink-3); font-weight: 500; margin: 0 0 .5rem; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin-bottom: .25rem; border-bottom: 1px solid var(--rule-2); }
.spark span { flex: 1; background: var(--blue); min-height: 1px; height: 0; opacity: .85; }
.spark-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-3); margin-bottom: 1.5rem; }
.breakdown { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.breakdown li { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .25rem 0; border-bottom: 1px dotted var(--rule-2); }
.breakdown b { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ticket workspace */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2.5rem; align-items: start; }
.workspace .thread { margin-bottom: 1.5rem; }
.composer { border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--white); }
.composer-mode { display: flex; border-bottom: 1px solid var(--rule); font-size: .9rem; }
.composer-mode label { margin: 0; padding: .55rem .9rem; font-weight: 500; color: var(--ink-3); cursor: pointer; border-right: 1px solid var(--rule); }
.composer-mode input { position: absolute; opacity: 0; }
.composer-mode label:has(input:checked) { color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--blue); }
.composer-mode label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: -2px; }
.composer-mode select { margin-left: auto; width: auto; border: 0; border-left: 1px solid var(--rule); border-radius: 0; font-size: .85rem; color: var(--ink-2); background: transparent; }
.composer textarea { border: 0; border-radius: 0; padding: .8rem .9rem; min-height: 10rem; box-shadow: none !important; }
.composer.is-note { background: #fff8e6; border-color: #e9cf8c; }
.composer.is-note .composer-mode label:has(input:checked) { box-shadow: inset 0 -2px 0 var(--amber); }
.composer.is-note textarea { background: #fff8e6; }
.composer-foot { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding: .6rem .9rem; border-top: 1px solid var(--rule); font-size: .88rem; }
.composer-foot .send { margin-left: auto; display: flex; gap: .4rem; }
.composer-foot .send select { width: auto; font-size: .85rem; padding: .35rem .5rem; }
.composer-foot input[type=file] { font-size: .82rem; max-width: 220px; }
.composer .help { padding: 0 .9rem .6rem; }

.props { font-size: .9rem; }
.props section { padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--rule); }
.props section:last-child { border-bottom: 0; }
.props h2 { font-size: .8rem; color: var(--ink-3); font-weight: 500; margin: 0 0 .5rem; }
.props label { font-size: .82rem; font-weight: 500; color: var(--ink-2); margin-bottom: .55rem; }
.props select, .props input { padding: .35rem .5rem; font-size: .88rem; }
.props .btn { width: 100%; margin-top: .4rem; text-align: center; }
.props dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; margin: 0; }
.props dt { color: var(--ink-3); }
.props dd { margin: 0; }
.props .contact-note { background: var(--paper-2); padding: .5rem .65rem; margin-top: .5rem; font-size: .85rem; }
.props ul { list-style: none; padding: 0; margin: 0; }
.props li { padding: .2rem 0; }
.copy-field { font-family: var(--mono); font-size: .78rem !important; }

.panel { border: 1px solid var(--rule); padding: 1.25rem; margin-bottom: 1.5rem; background: var(--white); }
.panel h2 { margin-bottom: .75rem; }
.panel-plain { border: 0; padding: 0; }
.settings-nav { display: flex; gap: 1.25rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; font-size: .92rem; }
.settings-nav a { padding: .5rem 0; color: var(--ink-2); text-decoration: none; }
.settings-nav a:hover, .settings-nav a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--blue); }
.form-narrow { max-width: 640px; }
.form-narrow label { margin-bottom: 1rem; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 2rem; align-items: start; }
.editor textarea { font-family: var(--mono); font-size: .88rem; line-height: 1.55; }
.editor-tabs { display: flex; gap: 1rem; font-size: .9rem; margin: .5rem 0; }
.editor-tabs button { background: none; border: 0; padding: .2rem 0; font: inherit; color: var(--ink-3); cursor: pointer; }
.editor-tabs button.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--blue); }
.preview { border: 1px dashed var(--rule-2); padding: 1rem 1.25rem; min-height: 20rem; }
.canned-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }
.canned-grid textarea { font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .intro, .form-layout, .article-layout, .two-col, .workspace, .editor { grid-template-columns: 1fr; gap: 2rem; }
  .form-layout aside, .article-layout aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1.25rem; position: static; }
  .site-foot .wrap { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
  .staff-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule); }
  .sidebar.open { display: block; }
  .staff-topbar { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
  .staff-topbar .menu-btn { display: inline-block; margin: 0; }
  .staff-main { padding: 1.25rem 1rem 2.5rem; }
}
@media (max-width: 700px) {
  h1, .intro h1 { font-size: 1.8rem; }
  .menu-btn { display: inline-block; }
  .masthead .wrap { flex-wrap: wrap; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: .6rem; padding: .25rem 0 1rem; }
  .site-nav.open { display: flex; }
  .field-row { grid-template-columns: 1fr; }
  .paper { padding: 1.1rem; }
  .intro { padding-top: 2rem; }
  .composer-foot .send { margin-left: 0; width: 100%; }
  .composer-foot .send select { flex: 1; }
  .composer-mode { flex-wrap: wrap; }
  .composer-mode select { width: 100%; border-left: 0; border-top: 1px solid var(--rule); margin: 0; }
  .site-foot .wrap { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* small utilities (no inline styles: the CSP forbids them) */
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish:hover { color: var(--blue-dark); }
.inline { display: inline; }
.narrow-form { max-width: 30rem; }
.spaced { margin-top: 1.5rem; }
.after-form { margin: 1rem 0 0; }
details[open] > summary { margin-bottom: .5rem; }
.spaced-b { margin-bottom: 1.25rem; }
.spaced-xs { margin-top: .3rem; }

/* Lists of links read calmer without permanent underlines */
.topic li a, .article-list a, .site-foot a, .sidebar .who a, .props ul a, .request-list a, .list td a { text-decoration: none; }
.topic li a:hover, .article-list a:hover, .site-foot a:hover, .sidebar .who a:hover, .props ul a:hover, .list td a:hover { text-decoration: underline; }
.ticket-title .ref a { font-family: var(--sans); font-size: .85rem; }

/* Branding: uploaded logo, editable intro and quick answers */
.wordmark { align-items: center; }
.wordmark .logo { height: 34px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.sidebar .wordmark .logo { height: 28px; max-width: 150px; }
.wordmark b { line-height: 1; }
.intro .lead p { margin: 0 0 .75em; }
.intro .lead { margin-bottom: 1.5rem; }
.quick-answers dd p { margin: 0; }
.intro > div:only-child { max-width: 44rem; }

/* Branding settings */
.brand-preview { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding: 1rem; margin-bottom: 1.25rem; border: 1px dashed var(--rule-2); background: var(--paper); }
.brand-preview .wordmark { pointer-events: none; }
.colour-input { display: flex; gap: .4rem; margin-top: .3rem; }
.colour-input input[type=color] { width: 2.75rem; height: 2.35rem; padding: .15rem; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--white); flex: none; cursor: pointer; }
.colour-input input:not([type=color]) { margin: 0; font-family: var(--mono); }
.logo-current img { max-height: 48px; max-width: 220px; border: 1px solid var(--rule); padding: .35rem; background: var(--white); }
.qa-rows { padding-left: 1.2rem; margin: 0 0 1rem; }
.qa-rows li { margin-bottom: .9rem; }
.qa-rows label { margin: 0 0 .3rem; }
