:root {
    --bg: #0f1115;
    --panel: #171a21;
    --panel-2: #1e222b;
    --ink: #e6e8ee;
    --muted: #9aa3b2;
    --line: #2a2f3a;
    --accent: #6ea8fe;
    --accent-ink: #0b1220;
    --new: #f0b429;
    --open: #6ea8fe;
    --prog: #57c785;
    --blocked: #e5675f;
    /* needs_verification — the one column that is asking the READER for
       something, so it gets the warmest colour on the board. */
    --verify: #c792ea;
    --done: #7b8494;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 20px; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.topbar h1 { font-size: 18px; margin: 0; }
.topbar h1 a { color: var(--ink); }
.topbar .who { color: var(--muted); font-size: 13px; }
.btn {
    display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--panel-2); color: var(--ink); cursor: pointer; font-size: 14px;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }

/* The board's filter bar — narrows by status, stack and priority via the URL
   query string, so a filtered view is bookmarkable and shareable. */
.filters {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin-top: 14px;
}
.filters select {
    font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px;
    background: var(--panel-2); color: var(--ink); border: 1px solid var(--line);
    cursor: pointer;
}

/* dashboard board */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 18px; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 120px; }
.col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; color: var(--muted); display: flex; justify-content: space-between; }
.col-new h2 { color: var(--new); }
.col-open h2 { color: var(--open); }
.col-in_progress h2 { color: var(--prog); }
.col-blocked h2 { color: var(--blocked); }
.col-needs_verification h2 { color: var(--verify); }
.count { background: var(--panel-2); border-radius: 20px; padding: 1px 8px; font-size: 12px; color: var(--muted); }
.card {
    display: block; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
    padding: 10px 12px; margin-bottom: 9px; color: var(--ink);
}
.card-link { display: block; color: inherit; }
.card:hover { border-color: var(--accent); text-decoration: none; }

/* The inline priority control. Quiet until you reach for it — it sits on every
   card, so at full strength 46 of them would read as the point of the page. */
.card-pri { margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.card-pri select {
    font: inherit; font-size: 11px; padding: 2px 4px; border-radius: 5px;
    background: var(--panel-2); color: var(--muted);
    border: 1px solid var(--line); opacity: 0.75; cursor: pointer;
}
.card-pri select:hover, .card-pri select:focus { opacity: 1; color: var(--ink); }

/* Visually hidden, still read aloud. Every select needs a label or a screen
   reader announces 46 identical unnamed dropdowns. */
.vh {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.card .t-title { font-weight: 600; margin-bottom: 4px; }
/* The history toggle. Centred and quiet — it is a way back to closed work,
   not a call to action. */
.closed-toggle { margin: 18px 0 0; text-align: center; }

/* ⭐ BLOCKED READS AS A WARNING, NOT AS ANOTHER PILL. The card's other metadata
   is deliberately quiet; this one has to survive a glance down a column of
   forty, because its whole job is stopping somebody starting the ticket. */
.card .t-blocked {
    font-size: 12px;
    color: var(--blocked);
    margin-bottom: 4px;
    font-weight: 600;
    word-break: break-all;
}

.card .t-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 0 8px; }
.empty { color: var(--muted); font-size: 13px; font-style: italic; }

/* detail + forms */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-top: 18px; }
.panel h2 { margin-top: 0; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 14px 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.body-text { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 8px 0 16px; }
.log li { margin-bottom: 8px; }

/* ⭐⭐ RENDERED MARKDOWN. Ticket bodies, tech notes and work-log notes all go
   through the same renderer now (markdown.go), so they get one set of rules
   rather than one block keeping its line breaks and the other two not — which
   is exactly how this looked arbitrary before. */
.md { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 8px 0 16px; overflow-wrap: anywhere; }
/* ⚠ FIRST AND LAST CHILD MARGINS COLLAPSED. Without this every block starts
   with a paragraph's worth of empty space inside its own border, which reads as
   a rendering fault rather than as spacing. */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { font-size: 1.02rem; margin: 14px 0 6px; color: var(--fg); }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md code { background: var(--line); border-radius: 4px; padding: 1px 4px; font-size: 0.92em; }
/* ⚠ A CODE BLOCK SCROLLS INSIDE ITSELF. Notes carry pasted command output with
   long lines; without this the whole PAGE scrolls sideways on a phone. */
.md pre { background: var(--line); border-radius: 6px; padding: 10px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
/* ⭐ TABLES ARE WHY goldmark WAS CHOSEN OVER THE SMALLER RENDERER — notes on
   this board use them heavily. Wrapped in its own scroller for the same reason
   as pre. */
.md table { border-collapse: collapse; margin: 0 0 10px; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.md th { background: var(--line); }
.md a { color: var(--accent); }
/* ⚠ VISIBLE, NOT SILENT. goldmark drops raw HTML into a comment nobody can see;
   markdown.go swaps that for this so a reader knows something was removed. */
.md-omitted { color: var(--muted); font-style: italic; }
/* ⭐ A NOTE THAT IS THOUSANDS OF CHARACTERS LONG MUST NOT OWN THE PAGE. Capped
   with its own scroller, so the work log stays a list you can skim rather than
   one note you have to scroll past to reach the next. */
.log .md { max-height: 26rem; overflow-y: auto; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }
.log .who { color: var(--accent); }
label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--muted); }
input[type=text], textarea, select {
    width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--line);
    border-radius: 8px; padding: 9px 10px; font: inherit;
}
textarea { min-height: 90px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 150px; }
.actions { margin-top: 18px; display: flex; gap: 10px; align-items: center; }
.inline { display: inline; }
.triage-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 16px; }
.triage-bar label { margin: 0 0 4px; }
.agent-tag { color: var(--prog); font-size: 12px; }
/* The "please look at this" panel. Loud on purpose: it is the one thing on the
   page the reader is being asked to act on, and it is often read on a phone. */
