/* Post Pilot design system.
   1. Tokens (colours, type, spacing) for light and dark
   2. Base and layout (top bar + page)
   3. Components (buttons, inputs, cards, status, tables, lists)
   4. Pages (agent grid, content, logs, login) */

/* ---------- 1. Tokens ---------- */
/* Post Pilot, Ember: one hot red-orange on black and white, and nothing else coloured, so anything
   coloured is a thing to do. Published and done are quiet grey; waiting, warnings and failures are ember.
   The menu column stays dark in both themes. No yellow, no beige, no off-white: the only white that is not
   pure is ice white #F2F7FF, which leans cold so the one warm colour stays loud. */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-display: optional;
  src: url("fonts/open-sans.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 300 600; font-display: optional;
  src: url("fonts/oswald.woff2") format("woff2"); }
:root {
  /* Light is a ladder of cool greys, not one flat white: the page sits a step below its cards, so a
     card is the white thing and the page is not. Cool, never cream, so the one warm colour stays loud. */
  --bg: #ECEFF4;
  --sidebar: #0E0F11;
  --surface: #FFFFFF;
  --surface-2: #E3E8EF;
  --hover: #DBE1EA;
  --border: #D3D9E2;
  --border-strong: #AFB7C4;
  --text: #0D0E10;
  --text-2: #3B4049;
  --muted: #5B6068;
  --accent: #CC270F;
  --accent-text: #FFFFFF;
  --accent-soft: #FADDD6;
  --primary: #CC270F;
  --primary-text: #FFFFFF;
  --ink: #0E0F11;
  --ink-2: #1B1E23;
  --ink-text: #F2F7FF;
  --ink-muted: #99A1AD;
  /* Done is grey, not green: the only colour on the screen means something needs you. */
  --blue: #5B6068;
  --green: #5B6068;
  --amber: #CC270F;
  --red: #CC270F;
  --chart: #FF4A28;
  --track: #DBE1EA;
  --good-soft: #E3E8EF;
  --shadow: 0 1px 2px rgba(10, 12, 16, .06), 0 6px 16px rgba(10, 12, 16, .06);
  --shadow-pop: 0 12px 32px rgba(10, 12, 16, .18);
  --focus: 0 0 0 2px var(--accent);
  /* The menu column is dark in both themes, so the shape of the app does not change with the lights. */
  --c-bg: #0E0F11;
  --c-surface: #16181C;
  --c-hover: #1F2228;
  --c-line: #262A31;
  --c-text: #F2F7FF;
  --c-text-2: #C9D1DD;
  --c-muted: #99A1AD;
  --c-accent: #FF4A28;

  --font: "Open Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --display: "Oswald", "Open Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  /* Square: nothing in this design has a rounded corner. Kept as tokens so one edit brings
     them all back if that turns out to be wrong. */
  --r-sm: 0;
  --r: 0;
  --r-lg: 0;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  color-scheme: light;
}

/* Dark: cool near-black layers, ice white text, and the ember brightened so it holds against them. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F11;
    --sidebar: #000000;
    --surface: #16181C;
    --surface-2: #1B1E23;
    --hover: #23262B;
    --border: #23262B;
    --border-strong: #3A4049;
    --text: #F2F7FF;
    --text-2: #C9D1DD;
    --muted: #99A1AD;
    --accent: #FF4A28;
    --accent-text: #1A0500;
    --accent-soft: #34130C;
    --primary: #FF4A28;
    --primary-text: #1A0500;
    --ink: #000000;
    --ink-2: #111317;
    --ink-text: #F2F7FF;
    --ink-muted: #99A1AD;
    --blue: #99A1AD;
    --green: #99A1AD;
    --amber: #FF4A28;
    --red: #FF4A28;
    --chart: #FF4A28;
    --track: #262A31;
    --good-soft: #1B1E23;
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 2px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .4);
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F11;
  --sidebar: #000000;
  --surface: #16181C;
  --surface-2: #1B1E23;
  --hover: #23262B;
  --border: #23262B;
  --border-strong: #3A4049;
  --text: #F2F7FF;
  --text-2: #C9D1DD;
  --muted: #99A1AD;
  --accent: #FF4A28;
  --accent-text: #1A0500;
  --accent-soft: #34130C;
  --primary: #FF4A28;
  --primary-text: #1A0500;
  --ink: #000000;
  --ink-2: #111317;
  --ink-text: #F2F7FF;
  --ink-muted: #99A1AD;
  --blue: #99A1AD;
  --green: #99A1AD;
  --amber: #FF4A28;
  --red: #FF4A28;
  --chart: #FF4A28;
  --track: #262A31;
  --good-soft: #1B1E23;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 2px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .4);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- 2. Base and layout ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Scrollbars, in the page's own colours rather than the browser's grey. A slim bar that only
   darkens under the pointer: it marks where you are without drawing a stripe down every panel. */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--border-strong); border-radius: 0;
                            border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--muted); }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
       -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure { margin: 0; }
h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: .95rem; font-weight: 600; }
h3 { font-size: .9rem; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.icon { flex: none; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.num { font-variant-numeric: tabular-nums; }
/* Service errors carry long unbroken links, so they wrap anywhere rather than pushing the card wide. */
.over, .text-red { color: var(--red); overflow-wrap: anywhere; min-width: 0; }
.text-amber { color: var(--amber); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-text); padding: 8px 12px; border-radius: 0; z-index: 20; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 0; }

.page { max-width: 1160px; margin: 0 auto; padding: var(--s6) var(--s4) 64px; }
@media (min-width: 900px) { .page { padding: 36px 44px 80px; } }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin: -8px 0 var(--s4) -8px; padding: 4px 8px; border-radius: 0;
             font-size: .84rem; font-weight: 500; color: var(--text-2); }
.back-link:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.page-head-actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.section { margin-top: var(--s8); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.section-head a { font-size: .82rem; }
.stack { display: grid; gap: var(--s3); }
.grid-2 { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.layout-side-main { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) {
  .layout-side-main { grid-template-columns: 300px minmax(0, 1fr); }
  .sticky { position: sticky; top: var(--s6); align-self: start; }
}

/* Top bar: logo on the left; Logs, theme and sign out on the right */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--ink); color: var(--ink-text); border-bottom: 1px solid var(--ink-2); }
.topbar .brand { color: var(--ink-text); }
.topbar .btn-ghost:hover, .topbar .theme-btn:hover { background: var(--hover); color: var(--text); }
.brand { display: flex; align-items: center; gap: var(--s2); font-weight: 600; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-logo img { display: block; width: 24px; height: 24px; }
.brand-mark { width: 22px; height: 22px; border-radius: 0; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: .72rem; font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: var(--s1); }
.top-actions form { display: contents; }

/* ---------- 3. Components ---------- */
/* Buttons: one height scale (32 default, 28 small) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid transparent;
       border-radius: 0; font: inherit; font-size: .84rem; font-weight: 500; color: var(--text); background: transparent; cursor: pointer;
       white-space: nowrap; transition: background-color .12s, border-color .12s, color .12s; }
.btn:hover { text-decoration: none; }
/* Icon buttons are circles. They hold a round glyph with nothing to line up against, so a square
   around one reads as a box drawn by mistake. Below .btn on purpose: it squares everything. */
.btn.icon-btn { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-sm { height: 28px; padding: 0 10px; font-size: .8rem; }
.btn-block { width: 100%; }
/* White on the coral in both themes. --primary-text goes near-black in the dark one, which made
   the words on a filled button read as grey rather than as a button you press. */
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--hover); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-danger:hover { color: var(--red); background: var(--hover); }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn-row form { display: contents; }

/* Inputs */
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 500; font-size: .82rem; padding: 0; color: var(--text-2); }
/* A label with a mark beside it, for what the field still needs. */
.field-label { display: flex; align-items: center; gap: 6px; min-width: 0; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=time], input[type=number], input[type=datetime-local], input:not([type]), textarea, select {
  width: 100%; font: inherit; font-size: .875rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 0; padding: 6px 10px; min-height: 32px; transition: border-color .12s, box-shadow .12s;
}
select { padding-right: 28px; cursor: pointer; }
/* Safari gives a search box rounded ends and its own font; this puts it back in line. */
input[type=search] { -webkit-appearance: none; appearance: none; }
textarea { resize: none; min-height: 80px; line-height: 1.45; }  /* no drag handle: boxes keep their shape */
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Only the button is the target. A file box stretched to the full width of the field made the
   whole empty strip beside it open the file chooser. */
input[type=file] { justify-self: start; width: auto; max-width: 100%; font: inherit; font-size: .82rem;
                   line-height: 32px; color: var(--text-2); }
input[type=file]::file-selector-button {
  height: 32px; padding: 0 12px; margin: 0 10px 0 0; border: 1px solid var(--border-strong); border-radius: 0;
  font: inherit; font-size: .84rem; font-weight: 500; color: var(--text); background: var(--surface);
  cursor: pointer; transition: background-color .12s, border-color .12s, color .12s;
}
input[type=file]::file-selector-button:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
::placeholder { color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks label { display: inline-flex; align-items: center; gap: 7px; font-weight: 400; cursor: pointer; color: var(--text); }
.checks input { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow); }
.card-pad { padding: var(--s5) var(--s6); }
.card-pad { padding: var(--s4) var(--s5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--border); }

/* Status: dot + word, colour only for meaning */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.status-running::before { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.status-idle::before, .status-approved::before, .status-posted::before, .status-success::before { background: var(--green); }
.status-draft::before, .status-warning::before { background: var(--amber); }
.status-error::before, .status-rejected::before, .status-missed::before { background: var(--red); }
.status-scheduled::before, .status-info::before { background: var(--blue); }
.status-off::before { background: var(--border-strong); }
@keyframes pulse { 50% { opacity: .35; } }


/* Agent grid */
.agent-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .agent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.agent-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); min-height: 200px; padding: var(--s5); text-align: center; background: transparent; border-style: dashed; border-color: var(--border-strong); box-shadow: none; }
.agent-slot .agent-icon { color: var(--muted); background: var(--surface-2); }
.agent-slot-title { font-weight: 600; color: var(--muted); }
.agent-card { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s4) var(--s5); transition: border-color .2s; }
.agent-card:hover { border-color: var(--border-strong); }
.agent-top { display: flex; align-items: flex-start; gap: var(--s3); }
.agent-icon { width: 32px; height: 32px; border-radius: 0; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); flex: none; }
.agent-title { min-width: 0; flex: 1; }
.agent-title h3 a { color: var(--text); }
.agent-title p { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-task { font-size: .84rem; color: var(--text-2); min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-task.is-error { color: var(--red); }
.progress { height: 3px; border-radius: 0; background: var(--surface-2); overflow: hidden; position: relative; }
.progress::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); border-radius: 0; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.agent-now, .agent-recent { display: grid; gap: 6px; }
.agent-label, .desk-label { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.agent-card .agent-task { min-height: 0; }
.agent-card.is-running { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.agent-card.is-error { border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
.mini-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.mini-feed li { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .8rem; color: var(--text-2); }
.mini-feed li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.mini-feed .mini-success::before { background: var(--green); }
.mini-feed .mini-warning::before { background: var(--amber); }
.mini-feed .mini-error::before { background: var(--red); }
.mini-feed .mini-info::before { background: var(--blue); }
.mini-feed time { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.agent-meta { display: flex; gap: var(--s3); flex-wrap: wrap; font-size: .75rem; color: var(--muted); }
.agent-meta .text-amber { font-weight: 500; }
.agent-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--border); }
.agent-actions form { display: contents; }

/* Lists inside cards */
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--border); }
.row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); }
.row-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.row-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: .78rem; color: var(--muted); }
.row-side { display: flex; align-items: center; gap: var(--s3); flex: none; }
.thumb { width: 44px; height: 44px; border-radius: 0; object-fit: cover; border: 1px solid var(--border); flex: none; }
.thumb-empty { width: 44px; height: 44px; border-radius: 0; border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); flex: none; }
.preview { color: var(--text-2); font-size: .82rem; }
.row-link { color: var(--text); }
.mb-4 { margin-bottom: var(--s4); }
.mt-3 { margin-top: var(--s3); }
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Key/value table (settings, accounts) */
.kv { width: 100%; border-collapse: collapse; font-size: .85rem; }
.kv th, .kv td { text-align: left; padding: 10px var(--s5); border-top: 1px solid var(--border); vertical-align: top; }
.kv tr:first-child th, .kv tr:first-child td { border-top: 0; }
.kv th { font-weight: 400; color: var(--muted); width: 34%; }
.kv code, code { font-family: var(--mono); font-size: .78rem; color: var(--text-2); background: var(--surface-2); padding: 1px 5px; border-radius: 0; }

