@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --paper: #f6f4ef;
  --card: #fffdf8;
  --sunk: #ece8df;
  --line: #d9d3c7;
  --ink: #16150f;
  --muted: #6b675c;
  --accent: #c2410c;
  --accent-ink: #fff;
  --ok: #2f6b3a;
  --ok-bg: #e3efe1;
  --warn: #8a5a00;
  --warn-bg: #f7ecd2;
  --bad: #a3261b;
  --bad-bg: #f6dfdb;
  --info-bg: #e5e9f2;
  --sans: "Instrument Sans", ui-sans-serif, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13120f;
    --card: #1b1a16;
    --sunk: #24221d;
    --line: #36332b;
    --ink: #eeeae0;
    --muted: #a19b8c;
    --accent: #f06a2e;
    --ok: #8fcf98;
    --ok-bg: #1f3322;
    --warn: #e6c170;
    --warn-bg: #3a2f14;
    --bad: #f0928a;
    --bad-bg: #3d1d1a;
    --info-bg: #202634;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: inherit; }
h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 17px; margin: 0; font-weight: 600; }
h3 { font-size: 13px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.08em;
     color: var(--muted); font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* shell */
.top { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 56px;
       border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0;
       z-index: 5; }
.brand { font-weight: 700; letter-spacing: -0.03em; font-size: 19px; display: flex; gap: 8px;
         align-items: center; text-decoration: none; }
.brand i { width: 14px; height: 14px; background: var(--accent); display: inline-block;
           transform: rotate(45deg); }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { text-decoration: none; padding: 6px 10px; border-radius: var(--r); color: var(--muted);
         font-weight: 500; white-space: nowrap; }
.nav a.on { color: var(--ink); background: var(--sunk); }
.who { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 16px;
        margin-bottom: 20px; flex-wrap: wrap; }
.eyebrow { font: 500 12px var(--mono); color: var(--accent); text-transform: uppercase;
           letter-spacing: 0.1em; margin-bottom: 6px; }

/* blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.card > header { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex;
                 justify-content: space-between; align-items: center; gap: 10px; }
.card > .body { padding: 18px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px;
         align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
       padding: 14px 16px; }
.kpi b { display: block; font-size: 24px; letter-spacing: -0.02em; font-weight: 650; }
.kpi span { font-size: 12px; color: var(--muted); }

/* controls */
.btn { font: 600 14px var(--sans); border: 1px solid var(--line); background: var(--card);
       color: var(--ink); padding: 8px 14px; border-radius: var(--r); cursor: pointer;
       text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.input, select.input, textarea.input { width: 100%; font: 15px var(--sans); color: var(--ink);
       background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
       padding: 8px 10px; }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.field { display: grid; gap: 5px; }
/* A password field with a show/hide button inside it. */
.pw { position: relative; }
.pw .input { padding-right: 44px; }
.pw .input::-ms-reveal { display: none; }  /* Edge's own eye would double ours */
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
             display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
             border: 0; border-radius: var(--r); background: none; color: var(--muted);
             cursor: pointer; }
.pw-toggle:hover { color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle .eye-off, .pw-toggle[aria-pressed="true"] .eye { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }
.field > label { font-weight: 600; font-size: 14px; }
.field .help { font-size: 13px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--bad); font-weight: 500; }
.field.bad .input { border-color: var(--bad); }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choices label { border: 1px solid var(--line); border-radius: var(--r); padding: 6px 12px;
                 cursor: pointer; font-weight: 500; }
.choices input { margin-right: 6px; accent-color: var(--accent); }
.choices label:has(input:checked) { border-color: var(--ink); background: var(--sunk); }

/* tables */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font: 600 11.5px var(--sans); text-transform: uppercase;
        letter-spacing: 0.06em; color: var(--muted); padding: 10px 12px;
        border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--sunk); }
.t td.num, .t th.num { text-align: right; font-family: var(--mono); }
.scroll { overflow-x: auto; }

