/* The live operator demo (2026-10-28, simplified 2026-10-29 to the mockup's simple home). Same look
   as SCHEDULER-APP-MOCKUP.html: a sidebar, Needs you, and Today with one thread per call-off,
   collapsed to a status chip and a title until it is opened. */
:root {
  --bg: #F2F4F6; --surface: #FFFFFF; --sunk: #E8ECF0; --ink: #17212A; --muted: #5A6774; --line: #D9E0E6;
  --accent: #1E6A59; --accent-ink: #FFFFFF; --accent-soft: #DFEFE9;
  --open: #B93C28; --open-soft: #FBE3DD; --wait: #93600A; --wait-soft: #FFF0CC;
  --ok: #1F7A4A; --ok-soft: #D9F0E2; --agency: #6646B5; --agency-soft: #ECE5FA;
  --shadow: 0 1px 2px rgba(23, 33, 42, .06), 0 4px 14px rgba(23, 33, 42, .06);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F161C; --surface: #17212A; --sunk: #1D2934; --ink: #E5EBF0; --muted: #9AA8B4; --line: #2A3742;
    --accent: #5BC0A4; --accent-ink: #0F161C; --accent-soft: #173A32;
    --open: #F17E68; --open-soft: #3D211C; --wait: #E3AD3E; --wait-soft: #392C10;
    --ok: #5DC48A; --ok-soft: #163522; --agency: #B49CF5; --agency-soft: #2C2345;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F161C; --surface: #17212A; --sunk: #1D2934; --ink: #E5EBF0; --muted: #9AA8B4; --line: #2A3742;
  --accent: #5BC0A4; --accent-ink: #0F161C; --accent-soft: #173A32;
  --open: #F17E68; --open-soft: #3D211C; --wait: #E3AD3E; --wait-soft: #392C10;
  --ok: #5DC48A; --ok-soft: #163522; --agency: #B49CF5; --agency-soft: #2C2345;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 1.65rem; line-height: 1.15; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1.05rem; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.brand i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-family: var(--display); background: var(--accent); color: var(--accent-ink); }
.brand b { font-family: var(--display); display: block; font-size: 1rem; }
.brand small { font-size: .78rem; color: var(--muted); }
.community { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 1px; }
.community small { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.community span { font-size: .8rem; color: var(--muted); }
.try { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; font-size: .9rem; }
.try ol { margin: 8px 0 0; padding-left: 1.2rem; display: grid; gap: 4px; }
.try a { font-weight: 700; white-space: nowrap; }
.side-foot { margin-top: auto; font-size: .78rem; color: var(--muted); }

main { padding: 24px clamp(16px, 3vw, 40px) 60px; min-width: 0; display: grid; gap: 22px; align-content: start; max-width: 1000px; }
.head { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: end; justify-content: space-between; }
.head p { margin: 4px 0 0; color: var(--muted); }
.setting { display: grid; gap: 5px; justify-items: end; }
.setting small { font-size: .78rem; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--sunk); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.block { display: grid; gap: 10px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.section-title small { color: var(--muted); font-size: .8rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 13px; font-weight: 600; display: inline-flex; gap: 7px; align-items: center; }
.btn:hover { background: var(--sunk); }
.btn.small { padding: 4px 10px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.needs:empty { display: none; }
.need { padding: 16px 18px; display: grid; gap: 10px; border-top: 4px solid var(--wait); animation: rise .35s ease-out; }
.need small { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.need p { margin: 0; font-size: 1rem; }
.clock { font-size: .82rem; color: var(--wait); font-weight: 600; }
.clock b { font-variant-numeric: tabular-nums; }

.act-now { display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-top: 4px solid var(--open); }
.act-now.calm { border-top-color: var(--ok); }
.act-now .kpi { display: inline-flex; gap: 6px; align-items: baseline; font-size: .9rem; color: var(--muted); }
.act-now .kpi b { color: var(--ink); font-size: 1rem; font-family: var(--display); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--open); position: relative; margin-right: 6px; vertical-align: 1px; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.act-list { display: grid; gap: 10px; }
.act { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; animation: rise .35s ease-out; }
.act.is-live { border-color: var(--accent); }
.act-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 16px; width: 100%; text-align: left; border: 0; background: none; }
.act-head:hover { background: var(--sunk); }
.act-head b { font-family: var(--display); font-size: 1rem; }
.act-head small { color: var(--muted); font-size: .82rem; display: block; }
.act-head .swap { font-size: .82rem; color: var(--muted); text-align: right; }
.act-head .swap b { font-family: var(--body); font-size: .9rem; color: var(--ink); }
.act:not(.open) .act-body { display: none; }
.act-st { font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.act-st.open { color: var(--surface); background: var(--open); }
.act-st.open .live-dot { background: var(--surface); }
.act-st.you { color: var(--wait); background: var(--wait-soft); }
.act-st.done { color: var(--ok); background: var(--ok-soft); }
.act-st.agency { color: var(--agency); background: var(--agency-soft); }
.act-body { padding: 12px 16px 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.timeline { list-style: none; margin: 0 0 0 6px; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 10px 16px; font-size: .92rem; animation: rise .3s ease-out; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.timeline li.no::before { border-color: var(--open); }
.timeline li.yes::before { border-color: var(--ok); background: var(--ok); }
.timeline li.now::before { border-color: var(--open); background: var(--open); }
.timeline li.you::before { border-color: var(--wait); background: var(--wait); }
.timeline time { color: var(--muted); display: inline-block; min-width: 70px; }
.sms { margin: 6px 0 2px; padding: 8px 11px; border-radius: 10px 10px 10px 2px; background: var(--sunk); font-size: .86rem; max-width: 52ch; }
.sms small { display: block; color: var(--muted); margin-top: 3px; font-size: .76rem; }
details.checked { font-size: .86rem; }
details.checked summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.checked table { border-collapse: collapse; margin-top: 8px; width: 100%; }
.checked td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.checked td:first-child { white-space: nowrap; font-weight: 600; }
.checked .skip td { color: var(--muted); }

.empty { padding: 22px 22px 20px; display: grid; gap: 10px; justify-items: start; border-style: dashed; box-shadow: none; }
.empty p { margin: 0; max-width: 56ch; }
.empty a { font-weight: 700; white-space: nowrap; }
.foot { font-size: .86rem; color: var(--muted); margin: 0; }

@media (max-width: 860px) {
  .setting { justify-items: start; }
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 12px; }
  .community, .side-foot { display: none; }
  .try { flex: 1 1 100%; }
  .act-head { grid-template-columns: auto minmax(0, 1fr); }
  .act-head .swap { grid-column: 1 / -1; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot::after, .act, .need, .timeline li { animation: none; }
}