.verify-panel { border-left: 4px solid var(--verify); }
.verify-panel a { word-break: break-all; }
.btn-danger { border-color: var(--blocked); color: var(--blocked); }
.btn-danger:hover { border-color: var(--blocked); background: var(--blocked); color: var(--accent-ink); }
.login-box { max-width: 380px; margin: 80px auto; }

/* 🚨 THE ONLY MEDIA QUERY IN THIS FILE, AND IT IS FOR THE READER'S PHONE.
   `.board` is `auto-fit, minmax(230px, 1fr)`, which correctly collapses to one
   column on a narrow screen — the columns then STACK, and every empty one
   still costs a heading plus 120px of min-height. Three of seven were empty on
   the day this was measured: about a screen of nothing, above the card that
   needed a decision.

   ⚠ SIDE BY SIDE, AN EMPTY COLUMN IS INFORMATION — "nothing is blocked" is
   worth seeing. Stacked, it is just distance. So this hides them only where
   they have stopped being a column and become a section. */
/* ⚠ THE BLOCKED BANNER IS LOUD BY DESIGN. Everything else on a ticket page is
   information; this one is a stop sign, and a quiet stop sign is decoration. */
.blocked-banner {
    background: rgba(229, 103, 95, 0.12);
    border: 1px solid var(--blocked);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 16px;
    font-size: 14px;
}

/* The link list. One row per edge, the KIND first so a column of them can be
   scanned by relationship rather than read line by line. */
.link-list { list-style: none; padding: 0; margin: 0 0 16px; }
.link-list li {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    padding: 4px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.link-list li:last-child { border-bottom: 0; }
.link-kind {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 74px;
}

/* ⭐⭐ THE OUTSTANDING QUESTION, on a ticket and on its card.
   Chris, 2026-08-27: "what was the question asked? I still have no visibility
   to that and it needs to show in the ui."
   ⚠ Deliberately NOT muted. Everything else in these panels is supporting text;
   this is the one thing being asked of the reader, and greying it out would put
   it at the same weight as the boilerplate around it. */
blockquote.asked {
    margin: 10px 0;
    padding: 10px 14px;
    border-left: 3px solid var(--new);
    background: rgba(240, 180, 41, 0.07);
    color: var(--fg);
    white-space: pre-wrap;
}
.card-asked {
    margin-top: 6px;
    font-size: 13px;
    color: var(--fg);
    border-left: 2px solid var(--new);
    padding-left: 8px;
    /* Two lines on a card. The whole question is on the ticket page; this is
       enough to tell one waiting question from another at a glance. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 700px) {
    .col-empty { display: none; }
    /* A fixed 130px label column is a third of a 390px screen spent on the
       words to the left of the answers. */
    .kv { grid-template-columns: 1fr; gap: 2px 0; }
}
