/* The bug tracker and the feature requests (/bugs, /features): a row per ticket with its vote count and fix track. */

.done30 { margin: 12px 0 0; color: var(--ink-label); font-size: 14px; }
.done30::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ink-good); vertical-align: 1px; }
.done30[hidden] { display: none; }

.lib .toolbar .chiprow { grid-column: 1 / -1; }

.tk-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.tk-head .count { margin-right: auto; }
.legend { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; font: 500 12px/1 var(--font-game); color: var(--ink-off); }
.legend li { display: flex; align-items: center; gap: 4px; }
.legend li + li::before { content: ""; width: 10px; height: 1px; background: var(--chip-edge); }

.tk-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }

/* a row: the band and outline of Style.Shell, the accent outline on hover */
.tk-in {
  display: flex; gap: 16px; align-items: center; padding: 14px 18px; border-radius: 6px; text-decoration: none; color: inherit;
  background: var(--band); box-shadow: inset 0 0 0 1px var(--border), 0 2px 4px var(--shadow);
  transition: box-shadow var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.tk-in:hover, .tk-in:focus-visible { outline: none; background: #1f1b14; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mid) 60%, var(--border)), 0 2px 4px var(--shadow); }
.js .tk.enter { opacity: 0; transform: translateY(4px); }
.tk.enter.on { opacity: 1; transform: none; transition: opacity var(--normal) var(--ease), transform var(--normal) var(--ease); }
.tk.set-aside .tk-in { opacity: 0.62; }
.tk.set-aside .tk-in:hover { opacity: 1; }

.votes {
  flex: none; width: 54px; padding: 6px 0 5px; border-radius: 5px; text-align: center;
  box-shadow: inset 0 0 0 1px var(--band-lit); background: rgba(0, 0, 0, 0.18);
}
.votes b { display: block; font: 600 19px/1.1 var(--font-body); color: var(--ink-value); }
.votes small { display: block; font: 600 11px/1.2 var(--font-game); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-off); }
.votes.mine { box-shadow: inset 0 0 0 1px var(--mid); }
.votes.mine b { color: var(--mid); }

.tk-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.tk-title { font: 600 16px/1.3 var(--font-body); color: var(--ink-value); overflow-wrap: anywhere; }
.tk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--ink-label); }
.tk-meta .who { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tk-meta .ava { border-radius: 50%; flex: none; }
.tk-meta .dot { color: var(--ink-off); }
.tk-meta .n { display: inline-flex; align-items: center; gap: 2px; }
.tk-meta .n svg { width: 14px; height: 14px; }
.tk-meta .week { color: var(--mid); }

/* the status chip: waiting or being worked on (warn), done (good), set aside (off), planned (the accent) */
.state { height: 20px; padding: 0 8px; border-radius: 6px; font: 600 12px/20px var(--font-game); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-text); background: var(--chip-off); box-shadow: inset 0 0 0 1px var(--chip-edge); }
.state.warn { color: var(--ink-warn); }
.state.good { color: var(--ink-good); }
.state.off { color: var(--ink-off); }
.state.lit { color: var(--mid); }

/* the fix track: five marks, lit with the accent up to where the ticket is */
.track { display: flex; gap: 3px; max-width: 360px; }
.track i { flex: 1; height: 4px; border-radius: 2px; background: var(--chip-edge); }
.track i.on { background: var(--accent); background-size: 500% 100%; }
.track i.on:nth-child(1) { background-position: 0 0; }
.track i.on:nth-child(2) { background-position: 25% 0; }
.track i.on:nth-child(3) { background-position: 50% 0; }
.track i.on:nth-child(4) { background-position: 75% 0; }
.track i.on:nth-child(5) { background-position: 100% 0; }
.track i.on.warn { background: var(--ink-warn); }

.tskel { aspect-ratio: auto; height: 84px; }

.tk-cta { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 44px 0 0; color: var(--ink-text); }
.tk-cta p { margin: 0; }
.tk-help { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 28px 0 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-label); }
.tk-help p { margin: 0 auto 0 0; }
.tk-help b { color: var(--ink-value); font-weight: 600; }

@media (max-width: 640px) {
  .legend { display: none; }
  .tk-in { padding: 12px; gap: 12px; align-items: flex-start; }
  .votes { width: 46px; }
  .tk-title { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk.enter, .tk-in { transition: none; transform: none; }
}

/* a followed ticket that moved on since you last opened it: a small accent dot (rows, the nav's tabs) */
.news { display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--accent); vertical-align: 3px; }
nav .wtab .news { position: absolute; top: 1px; right: -8px; margin: 0; }

/* ---- a ticket's own page ---- */
.tk-page { padding-top: 40px; }
.tk-page .back::before { content: "\2190"; margin-right: 6px; }
.tk-gone { padding: 80px 0; text-align: center; color: var(--ink-label); font-size: 15px; }
.tk-gone[hidden], .tk-cols[hidden], .tk-discord[hidden], .bigtrack[hidden] { display: none; }
.tk-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; margin-top: 24px; align-items: start; }
.js .tk-cols { opacity: 0; transform: translateY(6px); }
.tk-cols.on { opacity: 1; transform: none; transition: opacity var(--normal) var(--ease), transform var(--normal) var(--ease); }

