/* Quill — "try it right here": an HTML model of the notebook (record a scripted call, the two-ink line, the
   transcript, summary, to-dos, email, notes and flashcards), plus the page's track, consent and AI panels. */

/* Quill's own blue-black ink, matching its icon (mirrors [data-app="quill"] in style.css; keep the two in step). */
[data-app="quill"] { --a1: #2e4fa6; --a2: #1a2a5e; --b1: #3354b0; --b2: #1f3170; --ink-l: #2e4fa6; --ink-d: #9db2f5; }

/* ───────── The window ───────── */
.qx {
  --qx-paper: #faf7f0; --qx-side: #f2eee4; --qx-surface: #fff; --qx-wash: #ece7db; --qx-hover: #e3ddcf; --qx-ink: #1d2233; --qx-soft: #5c6172; --qx-faint: #969aa6;
  --qx-rule: rgba(29, 34, 51, .1); --qx-you: #2e4fa6; --qx-them: #b04a2e; --qx-youw: rgba(46, 79, 166, .09); --qx-themw: rgba(176, 74, 46, .09);
  --qx-rec: #d63b2f; --qx-btn: #2e4fa6; --qx-btnrec: #d63b2f; --qx-ok: #2f8a5b; --qx-hl: rgba(244, 211, 94, .45);
  height: 640px; display: grid; grid-template-columns: 178px 268px minmax(0, 1fr); background: var(--qx-paper); color: var(--qx-ink); font-family: var(--font); font-size: 13px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qx {
  --qx-paper: #15161a; --qx-side: #1b1c21; --qx-surface: #1f2026; --qx-wash: #2a2b32; --qx-hover: #34353d; --qx-ink: #ece8df; --qx-soft: #a9a9b3; --qx-faint: #6f717b;
  --qx-rule: rgba(255, 255, 255, .09); --qx-you: #8ea7f2; --qx-them: #ef9474; --qx-youw: rgba(142, 167, 242, .14); --qx-themw: rgba(239, 148, 116, .14);
  --qx-rec: #ff6a5c; --qx-btn: #3a5bc4; --qx-btnrec: #d2463a; --qx-ok: #66cf98; --qx-hl: rgba(244, 211, 94, .28); } }
:root[data-theme="dark"] .qx {
  --qx-paper: #15161a; --qx-side: #1b1c21; --qx-surface: #1f2026; --qx-wash: #2a2b32; --qx-hover: #34353d; --qx-ink: #ece8df; --qx-soft: #a9a9b3; --qx-faint: #6f717b;
  --qx-rule: rgba(255, 255, 255, .09); --qx-you: #8ea7f2; --qx-them: #ef9474; --qx-youw: rgba(142, 167, 242, .14); --qx-themw: rgba(239, 148, 116, .14);
  --qx-rec: #ff6a5c; --qx-btn: #3a5bc4; --qx-btnrec: #d2463a; --qx-ok: #66cf98; --qx-hl: rgba(244, 211, 94, .28); }
.qx button, .qx input { font: inherit; color: inherit; }
.qx .ic { width: 15px; height: 15px; flex: none; }
.qx kbd { font-family: var(--font-mono); font-size: 10.5px; padding: 0 5px; border-radius: 4px; box-shadow: inset 0 0 0 1px currentColor; opacity: .7; margin-left: 4px; }
.qx .kick { margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--qx-soft); }
.qx .spin { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1.6px solid var(--qx-faint); border-top-color: transparent; animation: qxSpin .8s linear infinite; vertical-align: -1px; }
@keyframes qxSpin { to { transform: rotate(360deg); } }
.qx .sq { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
.qx .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; box-shadow: inset 0 0 0 2px var(--qx-btn), inset 0 0 0 5px currentColor; }

/* Sidebar */
.qx-side { display: flex; flex-direction: column; gap: 2px; padding: 0 10px 12px; background: var(--qx-side); border-right: 1px solid var(--qx-rule); min-height: 0; user-select: none; -webkit-user-select: none; }
.qx-lights { height: 46px; display: flex; align-items: center; padding-left: 8px; }
.qx-brand { display: flex; align-items: center; gap: 8px; margin: 2px 6px 12px; font: 700 18px var(--font-serif); }
.qx-brand svg { width: 13px; height: 18px; }
.qx-rec { display: flex; align-items: center; justify-content: center; gap: 8px; height: 32px; margin-bottom: 14px; border: 0; border-radius: 8px; background: var(--qx-btn); color: #fff !important; font-weight: 600 !important; cursor: pointer; }
.qx-rec.on { background: var(--qx-btnrec); }
.qx-rec .dot { box-shadow: inset 0 0 0 2px var(--qx-btn), inset 0 0 0 5px #fff; }
.qx-nav { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 9px; border: 0; border-radius: 7px; background: none; text-align: left; cursor: pointer; color: var(--qx-soft) !important; }
.qx-nav:hover { background: var(--qx-hover); }
.qx-nav[aria-current="true"] { background: var(--qx-wash); color: var(--qx-ink) !important; }
.qx-nav small { margin-left: auto; font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--qx-wash); }
.qx-nav small:empty { display: none; }
.qx-foot { margin: auto 6px 0; font-size: 11px; color: var(--qx-soft); line-height: 1.35; }

/* List */
.qx-list { display: grid; grid-template-rows: 46px minmax(0, 1fr); background: var(--qx-paper); border-right: 1px solid var(--qx-rule); min-height: 0; }
.qx-list > header { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 14px; border-bottom: 1px solid var(--qx-rule); background: var(--qx-side); }
.qx-list > header b { font-size: 14px; color: var(--qx-soft); }
.qx-tb { display: grid; place-items: center; width: 30px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--qx-soft) !important; cursor: pointer; }
.qx-tb:hover, .qx-tb[aria-pressed="true"] { background: var(--qx-wash); }
.qx-tb[hidden] { display: none; }
.qx-items { overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.qx-item { display: block; width: 100%; margin: 0 0 2px; padding: 9px 9px 10px; border: 0; border-bottom: 1px solid var(--qx-rule); border-radius: 0; background: none; text-align: left; cursor: pointer; }
.qx-item[aria-selected="true"] { background: var(--qx-wash); border-radius: 8px; border-bottom-color: transparent; }
.qx-item:focus-visible { outline: 2px solid var(--qx-you); outline-offset: -2px; border-radius: 8px; }
.qx-item .t { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 4px; }
.qx-item .t b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qx-item time { font-size: 11.5px; color: var(--qx-soft); flex: none; }
.qx-item .r { color: var(--qx-rec); font-weight: 600; }
.qx-item.rec { background: var(--qx-wash); border-radius: 8px; border: 0; margin-bottom: 6px; }
.qx-item canvas.mini { display: block; width: 100%; height: 18px; }
.qx-item .pv { margin: 0 0 5px; font-size: 11.5px; color: var(--qx-soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qx-item .pv.proc { display: flex; gap: 6px; align-items: center; }
.qx-item .chp, .qx-todo, .qx-item.td .chp { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0 0; }
.qx-item .c { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; background: var(--qx-wash); font-size: 10.5px; color: var(--qx-soft); }
.qx-item .c .ic { width: 11px; height: 11px; }
.qx-sig { display: block; width: 100%; height: 16px; margin: 2px 0 2px; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.qx-sig .you { stroke: var(--qx-you); } .qx-sig .them { stroke: var(--qx-them); }
.qx-lh { margin: 4px 6px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--qx-soft); }
.qx-item.td, .qx-item.deck { cursor: default; }
.qx-item.td label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 13px; }
.qx-item.td input, .qx-todo input { accent-color: var(--qx-you); margin: 2px 0 0; flex: none; }
.qx-item.td .chp { padding-left: 21px; }
.qx-item .from { border: 0; background: none; padding: 0 2px; font-size: 11px; color: var(--qx-soft) !important; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.qx-item.deck .qx-btn { margin-top: 2px; }
.qx-none { padding: 20px 10px; color: var(--qx-soft); text-align: center; }

/* Detail */
.qx-main { display: grid; grid-template-rows: 46px minmax(0, 1fr); min-width: 0; min-height: 0; }
.qx-bar { display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid var(--qx-rule); background: var(--qx-side); }
.qx-bar .sp { flex: 1; }
.qx-backbtn { display: none !important; }
.qx-search { display: flex; align-items: center; gap: 6px; width: min(240px, 46%); height: 28px; padding: 0 9px; border-radius: 7px; background: var(--qx-surface); box-shadow: inset 0 0 0 1px var(--qx-rule); color: var(--qx-soft); }
.qx-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 12.5px; color: var(--qx-ink); }
.qx-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--qx-you); }
.qx-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; }
.qx-detail { overflow-y: auto; min-height: 0; padding: 22px 30px 40px; scrollbar-width: thin; outline: none; position: relative; }
.qx-page { max-width: 560px; }
.qx-title { margin: 4px 0 10px; font: 700 27px/1.15 var(--font-serif); letter-spacing: -.01em; outline: none; }
.qx-h { margin: 22px 0 6px; font: 700 19px var(--font-serif); }
.qx-sh { margin: 16px 0 4px; font: 700 15px var(--font-serif); }
.qx-p, .qx-bl, .qx-q, .qx-todo, .qx-sum li { font-family: var(--font-serif); font-size: 15px; line-height: 1.45; }
.qx-p { margin: 0 0 8px; } .qx-p.mut { color: var(--qx-soft); }
.qx-bl { margin: 0 0 4px; padding-left: 16px; position: relative; } .qx-bl::before { content: "•"; position: absolute; left: 3px; color: var(--qx-you); }
.qx-q { margin: 10px 0; padding-left: 12px; border-left: 3px solid var(--qx-wash); color: var(--qx-soft); font-style: italic; }
.qx-hr { border: 0; border-top: 1px solid var(--qx-rule); margin: 14px 0; }
.qx-sum { margin: 0; padding: 0; list-style: none; }
.qx-sum li { position: relative; padding-left: 14px; margin-bottom: 3px; }
.qx-sum li::before { content: "•"; position: absolute; left: 0; color: var(--qx-you); }
.qx-todo { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; cursor: pointer; }
.qx-todo > span:first-of-type { flex: 1; min-width: 0; }
.qx-todo.done > span:first-of-type { color: var(--qx-soft); text-decoration: line-through; text-decoration-color: var(--qx-faint); }
.qx .own, .qx .due { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font: 600 10.5px var(--font); white-space: nowrap; }
.qx .own.you { background: var(--qx-youw); color: var(--qx-you); }
.qx .own.them { background: var(--qx-themw); color: var(--qx-them); }
.qx .due { background: var(--qx-wash); color: var(--qx-soft); font-weight: 500; }
.qx .due .ic { width: 11px; height: 11px; }
.qx-todo .own, .qx-todo .due { margin-top: 3px; }
.qx-ppl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.qx-ppl .own { font-size: 11.5px; padding: 2px 9px; }
.qx-ppl .ratio { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; color: var(--qx-soft); }
.qx-ppl .ratio i { height: 3px; border-radius: 2px; background: var(--qx-you); }
.qx-ppl .ratio i.t { background: var(--qx-them); margin-right: 6px; }
.qx-player { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.qx-player .play { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--qx-ink); color: var(--qx-paper) !important; font-size: 10px; cursor: pointer; flex: none; }
.qx-player .trk { position: relative; flex: 1; max-width: 300px; }
.qx-player .trk .qx-sig { height: 22px; }
.qx-player .head { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--qx-ink); opacity: .7; }
.qx-player time { font: 11.5px var(--font-mono); color: var(--qx-soft); }
.qx-by, .qx-proc { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12px; color: var(--qx-soft); }
.qx-link { margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 0; border-radius: 999px; background: var(--qx-wash); font-size: 11.5px !important; font-weight: 600 !important; cursor: pointer; }
.qx-link:hover { background: var(--qx-hover); }
.qx-tbl { margin: 8px 0 12px; overflow-x: auto; }
.qx-tbl table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 8px; box-shadow: 0 0 0 1px var(--qx-rule); overflow: hidden; background: var(--qx-surface); font-size: 12.5px; }
.qx-tbl th, .qx-tbl td { padding: 6px 9px; text-align: left; border-bottom: 1px solid var(--qx-rule); border-right: 1px solid var(--qx-rule); }
.qx-tbl th { background: var(--qx-wash); font-weight: 600; }
.qx-tbl tr:last-child td { border-bottom: 0; } .qx-tbl th:last-child, .qx-tbl td:last-child { border-right: 0; }
.qx-tbl td:focus { outline: 2px solid var(--qx-you); outline-offset: -2px; }
.qx-mini { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 10px; border: 0; border-radius: 999px; background: var(--qx-wash); font-size: 12px !important; cursor: pointer; }
.qx-mini:hover { background: var(--qx-hover); }
.qx-card { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 8px; border-radius: 10px; background: var(--qx-surface); box-shadow: 0 0 0 1px var(--qx-rule); font: 600 14px/1.35 var(--font-serif); }
.qx-card p { margin: 0; padding: 10px 12px 14px; position: relative; }
.qx-card p + p { border-left: 1px solid var(--qx-rule); }
.qx-card b { margin-right: 7px; font-size: 11px; }
.qx-card .q { color: var(--qx-you); } .qx-card .a { color: var(--qx-them); }
.qx-card small { position: absolute; right: 10px; bottom: 3px; font: 10.5px var(--font); color: var(--qx-soft); }
.qx-meta { margin: 0 0 6px; }
.qx-write { margin: 10px 0 0; }
.qx-write input { width: 100%; padding: 6px 0; border: 0; border-bottom: 1px dashed var(--qx-rule); background: none; outline: none; font: 15px var(--font-serif); color: var(--qx-ink); }
.qx-write input::placeholder { color: var(--qx-faint); font-family: var(--font); font-size: 12.5px; }
.qx-write input:focus { border-bottom-color: var(--qx-you); }
.qx-mail { margin: 22px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--qx-surface); box-shadow: 0 0 0 1px var(--qx-rule); }
.qx-mail .mh { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.qx-mail .mh b { font: 700 16px var(--font-serif); }
.qx-mail .mh .qx-mini { margin: 0 0 0 auto; }
.qx-mail .subj { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--qx-rule); font-weight: 600; }
.qx-mail pre { margin: 0; font: 13px/1.5 var(--font); white-space: pre-wrap; color: var(--qx-ink); }
.qx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 13px; border: 0; border-radius: 999px; background: var(--qx-btn); color: #fff !important; font-weight: 600 !important; font-size: 12.5px !important; cursor: pointer; }
.qx-btn:hover { filter: brightness(1.08); }
.qx-btn.ghost { background: var(--qx-wash); color: var(--qx-ink) !important; }
.qx-btn.red { background: var(--qx-btnrec); }
.qx-btn.sm { padding: 4px 11px; font-size: 12px !important; }
.qx-btn.big { padding: 10px 20px; font-size: 14px !important; margin: 6px 0 12px; }
.qx-btn .dot { box-shadow: inset 0 0 0 2px var(--qx-btn), inset 0 0 0 5px #fff; }
.qx-btn.pulse { animation: qxPulse 1.4s ease-in-out infinite; }
@keyframes qxPulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--qx-btnrec) 25%, transparent); } }
.qx-ready { max-width: 460px; margin: 40px auto 0; text-align: center; }
.qx-ready > p:not(.kick):not(.qx-title) { font-size: 14px; color: var(--qx-soft); line-height: 1.55; }
.qx-ready .fine { font-size: 12px; margin-top: 4px; }
.qx-detail.fresh .qx-sum li, .qx-detail.fresh .qx-todo, .qx-detail.fresh .qx-mail { animation: qxIn .5s var(--ease) var(--d, 0ms) both; }
@keyframes qxIn { from { opacity: 0; transform: translateY(6px); } }

