/* Meeting Suite demo. Type and color system carried over from the coverage tool (same three
   self-hosted faces, same ink ramp, same status colors), so the demo kit reads as one product. */

@font-face { font-family: "Big Shoulders Display"; src: url("fonts/big-shoulders.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #f7f7f4;
  --panel: #ffffff;
  --ink: #17171a;
  --muted: #5b5c63;
  --faint: #6b6c74;
  --line: #e6e6e1;
  --line-strong: #c9c9c1;
  --line-field: #94958d;
  --brand: #1d4e89;
  --brand-soft: #e9f0f8;
  --green: #1f6f4a;  --green-soft: #e8f1eb;
  --amber: #8a5a06;  --amber-soft: #faf1dd;
  --red: #a52a22;    --red-soft: #f9e8e6;
  --blue: #1d4e89;   --blue-soft: #e9f0f8;
  --hl: #fff3c4;     --hl-edge: #d9a400;
  --radius: 12px; --radius-sm: 8px;
  --lift: 0 8px 26px rgba(23,23,26,0.07);
  --font: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Big Shoulders Display", "Arial Narrow", var(--font);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --tap: 44px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 17px; }
p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- top ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 10px 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { min-width: 0; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.05; text-transform: uppercase; color: var(--brand); letter-spacing: 0.01em; }
.brand-sub { font-family: var(--font); text-transform: none; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.school { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); background: var(--panel); border: 1px solid var(--line-field); border-radius: var(--radius-sm); padding: 8px 14px; font-weight: 600; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.quiet { border-color: var(--line-strong); color: var(--ink); }
.reset { flex: none; }

/* ---------- layout ---------- */
.main { max-width: 1200px; margin: 0 auto; padding: 18px 24px 96px; display: grid; gap: 16px; }
.story, .work { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--lift); min-width: 0; }

/* ---------- the chain: meetings -> commitments -> late ---------- */
.eyebrow { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.steps li { position: relative; min-width: 0; }
.steps li + li::before { content: ""; position: absolute; left: -17px; top: 50%; width: 11px; height: 11px; border-top: 2.5px solid var(--line-field); border-right: 2.5px solid var(--line-field); transform: translateY(-50%) rotate(45deg); }
.step { width: 100%; height: 100%; min-height: 76px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.step:hover { border-color: var(--line-field); }
.step .n { font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 0.95; }
.step .l { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.25; overflow-wrap: normal; hyphens: none; }
.step.bad { background: var(--red-soft); border-color: #e2b3ae; }
.step.bad .n, .step.bad .l { color: var(--red); }
.headline { margin-top: 14px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.headline b { color: var(--red); }
.headline .risk-n { color: var(--amber); }

.rules h2 { margin-bottom: 8px; }
.rules dl { margin: 0 0 10px; display: grid; gap: 7px; }
.rules dl div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; }
.rules dt, .rules dd { margin: 0; }
.rules dd { font-size: 14px; }

/* ---------- tabs ---------- */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; position: sticky; top: 8px; z-index: 4; box-shadow: var(--lift); }
.tabs button { min-height: var(--tap); background: none; border: 0; border-radius: 99px; padding: 6px 8px; font-weight: 650; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tabs button:hover { color: var(--ink); background: var(--bg); }
.tabs button[aria-current="page"] { background: var(--ink); color: #fff; }

/* ---------- filters (Now) ---------- */
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.filter { min-height: 64px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; box-shadow: var(--lift); }
.filter .n { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; }
.filter .l { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.filter.f-late .n { color: var(--red); }
.filter.f-today .n { color: var(--blue); }
.filter.f-risk .n { color: var(--amber); }
.filter.f-done .n { color: var(--green); }
.filter[aria-pressed="true"] { border: 2px solid var(--ink); padding: 7px 11px; }
.filter[aria-pressed="true"] .l::after { content: " · showing"; color: var(--ink); }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 4px 2px 0; }
.list-head h2 { font-size: 17px; }
.list-head .count { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--muted); }
.link-btn { min-height: var(--tap); background: none; border: 0; padding: 0 4px; font-weight: 650; font-size: 14px; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- a commitment ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: var(--tap) 1fr; gap: 4px 10px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px 10px 8px; }
.item.b-late { border-left-color: var(--red); }
.item.b-today { border-left-color: var(--brand); }
.item.b-risk { border-left-color: var(--hl-edge); }
.item.b-done { border-left-color: var(--green); background: #fbfcfa; }
.item.b-dropped { border-left-color: var(--line-strong); background: #fafaf8; }
.check { width: var(--tap); height: var(--tap); display: grid; place-items: center; background: none; border: 0; border-radius: 99px; padding: 0; color: var(--line-field); }
.check:hover { background: var(--bg); color: var(--ink); }
.check svg { width: 28px; height: 28px; }
.check[aria-pressed="true"] { color: var(--green); }
.check-none { width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--line-strong); font-weight: 700; }
.body { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 9px; }
.item > .meta { grid-column: 2; }
.what { font-weight: 650; font-size: 15px; line-height: 1.35; }
.b-done .what { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-field); }
.b-dropped .what { color: var(--muted); }
.who { font-size: 14px; }
.who .role { color: var(--muted); }
.from { font-size: 13px; color: var(--muted); }
.from .st { color: var(--ink); font-weight: 600; white-space: nowrap; }
.note { font-size: 13.5px; color: var(--ink); background: var(--bg); border-radius: 6px; padding: 4px 8px; margin-top: 2px; }
.note::before { content: "Note: "; font-weight: 650; color: var(--muted); }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 2px; }
.meta .btn { margin-left: auto; min-width: 88px; }
.due { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line-strong); background: var(--bg); white-space: nowrap; }
.due.late { background: var(--red-soft); border-color: #e2b3ae; color: var(--red); }
.due.today { background: var(--blue-soft); border-color: #bcd0e8; color: var(--blue); }
.due.risk { background: var(--amber-soft); border-color: #e4c77e; color: #6d4705; }
.due.ok { background: var(--panel); color: var(--muted); }
.due.done { background: var(--green-soft); border-color: #b8d6c3; color: var(--green); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 650; background: var(--hl); border: 1px solid #ecd58a; color: #5a3b04; white-space: nowrap; }
.item.just-done { border-left-color: var(--green); background: var(--green-soft); opacity: .6; transition: opacity .45s ease .15s, background .2s; }
.item.just-done .check { color: var(--green); }
.empty { padding: 18px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- meetings + people ---------- */
.intro { font-size: 14px; color: var(--muted); margin: 0 2px; }
.intro b { color: var(--ink); }
.group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); overflow: hidden; }
.group-head { width: 100%; min-height: 64px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; text-align: left; background: none; border: 0; padding: 12px 14px; }
.group-head:hover { background: #fbfbf9; }
.g-name { font-weight: 700; font-size: 16px; }
.g-sub { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.g-chev { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); transition: transform .15s; }
.group-head[aria-expanded="true"] .g-chev { transform: rotate(180deg); }
.g-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.g-stats .s-total { color: var(--ink); }
.g-stats .s-late { color: var(--red); }
.g-stats .s-done { color: var(--green); }
.bar { grid-column: 1 / -1; display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line); }
.bar i { display: block; height: 100%; }
.bar .x-done { background: var(--green); }
.bar .x-late { background: var(--red); }
.bar .x-open { background: #9fb4cf; }
.bar .x-dropped { background: var(--line-strong); }
.group .list { padding: 0 10px 10px; }

/* ---------- everything ---------- */
.section-h { display: flex; align-items: baseline; gap: 8px; margin: 6px 2px 0; font-size: 15px; }
.section-h .count { font-family: var(--mono); font-size: 13px; color: var(--muted); }
details.fold { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
details.fold > summary { min-height: var(--tap); display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-weight: 650; cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "Show"; margin-left: auto; font-size: 13px; color: var(--brand); text-decoration: underline; }
details.fold[open] > summary::after { content: "Hide"; }
details.fold > .list { padding: 0 10px 10px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: #fff; padding: 6px 6px 6px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 20; font-size: 14px; font-weight: 600; }
.toast span { min-width: 0; }
.toast-undo { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.toast-undo:hover { border-color: #fff; }

/* ---------- nudge sheet ---------- */
dialog { border: 0; padding: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.3); width: min(520px, calc(100% - 32px)); max-width: none; color: var(--ink); background: var(--panel); }
dialog::backdrop { background: rgba(23,23,26,.45); }
.sheet { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.sheet h2 { font-size: 19px; }
blockquote { white-space: pre-line; margin: 4px 0; padding: 12px 14px; background: var(--bg); border-left: 4px solid var(--brand); border-radius: 6px; font-size: 15px; line-height: 1.45; }
.sheet-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }

/* a count that just changed */
.bump { animation: bump .7s ease-out; }
@keyframes bump { 0% { background: var(--hl); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .bump { animation: none; } .g-chev { transition: none; } }

/* ---------- laptop: story on the left, the work on the right ---------- */
@media screen and (min-width: 900px) {
  .main { grid-template-columns: 350px minmax(0, 1fr); align-items: start; gap: 22px; padding-top: 22px; }
  .story { position: sticky; top: 16px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .steps li + li::before { left: 24px; top: -15px; transform: rotate(135deg); }
  .step { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 60px; }
  .item { grid-template-columns: var(--tap) minmax(0, 1fr) auto; gap: 4px 16px; padding: 10px 14px 10px 8px; }
  .item > .meta { grid-column: 3; grid-row: 1; flex-direction: column; align-items: flex-end; justify-content: center; flex-wrap: nowrap; margin: 0; min-width: 132px; }
  .item > .meta .btn { margin-left: 0; }
  .step .n { min-width: 56px; }
  .step .l { font-size: 14px; }
  .brand-name { font-size: 30px; }
}

/* ---------- phone ---------- */
@media screen and (max-width: 599px) {
  .top { padding: 10px 16px; align-items: flex-start; }
  .brand-name { font-size: 24px; }
  .brand-sub { display: block; font-size: 13px; margin-top: 2px; }
  .brand-sub .dot { display: none; }
  .main { padding: 12px 16px 96px; gap: 12px; }
  .card { padding: 14px 14px; }
  .steps { gap: 14px; }
  .steps li + li::before { left: -11px; width: 8px; height: 8px; border-width: 2px; }
  .step { padding: 8px 7px 8px 9px; min-height: 70px; }
  .step .n { font-size: 32px; }
  .step .l { font-size: 12px; }
  .headline { font-size: 15px; margin-top: 12px; }
  .rules { display: none; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filter { min-height: 56px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; }
  .filter { gap: 8px; }
  .filter .n { font-size: 26px; min-width: 18px; }
  .filter[aria-pressed="true"] .l::after { content: ""; }
  .tabs button { font-size: 13.5px; padding: 6px 4px; }
  .item { padding: 8px 10px 10px 4px; gap: 2px 6px; }
  .sheet-btns .btn { flex: 1; }
  dialog { width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .sheet { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}

/* ---------- the smallest phones (320-359): keep "commitments" on one line ---------- */
@media screen and (max-width: 359px) {
  .chain { padding: 12px; }
  .steps { gap: 10px; }
  .steps li + li::before { display: none; }
  .step { padding: 7px 6px; }
  .step .n { font-size: 28px; }
  .step .l { font-size: 11px; letter-spacing: -0.01em; }
  .tabs button { font-size: 12.5px; padding: 6px 2px; }
}