.tk-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tk-main h1 { margin: 14px 0 0; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; overflow-wrap: anywhere; }
.tk-by { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; font-size: 14px; color: var(--ink-label); }
.tk-by .ava { border-radius: 50%; }
.tk-by .nm { color: var(--ink-value); font-weight: 600; margin-left: -6px; }

/* the fix track, large: five marks with their words under them */
.bigtrack { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 28px 0 0; padding: 0; list-style: none; }
.bigtrack li { display: grid; gap: 8px; font: 500 13px/1.2 var(--font-game); color: var(--ink-off); }
.bigtrack i { height: 6px; border-radius: 3px; background: var(--chip-edge); }
.bigtrack li.on { color: var(--ink-label); }
.bigtrack li[aria-current] { color: var(--ink-value); }
.bigtrack li.on i { background: var(--accent); background-size: 500% 100%; }
.bigtrack li.on:nth-child(2) i { background-position: 25% 0; }
.bigtrack li.on:nth-child(3) i { background-position: 50% 0; }
.bigtrack li.on:nth-child(4) i { background-position: 75% 0; }
.bigtrack li.on:nth-child(5) i { background-position: 100% 0; }
.bigtrack li.warn i { background: var(--ink-warn); }
.bigtrack li.warn { color: var(--ink-warn); }

.tk-text { margin-top: 32px; display: grid; gap: 26px; }
.tk-sec h2 { font: 600 12px/1 var(--font-game); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid); margin-bottom: 10px; }
.tk-sec p { margin: 0 0 10px; color: var(--ink-text); font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.tk-sec .code:focus, .tk-sec .code:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--mid); }
.tk-sec .code { margin: 0; padding: 14px 16px; border-radius: 6px; background: #0e0e10; box-shadow: inset 0 0 0 1px var(--chip-edge);
  font: 13px/1.5 ui-monospace, Consolas, monospace; color: var(--ink-text); white-space: pre; overflow-x: auto; max-height: 420px; }

.tk-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 26px; }
.tk-pics:empty { display: none; }
.tk-pics .pic { display: block; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: #17171a; box-shadow: inset 0 0 0 1px var(--chip-edge); }
.tk-pics img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--normal) var(--ease), transform var(--normal) var(--ease); }
.tk-pics img.in { opacity: 1; }
.tk-pics .pic:hover img, .tk-pics .pic:focus-visible img { transform: scale(1.03); }

.tk-discord { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.tk-discord p { margin: 0; font-size: 14px; color: var(--ink-label); }

.tk-side { display: grid; gap: 28px; position: sticky; top: 88px; }
.tk-page section { padding: 0; }
.tk-card > .in { position: relative; inset: auto; margin: var(--t); padding: 18px; display: grid; gap: 18px; }
.tk-votes { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--ink-label); font-size: 14px; }
.tk-votes b { font: 300 44px/1 var(--font-head); color: var(--mid); }
.tk-votes .week { width: 100%; color: var(--mid); font-size: 13px; }
.tk-votes .week:empty { display: none; }
.tk-acts { display: grid; gap: 10px; }
.tk-acts .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tk-acts .wbtn { min-width: 0; }
.wbtn.picked > .lbl { color: var(--mid); }
.wbtn.picked > .band { background: var(--band-lit); }

/* the team's updates sit right under the fix track, so a question for the player is the first thing they read */
.tk-steps { margin-top: 32px; }
.tk-steps h2 { font: 600 12px/1 var(--font-game); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid); margin-bottom: 14px; }
.tk-steps ol { margin: 0; padding: 0 0 0 18px; list-style: none; border-left: 1px solid var(--chip-edge); display: grid; gap: 18px; }
.tk-steps li { position: relative; }
.tk-steps li::before { content: ""; position: absolute; left: -24px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--chip-edge); }
.tk-steps li:first-child::before { background: var(--accent); }
.tk-steps .h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; color: var(--ink-label); }
.tk-steps b { font: 600 14px/1.2 var(--font-game); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-text); }
.tk-steps li.warn b { color: var(--ink-warn); }
.tk-steps li.good b { color: var(--ink-good); }
.tk-steps li.off b { color: var(--ink-off); }
.tk-steps li.lit b { color: var(--mid); }
.tk-steps .who { color: var(--ink-value); }
.tk-steps time { color: var(--ink-off); }
.tk-steps p { margin: 8px 0 0; padding: 12px 16px; border-radius: 6px; background: #1c1c20; box-shadow: inset 0 0 0 1px var(--chip-edge);
  font-size: 15px; line-height: 1.6; color: var(--ink-value); white-space: pre-line; overflow-wrap: anywhere; }
