/* Help desk. Uses the portal's design tokens, so a brand colour change and dark mode apply here too. */
.sup { max-width: 820px; margin: 0 auto; padding: var(--s-5) var(--s-4); }
.sup.sup-wide { max-width: 1000px; }
.main .sup { padding: 0; margin: 0; max-width: 860px; }
.main .sup.sup-wide { max-width: none; }
.sup .card { margin-bottom: var(--s-4); }
.sup-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sup-errors { background: var(--danger-bg); color: var(--danger); border-radius: var(--r); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); }
.sup-errors ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.sup-more { margin-bottom: var(--s-4); }
.sup-more > summary { cursor: pointer; font-weight: 600; font-size: var(--fs-sm); color: var(--brand-ink); min-height: 44px; display: flex; align-items: center; }
.sup-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 2rem; margin: 0 auto var(--s-3); }
.sup-no { display: inline-flex; flex-direction: column; gap: .1rem; padding: .7rem 1.6rem; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.sup-no strong { font-size: var(--fs-xl); color: var(--brand-ink); letter-spacing: .02em; }

/* quick answers */
.sup-kb { display: flex; flex-direction: column; gap: .5rem; margin-top: var(--s-5); }
.sup-kb h2 { font-size: var(--fs-lg); margin: 0 0 .3rem; }
.sup-kb details { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 0 var(--s-4); }
.sup-kb details.match { border-color: var(--brand); background: var(--brand-soft); }
.sup-kb.has-match details.match { order: -1; }
.sup-kb summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; }
.sup-kb details p { margin: 0 0 var(--s-3); color: var(--muted); }

/* conversation */
.sup-thread { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-4); }
.sup-msg { max-width: 92%; padding: .8rem 1rem; border-radius: var(--r-lg); border: 1px solid var(--border-2); background: var(--surface); overflow-wrap: anywhere; }
.sup-msg.mine { align-self: flex-end; background: var(--brand-soft); border-color: transparent; }
.sup-msg.staff { align-self: flex-start; }
.sup-msg.note { align-self: stretch; max-width: none; background: var(--warn-bg); border: 1px dashed var(--warn); }
.sup-meta { font-size: var(--fs-xs); color: var(--faint); margin-bottom: .25rem; }
.sup-body { white-space: pre-wrap; line-height: 1.6; }
.sup-att { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.sup-att .thumb { max-width: 180px; max-height: 130px; border-radius: var(--r-sm); border: 1px solid var(--border); display: block; }

/* rating */
.sup-rate { border: 0; padding: 0; margin: 0; }
.sup-rate legend { font-weight: 700; margin-bottom: .3rem; padding: 0; }
.sup-stars { display: flex; gap: .15rem; }
.sup-stars .star { position: relative; margin: 0; cursor: pointer; font-size: 2rem; line-height: 1; color: var(--border); min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.sup-stars .star input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.sup-stars .star.on { color: #d97706; }
.sup-stars .star:focus-within { outline: 3px solid var(--focus); border-radius: var(--r-sm); }

/* staff */
.sup-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: var(--s-4); }
.sup-filters input[type=search] { flex: 1; min-width: 220px; }
.sup-filters select { width: auto; }
.sup-subj { color: var(--muted); font-size: var(--fs-sm); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-admin { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-items: start; }
@media (min-width: 1000px) { .sup-admin { grid-template-columns: minmax(0, 1fr) 320px; } }
.sup-list { list-style: none; margin: 0; padding: 0; }
.sup-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--border-2); }
.sup-list li:first-child { border-top: 0; }
.sup-timeline { list-style: none; margin: 0; padding: 0 0 0 .2rem; font-size: var(--fs-sm); }
.sup-timeline li { padding: .35rem 0 .35rem .8rem; border-left: 2px solid var(--border); overflow-wrap: anywhere; }
@media (max-width: 640px) { .sup-msg { max-width: 100%; } .sup-subj { white-space: normal; } }