/* Transcript panel */
.qx-tr { width: 272px; display: flex; flex-direction: column; min-height: 0; background: var(--qx-side); border-left: 1px solid var(--qx-rule); }
.qx-tr[hidden] { display: none; }
.qx-tr .trh { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding: 12px 14px 6px; }
.qx-tr .trh small { color: var(--qx-soft); font-size: 11px; }
.qx-tr input { margin: 0 12px 8px; padding: 4px 8px; border: 0; border-radius: 6px; background: var(--qx-surface); box-shadow: inset 0 0 0 1px var(--qx-rule); font-size: 12px; outline: none; }
.qx-tr .trl { overflow-y: auto; padding: 4px 10px 14px; scrollbar-width: thin; }
.qx-tr .ln { display: block; width: 100%; margin: 0 0 8px; padding: 2px 6px 2px 9px; border: 0; border-left: 3px solid var(--qx-youw); border-radius: 0 6px 6px 0; background: none; text-align: left; cursor: pointer; }
.qx-tr .ln.you { border-left-color: color-mix(in srgb, var(--qx-you) 45%, transparent); }
.qx-tr .ln.them { border-left-color: color-mix(in srgb, var(--qx-them) 45%, transparent); }
.qx-tr .ln:hover, .qx-tr .ln.now { background: var(--qx-wash); }
.qx-tr .ln b { display: block; font-size: 11px; }
.qx-tr .ln.you b { color: var(--qx-you); } .qx-tr .ln.them b { color: var(--qx-them); }
.qx-tr .ln time { font: 10.5px var(--font-mono); color: var(--qx-soft); margin-left: 6px; font-weight: 400; }
.qx-tr .ln span { font: 14px/1.35 var(--font-serif); }
.qx-tr mark { background: var(--qx-hl); color: inherit; border-radius: 2px; }

