/* A1 Issues. One quiet surface, one accent; colour is kept for state (your turn, held, waiting, closed).
   Every colour is a token: the light values first, the dark values follow the reader's system setting. */
:root{
  --bg:#f5f6f9;--surface:#fff;--sunken:#eef1f6;--hover:#f3f6fb;
  --ink:#131a2a;--ink2:#414b5e;--muted:#6b7588;--line:#e1e5ec;--line2:#cbd2dd;
  --accent:#1f4fa3;--accent-ink:#fff;--accent-soft:#e9f0fc;--ring:rgba(31,79,163,.28);
  --red:#c62828;--red-soft:#fdecec;--orange:#b84a08;--orange-soft:#fff0e2;--orange-line:#f3b98a;
  --amber:#8f5b00;--amber-soft:#fcf1d3;--amber-line:#ecd28a;--blue:#1d55b8;--blue-soft:#e6eefc;--blue-line:#b9cff5;
  --green:#1a7a3c;--green-soft:#e7f6ec;--green-line:#a9dcb9;--grey:#556070;--grey-soft:#eceff4;
  --teal:#0e6f82;--teal-soft:#e1f3f6;--red-line:#f3c1c1;
  --solid-red:#c62828;--solid-orange:#c8540a;--solid-green:#18793a;
  --tile-s:60%;--tile-l:92%;--tile-fl:30%;--swatch-l:48%;
  --shadow:0 1px 2px rgba(19,26,42,.05),0 1px 1px rgba(19,26,42,.03);
  --r:12px;--r-sm:8px;
}
@media (prefers-color-scheme:dark){:root{
  color-scheme:dark;
  --bg:#0f131a;--surface:#171c26;--sunken:#1e2531;--hover:#1c2230;
  --ink:#e8ecf3;--ink2:#b9c1cf;--muted:#8c96a8;--line:#262e3c;--line2:#3a4558;
  --accent:#7ea8f5;--accent-ink:#0d1220;--accent-soft:#1c2942;--ring:rgba(126,168,245,.35);
  --red:#ff8f85;--red-soft:#3a1d1f;--orange:#ffab66;--orange-soft:#38240f;--orange-line:#7a4a1c;
  --amber:#f0c35a;--amber-soft:#30270e;--amber-line:#6a5417;--blue:#8db4ff;--blue-soft:#1b2946;--blue-line:#2f4a80;
  --green:#6fd08c;--green-soft:#16301f;--green-line:#245c36;--grey:#a3adbd;--grey-soft:#252d3a;
  --teal:#6fd3e6;--teal-soft:#12303a;--red-line:#6b2a2a;
  --tile-s:35%;--tile-l:22%;--tile-fl:82%;--swatch-l:62%;
  --shadow:none;
}}
[hidden]{display:none!important}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-font-smoothing:antialiased}
a{color:var(--accent)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
svg{flex-shrink:0}

/* ── frame ── */
.top{background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.top-in{max-width:1080px;margin:0 auto;padding:0 20px;height:54px;display:flex;align-items:center;gap:22px}
.brand{display:flex;align-items:center;gap:9px;font-weight:700;font-size:15.5px;letter-spacing:-.01em;color:var(--ink);text-decoration:none}
.brand svg{width:24px;height:24px}.brand rect{fill:var(--accent)}.brand path{fill:none;stroke:var(--accent-ink);stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.nav{display:flex;gap:2px;align-self:stretch}
.nav a{display:flex;align-items:center;padding:0 12px;color:var(--muted);text-decoration:none;font-weight:600;font-size:13.5px;border-bottom:2px solid transparent;margin-bottom:-1px}
.nav a:hover{color:var(--ink)}.nav a.on{color:var(--ink);border-bottom-color:var(--accent)}
.who{margin-left:auto;display:flex;gap:14px;align-items:center;font-size:13px;color:var(--muted)}
.who a{color:var(--ink2);text-decoration:none;font-weight:600}.who a:hover{color:var(--accent)}
main{max-width:1080px;margin:0 auto;padding:22px 20px 56px}
h1{font-size:24px;line-height:1.2;letter-spacing:-.02em;margin:0;font-weight:700;text-wrap:balance}
h2{font-size:19px;line-height:1.3;letter-spacing:-.01em;margin:8px 0 6px;text-wrap:balance}
.muted{color:var(--muted);font-size:12.5px}.pad{padding:16px}.nowrap{white-space:nowrap}.wrap{word-break:break-all}.right{margin-left:auto}
.ok{color:var(--green)}.warn{color:var(--amber)}.heldtxt{color:var(--orange)}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;margin:14px 0;box-shadow:var(--shadow)}
.panel.flush{padding:0;overflow-x:auto}
.flash{border-radius:var(--r-sm);padding:10px 14px;margin:12px 0;border:1px solid}
.flash.ok{background:var(--green-soft);border-color:var(--green-line);color:var(--green)}
.flash.err{background:var(--red-soft);border-color:var(--red-line);color:var(--red)}
.flash a{color:inherit;font-weight:600}

/* ── tables (Systems) ── */
table{width:100%;border-collapse:collapse;font-size:13px}
th{color:var(--muted);font-weight:600;font-size:12px;padding:10px 14px;text-align:left;white-space:nowrap;border-bottom:1px solid var(--line);background:var(--sunken)}
td{padding:10px 14px;border-bottom:1px solid var(--line);vertical-align:top}
tr:last-child td{border-bottom:0}
code{font:12.5px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:var(--sunken);padding:1px 6px;border-radius:5px}

/* ── pills ── */
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent);margin-right:8px;vertical-align:middle}
.pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11.5px;font-weight:600;line-height:1.5;white-space:nowrap}
.pills{margin:8px 0;display:flex;flex-wrap:wrap;gap:6px}
.st-turn{background:var(--red-soft);color:var(--red)}.st-held{background:var(--orange-soft);color:var(--orange)}
.st-support{background:var(--blue-soft);color:var(--blue)}.st-wd{background:var(--accent-soft);color:var(--accent)}
.st-user{background:var(--amber-soft);color:var(--amber)}.st-closed{background:var(--grey-soft);color:var(--grey)}
.urgent,.turn{background:var(--solid-red);color:#fff}.pill.held{background:var(--solid-orange);color:#fff}
.queued{background:var(--teal-soft);color:var(--teal)}
.sys{display:inline-block;padding:1px 8px;border-radius:6px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:700;white-space:nowrap;vertical-align:2px}

/* ── forms and buttons ── */
label{display:block;font-weight:600;font-size:13px;margin:12px 0 5px}
input,textarea,select,button{font:inherit;color:inherit}
.panel input:not([type=radio]):not([type=file]),.panel textarea{width:100%;border:1px solid var(--line2);border-radius:var(--r-sm);padding:9px 11px;font-size:14px;background:var(--surface)}
.panel input:focus,.panel textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
textarea{min-height:110px;resize:vertical}textarea.short{min-height:44px}
.btn{display:inline-flex;align-items:center;gap:6px;border:1px solid transparent;border-radius:var(--r-sm);padding:8px 15px;font-weight:600;font-size:13.5px;line-height:1.4;cursor:pointer;text-decoration:none;transition:filter .12s,background .12s}
.btn:hover{filter:brightness(.95)}.btn:disabled{opacity:.6;cursor:default}
.b-primary{background:var(--accent);color:var(--accent-ink)}.b-orange{background:var(--solid-orange);color:#fff}.b-green{background:var(--solid-green);color:#fff}
.b-grey{background:var(--surface);color:var(--ink);border-color:var(--line2)}.b-grey:hover{background:var(--hover);filter:none}
.btn-sm{padding:5px 11px;font-size:12.5px}
.acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;align-items:center}
.to{display:flex;flex-wrap:wrap;gap:6px 18px;margin:10px 0 0;font-size:13px}.to label{display:inline;font-weight:500;margin:0}
.drop{border:1.5px dashed var(--line2);border-radius:var(--r);padding:14px;text-align:center;color:var(--muted);font-size:13px;cursor:pointer;background:var(--sunken);margin-top:12px}
.drop:hover,.drop.over{border-color:var(--accent);background:var(--accent-soft);color:var(--ink2)}
.thumbs{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.thumb{position:relative;border:1px solid var(--line);border-radius:var(--r-sm);padding:4px;background:var(--surface);font-size:11px;max-width:150px}
.thumb img{display:block;max-width:140px;max-height:100px;border-radius:5px}
.thumb .x{position:absolute;top:-8px;right:-8px;width:20px;height:20px;border-radius:50%;border:0;background:var(--solid-red);color:#fff;cursor:pointer;line-height:1}

/* ── one ticket (ticket.php) ── */
.thread{display:flex;flex-direction:column;gap:12px;margin:16px 0}
.m{border:1px solid var(--line);border-radius:var(--r);padding:11px 15px;background:var(--surface);max-width:88%;box-shadow:var(--shadow)}
.m.me{align-self:flex-end;background:var(--accent-soft);border-color:var(--blue-line)}
.m.note{background:var(--amber-soft);border-color:var(--amber-line);border-style:dashed}
.m.held{align-self:flex-end;background:var(--orange-soft);border:1.5px dashed var(--solid-orange);color:var(--ink)}
.m.event{align-self:center;background:transparent;border-color:transparent;box-shadow:none;max-width:100%;font-size:12.5px;padding:2px 12px;text-align:center}
.wholine{font-size:12px;color:var(--muted);margin-bottom:5px}.wholine b{color:var(--ink)}
/* which message is the latest, and what is new since the last visit (thread on the ticket page) */
.latestbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:var(--r);padding:9px 14px;margin:14px 0 4px;font-size:13px;position:sticky;top:56px;z-index:5;box-shadow:var(--shadow)}
.latestbar .btn{margin-left:auto}
.newpill{background:var(--accent);color:var(--accent-ink);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:700;text-decoration:none}
.daysep,.newsep{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;font-weight:700;margin:6px 0 -2px}
.daysep:before,.daysep:after,.newsep:before,.newsep:after{content:"";flex:1;height:1px;background:var(--line2)}
.daysep span{background:var(--sunken);border:1px solid var(--line);border-radius:999px;padding:1px 10px}
.newsep{color:var(--accent)}.newsep:before,.newsep:after{background:var(--accent)}
.newsep span{background:var(--accent-soft);border-radius:999px;padding:1px 10px}
.m.latest{border-width:2px;border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
.m.isnew{border-left:4px solid var(--accent)}
.tag{display:inline-block;border-radius:6px;padding:0 6px;font-size:11px;font-weight:700;vertical-align:1px}
.tag-latest{background:var(--accent);color:var(--accent-ink)}.tag-new{background:var(--accent-soft);color:var(--accent);border:1px solid var(--accent)}
.wholine .ago{color:var(--muted)}
.m.flash-in{animation:flashin 1.6s ease-out}
@keyframes flashin{0%{box-shadow:0 0 0 6px var(--ring)}100%{box-shadow:var(--shadow)}}
@media (prefers-reduced-motion:reduce){.m.flash-in{animation:none}}
.in-pane .latestbar{top:52px}
.thread .m,.thread .newsep{scroll-margin-top:118px}.in-pane .thread .m,.in-pane .thread .newsep{scroll-margin-top:112px}
@media (max-width:640px){.latestbar{position:static}.latestbar .btn{margin-left:0}}
.body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.55}
.rich{white-space:normal;overflow-x:auto}.rich p{margin:0 0 6px}.rich ul,.rich ol{margin:4px 0 6px 22px;padding:0}
.rich table,.rte-area table{width:auto;border-collapse:collapse;margin:6px 0}
.rich th,.rich td,.rte-area th,.rte-area td{border:1px solid var(--line2);padding:4px 8px;background:none;color:var(--ink);font-weight:normal;font-size:13px;white-space:normal}
.rich th,.rte-area th{background:var(--sunken);font-weight:700}
.links a{display:block;word-break:break-all;font-size:13px;margin-top:4px}
.att{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.att img{max-width:220px;max-height:160px;border:1px solid var(--line);border-radius:6px;display:block}
.mact{margin-top:10px;display:flex;gap:6px}.mact .btn{font-size:12px;padding:4px 10px}form.inline{display:inline}.pills form.inline .btn{font-size:11.5px;padding:2px 9px;vertical-align:middle}
.heldbar{background:var(--orange-soft);border:1px solid var(--orange-line);color:var(--orange);display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.heldbar.small{padding:8px 12px;border-radius:var(--r-sm);margin-bottom:8px}
.meta{display:grid;grid-template-columns:130px 1fr;gap:6px 12px;margin:0;font-size:13.5px}.meta dt{font-weight:600;color:var(--muted)}.meta dd{margin:0;word-break:break-word}
.rte{border:1px solid var(--line2);border-radius:var(--r-sm);background:var(--surface)}
.rte:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
.rte-bar{display:flex;flex-wrap:wrap;gap:4px;padding:6px;border-bottom:1px solid var(--line);background:var(--sunken);border-radius:var(--r-sm) var(--r-sm) 0 0}
.rte-bar button{border:1px solid var(--line2);background:var(--surface);border-radius:6px;padding:3px 9px;font-size:13px;cursor:pointer;min-width:30px}
.rte-bar button:hover{background:var(--hover)}
.rte-area{min-height:130px;max-height:520px;overflow:auto;padding:10px 12px;font-size:14px;outline:none}
.rte-area:empty:before{content:attr(data-placeholder);color:var(--muted)}

/* ── sign in ── */
.login{max-width:380px;margin:9vh auto 0}
.login h1{font-size:26px}.login .muted{font-size:13.5px;margin:6px 0 0}
.login .panel{padding:20px 22px 22px;margin-top:20px}.login .btn{width:100%;justify-content:center;padding:10px}

/* ── the inbox (index.php): folders | list | reading pane ── */
main.wide{max-width:none;padding:0}
body:has(main.wide) .top-in{max-width:none}
.st-feedback{background:var(--blue-soft);color:var(--blue)}.st-progress{background:var(--teal-soft);color:var(--teal)}.st-hold{background:var(--grey-soft);color:var(--grey)}
.inbox{display:grid;grid-template-columns:228px minmax(360px,460px) minmax(0,1fr);height:calc(100vh - 55px);height:calc(100dvh - 55px)}
.folders{border-right:1px solid var(--line);background:var(--surface);overflow-y:auto;padding:14px 10px;display:flex;flex-direction:column;gap:14px}
.fl,.fl-sys{display:flex;flex-direction:column;gap:1px}
.fl hr{border:0;border-top:1px solid var(--line);margin:7px 8px}
.fl-h{margin:0 10px 4px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.f{display:flex;align-items:center;gap:11px;padding:7px 10px;border-radius:8px;color:var(--ink2);text-decoration:none;font-size:13.5px;font-weight:500;min-height:34px}
.f:hover{background:var(--hover);color:var(--ink)}
.f.on{background:var(--accent-soft);color:var(--accent);font-weight:650}
.f svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.f-l{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.f-n{font-size:12px;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums}
.f.on .f-n{color:inherit}
.f.hot .f-n{min-width:22px;padding:0 7px;border-radius:999px;line-height:19px;text-align:center;background:var(--red-soft);color:var(--red)}
.f-held.hot .f-n{background:var(--orange-soft);color:var(--orange)}
.f.s{font-size:13px;min-height:30px;padding:5px 10px}.f.s.none{color:var(--muted)}
.swatch{width:9px;height:9px;border-radius:50%;background:hsl(var(--h) 55% var(--swatch-l));margin:0 4px}
.swatch.all{background:conic-gradient(hsl(20 70% var(--swatch-l)) 0 33%,hsl(140 55% var(--swatch-l)) 0 66%,hsl(220 65% var(--swatch-l)) 0)}
.fl-warn{display:block;margin:0 4px;padding:9px 10px;border-radius:8px;background:var(--red-soft);color:var(--red);font-size:12.5px;font-weight:600;text-decoration:none}

.listcol{display:flex;flex-direction:column;min-height:0;min-width:0;border-right:1px solid var(--line);background:var(--surface)}
.tools{display:flex;gap:8px;align-items:center;padding:12px 12px 8px}
.searchbox{position:relative;flex:1;min-width:0}
.searchbox svg{position:absolute;left:11px;top:50%;width:15px;height:15px;margin-top:-7.5px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round;pointer-events:none}
.searchbox input{width:100%;height:36px;border:1px solid var(--line2);border-radius:9px;padding:0 34px;background:var(--sunken);-webkit-appearance:none;appearance:none}
.searchbox input::placeholder{color:var(--muted)}
.searchbox input:focus{outline:0;border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 3px var(--ring)}
.searchbox input::-webkit-search-cancel-button{display:none}
.searchbox .clear{position:absolute;right:4px;top:50%;transform:translateY(-50%);border:0;background:none;color:var(--muted);font-size:20px;line-height:1;padding:3px 8px;cursor:pointer;border-radius:6px}
.searchbox .clear:hover{color:var(--ink);background:var(--hover)}
.searchbox .key{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none}
.searchbox input:focus~.key{display:none}
.key{display:inline-block;min-width:20px;padding:0 5px;border:1px solid var(--line2);border-bottom-width:2px;border-radius:5px;background:var(--surface);color:var(--muted);font:600 11px/17px system-ui,sans-serif;text-align:center}
#sort{height:36px;border:1px solid var(--line2);border-radius:9px;padding:0 6px;background:var(--surface);color:var(--ink);cursor:pointer;max-width:132px;font-size:13px}
.bulk{display:flex;align-items:center;gap:8px;padding:6px 12px 6px 14px;border-bottom:1px solid var(--line);min-height:42px;flex-wrap:wrap;font-size:12.5px;color:var(--muted)}
.bulk-all{margin:0;display:flex;align-items:center;padding:4px}
.bulk input[type=checkbox],.tk-check{width:16px;height:16px;margin:0;accent-color:var(--accent);cursor:pointer}
.bulk-n{flex:1;min-width:0}
.bulk.active{background:var(--accent-soft);color:var(--ink)}.bulk.active .bulk-n{flex:0 0 auto;font-weight:600}
.bulk:not(.active) .bulk-acts{display:none}
.bulk-acts{display:flex;flex-wrap:wrap;gap:5px}
.bulk.busy{opacity:.6;pointer-events:none}
.mv,.seg-b{border:1px solid var(--line2);background:var(--surface);color:var(--ink);border-radius:999px;padding:3px 11px;font-size:12.5px;font-weight:600;cursor:pointer;line-height:1.5}
.mv:hover,.seg-b:hover{border-color:var(--accent);color:var(--accent)}
.mv::before,.seg-b::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:1px;background:var(--c,var(--muted))}
.mv-turn{--c:var(--red)}.mv-progress{--c:var(--teal)}.mv-feedback{--c:var(--blue)}.mv-hold{--c:var(--grey)}

.list{flex:1;min-height:0;overflow-y:auto;transition:opacity .15s;overscroll-behavior:contain}
.loading .list{opacity:.65}
.list-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:12px 16px 8px}
.list-h h1{font-size:17px;letter-spacing:-.01em}
.h-sub{color:var(--muted);font-weight:500}
.list .flash{margin:0 12px 8px}
.tk{display:flex;gap:12px;align-items:flex-start;padding:11px 14px 11px 12px;border-bottom:1px solid var(--line);position:relative}
.tk:hover{background:var(--hover)}
.tk.picked{background:var(--accent-soft)}
.tk.sel{background:var(--accent-soft);box-shadow:inset 3px 0 0 var(--accent)}
.tk:focus-within{background:var(--hover)}
.tk-a{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;color:var(--ink);text-decoration:none}
.tk-a:focus-visible{outline:0}
.tk:has(.tk-a:focus-visible){box-shadow:inset 3px 0 0 var(--accent);background:var(--hover)}
.tk-sys{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-size:11.5px;font-weight:700;letter-spacing:.02em;margin:1px 0 0;
  background:hsl(var(--h) var(--tile-s) var(--tile-l));color:hsl(var(--h) 55% var(--tile-fl));flex-shrink:0;position:relative}
.tk-sys.pick{cursor:pointer}
.tk-sys .tk-check{position:absolute;opacity:0}
.tk-sys.pick:hover .tk-ini,.tk.picked .tk-ini,.picking .tk-sys.pick .tk-ini{visibility:hidden}
.tk-sys.pick:hover .tk-check,.tk.picked .tk-check,.picking .tk-sys.pick .tk-check,.tk-sys .tk-check:focus-visible{opacity:1}
.tk-sys:has(.tk-check:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.tk-top{display:flex;align-items:baseline;gap:10px}
.tk-who{flex:1;min-width:0;font-size:13px;color:var(--ink2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-title{font-size:14px;font-weight:500;line-height:1.35;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tk.unread .tk-title,.tk.unread .tk-who{font-weight:700;color:var(--ink)}
.tk.closed .tk-title{color:var(--ink2)}
.tk-prev{color:var(--muted);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-prev b{font-weight:600;color:var(--ink2)}
.tk-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:12px;color:var(--muted);margin-top:3px}
.tk-meta .pill{font-size:11px;padding:1px 8px}
.tk-ref{font-weight:600;color:var(--ink2);white-space:nowrap}
.tk-by{white-space:nowrap}
.tk-n{display:inline-flex;align-items:center;gap:3px;font-variant-numeric:tabular-nums;margin-left:auto}
.tk-n svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
.when{font-size:12px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums;flex-shrink:0}
.tk.unread .when{color:var(--accent);font-weight:700}
.when.age-amber{color:var(--amber);font-weight:700}.when.age-red{color:var(--red);font-weight:700}
.empty{padding:44px 16px;text-align:center;color:var(--muted);font-size:14px;display:flex;flex-direction:column;align-items:center;gap:12px}
.empty p{margin:0}
.empty svg{width:34px;height:34px;padding:8px;border-radius:50%;background:var(--green-soft);fill:none;stroke:var(--green);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.foot{display:flex;justify-content:space-between;gap:12px;margin:0;padding:10px 16px 16px;color:var(--muted);font-size:12px}
.keys .key{margin-left:6px}

.pane{min-width:0;min-height:0;background:var(--bg);position:relative}
.inbox{transition:grid-template-columns .2s ease}
.pane-tools{position:absolute;left:10px;top:10px;z-index:3;display:flex;align-items:center;gap:8px}
.fold{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 9px 0 6px;border:1px solid var(--line2);border-radius:8px;
  background:var(--surface);color:var(--muted);font-size:12.5px;font-weight:600;cursor:pointer;box-shadow:var(--shadow)}
.fold:hover{color:var(--accent);border-color:var(--accent)}
.fold svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.fold .fold-l{display:none}
.folded .fold svg{transform:rotate(180deg)}.folded .fold .fold-l{display:inline}
.inbox.folded{grid-template-columns:228px 0 minmax(0,1fr)}
.folded .listcol{overflow:hidden;border-right:0;visibility:hidden}
body.in-pane .pane-top{margin-left:290px;min-height:28px;line-height:28px}
.tknav{display:inline-flex;align-items:center;gap:3px;height:30px;padding:2px;border:1px solid var(--blue-line);border-radius:999px;
  background:linear-gradient(180deg,var(--surface),var(--accent-soft));box-shadow:0 1px 3px rgba(31,79,163,.14)}
.tknav[hidden]{display:none}
.tknav button{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:999px;
  background:none;color:var(--accent);cursor:pointer;transition:background .15s,color .15s,transform .1s}
.tknav button[data-step=prev],.tknav button[data-step=next]{background:var(--accent);color:var(--accent-ink);box-shadow:0 1px 2px rgba(31,79,163,.3)}
.tknav button:hover:not(:disabled){background:var(--blue-line);color:var(--accent)}
.tknav button[data-step=prev]:hover:not(:disabled),.tknav button[data-step=next]:hover:not(:disabled){background:var(--blue);color:var(--accent-ink);filter:brightness(1.12)}
.tknav button:active:not(:disabled){transform:scale(.92)}
.tknav button:disabled,.tknav button[data-step]:disabled{background:none;color:var(--line2);box-shadow:none;cursor:default}
.tknav svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.tknav-n{min-width:56px;padding:0 4px;text-align:center;font-size:12px;font-weight:700;color:var(--accent);font-variant-numeric:tabular-nums;letter-spacing:.01em}
.pane iframe{display:block;width:100%;height:100%;border:0;background:var(--bg)}
.pane-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--muted)}
.pane-empty svg{width:44px;height:44px;fill:none;stroke:var(--line2);stroke-width:1.5;stroke-linejoin:round}
.pane-empty p{margin:0}
.toast{position:fixed;left:50%;bottom:22px;transform:translate(-50%,20px);background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:10px;font-size:13.5px;font-weight:500;
  opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;z-index:50;max-width:calc(100vw - 32px)}
.toast.show{opacity:1;transform:translate(-50%,0)}.toast.bad{background:var(--solid-red);color:#fff}

/* a ticket in the pane, and its status switch */
body.in-pane main{max-width:none;padding:14px 22px 40px}
body.in-pane h2{margin-top:0}
.pane-top{margin:0 0 6px;text-align:right;font-size:12.5px}.pane-top a{color:var(--muted);text-decoration:none}.pane-top a:hover{color:var(--accent)}
.markbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:10px 0 4px;padding:9px 12px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}
.markbar-l{font-size:12.5px;font-weight:700;color:var(--muted)}
.seg{display:flex;flex-wrap:wrap;gap:5px}
.seg-b.on{background:var(--ink);border-color:var(--ink);color:var(--bg);cursor:default;opacity:1}
.seg-b.on:hover{color:var(--bg)}

/* medium screens: the folders become an icon rail */
@media (max-width:1279px) and (min-width:900px){
  .inbox{grid-template-columns:60px minmax(320px,400px) minmax(0,1fr)}
  .inbox.folded{grid-template-columns:60px 0 minmax(0,1fr)}
  .folders{padding:10px 8px;align-items:stretch}
  .f{justify-content:center;padding:9px 0;position:relative}
  .f-l,.fl-h,.fl-sys,.fl-warn{display:none}
  .f-n{position:absolute;top:2px;right:2px;font-size:10px}
  .f.hot .f-n{min-width:17px;padding:0 4px;line-height:16px}
  .f:not(.hot) .f-n{display:none}
}
/* phones and narrow windows: no pane; folders scroll across the top; the page scrolls */
@media (max-width:899px){
  .inbox{display:block;height:auto}
  .folders{position:sticky;top:54px;z-index:5;border-right:0;border-bottom:1px solid var(--line);padding:6px 10px;flex-direction:row;overflow-x:auto;scrollbar-width:none}
  .folders::-webkit-scrollbar{display:none}
  .fl{flex-direction:row;gap:4px}.fl hr,.fl-sys,.fl-h{display:none}
  .f{white-space:nowrap;padding:6px 10px;min-height:32px;gap:7px}.f svg{display:none}
  .fl-warn{white-space:nowrap}
  .listcol{border-right:0}
  .list{overflow:visible}
  .pane{display:none}
  .inbox.folded .listcol{visibility:visible}
}
@media (max-width:640px){
  .top-in{padding:0 16px;gap:12px}main{padding:16px 16px 40px}main.wide{padding:0}
  h1{font-size:21px}.list-h h1{font-size:16px}
  .m{max-width:100%}.meta{grid-template-columns:1fr;gap:0}.meta dd{margin-bottom:6px}.hide-sm{display:none}
  .searchbox .key{display:none}#sort{max-width:110px}
  .tk{padding:11px 12px 11px 10px;gap:10px}.tk-sys{width:32px;height:32px}
  .tk-prev{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .bulk-acts{width:100%}
  body.in-pane main{padding:12px 14px 30px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
/* screenshot viewer (assets/viewer.js) */
.att a.js-view{display:block;border-radius:6px;cursor:zoom-in;outline-offset:2px}
.att a.js-view img{transition:transform .15s ease,box-shadow .15s ease}
.att a.js-view:hover img{transform:translateY(-1px);box-shadow:0 4px 14px rgba(19,26,42,.18)}
html.iv-lock,html.iv-lock body{overflow:hidden}
.iv{position:fixed;inset:0;z-index:10000;background:rgba(8,11,17,.9);color:#e8ecf3;opacity:0;visibility:hidden;transition:opacity .18s ease,visibility 0s linear .18s;outline:none;-webkit-tap-highlight-color:transparent}
.iv.on{opacity:1;visibility:visible;transition:opacity .18s ease}
.iv-stage{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:default}
.iv-img{position:absolute;left:50%;top:50%;max-width:none;transform-origin:center;cursor:zoom-in;user-select:none;-webkit-user-select:none;border-radius:4px;box-shadow:0 10px 40px rgba(0,0,0,.45);background:#fff}
.iv.zoomed .iv-img{cursor:grab}.iv.zoomed .iv-img:active{cursor:grabbing}
.iv.loading .iv-stage::after{content:"";position:absolute;left:50%;top:50%;width:34px;height:34px;margin:-17px;border:3px solid rgba(255,255,255,.25);border-top-color:#fff;border-radius:50%;animation:iv-spin .7s linear infinite}
@keyframes iv-spin{to{transform:rotate(360deg)}}
.iv-bar{position:absolute;left:0;right:0;top:0;display:flex;align-items:center;gap:12px;padding:10px 12px 18px 16px;background:linear-gradient(rgba(8,11,17,.85),rgba(8,11,17,0));pointer-events:none}
.iv-cap{flex:1;min-width:0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#cfd6e2}
.iv-tools{display:flex;align-items:center;gap:6px;pointer-events:auto}
.iv-cnt{font-size:12px;color:#aab3c2;margin-right:4px;font-variant-numeric:tabular-nums}
.iv-b{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.1);color:#fff;font-size:17px;line-height:1;text-decoration:none;cursor:pointer;transition:background .12s}
.iv-b:hover,.iv-b:focus-visible{background:rgba(255,255,255,.22)}.iv-b:focus-visible,.iv-nav:focus-visible{outline:2px solid #7ea8f5;outline-offset:2px}
.iv-nav{position:absolute;top:50%;margin-top:-26px;width:52px;height:52px;border-radius:50%;border:0;background:rgba(255,255,255,.1);color:#fff;font-size:32px;line-height:1;cursor:pointer;transition:background .12s,opacity .15s;opacity:.75}
.iv-nav:hover{background:rgba(255,255,255,.22);opacity:1}.iv-prev{left:14px}.iv-next{right:14px}
@media (max-width:600px){.iv-nav{width:42px;height:42px;font-size:26px;margin-top:-21px}.iv-prev{left:6px}.iv-next{right:6px}.iv-bar{padding:8px 8px 16px 12px}}
@media (hover:none){.iv-nav{opacity:.55}}

/* auto-close pending (lib/autoclose.php) */
.pill.autoclose { background: #fff4e5; color: #9a4d00; border: 1px solid #f3c48b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.autoclose { background: #3a2a14; color: #f6c17d; border-color: #6b4a1f; } }
:root[data-theme="dark"] .pill.autoclose { background: #3a2a14; color: #f6c17d; border-color: #6b4a1f; }

/* the fix's release state and "closed, no reply" (18 Nov 2026) */
.st-golive{background:var(--amber-soft);color:var(--amber)}.st-live{background:var(--green-soft,#e7f6ec);color:var(--green)}
.st-noreply{background:var(--orange-soft);color:var(--orange)}
.fixbar{padding:10px 16px}.fixbar .fix-h{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.fixbar .fix-h .btn{margin-left:auto}
.fixbar.fix-staged{border-left:4px solid var(--amber)}.fixbar.fix-live{border-left:4px solid var(--green)}
.fix-note{white-space:pre-wrap;word-break:break-word;background:var(--sunken);border:1px solid var(--line);border-radius:var(--r-sm);padding:8px 10px;margin:8px 0;font-size:12.5px}
.fix-edit summary{cursor:pointer;color:var(--accent);font-size:13px;font-weight:600}
.fix-edit textarea,.fix-edit input{margin:6px 0}
.fixbar .acts{display:flex;gap:8px;align-items:center;margin-top:6px}
.noreplybar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;border-left:4px solid var(--solid-orange)}

/* ── Checklist (checklist.php, 20 Nov 2026) ── */
.pill.chkpill{background:var(--green-soft);color:var(--green);border:1px solid var(--green-line);text-decoration:none}
.chk .chk-h{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.chk .chk-h h3{margin:0;font-size:15px}
.chk-big{font-size:15px}
.chk-bar{display:inline-flex;width:180px;height:8px;border-radius:99px;background:var(--sunken);overflow:hidden}
.chk-bar i{display:block;height:100%}.chk-bar .b-done{background:var(--green)}.chk-bar .b-wont{background:var(--grey)}.chk-bar .b-prog{background:var(--teal);opacity:.6}
.chk-note{background:var(--amber-soft);border:1px solid var(--amber-line);border-radius:var(--r-sm);padding:7px 10px;margin:6px 0 10px;font-size:13px}
.chk-g{margin:10px 0 4px}
.chk-gh{font-size:13.5px;padding:4px 0;border-bottom:1px solid var(--line);margin-bottom:2px}
.it{padding:6px 0 6px 4px;border-bottom:1px dashed var(--line)}
.it-row{display:flex;align-items:flex-start;gap:8px}
.it-no{min-width:34px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums;padding-top:3px}
.it-tx{flex:1;padding-top:3px;line-height:1.4}
.it-done .it-tx{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--green-line)}
.it-wont .it-tx{color:var(--muted);font-style:italic}
.it-seg{display:inline-flex;border:1px solid var(--line2);border-radius:var(--r-sm);overflow:hidden;flex-shrink:0}
.itb{border:0;border-right:1px solid var(--line2);background:var(--surface);color:var(--ink2);padding:3px 8px;font-size:13px;cursor:pointer;line-height:1.4}
.itb:last-child{border-right:0}.itb:hover:not(.on){background:var(--hover)}
.itb.on{cursor:default;color:#fff;font-weight:700}
.itb-open.on{background:var(--grey)}.itb-progress.on{background:var(--teal)}.itb-done.on{background:var(--green)}.itb-wont.on{background:var(--grey);opacity:.75}
.itb-l{display:none}.itb.on .itb-l{display:inline}
.it-sent{font-size:12px;margin:3px 0 0 42px}
.it-rep{margin:3px 0 0 42px;font-size:13px}
.it-rep>summary{cursor:pointer;color:var(--accent);font-size:12.5px;width:max-content}
.it-rep textarea{margin-top:6px;min-height:60px}
.it-rep .acts{display:flex;align-items:center;gap:10px;margin-top:6px;flex-wrap:wrap}
.it-edit{margin-top:6px}.it-edit summary{cursor:pointer;color:var(--muted);font-size:12px;width:max-content}
.it-edit form{display:flex;gap:6px;margin-top:5px}
.chk-edit{margin-top:12px}.chk-edit>summary,.chk-new>summary{cursor:pointer;font-weight:600}
.chk-edit textarea,.chk-new textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px}
.chk-new .acts,.chk-edit .acts{margin-top:8px}
@media (max-width:700px){.it-row{flex-wrap:wrap}.it-seg{margin-left:42px}.chk-bar{width:120px}}
