/* FLX HQ. One stylesheet, light by default and dark when the system asks.
   A sidebar from 860px up, a bar of tabs along the bottom below that. The desk's
   views are the same markup as at flx.es/ideas/desk, so their class names are
   styled here too, on HQ's tokens. */

:root {
  --bg: #f5f4f0;
  --side: #eeece6;
  --panel: #ffffff;
  --hover: #e8e6df;
  --line: #e2dfd7;
  --line-soft: #eceae4;
  --text: #1d1f23;
  --muted: #6a6d74;
  --accent: #2f6b8f;
  --accent-2: #4f8fb5;
  --accent-soft: #e2edf4;
  --accent-ink: #ffffff;
  --good: #2e6b4f;
  --good-soft: #e3f0e8;
  --warn: #8a5a17;
  --warn-soft: #f7eed8;
  --bad: #b23b2e;
  --bad-soft: #f8e3e0;
  --violet: #6b52b8;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.05), 0 4px 16px rgba(20, 22, 26, 0.04);
  /* The names the desk's views were written against. */
  --surface: var(--panel);
  --surface-2: var(--side);
  --pick: var(--good);
  --pick-bg: var(--good-soft);
  --warn-bg: var(--warn-soft);
  --kotlin: var(--violet);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121418;
    --side: #16191d;
    --panel: #1b1e23;
    --hover: #22262c;
    --line: #2a2f37;
    --line-soft: #23272e;
    --text: #e7e9ed;
    --muted: #959ba5;
    --accent: #6aaed4;
    --accent-2: #3d7ea6;
    --accent-soft: #1b2a35;
    --accent-ink: #0e1419;
    --good: #66b48d;
    --good-soft: #16271e;
    --warn: #e0bb6a;
    --warn-soft: #2c2414;
    --bad: #e2766a;
    --bad-soft: #2e1a18;
    --violet: #a690e8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body.hq {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
code { font-size: 0.88em; background: var(--side); padding: 0.1em 0.35em; border-radius: 4px; }
.hq-i { width: 18px; height: 18px; flex: none; }

/* ---- frame ---- */

body.hq:not(.is-login) { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.hq-side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--side);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
}
.hq-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.hq-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.18), inset 0 0 0 9px rgba(255, 255, 255, 0.08);
  flex: none;
}
.hq-mark.is-big { width: 52px; height: 52px; border-radius: 15px; justify-self: center; box-shadow: inset 0 0 0 9px rgba(255, 255, 255, 0.18), inset 0 0 0 16px rgba(255, 255, 255, 0.08); }

.hq-nav { display: grid; gap: 1px; }
.hq-nav a, .hq-side-foot a, .hq-side-foot button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font: inherit;
  font-size: 14.5px;
  background: none;
  border: 0;
  width: 100%;
  cursor: pointer;
  text-align: left;
}
.hq-nav a:hover, .hq-side-foot a:hover, .hq-side-foot button:hover { background: var(--hover); color: var(--text); }
.hq-nav a.on, .hq-side-foot a.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.hq-nav a.in { color: var(--text); }
.hq-subnav { display: grid; gap: 1px; margin: 1px 0 6px 28px; }
.hq-subnav a { padding: 6px 10px; font-size: 13.5px; }
.hq-nav-head { margin: 18px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.hq-nav a.is-out .hq-i:last-child { width: 13px; height: 13px; margin-left: auto; opacity: 0.55; }
.hq-count { margin-left: auto; font-size: 11.5px; font-weight: 650; background: var(--accent-soft); color: var(--accent); padding: 1px 7px; border-radius: 999px; }
.hq-side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 1px; }
.hq-side-foot form { margin: 0; }

.hq-main { min-width: 0; }
.hq-top { display: none; }
.hq-content { max-width: 1040px; margin: 0 auto; padding: 34px 40px 72px; }
.hq-tabs { display: none; }

/* ---- page parts ---- */

.hq-head { margin: 0 0 22px; }
.hq-head h1 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; margin: 2px 0 0; font-weight: 650; }
.hq-date { color: var(--muted); margin: 0; font-size: 14px; }