/* Live view */
.qx-live { max-width: 760px; }
.qx-lhead { position: sticky; top: -22px; z-index: 2; margin: -22px -30px 0; padding: 22px 30px 0; background: var(--qx-paper); }
.qx.narrow .qx-lhead { top: -16px; margin: -16px -16px 0; padding: 16px 16px 0; }
.qx-lbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.qx-lbar .sp { flex: 1; }
.qx-lbar .src { color: var(--qx-soft); }
.recpill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; background: color-mix(in srgb, var(--qx-rec) 12%, transparent); color: var(--qx-rec); font-weight: 600; }
.recpill i, .qx-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--qx-rec); animation: qxBlink 1.2s ease-in-out infinite; }
.recpill b { font-family: var(--font-mono); color: var(--qx-ink); }
@keyframes qxBlink { 50% { opacity: .35; } }
.qx-ink { position: relative; height: 120px; margin: 10px 0 0; }
.qx-ink canvas { display: block; width: 100%; height: 100%; }
.qx-ink .nibw { position: absolute; left: 0; top: 0; width: 26px; height: 26px; pointer-events: none; transition: color .2s; will-change: transform; }
.qx-ink .nib { width: 26px; height: 26px; display: block; }
.qx-legend { display: flex; align-items: center; gap: 6px; margin: 6px 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--qx-rule); font-size: 11.5px; color: var(--qx-soft); }
.qx-legend span { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; margin-left: 8px; }
.qx-legend span:first-child { margin-left: 0; }
.qx-legend i { width: 14px; height: 2.5px; border-radius: 2px; background: currentColor; }
.qx-legend .you { color: var(--qx-you); } .qx-legend .them { color: var(--qx-them); }
.qx-ln { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; margin: 0 0 12px; }
.qx-ln b { text-align: right; font-size: 11.5px; padding-top: 4px; }
.qx-ln b time { display: block; font: 10.5px var(--font-mono); color: var(--qx-soft); font-weight: 400; }
.qx-ln.you b, .qx-ln.you p { color: var(--qx-you); } .qx-ln.them b, .qx-ln.them p { color: var(--qx-them); }
.qx-ln p { margin: 0; font: 19px/1.35 var(--font-serif); }
.qx-ln .w { animation: qxInk .45s ease-out both; }
@keyframes qxInk { from { opacity: 0; filter: blur(2px); } }
.qx-end { margin: 6px 0 0 66px; color: var(--qx-soft); font-size: 13px; }
.qx-pill { position: absolute; right: 14px; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--qx-surface); box-shadow: 0 0 0 1px var(--qx-rule), 0 6px 18px rgba(0, 0, 0, .15); }
.qx-pill[hidden] { display: none; }
.qx-pill b { font: 600 12px var(--font-mono); }
.qx-pill canvas { width: 90px; height: 22px; }
.qx-pill button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--qx-btnrec); cursor: pointer; display: grid; place-items: center; }
.qx-pill button::after { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: #fff; }

/* Sheets: consent, AI, study */
.qx-sheet { position: absolute; inset: 0; z-index: 20; display: grid; place-items: start center; padding: 50px 16px 16px; background: rgba(20, 18, 14, .32); animation: qxFade .15s both; }
.qx-sheet[hidden] { display: none; }
@keyframes qxFade { from { opacity: 0; } }
.qx-dlg { width: min(480px, 100%); max-height: 100%; overflow-y: auto; padding: 22px 24px; border-radius: 14px; background: var(--qx-paper); box-shadow: 0 0 0 1px var(--qx-rule), 0 30px 80px rgba(0, 0, 0, .35); animation: qxIn .25s var(--ease) both; }
.qx-dlg .dh { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 700 19px var(--font-serif); }
.qx-dlg .dh .ic { width: 26px; height: 26px; color: var(--qx-you); }
.qx-dlg .dm { margin: 0 0 14px; color: var(--qx-soft); font-size: 13px; line-height: 1.5; }
.qx-dlg .dm.small { font-size: 12px; margin-bottom: 4px; }
.qx-dlg .dl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--qx-soft); }
.qx-dlg .seg { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--qx-wash); text-transform: none; letter-spacing: 0; }
.qx-dlg .seg button { padding: 2px 11px; border: 0; border-radius: 5px; background: none; font-size: 12px; font-weight: 600; cursor: pointer; }
.qx-dlg .seg button[aria-pressed="true"] { background: var(--qx-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.qx-dlg .msg { margin: 0; padding: 11px 13px; border-radius: 9px; background: var(--qx-wash); font-size: 13px; line-height: 1.5; }
.qx-dlg .info { margin: 14px 0 10px; font-size: 12px; color: var(--qx-soft); }
.qx-dlg .chk { display: flex; gap: 7px; align-items: center; font-size: 13px; cursor: pointer; }
.qx-dlg .chk input { accent-color: var(--qx-you); }
.qx-dlg .sent { margin: 0 0 12px; padding: 11px 13px; border-radius: 9px; background: var(--qx-themw); font-size: 13px; line-height: 1.5; }
.qx-dlg .btns { display: flex; justify-content: flex-end; gap: 8px; margin: 16px 0 0; }
.qx-dlg .btns.c { justify-content: center; }
.qx-dlg.study { width: min(520px, 100%); }
.qx-dlg .sh { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.qx-dlg .sh b { font: 700 17px var(--font-serif); }
.qx-dlg .sh small { margin-left: auto; color: var(--qx-soft); }
.qx-dlg .sh .qx-btn:first-child { margin-left: auto; }
.qx-dlg .fc { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border-radius: 14px; background: var(--qx-surface); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--qx-you) 30%, transparent); text-align: center; }
.qx-dlg .fc.flip { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--qx-them) 35%, transparent); }
.qx-dlg .fc .lab { margin: 0 0 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--qx-soft); }
.qx-dlg .fc .ftxt { margin: 0; font: 600 21px/1.3 var(--font-serif); }
.qx-dlg .fc .fq { margin: 10px 0 0; font-size: 12.5px; color: var(--qx-soft); }