.tk-steps li:first-child p { box-shadow: inset 0 0 0 1px var(--chip-edge), inset 3px 0 0 var(--mid); }
/* what people wrote in the Discord post: a hollow dot, so the steps still read as the ticket's milestones */
.tk-steps li.said::before { background: var(--bg); box-shadow: inset 0 0 0 2px var(--chip-edge); }
.tk-steps li.said:first-child::before { background: var(--bg); box-shadow: inset 0 0 0 2px var(--mid); }
.tk-steps li.said .h { align-items: center; }
.tk-steps li.said .ava { border-radius: 50%; }
.tk-steps li.said p { color: var(--ink-text); }
.tk-steps .tag { margin-left: -4px; }
.tk-pics.small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 8px; }
.tk-other { margin: 0; font-size: 14px; color: var(--ink-label); }

@media (max-width: 860px) {
  .tk-cols { grid-template-columns: 1fr; gap: 32px; }
  .tk-side { position: static; }
}
@media (max-width: 640px) {
  .bigtrack li span { font-size: 11px; }
  .tk-page { padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-cols, .tk-pics img { transition: none; transform: none; }
}

/* ---- the report and request forms ---- */
.lib-hero .back { display: inline-block; margin-bottom: 18px; }
.lib-hero .back::before, .tk-page .back::before { content: "\2190"; margin-right: 6px; }
.rp { display: grid; gap: 22px; }
.rp > * { width: 100%; max-width: 760px; }
.rp section { padding: 0; }
.rp h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 400; }
.rp h2 .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 600 14px/1 var(--font-body); color: var(--mid); box-shadow: inset 0 0 0 1px var(--mid); }
.rp-step > .in { position: relative; inset: auto; margin: var(--t); padding: 24px 28px; display: grid; gap: 14px; }
.rp-step .hint { margin: 0; font-size: 13px; color: var(--ink-off); }
.rp-step #none { justify-self: start; }
.rp-step #none[hidden] { display: none; }
.rp-hits:empty { display: none; }
.rp-hit { display: flex; gap: 10px; align-items: center; }
.rp-hit .tk-in { flex: 1; min-width: 0; padding: 10px 14px; }
.rp-hit .tk-title { font-size: 15px; }
.rp-hit .wbtn { flex: none; }
.rp-form h2.wide { grid-column: 1 / -1; }
.rp .opt { color: var(--ink-off); font-weight: 400; }
.winput.mono { font: 13px/1.5 ui-monospace, Consolas, monospace; }
.rp-drops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rp-drops .drop { aspect-ratio: 16 / 10; padding: 10px; font-size: 13px; text-align: center; color: var(--ink-label); }
.rp-drops .drop img { opacity: 0; transition: opacity var(--normal) var(--ease); }
.rp-drops .drop img.in { opacity: 1; }
.rp #area .chip.on { color: var(--chip-ink); }
@media (max-width: 640px) {
  .rp-step > .in { padding: 18px; }
  .rp-hit { flex-direction: column; align-items: stretch; }
  .rp-drops { grid-template-columns: 1fr 1fr; }
  .rp-drops .drop:first-child { grid-column: 1 / -1; }
}

/* the team's card on a ticket's page, and its chips on the lists */
.tk-team h2 { font: 600 12px/1 var(--font-game); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid); }
.tk-team-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-team-acts .wbtn { min-width: 0; }
.tk-team .hint { margin: 0; font-size: 12.5px; color: var(--ink-off); }
.tk-team[hidden] { display: none; }
.chip.team { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mid) 45%, var(--chip-edge)); }

/* a picture opened in a card (js/viewer.js): the profile window's look, the picture whole */
dialog.pview { max-width: min(1280px, calc(100vw - 32px)); }
.pview .win > .in { position: relative; inset: auto; margin: var(--t); display: block; overflow: visible; max-height: none; }
.pview .top { align-items: center; padding: 14px 18px 12px; }
.pview .pv-title { font: 600 15px/1.3 var(--font-body); color: var(--ink-value); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pview .pv-count { flex: none; font: 600 13px var(--font-game); color: var(--ink-label); }
.pview .pic { aspect-ratio: auto; width: auto; height: min(74dvh, 760px); max-height: none; margin: 0 18px; border-radius: 4px; display: grid; place-items: center; }
.pview .pic img { max-width: 100%; max-height: 100%; object-fit: contain; opacity: 0; transition: opacity var(--normal) var(--ease); }
.pview .pic img.in { opacity: 1; }
.pview .pic .flip[hidden], .pview .pic .dots[hidden] { display: none; }
.pview .pv-full { display: inline-block; margin: 12px 18px 16px; font-size: 13px; }
@media (max-width: 640px) {
  .pview .pic { height: auto; aspect-ratio: 4 / 3; margin: 0 10px; }
  .pview .top { padding: 12px 12px 10px; }
  .pview .pv-full { margin: 10px 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .pview .pic img { transition: none; } }
