/* Persook Admin: "Paper & Ink", as designed in the Persook canvas (Admin artboards). */
:root {
  --paper: #F6F1E7; --card: #FFFCF6; --ink: #1C1A17; --muted: #5C554B; --faint: #7A7266;
  --line: #E4DAC8; --line-strong: #D8CCB6; --soft: #EFE8DA; --accent: #B23A22; --accent-soft: #F7E3DC;
  --accent-ink: #8F2B17; --link: #24477A; --info-soft: #E2EAF5; --ok: #2F7A45; --media: #E8D9BF;
  --serif: "Newsreader", Georgia, serif; --sans: "Atkinson Hyperlegible Next", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.45 var(--sans); }
a { color: var(--link); }
a:hover { color: #16305a; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 22px; line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* ---------- layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; padding: 24px 16px; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { padding: 0 10px; display: flex; align-items: center; gap: 8px; }
.brand-logo { display: block; height: 28px; width: auto; }
.brand-name { font: 700 24px var(--serif); letter-spacing: -0.01em; }
.brand-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--ink); font-weight: 600; text-decoration: none; }
.sidebar nav a:hover { background: var(--soft); }
.sidebar nav a[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 700; }
.sidebar nav a .grow { flex-grow: 1; }
/* The other admin (server ↔ news desk), set apart under the sections */
.sidebar nav a.other-admin { margin-top: 12px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 4px; }
.badge { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--card);
  font-size: 12px; font-weight: 700; text-align: center; }