.hq-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 16px; }
.hq-tile {
  display: grid;
  gap: 1px;
  padding: 14px 16px 15px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.hq-tile:hover { border-color: var(--accent); }
.hq-tile-k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.hq-tile b { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hq-tile-s { color: var(--muted); font-size: 13px; }

.hq-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 16px; margin: 0 0 16px; box-shadow: var(--shadow); }
.hq-card h2 { font-size: 15px; font-weight: 650; margin: 0 0 10px; letter-spacing: -0.005em; }
.hq-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.hq-cols .hq-card { margin: 0 0 16px; }

.hq-list { list-style: none; margin: 0 -8px; padding: 0; }
.hq-list li + li { border-top: 1px solid var(--line-soft); }
.hq-list li > a, .hq-li-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.hq-list li > a:hover { background: var(--hover); }
.hq-list.is-compact li > a, .hq-list.is-compact .hq-li-row { padding: 8px; }
.hq-src { display: inline-flex; align-items: center; gap: 6px; flex: none; width: 100px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.hq-src .hq-i { width: 16px; height: 16px; }
.hq-src.is-review { color: var(--warn); }
.hq-src.is-mail { color: var(--accent); }
.hq-src.is-issue { color: var(--violet); }
.hq-src.is-donation { color: var(--bad); }
.hq-src.is-pitch { color: var(--good); }
.hq-src.is-ideas { color: var(--warn); }
.hq-li-body { display: grid; min-width: 0; flex: 1; }
.hq-li-title { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.hq-li-meta { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-li-end { display: flex; align-items: center; gap: 8px; flex: none; color: var(--muted); }
.hq-li-end .hq-i { width: 15px; height: 15px; }
.hq-when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.hq-pill { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.hq-pill.is-good { background: var(--good-soft); color: var(--good); }
.hq-quiet { color: var(--muted); margin: 0; }
.hq-error { color: var(--bad); background: var(--bad-soft); padding: 8px 12px; border-radius: 9px; margin: 10px 0 0; }

.hq-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.hq-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px; padding: 4px 6px 8px; border-bottom: 1px solid var(--line); }
.hq-table td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); }
.hq-table tr:last-child td { border-bottom: 0; }
.hq-table td:first-child a { color: var(--text); text-decoration: none; }
.hq-table td:first-child a:hover { color: var(--accent); }
.hq-delta { font-size: 11.5px; font-weight: 600; }
.hq-delta.is-up { color: var(--good); }
.hq-delta.is-down { color: var(--bad); }

.hq-health { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hq-health li { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hq-dot-s { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hq-dot-s.is-ok { background: var(--good); }
.hq-dot-s.is-bad { background: var(--bad); }
.hq-dot-s.is-wait { background: var(--warn); }

.hq-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  text-decoration: none;
  justify-content: center;
}
.hq-btn:hover { border-color: var(--accent); }
.hq-btn.is-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hq-btn.is-quiet { background: transparent; color: var(--muted); }
.hq-btn[disabled] { opacity: 0.55; cursor: default; }
/* A button waiting on the server (hqWait in hq.js, busy() in the desk's
   script): a spinner in it, not the faded look of a button that cannot be
   pressed, and beside it a line saying how far the call has got. */
.is-busy, .is-busy[disabled], .hq-desk button.is-busy[disabled] { opacity: 1; cursor: progress; }
.is-busy::before {
  content: '';
  flex: none;
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 7px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: hq-spin 0.7s linear infinite;
}
.hq-btn.is-busy::before { margin-right: 0; }
@keyframes hq-spin { to { transform: rotate(360deg); } }
.hq-wait { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hq-wait.is-error { color: var(--bad); }
.hq-wait-bar { flex: none; width: 72px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.hq-wait-bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s ease; }
textarea.is-streaming { background: var(--accent-soft); }
textarea.is-fresh { animation: hq-fresh 1.6s ease-out; }
@keyframes hq-fresh { from { background-color: var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) {
  .is-busy::before { animation-duration: 2.4s; }
  textarea.is-fresh { animation: none; }
  .hq-wait-bar > i { transition: none; }
}
.hq-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.hq-row input { flex: 1 1 220px; }

input[type=text], input[type=password], input[type=email], textarea, select {
  font: inherit;
  font-size: 14.5px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* ---- signing in ---- */

body.is-login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.hq-login { width: min(360px, 100%); display: grid; gap: 14px; text-align: center; }
.hq-login h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
.hq-token { text-align: left; }
.hq-token summary { cursor: pointer; color: var(--muted); font-size: 14px; text-align: center; list-style: none; }
.hq-token summary::-webkit-details-marker { display: none; }
.hq-token form { display: grid; gap: 8px; margin: 12px 0 8px; }
.hq-token .hq-quiet { font-size: 13px; text-align: center; }

/* ---- the desk's views, on HQ's tokens ---- */

.hq-desk button, .hq-desk select { font: inherit; font-size: 14px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); cursor: pointer; }
.hq-desk button[disabled] { opacity: 0.55; cursor: default; }
.hq-desk .chip {
  font: inherit;
  font-size: 12.5px;
  line-height: 1.2;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--side);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.hq-desk .chip:hover { border-color: var(--accent); }
.hq-desk .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hq-desk .chip.quiet { background: transparent; color: var(--muted); }
.hq-desk .chip.go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); padding: 6px 15px; font-weight: 600; }
.hq-desk .chip.is-danger { color: var(--warn); border-color: var(--warn-soft); background: var(--warn-soft); }
.badge { font-size: 11px; font-weight: 650; background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 999px; }
.hint { color: var(--muted); font-size: 13px; margin: 0.6rem 0 0; }
.empty { color: var(--muted); padding: 2rem 0; }
.error { color: var(--bad); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.views { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--side); border-radius: 11px; width: fit-content; max-width: 100%; margin: 0 0 18px; }
.views a { border-radius: 8px; padding: 6px 12px; font-weight: 550; font-size: 14px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.views a:hover { color: var(--text); }
.views a.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.pitch-mail-head { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; font-size: 14px; }
.pitch-mail-head dt { color: var(--muted); }
.pitch-mail-head dd { margin: 0; overflow-wrap: anywhere; }

.desk-sync { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.desk-flash { padding: 10px 14px; border-radius: 10px; background: var(--good-soft); color: var(--good); margin: 0 0 14px; }
.desk-flash.error { background: var(--bad-soft); color: var(--bad); }
.desk-filter { margin: 0 0 14px; }
.desk-lede { color: var(--muted); font-size: 14px; margin: 0 0 14px; max-width: 46rem; }
.desk-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.desk-row + .desk-row { border-top: 1px solid var(--line-soft); }
.desk-row > a { display: grid; gap: 3px; padding: 12px 16px; color: inherit; text-decoration: none; }
.desk-row > a:hover { background: var(--hover); }
.desk-row.is-answered, .desk-row.is-ignored, .desk-row.is-muted { opacity: 0.68; }
.desk-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; }
.desk-meta .chip { cursor: default; }
.desk-when { color: var(--muted); font-size: 12.5px; }
.desk-who { font-weight: 600; overflow-wrap: anywhere; }
.desk-subject { color: var(--muted); overflow-wrap: anywhere; font-size: 14px; }
.hq-desk .chip.desk-ready { background: var(--good-soft); border-color: var(--good-soft); color: var(--good); }
.desk-app.is-alcotrack { color: var(--warn); }
.desk-app.is-detoxdroid { color: var(--good); }
.desk-app.is-cheatdroid { color: var(--violet); }
.desk-title { font-size: 20px; margin: 0 0 12px; overflow-wrap: anywhere; letter-spacing: -0.01em; }
.desk-item { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow); }
.desk-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 14.5px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
  max-height: 60vh;
  overflow: auto;
}
.desk-text.desk-mine { border-color: var(--good-soft); background: var(--good-soft); }
.desk-answer h3, .desk-item h3, .desk-settings h3, .desk-templates h3 { font-size: 15px; margin: 18px 0 8px; }
.desk-answer textarea, .desk-template textarea, .desk-settings textarea { width: 100%; line-height: 1.55; resize: vertical; }
.desk-answer-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.desk-answer-row input[type=text], .desk-answer-row input[type=email] { flex: 1 1 14rem; font-size: 14px; padding: 7px 11px; }
.desk-subject-in { flex: 1 1 100%; }
.desk-note { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; }
.desk-count { margin: 6px 0 0; }
.desk-count.error { color: var(--bad); }
.desk-close { font-size: 13.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.desk-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.desk-related { list-style: none; padding: 0; margin: 0; }
.desk-related li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); display: grid; gap: 3px; }
.desk-related summary { cursor: pointer; }
.desk-post-head { margin: 14px 0 6px; display: flex; gap: 8px; align-items: baseline; }
.desk-stars { color: var(--warn); letter-spacing: 0.05em; font-size: 14px; }
.desk-stars.is-1, .desk-stars.is-2 { color: var(--bad); }
.desk-ratings { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 0 0 14px; }
.desk-rating { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: inherit; text-decoration: none; font-size: 14px; box-shadow: var(--shadow); }
.desk-rating:hover, .desk-rating.on { border-color: var(--accent); }
.desk-templates { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 16px; background: var(--panel); }
.desk-templates > summary { cursor: pointer; font-weight: 600; }
.desk-template { margin: 0 0 18px; }
.desk-template-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 6px; }
.desk-legacy .desk-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 16px; }
.desk-pick { padding-top: 2px; }
.desk-pick input { width: 17px; height: 17px; }
.desk-legacy-body { display: grid; gap: 5px; min-width: 0; }
.desk-legacy-body details summary { cursor: pointer; color: var(--accent); font-size: 13.5px; }
.desk-legacy-body > button { justify-self: start; }
.desk-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); margin-top: 12px; }
.desk-settings { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px 20px 18px; }
.desk-settings select { max-width: 100%; }

/* The sidebar lists the desk's views, so its own row of tabs is for phones only. */
@media (min-width: 861px) {
  .hq-desk .desk-views { display: none; }
}

/* ---- phone ---- */