/* Data table (accounts) */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table th { text-align: left; font-weight: 500; font-size: .75rem; color: var(--muted); padding: 10px var(--s5); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px var(--s5); border-top: 1px solid var(--border); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table .num { text-align: right; }

/* Tabs */
.tabs { display: flex; gap: var(--s5); border-bottom: 1px solid var(--border); margin-bottom: var(--s4); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab { padding: var(--s2) 0; color: var(--muted); font-size: .85rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 500; }
.tab-count { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 5px; font-size: .78rem; }

/* Empty, loading and error states */
.empty { text-align: center; padding: 40px var(--s5); color: var(--muted); display: grid; gap: 6px; justify-items: center; }
.empty h3 { color: var(--text); }
.notice { display: flex; align-items: flex-start; gap: var(--s2); padding: 10px var(--s4); border-radius: 0; background: var(--surface); border: 1px solid var(--border); font-size: .84rem; color: var(--text-2); }
.notice .icon { margin-top: 1px; color: var(--muted); }
.notice-error { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.notice-error .icon { color: var(--red); }

/* Home's setting-up list: one quiet line until you open it. */
.setup-problems { border: 1px solid var(--border); border-radius: 0; background: var(--surface); }
.setup-problems > summary { display: flex; align-items: center; gap: var(--s2); padding: 10px var(--s4);
                            font-size: .84rem; color: var(--text-2); cursor: pointer; list-style: none; }
.setup-problems > summary::-webkit-details-marker { display: none; }
.setup-problems > summary .icon { flex: none; }
.setup-problems > summary .icon:first-child { color: var(--amber); }
.setup-problems > summary .icon:last-child { margin-left: auto; color: var(--muted);
                                             transition: transform 150ms cubic-bezier(.2, .8, .2, 1); }
.setup-problems[open] > summary .icon:last-child { transform: rotate(180deg); }
.setup-problems > summary:hover { color: var(--text); }
.setup-problems ul { margin: 0; padding: 0 var(--s4) 12px calc(var(--s4) + 23px); display: grid; gap: 6px;
                     list-style: none; font-size: .84rem; color: var(--text-2); }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Live indicator */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.live.is-stale::before { background: var(--muted); }
.live.is-error::before { background: var(--red); }
[data-live] { transition: opacity .2s; }
[data-live].is-updated { animation: flash-in .5s ease-out; }
@keyframes flash-in { from { opacity: .55; } to { opacity: 1; } }

/* Flash messages (toasts at the top of the page) */
.flashes { display: grid; gap: var(--s2); margin-bottom: var(--s5); }
/* With scripts, a message from the server is a toast in the top right instead of a line across the
   top that pushes the page down as you read it. The password one stays: it holds a code to copy. */
.js .flashes:not(:has(.flash-password)) { display: none; }
.flash { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 0; border: 1px solid var(--border); background: var(--surface); font-size: .85rem; box-shadow: var(--shadow); }
.flash::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.flash-success::before { background: var(--green); }
.flash-error { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.flash-error::before { background: var(--red); }
.flash span { flex: 1; }
.flash-close { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 0; display: grid; }
.flash-close:hover { background: var(--hover); }

/* Theme button */
.theme-btn { color: var(--muted); }
.theme-btn:hover { color: var(--text); background: var(--hover); }
.theme-btn .ti { display: none; }
/* The icon shows the current theme: your choice, or your device's setting until you choose. */
:root[data-theme="light"] .theme-btn .i-light,
:root[data-theme="dark"] .theme-btn .i-dark,
:root:not([data-theme]) .theme-btn .i-light { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .i-light { display: none; }
  :root:not([data-theme]) .theme-btn .i-dark { display: inline-flex; }
}

/* ---------- 4. Pages ---------- */
/* Content (posts) */
.post-list { display: grid; gap: var(--s4); }
.post { display: grid; gap: var(--s3); padding: var(--s4) var(--s5); scroll-margin-top: var(--s6); }
.post:target { border-color: var(--accent); }
.post-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.post-head h3 span { color: var(--muted); font-weight: 400; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; border-left: 2px solid var(--border-strong); padding: 2px 0 2px 14px; font-size: .9rem; }
.post-facts { display: grid; gap: 2px; font-size: .78rem; color: var(--muted); }
.post-actions:empty { display: none; }
.publish { display: grid; gap: 10px; border-top: 1px solid var(--border); padding-top: var(--s3); }
.ig-preview { width: 100%; max-width: 400px; border: 1px solid var(--border); border-radius: 0; overflow: hidden; background: var(--surface); }
.ig-image { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.ig-noimage { aspect-ratio: 1 / 1; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.ig-caption { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; font-size: .86rem; }
.publish-image { max-width: 220px; border-radius: 0; border: 1px solid var(--border); aspect-ratio: 1 / 1; object-fit: cover; }
.image-row { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .image-row { grid-template-columns: 220px minmax(0, 1fr); } }
.image-row .publish-image { width: 100%; max-width: 220px; }
.post-tools { display: flex; gap: var(--s5); flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; }
.tool { flex: 1 1 100%; }
.tool:not([open]) { flex: 0 0 auto; }
.tool > summary { cursor: pointer; font-size: .82rem; color: var(--accent); list-style: none; padding: 2px 0; }
.tool > summary::-webkit-details-marker { display: none; }
.tool[open] > summary { margin-bottom: 10px; color: var(--text); font-weight: 500; }
.tool-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Logs */
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s4); }
.filters select { width: auto; min-width: 140px; }
.log-day { padding: var(--s2) var(--s5); font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.log-day + .list > li:first-child { border-top: 0; }
.log-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: var(--s3); padding: 10px var(--s5); align-items: start; }
.log-row + .log-row { border-top: 1px solid var(--border); }
.log-time { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.log-main { display: grid; gap: 3px; min-width: 0; }
.log-msg { overflow-wrap: anywhere; color: var(--text); font-size: .86rem; }
.log-meta { display: flex; gap: var(--s3); flex-wrap: wrap; font-size: .75rem; color: var(--muted); align-items: center; }
.log-detail > summary { cursor: pointer; font-size: .75rem; color: var(--accent); list-style: none; }
.log-detail > summary::-webkit-details-marker { display: none; }
.log-detail pre { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: .75rem; color: var(--text-2); background: var(--surface-2); padding: 8px 10px; border-radius: 0; }

/* Login */
/* ---------- Sign-in page: brand on the left, form on the right (stacked on phones) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: var(--s4); padding: var(--s6) var(--s4); }
.auth-wrap .flashes { width: 100%; max-width: 360px; margin: 0; }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.auth-brand { display: grid; place-items: center; padding: 40px var(--s5); background: var(--ink); color: var(--ink-text); }
.auth-brand-inner { display: grid; gap: var(--s4); max-width: 420px; }
.auth-brand .auth-logo { justify-content: flex-start; }
.auth-brand .auth-name { color: var(--ink-text); }
.auth-tagline { color: var(--ink-muted); font-size: 1.05rem; line-height: 1.55; max-width: 34ch; }
@media (min-width: 900px) { .auth-tagline { font-size: 1.2rem; } }
.auth-sub { color: var(--muted); margin-top: 6px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.auth-panel { display: grid; justify-items: center; align-content: start; padding: var(--s4) var(--s5) var(--s8); }
.auth-card { width: 100%; max-width: 360px; }
.auth-card .flashes { margin-bottom: var(--s4); }
.auth-card h1 { font-size: 1.6rem; }
.auth-card form { margin-top: var(--s5); }
.auth-foot { margin-top: var(--s4); font-size: .78rem; color: var(--muted); }
.auth-theme { position: fixed; top: 16px; right: 16px; z-index: 2; }
@media (min-width: 900px) {
  .auth-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: 1fr; }
  .auth-brand { padding: var(--s8); margin: 16px; border-radius: 0; }
  .auth-panel { padding: var(--s8); align-content: center; }
}

/* Logo: spins once on load, then "Post Pilot" slides out to its right and stays. */
.auth-logo { display: flex; align-items: center; justify-content: center; --mark: 72px; --name-size: 1.8rem; --name-room: 260px; }
@media (min-width: 900px) { .auth-logo { --mark: 132px; --name-size: 3rem; --name-room: 420px; } }
.auth-mark { display: block; flex: none; width: var(--mark); height: var(--mark); animation: logo-spin .9s cubic-bezier(.2, .7, .2, 1) both; }
.auth-logo img { display: block; width: var(--mark); height: var(--mark); }
.auth-name {
  display: inline-block; overflow: hidden; white-space: nowrap;
  font-size: var(--name-size); font-weight: 700; letter-spacing: -.02em; color: var(--text);
  max-width: 0; margin-left: 0; opacity: 0;
  animation: name-in .6s cubic-bezier(.2, .7, .2, 1) .85s forwards;
}
@keyframes logo-spin { from { transform: rotate(-360deg) scale(.8); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes name-in { to { max-width: var(--name-room); margin-left: calc(var(--mark) * .2); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .auth-mark { animation: none; }
  .auth-name { animation: none; max-width: none; margin-left: calc(var(--mark) * .2); opacity: 1; }
}

/* Logo per theme: dark artwork on light backgrounds, light artwork on dark ones. */
.logo-for-dark { display: none !important; }
:root[data-theme="dark"] .logo-for-light { display: none !important; }
:root[data-theme="dark"] .logo-for-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-for-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-for-dark { display: block !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Settings page ---------- */
/* Cards of different heights, two to a row, always left one side short: a grid makes every row as
   tall as its tallest card. These flow instead, down one column and on into the next, so each card
   starts where the one above it ended and the page has no holes in it. */
.settings-grid { display: block; max-width: 980px; }
.settings-grid > * { margin-bottom: var(--s5); break-inside: avoid; }
@media (min-width: 900px) { .settings-grid { columns: 2; column-gap: var(--s5); } }
.settings-grid h2 { margin-bottom: var(--s2); }
.settings-grid .sub { color: var(--muted); font-size: .85rem; margin-bottom: var(--s4); }
.slot-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s2); }
.facts { display: grid; gap: var(--s2); margin: 0; font-size: .88rem; }
.facts div { display: flex; justify-content: space-between; gap: var(--s3); border-bottom: 1px solid var(--border); padding-bottom: var(--s2); }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.switch { display: flex; align-items: flex-start; gap: var(--s3); cursor: pointer; }
.switch input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.switch strong { display: block; font-weight: 600; }

/* ---------- Popup (reject) ---------- */
.modal { border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); padding: var(--s5); width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal-wide { width: min(860px, calc(100vw - 32px)); }
.modal:has(.modal-head) { padding: 0; }
.modal-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 1rem; }
/* Closing a popup: a drawn target rather than a faint glyph. As a ghost button it sat level with
   the status beside it and read as another label, so people hunted for it. */
.modal-head .icon-btn[data-close] { width: 32px; height: 32px; flex: none; border: 1px solid var(--border);
                                    background: var(--surface-2); color: var(--text-2); }
.modal-head .icon-btn[data-close]:hover { background: var(--hover); color: var(--text);
                                          border-color: var(--border-strong); }
.modal-body { padding: var(--s5); }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s5); border-top: 1px solid var(--border); background: var(--surface-2); position: sticky; bottom: 0; }
.modal-foot .input-row input { width: auto; }
.input-row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.input-row input { flex: 1 1 200px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s2); margin: 0; }
.stat-row div { background: var(--surface-2); border-radius: 0; padding: 10px 12px; }
.stat-row dt { font-size: .75rem; color: var(--muted); }
.stat-row dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 600; }
.modal .mini-feed li { align-items: start; }
.modal::backdrop { background: rgba(0, 0, 0, .45); }
.modal h2 { margin-bottom: var(--s2); }
.modal-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.align-end { align-items: end; }

/* ---------- Email button pages ---------- */
.email-action { width: 100%; max-width: 460px; padding: var(--s6); display: grid; gap: var(--s4); }
.email-action h1 { font-size: 1.15rem; }
.email-posts { display: grid; gap: var(--s3); }
.email-post { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s3); align-items: start; border: 1px solid var(--border); border-radius: 0; padding: var(--s2); }
.email-post img { width: 72px; height: 72px; object-fit: cover; border-radius: 0; }
.email-post p + p { margin-top: 4px; }
.result-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; }

/* ---------- Desk (dashboard): review queue on the left, schedule on the right ---------- */
.desk { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); margin-top: var(--s8); }
@media (min-width: 1024px) { .desk { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.desk-main { display: grid; gap: var(--s8); }
.desk-side { display: grid; gap: var(--s4); }
@media (min-width: 1024px) { .desk-side { position: sticky; top: 76px; } }
.desk-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); min-height: 28px; }
.desk-head form { display: contents; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 0;
         background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 600; vertical-align: 1px; }
.count.is-warn { background: color-mix(in srgb, var(--amber) 16%, var(--surface)); color: var(--amber); }

.post-cards { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.post-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s4); padding: var(--s3); align-items: start; }
@media (max-width: 520px) { .post-card { grid-template-columns: 88px minmax(0, 1fr); gap: var(--s3); } }
.post-card:target { border-color: var(--accent); }
.post-card-pic { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 0; display: block; }
.post-thumb { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0; border: 1px solid var(--border); }
.post-thumb.is-empty, .post-big-pic.is-empty { display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--border-strong); }
.post-card-main { display: grid; gap: 6px; min-width: 0; }
.post-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.post-card-text { color: var(--text-2); font-size: .86rem; white-space: pre-line; }
.post-card-actions { margin-top: 4px; }

.side-card { padding: var(--s4) 0 var(--s2); }
.side-title { display: flex; align-items: center; gap: 8px; padding: 0 var(--s4) var(--s2); }
.side-title .icon { color: var(--accent); }
.side-empty { padding: 0 var(--s4) var(--s3); }
.slot-list { list-style: none; margin: 0; padding: 0; }
.slot-row-btn { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px var(--s4); border: 0; border-top: 1px solid var(--border);
                background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.slot-row-btn:hover { background: var(--hover); }
.slot-time { font-size: .78rem; font-weight: 600; color: var(--accent); }
.slot-time.is-done { color: var(--muted); font-weight: 500; }
.slot-title { font-size: .86rem; }

/* Post popup: picture on the left, caption and AI on the right */
.post-editor { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); align-content: start; }
.post-editor-pic { display: grid; gap: var(--s3); align-content: start; }
.post-big-pic { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0; border: 1px solid var(--border); }
.post-caption { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; background: var(--surface-2); border-radius: 0; padding: var(--s3) var(--s4); }
.post-editor .tool > summary { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Post Pilot app shell: sidebar on the left, page on the right ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
@media (min-width: 900px) { .shell { grid-template-columns: 248px minmax(0, 1fr); } }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; max-width: 86vw; z-index: 40; transform: translateX(-102%); transition: transform .2s ease;
           display: flex; flex-direction: column; gap: var(--s4); padding: var(--s3) var(--s3) var(--s3); background: var(--sidebar);
           border-right: 1px solid var(--border); overflow-y: auto; scrollbar-width: none; }
