/* Trade Assistant chat page. Colours are tokens; dark mode follows the computer's setting. */
:root {
  --bg: #ffffff;
  --sidebar: #f6f7f7;
  --text: #1d2125;
  --muted: #69717a;
  --border: #e3e6e8;
  --hover: #eceff0;
  --active: #e2e7e6;
  --bubble: #f0f2f3;
  --accent: #0f6e56;
  --accent-text: #ffffff;
  --error: #b42318;
  --error-bg: #fdecea;
  --warn: #7a4d00;
  --warn-bg: #fff6dc;
  --code: #f4f6f7;
  --focus: #2f7fd8;
  --shadow: 0 2px 10px rgb(0 0 0 / 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1f21;
    --sidebar: #161819;
    --text: #e9ecee;
    --muted: #9aa2a9;
    --border: #2f3336;
    --hover: #26292b;
    --active: #2d3234;
    --bubble: #2a2d30;
    --accent: #3fb592;
    --accent-text: #0d1f19;
    --error: #f97066;
    --error-bg: #3a1a18;
    --warn: #f2c35b;
    --warn-bg: #362a0c;
    --code: #232628;
    --focus: #6aa8ee;
    --shadow: 0 2px 10px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round; }

/* ---- Layout ---- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: 100dvh; }

.sidebar {
  display: flex; flex-direction: column; gap: 4px; min-height: 0;
  padding: 10px; background: var(--sidebar); border-right: 1px solid var(--border);
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand-mark { width: 22px; height: 22px; color: var(--accent); }

.new-chat {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
  font-weight: 500; text-align: left;
}
.new-chat:hover { background: var(--hover); }

.history { flex: 1; min-height: 0; overflow-y: auto; margin: 8px -4px 0; padding: 0 4px; }
.history-group { margin: 14px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-row { position: relative; border-radius: 8px; }
.history-row:hover { background: var(--hover); }
.history-row.active { background: var(--active); }
.history-item {
  display: block; padding: 7px 36px 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px;
}
/* The "⋯" button: shown on hover, on the open chat, while its menu is open, and always on touch screens. */
.history-more {
  position: absolute; top: 50%; right: 4px; translate: 0 -50%; width: 28px; height: 28px;
  display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; opacity: 0;
}
.history-more:hover { background: var(--active); }
.history-row:hover .history-more, .history-row.active .history-more, .history-more:focus-visible,
.history-more[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .history-more { opacity: 1; } }
.history-rename {
  width: 100%; padding: 6px 9px; border: 1px solid var(--focus); border-radius: 8px; background: var(--bg);
  font-size: 14px;
}
.chat-menu {
  position: fixed; z-index: 30; min-width: 150px; padding: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.menu-danger { color: var(--error); }
.history-empty { margin: 14px 10px; font-size: 13px; color: var(--muted); }

/* ---- Account (bottom left) ---- */
.account { position: relative; padding-top: 8px; border-top: 1px solid var(--border); }
.account-btn, .signin-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; border: 0; border-radius: 10px; background: transparent; text-align: left;
}
.account-btn:hover { background: var(--hover); }
.signin-btn { justify-content: center; background: var(--accent); color: var(--accent-text); font-weight: 600; }
.signin-btn:hover { filter: brightness(1.08); }
.avatar {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: 13px;
}
.account-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.account-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); padding: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left;
}
.menu-item:hover { background: var(--hover); }

/* Usage pop-up (account menu > Usage): one line per limit, label and reset time | bar | % used. */
.dialog.dialog-wide { width: min(720px, calc(100vw - 32px)); padding: 24px 28px; }  /* beats .dialog's 380px */
.usage-top { display: flex; align-items: baseline; gap: 10px; }
.usage-top h2 { margin: 0; font-size: 18px; }
.usage-plan { color: var(--muted); font-size: 14px; }
.usage-close { margin-left: auto; align-self: center; }
.usage-headline { margin: 14px 0 6px; padding-bottom: 16px; border-bottom: 1px solid var(--border); font-size: 21px;
                  font-weight: 600; line-height: 1.3; }
.usage-group { margin: 18px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase;
               letter-spacing: 0.04em; }