@media (max-width: 1100px) {
  .hq-cols { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  body.hq:not(.is-login) { display: block; }
  .hq-side { display: none; }
  .hq-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 10px 16px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .hq-top .hq-brand { padding: 0; }
  .hq-top-settings { color: var(--muted); display: grid; place-items: center; padding: 6px; background: none; border: 0; font: inherit; }
  .hq-top .hq-brand { margin-right: auto; }
  .hq-search { padding-top: max(10px, env(safe-area-inset-top)); align-items: flex-start; }
  .hq-search-box { max-height: 82vh; }
  .hq-search-keys { display: none; }
  .hq-top-settings .hq-i { width: 21px; height: 21px; }
  .hq-content { padding: 18px 16px calc(92px + env(safe-area-inset-bottom)); }
  .hq-head h1 { font-size: 24px; }
  .hq-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hq-tile b { font-size: 26px; }
  .hq-card { padding: 16px 14px 12px; border-radius: 13px; }
  .hq-src { width: auto; }
  .hq-src { font-size: 0; gap: 0; }
  .hq-src .hq-i { width: 18px; height: 18px; }
  .hq-li-end .hq-when { display: none; }
  .desk-item { padding: 16px 14px; }
  .hq-desk .views { flex-wrap: nowrap; overflow-x: auto; width: auto; scrollbar-width: none; }
  .hq-desk .views::-webkit-scrollbar { display: none; }
  .hq-desk .views a { flex: none; }
  .desk-ratings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .desk-rating { padding: 10px 11px; font-size: 13px; }
  .desk-row > a { padding: 12px 14px; }
  .hq-tabs {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .hq-tabs a { position: relative; display: grid; justify-items: center; gap: 2px; min-width: 60px; padding: 4px 6px; font-size: 11px; color: var(--muted); text-decoration: none; }
  .hq-tabs a.on { color: var(--accent); }
  .hq-tabs a.is-out { opacity: 0.8; }
  .hq-tabs .hq-i { width: 23px; height: 23px; }
  .hq-dot { position: absolute; top: 0; right: 12px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
}

.desk-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-soft); }
.desk-share-url { flex: 1 1 18rem; font-size: 13px !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; }
.desk-share .hint { flex: 1 1 100%; margin: 0; }

/* ---- the pages served from flx.es (lib/mount.php) ---- */

/* Their rules on html and body land on this wrapper. */
.hq-legacy { min-width: 0; }
/* The ideas page's lock belongs to the token; inside HQ the session is the lock. */
.hq-legacy #unlock { display: none !important; }

/* ---- desk: ticking, the keyboard, snippets ---- */
.desk-row.has-pick { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.desk-row.has-pick > .desk-sel { margin: 15px 0 0 14px; width: 16px; height: 16px; accent-color: var(--accent); }
.desk-row.has-pick > a { padding-left: 10px; }
.desk-row.is-cursor { box-shadow: inset 3px 0 0 var(--accent); background: var(--hover); }
.desk-bulk { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; margin-top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.desk-bulk-all { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.desk-bulk-n { font-size: 13px; color: var(--muted); margin-right: 6px; }
.desk-nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0 0 12px; font-size: 14px; }
.desk-nav a { text-decoration: none; }
.desk-nav .hint { margin: 0; }
.desk-keys-hint { margin-left: auto !important; }
.desk-keys { position: fixed; right: 18px; bottom: 18px; z-index: 50; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22); font-size: 14px; }
.desk-keys dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 8px 0 0; }
.desk-keys dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); }
.desk-keys dd { margin: 0; color: var(--muted); }
kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--panel); }
.desk-snippets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 0; }
.desk-snippets .hint { margin: 0; }
.desk-snippet-edit { border-top: 1px solid var(--line-soft); padding: 12px 0; }
.desk-snippet-edit textarea { width: 100%; margin-top: 8px; }
@media (max-width: 860px) {
  .desk-keys-hint, .desk-keys { display: none !important; }
  .desk-bulk { bottom: calc(70px + env(safe-area-inset-bottom)); }
}

/* ---- settings: notifications ---- */
.hq-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 18px; margin: 4px 0 14px; }
.hq-checks label { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.hq-checks input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---- ⌘K ---- */
.hq-search-open { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.hq-search-open:hover { color: var(--text); border-color: var(--accent-2); }
.hq-search-open kbd { margin-left: auto; font-size: 11px; }
.hq-search { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
  background: rgba(10, 12, 16, 0.38); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.hq-search[hidden] { display: none; }
.hq-search-box { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); overflow: hidden; }
.hq-search-box input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 17px; background: transparent; color: var(--text); outline: none; width: 100%; }
.hq-hits { overflow-y: auto; padding: 6px; }
.hq-hit { display: flex; gap: 12px; align-items: flex-start; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; }
.hq-hit .hq-i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--muted); }
.hq-hit.on, .hq-hit:hover { background: var(--accent-soft); }
.hq-hit.on .hq-i { color: var(--accent); }
.hq-hit-body { display: grid; gap: 2px; min-width: 0; }
.hq-hit-title { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-hit-meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-hit-none { padding: 14px 12px; color: var(--muted); margin: 0; }
.hq-search-keys { margin: 0; padding: 8px 14px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.hq-search-keys kbd + kbd { margin-left: -2px; }
.hq-search-keys kbd:not(:first-child) { margin-left: 8px; }
html.hq-locked { overflow: hidden; }
.desk-facts { border-top: 1px solid var(--line-soft); padding: 12px 0; }
.desk-facts h4 { margin: 4px 0 8px; font-size: 15px; }
.desk-facts textarea { width: 100%; }
.desk-proposal { margin: 0 0 10px; padding: 10px 12px; border: 1px dashed var(--accent-2); border-radius: 10px; background: var(--accent-soft); }
.desk-proposal summary { cursor: pointer; font-weight: 560; }

/* ---- desk: topics ---- */
.desk-topics-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 0; }
.desk-topics-row .hint { margin: 0; }
.desk-topic-pick { font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.desk-topic-quick { padding: 0 14px 12px; }
.desk-topic-title { flex: 1; font-size: 19px; font-weight: 650; }
.desk-ship { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--side); }
.desk-ship h3 { margin-top: 0; }
.desk-ship .desk-answer-row input { flex: 1; min-width: 160px; }
.desk-row .desk-topic-out { margin: 0 14px 10px; justify-self: start; }

/* ---- apps and money ---- */
.hq-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hq-app-card { display: block; color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.hq-app-card:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.hq-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 6px 0 0; font-size: 14px; }
.hq-facts dt { color: var(--muted); }
.hq-facts dd { margin: 0; }
.hq-bar { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin: 10px 0 6px; }
.hq-bar span { display: block; height: 100%; background: var(--good); border-radius: 999px; }
.hq-money td, .hq-money th { white-space: nowrap; }
.hq-money tfoot th { border-top: 1px solid var(--line); text-align: left; font-weight: 650; }
/* A number with what it is made of: on hover with a mouse, open after a tap (hq.js). */
.hq-pop { position: relative; display: inline-block; }
.hq-pop-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.hq-pop-body {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: -10px;
  min-width: 230px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow), 0 10px 28px rgba(0, 0, 0, 0.14);
  font-weight: 400;
  gap: 5px;
}
.hq-pop.is-open .hq-pop-body { display: grid; }
@media (hover: hover) { .hq-pop:hover .hq-pop-body { display: grid; } }
.hq-pop-row { display: flex; justify-content: space-between; gap: 18px; font-size: 13px; }
.hq-pop-row > span { color: var(--muted); }
.hq-pop-row > b { font-weight: 600; }
.hq-head .hq-date a { color: var(--muted); text-decoration: none; }

/* ---- the ideas, pitches and stats pages inside the shell ----
   Their own colour names are scoped to .hq-legacy by lib/mount.php and set to
   HQ's tokens here, through --hq-* aliases taken on the root (a custom property
   cannot read its own name). body.hq outranks the pages' own .hq-legacy rule
   wherever it comes in the cascade. */