/* ───────── Narrower windows ───────── */
.qx:not(.wide) .qx-tr { display: none; }
.qx.narrow { height: 620px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.qx.narrow .qx-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; border-right: 0; border-bottom: 1px solid var(--qx-rule); }
.qx.narrow .qx-lights, .qx.narrow .qx-foot { display: none; }
.qx.narrow .qx-brand { margin: 0 6px 0 2px; font-size: 16px; }
.qx.narrow .qx-rec { margin: 0 0 0 auto; height: 28px; padding: 0 12px; font-size: 12px !important; }
.qx.narrow .qx-side nav { order: 3; width: 100%; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.qx.narrow .qx-nav { width: auto; flex: none; padding: 4px 8px; font-size: 12px; }
.qx.narrow .qx-list, .qx.narrow .qx-main { grid-column: 1; grid-row: 2; border-right: 0; }
.qx.narrow.open .qx-list, .qx.narrow:not(.open) .qx-main { display: none; }
.qx.narrow .qx-backbtn { display: grid !important; }
.qx.narrow .qx-detail { padding: 16px 16px 30px; }
.qx.narrow .qx-title { font-size: 23px; }
.qx.narrow .qx-ln { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
.qx.narrow .qx-ln p { font-size: 16px; }
.qx.narrow .qx-end { margin-left: 50px; }
.qx.narrow .qx-lbar .ghost { display: none; }
.qx.narrow .qx-pill { display: none; }
.qx.narrow .qx-search { width: 50%; }
.qx.narrow .qx-card { grid-template-columns: 1fr; }
.qx.narrow .qx-card p + p { border-left: 0; border-top: 1px solid var(--qx-rule); }

/* ───────── Page panels ───────── */
.qx-apps { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.qx-apps span { padding: 4px 11px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 500; }
.qx-tracks { --you: #2e4fa6; --them: #b04a2e; display: grid; gap: 10px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qx-tracks, :root:not([data-theme="light"]) .qx-consent, :root:not([data-theme="light"]) .qx-sent { --you: #8ea7f2; --them: #ef9474; } }
:root[data-theme="dark"] .qx-tracks, :root[data-theme="dark"] .qx-consent, :root[data-theme="dark"] .qx-sent { --you: #8ea7f2; --them: #ef9474; }
.qx-tracks .trk { display: grid; grid-template-columns: 170px minmax(0, 1fr) 56px; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.qx-tracks .src { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; }
.qx-tracks .src svg { width: 20px; height: 20px; color: var(--muted); }
.qx-tracks .ink { width: 100%; height: 30px; }
.qx-tracks .ink path { fill: none; stroke-width: 2.2; stroke-linecap: round; }
.qx-tracks .you .ink path, .qx-tracks .you b { stroke: var(--you); color: var(--you); }
.qx-tracks .them .ink path, .qx-tracks .them b { stroke: var(--them); color: var(--them); }
.qx-tracks .trk b { text-align: right; font-family: var(--font-serif); font-size: 15px; }
.qx-arrow { text-align: center; color: var(--faint); }
.qx-out { padding: 16px 18px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); font: 17px/1.45 var(--font-serif); }
.qx-out p { margin: 0 0 6px; } .qx-out p:last-child { margin: 0; }
.qx-out b { display: inline-block; min-width: 54px; font: 600 12.5px var(--font); }
.qx-out .y, .qx-out p:first-child { color: var(--you); } .qx-out .t, .qx-out p:last-child { color: var(--them); }
@media (max-width: 600px) { .qx-tracks .trk { grid-template-columns: 1fr auto; } .qx-tracks .ink { grid-column: 1 / -1; grid-row: 2; } }
.qx-consent { --you: #2e4fa6; padding: 24px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.qx-consent .h { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 700 20px/1.25 var(--font-serif); }
.qx-consent .h svg { width: 30px; height: 24px; color: var(--you); flex: none; }
.qx-consent .m { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.qx-consent .tones { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--sunk); margin-bottom: 10px; }
.qx-consent .tones button { padding: 4px 14px; border: 0; border-radius: 7px; background: none; font: 600 13.5px var(--font); color: var(--text); cursor: pointer; }
.qx-consent .tones button[aria-selected="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.qx-consent .msg { margin: 0 0 10px; padding: 13px 15px; border-radius: 11px; background: var(--sunk); font-size: 15px; min-height: 72px; }
.qx-consent .copy-msg { padding: 6px 14px; border: 0; border-radius: 999px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); font: 600 13.5px var(--font); color: var(--text); cursor: pointer; }
.qx-bul { margin: 0; padding: 0; list-style: none; }
.qx-bul li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--muted); }
.qx-bul li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: #d63b2f; box-shadow: 0 0 0 4px color-mix(in srgb, #d63b2f 18%, transparent); }
.qx-sent { --you: #2e4fa6; --them: #b04a2e; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.qx-sent > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 14px; padding: 12px 18px; border-top: 1px solid var(--line); }
.qx-sent > div:first-child { border-top: 0; }
.qx-sent .row-h { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--sunk); }
.qx-sent b { font-weight: 600; }
.qx-sent small { grid-row: 2; color: var(--muted); font-size: 13px; }
.qx-sent .row-h { display: flex; justify-content: space-between; }
.qx-sent .row-h span { color: var(--muted) !important; font-size: 11.5px !important; }
.qx-sent div:not(.row-h) > span:not(.ok) { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 13.5px; font-weight: 600; color: var(--them); }
.qx-sent .ok { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 13.5px; font-weight: 600; color: var(--ok); }
.qx-sent .foot { margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .qx-ln .w, .qx-detail.fresh *, .qx-sheet, .qx-dlg, .recpill i, .qx-pill i, .qx-btn.pulse { animation: none !important; } }