.usage-line { display: grid; grid-template-columns: minmax(150px, 210px) minmax(100px, 1fr) 110px; align-items: center;
              gap: 20px; padding: 12px 0; }
.usage-label, .usage-amount { display: grid; gap: 2px; }
.usage-name { font-weight: 500; }
.usage-reset, .usage-count { font-size: 13px; color: var(--muted); }
.usage-amount { text-align: right; }
.usage-percent { font-variant-numeric: tabular-nums; }
.usage-count { font-variant-numeric: tabular-nums; }
.usage-track { height: 7px; border-radius: 4px; background: var(--active); overflow: hidden; }
.usage-fill { height: 100%; border-radius: 4px; background: var(--accent); }
.usage-fill.high { background: var(--warn); }
.usage-fill.full { background: var(--error); }
.usage-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
/* Admin page (account menu > Admin): accounts table, links, plans. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dialog.dialog-admin { width: min(980px, calc(100vw - 32px)); padding: 24px 28px; }
.admin-tabs { display: flex; gap: 4px; margin-left: 12px; align-self: center; }
.admin-tabs [role="tab"] { padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
                           font-weight: 500; }
.admin-tabs [role="tab"]:hover { background: var(--hover); }
.admin-tabs [role="tab"][aria-selected="true"] { background: var(--active); color: var(--text); }
.admin-invite { margin: 18px 0 6px; }
.dialog .admin-invite label { margin-bottom: 6px; }
.admin-row { display: flex; gap: 8px; }
.admin-row input { flex: 1; min-width: 0; }
.admin-result { margin: 10px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--bubble); }
.admin-result p { margin: 0 0 8px; font-size: 14px; }
.admin-notice { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; color: var(--accent); }
.admin-scroll { max-height: 46vh; }
.admin-scroll td { vertical-align: middle; }
.admin-email { overflow-wrap: anywhere; }
.admin-badge { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--active); color: var(--muted);
               font-size: 11px; font-weight: 600; }
.admin-select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
                font: inherit; color: inherit; }
.admin-off { color: var(--error); }
.admin-muted { color: var(--muted); font-size: 13px; }
.admin-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.admin-scroll td.admin-num { white-space: nowrap; }
.admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.admin-btn { padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-size: 13px; }
.admin-btn:hover { background: var(--hover); }
.admin-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.admin-danger { color: var(--error); }
.admin-links { margin: 4px 0 0; padding: 0; list-style: none; }
.admin-links li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border);
                  font-size: 14px; }
.admin-links li .admin-btn { margin-left: auto; }
.admin-plan { padding: 16px 0; border-bottom: 1px solid var(--border); }
.admin-plan h3 { margin: 0; font-size: 16px; }
.admin-plan > p { margin: 4px 0 12px; }
.admin-plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; }
.admin-plan-status { min-height: 1.4em; margin: 0 0 8px; font-size: 14px; color: var(--accent); }
.admin-plan-status.is-error { color: var(--error); }

@media (max-width: 560px) {
  .admin-row { flex-direction: column; }
  .admin-tabs { margin-left: 4px; }
  .usage-line { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .usage-line .usage-track { grid-column: 1 / -1; grid-row: 2; }
  .usage-headline { font-size: 18px; }
}

/* ---- Conversation ---- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; }
.chat-title { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-btn {
  display: flex; align-items: center; gap: 6px; flex: none; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 500;
}
.topbar-btn svg { width: 16px; height: 16px; }
.topbar-btn:hover { background: var(--hover); }
.topbar-btn[aria-expanded="true"] { background: var(--active); }

.messages { flex: 1; min-height: 0; overflow-y: auto; }
.thread { display: flex; flex-direction: column; gap: 20px; max-width: 760px; margin: 0 auto; padding: 12px 16px 24px; }
.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.bubble { min-width: 0; overflow-wrap: anywhere; }
.msg-assistant .bubble { width: 100%; }
.msg-user .bubble { max-width: 80%; padding: 10px 14px; border-radius: 18px; background: var(--bubble); white-space: pre-wrap; }
.msg-error .bubble { color: var(--error); white-space: pre-wrap; }
.answer-text { margin: 0 0 10px; white-space: pre-wrap; }
.failed .answer-text { color: var(--error); }

.pending { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--muted); font-size: 14px; }
.dots { display: flex; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pulse 1.2s infinite ease-in-out; }
.dot:nth-child(2) { animation-delay: 0.15s; }
.dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.empty { max-width: 640px; margin: 14vh auto 0; padding: 0 16px; text-align: center; }
.empty h2 { margin: 0 0 8px; font-size: 26px; font-weight: 600; }
.empty p { margin: 0 0 20px; color: var(--muted); }
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.suggestion {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
  font-size: 14px; color: var(--text);
}
.suggestion:hover { background: var(--hover); }

/* ---- Results table and SQL ---- */
.result { margin: 0 0 10px; }
.table-scroll { max-height: 440px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-scroll th, .table-scroll td { padding: 7px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.table-scroll th { position: sticky; top: 0; background: var(--sidebar); font-weight: 600; }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
.table-scroll tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--sidebar) 60%, transparent); }
.table-scroll .num { text-align: right; font-variant-numeric: tabular-nums; }
/* Long text (product descriptions) wraps instead of making the table very wide. */
.table-scroll td:not(.num) { white-space: normal; min-width: 8ch; max-width: 48ch; }
.result-meta { margin: 6px 2px 0; font-size: 12px; color: var(--muted); }
.result-warn, .result-error, .result-note { margin: 6px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.result-warn { background: var(--warn-bg); color: var(--warn); }
.result-error { background: var(--error-bg); color: var(--error); }
.result-note { border: 1px solid var(--border); color: var(--muted); }

.download { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -2px 0 10px; }
.download-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); font-size: 13px; font-weight: 500;
}
.download-btn:hover { background: var(--hover); }
.download-btn:disabled { color: var(--muted); }
.download-note { font-size: 12.5px; color: var(--muted); }