/* No scrollbar down the menu: it left a lane of background the current page's block could not reach. */
.sidebar::-webkit-scrollbar { width: 0; height: 0; }
.sidebar.is-open { transform: none; box-shadow: var(--shadow-pop); }
.sidebar-scrim { display: none; }
.sidebar.is-open + .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .35); }
@media (min-width: 900px) {
  .sidebar { position: sticky; top: 0; height: 100vh; width: auto; max-width: none; transform: none; box-shadow: none; }
  .sidebar-close { display: none !important; }
  .topbar .menu-btn, .topbar .brand-text { display: none; }
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 0; }
.sidebar .brand { font-size: 1rem; letter-spacing: -.01em; }
.sidebar .brand img { width: 26px; height: 26px; }

/* One bar at every width. Three tracks so the search sits in the middle of the page rather than
   in the middle of whatever is left over: the outer two take the same share, whatever is in them. */
/* A plain row by default. The centred three-track version below needs room for three tracks, and
   without it the middle one takes every pixel while the side tracks collapse towards nothing, so
   the bell, the theme switch, the account chip and sign out end up on top of the search. */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s2);
          padding: 9px var(--s3);
          background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
          border-bottom: 1px solid var(--border); }
.topbar .gsearch { flex: 1 1 auto; }
/* Only the search gives way when the window narrows. Left to themselves these two shrink as
   well, which squashes the menu button and the controls into each other. */
.topbar-left { display: flex; align-items: center; gap: var(--s2); min-width: 0; flex: none; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); min-width: 0; flex: none; }
.topbar .gsearch { min-width: 0; }
/* Wide enough for three tracks, so the search can sit in the middle of the page rather than in
   what is left over. The same width as the menu changes at, so there is never a band where one
   has switched and the other has not. */
@media (min-width: 900px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px) minmax(0, 1fr);
            gap: var(--s3); padding-inline: var(--s4); }
  /* The bar lives beside the menu, so centring it in its own track leaves the search sitting right
     of the window's middle. Half the menu's width back puts it in the middle of the screen. */
  .topbar .gsearch { flex: none; transform: translateX(-116px); }
}
.brand-text { font-family: var(--display); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* Your account: picture, name, what you are, and the switch to My account. */
.me-chip { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; min-width: 0;
           border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); }
.me-chip:hover { border-color: var(--accent); text-decoration: none; }
/* The chip keeps its size. As a flexible item it was squeezed to 27px in a narrow side track,
   which clipped the name straight through the edge of the window. */
.me-chip { flex: none; }
/* And the name only where the bar is wide enough to hold it. Between 900 and about 1280 the side
   tracks are too narrow for a name as well as the bell, the theme switch and sign out. */
@media (max-width: 1279px) { .me-chip .me-name { display: none; } }
@media (max-width: 760px) { .topbar .brand-text { display: none; } }
@media (max-width: 480px) { .gsearch-field kbd { display: none; } }  /* no room, and no / key to press */
.content { min-width: 0; background: var(--bg); }

.switcher { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border);
            border-radius: 0; background: var(--surface); box-shadow: var(--shadow); color: var(--muted); }
.switcher select { flex: 1; min-width: 0; border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 0; height: 24px;
                   appearance: none; -webkit-appearance: none; font-weight: 600; color: var(--text); cursor: pointer; }
.switcher select:focus { box-shadow: none; }
.switcher:focus-within { box-shadow: var(--focus); }
.switcher.is-single { color: var(--text); font-weight: 600; font-size: .875rem; }
.switcher-dot { width: 22px; height: 22px; border-radius: 0; display: grid; place-items: center; flex: none;
                background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; }

.nav-group { display: grid; gap: 2px; }
.nav-label { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: var(--s2) 0 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px var(--s3); margin-inline: calc(-1 * var(--s3));
            border-radius: 0; color: var(--text-2); font-size: .875rem; font-weight: 500; }
.nav-link .icon { color: var(--muted); }
.nav-link:hover { background: var(--hover); color: var(--text); text-decoration: none; }
/* The page you are on is a solid block of ember, the way the rest of the app marks a thing to act
   on. Its label is near black rather than white: white on this orange is 3.35:1, which is under the
   bar for text this size, and near black on it is 5.88:1. */
.nav-link.is-on { background: var(--accent); color: var(--accent-text); font-weight: 600; box-shadow: none; }
.nav-link.is-on .icon { color: var(--accent-text); }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 0; display: grid; place-items: center;
             background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 600; }
.nav-link.is-on .nav-count { background: color-mix(in srgb, var(--accent-text) 16%, transparent); color: var(--accent-text); }
/* The letter is white in both themes. It is decorative (aria-hidden, and the name is always beside
   it), so it doesn't follow --primary-text, which goes near-black in the dark theme for buttons. */
.me-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
             background: var(--primary); color: #fff; font-size: .78rem; font-weight: 700; }
.me-name { min-width: 0; display: grid; gap: 0; color: var(--text); font-size: .72rem; font-weight: 600; line-height: 1.25; }
.me-role { font-size: .62rem; font-weight: 500; color: var(--accent); }
.topbar .theme-btn { width: 32px; padding: 0; }

/* Page heading and hints */
.page-head { align-items: flex-start; margin-bottom: 28px; }
.page-head .sub { font-size: .95rem; margin-top: 4px; }
.title-row { display: flex; align-items: center; gap: 6px; }
.hint { position: relative; display: inline-flex; }
.hint-btn { border: 0; padding: 0; background: transparent; cursor: help; color: var(--muted); display: grid; place-items: center;
            width: 22px; height: 22px; border-radius: 50%; font: inherit; }
.hint:hover .hint-btn, .hint-btn:focus-visible { color: var(--accent); background: var(--accent-soft); }
/* A hint that warns rather than explains: amber at rest, so it reads as "look at me". */
.hint.is-warning .hint-btn { color: var(--amber); }
.hint.is-warning:hover .hint-btn, .hint.is-warning .hint-btn:focus-visible { color: var(--amber);
                                   background: color-mix(in srgb, var(--amber) 18%, transparent); }
.hint-pop { display: none;  pointer-events: none;}
/* Shown by app.js (the .is-open class), which also places it */
@keyframes hint-in { from { opacity: 0; transform: translateY(-2px); } }
.hint-pop { position: absolute; top: 28px; left: -8px; z-index: 30; width: min(300px, 80vw); padding: 10px 12px; border-radius: 0;
            background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-pop); font-size: .82rem; font-weight: 400;
            line-height: 1.5; color: var(--text-2); text-transform: none; letter-spacing: 0; }
.help-text { font-size: .8rem; color: var(--muted); }
.back-link { margin: -12px 0 var(--s3) -8px; }
.mb-5 { margin-bottom: var(--s5); }
.mt-8 { margin-top: var(--s8); }

/* Home: numbers, accounts */
.stats { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--s8); }
@media (min-width: 1000px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 6px; padding: var(--s4);
        background: var(--surface-2); border-radius: 0; color: var(--text); border: 1px solid transparent; }
