/* Queue and Home. Owned by app-queue, 20 Nov 2026.
   Loads after app.css, so a rule here wins over an app.css rule of equal weight. Every rule is scoped to .q-page, .home or a queue-only class. */
.i-clock { --i: url(/icons/clock.svg); }

/* ---------- queue layout: card column and aside side by side, one content edge ---------- */
.q-page .queue-grid { grid-template-columns: minmax(0, 640px) minmax(280px, 1fr); gap: var(--s-7); justify-content: start; }
.q-page .stack { max-width: 640px; position: relative; }
@media (max-width: 1180px) { .q-page .queue-grid { grid-template-columns: minmax(0, 1fr); } .q-page .brain { max-width: 640px; border-top: 1px solid var(--line); padding-top: var(--s-5); position: static; } }

/* head: the long schedule line on desktop, a short one on phones */
.q-streak { margin-left: 10px; font-size: var(--t-2); font-weight: 500; letter-spacing: 0; color: var(--muted); vertical-align: middle; }
.q-page .al-short { display: none; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn-quiet:hover:not(:disabled) { color: var(--ink); background: var(--sunk); }
@media (max-width: 640px) {
  .q-page .al-long { display: none; }
  .q-page .al-short { display: flex; margin-top: 4px; }
}


/* relation filter */
.q-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s-3); }
.q-chip { font: inherit; font-size: var(--t-2); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 11px; border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1); }
.q-chip .mono { font-size: var(--t-1); color: var(--faint); }
.q-chip:hover { color: var(--ink); border-color: var(--line-strong); }
.q-chip.is-on { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); }
.q-chip.is-on .mono { color: var(--on-inverse-2); }
@media (pointer: coarse) { .q-chip { min-height: 40px; padding-inline: 14px; } }