/* pills */
.pill { display: inline-block; font: 500 12px var(--mono); padding: 2px 8px; border-radius: 99px;
        background: var(--sunk); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad, .pill.high { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
        overflow-x: auto; }
.tabs button { font: 500 14px var(--sans); background: none; border: 0; color: var(--muted);
               padding: 9px 12px; cursor: pointer; border-bottom: 2px solid transparent;
               white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs button b { font-family: var(--mono); font-weight: 500; margin-left: 4px; }

/* task workspace */
.inputs { display: grid; gap: 12px; }
.inputs.ab { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .inputs.ab { grid-template-columns: 1fr; } }
.quote { background: var(--sunk); border-radius: var(--r); padding: 12px 14px;
         white-space: pre-wrap; }
.quote .k { font: 600 11.5px var(--mono); color: var(--muted); text-transform: uppercase;
            letter-spacing: 0.08em; display: block; margin-bottom: 4px; }
.instructions { white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.bar { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line);
       padding: 12px 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
       border-radius: 0 0 10px 10px; }
.clock { font: 500 13px var(--mono); color: var(--muted); }
.clock b { color: var(--ink); }
.feedback { border-left: 3px solid var(--warn); padding: 8px 12px; background: var(--warn-bg);
            border-radius: 0 var(--r) var(--r) 0; font-size: 14px; }
.dim { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.dim .scores { display: flex; gap: 4px; margin: 6px 0; }
.dim .scores button { width: 36px; height: 32px; border: 1px solid var(--line);
                      background: var(--card); border-radius: 5px; font: 600 14px var(--mono);
                      cursor: pointer; color: var(--ink); }
.dim .scores button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.answer dt { font: 600 12px var(--mono); color: var(--muted); text-transform: uppercase;
             letter-spacing: 0.06em; margin-top: 10px; }
.answer dd { margin: 3px 0 0; white-space: pre-wrap; }

.notice { padding: 10px 14px; border-radius: var(--r); background: var(--info-bg);
          font-size: 14px; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.empty { padding: 36px; text-align: center; color: var(--muted); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(720px, 100vw); background: var(--paper);
          border-left: 1px solid var(--line); overflow-y: auto; z-index: 20;
          box-shadow: -20px 0 40px rgb(0 0 0 / 0.12); padding: 24px; }
.drawer[hidden] { display: none; }
.timeline { font-size: 13px; }
.timeline li { padding: 4px 0; border-bottom: 1px dashed var(--line); list-style: none; }
.timeline { padding: 0; margin: 0; }
.bars .b { display: grid; grid-template-columns: 90px 1fr 50px; gap: 8px; align-items: center;
           font-size: 13px; margin: 4px 0; }
.bars .b .t { height: 8px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.bars .b .t span { display: block; height: 100%; background: var(--accent); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
         background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
         font-size: 14px; z-index: 50; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: #16150f; color: #f6f4ef; padding: 56px; display: flex;
              flex-direction: column; justify-content: space-between; }
.login .art h1 { font-size: 44px; line-height: 1.05; max-width: 520px; }
.login .art p { color: #b9b3a5; max-width: 460px; }
.login form { align-self: center; justify-self: center; width: min(380px, 90vw); }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login .art { display: none; } }
dialog.modal { border: 1px solid var(--line); border-radius: 12px; background: var(--card);
               color: var(--ink); padding: 22px; width: min(460px, 92vw); }
dialog.modal::backdrop { background: rgb(0 0 0 / 0.45); }
.who a { text-decoration: none; color: var(--ink); font-weight: 500; padding: 4px 8px;
         border-radius: var(--r); }
.who a:hover, .who a.on { background: var(--sunk); }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 22px; }
.md h3, .md h4, .md h5 { margin: 10px 0 6px; font-size: 15px; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--sunk); padding: 1px 4px;
           border-radius: 4px; }
.md pre.code { background: var(--sunk); padding: 10px 12px; border-radius: var(--r);
               overflow-x: auto; margin: 0 0 8px; }
.md pre.code code { background: none; padding: 0; }
.convo { display: grid; gap: 8px; }
.turn { padding: 10px 12px; border-radius: 10px; max-width: 92%; }
.turn .k { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
           color: var(--muted); display: block; margin-bottom: 4px; }
.turn.user { background: var(--sunk); justify-self: start; }
.turn.assistant { background: var(--info-bg); justify-self: end; }
.turn.system { background: var(--warn-bg); justify-self: stretch; max-width: 100%; }
.turn-edit { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid;
             gap: 6px; }
.turn-edit.assistant { border-left: 3px solid var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 38px;
         border: 1px solid var(--line); border-radius: var(--r); padding: 4px 6px;
         background: var(--card); position: relative; }
.chips input { border: 0; background: none; color: var(--ink); font: 14px var(--sans);
               flex: 1; min-width: 120px; outline: none; }
.chip { display: inline-flex; gap: 4px; align-items: center; background: var(--sunk);
        border-radius: 99px; padding: 2px 4px 2px 10px; font-size: 13px; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; background: var(--card);
           border: 1px solid var(--line); border-radius: var(--r); z-index: 10;
           box-shadow: 0 8px 20px rgb(0 0 0 / 0.15); max-height: 260px; overflow-y: auto; }
.suggest div { padding: 7px 10px; cursor: pointer; font-size: 14px; }
.suggest div:hover, .suggest div.on { background: var(--sunk); }
.filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.toggles { display: flex; gap: 16px; flex-wrap: wrap; }
.toggles label { display: flex; gap: 6px; align-items: center; font-weight: 500; font-size: 14px;
                 cursor: pointer; }
.toggles input { accent-color: var(--accent); width: 16px; height: 16px; }
.summary { color: var(--warn); font-size: 14px; }
.menu { position: relative; display: inline-block; }
.menu .items { position: absolute; right: 0; top: 100%; margin-top: 4px; background: var(--card);
               border: 1px solid var(--line); border-radius: var(--r); z-index: 10;
               min-width: 170px; box-shadow: 0 8px 20px rgb(0 0 0 / 0.15); }
.menu .items a { display: block; padding: 8px 12px; text-decoration: none; font-size: 14px; }
.menu .items a:hover { background: var(--sunk); }
.post { border-bottom: 1px solid var(--line); padding: 12px 0; }
.post:last-child { border-bottom: 0; }
.post .replies { margin: 8px 0 0 18px; border-left: 2px solid var(--line); padding-left: 12px; }
[hidden] { display: none !important; }
.filters .field.wide { grid-column: span 2; }
.filters .field.wide .row > .input { flex: 1; min-width: 0; }
@media (max-width: 520px) { .filters .field.wide { grid-column: auto; } }
.turn-edit.drafted { border-color: var(--warn); }
.bell { position: relative; }
.bell .count { position: absolute; top: -6px; right: -8px; background: var(--accent); color: #fff;
               font: 600 10.5px var(--mono); border-radius: 99px; padding: 1px 5px; }
.pop { position: absolute; right: 0; top: 100%; margin-top: 6px; width: min(380px, 92vw);
       max-height: 70vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line);
       border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / 0.2); z-index: 30; }
.pop-head { padding: 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
            background: var(--card); }
.note { display: block; padding: 10px; border-bottom: 1px solid var(--line); text-decoration: none; }
.note.unread { background: var(--info-bg); }
.pager { margin-top: 10px; }
.tag { font: 600 11px var(--mono); padding: 1px 7px; border-radius: 99px; background: var(--sunk); }
.scorechip { font: 600 12.5px var(--mono); padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.kv > div { background: var(--sunk); border-radius: var(--r); padding: 8px 10px; }
.kv .k { font: 600 11px var(--mono); color: var(--muted); display: block; margin-bottom: 3px; }
.urg { height: 8px; background: var(--sunk); border-radius: 99px; overflow: hidden; min-width: 80px; }
.urg span { display: block; height: 100%; background: var(--accent); }

/* AI review report */
ol.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
ol.checks .check { border-top: 1px dashed var(--line); padding-top: 8px; display: grid; gap: 4px; }
ol.checks .check:first-child { border-top: 0; padding-top: 0; }
.evidence { background: var(--sunk); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; }
.evidence q { font-style: italic; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line);
  border-top-color: var(--ink); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; }

/* Guideline diffs and quizzes */
pre.diff { background: var(--sunk); border-radius: var(--r); padding: 10px 12px; font: 12.5px/1.5 var(--mono);
  white-space: pre-wrap; overflow-x: auto; margin: 0; }
pre.diff .add { color: var(--ok); background: var(--ok-bg); }
pre.diff .del { color: var(--bad); background: var(--bad-bg); text-decoration: line-through; }
pre.diff .hunk { color: var(--muted); }
ol.quiz { padding-left: 20px; }
ol.quiz .choices { margin-top: 6px; }

/* Grading part by part, agent runs, keyboards, pinned comments */
.units .unit, .steps .unit { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; }
.unit-text { line-height: 1.5; }
ol.run { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
ol.run .step { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; display: grid; gap: 4px; }
pre.code { background: var(--sunk); border-radius: 6px; padding: 6px 8px; margin: 0; font: 12px/1.45 var(--mono); white-space: pre-wrap; }
ol.graded { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.kbd { display: flex; flex-wrap: wrap; gap: 4px; }
.kbd button { min-width: 32px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--card);
  font: 15px var(--sans, inherit); cursor: pointer; color: inherit; }
.kbd button:hover { background: var(--sunk); }
ul.pins { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }
ul.pins q, .pin q { background: var(--warn-bg); padding: 0 3px; border-radius: 3px; }

/* Shortcuts and command palette */
kbd { font: 600 11.5px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px;
  background: var(--sunk); white-space: nowrap; }
dialog.modal.wide { max-width: 760px; width: 92vw; }
dialog.palette { max-width: 560px; width: 92vw; padding: 12px; }
.palette-list { display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.palette-item { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.palette-item.on, .palette-item:hover { background: var(--sunk); }

/* Language editors */
.wave-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); }
.track { position: relative; height: 96px; cursor: crosshair; user-select: none; }
.track canvas { position: absolute; inset: 0; }
.regions .region { position: absolute; top: 0; bottom: 0; border-left: 2px solid; border-right: 1px solid; cursor: pointer; }
.regions .region span { font: 600 10px var(--mono); padding: 1px 3px; }
.regions .region.on { outline: 2px solid var(--ink); outline-offset: -2px; }
.regions .region.noise, .regions .region.silence, .regions .region.music { opacity: .5; }
.track .playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; }
.track .selection { position: absolute; top: 0; bottom: 0; background: rgba(120, 160, 255, .25); pointer-events: none; }
.segs { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.segs .seg { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 4px; border-radius: 6px; }
.segs .seg .text { flex: 1 1 260px; }
.segs .seg.on { background: var(--sunk); }
.segs .seg.warn { box-shadow: inset 3px 0 var(--warn); }
.spantext { line-height: 2.2; font-size: 15.5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); white-space: pre-wrap; }
.spantext mark { color: inherit; border-radius: 3px; padding: 1px 0; cursor: pointer; position: relative; }
.spantext mark::after { content: attr(data-label); font: 600 9.5px var(--mono); vertical-align: super; margin-left: 2px; opacity: .8; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.pair .src { background: var(--sunk); border-radius: var(--r); padding: 8px 10px; line-height: 1.5; }
.pair .src mark { background: var(--warn-bg); color: inherit; }
@media (max-width: 720px) { .pair { grid-template-columns: 1fr; } }
ul.problems { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.dim.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Where a task is */
.stages { display: flex; flex-wrap: wrap; gap: 6px; }
.stages .stage { font: 500 12.5px var(--mono); padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.stages .stage.done { color: var(--ink); background: var(--sunk); }
.stages .stage.now { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.stages .stage.now.rework { background: var(--warn); border-color: var(--warn); color: #111; }
.stages .stage.now.rejected, .stages .stage.now.escalated { background: var(--bad); border-color: var(--bad); color: #fff; }
ol.story { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
tr.changed td { background: var(--warn-bg); }
.pill .x { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 0 0 4px; font: inherit; opacity: .6; }
.pill .x:hover { opacity: 1; }
.stage-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.stage-row #stage-strip { flex: 1; min-width: 0; }
.popover { position: absolute; right: 0; top: 100%; margin-top: 6px; z-index: 30; width: min(560px, calc(100vw - 32px));
  max-height: 70vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 12px 32px rgb(0 0 0 / .14); padding: 12px; }
.popover .tabs { margin-bottom: 10px; }
.popover .card { box-shadow: none; }