a.stat:hover { text-decoration: none; border-color: var(--border-strong); }
.stat-icon { width: 28px; height: 28px; border-radius: 0; display: grid; place-items: center; background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.stat-label { align-self: center; font-size: .82rem; color: var(--muted); }
.stat-value { grid-column: 1 / -1; font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.stat.is-accent .stat-icon { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.stat.is-warn .stat-icon { color: var(--amber); }
.account-cards { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.account-card { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); color: var(--text); }
.account-card:hover { text-decoration: none; border-color: var(--border-strong); }
.account-card > .icon { color: var(--muted); }
.account-card-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.account-card-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.account-mark { width: 40px; height: 40px; border-radius: 0; display: grid; place-items: center; flex: none; background: var(--accent-soft);
                color: var(--accent); font-weight: 700; text-transform: uppercase; }
.side-more { display: block; padding: 10px var(--s4) 4px; border-top: 1px solid var(--border); font-size: .82rem; font-weight: 500; }
.small-empty { padding: 28px var(--s5); }
.desk { margin-top: 0; }
.desk-head h2 { font-size: 1rem; }

/* Calendar: a week, Monday to Sunday */
.week { display: grid; grid-template-columns: repeat(7, minmax(118px, 1fr)); gap: var(--s2); overflow-x: auto; padding-bottom: var(--s2); }
.day { display: flex; flex-direction: column; min-height: 320px; border: 1px solid var(--border); border-radius: 0; background: var(--surface-2); }
.day-head { display: flex; align-items: baseline; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.day-name { font-size: .78rem; color: var(--muted); font-weight: 500; }
.day-num { font-size: 1.05rem; font-weight: 600; }
.day.is-today { border-color: var(--accent); }
.day.is-today .day-name, .day.is-today .day-num { color: var(--accent); }
.day-body { display: grid; gap: 6px; padding: 8px; align-content: start; }
.cal-post { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: flex-start; width: 100%; padding: 6px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
            background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow); }
.cal-post:hover { border-color: var(--accent); }
.cal-post.is-posted { opacity: .8; box-shadow: none; }
.cal-thumb { width: 36px; height: 36px; border-radius: 0; object-fit: cover; flex: none; border: 1px solid var(--border); }
.cal-thumb.is-empty { display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.cal-thumb.is-empty .small { display: none; }
.cal-text { display: grid; gap: 1px; min-width: 0; }
.cal-time { font-size: .74rem; font-weight: 600; color: var(--accent); }
.cal-post.is-posted .cal-time { color: var(--muted); }
.cal-title { font-size: .8rem; line-height: 1.35; }
.cal-acct { font-size: .72rem; color: var(--muted); }
.cal-free { padding: 8px; border: 1px dashed var(--border-strong); border-radius: 0; font-size: .76rem; color: var(--muted); text-align: center; }
.day-empty { font-size: .78rem; color: var(--muted); padding: 6px 4px; }
.week-nav { gap: 4px; }

/* All posts */
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); border-bottom: 1px solid var(--border); }
.toolbar .tabs { border-bottom: 0; margin-bottom: -1px; }
.search { display: flex; align-items: center; gap: 6px; padding: 0 10px; margin-bottom: 8px; border: 1px solid var(--border-strong); border-radius: 0; background: var(--surface); color: var(--muted); }
.search input { border: 0; box-shadow: none; padding: 4px 0; min-height: 30px; width: 200px; background: transparent; }
.search input:focus { box-shadow: none; }
.search:focus-within { box-shadow: var(--focus); }
.table-card { overflow: hidden; }
.post-table, .people-table { list-style: none; margin: 0; padding: 0; }
.post-table li + li, .people-table li + li { border-top: 1px solid var(--border); }
.post-line, .person-line { display: grid; align-items: center; gap: var(--s3); width: 100%; padding: 10px var(--s4); border: 0; background: transparent;
                           text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.post-line { grid-template-columns: 40px minmax(0, 1fr) auto; }
@media (min-width: 800px) { .post-line { grid-template-columns: 40px minmax(0, 1fr) 160px 150px 140px; } }
.post-line:hover, .person-line:hover { background: var(--surface-2); }
.line-thumb { width: 40px; height: 40px; border-radius: 0; object-fit: cover; border: 1px solid var(--border); }
.line-thumb.is-empty { display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.line-thumb.is-empty .small { display: none; }
.post-line-main { display: grid; min-width: 0; }
.post-line-title { font-weight: 500; font-size: .88rem; }
.post-line-acct { font-size: .8rem; color: var(--text-2); }
@media (max-width: 799px) { .post-line-acct, .post-line-when { display: none; } }

/* People */
.person-line { grid-template-columns: 32px minmax(0, 1fr) auto; }
@media (min-width: 800px) { .person-line { grid-template-columns: 32px minmax(0, 1.2fr) 120px minmax(0, 1fr) 110px; } }
@media (max-width: 799px) { .person-role, .person-accounts { display: none; } }
.person-main { display: grid; min-width: 0; }
.person-name { font-weight: 500; }
.person-role { font-size: .84rem; color: var(--text-2); }
.person-editor { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
.perm-list, .check-list { display: grid; gap: 4px; }
.perm-row, .check-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 0; cursor: pointer; }
.perm-row:hover, .check-row:hover { background: var(--surface-2); }
/* While Admin is chosen the list is ticked and locked: an admin may do all of it regardless. */
.perm-list.is-locked { opacity: .7; }
.perm-list.is-locked .perm-row { cursor: default; }
.perm-list.is-locked .perm-row:hover { background: none; }
.perm-row input, .check-row input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.perm-row span, .check-row span { display: grid; gap: 1px; }
.perm-row strong, .check-row strong { font-weight: 500; font-size: .875rem; }

/* Help */
.help-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .help-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.help-card h2 { margin-bottom: var(--s3); font-size: 1rem; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--text-2); }
.steps strong { color: var(--text); }
.help-list { display: grid; gap: 10px; margin: 0; }
.help-list div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s3); }
.help-list dt { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.help-list dt .icon { color: var(--accent); }
.help-list dd { margin: 0; color: var(--text-2); }
.can-list, .tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.can-list li { display: flex; align-items: center; gap: 8px; }
.can-list .is-yes .icon { color: var(--green); }
.can-list .is-no { color: var(--muted); }
.tips li { color: var(--text-2); padding-left: 14px; position: relative; }
.tips li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* Account pages, settings */
.span-2 { grid-column: 1 / -1; }
.brand-guide { margin: var(--s3) 0 0; max-height: 380px; overflow: auto; white-space: pre-wrap; font-family: var(--mono); font-size: .78rem;
               line-height: 1.55; color: var(--text-2); background: var(--surface-2); border-radius: 0; padding: var(--s3) var(--s4); }
.narrow { max-width: 480px; }
.bot-block { display: grid; gap: 6px; }
.bot-usage { padding: 0 4px; }

/* Account pictures: the Instagram profile picture, round like on Instagram; the letter until we have it. */
.account-mark, .switcher-dot { border-radius: 50%; }
img.account-mark, img.switcher-dot { object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); padding: 0; }
.account-mark.is-big { width: 56px; height: 56px; font-size: 1.3rem; }
.account-hero { display: flex; align-items: flex-start; gap: var(--s4); }
.account-hero .page-head { flex: 1; }

/* Calendar drag and drop */
.cal-post[draggable="true"] { cursor: grab; }
.cal-post.is-dragging { opacity: .45; }
.day-body.is-drop-target { background: var(--accent-soft); border-radius: 0; }
.cal-free { font: inherit; width: 100%; background: transparent; cursor: default; }
button.cal-free { cursor: pointer; }
button.cal-free:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cal-free.is-drop-target { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Posting times editor */
.times-form { gap: var(--s4); }
.timeline { position: relative; height: 40px; margin: 6px 4px 0; border-radius: 0; user-select: none;
            background: linear-gradient(90deg, var(--surface-2), var(--accent-soft) 50%, var(--surface-2)); border: 1px solid var(--border); }
.timeline-dot, .timeline-run { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; border-radius: 50%;
                               transform: translate(-50%, -50%); background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.timeline-run { width: 6px; height: 22px; border-radius: 0; background: var(--primary); cursor: grab;
                touch-action: none; }
/* A 6px mark is nothing to aim at, so the part that takes the pointer is wider than the part you see. */
.timeline-run::after { content: ""; position: absolute; inset: -11px -13px; border-radius: 0; }
.timeline-run:hover, .timeline-run:focus-visible { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--accent-soft); }
.timeline-run:focus-visible { outline: none; }
.timeline[data-timeline] { cursor: pointer; touch-action: none; }
.timeline.is-dragging { cursor: grabbing; }
.timeline.is-dragging .timeline-run { cursor: grabbing; }
.timeline-labels { position: absolute; left: 0; right: 0; top: 100%; display: flex; justify-content: space-between; margin-top: 4px;
                   font-size: .7rem; color: var(--muted); }
.timeline + .help-text { margin-top: 22px; }
.slot-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.slot-chip { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border: 1px solid var(--border); border-radius: 0;
             background: var(--surface-2); }
.slot-chip input { width: auto; border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 28px; font-weight: 600; }
.slot-chip input:focus { box-shadow: none; }
.slot-chip:focus-within { box-shadow: var(--focus); }
.slot-local { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.times-form input.w-auto, input.w-auto { width: auto; justify-self: start; }
.pair-row { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.input-suffix { display: flex; align-items: center; gap: 8px; }
.input-suffix input { width: 110px; }
.input-suffix span { color: var(--muted); font-size: .84rem; }

/* Brand guide editor */
.brand-editor { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .brand-editor { grid-template-columns: 220px minmax(0, 1fr); } }
.brand-nav { display: grid; gap: 2px; padding: var(--s3); }
@media (min-width: 1000px) { .brand-nav { position: sticky; top: var(--s6); } }
@media (max-width: 999px) { .brand-nav { display: none; } }
.brand-nav-link { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 0; color: var(--text-2); font-size: .84rem; }
.brand-nav-link:hover { background: var(--hover); text-decoration: none; color: var(--text); }
.brand-nav-link.is-add { color: var(--accent); font-weight: 500; }
.fill-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; }
.fill-dot.is-filled { background: var(--accent); border-color: var(--accent); }
.brand-sections { display: grid; gap: var(--s4); }
.brand-section { display: grid; gap: 8px; padding: var(--s4) var(--s5); scroll-margin-top: var(--s6); }
.brand-section.is-new { border-style: dashed; box-shadow: none; }
.brand-section-head { display: flex; align-items: center; gap: 6px; }
.brand-heading { border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 0; font-size: 1rem; font-weight: 600; color: var(--text); }
.brand-heading:focus { box-shadow: none; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.brand-body { field-sizing: content; min-height: 110px; max-height: 520px; line-height: 1.55; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
            padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: 0; background: var(--surface); box-shadow: var(--shadow-pop); }
.brand-summary { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.brand-summary li { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); }
.brand-summary li.is-filled { color: var(--text); }

/* Step-by-step forms */
.wizard-steps { list-style: none; margin: 0; padding: var(--s4) var(--s5) 0; display: flex; gap: var(--s2); counter-reset: step; }
.wizard-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); counter-increment: step;
                   padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.wizard-steps li::before { content: counter(step); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none;
                           font-size: .72rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.wizard-steps li.is-current { color: var(--text); font-weight: 600; border-color: var(--accent); }
.wizard-steps li.is-current::before { background: var(--accent); color: var(--accent-text); }
.wizard-steps li.is-done::before { background: var(--accent-soft); color: var(--accent); }
.wizard:not(.is-js) .wizard-steps, .wizard:not(.is-js) [data-step-next], .wizard:not(.is-js) [data-step-back] { display: none; }
.wizard.is-js .wizard-step:not(.is-current) { display: none; }
.wizard-step h3 { font-size: 1.05rem; }
@media (max-width: 600px) { .wizard-steps li { font-size: 0; gap: 0; } }
.choice-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 0; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice span { display: grid; gap: 2px; }
.choice strong { font-weight: 600; }

/* First sign-in welcome */
.welcome { padding: var(--s5) var(--s6); margin-bottom: var(--s6); border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
           background: linear-gradient(135deg, var(--surface) 55%, var(--accent-soft)); }
.welcome-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s4); }
.welcome-head h2 { font-size: 1.15rem; }
.welcome-head form, .welcome-foot form { display: contents; }
.welcome-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .welcome-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.welcome-steps li { display: flex; gap: var(--s3); align-items: flex-start; }
.welcome-steps p { color: var(--text-2); font-size: .86rem; margin-top: 2px; }
.welcome-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--primary);
               color: var(--primary-text); font-weight: 700; font-size: .85rem; }
.welcome-foot { display: flex; gap: var(--s2); margin-top: var(--s5); }

/* Anything marked hidden stays hidden, whatever its other styles say */
[hidden] { display: none !important; }

/* ---------- Calendar: month grid and a 24-hour day ---------- */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-title { font-size: 1.15rem; min-width: 10ch; text-align: center; padding: 0 4px; }
.cal-tools { display: flex; align-items: center; gap: var(--s2); }
.cal-tools form { display: flex; }
.person-filter select { width: auto; min-height: 32px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 0; background: var(--surface-2); border: 1px solid var(--border); }
.segmented a { padding: 4px 14px; border-radius: 0; font-size: .84rem; font-weight: 500; color: var(--muted); }
.segmented a:hover { text-decoration: none; color: var(--text); }
.segmented a.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow), 0 0 0 1px var(--border); }

.month { border: 1px solid var(--border); border-radius: 0; overflow: hidden; background: var(--surface); }
.month-head, .month-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head span { padding: 8px 10px; font-size: .74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
                   border-bottom: 1px solid var(--border); }
.month-week + .month-week .mday { border-top: 1px solid var(--border); }
.mday { min-height: 116px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mday + .mday { border-left: 1px solid var(--border); }
.mday.is-other { background: var(--surface-2); }
.mday.is-other .mday-num { color: var(--muted); }
.mday.is-past:not(.is-today) { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.mday-num { align-self: flex-start; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 0; display: grid; place-items: center;
            font-size: .82rem; font-weight: 600; color: var(--text); }
.mday-num:hover { background: var(--hover); text-decoration: none; }
.mday.is-today .mday-num { background: var(--accent); color: var(--accent-text); }
.mchip { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; padding: 3px 6px; border: 0; border-radius: 0;
         background: var(--accent-soft); color: var(--text); font: inherit; font-size: .76rem; text-align: left; cursor: pointer; }
.mchip:hover { box-shadow: 0 0 0 1px var(--accent); }
.mchip[draggable="true"] { cursor: grab; }
.mchip.is-posted { background: var(--surface-2); color: var(--muted); }
.mchip-time { font-weight: 700; color: var(--accent); flex: none; }
.mchip.is-posted .mchip-time { color: var(--muted); }
.mchip-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mchip-acct { width: 16px; height: 16px; border-radius: 50%; flex: none; font-size: .6rem; display: grid; place-items: center; background: var(--surface);
              color: var(--accent); font-weight: 700; }
img.mchip-acct { object-fit: cover; }
.mday-more { font-size: .74rem; font-weight: 600; padding: 2px 6px; color: var(--accent); }
.mday.is-drop-target { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.mchip.is-dragging, .hpost.is-dragging { opacity: .4; }
@media (max-width: 760px) {
  .mday { min-height: 64px; padding: 4px; }
  .mchip-title, .mchip-acct { display: none; }
  .mchip { padding: 2px 4px; justify-content: center; }
}

.hours { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.hour { display: grid; grid-template-columns: 92px minmax(0, 1fr); min-height: 52px; border-top: 1px solid var(--border); scroll-margin: 120px; }
.hour:first-child { border-top: 0; }
.hour-label { padding: 8px 12px; font-size: .78rem; font-weight: 600; color: var(--muted); display: grid; align-content: start; gap: 2px;
              border-right: 1px solid var(--border); }
.hour-usual { font-size: .68rem; font-weight: 500; color: var(--accent); }
.hour.is-usual .hour-label { color: var(--text); }
.hour.is-past { background: var(--surface-2); }
.hour.is-past .hour-label { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.hour.is-now { box-shadow: inset 3px 0 0 var(--accent); }
.hour-body { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; align-content: flex-start; }
.hour.is-drop-target { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
/* A run of hours with nothing in them: one thin line, so a day you can take in at a glance. */
.hour.is-quiet { min-height: 0; align-items: center; }
.hour.is-quiet .hour-label { padding: 5px 12px; font-weight: 500; }
.hour-quiet { padding: 5px 8px; }
.hpost { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 420px; flex: 1 1 260px; padding: 6px 10px 6px 6px; text-align: left;
         font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-left-width: 1px; border-radius: 0;
         box-shadow: var(--shadow); cursor: pointer; }
.hpost:hover { border-color: var(--accent); }
.hpost[draggable="true"] { cursor: grab; }
.hpost.is-posted { opacity: .75; box-shadow: none; }
.hpost-thumb { width: 40px; height: 40px; border-radius: 0; object-fit: cover; flex: none; border: 1px solid var(--border); }
.hpost-thumb.is-empty { display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.hpost-thumb.is-empty .small { display: none; }
.hpost-main { display: grid; min-width: 0; }
.hpost-time { font-size: .74rem; font-weight: 700; color: var(--accent); }
.hpost-title { font-size: .86rem; font-weight: 500; }
.hpost-meta { font-size: .76rem; color: var(--muted); }

/* Month chips for admins: who approved it, on its own line under the time and title */
.mchip:has(.mchip-by) { flex-wrap: wrap; row-gap: 0; }
.mchip-by { flex-basis: 100%; padding-left: 22px; font-size: .7rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mchip:not(:has(.mchip-acct)) .mchip-by { padding-left: 0; }
@media (max-width: 760px) { .mchip-by { display: none; } }
.mchip-title { flex: 1 1 0; min-width: 0; }

/* Account switcher menu (replaces the browser's own dropdown, which ignored the app's colours) */
.switcher-menu { position: relative; }
.switcher-menu > summary { list-style: none; cursor: pointer; }
.switcher-menu > summary::-webkit-details-marker { display: none; }
.switcher-menu > summary:hover { border-color: var(--border-strong); }
.switcher-menu[open] > summary { border-color: var(--accent); }
.switcher-name { flex: 1; min-width: 0; font-weight: 600; color: var(--text); font-size: .875rem; }
.switcher-dot.is-all { background: var(--primary); color: #fff; }
.switcher-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; padding: 6px; border-radius: 0;
                background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-pop); }
.switcher-pop form { display: grid; gap: 2px; }
.switcher-label { padding: 4px 8px 6px; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.switcher-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 0;
                 background: transparent; color: var(--text); font: inherit; font-size: .86rem; text-align: left; cursor: pointer; }
.switcher-item:hover, .switcher-item:focus-visible { background: var(--hover); }
.switcher-item.is-on { background: var(--accent-soft); font-weight: 600; }
.switcher-item > .icon:last-child { color: var(--accent); }
.switcher-item-name { flex: 1; min-width: 0; }
.switcher-item .nav-count { margin-left: 0; }

/* Me (bottom of the sidebar): the whole name block opens My account */

/* My account page */
.account-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); max-width: 980px; }
@media (min-width: 900px) { .account-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.profile-card { display: flex; gap: var(--s4); align-items: center; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 1.6rem; font-weight: 700;
                  background: var(--primary); color: #fff; }
.profile-main { display: grid; gap: 2px; min-width: 0; }
.profile-main strong { font-size: 1.15rem; }
/* The rows sit close so the list reads as one group. At 8px they were as far apart as the whole
   list was from the heading of the next group, which made that heading look like part of this one. */
.my-accounts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.my-accounts li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.my-accounts .account-mark { width: 32px; height: 32px; font-size: .85rem; }
.my-accounts > li[hidden] { display: none; }
.fold-more { margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
             color: var(--accent); font: inherit; font-size: .82rem; font-weight: 600; }
.fold-more:hover { text-decoration: underline; }
.mt-2 { margin-top: var(--s2); }
.mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: var(--s5); }
.mt-6 { margin-top: var(--s6); }

/* Notification bell */
.sidebar-top-actions { display: flex; align-items: center; gap: 2px; }
.bell-menu { position: relative; }
.bell-menu > summary { list-style: none; position: relative; }
.bell-menu > summary::-webkit-details-marker { display: none; }
.bell-btn { color: var(--text-2); position: relative; }
/* Open means on: the bell fills with ember, like everything else you have acted on. */
.bell-menu[open] > summary { background: var(--accent); color: var(--accent-text); }
.bell-count { position: absolute; top: -1px; right: -2px; min-width: 13px; height: 13px; padding: 0 3px; border-radius: 0; display: grid; place-items: center;
              background: var(--accent); color: var(--accent-text); font-size: .62rem; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--sidebar); }
.bell-pop { position: absolute; top: calc(100% + 8px); right: 0; left: auto; z-index: 60;
            width: min(360px, calc(100vw - 24px)); border-radius: 0;
            background: var(--surface); color: var(--text); border: 1px solid var(--border);
            box-shadow: var(--shadow-pop); overflow: hidden; }
/* fixed: floats above the page instead of being cut off by the sidebar */
.bell-head { display: grid; gap: 1px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.bell-head strong { color: var(--text); font-family: var(--display); font-weight: 600;
                    letter-spacing: .05em; text-transform: uppercase; font-size: .92rem; }
.bell-list { list-style: none; margin: 0; padding: 4px; max-height: min(420px, 70vh); overflow-y: auto; }
.bell-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 0; color: var(--text); }
.bell-item:hover { background: var(--hover); text-decoration: none; }
.bell-item.is-new { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.bell-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); }
.bell-item.is-review .bell-icon { background: var(--accent-soft); color: var(--accent); }
.bell-item.is-missed .bell-icon, .bell-item.is-warning .bell-icon { color: var(--amber); }
.bell-item.is-live .bell-icon { color: var(--green); }
.bell-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.bell-title { font-size: .86rem; font-weight: 500; line-height: 1.35; }
.bell-sub { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }
.bell-empty { display: grid; justify-items: center; gap: 4px; padding: 28px 16px; text-align: center; color: var(--muted); }
.bell-empty strong { color: var(--text); }
.bell-empty .icon { color: var(--green); }
.mobile-bell { margin-left: auto; }

/* Instagram-style preview in the post popup */
.igp { margin: 0; border: 1px solid var(--border); border-radius: 0; background: var(--surface); overflow: hidden; }
.igp-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: .84rem; }
.igp-head strong { flex: 1; min-width: 0; font-weight: 600; }
.igp-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .75rem; font-weight: 700;
              background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
img.igp-avatar { object-fit: cover; }
.igp-dots { color: var(--muted); letter-spacing: 1px; }
.igp-pic { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--surface-2); }
.igp-pic.is-empty { display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); padding: 12px; text-align: center; }
.igp-actions { display: flex; gap: 14px; padding: 10px 12px 4px; color: var(--text); }
.igp-spacer { flex: 1; }
.igp-cap { padding: 2px 12px 0; font-size: .84rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere;
           display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.igp-cap { transition: max-height .28s ease; }
.igp-cap.is-open { display: block; }
@media (prefers-reduced-motion: reduce) { .igp-cap { transition: none; } }
.igp-cap strong { font-weight: 600; }
.igp-more { border: 0; background: none; padding: 0 12px; font: inherit; font-size: .84rem; color: var(--muted); cursor: pointer; }
.igp-more:hover { color: var(--text); }

/* The line under the figures: what is left to do about the people who haven't answered */
.chart-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
              flex-wrap: wrap; padding-top: var(--s4); border-top: 1px solid var(--border); }
.chart-foot .sub { margin: 0; }

/* The emails written for a mailing list */
.mail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mail-list li { display: flex; align-items: baseline; gap: 12px; justify-content: space-between;
                padding: 8px 0; border-bottom: 1px solid var(--border); }
.mail-list li:last-child { border-bottom: 0; }

textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.5; }