:root {
  --hq-bg: var(--bg); --hq-panel: var(--panel); --hq-side: var(--side); --hq-text: var(--text); --hq-muted: var(--muted);
  --hq-line: var(--line); --hq-accent: var(--accent); --hq-accent-ink: var(--accent-ink); --hq-accent-soft: var(--accent-soft);
  --hq-good: var(--good); --hq-good-soft: var(--good-soft); --hq-warn: var(--warn); --hq-warn-soft: var(--warn-soft); --hq-bad: var(--bad);
}
body.hq .hq-legacy {
  --bg: var(--hq-bg); --surface: var(--hq-panel); --surface-2: var(--hq-side); --text: var(--hq-text); --muted: var(--hq-muted);
  --line: var(--hq-line); --accent: var(--hq-accent); --accent-ink: var(--hq-accent-ink); --warn: var(--hq-warn); --warn-bg: var(--hq-warn-soft);
  --pick: var(--hq-good); --pick-bg: var(--hq-good-soft); --score-track: var(--hq-line);
  --card: var(--hq-panel); --fg: var(--hq-text); --mut: var(--hq-muted); --good: var(--hq-good); --bad: var(--hq-bad); --fill: var(--hq-accent-soft);
  background: transparent;
  color: var(--hq-text);
  font-family: inherit;
}
/* What the shell already has: the links between the tools, and the dashboard's own sign-out. */
body.hq .hq-legacy .top-actions,
body.hq .hq-legacy nav.views > a[href="/ideas/pitches"],
body.hq .hq-legacy nav.views > a[href="/ideas/desk"],
body.hq .hq-legacy .top .live .sep,
body.hq .hq-legacy .top .live a[href*="logout"] { display: none; }

/* ---- stats ---- */
:root { --chart: #2a78d6; --chart-fill: rgba(42, 120, 214, 0.12); }
@media (prefers-color-scheme: dark) { :root { --chart: #3987e5; --chart-fill: rgba(57, 135, 229, 0.16); } }
.hq-head-tools { display: flex; gap: 10px; align-items: center; }
.hq-head-tools .views { margin: 0; }
.hq-head-tools .hq-btn .hq-i { width: 14px; height: 14px; }
.hq-stat-hero { padding: 20px 22px 18px; }
.hq-stat-figures { display: flex; flex-wrap: wrap; gap: 12px 36px; align-items: flex-end; margin: 0 0 16px; }
.hq-stat-figures > div { display: grid; gap: 1px; }
.hq-stat-figures b { font-size: 30px; font-weight: 680; letter-spacing: -0.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hq-stat-figures .hq-delta { font-size: 12.5px; }
.hq-stat-figures.is-small { gap: 10px 26px; margin: 4px 0 12px; }
.hq-stat-figures.is-small b { font-size: 22px; }
.hq-stat-legend { margin-left: auto; display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); align-self: center; }
.hq-stat-legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--chart); vertical-align: middle; margin-right: 6px; }
.hq-stat-legend i.is-prev { border-top: 2px dashed var(--muted); opacity: 0.7; }

.hq-chart-wrap { position: relative; height: calc(var(--h) + 1px); touch-action: pan-y; cursor: crosshair; }
.hq-chart-wrap.has-axis { margin-left: 34px; margin-bottom: 22px; }
.hq-chart { display: block; width: 100%; height: 100%; overflow: visible; }
.hq-chart-grid { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hq-chart-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hq-chart-area { fill: var(--chart-fill); stroke: none; }
.hq-chart-line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hq-chart-prev { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: 0.55; vector-effect: non-scaling-stroke; }
.hq-chart-y { position: absolute; left: -34px; width: 28px; text-align: right; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hq-chart-x { position: absolute; left: 0; right: 0; top: calc(100% + 6px); display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.hq-chart-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: 0.5; pointer-events: none; }
.hq-chart-tip { position: absolute; bottom: calc(100% + 6px); z-index: 3; display: grid; gap: 1px; padding: 7px 10px; border-radius: 9px; background: var(--text); color: var(--bg); font-size: 12.5px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.hq-chart-tip b { font-weight: 650; }
.hq-chart-tip span { opacity: 0.7; font-size: 11.5px; }

.hq-stat-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; }
.hq-stat-app { margin: 0; display: grid; align-content: start; }
.hq-stat-app header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hq-stat-app h2 { margin: 0; font-size: 17px; }
.hq-stat-links { display: flex; gap: 12px; font-size: 13px; }
.hq-stat-links a { text-decoration: none; }
.hq-stat-inst { margin: 8px 0 0; }
.hq-stat-lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line-soft); }
.hq-stat-lists > div { min-width: 0; }
.hq-stat-lists h3 { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 6px; }
.hq-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.hq-bars li { min-width: 0; }
.hq-bars a { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 3px 6px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 13px; overflow: hidden; }
.hq-bars a:hover { background: var(--hover); }
.hq-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); border-radius: 6px; z-index: 0; }
.hq-bar-k, .hq-bar-n { position: relative; z-index: 1; }
.hq-bar-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hq-bar-n { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.hq-stat-table td { vertical-align: middle; }
.hq-stat-table td:first-child a { display: block; font-weight: 560; }
.hq-stat-table td:first-child .hq-quiet { display: block; font-size: 12px; }
.hq-stat-table tr.is-quiet td { color: var(--muted); }
.hq-stat-spark, .hq-stat-spark-h { width: 160px; }
.hq-stat-spark .hq-chart-wrap { width: 160px; }
.hq-stat-spark .hq-chart-tip { bottom: auto; top: calc(100% + 4px); }
@media (max-width: 1100px) {
  .hq-stat-apps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hq-stat-lists { grid-template-columns: minmax(0, 1fr); }
  .hq-stat-legend { margin-left: 0; width: 100%; gap: 16px; }
  .hq-stat-figures { gap: 10px 22px; }
  .hq-stat-figures b { font-size: 24px; }
  .hq-stat-spark, .hq-stat-spark-h { display: none; }
}

/* ---- desk: fix with Claude ---- */
.desk-fix { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--panel); }
.desk-fix summary { cursor: pointer; font-weight: 600; }
.desk-fix-job { border-top: 1px solid var(--line-soft); padding: 8px 0; }
.desk-fix-job p { margin: 4px 0; }
.desk-fix-cmd { flex: 1 1 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; padding: 7px 10px; border-radius: 8px; background: var(--bg); overflow-wrap: anywhere; }
.desk-fix-report summary { cursor: pointer; list-style: none; }
.desk-fix-report .desk-text { margin: 8px 0 0; font-size: 13.5px; }

/* ---- shared small parts ---- */

