@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
/* MDA Inbox — My Diet Aid brand: black ink, white paper, MDA red for actions; sage stays for "shared with team". */
:root {
  --ink: #1a1a1a;
  --ink-2: #4b4846;
  --muted: #77726f;
  --paper: #f6f5f3;
  --panel: #ffffff;
  --line: #e5e1de;
  --hover: #f1eeeb;
  --select: #f4ecea;
  --red: #b3261e;
  --red-soft: #fbe7e4;
  --brand: #d9230a;          /* MDA logo red, a touch deeper so white text on it stays readable */
  --brand-hover: #b81d08;
  --brand-soft: #fdebe7;
  --brand-ink: #ffffff;
  --rail: #151515;
  --sage: #2f6b5a;
  --sage-soft: #e2efe9;
  --out: #e9f3ee;
  --in: #ffffff;
  --amber: #8a5a00;
  --amber-soft: #fbefd6;
  --focus: #d9230a;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Nastaliq Urdu", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ecebea; --ink-2: #c3bfbc; --muted: #97918d; --paper: #121212; --panel: #1b1b1b;
    --line: #2d2b2a; --hover: #242322; --select: #2a2120; --red: #ff6b5e; --red-soft: #3a1f1c;
    --brand: #ff4a2e; --brand-hover: #ff6a52; --brand-soft: #3a1c16; --brand-ink: #ffffff; --rail: #0b0b0b;
    --sage: #7cc2ab; --sage-soft: #1c332c; --out: #1b2e27; --in: #222120; --amber: #e7b65c; --amber-soft: #3a2f18; --focus: #ff6a52;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ecebea; --ink-2: #c3bfbc; --muted: #97918d; --paper: #121212; --panel: #1b1b1b;
  --line: #2d2b2a; --hover: #242322; --select: #2a2120; --red: #ff6b5e; --red-soft: #3a1f1c;
  --brand: #ff4a2e; --brand-hover: #ff6a52; --brand-soft: #3a1c16; --brand-ink: #ffffff; --rail: #0b0b0b;
  --sage: #7cc2ab; --sage-soft: #1c332c; --out: #1b2e27; --in: #222120; --amber: #e7b65c; --amber-soft: #3a2f18; --focus: #ff6a52;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.45 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--sage); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons & inputs ---------- */
.btn { text-decoration: none; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius-s); padding: 7px 12px; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { color: var(--red); }
.btn.small { padding: 4px 9px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--hover); }
.icon-btn svg, .btn svg { width: 20px; height: 20px; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: 13px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius-s); padding: 8px 10px;
}
textarea { resize: vertical; min-height: 70px; }
.hint { font-size: 13px; color: var(--muted); }
.error { color: var(--red); font-size: 14px; }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login form { width: min(360px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px 24px; }
.login h1 { font-size: 22px; margin: 14px 0 4px; }
.brand-logo { height: 64px; width: auto; display: block; }
.logo-on-dark { display: none; }
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .logo-on-light { display: none; } :root:not([data-theme]) .logo-on-dark { display: block; } }
.login p { margin: 0 0 20px; color: var(--muted); }
.login .btn { width: 100%; justify-content: center; padding: 10px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 64px 340px 1fr; height: 100dvh; }
.shell.with-side { grid-template-columns: 64px 340px 1fr 330px; }
.rail { background: var(--rail); color: #f3f1ef; display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 6px; }
.rail .logo { width: 36px; height: 36px; margin-bottom: 14px; }
.rail a { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: inherit; opacity: .65; position: relative; }
.rail a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.rail a.on { opacity: 1; background: rgba(255,255,255,.10); }
.rail a.on::before { content: ''; position: absolute; left: -9px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--brand); }
.rail a.on svg { color: var(--brand); }
.rail a svg { width: 22px; height: 22px; }
.rail .spacer { flex: 1; }
.rail .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.rail .theme-btn { width: 40px; height: 40px; border: 0; background: none; color: inherit; opacity: .65; border-radius: 12px; display: grid; place-items: center; }
.rail .theme-btn:hover { opacity: 1; background: rgba(255,255,255,.08); }
.rail .theme-btn svg { width: 20px; height: 20px; }