/* What you can do to one person, at the end of their row */
.row-actions { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }

/* Choosing who an email goes to */
.pick-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.pick-head input[type="search"] { flex: 1 1 220px; min-width: 0; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px;
             max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r2); }
.pick-list li { padding: 7px 10px; border-bottom: 1px solid var(--border); }
.pick-list li:last-child { border-bottom: 0; }
.pick-list li:hover { background: var(--surface-2); }
.pick-list .check-row span span { display: block; }

/* The email preview: a line of inbox, then the email itself in a frame of its own */
.inbox-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; }
.inbox-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
                font-size: .8rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.inbox-who { flex: 1; min-width: 0; display: grid; }
.inbox-subject { margin: 0 0 10px; font-size: 1rem; font-weight: 600; }
.inbox-body { width: 100%; height: 420px; border: 1px solid var(--border); border-radius: var(--r2);
              background: #fff; display: block; }

/* Two buttons that work like a radio: which network a new post is for */
.label-like { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); }
.seg { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.seg-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px;
           border: 1px solid var(--border-strong); border-radius: var(--r2); background: var(--surface);
           font: inherit; font-size: .84rem; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg-btn:hover { color: var(--text); background: var(--surface-2); }
.seg-btn.is-on { background: var(--accent); color: #fff; }

/* Facebook-style preview: the words first, the picture under them */
.fbp { margin: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.fbp-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px; font-size: .84rem; }
.fbp-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
              font-size: .8rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
img.fbp-avatar { object-fit: cover; }
.fbp-who { flex: 1; min-width: 0; display: grid; }
.fbp-who strong { font-weight: 600; }
.fbp-when { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .76rem; }
.fbp-dots { color: var(--muted); letter-spacing: 1px; }
.fbp-body { padding: 0 12px 8px; font-size: .88rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere;
            display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
            transition: max-height .28s ease; }
.fbp-body.is-open { display: block; }
@media (prefers-reduced-motion: reduce) { .fbp-body { transition: none; } }
.fbp-more { border: 0; background: none; padding: 0 12px 10px; font: inherit; font-size: .84rem; color: var(--muted); cursor: pointer; }
.fbp-more:hover { color: var(--text); }
.fbp-pic { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: var(--surface-2); }
.fbp-pic.is-empty { display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); padding: 12px; text-align: center; }
.fbp-actions { display: flex; padding: 6px 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem; }
.fbp-actions span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 0; }

/* One-tap rewrites */
.quick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 0; padding: 4px 11px;
            font: inherit; font-size: .78rem; font-weight: 500; cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Picture tools: pick from options, upload your own */
.pic-tools { margin-top: 4px; }
.pic-options { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--accent); border-radius: 0; background: var(--accent-soft); }
.pic-options-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pic-options-grid form { display: contents; }
.pic-option { position: relative; padding: 0; border: 2px solid transparent; border-radius: 0; overflow: hidden; cursor: pointer; background: none; }
.pic-option img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pic-option span { position: absolute; inset: auto 0 0 0; padding: 4px; font-size: .72rem; font-weight: 600; color: #fff; background: rgba(20, 14, 26, .7); opacity: 0; transition: opacity .12s; }
.pic-option:hover, .pic-option:focus-visible { border-color: var(--accent); }
.pic-option:hover span, .pic-option:focus-visible span { opacity: 1; }
.upload-form { display: grid; gap: 4px; justify-items: start; }
.upload-btn { position: relative; overflow: hidden; }
.upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-btn:focus-within { box-shadow: var(--focus); }

/* Undo bar (bottom of the screen) */
.undo-bar { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
            max-width: calc(100vw - 24px); padding: 10px 10px 10px 18px; border-radius: 0; overflow: hidden;
            background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow-pop); animation: undo-in .18s ease-out; }
@media (min-width: 900px) { .undo-bar { left: calc(50% + 124px); } }
.undo-bar form { display: contents; }
.undo-msg { font-size: .88rem; }
.undo-btn { border: 0; background: transparent; color: var(--c-accent); font: inherit; font-weight: 700; font-size: .88rem; padding: 6px 10px; border-radius: 0; cursor: pointer; }
.undo-btn:hover { background: var(--ink-2); }
.undo-close { border: 0; background: transparent; color: var(--ink-muted); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 0; cursor: pointer; }
.undo-close:hover { background: var(--ink-2); color: var(--ink-text); }
.undo-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: left; animation: undo-time 10s linear forwards; }
.undo-bar:hover .undo-timer { animation-play-state: paused; }
.undo-bar.is-gone { display: none; }
@keyframes undo-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes undo-time { to { transform: scaleX(0); } }

/* Setup checklist (admins) */
.setup { padding: var(--s5) var(--s6); margin-bottom: var(--s6); }
.setup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.setup-head form { display: contents; }
.setup-who { display: flex; align-items: center; gap: 12px; }
.setup-who h2 { font-size: 1.1rem; }
.setup-bar { height: 6px; border-radius: 0; background: var(--surface-2); margin: var(--s4) 0 var(--s3); overflow: hidden; }
.setup-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 0; transition: width .3s; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .setup-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); } }
.setup-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 0; }
.setup-check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .75rem; font-weight: 700;
               border: 1.5px solid var(--border-strong); color: var(--muted); }
.setup-steps li.is-done .setup-check { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.setup-steps li.is-done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.setup-text { display: grid; gap: 1px; min-width: 0; }
.setup-text a { color: var(--text); }
.setup-text a:hover strong { color: var(--accent); }
.setup-fill.is-0-of-5 { width: 0%; }
.setup-fill.is-1-of-5 { width: 20%; }
.setup-fill.is-2-of-5 { width: 40%; }
.setup-fill.is-3-of-5 { width: 60%; }
.setup-fill.is-4-of-5 { width: 80%; }
.setup-fill.is-5-of-5 { width: 100%; }

/* Calendar: hover preview */
.peek { position: fixed; z-index: 80; width: 280px; border-radius: 0; overflow: hidden; background: var(--surface);
        border: 1px solid var(--border); box-shadow: var(--shadow-pop); pointer-events: none; display: none; }
.peek.is-on { display: block; }
.peek img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--surface-2); }
.peek-body { padding: 10px 12px 12px; display: grid; gap: 3px; }
.peek-time { font-size: .74rem; font-weight: 700; color: var(--accent); }
.peek-title { font-size: .86rem; font-weight: 600; }
.peek-text { font-size: .78rem; color: var(--text-2); line-height: 1.45; }
.peek-meta { font-size: .72rem; color: var(--muted); }

/* Calendar on phones: a list of days instead of the grid */
.agenda { display: none; }
@media (max-width: 760px) {
  .month { display: none; }
  .agenda { display: grid; gap: var(--s4); }
}
.agenda-day h3 { font-size: .86rem; margin-bottom: 6px; }
.agenda-day h3 a { color: var(--text); }
.agenda-day.is-today h3 a { color: var(--accent); }
.agenda-post { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; margin-bottom: 6px; text-align: left; font: inherit;
               color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 0; cursor: pointer; }
.agenda-post.is-posted { opacity: .75; }
.agenda-time { width: 64px; flex: none; font-size: .78rem; font-weight: 700; color: var(--accent); }
.agenda-thumb { width: 40px; height: 40px; border-radius: 0; object-fit: cover; flex: none; }
.agenda-thumb.is-empty { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.agenda-thumb.is-empty .small { display: none; }
.agenda-main { display: grid; min-width: 0; font-size: .86rem; font-weight: 500; }

/* The "Writing" mark in the top bar while New post works in the background */
.writing-mark { display: inline-flex; align-items: center; gap: 7px; flex: none; height: 32px; padding: 0 12px;
                border-radius: 999px; background: var(--accent-soft); color: var(--text);
                font-size: .8rem; font-weight: 600; white-space: nowrap; cursor: default; }
.writing-mark .spinner { color: var(--accent); flex: none; }
@media (max-width: 760px) { .writing-mark { padding: 0; width: 32px; justify-content: center; }
                            .writing-mark span:not(.spinner) { display: none; } }

/* ---------- Review mode: one post at a time ---------- */
.focus-body { background: var(--bg); }
.focus { min-height: 100vh; display: grid; grid-template-rows: auto auto auto 1fr auto; max-width: 1100px; margin: 0 auto; padding: 0 var(--s4); }
.focus-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; }
.focus-count { font-weight: 700; font-size: .95rem; }
.focus-keys { min-width: 0; text-align: right; }
@media (max-width: 760px) { .focus-keys { display: none; } }
.focus-progress { height: 4px; border-radius: 0; background: var(--surface-2); overflow: hidden; }
.focus-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.focus-flashes .flashes { margin: var(--s3) 0 0; }
.slide { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); align-content: start; padding: var(--s5) 0 var(--s6); }
@media (min-width: 860px) { .slide { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); padding-top: var(--s8); } }
.slide-preview .igp { box-shadow: var(--shadow-pop); }
.slide-side { display: grid; gap: var(--s3); align-content: start; }
.slide-title { font-size: 1.5rem; line-height: 1.25; }
.slide-caption { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .98rem; line-height: 1.6; padding: var(--s4) var(--s5);
                 background: var(--surface); border: 1px solid var(--border); border-radius: 0; }