/* progress: kept and rejected fill, snoozed stays hollow */
.q-page .q-prog p span:empty { display: none; }
.q-page .segs li.is-yes { background: var(--blue); }
.q-page .segs li.is-no { background: var(--faint); }
.q-page .segs li.is-snz { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------- the pile: the next card shows its source and title under the top card ---------- */
.q-page .pile::before, .q-page .pile::after { display: none; }
.q-page .pile.l1 { margin-bottom: 36px; }
.peek { position: absolute; inset: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); transform-origin: 50% 100%; display: flex; align-items: flex-end; overflow: hidden; }
.peek-1 { transform: translateY(28px) scale(.965); }
.peek-row { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 28px; padding: 0 20px 5px; font-size: var(--t-2); color: var(--muted); }
.peek-row .fav, .peek-row .fav-fb { width: 16px; height: 16px; flex: none; }
.peek-l { font-weight: 600; color: var(--faint); flex: none; }
.peek-row b { font-weight: 600; color: var(--ink); flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- the card ---------- */
.q-page .card { padding-bottom: var(--s-5); overflow: visible; transition: border-color var(--dur-1); }
.q-page .c-top { align-items: center; }
.c-flags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag-explore { color: var(--blue-ink); background: var(--blue-soft); cursor: help; }
.c-issue { display: inline-flex; align-items: center; gap: 3px; min-width: 0; max-width: 26ch; color: var(--blue-deep); font-size: var(--t-2); font-weight: 500; text-decoration: none; }
.c-issue::before { content: "·"; margin-right: 5px; color: var(--line-strong); }
.c-issue span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-issue-s { display: none; }
.q-page .c-src .date { white-space: nowrap; }
@media (max-width: 560px) { .c-issue-t { display: none; } .c-issue-s { display: inline; } }
.c-issue .ico { width: 13px; height: 13px; flex: none; }
.c-issue:hover span { text-decoration: underline; text-underline-offset: 3px; }
.q-page .c-src { flex-wrap: nowrap; min-width: 0; }
.q-page .c-src b { white-space: nowrap; }
.q-page .c-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.q-page .c-idea { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.q-page .card.is-open .c-title, .q-page .card.is-open .c-idea { display: block; -webkit-line-clamp: unset; overflow: visible; }
.c-more { justify-self: start; font-size: var(--t-3); }

/* the one "what accepting writes" line, its icon in the favicon column */
.c-does { margin: var(--s-4) 24px 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; font-size: var(--t-3); line-height: 1.5; color: var(--muted); }
.c-does > .ico { width: 15px; height: 15px; margin-top: 3px; justify-self: center; }
.c-does b.mono { font-weight: 500; color: var(--ink); font-size: .95em; }
.c-does a { color: inherit; text-underline-offset: 3px; }
.c-does.is-warn { color: var(--amber-ink); background: var(--amber-soft); border-radius: var(--r-md); padding: 10px 12px 10px 0; }
.q-page .c-reason { margin-top: 2px; }
.q-page .c-evidence figcaption a { color: var(--muted); text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 3px; }
.q-page .c-evidence figcaption a .ico { width: 12px; height: 12px; }
.q-page .c-evidence figcaption a:hover { color: var(--ink); }

/* drag: the edge tints toward green or red, then one sentence-case word appears past the line */
.c-verdict { position: absolute; top: -14px; left: 50%; z-index: 3; transform: translateX(-50%) scale(.92); display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 9px; border-radius: var(--r-pill); border: 1.5px solid currentColor; background: var(--surface); font-size: var(--t-3); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity var(--dur-1), transform var(--dur-1) var(--ease); }
.c-verdict .ico { width: 14px; height: 14px; }
.c-verdict-yes { color: var(--green); }
.c-verdict-no { color: var(--red); }
.q-page .card[data-dir="yes"].is-past .c-verdict-yes, .q-page .card[data-dir="no"].is-past .c-verdict-no { opacity: 1; transform: translateX(-50%) scale(1); }
.q-page .card[data-dir="yes"] { border-color: color-mix(in oklch, var(--green) calc(var(--tint, 0) * 100%), var(--line-strong)); box-shadow: 0 0 0 calc(var(--tint, 0) * 1.5px) var(--green), var(--lift); }
.q-page .card[data-dir="no"] { border-color: color-mix(in oklch, var(--red) calc(var(--tint, 0) * 100%), var(--line-strong)); box-shadow: 0 0 0 calc(var(--tint, 0) * 1.5px) var(--red), var(--lift); }

/* one exit motion for drag, buttons and keys, then the next card rises */
.q-page .card.leave-yes, .q-page .card.leave-no, .q-page .card.leave-down { transition: transform var(--dur-2) cubic-bezier(.4, 0, 1, 1), opacity var(--dur-2) ease-in; opacity: 0; pointer-events: none; }
.q-page .card.leave-yes { transform: translateX(min(60vw, 480px)) rotate(9deg); }
.q-page .card.leave-no { transform: translateX(max(-60vw, -480px)) rotate(-9deg); }
.q-page .card.leave-down { transform: translateY(40px) scale(.97); }
.q-page .card.leave-fade { transition: opacity var(--dur-1) ease; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .q-page .card.is-enter { animation: q-rise 150ms var(--ease) both; }
  @keyframes q-rise { from { transform: translateY(10px) scale(.985); opacity: .3; } }
}
@media (prefers-reduced-motion: reduce) {
  .q-page .card.is-enter { animation: q-fade var(--dur-1) ease both; }
  @keyframes q-fade { from { opacity: 0; } }
  .c-verdict { transition: none; }
}

/* ---------- reject: the card asks why ---------- */
.q-page .card.is-reason { cursor: default; user-select: text; -webkit-user-select: text; }
.rs-back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-3); color: var(--muted); text-decoration: none; }
.rs-back:hover { color: var(--ink); }
.rs-back .ico { width: 14px; height: 14px; }
.rs-body { padding: var(--s-4) 24px 0; display: grid; gap: var(--s-3); }
.rs-h { font-size: var(--t-6); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.rs-sub { font-size: var(--t-3); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rs-opts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.rs-opt { font: inherit; width: 100%; height: 100%; min-height: 76px; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); cursor: pointer; transition: background var(--dur-1), border-color var(--dur-1); }
.rs-opt:hover { background: var(--hover); border-color: var(--ink); }
.rs-opt:active { transform: translateY(1px); }
.rs-opt .kbd { flex: none; margin-top: 2px; min-width: 22px; text-align: center; color: var(--muted); }
.rs-l { display: grid; gap: 2px; }
.rs-l b { font-size: var(--t-4); font-weight: 600; }
.rs-l small { font-size: var(--t-2); line-height: 1.4; color: var(--muted); }
.rs-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.rs-foot .link { font-size: var(--t-3); }
@media (max-width: 520px) { .rs-opts { grid-template-columns: 1fr; } .rs-opt { min-height: 0; padding: 12px; } .rs-foot .hint { display: none; } }

/* ---------- edit: same face, fields at the card's own type sizes ---------- */
.q-page .card.editing { padding-bottom: 0; }
.q-page .card.editing .edit-form { padding: var(--s-4) 24px 0; display: grid; gap: var(--s-3); }
.e-field { display: grid; gap: 4px; }
.e-field label { font-size: var(--t-1); font-weight: 600; color: var(--muted); }
.e-title, .e-idea { font: inherit; color: var(--ink); width: 100%; margin: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); resize: none; field-sizing: content; transition: border-color var(--dur-1), box-shadow var(--dur-1); }
.e-title { font-size: 22px; font-weight: 650; line-height: 1.25; letter-spacing: -0.022em; }
.e-idea { font-size: 15.5px; line-height: 1.6; min-height: 7em; }
.e-title:hover, .e-idea:hover { border-color: var(--line-strong); }
.e-title:focus, .e-idea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.e-field .count { justify-self: end; font-family: var(--mono); font-size: var(--t-1); color: var(--faint); }
.e-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin: 4px -24px 0; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--foot); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.e-foot .hint { font-size: var(--t-2); }
.e-btns { display: flex; gap: var(--s-2); margin-left: auto; }