.sidebar nav a[aria-current="page"] .badge { background: #FF8A6B; color: var(--ink); }
.account { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column;
  gap: 4px; font-size: 13px; overflow-wrap: anywhere; }
.main { flex-grow: 1; min-width: 0; padding: 26px 36px 48px; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head > div { display: flex; flex-direction: column; gap: 4px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 21px; border: 1.5px solid var(--line-strong); background: transparent; font-weight: 700;
  text-decoration: none; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--soft); color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #33302b; color: var(--paper); }
.btn-danger { border-color: var(--accent); color: var(--accent-ink); }
.btn-danger:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn-sm { min-height: 36px; padding: 0 12px; border-radius: 18px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.link { border: 0; background: none; padding: 0; color: var(--link); font-weight: 700; cursor: pointer; text-decoration: underline; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.input, select.input, textarea.input { min-height: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--card); font-size: 15px; font-weight: 600; color: var(--ink); }
textarea.input { padding: 10px 12px; font-weight: 400; line-height: 1.45; min-height: 90px; resize: vertical; width: 100%; }
.input-wide { width: 100%; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); min-height: 42px; }
label.check input { width: 18px; height: 18px; accent-color: var(--ink); }
form.inline { display: inline; margin: 0; }
.fetch { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.fetch .input[type=number] { width: 84px; }

/* ---------- messages ---------- */
.notice { padding: 12px 16px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); font-weight: 600; }
.notice.error { background: var(--accent-soft); border-color: #E9B8A9; color: var(--accent-ink); }
.notice.progress { display: flex; align-items: center; gap: 12px; background: var(--info-soft); border-color: #C9D6EA; color: var(--link); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin 0.9s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---------- cards & stats ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { flex: 1 1 200px; padding: 12px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; }
.stat .label { font-size: 12px; font-weight: 700; color: var(--muted); }
.stat .value { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--faint); }
.dot.on { background: var(--ok); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip-link[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- stories table ---------- */
.table { overflow: hidden; }
.row { display: grid; grid-template-columns: 56px 32px 112px minmax(0, 1fr) 160px 96px 80px 132px; align-items: center;
  gap: 12px; padding: 10px 16px; border-bottom: 1px solid #EFE7D8; }
.inline-only { display: none; }
.row:last-child { border-bottom: 0; }
.row.head { border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); }
.row.is-hidden { background: #FAF6EE; }
.row.is-hidden .title { color: var(--muted); }
.rank { font-size: 15px; font-weight: 700; color: var(--accent); }
.thumb { display: block; width: 112px; height: 63px; border-radius: 8px; object-fit: cover; background: var(--media); }
.thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; font-weight: 700; }
.story { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.title { font: 600 17px/1.25 var(--serif); }
.story .meta { font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.num { font-size: 14px; font-weight: 600; }
.switch { position: relative; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 13px; background: #CFC4B1; cursor: pointer; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px;
  background: var(--card); transition: left 0.15s; }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { left: 21px; }
.switch[aria-busy="true"] { opacity: 0.6; }
.status { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status .fail-reason { flex-basis: 100%; color: var(--accent-ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.chip-done { background: var(--ink); color: var(--paper); }
.chip-unchecked { border: 1px dashed #C9BCA5; color: var(--muted); text-decoration: none; }
.chip-sensitive { background: #FBEBD9; color: #8A4B12; }
.source-text { white-space: pre-wrap; max-height: 360px; overflow: auto; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line, #E4DAC8); border-radius: 10px; font-size: 14px; line-height: 1.55; }
.chip-running { background: var(--info-soft); color: var(--link); }
.chip-queued { border: 1px solid #C9BCA5; color: #4A443B; padding: 3px 10px; }
.chip-failed { background: var(--accent-soft); color: var(--accent-ink); }
.chip-off { background: var(--soft); color: #4A443B; }
.chip-hidden { background: transparent; border: 1px dashed #C9BCA5; color: var(--muted); padding: 3px 9px; }
/* Video requests between the server and the PC (video_requests.py) */
.chip-requested { border: 1.5px dashed var(--link); color: var(--link); padding: 2.5px 8.5px; }
.chip-picked, .chip-from-server { background: var(--info-soft); color: var(--link); }
.notice.note { background: var(--info-soft); border-color: #C9D6EA; font-weight: 500; }
.footnote { font-size: 13px; color: var(--muted); }
.empty-state { padding: 40px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---------- comments ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.comment { display: flex; gap: 24px; padding: 16px 18px; align-items: center; }
.comment + .comment { margin-top: 12px; }
.comment .body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.avatar { width: 32px; height: 32px; border-radius: 16px; background: var(--media); display: flex; align-items: center;
  justify-content: center; font: 700 15px var(--serif); flex-shrink: 0; }
.comment p { margin: 0; font-size: 16px; line-height: 1.5; color: #2C2823; white-space: pre-line; overflow-wrap: anywhere; }
.comment .decide { flex-shrink: 0; display: flex; gap: 8px; }

/* ---------- forms & settings ---------- */
.section { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.media-row { display: flex; gap: 16px; flex-wrap: wrap; }
.media-row figure { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.media-row img, .media-row video { width: 256px; height: 144px; object-fit: cover; border-radius: 10px; background: var(--media); }
table.plain { width: 100%; border-collapse: collapse; }
table.plain th, table.plain td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #EFE7D8; vertical-align: middle; }
table.plain th { font-size: 12px; font-weight: 700; color: var(--muted); }
.sources { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
code { font-size: 13px; background: var(--soft); padding: 1px 5px; border-radius: 5px; }

/* ---------- sign-in ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login .card { width: 100%; max-width: 420px; padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.login .brand { padding: 0; }
.login h1 { font-size: 28px; }
.login p { margin: 0; }
.login form { display: flex; flex-direction: column; gap: 14px; }
.login label.field { font-size: 14px; color: var(--ink); }
.login .more { font-weight: 700; }
.ink { color: var(--ink); }
.login .input { width: 100%; min-height: 52px; font-size: 17px; font-weight: 500; border: 1.5px solid var(--ink); background: #fff; }
.login .code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 26px; letter-spacing: 0.4em; text-align: center; }
.login .btn { min-height: 52px; border-radius: 26px; width: 100%; font-size: 16px; }

/* ---------- narrow screens (phones) ---------- */
@media (max-width: 1180px) {
  .row.head { display: none; }
  .row { grid-template-columns: 52px 112px minmax(0, 1fr); grid-template-areas: "switch thumb story" "switch thumb status" "switch thumb actions";
    align-items: start; row-gap: 8px; }
  .row > :nth-child(2), .row > .num { display: none; }
  .row > :nth-child(1) { grid-area: switch; }
  .row > :nth-child(3) { grid-area: thumb; }
  .row > .story { grid-area: story; }
  .row > .status-cell { grid-area: status; }
  .row > .actions { grid-area: actions; }
  .inline-only { display: inline; }
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap;
    padding: 12px 16px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; flex-grow: 1; }
  .sidebar nav a { min-height: 40px; padding: 0 10px; }
  .sidebar nav a svg { display: none; }
  .account { margin: 0; padding: 0; border: 0; flex-direction: row; align-items: center; gap: 10px; }
  .account .muted, .account strong { display: none; }
  .main { padding: 18px 16px 40px; }
  h1 { font-size: 28px; }
  .row { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "switch story" "switch status" "switch actions"; }
  .row > :nth-child(3) { display: none; }
  .comment { flex-direction: column; align-items: stretch; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- additions ---------- */
.scroll-x { overflow-x: auto; }
.media-empty { width: 256px; height: 144px; }
.zone { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid #EFE7D8; }
.zone-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.zone p, .section p { margin: 0; }
.place .coord { width: 110px; }
.place .country { width: 64px; text-transform: uppercase; }

/* ---------- notifications ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; max-width: 1080px; }
.compose-form { display: flex; flex-direction: column; gap: 14px; }
.compose h2, .section-title { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.compose p { margin: 0; }
.preview { display: flex; flex-direction: column; gap: 8px; }
.phone-shade { padding: 16px 12px; border-radius: 18px; background: #23201D; }
.phone-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 18px; background: #33302B; color: #EEE7DA; }
.app-mark { flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #FFFCF6;
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 19px; font-weight: 700; }
.note-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 14px; line-height: 1.35; color: #CFC6B8; overflow-wrap: anywhere; }
.note-text strong { font-size: 15px; color: #EEE7DA; }
.note-meta { font-size: 12px; color: #B3AA9C; }
.sent-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 200px 110px; gap: 16px; align-items: baseline;
  padding: 12px 18px; border-bottom: 1px solid #EFE7D8; }
.sent-row:last-child { border-bottom: 0; }
.sent-row.head { border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.stat form { margin-top: 2px; }
.stat label.check.small { min-height: 32px; font-size: 13px; }
@media (max-width: 900px) {
  .compose { grid-template-columns: 1fr; }
  .sent-row { grid-template-columns: 1fr; gap: 2px; }
  .sent-row.head { display: none; }
}

/* ---------- world desks (News page) ---------- */
.desks { padding: 16px 18px 10px; display: flex; flex-direction: column; gap: 10px; }
.desks-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.desks-head h2 { font-size: 20px; }
.desks-fetch { display: flex; align-items: center; gap: 14px; }
.desk-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.desk-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line);
  break-inside: avoid; font-weight: 600; }
.desk-list .muted { font-weight: 500; text-align: right; }
.desks-day { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.desks-day .input { width: auto; min-height: 34px; padding: 4px 8px; }

/* Settings → Videos: who makes the videos, how many, the SnapGen key. */
.stack-sm { display: flex; flex-direction: column; gap: 14px; }
fieldset.engines, fieldset.counts { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
fieldset.engines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
fieldset.engines legend, fieldset.counts legend { padding: 0; margin-bottom: 8px; }
.field-legend { font-size: 12px; font-weight: 700; color: var(--muted); }
.engine { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; }
.engine:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.engine input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex-shrink: 0; }
.engine > span { display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 760px) { fieldset.engines { grid-template-columns: minmax(0, 1fr); } }
.fail-reason-inline { color: var(--accent-ink); }
fieldset.desk-switches { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
fieldset.desk-switches legend { padding: 0; margin-bottom: 4px; }
fieldset.theme-list { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 14px; }
fieldset.theme-list legend { padding: 0; margin-bottom: 4px; }
.theme-option { align-items: center; gap: 10px; }
.theme-option .swatch { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.daily-today, .daily-messages { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.daily-messages { margin-top: 8px; font-size: 14px; }
.daily-line { margin: 0 0 12px; }

/* ---------- social (Admin → Social, canvas artboard SocialAdmin) ---------- */
.social-grid { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 18px; align-items: start;
  grid-template-columns: 290px minmax(0, 1fr); }
.social-grid > section:last-child { grid-column: 1 / -1; }
@media (min-width: 1700px) { .social-grid { grid-template-columns: 290px minmax(0, 1fr) 400px; }
  .social-grid > section:last-child { grid-column: auto; } }
.social-preview { align-items: flex-start; }
.social-preview video, .social-empty { width: 246px; aspect-ratio: 9 / 16; border-radius: 14px; background: var(--paper);
  border: 1px solid var(--line); }
.social-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.social-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.social-rows { display: flex; flex-direction: column; }
.social-row { display: grid; grid-template-columns: 28px 64px 112px minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #EFE7D8; }
.social-row:last-child { border-bottom: 0; }
.social-row.is-off .title, .social-row.is-off .thumb { opacity: 0.55; }
.social-row .story .input { min-height: 38px; font-size: 14px; font-weight: 500; }
.social-order { width: 64px; }
.social-posts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.social-accounts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.social-accounts li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.social-accounts strong { width: 90px; }
.social-token { display: flex; gap: 8px; align-items: center; }
.social-token .input { width: 260px; }
.social-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--paper); }
.social-music { width: 100%; max-width: 420px; height: 36px; }
.social-tiktok fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.social-tiktok > fieldset { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.social-tiktok video { width: 200px; aspect-ratio: 9 / 16; border-radius: 14px; background: var(--paper); }
.social-tiktok-fields { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.social-tiktok-fields p { margin: 0; }
.social-tiktok-checks { display: flex; flex-direction: column; gap: 6px; }
.social-tiktok-checks legend { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.social-tiktok-brand { display: flex; flex-direction: column; gap: 6px; padding-left: 24px; }
.social-tiktok-brand[hidden] { display: none; }
.social-tiktok .check-label { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.social-tiktok-fields button { align-self: flex-start; }
@media (max-width: 900px) { .social-grid { grid-template-columns: minmax(0, 1fr); }
  .social-row { grid-template-columns: 28px 64px minmax(0, 1fr); } .social-row .thumb { display: none; } }
.readers-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.readers-stats .big { font-family: var(--serif, 'Newsreader', Georgia, serif); font-size: 34px; line-height: 1; }
.readers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; align-items: start; }

/* ---------- settings pages (2026-10-17) ---------- */
.settings-head > div { gap: 12px; }
.mix-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.mix-layout .cost { position: sticky; top: 20px; }
table.mix, table.cost-table { border-collapse: collapse; width: 100%; font-size: 15px; }
table.mix th, table.mix td, table.cost-table th, table.cost-table td { padding: 8px 10px; border-bottom: 1px solid #EFE7D8;
  text-align: start; vertical-align: middle; }
table.mix thead th { font-size: 12px; font-weight: 700; color: var(--muted); border-bottom-color: var(--line); }
table.mix tbody th, table.cost-table th { font-weight: 600; }
table.cost-table th span { display: block; font-weight: 400; }
table.mix .n, table.cost-table .n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.cost-table tr.total th, table.cost-table tr.total td { font-weight: 700; font-size: 16px; }
.input.num { width: 84px; }
.input.num-wide { width: 110px; }
.price { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
@media (max-width: 1100px) {
  .mix-layout { grid-template-columns: 1fr; }
  .mix-layout .cost { position: static; }
}
.sources-pick { list-style: none; padding-left: 0; gap: 2px; }
.sources-pick .check { align-items: flex-start; }
.checks summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.checks ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.checks .check-mark { display: inline-flex; justify-content: center; width: 18px; font-weight: 700; }
.checks .check-ok .check-mark { color: var(--ok); }
.checks .check-look .check-mark { color: #8A4B12; }
.checks .check-problem { color: var(--accent-ink); }
.table-scroll { overflow-x: auto; }
.checklist-table td { font-size: 13px; white-space: nowrap; }
.checklist-table .check-ok { color: var(--ok); }
.checklist-table .check-problem { color: var(--accent-ink); font-weight: 700; }
.checklist-table .check-wait { color: var(--muted); }
/* Analytics (analytics.py; canvas "Analytics: what to keep, remove or add") */
.chip-keep { background: #E3F0E6; color: #1F5A33; }
.chip-grow { background: #DCE9F5; color: #1D4A73; }
.chip-watch { background: #F7EBD2; color: #7A5212; }
.chip-remove { background: #F6DDD6; color: #8E2F1B; }
.trend-up { color: #1F6B3A; font-weight: 700; }
.trend-down { color: #A3361F; font-weight: 700; }
.todo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo p { margin: 2px 0 0; }
.todo.settled { opacity: 0.55; }
.todo form { display: flex; gap: 8px; flex-wrap: wrap; }
.share-bar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.share-bar .track { flex-grow: 1; height: 8px; border-radius: 4px; background: var(--soft); }
.share-bar .fill { height: 8px; border-radius: 4px; background: var(--ink); }

/* Reports (reports.html) */
.report { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.report:first-of-type { border-top: 0; }
.report-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.report-text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-code { display: block; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--soft); overflow-wrap: anywhere; }
.report-stack { max-height: 280px; overflow: auto; font-size: 12px; padding: 10px; background: var(--soft); border-radius: 8px; white-space: pre-wrap; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 720px) { .report { grid-template-columns: 1fr; } .report-actions { justify-content: flex-start; } }