.slide-result { font-weight: 600; }
.slide-result.is-approved { color: var(--green); }
.slide-result.is-rejected { color: var(--red); }
.focus-actions { position: sticky; bottom: 0; display: flex; justify-content: center; gap: var(--s2); flex-wrap: wrap; padding: var(--s3) 0 var(--s5);
                 background: linear-gradient(to top, var(--bg) 70%, transparent); }
.focus-btn { height: 44px; padding: 0 18px; font-size: .92rem; }
.focus-btn kbd { font-family: var(--mono); font-size: .7rem; padding: 1px 5px; border-radius: 0; border: 1px solid currentColor; opacity: .55; }
.focus-btn.is-reject:hover { color: var(--red); border-color: var(--red); }
.focus-btn.is-approve { min-width: 150px; }
@media (max-width: 760px) {
  .focus-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .focus-btn.is-approve { grid-column: 1 / -1; order: -1; }
  .focus-btn kbd { display: none; }
}
.focus [aria-busy="true"] .focus-btn, .focus[aria-busy="true"] .focus-btn { opacity: .6; pointer-events: none; }
.focus-done { display: grid; justify-items: center; align-content: center; gap: var(--s3); text-align: center; padding: 60px var(--s4); }
.focus-done .icon { color: var(--green); }
.focus-done h1 { font-size: 1.6rem; }
.focus-body .undo-bar { left: 50%; bottom: 96px; }

/* Result line in the post popup (rewrite, save, new picture) */
.inline-msg { font-size: .84rem; padding: 8px 12px; border-radius: 0; background: var(--surface-2); color: var(--text-2); }
.inline-msg.is-ok { background: color-mix(in srgb, var(--green) 14%, var(--surface)); color: var(--text); }
.inline-msg.is-error { background: color-mix(in srgb, var(--red) 12%, var(--surface)); color: var(--red); }

/* Post popup: each side keeps its own height (opening "Add a picture" must not stretch the rewrite buttons) */
.post-editor { align-items: start; }
.post-editor-text, .post-editor-pic { align-content: start; }
.quick-chips { align-items: flex-start; align-content: flex-start; }
.chip-btn { height: auto; line-height: 1.4; }

.pic-edit { gap: 8px; padding: 10px 0 2px; }

/* Dialog subtitles wrap instead of being cut off */
.modal-head .agent-title { min-width: 0; }
.modal-head .agent-title p { white-space: normal; overflow: visible; text-overflow: clip; }

/* ---------- The menu column ----------
   Dark in both themes, so the shape of the app does not change when the lights go on.
   Redefining the tokens on .sidebar turns everything inside it (switcher, bell, links) to the dark set. */
.sidebar {
  --bg: var(--c-bg); --surface: var(--c-surface); --surface-2: #1B1E23; --hover: var(--c-hover);
  --border: var(--c-line); --border-strong: #3A4049; --text: var(--c-text); --text-2: var(--c-text-2); --muted: var(--c-muted);
  --accent: var(--c-accent); --accent-text: #1A0500; --accent-soft: #34130C; --primary: var(--c-accent); --primary-text: #1A0500;
  --shadow: none; color-scheme: dark; background: var(--c-bg); border-right: 0; color: var(--text);
}
.sidebar .logo-for-light { display: none !important; }
.sidebar .logo-for-dark { display: block !important; }
.sidebar .brand { font-family: var(--display); font-weight: 600; font-size: 1.08rem;
                  letter-spacing: .04em; text-transform: uppercase; }
.sidebar .switcher { background: transparent; }
/* This one is why the menu kept its old look: it sat after the rule above and won. The menu
   column is dark in both themes, so the solid block is defined once, here. */
