/* ms.tqbs.org (plan 097), revamped 2026-11-24 (plan 101, office: "match the app in style
   with the logo"): lib/theme.dart's colours and fonts (f/, OFL.txt), cards, chips, pills. */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 700 800; font-display: swap; src: url(/f/bricolage-700.woff2?v=1) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-display: swap; src: url(/f/hanken-400.woff2?v=1) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500 800; font-display: swap; src: url(/f/hanken-600.woff2?v=1) format("woff2"); }

:root {
  --canvas: #faf8f5; --card: #fff; --line: #eee7ee; --ink: #211a2e; --muted: #6a6474;
  --purple: #5a2a8c; --on-purple: #fff; --deep: #42206b; --chip: #f2ecf8; --field: #fff; --green: #4f9a2d;
  --ok: #2f7a17; --ok-bg: #e8f4e1; --bad: #b3261e; --bad-bg: #fbe9e7; --warn: #8a5a00; --warn-bg: #fbf3dd;
  --none-t: #fff; --none-l: #e9e3ec; --none-r: #dcd4e2;
  --shadow: 0 1px 2px rgba(33, 26, 46, .05), 0 6px 20px rgba(33, 26, 46, .05);
  --head: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #171221; --card: #231c31; --line: #372d48; --ink: #f1edf6; --muted: #a79fb5;
    --purple: #c9a9f0; --on-purple: #171221; --deep: #2e2344; --chip: #3a2c50; --field: #2b2239;
    --ok: #8fe063; --ok-bg: rgba(143, 224, 99, .13); --bad: #ff8a7a; --bad-bg: rgba(255, 123, 107, .13);
    --warn: #f6c445; --warn-bg: rgba(246, 196, 69, .13); --none-t: #231c31; --none-l: #2e2540; --none-r: #271f36; --shadow: none;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--canvas); color: var(--ink); font: 16px/1.5 var(--body); }
h1, h2 { font-family: var(--head); font-weight: 700; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.5rem; line-height: 1.2; margin-bottom: 4px; }
h2 { font-size: 1.05rem; line-height: 1.3; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* the bar: logo left; the person, Sign out and Copy link right */
.bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; background: var(--card); border-bottom: 1px solid var(--line);
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}
.logo { display: block; height: 36px; width: auto; padding: 4px 10px; background: #fff; border-radius: 999px; }
@media (min-width: 720px) { .logo { height: 44px; padding: 5px 12px; } }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 600; }
.avatar { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--purple); color: var(--on-purple); font: 700 13px/1 var(--head); }
.avatar:empty { display: none; }
.who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12ch; }
.btn-line, .btn-copy { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn-line { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.btn-copy { border: 0; background: var(--purple); color: var(--on-purple); }
.btn-copy.done { background: var(--green); color: #fff; }
@media (max-width: 479px) { .who { padding: 3px; } .who-name, .who:has(.avatar:empty) { display: none; } }
@media (max-width: 359px) { .copy-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .btn-copy { padding: 8px; } }

main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); }
.boot { color: var(--muted); text-align: center; margin: 48px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 12px; box-shadow: var(--shadow); scroll-margin-top: 76px; }

/* sign-in, the code, notices */
.auth { max-width: 420px; margin: 16px auto 24px; padding: 24px 20px; }
.auth-logo { display: block; width: 172px; height: auto; margin: 0 0 18px -2px; padding: 6px 11px; background: #fff; border-radius: 999px; }
.squiggle { display: block; width: 56px; height: 8px; margin: 2px 0 12px; }
.squiggle path { fill: none; stroke: #64b43c; stroke-width: 3.5; stroke-linecap: round; }
.lede { color: var(--muted); }
.fine { color: var(--muted); font-size: 13px; }
.auth .fine { margin-top: 16px; }
.notice-text { font-size: 1.05rem; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; }
input:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(90, 42, 140, .2); }
textarea { resize: vertical; min-height: 5em; }
.btn { display: flex; justify-content: center; width: 100%; margin-top: 16px; padding: 12px 20px; border: 0; border-radius: 999px; background: var(--green); color: #fff; font-weight: 600; }
.btn.inline { display: inline-flex; width: auto; margin: 0; padding: 9px 22px; }
.btn-text { display: block; margin: 12px auto 0; padding: 6px; border: 0; background: none; color: var(--purple); font-weight: 600; }
.msg { color: var(--bad); font-size: 14px; margin-top: 10px; }
.msg:empty { display: none; }

/* the report */
.report { max-width: 760px; margin: 0 auto; }
.welcome { font: 700 1.3rem/1.25 var(--head); margin: 4px 0 12px; }
.eyebrow { color: var(--purple); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.when { color: var(--muted); margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--chip); color: var(--ink); font-size: 13px; font-weight: 600; }
.chip:empty { display: none; }
.chip.live { background: var(--ok-bg); color: var(--ok); }
.chip.filed { color: var(--purple); }
.chip.missed { background: var(--bad-bg); color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
.hero .fine { margin-top: 10px; }
@media (min-width: 980px) {
  .report { max-width: none; }
  .cols { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
  .iso { position: sticky; top: 76px; }
}

/* the building view (drawn by ms.js) */
.iso h2 { margin-bottom: 6px; }
.iso-svg { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; overflow: visible; }
.plate { cursor: pointer; outline: none; }
.plate { --t: var(--none-t); --e: var(--muted); --l: var(--none-l); --r: var(--none-r); }
.plate.ok { --t: #4f9a2d; --e: #3e7d22; --l: #3e7d22; --r: #33681b; }
.plate.some { --t: #c98a10; --e: #a6720c; --l: #a6720c; --r: #8c600a; }
.plate .t { fill: var(--t); stroke: var(--e); stroke-width: 1; }
.plate .l { fill: var(--l); }
.plate .r { fill: var(--r); }
.plate:hover .t, .plate:focus-visible .t { stroke: var(--purple); stroke-width: 2.5; }
.plate.pulse .t { animation: pulse 1.6s ease-in-out infinite; }
.lbl { fill: var(--ink); font: 600 13px var(--body); }
.lbl.more { fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.sw { width: 11px; height: 11px; border-radius: 3px; margin-left: 4px; }
.sw.ok { background: #4f9a2d; }
.sw.some { background: #c98a10; }
.sw.none { border: 1px solid var(--muted); }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--purple); } }
.flash { animation: flash 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .dot, .plate.pulse .t, .flash { animation: none; } }

/* areas, lines, photos */
.area-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.items, .comments { list-style: none; margin: 0; padding: 0; }
.items > li, .comments > li { padding: 12px 0; border-top: 1px solid var(--line); }
.items > li:first-child, .comments > li:first-child { border-top: 0; }
.line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.title { font-weight: 600; overflow-wrap: anywhere; }
.state { flex: none; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.state.ok { background: var(--ok-bg); color: var(--ok); }
.state.bad { background: var(--bad-bg); color: var(--bad); }
.state.warn { background: var(--warn-bg); color: var(--warn); }
.meta, .about { color: var(--muted); font-size: 14px; margin-top: 3px; }
.note, .pre, .body { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumbs:empty { display: none; }
.thumb { width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--chip); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* comments */
.comments { margin: 8px 0; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.c-name { font-weight: 600; overflow-wrap: anywhere; }
.role { padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--purple); }
.role.tq { background: var(--ok-bg); color: var(--ok); }
.role.porter { background: var(--warn-bg); color: var(--warn); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }

/* the gentle nudges, and the app banner: always at the bottom, never over the page's end */
.nudge { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.nudge img { width: 24px; height: 24px; flex: none; border-radius: 6px; }
.col > .nudge { margin: 4px 4px 12px; }
.banner {
  position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 10px; background: var(--deep); color: #fff; box-shadow: 0 -4px 16px rgba(33, 26, 46, .12);
  padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.b-icon { width: 36px; height: 36px; flex: none; border-radius: 9px; background: #fff; }
.b-text { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.b-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.store { display: inline-flex; flex-direction: column; padding: 5px 12px; border-radius: 10px; background: #fff; color: #211a2e; font-size: 14px; font-weight: 700; line-height: 1.15; text-decoration: none; white-space: nowrap; }
.store small { font-size: 10px; font-weight: 400; }
.b-close { display: grid; place-items: center; width: 32px; height: 32px; flex: none; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; }
@media (max-width: 400px) { .b-icon { width: 30px; height: 30px; } .b-text { font-size: 13px; } .store small { display: none; } }

/* the photo overlay */
dialog:not([open]) { display: none; }
.viewer { max-width: 96vw; max-height: 96vh; padding: 12px; border: 0; border-radius: 16px; background: var(--card); color: var(--ink); text-align: center; }
.viewer::backdrop { background: rgba(23, 18, 33, .78); }
.viewer img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 10px; }
.viewer .btn { display: inline-flex; width: auto; margin: 12px auto 0; }