.list-pane { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.list-head { padding: 14px 14px 8px; display: grid; gap: 10px; }
.list-head h2 { margin: 0; font-size: 20px; display: flex; align-items: center; justify-content: space-between; }
.search { position: relative; }
.search input { padding-left: 34px; background: var(--paper); border-color: transparent; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 3px 11px; font-size: 13px; white-space: nowrap; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip .swatch { width: 8px; height: 8px; border-radius: 50%; }
.chats { flex: 1; overflow-y: auto; }
.chat-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; padding: 10px 14px; border: 0; background: none; width: 100%; text-align: left; border-bottom: 1px solid var(--line); align-items: center; }
.chat-row:hover { background: var(--hover); }
.chat-row.on { background: var(--select); box-shadow: inset 3px 0 0 var(--brand); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 15px; color: #fff; flex: none; }
.chat-row .mid { min-width: 0; }
.chat-row .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row .last { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row.unread .last { color: var(--ink); }
.chat-row .meta { display: grid; justify-items: end; gap: 4px; font-size: 12px; color: var(--muted); }
.badge { background: var(--brand); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.mini-labels { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.mini-label { font-size: 11px; padding: 0 6px; border-radius: 4px; color: var(--ink); background: var(--hover); border-left: 3px solid; }

/* Visibility marker — the core idea: you can always see who else can read a chat. */
.vis { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; border-radius: 999px; padding: 1px 8px 1px 6px; white-space: nowrap; }
.vis svg { width: 13px; height: 13px; }
.vis.private { color: var(--muted); background: var(--hover); }
.vis.shared { color: var(--sage); background: var(--sage-soft); }
.drafts { max-height: 45vh; overflow-y: auto; background: var(--panel); }
.drafts:empty { display: none; }
.draft { border-top: 1px solid var(--line); padding: 10px 12px; background: var(--amber-soft); }
.draft + .draft { border-top: 1px dashed var(--line); }
.draft-head { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.draft-head svg { width: 16px; height: 16px; color: var(--amber); }
.draft-head span { color: var(--ink-2); }
.draft textarea { min-height: 60px; background: var(--panel); }
.draft-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.draft-badge { font-size: 11px; color: var(--amber); background: var(--amber-soft); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.keybox { background: var(--hover); border-radius: var(--radius-m); padding: 12px; margin-top: 10px; }
.keybox code { word-break: break-all; font-size: 13px; }
.nudge { display: flex; align-items: center; gap: 8px; background: var(--sage-soft); color: var(--ink); border-radius: var(--radius-m); padding: 8px 6px 8px 12px; font-size: 13.5px; }
.nudge span { flex: 1; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 17px; }

/* ---------- conversation ---------- */
.convo { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--paper); position: relative; }
.convo-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); min-height: 60px; }
.convo-head .who { flex: 1; min-width: 0; }
.convo-head .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-head .who span { font-size: 13px; color: var(--muted); }
.convo-head .back { display: none; }
.messages { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 5%; display: flex; flex-direction: column; gap: 3px; }
.day { align-self: center; font-size: 12px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; margin: 12px 0 8px; }
.msg { max-width: min(78%, 560px); padding: 7px 10px 5px; border-radius: var(--radius-m); background: var(--in); border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--out); border-color: transparent; }
.msg .sender { font-size: 12.5px; font-weight: 600; color: var(--sage); margin-bottom: 2px; }
.msg .text { white-space: pre-wrap; }
.msg { position: relative; }
.msg.has-reacts { margin-bottom: 14px; }
.reacts { position: absolute; bottom: -14px; left: 8px; display: flex; gap: 3px; z-index: 1; }
.msg.me .reacts { left: auto; right: 8px; }
.react-pill { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 0 6px; font-size: 13px; line-height: 22px; height: 24px; display: inline-flex; align-items: center; gap: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.react-pill span { font-size: 11.5px; color: var(--muted); }
.react-pill.mine { border-color: var(--sage); background: var(--sage-soft); }
.msg-tools { position: absolute; top: 50%; transform: translateY(-50%); right: -74px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.msg.me .msg-tools { right: auto; left: -74px; flex-direction: row-reverse; }
.tool-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--panel); color: var(--muted); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tool-btn:hover { color: var(--ink); }
.tool-btn svg { width: 18px; height: 18px; }
.msg:hover .msg-tools, .msg-tools:focus-within, .msg.picking .msg-tools { opacity: 1; }
@media (pointer: coarse) {
  .msg-tools { display: none; }
  .msg, .msg * { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
.msg img.media { cursor: zoom-in; -webkit-touch-callout: none; -webkit-user-drag: none; }
.msg button.doc { border: 0; font: inherit; width: 100%; text-align: left; cursor: pointer; }
body.no-scroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 90; background: #0b0f11; display: flex; flex-direction: column; color: #fff; transition: opacity .15s; }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; }
.viewer-title { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; display: grid; }
.viewer-title small { font-weight: 400; font-size: 12.5px; opacity: .7; }
.viewer-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; flex: none; }
.viewer-btn:hover { background: rgba(255,255,255,.22); }
.viewer-btn svg { width: 22px; height: 22px; }
.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; -webkit-touch-callout: none; user-select: none; touch-action: pinch-zoom; transition: transform .12s; }
.viewer-caption { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); text-align: center; font-size: 15px; white-space: pre-wrap; max-height: 25vh; overflow-y: auto; }
.msg.picking { box-shadow: 0 0 0 2px var(--sage); }
.react-picker { position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 6px; max-width: calc(100vw - 16px); }
.react-row { display: flex; gap: 2px; flex-wrap: wrap; }
.react-row button { border: 0; background: none; font-size: 24px; width: 42px; height: 42px; border-radius: 50%; }
.react-row button:hover, .react-row button:focus-visible { background: var(--hover); }
@media (max-width: 420px) { .react-row { flex-wrap: nowrap; } .react-row button { width: 34px; height: 38px; font-size: 22px; } }
.react-row button.on { background: var(--sage-soft); }
.msg-actions { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; display: grid; }
.msg-actions > button { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 9px 10px; font-size: 14.5px; color: var(--ink); border-radius: 8px; text-align: left; }
.msg-actions > button:hover, .msg-actions > button:focus-visible { background: var(--hover); }
.msg-actions svg { width: 19px; height: 19px; color: var(--ink-2); }
.menu-note { margin: 4px 8px 8px; font-size: 13px; color: var(--ink-2); max-width: 300px; }
.pin-choices { display: flex; gap: 6px; padding: 0 8px 8px; }
.react-extra { display: flex; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.react-extra button { flex: 1; border: 0; background: none; padding: 8px; font-size: 14px; color: var(--ink-2); border-radius: 8px; }
.react-extra button:hover { background: var(--hover); }
.msg .foot { display: flex; justify-content: flex-end; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.msg .foot .by { color: var(--sage); }
.msg .foot .tick.read { color: #2b8fd6; }
.msg.deleted .text { font-style: italic; color: var(--muted); }
.msg .fwd { display: flex; align-items: center; gap: 4px; font-size: 12px; font-style: italic; color: var(--muted); margin-bottom: 2px; }
.msg .fwd svg { width: 14px; height: 14px; }
.msg .pin-mark svg { width: 13px; height: 13px; vertical-align: -2px; }
.msg.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--amber); } 100% { box-shadow: 0 0 0 0 transparent; } }
.msg button.quote { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--sage); cursor: pointer; font: inherit; }
.msg .quote b { display: block; font-size: 12.5px; color: var(--sage); }
.msg .quote span { display: block; white-space: pre-wrap; overflow: hidden; max-height: 3.2em; }
.msg .quote { border-left: 3px solid var(--sage); background: rgba(0,0,0,.04); padding: 4px 8px; border-radius: 4px; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; white-space: pre-wrap; max-height: 4.5em; overflow: hidden; }
.msg img.media { display: block; max-width: 100%; max-height: 320px; border-radius: 6px; margin-bottom: 4px; background: var(--hover); min-width: 120px; min-height: 80px; }
.msg img.sticker { max-width: 140px; background: none; }
.msg audio { width: 260px; max-width: 100%; display: block; }
.msg video { max-width: 100%; max-height: 320px; border-radius: 6px; display: block; }
.doc { display: flex; gap: 8px; align-items: center; padding: 8px; background: rgba(0,0,0,.04); border-radius: 6px; text-decoration: none; color: inherit; margin-bottom: 4px; }
.doc svg { width: 26px; height: 26px; color: var(--red); flex: none; }
.load-more { align-self: center; margin-bottom: 8px; }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: var(--panel); border-top: 1px solid var(--line); }
.reply-bar > svg { width: 18px; height: 18px; color: var(--sage); flex: none; }
.reply-body { flex: 1; min-width: 0; border-left: 3px solid var(--sage); padding-left: 8px; }
.reply-body b { display: block; font-size: 12.5px; color: var(--sage); }
.reply-body span { display: block; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pins { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.pin-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 2px 0; }
.pin-main > svg { width: 18px; height: 18px; color: var(--ink-2); flex: none; }
.pin-text { min-width: 0; }
.pin-text b { display: block; font-size: 12.5px; color: var(--sage); }
.pin-text span { display: block; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-back { position: fixed; inset: 0; background: rgba(15,22,26,.45); z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--panel); border-radius: var(--radius-l); width: min(440px, 100%); max-height: min(640px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; box-shadow: 0 16px 48px rgba(0,0,0,.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.modal-foot .btn { white-space: nowrap; flex: none; }
.fwd-preview { display: flex; gap: 8px; align-items: flex-start; background: var(--hover); border-radius: var(--radius-m); padding: 8px 10px; font-size: 13.5px; color: var(--ink-2); }
.fwd-preview svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.fwd-picked { display: flex; flex-wrap: wrap; gap: 6px; }
.fwd-picked:empty { display: none; }
.fwd-list { overflow-y: auto; flex: 1; min-height: 120px; border: 1px solid var(--line); border-radius: var(--radius-m); }
.fwd-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.fwd-row:last-child { border-bottom: 0; }
.fwd-row .avatar { width: 34px; height: 34px; font-size: 13px; }
.fwd-row .grow { flex: 1; min-width: 0; }
.fwd-row input { width: 18px; height: 18px; accent-color: var(--sage); }
@media (max-width: 760px) { .modal-back { place-items: end center; padding: 0; } .modal { border-radius: 16px 16px 0 0; max-height: 85vh; } }
.composer { display: flex; gap: 6px; align-items: flex-end; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.composer textarea { min-height: 42px; max-height: 160px; resize: none; border-radius: 21px; padding: 10px 14px; background: var(--paper); border-color: transparent; }
.composer .send { background: var(--brand); color: var(--brand-ink); }
.composer .send:hover { background: var(--brand-hover); }
.offline { background: var(--amber-soft); color: var(--amber); font-size: 13.5px; padding: 6px 14px; }
.no-chat { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; }
.no-chat h3 { color: var(--ink); margin: 0 0 6px; }

/* ---------- side panel ---------- */
.side { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.side-head { display: flex; align-items: center; padding: 8px 8px 0 14px; }
.side-head b { flex: 1; }
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 10px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--red); font-weight: 600; }
.side-body { flex: 1; overflow-y: auto; padding: 14px; }
.item { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; margin-bottom: 10px; }
.item .top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.item .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.item.note { background: var(--amber-soft); border-color: transparent; }
.status { font-size: 12px; padding: 1px 7px; border-radius: 4px; background: var(--hover); }
.status.failed, .status.missed { background: var(--red-soft); color: var(--red); }
.status.pending { background: var(--sage-soft); color: var(--sage); }
.section-title { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
.section-title:first-child { margin-top: 0; }
.toggle-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .grow { flex: 1; min-width: 0; }
.switch { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--sage); }
.switch:checked::after { transform: translateX(16px); }
.summary-text { white-space: pre-wrap; font-size: 14.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.side .row > * { min-width: 100%; }

/* ---------- pages (follow-ups, team, whatsapp) ---------- */
.page { grid-column: 2 / -1; overflow-y: auto; padding: 24px clamp(16px, 4vw, 48px); }
.page h2 { margin: 0 0 4px; font-size: 22px; }
.page > p.lead { margin: 0 0 22px; color: var(--muted); max-width: 70ch; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px 20px; margin-bottom: 18px; max-width: 860px; }
.card h3 { margin: 0 0 12px; font-size: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.qr { background: #fff; padding: 12px; border-radius: var(--radius-m); width: 260px; max-width: 100%; display: block; }
.steps { padding-left: 20px; margin: 0 0 12px; }
.steps li { margin-bottom: 4px; }
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.state::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.state.open::before { background: #2f9e6e; }
.state.qr::before, .state.connecting::before, .state.starting::before { background: #d39a1c; }
.state.closed::before, .state.logged_out::before { background: var(--red); }
.pick-list { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 0 12px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--paper); padding: 9px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--red); color: #fff; }

/* ---------- tablet: hide side panel into overlay ---------- */
@media (max-width: 1180px) {
  .shell.with-side { grid-template-columns: 64px 320px 1fr; }
  .side { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100%); z-index: 20; box-shadow: -8px 0 24px rgba(0,0,0,.12); }
}

/* ---------- phone: one column at a time + bottom tabs ---------- */
@media (max-width: 760px) {
  .shell, .shell.with-side { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail { order: 2; flex-direction: row; justify-content: space-around; padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); gap: 0; }
  .rail .logo, .rail .spacer, .rail .theme-btn { display: none; }
  .rail a.on::before { left: 14px; right: 14px; top: 0; bottom: auto; width: auto; height: 3px; }
  .rail a { width: 52px; height: 44px; }
  .shell.in-chat .rail { display: none; }
  .shell.in-chat { grid-template-rows: 1fr; }
  .list-pane { border-right: 0; }
  .shell.in-chat .list-pane { display: none; }
  .shell:not(.in-chat) .convo { display: none; }
  .convo-head .back { display: grid; }
  .messages { padding: 12px 10px; }
  .msg { max-width: 86%; }
  .page { grid-column: 1; padding: 18px 16px; }
  .side { width: 100%; box-shadow: none; }
  .card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- chat header opens media & details ---------- */
.convo-head .who { border: 0; background: none; text-align: left; padding: 4px 6px; border-radius: var(--radius-s); color: inherit; font: inherit; cursor: pointer; }
.convo-head .who:hover { background: var(--hover); }
.msg .text a { color: var(--focus); text-decoration: underline; overflow-wrap: anywhere; }

/* ---------- programs & WhatsApp labels ---------- */
.mini-prog { font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--red-soft); color: var(--red); font-weight: 600; }
.chip.prog:not(.on) { border-color: var(--red-soft); color: var(--red); }
.wa-tag { font-size: 10.5px; margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--sage-soft); color: var(--sage); vertical-align: 1px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h3 { margin-bottom: 0; }
.label-rule .top { align-items: center; font-size: 13px; }
.label-rule .top .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.label-rule .row { margin: 0; }
.label-rule .field { margin-bottom: 0; }
.mini-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.prog-row { align-items: center; margin-bottom: 6px; flex-wrap: nowrap; }
.prog-row input.code { flex: 0 0 64px; min-width: 64px; text-transform: none; }

/* ---------- media, docs and links ---------- */
.seg { display: flex; gap: 4px; background: var(--hover); padding: 3px; border-radius: 999px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 6px 8px; color: var(--ink-2); font: inherit; font-size: 14px; display: inline-flex; justify-content: center; align-items: center; gap: 6px; }
.seg button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg .count { font-size: 12px; color: var(--muted); font-weight: 400; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.tile { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--hover); overflow: hidden; border-radius: 4px; cursor: zoom-in; -webkit-touch-callout: none; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tile-play { position: absolute; inset: auto auto 6px 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.tile-play svg { width: 14px; height: 14px; }
.tile-missing { display: grid; place-items: center; align-content: center; gap: 4px; height: 100%; font-size: 11px; color: var(--muted); }
.tile-missing svg { width: 22px; height: 22px; }
.gallery-list { display: grid; gap: 8px; }
.g-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px; }
.g-row .grow { flex: 1; min-width: 0; }
.g-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--hover); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.g-ico svg { width: 18px; height: 18px; }
.g-title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.g-link { display: block; color: var(--focus); font-weight: 500; }
.g-snip { font-size: 13px; color: var(--ink-2); margin: 2px 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.g-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.viewer-btn.wide { width: auto; border-radius: 999px; padding: 0 14px; font-size: 14px; }
.viewer-stage video { max-width: 100%; max-height: 100%; border-radius: 4px; background: #000; }
@media (max-width: 420px) { .g-row { flex-wrap: wrap; } .g-actions { flex-direction: row; width: 100%; justify-content: flex-end; } }

/* ---------- Claude conversations ---------- */
.page.ai-page { padding: 0; display: grid; grid-template-columns: 300px 1fr; min-height: 0; overflow: hidden; }
.ai-list { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.ai-list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 8px 14px; }
.ai-list-head h2 { margin: 0; font-size: 20px; }
.ai-threads { overflow-y: auto; flex: 1; }
.ai-thread { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ai-thread:hover { background: var(--hover); }
.ai-thread.on { background: var(--sage-soft); }
.ai-thread .top { display: flex; justify-content: space-between; gap: 8px; }
.ai-thread .top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-last { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--paper); }
.ai-main .convo-head .back { display: none; }
.ai-main .who a { color: var(--focus); }
.ai-conv { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 16px clamp(12px, 4vw, 40px); display: flex; flex-direction: column; gap: 12px; }
.ai-conv.compact .ai-msgs { overflow: visible; padding: 4px 0 8px; }
.ai-msg { border-radius: var(--radius-m); padding: 10px 12px; max-width: 820px; overflow-wrap: anywhere; }
.ai-msg.user { background: var(--out); align-self: flex-end; max-width: min(85%, 640px); }
.ai-msg.user .ai-body { white-space: pre-wrap; }
.ai-msg.claude { background: var(--panel); border: 1px solid var(--line); }
.ai-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ai-meta svg { width: 14px; height: 14px; color: var(--red); }
.ai-steps { font-size: 12px; color: var(--sage); margin-bottom: 6px; }
.ai-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ai-actions .btn svg { width: 15px; height: 15px; }
.md p { margin: 0 0 8px; }
.md h3, .md h4, .md h5, .md h6 { margin: 14px 0 6px; color: var(--red); font-size: 15.5px; }
.md h3 { font-size: 17px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 20px; }
.md li { margin-bottom: 3px; }
.md code { background: var(--hover); padding: 0 4px; border-radius: 4px; font-size: 13px; }
.md pre { background: var(--hover); padding: 10px; border-radius: var(--radius-s); overflow-x: auto; font-size: 13px; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 8px; padding-left: 10px; border-left: 3px solid var(--line); color: var(--ink-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.md a { color: var(--focus); }
.md-table { overflow-x: auto; margin: 0 0 10px; }
.md-table table { font-size: 13.5px; min-width: 100%; }
.md-table th { background: var(--red-soft); color: var(--ink); }
.ai-status { padding: 6px clamp(12px, 4vw, 40px); font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.ai-conv.compact .ai-status { padding: 6px 0; }
.ai-dots { display: inline-flex; gap: 3px; }
.ai-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: aidot 1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes aidot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ai-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 clamp(12px, 4vw, 40px) 8px; }
.ai-conv.compact .ai-quick { padding: 0 0 8px; }
.ai-quick .chip { white-space: normal; text-align: left; }
.ai-compose { display: flex; gap: 6px; align-items: flex-end; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.ai-conv.compact .ai-compose { position: sticky; bottom: -14px; margin: 0 -14px -14px; padding: 8px 14px 14px; }
.ai-compose textarea { min-height: 44px; max-height: 200px; resize: vertical; border-radius: 14px; background: var(--paper); border-color: transparent; }
.ai-compose .send { background: var(--brand); color: var(--brand-ink); }
.ai-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ai-side-head select { max-width: 60%; }
.ai-empty { color: var(--ink-2); font-size: 14px; }
.ai-empty p { margin: 0 0 8px; }

/* ---------- Claude settings ---------- */
.mode-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); margin-bottom: 8px; cursor: pointer; }
.mode-opt.on { border-color: var(--sage); background: var(--sage-soft); }
.mode-opt input { margin-top: 4px; }
.agent-card summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.agent-card summary::-webkit-details-marker { display: none; }
.agent-card summary b { display: inline-flex; align-items: center; gap: 6px; }
.agent-card summary svg { width: 16px; height: 16px; color: var(--red); }
.agent-card[open] summary { margin-bottom: 12px; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; padding: 4px 0; }
.check { display: inline-flex; gap: 6px; align-items: center; }
textarea.mono { font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Client care ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 10px; max-width: 860px; margin-bottom: 18px; }
.tile-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px; display: grid; gap: 2px; }
.tile-stat b { font-size: 24px; }
.tile-stat span { font-size: 13px; color: var(--muted); }
.tile-stat.warn { border-color: var(--red); background: var(--red-soft); }
.tile-stat.warn b { color: var(--red); }

@media (max-width: 760px) {
  .page.ai-page { grid-template-columns: 1fr; padding: 0; }
  .page.ai-page.has-thread .ai-list { display: none; }
  .page.ai-page:not(.has-thread) .ai-main { display: none; }
  .ai-main .convo-head .back { display: grid; }
  .shell:has(.ai-page.has-thread) .rail { display: none; }
  .shell:has(.ai-page.has-thread) { grid-template-rows: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
.ai-new { display: flex; gap: 8px; align-items: center; padding: 0 14px 10px; }
.ai-new select, .ai-new .hint { flex: 1; min-width: 0; }
.ai-new .btn { flex: none; }
.page.ai-page { grid-template-columns: 300px minmax(0, 1fr); }
.ai-list, .ai-main, .ai-thread { min-width: 0; }
@media (max-width: 760px) { .page.ai-page { grid-template-columns: minmax(0, 1fr); } }

/* ---------- @mentions in groups ---------- */
.composer-wrap { position: relative; }
.mention-pop { position: absolute; left: 8px; right: 8px; bottom: 100%; margin-bottom: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 8px 24px rgba(0,0,0,.14); max-height: 280px; overflow-y: auto; z-index: 30; padding: 4px; }
.mention-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: var(--radius-s); text-align: left; font: inherit; color: var(--ink); }
.mention-item .avatar { width: 30px; height: 30px; font-size: 12px; }
.mention-item.on, .mention-item:hover { background: var(--hover); }
.at-btn { font-size: 19px; font-weight: 600; }
.toggle-row .avatar { width: 30px; height: 30px; font-size: 12px; flex: none; }

/* ---------- client file & portal ---------- */
.file-pending { background: var(--amber-soft); border-radius: var(--radius-m); padding: 10px 12px; margin-bottom: 12px; }
.file-pending .item { background: var(--panel); margin: 8px 0 0; }
.file-field { border-bottom: 1px solid var(--line); padding: 10px 0; }
.file-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.file-head .grow { flex: 1; }
.file-text { white-space: normal; font-size: 14px; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
details .file-text { white-space: pre-wrap; background: var(--hover); padding: 8px; border-radius: var(--radius-s); margin-top: 6px; }
.file-id { font-size: 18px; font-weight: 700; margin: 0; }
.file-history { margin-top: 12px; }
.file-history summary, .file-pending summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.import-row { width: 100%; text-align: left; background: var(--panel); font: inherit; color: inherit; cursor: pointer; }
.portal-entry dl { margin: 4px 0 0; display: grid; grid-template-columns: minmax(90px, 38%) 1fr; gap: 3px 10px; font-size: 13.5px; }
.portal-entry dt { color: var(--muted); }
.portal-entry dd { margin: 0; overflow-wrap: anywhere; }
.portal-entry.q { border-color: var(--amber); background: var(--amber-soft); }

/* ---------- iPhone: no auto-zoom, nothing wider than the screen ---------- */
html, body { max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, table { max-width: 100%; }
@media (pointer: coarse), (max-width: 760px) {
  input, select, textarea, .composer textarea, .ai-compose textarea { font-size: 16px !important; }
}

/* voice-note transcripts */
.msg .transcript { margin-top: 6px; padding: 6px 8px; border-left: 2px solid var(--sage); background: color-mix(in srgb, var(--sage-soft) 55%, transparent); border-radius: var(--radius-s); max-width: 300px; white-space: pre-wrap; font-size: 14px; line-height: 1.4; }
.msg .transcript-label { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.msg .transcript-label svg, .transcribe-btn svg { width: 13px; height: 13px; }
.transcribe-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; min-height: 32px; }
.transcribe-btn:hover { background: var(--hover); }
.transcribe-btn:disabled { opacity: .6; cursor: default; }
.laptop-box { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-m); }
.laptop-box code.cmd { display: block; flex: 1 1 auto; min-width: 0; padding: 8px; background: var(--hover); border-radius: var(--radius-s); font-size: 12px; overflow-wrap: anywhere; user-select: all; }
.ai-compose select.ai-model { flex: 0 0 auto; align-self: flex-end; max-width: 110px; font-size: 13px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel); color: var(--ink); }

/* ---------- readability pass (Oct 2026): phone-first lists instead of wide tables ---------- */
.page { overflow-x: hidden; }
.card { min-width: 0; overflow-wrap: anywhere; }
.card h3 { font-size: 17px; }
.hint { line-height: 1.45; }
input[type=datetime-local], input[type=date], input[type=time] { display: block; min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; min-height: 40px; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }
.chip-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 0 0 10px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip { padding: 6px 12px; font-size: 13.5px; }

/* activity log */
.act-list { display: grid; }
.act-day { position: sticky; top: -1px; background: var(--panel); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 12px 0 6px; border-bottom: 1px solid var(--line); z-index: 1; }
.act { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.act:last-child { border-bottom: 0; }
.act-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.act-what { font-size: 14.5px; line-height: 1.35; }
.act-chat { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-detail { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* team members */
.people { display: grid; gap: 10px; }
.person { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-m); }
.person.off { opacity: .72; }
.person-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage); font-weight: 700; font-size: 15px; }
.person-name { font-weight: 600; font-size: 15.5px; }
.person-email { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--hover); color: var(--ink-2); }
.tag.red { background: var(--red-soft); color: var(--red); }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* portal IDs to link */
.link-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.link-row:last-child { border-bottom: 0; }
.link-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.id-badge { flex: none; min-width: 48px; padding: 4px 8px; border-radius: var(--radius-s); background: var(--hover); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.link-act { display: flex; gap: 8px; margin-top: 8px; }
.link-act select { flex: 1; min-width: 0; }
.link-act .btn { flex: none; }

@media (max-width: 760px) {
  .page h2 { font-size: 24px; }
  .page > p.lead { font-size: 15px; margin-bottom: 18px; }
  .row.stack-phone > * { flex: 1 1 100%; min-width: 0; }
  .row.stack-phone > .field { margin-bottom: 12px; }
  .card { border-radius: 14px; }
  .btn.small { padding: 7px 12px; font-size: 14px; min-height: 36px; }
  .act { grid-template-columns: 58px minmax(0, 1fr); }
}
.link-more { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.link-more .btn { font-size: 13px; }
@media (max-width: 760px) {
  .rail { min-width: 0; width: 100%; }
  .rail a { flex: 1 1 0; width: auto; min-width: 0; max-width: 64px; }
  .shell { min-width: 0; width: 100%; }
}
.linkish { background: none; border: 0; padding: 0; color: var(--sage); font: inherit; font-size: 11px; text-transform: none; letter-spacing: 0; cursor: pointer; text-decoration: underline; }
.msg .transcript-label .linkish { margin-left: auto; padding-left: 10px; }
.msg .transcript-text { white-space: pre-wrap; }

/* ---------- check-ins dashboard ---------- */
.tiles .tile-stat { cursor: pointer; font: inherit; text-align: left; }
.tile-stat.on { outline: 2px solid var(--sage); outline-offset: -2px; }
.ck-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.ck-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ck-card.alert { border-left: 4px solid var(--red); }
.ck-head { display: flex; flex-direction: column; gap: 2px; }
.ck-head b { font-size: 16px; }
.ck-head a { color: inherit; text-decoration: none; }
.ck-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--hover); color: var(--ink-2); }
.flag.high { background: var(--red-soft); color: var(--red); }
.flag.mid { background: var(--amber-soft); color: var(--amber); }
.flag.ok { background: var(--sage-soft); color: var(--sage); }
.ck-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.ck-grid > div { display: flex; flex-direction: column; gap: 4px; }
.ck-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.ck-dots { display: flex; gap: 4px; }
.dot7 { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--hover); color: var(--muted); }
.dot7.on { background: var(--sage); color: var(--panel); }
.ck-big { font-size: 20px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; }
.ck-change { font-size: 13px; font-weight: 600; }
.ck-change.down { color: var(--sage); }
.ck-change.up { color: var(--red); }
.ck-queries { display: flex; flex-direction: column; gap: 8px; background: var(--paper); border-radius: 10px; padding: 8px 10px; }
.ck-q { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; font-size: 14px; }
.ck-q .btn { flex: 0 0 auto; }
.ck-actions { flex-wrap: wrap; gap: 6px; }
@media (max-width: 760px) { .ck-list { grid-template-columns: 1fr; } }

/* ---------- one member's messages in a group ---------- */
.msg button.sender { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.msg button.sender:hover { text-decoration: underline; }
.filter-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--amber-soft); border-bottom: 1px solid var(--line); font-size: 14px; }
.filter-bar[hidden] { display: none; }
.filter-bar svg { width: 16px; height: 16px; }
.people-menu { position: fixed; z-index: 60; width: min(340px, calc(100vw - 16px)); max-height: 60vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 6px; }
.people-head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; }
.people-row { display: flex; width: 100%; gap: 8px; align-items: center; background: none; border: 0; padding: 9px 8px; border-radius: 8px; font: inherit; text-align: left; cursor: pointer; }
.people-row:hover, .people-row.on { background: var(--hover); }
.people-row.all { justify-content: center; color: var(--sage); font-weight: 600; }
.gp-day { font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
.gp-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.gp-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.gp-img { max-width: 100%; border-radius: 8px; cursor: zoom-in; }
.gp-text { font-size: 14px; white-space: pre-wrap; }

/* ---------- navigation with labels; "More" page ---------- */
.rail a { width: 56px; height: 54px; flex-direction: column; gap: 2px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.rail a .lbl { font-size: 10px; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.rail .dot { top: 6px; right: 12px; }
@media (max-width: 760px) { .rail a { height: 50px; } .rail a .lbl { font-size: 10px; } }
.more-list { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; max-width: 640px; }
.more-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.more-item:last-child { border-bottom: 0; }
.more-item:hover { background: var(--hover); }
.more-item .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.more-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--sage-soft); color: var(--sage); display: grid; place-items: center; flex: none; }
.more-ico svg { width: 20px; height: 20px; }
.more-item .chev { font-size: 22px; color: var(--muted); }
.page-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 6px; }
.page-head h2 { margin-bottom: 2px; }
.page-head .lead { margin: 0 0 8px; }

/* ---------- calendar ---------- */
.cal-list { display: flex; flex-direction: column; gap: 8px; max-width: 860px; }
.cal-day { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 2px; }
.cal-card { display: grid; grid-template-columns: 74px 1fr; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; }
.cal-card.st-cancelled { opacity: .55; }
.cal-card.st-cancelled .cal-title b { text-decoration: line-through; }
.cal-time { display: flex; flex-direction: column; gap: 2px; }
.cal-time b { font-size: 17px; }
.cal-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-title { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.cal-title a { color: var(--ink); }
.cal-type { font-size: 13px; color: var(--c); font-weight: 600; }
.cal-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.cal-goal { font-size: 14px; color: var(--ink-2); font-style: italic; }
.cal-actions { gap: 6px; flex-wrap: wrap; }
.modal.wide { width: min(560px, 100%); }
.modal-scroll { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.slot-days { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px; }
.slot-day b { font-size: 13px; }
.slot-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.slot { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 11px; font-size: 13px; }
.slot:hover { border-color: var(--sage); }
.slot.on { background: var(--sage); color: var(--panel); border-color: var(--sage); }
.settings-stack { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.settings-stack .card { margin: 0; }
.hours-row { display: grid; grid-template-columns: 100px auto 110px auto 110px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours-row:last-child { border-bottom: 0; }
.hours-row input[type=time] { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 5px 6px; background: var(--panel); }
.sticky-save { position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(transparent, var(--paper) 30%); }
.type-card .field { margin-bottom: 8px; }
@media (max-width: 760px) {
  .cal-card { grid-template-columns: 1fr; gap: 4px; }
  .cal-time { flex-direction: row; gap: 8px; align-items: baseline; }
  .hours-row { grid-template-columns: 1fr auto; }
  .hours-row input[type=time] { grid-column: span 1; }
}

/* ---------- leads ---------- */
.lead-list { display: flex; flex-direction: column; gap: 8px; max-width: 860px; margin-top: 10px; }
.lead-card { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.lead-card.due { border-left: 4px solid var(--red); }
.lead-top { display: flex; gap: 10px; align-items: flex-start; }
.lead-name { font-weight: 700; color: var(--ink); font-size: 16px; }
.stage-sel { width: auto; min-width: 150px; padding: 5px 8px; font-size: 13px; }
.lead-notes { font-size: 14px; background: var(--paper); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
a.flag { text-decoration: none; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.note-link { display: block; color: var(--ink); text-decoration: none; }

/* ---------- call notes ---------- */
.rec-card { max-width: 640px; }
.rec-main { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0 8px; }
.rec-timer { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.rec-meter { width: min(280px, 80%); height: 8px; background: var(--hover); border-radius: 99px; overflow: hidden; }
.rec-meter span { display: block; height: 100%; width: 0; background: var(--sage); transition: width .08s; }
.rec-status { font-size: 14px; color: var(--ink-2); text-align: center; }
.btn.big { padding: 12px 20px; font-size: 16px; border-radius: 999px; }
.btn.danger.big { background: var(--red); color: #fff; border-color: var(--red); }
.steps { padding-left: 20px; margin: 6px 0 10px; font-size: 14px; line-height: 1.6; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.mono-soft { font-size: 14px; white-space: pre-wrap; max-height: 420px; overflow-y: auto; }
.note-edit { width: 100%; min-height: 360px; font-size: 15px; line-height: 1.5; margin-top: 8px; }
.banner-note { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); margin: 8px 0 12px; max-width: 860px; font-size: 14px; }
.banner-note.ready { background: var(--sage-soft); color: var(--sage); }
.banner-note.failed { background: var(--red-soft); color: var(--red); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.note-row { gap: 4px; }
/* side panel: all tabs visible as wrapping pills (there are up to 10 for a client) */
.side .tabs { flex-wrap: wrap; gap: 4px; padding: 8px 10px; overflow: visible; }
.side .tabs button { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--ink-2); }
.side .tabs button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }
.cal-actions > *, .ck-actions > *, .lead-card .row > *, .page-head .row > *, .modal-foot > .btn { flex: 0 0 auto; width: auto; }
.page-head .btn { white-space: nowrap; }
.page input[type=search] { max-width: 420px; }
.more-item .grow { flex: 1; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
  .tile-stat { padding: 10px; border-radius: 12px; }
  .tile-stat b { font-size: 19px; }
  .tile-stat span { font-size: 11.5px; line-height: 1.25; }
  .page > p.lead, .page-head .lead { font-size: 14px; }
}
.hours-row { grid-template-columns: 110px 48px 130px 24px 130px; justify-content: start; }
.hours-row input[type=time] { width: 130px; }
@media (max-width: 760px) { .hours-row { grid-template-columns: 1fr 48px; } .hours-row input[type=time] { width: 100%; } .hours-row .hint { display: none; } }
.private-msg .text { display: flex; align-items: center; gap: 6px; font-style: italic; }
.private-msg .text svg, .private-badge svg { width: 13px; height: 13px; }
.private-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--amber); background: var(--amber-soft); border-radius: 999px; padding: 1px 8px; margin-top: 4px; }
.file-card .more-ico { width: 34px; height: 34px; }
.file-reply { font-size: 14px; background: var(--sage-soft); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.file-review { display: flex; flex-direction: column; gap: 6px; }
.file-review .btn { align-self: flex-start; }
.health-docs { margin-top: 14px; }
.person-perms { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.person-perms .toggle-row { padding: 6px 0; }

/* swipe to reply, jump to latest, drag & drop */
.msg::before { content: '↩'; position: absolute; left: -34px; top: 50%; transform: translateY(-50%) scale(.6); opacity: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; font-size: 14px; color: var(--muted); transition: opacity .12s, transform .12s; pointer-events: none; }
.msg.swipe-ready::before { opacity: 1; transform: translateY(-50%) scale(1); color: var(--sage); }
.to-bottom { position: absolute; right: 18px; bottom: 92px; z-index: 6; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); box-shadow: 0 3px 10px rgba(0,0,0,.16); display: grid; place-items: center; cursor: pointer; }
.to-bottom[hidden] { display: none; }
.to-bottom svg { width: 22px; height: 22px; }
.to-bottom-count { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--sage); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.to-bottom-count[hidden] { display: none; }
.drop-zone { position: absolute; inset: 8px; z-index: 20; border: 2px dashed var(--sage); border-radius: 14px; background: color-mix(in srgb, var(--paper) 88%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; pointer-events: none; font-size: 15px; }
.drop-zone[hidden] { display: none; }
.drop-zone svg { width: 34px; height: 34px; color: var(--sage); }

/* appearance switch (More page) */
.theme-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--paper); gap: 2px; }
.theme-seg button { border: 0; background: none; border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.theme-seg button svg { width: 16px; height: 16px; }
.theme-seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.appearance { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--panel); margin-top: 16px; }
.appearance b { display: block; }

/* long settings pages: let the phone skip drawing what is off-screen, so scrolling stays smooth */
.page { overscroll-behavior-y: contain; }
.page > .card { content-visibility: auto; contain-intrinsic-size: auto 600px; }
.label-rule, .pick-list .toggle-row { content-visibility: auto; contain-intrinsic-size: auto 96px; }
.pick-list .toggle-row { contain-intrinsic-size: auto 52px; }
.pick-list { overscroll-behavior: contain; }
.more-labels { margin-top: 6px; }
.more-labels > summary { cursor: pointer; padding: 10px 2px; color: var(--ink-2); font-weight: 600; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.more-labels > summary::-webkit-details-marker { display: none; }
.more-labels > summary::before { content: '›'; display: inline-block; transition: transform .15s; font-size: 18px; line-height: 1; color: var(--muted); }
.more-labels[open] > summary::before { transform: rotate(90deg); }

.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 12px; background: var(--ink); color: var(--paper); padding: 8px 8px 8px 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 14px; max-width: calc(100% - 24px); }
.msg.pending { opacity: .75; pointer-events: none; }

/* ---------- Sprint ---------- */
.sp-body { display: grid; gap: 14px; max-width: 860px; }
.sp-body > .card { margin-bottom: 0; }
.sp-group { display: grid; gap: 8px; }
.sp-h { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sp-count { background: var(--hover); color: var(--ink-2); border-radius: 999px; padding: 0 8px; font-size: 12px; letter-spacing: 0; }
.sp-list { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.sp-list > * + * { border-top: 1px solid var(--line); }
.sp-task { display: flex; align-items: flex-start; gap: 4px; padding-left: 8px; }
.sp-task.approval { background: var(--amber-soft); }
.sp-tick { flex: 0 0 auto; width: 40px; height: 44px; display: grid; place-items: center; background: none; border: 0; padding: 0; }
.sp-tick span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); transition: background .15s, border-color .15s; display: grid; place-items: center; }
.sp-tick:hover span { border-color: var(--brand); }
.sp-tick.on span { background: var(--sage); border-color: var(--sage); }
.sp-tick.on span::after { content: ""; width: 10px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.sp-tick-space { width: 40px; flex: 0 0 auto; }
.sp-tbody { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 11px 12px 11px 2px; display: grid; gap: 5px; color: inherit; font: inherit; cursor: pointer; }
.sp-tt { font-weight: 500; overflow-wrap: anywhere; }
.sp-task.done .sp-tt { text-decoration: line-through; color: var(--muted); }
.sp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sp-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1; padding: 4px 8px; border-radius: 999px; background: var(--hover); color: var(--ink-2); border: 0; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sp-chip svg { width: 12px; height: 12px; }
.sp-chip.brand { background: var(--brand); color: var(--brand-ink); }
.sp-chip.brand-soft { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sp-chip.good { background: var(--sage-soft); color: var(--sage); font-weight: 600; }
.sp-chip.bad { background: var(--red-soft); color: var(--red); font-weight: 600; }
.sp-chip.warn { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.sp-chip.coach { background: none; border: 1px solid var(--line); }
button.sp-chip { cursor: pointer; font: inherit; font-size: 12px; }
.sp-chip.sys-live { background: var(--sage-soft); color: var(--sage); }
.sp-chip.sys-building { background: var(--brand-soft); color: var(--brand); }
.sp-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sp-eyebrow.brand { color: var(--brand); }
.sp-eyebrow svg { width: 15px; height: 15px; }
.sp-coach { display: grid; gap: 10px; border-left: 3px solid var(--brand); }
.sp-coach-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-note { font-size: 14.5px; }
.sp-note > :first-child { margin-top: 0; } .sp-note > :last-child { margin-bottom: 0; }
.sp-first { display: grid; gap: 10px; border: 2px solid var(--brand); }
.sp-first-t { font-family: "Playfair Display", Georgia, serif; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.sp-mind { font-style: italic; color: var(--ink-2); border-left: 2px solid var(--line); padding-left: 10px; }
.sp-score { display: grid; gap: 12px; }
.sp-score .tiles { margin: 0; }
.sp-score .tile-stat { padding: 10px 12px; }
.sp-score .tile-stat b { font-size: 20px; }
.sp-big { font-family: "Playfair Display", Georgia, serif; font-size: 30px; line-height: 1.1; }
.sp-big small { font-family: var(--font); font-size: 14px; color: var(--muted); }
.sp-bar { height: 8px; background: var(--hover); border-radius: 999px; overflow: hidden; }
.sp-bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.sp-approve { background: var(--amber-soft); }
.sp-approve .sp-tbody { padding-left: 12px; }
.sp-done summary { cursor: pointer; color: var(--muted); font-size: 13.5px; padding: 4px 0 8px; }
.sp-callrow, .sp-person { display: flex; align-items: center; gap: 10px; padding: 11px 12px; flex-wrap: wrap; }
.sp-callrow .grow, .sp-person .grow { min-width: 160px; }
.sp-pstats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.sp-pstats b { color: var(--ink); }
.sp-pstats .bad b { color: var(--red); }
.sp-change { font-style: normal; font-size: 12px; color: var(--sage); }
.sp-modal-body { display: grid; gap: 10px; overflow-y: auto; }
.sp-modal-body .modal-foot { margin-top: 4px; }
.sp-sheet-t { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.sp-notes { background: var(--hover); border-radius: var(--radius-s); padding: 8px 10px; font-size: 14px; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.empty.small { padding: 14px 16px; font-size: 14px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius-m); }
.person-job { margin: 4px 0 2px; }
.job-input { font-size: 13px; padding: 4px 8px; max-width: 220px; }
.sp-body + .filters, .page > .filters + .filters { margin-top: 8px; } .page > .filters { margin-bottom: 14px; }
.sp-score .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .sp-score .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sp-big { font-size: 26px; } }