.nav-link.is-on { background: var(--c-accent); color: #1A0500; box-shadow: none; font-weight: 600; }
.nav-link.is-on .icon { color: #1A0500; }
.nav-link.is-on .nav-count { background: rgba(26, 5, 0, .18); color: #1A0500; }
.nav-label { font-weight: 700; letter-spacing: .1em; font-size: .66rem; }
@media (min-width: 900px) {
  .shell { background: var(--c-bg); grid-template-columns: 232px minmax(0, 1fr); }
  .content { min-height: 100vh; }
}
/* Oswald is condensed and made for capitals, so page titles take them, with a little tracking
   to stop the letters closing up. It never runs long: titles here are one or two words. */
h1, .page-head h1 { font-family: var(--display); font-weight: 600; letter-spacing: .035em;
                    text-transform: uppercase; }
h1 { font-size: 1.65rem; }
.stat-value { font-family: var(--display); }

/* A panel with a dark header strip (the lid) and a small capital title */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.lid { display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--ink-text); padding: 9px 14px;
       font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.lid .icon { color: var(--c-accent); }
.lid-r { margin-left: auto; font-size: .8rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-muted); }
a.lid-r { color: var(--c-accent); }
.eyebrow { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Home: pipeline, gauges, week, board ---------- */
.home-grid { display: grid; gap: var(--s4); }
.pipeline { display: flex; align-items: flex-start; padding: 16px 14px 12px; overflow-x: auto; }
.stage { display: grid; justify-items: center; gap: 5px; min-width: 96px; padding: 6px 8px; border-radius: 0; color: var(--muted); text-align: center; }
.stage:hover { background: var(--surface-2); text-decoration: none; }
.stage-num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--border);
             background: var(--surface-2); color: var(--text); font: 600 1.08rem var(--display); }
.stage-name { font-size: .84rem; font-weight: 500; color: var(--text); white-space: nowrap; }
.stage-sub { font-size: .74rem; min-height: 1.2em; white-space: nowrap; }
.stage.is-need { background: var(--accent-soft); }
.stage.is-need .stage-num { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.stage.is-need .stage-name { font-weight: 700; }
.stage.is-need .stage-sub { color: var(--accent); font-weight: 600; }
.stage.is-live .stage-num { border-color: var(--green); color: var(--green); background: var(--good-soft); }
.stage.is-warn .stage-sub { color: var(--red); font-weight: 600; }
.wire { flex: 1; min-width: 24px; height: 2px; margin-top: 29px; background: var(--track); border-radius: 0; position: relative; overflow: hidden; }
.wire span { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.wire.is-done span { background: var(--green); }
.w-0 { width: 0; } .w-1 { width: 10%; } .w-2 { width: 20%; } .w-3 { width: 30%; } .w-4 { width: 40%; } .w-5 { width: 50%; }
.w-6 { width: 60%; } .w-7 { width: 70%; } .w-8 { width: 80%; } .w-9 { width: 90%; } .w-10 { width: 100%; }

.cockpit { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .cockpit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .cockpit { grid-template-columns: 1.3fr 1.9fr 1.6fr 1fr; } }
.gauge { display: grid; align-content: start; }
.gauge-body { padding: 14px 16px 16px; display: grid; gap: 10px; align-content: start; }
.gauge-big { font: 600 1.45rem/1.1 var(--display); }
.gauge-big small { display: block; margin-top: 3px; font: 500 .82rem var(--font); color: var(--muted); }
.ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring { width: 64px; height: 64px; flex: none; }
.ring circle { fill: none; stroke-width: 7; }
.ring .ring-bg { stroke: var(--track); }
.ring .ring-fg { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring.is-done .ring-fg { stroke: var(--green); }
.meter { height: 8px; border-radius: 0; background: var(--track); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 0; background: var(--green); }
.meter span.is-full { background: var(--amber); }

.day-axis { position: relative; height: 66px; margin: 4px 24px 0; }
.day-axis .rule, .day-axis .gone { position: absolute; left: 0; top: 28px; height: 2px; border-radius: 0; }
.day-axis .rule { right: 0; background: var(--track); }
.day-axis .gone { background: var(--green); }
.pin { position: absolute; top: 15px; transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; color: var(--accent); }
.pin:hover { text-decoration: none; }
.pin-dot { position: relative; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--accent); }
.pin-time { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.pin.is-live { color: var(--green); }
.pin.is-live .pin-dot { border-color: var(--green); background: var(--good-soft); }
.pin.is-free { color: var(--muted); }
.pin.is-free .pin-dot { border-style: dashed; border-color: var(--muted); }
.pin-count { position: absolute; top: -7px; right: -9px; font-size: .62rem; font-weight: 700; background: var(--accent); color: var(--accent-text); border-radius: 0; padding: 0 4px; }
.now-line { position: absolute; top: 2px; bottom: 4px; width: 0; border-left: 1.5px dashed var(--accent); }
.now-line span { position: absolute; top: -4px; left: 5px; font-size: .66rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.now-line.is-right span { left: auto; right: 5px; }
.gauge-note { font-size: .8rem; color: var(--muted); }
.gauge-note b { color: var(--text); }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-day { display: grid; gap: 5px; justify-items: center; font-size: .72rem; color: var(--muted); }
.week-day:hover { text-decoration: none; color: var(--text); }
.week-cells { display: grid; gap: 3px; width: 100%; max-width: 32px; }
.week-cells i { display: block; height: 10px; border-radius: 0; background: var(--track); }
.week-cells i.is-sched { background: var(--accent); }
.week-cells i.is-live { background: var(--green); }
.week-day.is-today { color: var(--text); font-weight: 700; }

.board { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .board { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lane { background: var(--surface-2); border: 1px solid var(--border); border-radius: 0; padding: 10px; display: grid; gap: 10px; align-content: start; min-width: 0; scroll-margin-top: 70px; }
.lane.is-need { border-color: var(--accent); background: var(--accent-soft); }
.lane-head { display: flex; align-items: center; gap: 7px; margin: 2px 4px 0; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lane-head .num { margin-left: auto; color: var(--text); font-size: .82rem; letter-spacing: 0; }
.lane-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.lane-dot.is-need { background: var(--accent); } .lane-dot.is-live { background: var(--green); } .lane-dot.is-warn { background: var(--red); }
.lane-hint { margin: -4px 4px 0; font-size: .78rem; color: var(--muted); }
.lane-empty { padding: 14px 6px; font-size: .82rem; color: var(--muted); text-align: center; }
.lane-more { font-size: .8rem; font-weight: 600; text-align: center; padding: 2px; }
.bcard { background: var(--surface); border: 1px solid var(--border); border-radius: 0; overflow: hidden; box-shadow: var(--shadow); }
.bcard-pic { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.bcard-pic img, .bcard-pic .is-empty { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.bcard-pic .is-empty { display: grid; place-items: center; align-content: center; gap: 4px; background: var(--surface-2); color: var(--muted); }
.bcard-body { padding: 9px 11px 11px; display: grid; gap: 3px; }
.bcard-body h3 { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.bcard-meta { font-size: .78rem; color: var(--muted); }
.bcard-meta.is-when { color: var(--accent); font-weight: 600; }
.bcard-meta.is-warn { color: var(--red); }
.bcard-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gauge-foot { padding: 0 16px 14px; }
.bcard-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Sign-in artwork: Flight paths on the dark brand panel, with two slow apricot washes */
.auth-brand { position: relative; overflow: hidden; isolation: isolate; background: var(--c-bg); }
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1;
  background: radial-gradient(circle, var(--c-accent), transparent 70%); animation: wash-drift 18s ease-in-out infinite; }
.auth-brand::before { width: 75%; height: 75%; left: -22%; top: -24%; opacity: .24; }
.auth-brand::after { width: 60%; height: 60%; right: -18%; bottom: -20%; opacity: .14; animation-delay: -9s; }
@keyframes wash-drift { 50% { transform: translate3d(5%, -4%, 0) scale(1.12); } }
.auth-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.auth-brand-inner { position: relative; }
.auth-brand .auth-name, .auth-brand .auth-tagline { text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.auth-name { font-family: var(--display); }
@media (prefers-reduced-motion: reduce) { .auth-brand::before, .auth-brand::after { animation: none; } }
.board { align-items: start; }
.pin.is-tight .pin-time { visibility: hidden; }

/* Counts beside headings are plain numbers, not pills */
.count, .count.is-warn { display: inline; min-width: 0; height: auto; padding: 0; margin-left: 6px; border-radius: 0; background: none; color: var(--muted); font-weight: 500; font-size: .9em; }

/* Instagram key helper */
.ig-msg { margin: -4px 0 0; color: var(--green); }
.ig-msg.is-error { color: var(--red); }
.ig-results { display: grid; gap: 6px; }
.ig-pick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
           padding: 8px 10px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); }
.ig-pick:hover { border-color: var(--border-strong); }
.ig-pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ig-pick-mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.ig-pick-text { display: grid; min-width: 0; }

/* Search */
.search-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border-radius: 0; cursor: pointer;
              border: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-size: .86rem; }
.search-btn:hover { color: var(--text); border-color: var(--border-strong); }
.search-btn kbd { margin-left: auto; font: 600 .7rem var(--font); border: 1px solid var(--border); border-radius: 0; padding: 0 5px; }
.mobile-search { margin-left: auto; }
.search-dlg { width: min(560px, calc(100vw - 24px)); }
.search-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.search-kind { font: 600 .84rem var(--font); padding: 6px 12px; border-radius: 0; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.search-kind[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 0; background: var(--surface); color: var(--muted); }
.search-field:focus-within { box-shadow: var(--focus); }
.search-field input { flex: 1; border: 0; box-shadow: none; background: transparent; padding: 10px 0; font-size: .95rem; min-width: 0; }
.search-field input:focus { box-shadow: none; outline: none; }
.search-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; }
.search-hit { display: grid; gap: 1px; padding: 8px 10px; border-radius: 0; color: var(--text); }
a.search-hit:hover, a.search-hit:focus-visible { background: var(--hover); text-decoration: none; }
.search-empty { padding: 10px; color: var(--muted); font-size: .86rem; }

/* Sign-in form: its own card, with the logo beside the title */
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow-pop); padding: 28px 26px 26px; }
@media (min-width: 900px) { .auth-card { max-width: 400px; padding: 32px 30px 30px; } }
.auth-title { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; }
.auth-title img { width: 34px; height: 34px; flex: none; }
.auth-card form { margin-top: var(--s5); }
.auth-card input { background: var(--surface-2); }
/* Keep autofilled fields in the theme's colours instead of the browser's blue */
.auth-card input:-webkit-autofill, .auth-card input:-webkit-autofill:hover, .auth-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px var(--surface-2) inset; caret-color: var(--text); transition: background-color 9999s; }

/* When a post has a picture, "New picture" sits beside Update, so the summary line is not needed */
.tool.is-from-button > summary { display: none; }
.tool.is-from-button[open] { margin-top: 4px; }

/* Pages use the width of a big screen instead of floating in the middle of it */
.page { max-width: 1400px; }
@media (min-width: 900px) { .page { padding: 32px 40px 72px; } }

/* Activity popup: one plain line per event */
.activity-dlg .modal-body { display: grid; gap: 6px; max-height: 70vh; overflow-y: auto; }
.act-filter { display: flex; gap: 6px; margin-bottom: 6px; }
.act-filter .search-kind[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.act-day { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 12px 0 2px; }
.act-list { list-style: none; margin: 0; padding: 0; display: grid; }
.act-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.act-row:last-child { border-bottom: 0; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transform: translateY(-1px); }
.act-row.is-success .act-dot { background: var(--green); }
.act-row.is-warning .act-dot { background: var(--amber); }
.act-row.is-error .act-dot { background: var(--red); }
.act-time { font-size: .78rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.act-detail summary { font-size: .78rem; color: var(--muted); cursor: pointer; margin-top: 2px; }
.act-detail p { margin: 4px 0 0; font-size: .8rem; color: var(--text-2); overflow-wrap: anywhere; }
.act-empty { color: var(--muted); padding: 12px 2px; }
.pic-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pic-actions .btn { justify-content: center; }

/* Post popup: more room on wide screens, so the picture tools are not squeezed */
@media (min-width: 1100px) {
}

/* Card grids use the page width. Each card is as tall as what's in it: stretching a short one
   to match a long one beside it just left a pane of empty space under its buttons. */
.settings-grid, .account-grid { max-width: none; }
@media (min-width: 900px) { .account-grid { align-items: start; } }
.act-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.act-filters select { width: auto; min-width: 140px; }

/* Search in the menu, with suggestions under it */
.gsearch-field { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--border); border-radius: 0;
                 color: var(--muted); cursor: text; }
.gsearch-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.gsearch-field input { flex: 1; min-width: 0; border: 0; background: transparent; box-shadow: none; padding: 8px 0; font-size: .86rem; color: var(--text); }
.gsearch-field input:focus { outline: none; box-shadow: none; }
.gsearch-field kbd { font: 600 .7rem var(--font); border: 1px solid var(--border); border-radius: 0; padding: 0 5px; }
.gsearch-field:focus-within kbd { display: none; }
.gsearch { position: relative; }
.gsearch-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70; display: grid; gap: 8px; padding: 10px; border-radius: 0;
               background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-pop); max-height: min(70vh, 560px); overflow: hidden; }
.gsearch-pop[hidden] { display: none; }
.gsearch-pop .search-results { max-height: calc(min(70vh, 560px) - 60px); }
.gsearch-pop .search-kind { padding: 5px 10px; font-size: .8rem; }

/* Gauges: shorter content sits in the middle of the card instead of leaving a gap below */
.gauge { grid-template-rows: auto 1fr; }
.gauge > .gauge-body { align-content: center; }
.gauge > .day-axis { align-self: center; }
.week-extra { font-size: .66rem; font-weight: 700; color: var(--accent); }
.lid .hint-btn { color: var(--ink-muted); }

/* Picture choices: big enough to judge, previewed before they are used */
.pic-options-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pic-options-head .muted { font-size: .76rem; }
.pic-options-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pic-option { border-width: 2px; }
.pic-option .pic-option-tag { opacity: 1; position: absolute; inset: auto 0 0 0; padding: 3px 6px; font-size: .7rem; font-weight: 600; color: #fff;
                              background: rgba(15, 14, 12, .62); text-align: left; }
.pic-option.is-current { border-color: var(--green); }
.pic-option.is-current .pic-option-tag { background: var(--green); color: #fff; }
.pic-option[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.pic-choose { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pic-choose[hidden] { display: none; }
.pic-choose > span { margin-right: auto; }

/* Dropdowns in the app's own style (see app.js): a button and a rounded list, no browser blue */
.cselect { position: relative; display: inline-block; vertical-align: middle; }
.cselect.is-full { display: block; }
.cselect-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; width: 100% !important; min-width: 0 !important; }
.cselect-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 7px 34px 7px 12px; position: relative;
               font: inherit; font-size: .9rem; text-align: left; color: var(--text); cursor: pointer;
               background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0; }
.cselect-btn::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
                      border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.cselect-btn[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: -1px; }
.cselect-btn:hover { border-color: var(--muted); }
.cselect-btn:focus-visible, .cselect-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); outline: none; }
.cselect-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect-list { position: fixed; z-index: 90; margin: 0; padding: 5px; list-style: none; max-height: 280px; overflow-y: auto;
                background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow-pop); }
.cselect-list[hidden] { display: none; }
.cselect-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px; border-radius: 0;
                   font-size: .9rem; color: var(--text); cursor: pointer; white-space: nowrap; }
.cselect-list li.is-active { background: var(--hover); }
.cselect-list li[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.cselect-list li[aria-selected="true"]::after { content: ""; width: 9px; height: 5px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
                                                 transform: rotate(-45deg) translateY(-2px); }
.cselect-list li[aria-disabled="true"] { opacity: .45; cursor: default; }

/* Home gauges: one shape for all four. A big visual in the middle, its caption underneath. */
.gauge { grid-template-rows: auto 1fr; }
.g-center { display: grid; justify-items: center; align-content: center; gap: 14px; padding: 18px 16px 18px; text-align: center; min-width: 0; }
.g-caption { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.4; max-width: 26ch; }
.g-caption b { color: var(--text); font-weight: 600; }
.g-caption span { display: block; font-size: .78rem; margin-top: 2px; }
.ring-big { position: relative; width: 120px; height: 120px; }
.ring-big .ring { width: 120px; height: 120px; }
.ring-big .ring circle { stroke-width: 10; }
.ring.is-limit .ring-fg { stroke: var(--green); }
.ring.is-limit.is-full .ring-fg { stroke: var(--amber); }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font: 600 2rem/1 var(--display); color: var(--text); }
.ring-num small { font-size: .5em; font-weight: 600; color: var(--muted); margin-left: 1px; }
.g-center .day-axis { width: 100%; margin: 0; align-self: center; }
.g-center .week-grid { width: 100%; }
.week-name { display: grid; justify-items: center; line-height: 1.2; }
.week-name em { font-style: normal; font-size: .64rem; font-weight: 700; color: var(--accent); }

.ring-num { display: flex; align-items: baseline; justify-content: center; align-content: center; flex-wrap: nowrap; }
.ring-big .ring-num { top: 50%; bottom: auto; transform: translateY(-50%); }

/* Flight plan: the part of the day that has gone is a quiet line; open times are dashed; passed empty times are small dots */
.day-axis .gone { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.pin.is-past { color: var(--muted); }
.pin.is-past .pin-dot { width: 12px; height: 12px; margin: 8px 0; background: var(--track); border: 0; }
.pin.is-past .pin-time { opacity: .7; }
.pin.is-free .pin-dot { background: var(--surface); }
.now-line span { background: var(--surface); padding: 0 3px; border-radius: 0; }
.day-axis .rule { left: 6%; right: 6%; }
.day-axis .gone { left: 6%; }

/* My account: name and password on the left, details on the right, no stretched gaps */
.account-col { display: grid; gap: var(--s4); align-content: start; min-width: 0; }
@media (min-width: 900px) { .account-grid { align-items: start; } }


/* Hints float above everything (placed by app.js), so cards and popups never cut them off */
.hint-pop { position: fixed; top: -9999px; left: -9999px; z-index: 120; }
.hint.is-open .hint-pop { display: block; animation: hint-in .12s ease-out; }

/* Removing a social account: set apart in red so it is not clicked by accident */
.danger-zone { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.danger-zone h2 { color: var(--red); }
.danger-zone .input-row input { max-width: 320px; }
.danger-zone .btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.danger-zone .btn-danger:hover { filter: brightness(1.08); color: #fff; background: var(--red); }

/* My account: "Emails  On (?)" on one line, the explanation in the hint */
.email-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.email-row h2 { margin: 0; }
.email-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.email-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.email-state.is-on::before { background: var(--green); }

/* ---------- Review one by one: a panel over the page content, the menu stays usable ----------
   Centre column: the post's words (the box fills the height) with the buttons under it.
   Right column: the Instagram preview. */
@media (min-width: 900px) {
}
.has-rpanel .content { overflow: hidden; max-height: 100vh; }
.rfocus { flex: 1; min-height: 0; max-width: none; margin: 0; padding: 0;
          display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; }
@media (min-width: 1000px) { .rfocus { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); } }

/* The visible post spreads its two parts over the panel's grid */
                  padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow); }
/* Narrow screens: the words, then the preview under them, scrolling together; the buttons stay put below */
@media (max-width: 999px) {
}

                  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* A person's popup: each column packs to the top instead of spreading out */
.person-editor { align-items: start; }
.person-editor > section { align-content: start; }

/* Temporary password message: stays until closed, password in its own box */
.flash-password { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--text); }
.flash-pass { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pass-code { font: 600 1rem var(--mono); padding: 4px 10px; border-radius: 0; background: var(--surface); border: 1px solid var(--border); user-select: all; color: var(--text); }
.flash-pass .small { flex-basis: 100%; color: var(--muted); }

/* New password popup: big, on top, one obvious Copy button */
.pass-dlg { width: min(520px, calc(100vw - 24px)); }
.pass-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.pass-body { display: grid; gap: 10px; }
.pass-label { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* The box and the button are one thing: the password, and the way to take it. Apart, with a
   dashed ember box shouting beside a solid ember button, the button looked stuck on. */
.pass-row { display: flex; align-items: stretch; }
.pass-code.is-big { flex: 1; min-width: 0; font-size: 1.15rem; padding: 11px 14px; letter-spacing: .03em;
                    overflow-wrap: anywhere; background: var(--surface-2);
                    border: 1px solid var(--border-strong); border-right: 0; }
.pass-row .btn { height: auto; min-width: 116px; justify-content: center; }
.pass-dlg .modal-foot { justify-content: space-between; gap: 12px; }

/* New post: the form on the left, what happens next beside it on wide screens */
.np-split { display: grid; gap: var(--s4); align-items: start; }
@media (min-width: 900px) { .np-split { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); } }
.np-preview { display: grid; gap: var(--s3); }
.np-frame { display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center;
            min-height: 420px; padding: var(--s5); border: 1px dashed var(--border-strong); border-radius: 0;
            background: var(--surface); }
.np-frame .icon { color: var(--muted); }
.np-frame h2 { font: 600 1rem var(--display); margin: 0; }
.np-frame p { margin: 0; max-width: 34ch; }
.np-frame.is-busy { border-style: solid; }
.np-side-title { display: flex; align-items: center; gap: 8px; font: 600 .95rem var(--display); margin: 0 0 10px; }
.np-side-title .icon { color: var(--accent); }
.np-steps { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); font-size: .9rem; line-height: 1.5; }

/* Home's chart: one column a day. Published and turned down stack; a line marks what was written.
   The bars grow once when the page opens (transform only), and a day's figures appear on hover. */
.chart-panel .lid-r { display: flex; align-items: center; gap: var(--s3); }
/* The "published by" filter sits on the dark lid, so its box follows the lid's own colours. */
.chart-who select { width: auto; min-height: 28px; padding: 0 26px 0 10px; font-size: .78rem;
                    background-color: var(--ink-2); border-color: var(--c-line); color: var(--ink-text); }
.chart-who select:focus { border-color: var(--c-accent); }
@media (max-width: 620px) { .chart-who select { max-width: 150px; } }
.chart-body { padding: var(--s4) var(--s5) var(--s5); }
.chart-figures { display: flex; align-items: flex-end; gap: var(--s6); flex-wrap: wrap; margin-bottom: var(--s5); }
.figure { display: flex; align-items: baseline; gap: 10px; }
.figure b { font-size: 1.9rem; line-height: 1; color: var(--text); }
.figure.is-waiting b { color: var(--accent); }
.figure span { display: grid; font-size: .82rem; color: var(--text-2); }
.figure em { font-style: normal; font-size: .76rem; color: var(--muted); }

.chart-plot { display: flex; align-items: flex-end; gap: 8px; height: 200px; }
.chart-plot.is-dense { gap: 2px; }
.cday { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end;
       align-items: center; gap: 8px; height: 100%; border-radius: 0; text-decoration: none; }