.sql { position: relative; margin: 0; }
.sql summary { width: fit-content; padding: 2px 0; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.sql pre {
  margin: 6px 0 0; padding: 12px; overflow: auto; background: var(--code); border: 1px solid var(--border);
  border-radius: 10px; font: 12.5px/1.5 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: pre-wrap;
}
.copy-btn {
  position: absolute; top: 0; right: 0; padding: 1px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); font-size: 12px; color: var(--muted);
}
.copy-btn:hover { background: var(--hover); color: var(--text); }
.sql:not([open]) .copy-btn { display: none; }

/* ---- Question box ---- */
.composer { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px 10px; }
.composer-box {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow);
}
.composer-box:focus-within { border-color: var(--muted); }
.composer textarea {
  flex: 1; min-height: 24px; max-height: 200px; padding: 6px 0; border: 0; outline: none;
  background: transparent; resize: none; line-height: 1.5;
}
.composer textarea:disabled { cursor: not-allowed; }
.send {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 0; border-radius: 50%; background: var(--text); color: var(--bg);
}
.send:disabled { opacity: 0.3; }
.hint { margin: 6px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* ---- Buttons and the sign-in dialog ---- */
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; }
.icon-btn:hover { background: var(--hover); }
.primary, .secondary, .danger { padding: 9px 16px; border-radius: 10px; font-weight: 600; }
.danger { border: 0; background: var(--error); color: var(--bg); }  /* white on dark red; dark on light red */
.danger:hover { filter: brightness(1.08); }
.danger:disabled { opacity: 0.45; cursor: not-allowed; }
.primary { border: 0; background: var(--accent); color: var(--accent-text); }
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: 0.45; cursor: not-allowed; }
.secondary { border: 1px solid var(--border); background: var(--bg); }
.secondary:hover { background: var(--hover); }