/* ---------- actions: Reject and Accept large at the edges, Snooze and Edit quiet between ---------- */
.q-page .stack > .q-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--s-2); align-items: center; margin-top: var(--s-4); }
.q-page .q-actions .q-btn { height: var(--h-lg); font-size: var(--t-4); justify-content: center; margin: 0; }
.q-page .q-actions .q-btn .ico { width: 17px; height: 17px; }
.q-reject { background: var(--surface); border-color: var(--line-strong); color: var(--red); box-shadow: var(--shadow-1, none); }
.q-reject:hover:not(:disabled) { background: var(--red-soft); border-color: var(--red-line); }
.q-mid { display: flex; align-items: center; gap: 2px; }
.q-page .q-actions .q-small { height: var(--h-md); min-height: var(--h-md); color: var(--muted); background: transparent; border-color: transparent; box-shadow: none; padding: 0 10px; }
.q-page .q-actions .q-small:hover:not(:disabled) { color: var(--ink); background: var(--sunk); border-color: transparent; }
.q-snz { position: relative; display: flex; align-items: center; }
.q-page .q-snz > .q-small { padding-right: 6px; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.snz-menu { position: static; }
.q-page .q-actions .q-caret { list-style: none; height: var(--h-md); min-height: var(--h-md); padding: 0 6px; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted); background: transparent; border-color: transparent; box-shadow: none; }
.q-caret::-webkit-details-marker { display: none; }
.q-page .q-actions .q-caret .ico { width: 13px; height: 13px; display: inline-block; }
.q-caret:hover, .snz-menu[open] > .q-caret { color: var(--ink); background: var(--sunk); }
.snz-pop { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 20; min-width: 168px; display: grid; padding: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.snz-opt { font: inherit; font-size: var(--t-3); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.snz-opt:hover, .snz-opt:focus-visible { background: var(--sunk); }
.snz-def { font-size: var(--t-1); color: var(--faint); }
.q-page .keys { margin-top: var(--s-3); }

/* phones: the action bar sticks above the tab bar, middle buttons go to icons */
@media (max-width: 820px) {
  .q-page .stack > .q-actions { gap: 6px; }
  .q-page .q-actions .q-btn { padding: 0 8px; font-size: var(--t-4); }
  .q-page .q-actions .q-btn .ico { display: inline-block; }
  .q-page .q-actions .q-small { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .q-page .q-actions .q-small .ico { display: inline-block; width: 18px; height: 18px; }
  .q-page .q-actions .q-small span { display: none; }
  .q-page .q-snz > .q-small { padding: 0; width: 40px; }
  .q-page .q-actions .q-caret { width: 24px; height: 44px; padding: 0; justify-content: center; }
  .snz-pop { left: auto; right: -40px; transform: none; }
  .q-page.has-card { padding-bottom: 24px; }
}

/* ---------- undo toast: fixed, so nothing in the page moves ---------- */
.q-undo { position: fixed; z-index: 45; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); display: flex; align-items: center; gap: var(--s-3); padding: 8px 8px 8px 16px; border-radius: var(--r-md); background: var(--toast); color: var(--on-inverse); font-size: var(--t-3); box-shadow: var(--shadow-2); overflow: hidden; }
.u-what { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.u-what:not(:has(.u-t)) { display: block; white-space: normal; }
.u-what b { font-weight: 600; flex: none; }
.u-what .ico { width: 15px; height: 15px; color: var(--green-mid); flex: none; }
.u-t { overflow: hidden; text-overflow: ellipsis; color: var(--on-inverse-2); min-width: 0; }
.u-secs { font-size: var(--t-2); color: var(--on-inverse-2); flex: none; }
.u-btn { font: inherit; font-weight: 600; color: var(--on-inverse); background: var(--veil-2); border: 0; border-radius: var(--r-sm); min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; flex: none; }
.u-btn:hover { background: var(--veil-3); }
.u-btn:focus-visible { outline: 2px solid var(--on-inverse); outline-offset: 2px; }
.u-btn .ico { width: 15px; height: 15px; }
.u-btn .kbd { color: inherit; border-color: var(--veil-4); }
.u-timer { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--veil-4); transform-origin: left center; animation: q-count linear forwards; }
@keyframes q-count { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.q-undo.is-held .u-timer { animation-play-state: paused; }
@media (prefers-reduced-motion: no-preference) { .q-undo { animation: q-toast-in var(--dur-2) var(--ease); } @keyframes q-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } } }
@media (prefers-reduced-motion: reduce) { .u-timer { display: none; } }
@media (max-width: 820px), (pointer: coarse) { .u-btn { min-height: 44px; } }

/* ---------- aside ---------- */
.q-page .brain .activity .ev { grid-template-columns: 16px minmax(0, 1fr); }
.q-page .brain .activity .ev time { grid-column: 2; margin-top: -4px; }
.q-page .strip-stats .dd-soon { font-size: var(--t-3); font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.45; }

/* ---------- empty queue: the sitting summary and the schedule ---------- */
.q-empty { gap: var(--s-3); }
.q-kept { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.q-kept li { display: flex; gap: 8px; align-items: baseline; font-size: var(--t-3); color: var(--ink); }
.q-kept .ico { width: 14px; height: 14px; color: var(--green); flex: none; transform: translateY(2px); }
.q-empty p a { color: var(--muted); text-underline-offset: 3px; }
.q-empty p a:hover { color: var(--ink); }

/* ================= Home ================= */
/* agent station after a failed run, and a repo-less GitHub station */
.home .st.is-bad .st-node { border-color: var(--red-mid); color: var(--hq-bad); }
.home .st.is-bad .st-v { display: inline-flex; align-items: center; gap: 6px; color: var(--hq-bad); }
.home .st.is-bad .st-v .ico { width: 20px; height: 20px; }
.home .st.is-dim .st-v { color: var(--hq-mute); }
.hq-streak { margin-top: 10px; display: inline-flex; font-size: var(--t-2); font-weight: 500; color: var(--hq-mute); border: 1px solid var(--hq-line); border-radius: var(--r-pill); padding: 2px 10px; }

/* signal: before 10 decisions the ring counts decisions, in a quiet color */
.home .ring-fg.is-early { stroke: var(--blue-line-2); }
.home .sig-c small { max-width: 9ch; margin-inline: auto; line-height: 1.3; }
.home .sig-c.is-early b { grid-column: 1 / -1; }
.sig-note, .wk-wait { margin-top: var(--s-2); }
.wk-wait { padding: var(--s-4); border: 1px dashed var(--line-strong); border-radius: var(--r-md); text-align: center; }

/* up next: the cards behind the top card show their source row */
.home .fan { height: 236px; }
.home .mini { left: calc(var(--i) * 12px); right: calc(var(--i) * 12px); top: calc((2 - var(--i)) * 30px); bottom: auto; height: auto; transform: none; opacity: 1; }
.home .mini[style*="--i:0"] { bottom: 0; }
.home .fan-2 .mini { top: calc((1 - var(--i)) * 30px); }
.home .fan-1 .mini { top: 0; }
.home .mini[style*="--i:1"], .home .mini[style*="--i:2"] { transform: none; opacity: 1; background: var(--foot); padding-block: 8px; }
.home .mini[style*="--i:2"] { background: var(--sunk); }
.home .mini[style*="--i:1"] > *, .home .mini[style*="--i:2"] > * { visibility: visible; }
.home .mini[style*="--i:1"] .c-src, .home .mini[style*="--i:2"] .c-src { opacity: .8; }
.home .fan:hover .mini[style*="--i:1"], .home .fan:hover .mini[style*="--i:2"] { transform: none; }

/* getting started */
.hp-steps .hp-h { align-items: center; }
.hp-steps .hp-sub { margin-right: auto; margin-left: var(--s-2); }
.hp-x { width: 32px; height: 32px; min-height: 32px; padding: 0; }
.hs-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); counter-reset: none; }
.hs-steps a { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; height: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); color: inherit; text-decoration: none; transition: border-color var(--dur-1), background var(--dur-1); }
.hs-steps a:hover { border-color: var(--line-strong); background: var(--hover); }
.step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: var(--t-2); color: var(--muted); border: 1px solid var(--line-strong); background: var(--surface); }
.step-n .ico { width: 14px; height: 14px; }
.step-t { display: grid; gap: 2px; min-width: 0; }
.step-t b { font-size: var(--t-3); font-weight: 600; line-height: 1.3; }
.step-t small { font-size: var(--t-2); color: var(--muted); line-height: 1.4; }
.hs-steps .is-done a { background: var(--foot); }
.hs-steps .is-done .step-n { background: var(--green-soft); border-color: transparent; color: var(--green); }
.hs-steps .is-done b { color: var(--muted); font-weight: 500; text-decoration: line-through; text-decoration-color: var(--line-strong); }
.hs-steps .is-next a { border-color: var(--blue-line-2); }
.hs-steps .is-next .step-n { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
@media (max-width: 1100px) { .hs-steps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
@media (max-width: 560px) { .hs-steps { grid-template-columns: 1fr; } .hs-steps a { padding: 10px 12px; } }

/* Monday recap */
.q-empty .actions .btn-blue { margin-left: 0; }
.q-kept li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.q-page .q-top .strip > .hint { margin: 8px 0 4px; }

/* practice card */
.tag-practice { color: var(--ink); background: var(--sunk); border: 1px dashed var(--line-strong); }
.c-tip { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin: 0; padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--foot); border-radius: var(--r-lg) var(--r-lg) 0 0; font-size: var(--t-3); }
.c-tip b { font-weight: 600; }
.c-tip .link { font-size: var(--t-3); color: var(--muted); }

/* fixes after the first critic pass */
.q-caret .ico { transform: rotate(90deg); }
.q-snz:hover > .q-small, .q-snz:hover > .snz-menu > .q-caret { background: var(--sunk); color: var(--ink); }
@media (max-width: 560px) { .c-issue { flex: none; max-width: none; } }
.q-empty .q-kept { justify-self: stretch; width: 100%; min-width: 0; }
.q-kept li { min-width: 0; max-width: 100%; }
.q-fail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 var(--s-4); padding: 10px 14px; border-radius: var(--r-md); background: var(--red-soft); color: var(--red); font-size: var(--t-3); }
.q-fail span { color: var(--ink); flex: 1 1 240px; }
.q-fail .ico { width: 15px; height: 15px; }
.q-fail .link { font-size: var(--t-3); }
/* the peek holds the next card's face, so a drag shows what comes next */
.peek { flex-direction: column; justify-content: space-between; align-items: stretch; }
.peek-full { padding: 18px 24px 0; display: grid; gap: 10px; }
.peek-full .c-src { font-size: var(--t-2); color: var(--muted); display: flex; gap: 8px; align-items: center; }
.peek-full .c-src b { color: var(--ink); font-weight: 600; }
.peek-title { font-size: 22px; font-weight: 650; line-height: 1.25; letter-spacing: -0.022em; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* home: Up next fan sizes to its top card, back cards peek above it */
.home .fan { height: auto; padding-top: 60px; }
.home .fan-2 { padding-top: 30px; }
.home .fan-1 { padding-top: 0; }
.home .mini[style*="--i:0"] { position: relative; top: auto; bottom: auto; left: 0; right: 0; }
.home .sl-bar em { background: var(--red-line); }
.home .mini h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* fixes after the second critic pass */
.q-fail { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; }
.q-fail span { flex: none; }
.q-page:has(.q-fail) .agent-line .pulse { background: var(--red-fill); box-shadow: none; }
.q-page .brain { transition: opacity var(--dur-2); }
.q-page:has(.card.dragging) .brain { opacity: .3; }
.q-page .brain .path { font-family: var(--font); font-size: var(--t-2); }
@media (max-width: 820px) {
  .q-page .q-actions .q-small { width: 52px; height: 48px; min-height: 48px; flex-direction: column; gap: 1px; }
  .q-page .q-actions .q-small span { display: block; font-size: 11px; line-height: 1.1; }
  .q-page .q-snz > .q-small { width: 52px; }
  .q-page .q-actions .q-caret { height: 48px; width: 22px; }
}
.home .hp-next .fan { flex: 1; display: flex; flex-direction: column; }
.home .hp-next .mini[style*="--i:0"] { flex: 1; }
.home .hp-next .mini[style*="--i:0"] p { -webkit-line-clamp: 4; }
.home .sl-bar em { background: transparent; }

/* fixes after the third critic pass */
.e-field .count { font-family: var(--font); font-variant-numeric: tabular-nums; }
.q-page .q-top-end { margin-top: var(--s-5); }
@media (max-width: 820px) {
  .q-page .q-actions .q-small, .q-page .q-snz > .q-small { width: 56px; }
  .q-page .q-actions .q-small span { font-size: 12px; }
}
@media (max-width: 640px) {
  .rs-body, .q-page .card.editing .edit-form, .c-tip { padding-inline: 18px; }
  .c-does { margin-inline: 18px; }
  .e-foot { margin-inline: -18px; padding-inline: 18px; }
}
@media (max-width: 820px) { .q-page > .q-top-end { order: 1; } }

/* fixes after the fourth critic pass */
.q-page .e-field .count, .q-page .card .e-field .count { font-family: var(--font); letter-spacing: 0; }
@media (max-width: 820px) {
  .q-page .q-actions .q-small span { font-size: 13px; }
  .q-page:not(.has-card) { padding-bottom: 88px; }
}
.home .mini .mini-why { color: var(--faint); font-size: var(--t-2); -webkit-line-clamp: 2; border-top: 1px solid var(--line); padding-top: 8px; margin-top: auto; }
.home .hp-next .mini[style*="--i:0"] { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) { .q-kept li span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