.cday:hover, .cday:focus-visible { background: var(--surface-2); text-decoration: none; }
.cday-stack { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.cday-bar { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; height: 100%; gap: 2px; }
.cday-part { width: 100%; border-radius: 0; transform: scaleY(0); transform-origin: bottom;
            transition: transform 620ms cubic-bezier(.22, 1, .36, 1); }
/* The chart is the one place the bright ember runs at full strength in both themes. Today is
   marked by a line under it rather than by a different colour. */
.cday-part.is-live { background: var(--chart); min-height: 3px; }
.is-grown .cday-part { transform: scaleY(1); }
.cday-name { font-size: .74rem; color: var(--muted); white-space: nowrap; min-height: 1em; }
.cday.is-today .cday-name { color: var(--text); font-weight: 500; }
.cday.is-today .cday-stack { box-shadow: inset 0 -3px 0 var(--text); }

.cday-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px); z-index: 5;
           display: grid; gap: 3px; width: max-content; max-width: 200px; padding: 9px 11px; pointer-events: none;
           background: var(--surface); border: 1px solid var(--border); border-radius: 0;
           box-shadow: 0 10px 26px rgba(0, 0, 0, .22); font-size: .78rem; color: var(--text-2);
           opacity: 0; visibility: hidden; transition: opacity 150ms cubic-bezier(.2, .8, .2, 1),
           transform 150ms cubic-bezier(.2, .8, .2, 1), visibility 0s 150ms; }
.cday-tip b { color: var(--text); font-size: .8rem; }
.cday-tip span { display: flex; align-items: center; gap: 7px; }
.cday:hover .cday-tip, .cday:focus-visible .cday-tip { opacity: 1; visibility: visible;
                                                   transform: translate(-50%, 0); transition-delay: 0s; }
.cday:first-child .cday-tip { left: 0; transform: translate(0, 4px); }
.cday:first-child:hover .cday-tip { transform: translate(0, 0); }
.cday:last-child .cday-tip { left: auto; right: 0; transform: translate(0, 4px); }
.cday:last-child:hover .cday-tip { transform: translate(0, 0); }

.chart-key { display: flex; gap: var(--s4); flex-wrap: wrap; margin: var(--s4) 0 0; font-size: .78rem; color: var(--muted); }
.chart-key span { display: flex; align-items: center; gap: 7px; }
.chart-best { margin-left: auto; }
@media (prefers-reduced-motion: reduce) {
  .cday-part { transition: none; transform: scaleY(1); }
  .cday-tip { transition: none; }
}

/* Calendar: the week strip above the day */
.week-strip { display: flex; gap: 4px; flex-wrap: wrap; }
.week-chip { display: flex; align-items: baseline; gap: 6px; padding: 5px 11px; border-radius: 0;
             border: 1px solid var(--border); background: var(--surface); font-size: .84rem; color: var(--text-2); }
.week-chip:hover { text-decoration: none; border-color: var(--accent); }
.week-chip.is-today .week-chip-name { font-weight: 700; color: var(--text); }
.week-chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.week-chip.is-on .week-chip-name { color: inherit; font-weight: 600; }
.week-chip-num { font-size: .78rem; opacity: .75; }
.btn.is-off { opacity: .35; cursor: default; pointer-events: none; }
/* Tomorrow: shown so the row keeps its shape, but there is nothing there to open yet. */
.week-chip.is-ahead { color: var(--muted); border-style: dashed; cursor: default; opacity: .55; }
.week-chip.is-ahead:hover { border-color: var(--border); }


/* A small menu button (New post: which brand the post is for) */
.picker { position: relative; }
.picker > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.picker > summary::-webkit-details-marker { display: none; }
.picker[open] > summary .icon:last-child { transform: rotate(180deg); }
.picker-list { position: absolute; z-index: 20; right: 0; top: calc(100% + 6px); min-width: 220px; margin: 0; padding: 6px;
               list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 0;
               box-shadow: var(--shadow-lg, var(--shadow)); }
.picker-list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 0;
                      background: none; color: var(--text); font: inherit; cursor: pointer; }
.picker-list button:hover { background: var(--surface-2); }
.picker-list button.is-on { background: var(--accent-soft); color: var(--accent-ink, var(--text)); font-weight: 600; }
.np-wait { margin-left: auto; }

/* "Common rewrites" / "Common fixes" beside the box they fill */
.ask-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Account id and the button that asks the service again, so nobody has to find Enter. */
.extra-row { display: flex; gap: 8px; align-items: center; }
.extra-row input { flex: 1; min-width: 0; }
.extra-row .btn { flex: none; }
.ask-row .cselect { flex: 0 0 auto; }
.ask-row input { flex: 1 1 220px; min-width: 0; }

/* Bots: the bot and its key side by side, and the "different bot for pictures" block */
.bot-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 2fr); gap: var(--s3); align-items: end; }
@media (max-width: 560px) { .bot-row { grid-template-columns: 1fr; } }
.bot-split { display: grid; gap: var(--s3); padding: var(--s3) var(--s4) var(--s4); border: 1px solid var(--border);
             border-radius: 0; background: var(--surface-2); }
.bot-split[hidden] { display: none; }
.bot-list { list-style: none; margin: 0; padding: 0; }
.bot-item { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.bot-item:last-child { border-bottom: 0; }
.bot-item-main { flex: 1; min-width: 0; }
.bot-item-main h2 { font: 600 1rem var(--display); margin: 0 0 2px; }


/* Posts as Instagram-style cards: head, square picture, caption */
/* The whole card opens the post, so it says so. The controls inside keep their own cursor. */
.ig-card { cursor: pointer; overflow: hidden; display: flex; flex-direction: column; }
.ig-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 12px; }
.ig-card-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ig-card-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
                  background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: .8rem; flex: none; }
.ig-card-name { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The mark on a card that has trouble. It sits in the header, where it takes no height of its own,
   so a failed post and the ones beside it stay exactly the same shape. */
.ig-card-flag { flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
                border: 0; border-radius: 50%; background: none; color: var(--red); cursor: pointer; }
.ig-card-flag:hover, .ig-card-flag:focus-visible { background: color-mix(in srgb, var(--red) 16%, transparent); }
/* The message itself, in the popup. Long enough ones scroll instead of stretching it. */
.post-trouble { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 20px;
                max-height: 6.5em; overflow-y: auto; border-bottom: 1px solid var(--border); }
.post-trouble .icon { flex: none; margin-top: 1px; }
.ig-card-menu > summary { display: inline-flex; align-items: center; gap: 5px; }
.ig-card-more .icon { transition: transform 150ms cubic-bezier(.2, .8, .2, 1); }
.ig-card-menu[open] .ig-card-more .icon { transform: rotate(180deg); }
.ig-card-pic { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; background: var(--surface-2);
               cursor: pointer; overflow: hidden; }
.ig-card-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-card-nopic { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px;
                 color: var(--muted); }
.ig-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ig-card-cap { margin: 0; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; }
.ig-card-foot { margin: auto 0 0; padding-top: 4px; }  /* the id and time sit on the bottom line of every card */
.picker-list form { display: block; }
.picker-list form button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0;
                           border-radius: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.picker-list form button:hover { background: var(--surface-2); }
.picker-list form button.is-danger { color: var(--danger, #e2725b); }
.picker-list a { display: block; padding: 8px 10px; border-radius: 0; color: var(--text); }
.picker-list a:hover { background: var(--surface-2); text-decoration: none; }


/* The post popup: the editor in the card, the Instagram preview beside it on the dark backdrop */
.modal-split { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0;
               background: none; box-shadow: none; overflow: visible; }
/* Only when it's open: a bare "display" here would override the browser's own "closed means hidden".
   The box is a fixed height so it never resizes as the caption opens. A popup that grows is
   re-centred by the browser on the spot, which threw the halves about as they moved. Each half
   sits in the middle of that steady box, so opening a caption moves nothing but the caption. */
.modal-split[open] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: var(--s4);
                     align-items: center; height: calc(100vh - 48px); }
.split-main { display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - 48px); overflow: auto;
              background: var(--surface); border: 1px solid var(--border); border-radius: 0;
              box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.split-preview { max-height: calc(100vh - 48px); overflow-y: auto; padding-bottom: 2px; }
.split-preview .igp { box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
@media (max-width: 1000px) {
  /* Stacked, but the popup still fits the screen: it scrolls as one, so the top never runs off. */
  .modal-split[open] { grid-template-columns: minmax(0, 1fr); height: auto; align-items: start; }
  .modal-split { max-height: calc(100vh - 32px); overflow: auto; }
  .split-main, .split-preview { max-height: none; overflow: visible; }
  .split-preview { order: -1; }  /* on a narrow screen the picture comes first, like a phone feed */
}

/* All posts: the account menu and search sit clear of the toolbar's bottom line */
.acct-filter { margin-left: auto; }
.toolbar .search { margin-left: 0; }
.toolbar .acct-filter, .toolbar .search { margin-bottom: var(--s3); }

/* A published post has nothing to edit: its words read as one calm column */
.post-editor.is-one-column { grid-template-columns: minmax(0, 1fr); }
.post-caption { white-space: pre-wrap; line-height: 1.6; }

/* History: hovering an entry shows the post itself. It's placed by the script (app.js) in fixed
   coordinates, so the day's card can never cut it off. */
.hpost { position: relative; }
.hpost.is-peeking { z-index: 41; }  /* the hovered entry sits above its neighbours */
.hpost-peek { position: fixed; z-index: 40; width: 260px; max-height: calc(100vh - 16px); display: grid; gap: 8px;
              padding: 10px; text-align: left; pointer-events: none; overflow: hidden;
              background: var(--surface); border: 1px solid var(--border); border-radius: 0;
              box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
              opacity: 0; visibility: hidden; transform: translateX(-4px);
              transition: opacity 150ms cubic-bezier(.2, .8, .2, 1), transform 150ms cubic-bezier(.2, .8, .2, 1),
                          visibility 0s 150ms; }
.hpost-peek img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0; display: block; }
.hpost-peek-text { font-size: .8rem; line-height: 1.5; color: var(--text-2); white-space: pre-wrap; overflow: hidden; }
.hpost.is-peeking .hpost-peek { opacity: 1; visibility: visible; transform: translateX(0); transition-delay: 0s; }
@media (max-width: 900px) { .hpost-peek { display: none; } }
@media (prefers-reduced-motion: reduce) { .hpost-peek { transition: none; } }

/* Messages in the top right while something slow happens, and what came of it */
/* Under the top bar, not over it: every message from the server comes through here now, and at
   16px they sat on top of the search box and the account chip. */
.toasts { position: fixed; top: 74px; right: 16px; z-index: 60; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; border-radius: 0;
         background: var(--surface); border: 1px solid var(--border); box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
         font-size: .86rem; color: var(--text);
         opacity: 0; transform: translateY(-6px);
         transition: opacity 150ms cubic-bezier(.2, .8, .2, 1), transform 150ms cubic-bezier(.2, .8, .2, 1); }
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast .spinner { color: var(--accent); flex: none; }
.toast-text { flex: 1; min-width: 0; line-height: 1.4; }
.toast-link { font-size: .8rem; font-weight: 500; white-space: nowrap; }
.toast-x { border: 0; background: none; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer;
           padding: 0 2px; flex: none; }
.toast-x:hover { color: var(--text); }
.toast.is-ok { border-left: 3px solid var(--green); }
.toast.is-error { border-left: 3px solid var(--red); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; opacity: 1; transform: none; } }

/* A button that says which key does the same thing */
.key-btn { display: inline-flex; align-items: center; gap: 7px; }
.key-btn kbd { font: 600 .7rem var(--mono); padding: 1px 5px; border-radius: 0; border: 1px solid currentColor;
               opacity: .6; line-height: 1.4; }
@media (max-width: 560px) { .key-btn kbd { display: none; } }

/* The close button when a stray click tried to throw away what you typed */
.is-asking { color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); border-radius: 0; }

/* Add a bot: the form, and what the service said about the key beside it */
.add-bot .bot-split-form { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 760px) { .add-bot .bot-split-form { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); } }
.bot-found { border: 1px solid var(--border); border-radius: 0; background: var(--surface-2); padding: var(--s4); }
.bot-found-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: var(--s4) 0; }
.bot-found-empty .icon { color: var(--muted); }
.bot-found-empty p { margin: 0; max-width: 28ch; }
.bot-found-service { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 1rem; }
.bot-found .facts { margin: 0 0 10px; }
.bot-found .facts dd { word-break: break-word; }
.bot-found p:last-child { margin: 0; }

/* A post card while it's being published */
.ig-card.is-busy { position: relative; pointer-events: none; }
.ig-card.is-busy::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
                          background: var(--accent-soft); opacity: .55; }
.ig-card.is-busy > *:not(.card-busy) { opacity: .45; filter: saturate(.6); }
.card-busy { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center;
             justify-content: center; gap: 9px; padding: 12px; font-size: .86rem; font-weight: 500;
             color: var(--accent-text); background: var(--accent);
             border-radius: 0; }
.card-busy .spinner { color: currentColor; }

/* New post: the topic box with "Suggest one" beside it */
.topic-row { display: flex; gap: 8px; align-items: stretch; }
.topic-row input { flex: 1; min-width: 0; }
.suggest-btn { flex: none; white-space: nowrap; background: var(--accent-soft); border-color: var(--accent);
               color: var(--accent); font-weight: 500; }
.suggest-btn:hover { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.suggest-btn .icon { color: currentColor; }
@media (max-width: 560px) { .topic-row { flex-direction: column; } .suggest-btn { align-self: flex-start; } }