.dialog {
  width: min(380px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow);
}
.dialog::backdrop { background: rgb(0 0 0 / 0.4); }
.dialog h2 { margin: 0 0 16px; font-size: 20px; }
.dialog label { display: grid; gap: 6px; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.dialog input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.dialog input[readonly] { background: var(--hover); color: var(--muted); }
.dialog-text { margin: 0 0 12px; font-size: 14px; overflow-wrap: anywhere; }
.form-error { min-height: 1.4em; margin: 0 0 12px; font-size: 14px; color: var(--error); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---- Data coverage panel (slides over the right side; the chat stays usable) ---- */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; display: flex; flex-direction: column;
  width: min(480px, 100vw); background: var(--bg); border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgb(0 0 0 / 0.08);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 20px; }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-intro { margin: 0 20px 10px; font-size: 13px; color: var(--muted); }
.coverage-tools { display: grid; gap: 8px; padding: 0 20px 10px; }
.coverage-tools input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.coverage-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); font-size: 13px; }
.filter-btn:hover { background: var(--hover); }
.filter-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.coverage-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px; outline: none; }
.coverage-count { margin: 4px 0; font-size: 12px; color: var(--muted); }
.coverage-status { padding: 16px 0; color: var(--muted); }
.coverage-status p { margin: 0 0 10px; }
.coverage-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.coverage-table th {
  position: sticky; top: 0; padding: 6px 10px 6px 0; background: var(--bg); border-bottom: 1px solid var(--border);
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
}
.coverage-table td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.code {
  display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid var(--border); border-radius: 4px;
  font: 11px/1.5 ui-monospace, Consolas, monospace; color: var(--muted);
}
.also { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.months { white-space: nowrap; }
.months.ended { color: var(--warn); }
.panel-notes { padding: 10px 20px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.panel-notes p { margin: 0 0 6px; }
.panel-notes p:last-child { margin: 0; }

/* ---- Query builder panel ---- */
.panel-wide { width: min(560px, 100vw); }
.builder { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.builder-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px 8px; }
.field { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.field legend, .field > summary { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.field > summary { cursor: pointer; color: var(--muted); }
.field-hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.text-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.text-input:focus { outline: 2px solid var(--focus); outline-offset: 0; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 6px 12px; font-size: 13px; border-right: 1px solid var(--border); }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--text); color: var(--bg); }
.segmented input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }

.checks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
/* An explanation after a tick box's label: small grey text, like the panels' notes (user, 2026-10-16). */
.check-hint { font-size: 11.5px; color: var(--muted); }
.checks input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.inline-select { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; }
.inline-select select, .checks select {
  padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-size: 14px;
}
.period-inputs { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; }
.period-inputs label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.period-inputs .text-input { width: auto; padding: 5px 8px; }

.picker { position: relative; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:not(:empty) { margin-bottom: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px;
  background: var(--active); font-size: 13px;
}
.chip-remove { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; line-height: 1; }
.chip-remove:hover { background: var(--hover); }
.picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; max-height: 260px; overflow-y: auto;
  margin: 0; padding: 4px; list-style: none; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow);
}
.picker-option { padding: 7px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.picker-option.active, .picker-option:hover { background: var(--hover); }

.builder-foot { padding: 12px 20px 14px; border-top: 1px solid var(--border); background: var(--bg); }
/* The selections in words: small grey text, like the Coverage panel's notes (user, 2026-10-16). */
.builder-description { margin: 0 0 8px; font-size: 11.5px; color: var(--muted); }
.builder-problem { margin: 0 0 10px; font-size: 12.5px; color: var(--warn); }
.builder-problem:empty { display: none; }
.builder-problem.is-error { color: var(--error); }
.builder-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* ---- Phones: the sidebar slides in over the page ---- */
.mobile-only { display: none; }
.scrim { position: fixed; inset: 0; z-index: 10; background: rgb(0 0 0 / 0.4); }

@media (max-width: 767px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .mobile-only { display: grid; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 20; width: min(300px, 85vw);
    transform: translateX(-100%); transition: transform 0.2s ease;
  }
  .app.sidebar-open .sidebar { transform: none; }
  .topbar { padding: 0 8px; }
  .months { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
  .dot { animation: none; opacity: 0.6; }
}

/* The app's own note under an answer that uses mirror figures. */
.mirror-note { margin: 0 0 10px; padding: 9px 12px; border-left: 3px solid var(--accent); border-radius: 8px;
               background: var(--bubble); font-size: 14px; line-height: 1.5; }
