/* [03] quake: server panel, next event, id Tech family tree card */
.qk { padding-top: 140px; --qk-stats-weight: 400; }   /* map · players · mode: 300 (light, like the id Tech card) … 800 (heavy) */
.qk-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); gap: 28px; margin-top: 44px; }
.qk-k { font-size: 12px; letter-spacing: .22em; color: var(--text-5); }

/* server panel */
.qk-srv { position: relative; display: flex; flex-direction: column; gap: 26px; padding: 30px; border: 1px solid var(--line-2); background: var(--bg-2); }
.qk-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.qk-name { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qk-t { font-weight: 600; font-size: 40px; letter-spacing: .05em; color: var(--qk-name, var(--title)); }
.qk-st { display: flex; align-items: center; gap: 10px; flex: none; font-size: 13px; letter-spacing: .2em; }
.qk-st.on { color: var(--ok); }
.qk-st.on .dot { background: var(--ok); }
.qk-st.off { color: var(--text-4); }
.qk-st.off .dot { background: var(--text-6); }

.qk-stats { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1px; border: 1px solid var(--line-2); background: var(--line-2); }
.qk-stats > div { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--bg); }
.qk-stats span { font-size: 11px; letter-spacing: .22em; color: var(--text-5); }
.qk-stats b { font-weight: var(--qk-stats-weight); font-size: 34px; line-height: normal; color: var(--text); text-transform: uppercase; overflow-wrap: anywhere; }

.qk-stats > div:first-child b { line-height: 1; }
.qk-stats > div:nth-child(1) b { color: var(--qk-map, var(--text)); }
.qk-stats > div:nth-child(2) b { color: var(--qk-players, var(--text)); }
.qk-stats > div:nth-child(3) b { color: var(--qk-mode, var(--text)); }   /* long map names wrap tight */
.qk-slots { display: flex; gap: 4px; }
.qk-slots span { flex: 1; height: 10px; background: var(--line-2); }
.qk-slots span.on { background: var(--ok); }

.qk-con { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.qk-cmd { flex: 1; min-width: min(260px, 100%); display: flex; align-items: center; border: 1px dashed var(--line); background: var(--bg); }
.qk-con code { flex: 1; min-width: 0; padding: 14px 4px 14px 16px; color: var(--qk-connect, var(--hilite)); font-family: inherit; font-size: 15px; overflow-wrap: anywhere; }
/* copy the /connect line: an icon at the right of the box; a tick and COPIED for a moment after */
.qk-copy { flex: none; align-self: stretch; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 0; background: none; color: var(--text-4); cursor: pointer; font: inherit; font-size: 11px; letter-spacing: .2em; }
.qk-copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.qk-copy .i-ok { display: none; }
.qk-copy:hover, .qk-copy:focus-visible { color: var(--accent); }
.qk-copy:focus-visible { outline: 1px solid var(--accent); outline-offset: -4px; }
.qk-copy.is-done { color: var(--ok); }
.qk-copy.is-done .i-copy { display: none; }
.qk-copy.is-done .i-ok { display: block; stroke-width: 1.8; }
.qk-copied:empty { display: none; }

/* next event box; on top of the panel when config says so */
.qk-ev { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 20px; padding: 16px 18px; border: 1px solid var(--line); background: var(--bg); }
.qk-ev .qk-k { font-size: 11px; }
.qk-cd { text-align: right; }
.qk-evb { display: flex; flex-direction: column; gap: 4px; }
.qk-evb b { font-weight: 600; font-size: 26px; letter-spacing: .04em; color: var(--qk-event, var(--title)); }
.qk-evb time { margin-top: 2px; font-family: "Big Shoulders Display", "Arial Narrow", sans-serif; font-weight: 600; font-size: 24px; line-height: 1.1;
  letter-spacing: .05em; text-transform: uppercase; color: var(--qk-date, var(--text)); }   /* the date is the part people need */
.qk-tz { font-size: 12px; color: var(--text-5); }
.qk-none { font-size: 14px; color: var(--text-3); }
.qk-more { align-self: end; font-size: 12px; letter-spacing: .16em; white-space: nowrap; color: var(--text-5); }
a.qk-more { color: var(--accent); }
a.qk-more:hover, a.qk-more:focus-visible { color: var(--hilite); }
.ev-top .qk-ev { order: -1; }
.ev-top .qk-evb b { font-size: 34px; }

/* id Tech teaser: a link once the family tree page is up, a plain panel until then */
.qk-it { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; min-height: 380px; padding: 30px;
  border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; color: var(--text); }
.qk-itc { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.qk-itt { font-weight: 300; font-size: 64px; line-height: .92; letter-spacing: .04em; }
.qk-itt .acc { color: var(--accent); }
.qk-itp { max-width: 36ch; font-size: 15px; line-height: 1.6; color: var(--text-3); }
.qk-itf { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; font-size: 13px; letter-spacing: .18em; }
.qk-open { color: var(--accent); transition: color .2s; }
.qk-it:not(.is-link) .qk-open { color: var(--text-5); }
.qk-it.is-link:hover .qk-open, .qk-it.is-link:focus-visible .qk-open { color: var(--hilite); }
.qk-it.is-link:hover { color: var(--text); }
.qk-hint { color: var(--hilite); }
.qk-tree { position: absolute; right: 30px; top: 62px; font-size: 12px; line-height: 1.7; color: var(--text-6); }
.qk-tree span { display: block; white-space: pre; }
.qk-tree .hi { color: var(--text-4); font-weight: 700; }

@media (max-width: 700px) {
  .qk-srv, .qk-it { padding: 22px; }
  .qk-t { font-size: 32px; }
  .qk-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .qk-stats > div:first-child { grid-column: 1 / -1; }
  .qk-itt { font-size: 52px; }
  .qk-ev .qk-evb, .qk-more { grid-column: 1 / -1; }
  .qk-more { justify-self: start; white-space: normal; margin-top: 6px; }
  /* the tree drops into the card's flow, between the kicker and the title */
  .qk-it { min-height: 0; gap: 24px; }
  .qk-tree { position: static; order: 1; font-size: 11px; }
  .qk-itc { order: 2; margin-top: 0; }
  .qk-itf { order: 3; }
}
@media (max-width: 520px) { .qk-copied { display: none; } }   /* phones: the tick alone, so the address stays on one line */