.hq-eyebrow { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; }
.hq-small { font-size: 13px; }
.hq-h2-gap { margin-top: 22px !important; }
.hq-card-link { font-size: 13px; font-weight: 500; margin-left: 8px; }
kbd { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 2px 5px; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel); color: var(--muted); }
.hq-chip { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--side); color: var(--muted); white-space: nowrap; }
.hq-chip.is-feature { background: var(--accent-soft); color: var(--accent); }
.hq-chip.is-kotlin { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
.hq-chip.is-flutter { background: var(--accent-soft); color: var(--accent); }
.hq-chip.is-dead { background: var(--bad-soft); color: var(--bad); }
.hq-chip-btn { font: inherit; font-size: 13px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.hq-chip-btn:hover { border-color: var(--accent); }
.hq-chip-btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.hq-chip-btn[disabled] { opacity: 0.6; cursor: default; }
.hq-chip-btn.is-quiet { background: transparent; color: var(--muted); }
.hq-chip-btn.is-pitch { border-color: var(--good); color: var(--good); }
.hq-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.hq-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.hq-crumbs a { color: var(--muted); text-decoration: none; }
.hq-crumbs a:hover { color: var(--text); }
.hq-crumbs .hq-i { width: 14px; height: 14px; }
.hq-crumbs-end { margin-left: auto; display: flex; gap: 4px; }
.hq-crumbs-end .hq-btn { padding: 6px 10px; font-size: 13px; }
.hq-head-row { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.hq-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.hq-section-head h2 { font-size: 20px; letter-spacing: -0.015em; margin: 2px 0 0; }
.hq-more summary { cursor: pointer; color: var(--muted); font-size: 13.5px; padding: 8px 0 0; }
.hq-progress { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.hq-progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.hq-switches { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hq-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.hq-switch input { position: absolute; opacity: 0; pointer-events: none; }
.hq-switch span { width: 34px; height: 20px; border-radius: 10px; background: var(--line); position: relative; flex: none; transition: background 0.15s; }
.hq-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.hq-switch input:checked + span { background: var(--good); }
.hq-switch input:checked + span::after { transform: translateX(14px); }
.hq-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hq-table-wrap { overflow-x: auto; margin: 0 -2px; }
.hq-tile.is-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-soft); }
.hq-tile.is-warn .hq-tile-s { color: var(--warn); }
.hq-empty-state { text-align: center; padding: 40px 20px; }
.hq-empty-state h1 { font-size: 22px; margin: 0 0 6px; }

/* ---- ideas ---- */

.hq-idea-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); min-width: min(320px, 100%); }
.hq-idea-search:focus-within { border-color: var(--accent); }
.hq-idea-search .hq-i { color: var(--muted); width: 16px; height: 16px; }
.hq-idea-search input { border: 0; outline: 0; background: none; padding: 9px 0; flex: 1; font: inherit; font-size: 14.5px; color: var(--text); }

.hq-idea-status { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.hq-triage-cta {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 14px;
  color: var(--accent-ink);
  text-decoration: none;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
}
.hq-triage-cta .hq-tile-k { color: inherit; opacity: 0.8; }
.hq-triage-cta b { font-size: 40px; line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hq-triage-cta > span:not(.hq-tile-k):not(.hq-btn) { font-size: 13.5px; opacity: 0.88; }
.hq-triage-cta .hq-btn { justify-self: start; margin-top: 10px; background: var(--accent-ink); color: var(--accent); border-color: transparent; padding: 7px 12px; }
.hq-triage-cta .hq-btn .hq-i { width: 15px; height: 15px; }
.hq-triage-cta.is-done { background: var(--good-soft); color: var(--good); }

.hq-idea-latest { margin: 0 0 22px; }
.hq-idea-angle-note { margin: 0 0 14px; max-width: 46rem; color: var(--muted); }
.hq-idea-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
a.hq-tile { cursor: pointer; }
.hq-idea-tile { display: grid; grid-template-rows: auto 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s; }
.hq-idea-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.hq-idea-shot { position: relative; display: grid; place-items: center; height: 150px; background: var(--side); overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.hq-idea-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hq-tile-mono { font-size: 44px; font-weight: 700; color: var(--line); }
.hq-idea-tile-body { display: grid; gap: 6px; padding: 12px 14px 14px; align-content: start; }
.hq-idea-tile-top { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.hq-idea-shot .hq-v { position: absolute; top: 8px; right: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.hq-idea-shot .hq-v.is-none { background: var(--panel); }
.hq-idea-tile b { font-size: 15.5px; line-height: 1.3; letter-spacing: -0.01em; }
.hq-idea-tile-pitch { color: var(--muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.hq-v { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; white-space: nowrap; flex: none; }
.hq-v::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hq-v.is-keep { background: var(--good-soft); color: var(--good); }
.hq-v.is-meh { background: var(--warn-soft); color: var(--warn); }
.hq-v.is-kill { background: var(--bad-soft); color: var(--bad); }
.hq-v.is-built { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
.hq-v.is-none { color: var(--muted); border: 1px dashed var(--line); padding: 1px 7px; }
.hq-v.is-none::before { display: none; }
.hq-idea-list .hq-v { width: 74px; justify-content: center; }
.hq-vdots { gap: 4px; }
.hq-vdots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.hq-vdots i.is-keep { background: var(--good); }
.hq-vdots i.is-meh { background: var(--warn); }
.hq-vdots i.is-kill { background: var(--bad); }
.hq-vdots i.is-built { background: var(--violet); }
.hq-day-date { width: 52px; flex: none; font-variant-numeric: tabular-nums; }

/* one day */
.hq-angle { margin: 0 0 18px; max-width: 50rem; }
.hq-angle h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.025em; margin: 4px 0 8px; font-weight: 680; }
.hq-angle-why { color: var(--muted); margin: 0 0 10px; font-size: 14.5px; }
.hq-angle-note { margin: 0 0 12px; font-size: 16.5px; line-height: 1.55; }
.hq-grade { border-radius: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.hq-grade summary { cursor: pointer; list-style: none; display: block; }
.hq-grade summary::-webkit-details-marker { display: none; }
.hq-grade summary span:last-child { color: var(--muted); }
.hq-grade-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--good); }
.hq-grade.is-thin .hq-grade-dot { background: var(--warn); }
.hq-grade.is-weak .hq-grade-dot { background: var(--bad); }
.hq-grade[open] summary { margin-bottom: 6px; }
.hq-grade .hq-idea-ul { color: var(--muted); font-size: 13.5px; }
.hq-weak { background: var(--warn-soft); color: var(--text); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-size: 14.5px; }
.hq-weak b { color: var(--warn); margin-right: 4px; }
.hq-workings summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.hq-workings h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 16px 0 6px; }

.hq-idea {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "lead side" "body side";
  grid-template-rows: auto 1fr;
  column-gap: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 0 0 18px;
  box-shadow: var(--shadow);
  scroll-margin-top: 20px;
}
.hq-idea:target { border-color: var(--accent); }
.hq-idea-lead { grid-area: lead; }
.hq-idea-body { grid-area: body; }
.hq-idea-side { grid-area: side; align-self: start; display: grid; gap: 14px; position: sticky; top: 20px; }
.hq-idea-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hq-idea-perma { margin-left: auto; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.hq-idea h2 { font-size: 23px; line-height: 1.2; letter-spacing: -0.02em; margin: 10px 0 8px; font-weight: 680; }
.hq-idea-pitch { font-size: 16.5px; line-height: 1.5; margin: 0 0 8px; }
.hq-idea-who { color: var(--muted); margin: 0 0 14px; font-size: 14.5px; }
.hq-idea-facts { margin: 0 0 12px; display: grid; gap: 4px; }
.hq-idea-facts dt { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 10px; }
.hq-idea-facts dd { margin: 0; font-size: 14.5px; line-height: 1.55; }
.hq-idea-more { border-top: 1px solid var(--line-soft); padding: 10px 0 0; margin: 10px 0 0; }
.hq-idea-more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); }
.hq-idea-more.is-followup summary { color: var(--text); }
.hq-idea-more-body h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 16px 0 6px; }
.hq-idea-more-body p { margin: 0 0 8px; font-size: 14.5px; }
.hq-idea-ul { margin: 0; padding-left: 18px; font-size: 14.5px; display: grid; gap: 4px; }
.hq-idea-ul.is-in li::marker { content: "+  "; color: var(--good); font-weight: 700; }
.hq-idea-ul.is-out li::marker { content: "–  "; color: var(--muted); font-weight: 700; }
.hq-comp td { vertical-align: top; }
.hq-comp-note { display: block; color: var(--muted); font-size: 12.5px; max-width: 34rem; margin-top: 2px; }
.hq-asks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line-soft); }
.hq-asks-k { font-size: 12.5px; color: var(--muted); margin-right: 4px; }

.hq-shots { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: thin; }
.hq-shots figure { margin: 0; flex: 0 0 136px; scroll-snap-align: start; }
.hq-shots img { display: block; width: 136px; height: auto; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid var(--line); background: var(--side); }
.hq-shots figcaption { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.hq-noshot { font-size: 13px; }

.hq-verdict { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-soft); }
.hq-verdict-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.hq-verdict-buttons button { font: inherit; font-size: 13.5px; font-weight: 600; padding: 8px 4px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 6px; }
.hq-verdict-buttons button:hover { border-color: var(--accent); }
.hq-verdict-buttons button.on { color: #fff; }
.hq-verdict-buttons button.is-keep.on { background: var(--good); border-color: var(--good); }
.hq-verdict-buttons button.is-meh.on { background: var(--warn); border-color: var(--warn); }
.hq-verdict-buttons button.is-kill.on { background: var(--bad); border-color: var(--bad); }
.hq-verdict-buttons button.is-built.on { background: var(--violet); border-color: var(--violet); }
.hq-verdict-buttons button.on kbd { background: transparent; color: inherit; border-color: rgba(255, 255, 255, 0.5); }
@media (prefers-color-scheme: dark) { .hq-verdict-buttons button.on { color: var(--accent-ink); } }
.hq-reasons { display: flex; flex-wrap: wrap; gap: 5px; }
.hq-reasons:not(:has(button:not([hidden]))) { display: none; }
.hq-reasons .hq-chip-btn { font-size: 12.5px; padding: 4px 10px; }
.hq-triage .hq-reasons .hq-chip-btn[data-n]:not([data-n=""])::before { content: attr(data-n); font: 600 10.5px ui-monospace, Menlo, monospace; color: var(--muted); margin-right: 6px; }
.hq-verdict-note { font-size: 13.5px !important; padding: 7px 10px !important; width: 100%; }
.hq-verdict-status { margin: 0; font-size: 12.5px; color: var(--muted); min-height: 0; }
.hq-verdict-status:empty { display: none; }
.hq-verdict-status.is-error { color: var(--bad); }
.hq-idea-scorehead { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.hq-ring { position: relative; width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.hq-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.hq-ring circle { fill: none; stroke-width: 3.5; }
.hq-ring-track { stroke: var(--line); }
.hq-ring-fill { stroke: var(--accent); stroke-linecap: round; }
.hq-ring.is-high .hq-ring-fill { stroke: var(--good); }
.hq-ring.is-low .hq-ring-fill { stroke: var(--warn); }
.hq-ring b { font-size: 14px; font-variant-numeric: tabular-nums; }
.hq-scores { display: grid; gap: 6px; }
.hq-score { display: grid; grid-template-columns: 1fr auto 14px; align-items: center; gap: 10px; font-size: 13px; }
.hq-score > span:first-child { color: var(--muted); }
.hq-score-bar { display: inline-flex; gap: 2px; }
.hq-score-bar i { width: 14px; height: 6px; border-radius: 2px; background: var(--line); }
.hq-score-bar i.on { background: var(--accent); }
.hq-score.is-low .hq-score-bar i.on { background: var(--warn); }
.hq-score b { font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }

.hq-roll .hq-row { margin-top: 10px; }
.hq-roll select { flex: 0 1 260px; }
.hq-roll-status { margin: 10px 0 0; font-size: 13.5px; }
.hq-roll-status.is-error { color: var(--bad); }

/* judging, one at a time */
.hq-triage-bar { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; font-size: 14px; flex-wrap: wrap; }
.hq-triage-bar .hq-progress { min-width: 120px; }
.hq-triage-keys { color: var(--muted); font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.hq-triage-keys kbd { margin-left: 6px; }
.hq-triage-angle { margin: 0 0 10px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.hq-triage-angle .hq-eyebrow { display: inline; }
.hq-triage-foot { display: flex; justify-content: space-between; gap: 10px; }
.hq-triage-foot [data-next] { margin-left: auto; }
.hq-idea.is-focus { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.hq-idea[data-judged="keep"] { border-color: var(--good); }
.hq-idea[data-judged="kill"] { border-color: var(--bad); }
.hq-idea[data-judged="meh"] { border-color: var(--warn); }
.hq-idea[data-judged="built"] { border-color: var(--violet); }

@media (max-width: 1100px) {
  .hq-idea-status { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hq-triage-cta { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hq-idea-status { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hq-idea-status .hq-tile:last-child { grid-column: 1 / -1; }
  .hq-idea { grid-template-columns: minmax(0, 1fr); grid-template-areas: "lead" "side" "body"; grid-template-rows: none; padding: 18px 16px; border-radius: 14px; }
  .hq-verdict-buttons kbd { display: none; }
  .hq-triage-foot { position: sticky; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 4; padding: 8px 0; }
  .hq-triage-foot .hq-btn { box-shadow: var(--shadow); }
  .hq-idea-side { position: static; margin: 4px 0 6px; }
  .hq-idea h2 { font-size: 21px; }
  .hq-angle h1 { font-size: 24px; }
  .hq-idea-tiles { grid-template-columns: minmax(0, 1fr); }
  .hq-idea-tile { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: none; }
  .hq-idea-shot { height: auto; min-height: 120px; border-bottom: 0; border-right: 1px solid var(--line-soft); }
  .hq-triage-keys { display: none; }
  .hq-crumbs-end { margin-left: 0; width: 100%; justify-content: space-between; }
  .hq-head-row .hq-idea-search { width: 100%; }
}

/* ---- pitches ---- */

.hq-btn.is-danger { border-color: var(--bad); color: var(--bad); }
.hq-btn .hq-i { width: 16px; height: 16px; }
.hq-pitch-start { display: grid; gap: 10px; }
.hq-pitch-start h2 { margin: 0; }
.hq-pitch-start textarea { width: 100%; resize: vertical; }
.hq-pitch-start .hq-row { margin: 0; align-items: center; }
.hq-pitch-start .hq-row .hq-quiet { flex: 1 1 260px; }

.hq-pc { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px; border-radius: 13px; background: var(--panel); border: 1px solid var(--line); color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s; }
.hq-pc:hover { border-color: var(--accent); transform: translateY(-1px); }
.hq-pc-shot { display: grid; place-items: center; width: 64px; height: 112px; border-radius: 9px; overflow: hidden; background: var(--side); border: 1px solid var(--line-soft); }
.hq-pc-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hq-pc-shot.is-blank { font-size: 26px; font-weight: 700; color: var(--line); }
.hq-pc-body { display: grid; gap: 3px; align-content: start; min-width: 0; }
.hq-pc-body b { font-size: 14.5px; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.hq-pc-stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--muted); }
.hq-pc-stage i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.hq-pc-stage.is-mine, .hq-pc.is-mine .hq-pc-stage { color: var(--warn); }
.hq-pc.is-failed .hq-pc-stage, .hq-pc-stage.is-failed { color: var(--bad); }
.hq-pc.is-talking .hq-pc-stage, .hq-pc-stage.is-talking { color: var(--good); }
.hq-pc.is-yours .hq-pc-stage, .hq-pc-stage.is-yours { color: var(--good); }
.hq-pc.is-building .hq-pc-stage, .hq-pc-stage.is-building { color: var(--accent); }
.hq-pc-why { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.hq-pc-foot { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.hq-pc-foot .hq-when { margin-right: 4px; }
.hq-pc .hq-progress { margin-top: 4px; }

.hq-pitch-needs { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 16px; font-size: 14.5px; }
.hq-pitch-needs b { color: var(--warn); }
.hq-board .hq-pc { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 9px; }
.hq-board .hq-pc-shot { width: 44px; height: 78px; border-radius: 7px; }
.hq-pc-body b { hyphens: auto; }
.hq-board .hq-pc-body b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
.hq-pc.is-mine { border-left: 3px solid var(--warn); }
.hq-board.is-mine-only .hq-pc:not(.is-mine) { display: none; }
.hq-board { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 14px; align-items: start; margin: 0 0 16px; }
.hq-board-col { background: var(--side); border: 1px solid var(--line-soft); border-radius: 15px; padding: 12px 10px 10px; }
.hq-board-col h2 { font-size: 13.5px; font-weight: 650; margin: 0 4px 10px; display: flex; justify-content: space-between; }
.hq-board-cards { display: grid; gap: 8px; }
.hq-board-cards.is-row { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 12px; }
.hq-board-empty { margin: 4px; }
.hq-pitch-archived summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.hq-pitch-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.hq-pitch-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; margin: 0 0 18px; }
.hq-pitch-hero h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.025em; margin: 6px 0 6px; font-weight: 680; }
.hq-pitch-why { font-size: 16px; margin: 0 0 4px; }
.hq-pitch-open { margin-top: 16px; }
.hq-pitch-open .hq-quiet { font-weight: 500; font-size: 12.5px; }
.hq-pitch-pw { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 0; font-size: 14px; }
.hq-pitch-phones { display: flex; align-items: flex-end; }
.hq-pitch-phones img { width: 110px; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); background: var(--side); }
.hq-pitch-phones img + img { margin-left: -38px; }
.hq-pitch-phones img:nth-child(1) { transform: rotate(-5deg) translateY(6px); }
.hq-pitch-phones img:nth-child(2) { position: relative; z-index: 1; width: 124px; }
.hq-pitch-phones img:nth-child(3) { transform: rotate(5deg) translateY(6px); }
.hq-steps { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hq-steps li { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--side); color: var(--muted); }
.hq-steps li.is-done { background: var(--good-soft); color: var(--good); }
.hq-steps li.is-now { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.hq-pitch-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.hq-pitch-side { position: sticky; top: 20px; }
.hq-pitch-side .hq-card { margin: 0 0 16px; }
.hq-pitch-side .pitch-mail-head { grid-template-columns: 1fr; gap: 2px; font-size: 13.5px; }
.hq-pitch-side .pitch-mail-head dt { margin-top: 8px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.hq-pitch-side .pitch-mail-head dd .hq-quiet { display: block; }
.hq-pitch-manage form { margin: 0 0 14px; display: grid; gap: 4px; }
.hq-pitch-manage .hq-row { margin: 0; flex-wrap: nowrap; min-width: 0; }
.hq-pitch-manage .hq-row input { min-width: 0; width: 0; flex: 1 1 0; }
.hq-danger summary { cursor: pointer; color: var(--bad); font-size: 13.5px; }
.hq-thread { list-style: none; margin: 8px 0 10px; padding: 0 0 0 4px; display: grid; }
.hq-thread li { position: relative; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 6px 0 6px 22px; font-size: 14px; }
.hq-thread li::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.hq-thread li:first-child::before { top: 14px; }
.hq-thread li:last-child::before { bottom: calc(100% - 14px); }
.hq-thread-dot { position: absolute; left: 0; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.hq-thread li.is-in .hq-thread-dot { border-color: var(--good); background: var(--good); }
.hq-thread li.is-auto-reply { color: var(--muted); }
.hq-thread li.is-auto-reply .hq-thread-dot { border-color: var(--line); background: var(--panel); }
.hq-thread-what { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.hq-feedback { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hq-feedback li { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.hq-feedback p { margin: 0 0 4px; }
.hq-md { font-size: 14.5px; line-height: 1.6; }
.hq-md h1, .hq-md h2:not(:first-child), .hq-md h3 { font-size: 15px; margin: 18px 0 6px; }
.hq-md p { margin: 0 0 10px; }
.hq-md ul, .hq-md ol { padding-left: 20px; margin: 0 0 10px; }
.hq-md table { border-collapse: collapse; font-size: 13.5px; margin: 0 0 10px; display: block; overflow-x: auto; }
.hq-md th, .hq-md td { border-bottom: 1px solid var(--line-soft); padding: 5px 8px; text-align: left; }
.hq-md pre { background: var(--bg); padding: 10px 12px; border-radius: 9px; overflow-x: auto; font-size: 13px; }
.hq-pitch-doc summary { cursor: pointer; font-weight: 650; font-size: 15px; }
.hq-pitch-doc[open] summary { margin-bottom: 10px; }
.hq-pitch-mail h2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hq-pitch-mail h2 .hq-chip-btn { margin-left: auto; }
.hq-pitch-mail pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14.5px; line-height: 1.6; margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-soft); }
.hq-pitch-mail .chip { font: inherit; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; margin-left: 4px; }
.hq-pitch-poster { display: block; margin: 0 0 12px; }
.hq-pitch-poster img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.hq-pitch-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.hq-pitch-shots img { width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; border-radius: 12px; border: 1px solid var(--line); display: block; background: var(--side); }

.hq-lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(8, 9, 11, 0.9); padding: 40px 60px; }
.hq-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 14px; }
.hq-lb-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ccc; font-size: 13px; margin: 0; }
.hq-lb-close, .hq-lb-step { position: absolute; background: rgba(255, 255, 255, 0.1); border: 0; color: #fff; font-size: 28px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.hq-lb-close { top: 14px; right: 14px; }
.hq-lb-step.is-prev { left: 12px; top: 50%; }
.hq-lb-step.is-next { right: 12px; top: 50%; }

@media (max-width: 1100px) {
  .hq-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hq-pitch-cols { grid-template-columns: minmax(0, 1fr); }
  .hq-pitch-side { position: static; }
}
@media (max-width: 860px) {
  .hq-board { grid-template-columns: minmax(0, 1fr); }
  .hq-head-tools { flex-wrap: wrap; width: 100%; }
  .hq-head-tools .hq-idea-search { flex: 1 1 auto; min-width: 0; }
  .hq-pitch-hero { grid-template-columns: minmax(0, 1fr); }
  .hq-pitch-phones { display: none; }
  .hq-pitch-hero h1 { font-size: 24px; }
  .hq-lightbox { padding: 50px 10px; }
}

/* ---- apps: where each is to be had, and its own tabs ---- */

.hq-app-where { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.hq-app-where a { color: var(--accent); text-decoration: none; }
.hq-app-where a:hover { text-decoration: underline; }
.hq-app-line { max-width: 46rem; margin: 6px 0 0; font-size: 14px; }
.hq-app-tabs { margin: 16px 0 0; }
.hq-app-head { margin-bottom: 18px; }
.hq-app-card h2 { display: flex; align-items: center; gap: 8px; }
.hq-app-card h2 .hq-count { margin-left: 0; }
.hq-app-card .hq-app-where { margin: -4px 0 10px; font-size: 12.5px; }
.hq-app-tools { margin: 10px 0 0; font-size: 12.5px; color: var(--accent); }

/* ---- a pitch's conversation and the next mail ---- */

.hq-pm-thread { display: grid; gap: 6px; margin: 0 0 14px; }
.hq-pm-mail { border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 12px; background: var(--bg); }
.hq-pm-mail.is-out { border-left: 3px solid var(--accent); }
.hq-pm-mail.is-auto { opacity: 0.6; }
.hq-pm-mail summary { cursor: pointer; font-size: 14px; }
.hq-pm-mail > p { margin: 6px 0 4px; }
.hq-pm-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14px; line-height: 1.55; margin: 0; max-height: 50vh; overflow: auto; }
.hq-pm-compose { border-top: 1px solid var(--line-soft); padding-top: 14px; display: grid; gap: 10px; }
.hq-pm-kinds { margin: 0; }
.hq-pm-kinds a[hidden] { display: none; }
.hq-pm-fields { display: grid; gap: 6px; }
.hq-pm-fields label { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; font-size: 13px; color: var(--muted); }
.hq-pm-fields input { font-size: 14px !important; padding: 7px 10px !important; }
.hq-pm-compose textarea { width: 100%; resize: vertical; line-height: 1.55; }
.hq-pm-tools { margin: 0; align-items: center; }
.hq-pm-tools input { flex: 1 1 240px; }
.hq-pm-status { margin: 0; min-height: 1em; }
.hq-pitch-opened { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 4px; font-size: 14px; color: var(--good); }
.hq-pitch-opened .hq-btn { min-height: 0; padding: 3px 10px; font-size: 13px; }
.hq-pitch-opened .hq-i { width: 15px; height: 15px; }

/* Invoices: drop zones for what the mail did not hold */
.hq-src.is-invoices { color: var(--accent); }
.hq-inv-card { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.hq-inv-card:hover { background: var(--hover); }
.hq-inv-card > .hq-i { width: 22px; height: 22px; color: var(--accent); flex: none; }
.hq-inv-summary { margin: 0 0 16px; color: var(--muted); }
.hq-inv-said { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text); }
.hq-drops { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hq-drop { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px; border: 1.5px dashed var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.hq-drop:hover, .hq-drop:focus-visible { border-color: var(--accent-2); outline: none; }
.hq-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.hq-drop.is-busy { opacity: .6; pointer-events: none; }
.hq-drop-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hq-drop-title .hq-i { width: 16px; height: 16px; transform: rotate(90deg); color: var(--accent); }
.hq-drop-text { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.hq-drop-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.hq-drop-tools .hq-btn, .hq-inv-actions .hq-btn { min-height: 0; padding: 4px 10px; font-size: 13px; }
.hq-drop-vendor { width: 100%; min-width: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.hq-inv-actions { flex-wrap: wrap; justify-content: flex-end; }
.hq-li-row a.hq-li-body { color: inherit; text-decoration: none; }
.hq-li-row a.hq-li-body:hover .hq-li-title { text-decoration: underline; }
@media (max-width: 640px) {
  .hq-list .hq-li-row:has(.hq-inv-actions) { flex-wrap: wrap; }
  .hq-inv-actions { width: 100%; justify-content: flex-start; }
}
.hq-inv-skipped { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 16px; }
.hq-inv-skipped .hq-btn { min-height: 0; padding: 3px 10px; font-size: 13px; }
.hq-pitch-insights-lead { margin: 0 0 12px; }
.hq-pitch-insights th[scope=row] { text-align: left; font-weight: 560; }

/* Android vitals on an app's page */
.hq-vitals-rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 16px; }
.hq-vitals-rate { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; min-width: 0; }
.hq-vitals-rate b { font-size: 22px; font-weight: 650; }
.hq-vitals-rate.is-bad { border-color: var(--bad); }
.hq-vitals-rate.is-bad b { color: var(--bad); }
.hq-vitals-vers { display: grid; gap: 6px; margin: 0 0 16px; }
.hq-vitals-ver { display: grid; grid-template-columns: minmax(70px, auto) 1fr auto; align-items: center; gap: 10px; font-size: 13.5px; }
.hq-vitals-k { font-variant-numeric: tabular-nums; color: var(--muted); }
.hq-vitals-n { font-variant-numeric: tabular-nums; }
.hq-vitals-track { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.hq-vitals-track span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.hq-vitals-cause { font-family: ui-monospace, Menlo, monospace; font-size: 13px; font-weight: 500; }
.hq-pill.is-bad { background: var(--bad-soft, var(--warn-soft)); color: var(--bad); }
.hq-pill.is-warn { background: var(--warn-soft); color: var(--warn); }
.hq-vitals .hq-list .hq-pill { flex: none; width: 50px; text-align: center; }
.hq-vitals h3.hq-h, .hq-play h3.hq-h { font-size: 14px; font-weight: 600; color: var(--muted); margin: 4px 0 8px; }
.hq-vitals-rate.is-warn { border-color: var(--warn); }
.hq-vitals-rate.is-warn b { color: var(--warn); }

/* What Play's monthly reports say, on an app's page */
.hq-play .hq-chart-wrap { margin-bottom: 30px; }
.hq-play-cols { margin: 0 0 8px; }
.hq-play > .hq-table td:first-child { white-space: nowrap; }
.hq-play-cols .hq-table { margin: 0 0 12px; }
.hq-play-cols td:not(:first-child), .hq-play-cols th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.hq-play-cancels { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.hq-play-cancels li { display: grid; gap: 2px; padding: 0 0 10px; border-bottom: 1px solid var(--line-soft); }
.hq-play-cancels li:last-child { border-bottom: 0; padding-bottom: 0; }
.hq-play-said { overflow-wrap: anywhere; }
.hq-play > .hq-table, .hq-play-products, .hq-play-countries { margin: 0 0 18px; }
.hq-play-countries td:not(:first-child), .hq-play-countries th:not(:first-child),
.hq-play-products td:not(:first-child), .hq-play-products th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.hq-play .hq-vitals-n .hq-quiet { font-size: 12px; }
.hq-play-legacy { margin: 0 0 10px; }
.hq-gh-path { word-break: break-all; font-size: 13px; }
.hq-gh-paths { table-layout: fixed; }
.hq-pkg { display: block; word-break: break-all; }
.hq-gh-paths th:last-child { width: 72px; }
.hq-play-cols > div { min-width: 0; }
.hq-admob-form { display: grid; gap: 8px; max-width: 520px; margin: 0 0 12px; }
#admob code { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .hq-play-countries th:nth-child(3), .hq-play-countries td:nth-child(3) { display: none; }
  .hq-play-countries { font-size: 13px; }
}
.hq-src.is-vitals { color: var(--warn); }
.hq-src.is-down { color: var(--bad); }
