/* Walkthru. Chalk line palette. White paper, black ink, one blue. Colour means status. */
:root {
  --bg: #FFFFFF; --ink: #141414; --muted: #555555; --faint: #6B6B6B; --line: #DDDDDD; --card: #F6F6F4;
  --blue: #1D5BF5; --blue-bg: #EDF2FF; --green: #157A42; --green-bg: #E3F3EA; --amber: #F5B301; --amber-ink: #7A5A00; --amber-bg: #FFF4D6; --red: #D62828;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --head: 'Atkinson Hyperlegible', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
body.dark { background: #141414; color: #fff; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: 0; margin: 0; line-height: 1.1; text-wrap: balance; }
h1 { font-size: 30px; } h2 { font-size: 22px; } .h-mid { font-size: 28px; }
p { margin: 0; }
.muted { color: var(--muted); } .muted-light { color: rgba(255,255,255,.8); } .small { font-size: 14px; } .center { text-align: center; } .left { text-align: left; }
.kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kicker.light { color: rgba(255,255,255,.8); }
.lead { font-size: 16px; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px 0; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 700; font-size: 20px; }
.brand em { color: var(--blue); font-style: normal; }
.top-right { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.link { color: var(--blue); text-decoration: none; font-weight: 700; }
.page { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 24px; max-width: 960px; width: 100%; margin: 0 auto; }
.foot { display: flex; align-items: center; gap: 8px; padding: 10px 20px 22px; color: var(--faint); font-size: 12px; }
.foot .s, .side-foot .s { width: 18px; height: 18px; border-radius: 4px; background: #2E5E4E; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 12px; }
.foot .s { width: 18px; height: 18px; border-radius: 4px; background: #2E5E4E; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 12px; }
.mute { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; color: var(--muted); }

.stack { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.stack.tight { gap: 8px; flex: 0 0 auto; }
.stack.narrow { max-width: 480px; }
.stack.phone { max-width: 440px; width: 100%; margin: 0 auto; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.list { display: flex; flex-direction: column; gap: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.card.empty { color: var(--muted); text-align: center; padding: 28px 16px; }
.card.note { background: var(--bg); font-style: italic; color: var(--muted); }
.rowcard { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.rowcard .title { font-weight: 700; font-size: 17px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
input, textarea { font: inherit; font-size: 17px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); width: 100%; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.err { color: var(--red); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 20px; border-radius: 14px; font: inherit; font-size: 18px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .08s; width: 100%; }
.btn:active { transform: translateY(2px); }
.btn.go { background: var(--green); color: #fff; }
.btn.red { background: var(--bg); color: var(--red); border-color: var(--red); }
.btn.stop { background: #fff; color: var(--red); }
.btn.outline { background: var(--bg); color: var(--ink); border-color: var(--ink); }
.btn.small { min-height: 44px; font-size: 15px; width: auto; padding: 0 16px; border-radius: 12px; }
.btn.big { min-height: 64px; font-size: 20px; }
.btn[disabled] { opacity: .6; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic.w { stroke: #fff; width: 24px; height: 24px; stroke-width: 2; }
.btn.stop .sq { width: 18px; height: 18px; border-radius: 4px; background: var(--red); }

.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.status .ic { width: 14px; height: 14px; stroke-width: 2.5; }
.status.s-delivered, .status.s-accepted, .status.s-sent, .status.s-ready { background: var(--green-bg); color: var(--green); border-color: transparent; }
.status.s-processing, .status.s-recording, .status.s-uploaded { background: var(--amber-bg); color: var(--amber-ink); border-color: transparent; }
.status.s-opened { background: var(--blue-bg); color: var(--blue); border-color: transparent; }
.status.s-failed { background: #FDE8E8; color: var(--red); border-color: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.center { justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.chip .ic { width: 14px; height: 14px; stroke-width: 2.5; }
.chip.done { background: var(--green-bg); color: var(--green); }
.chip.warn { background: var(--amber-bg); color: var(--amber-ink); }
.chip.ask { background: var(--blue-bg); color: var(--blue); }
.chip.plain { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; }
.pill.kind { border-color: transparent; background: var(--blue-bg); color: var(--blue); font-weight: 700; }
.bubble { background: #ECECEA; border-radius: 16px 16px 16px 4px; padding: 12px 14px; font-size: 16px; line-height: 1.45; word-break: break-word; }
.media { width: 100%; border-radius: 12px; background: #141414; max-height: 60vh; }
audio.media { background: transparent; }

.items { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); animation: rise .45s ease-out both; animation-delay: calc(var(--i) * 90ms); }
.item.k-done, .item.k-note { background: var(--green-bg); border-color: transparent; }
.item.k-extra { background: var(--blue-bg); border-color: transparent; }
.item.k-issue, .item.k-question { background: var(--amber-bg); border-color: transparent; }
.item .thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #141414; flex-shrink: 0; }
.item .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.item .room { letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.item .text { font-size: 16px; line-height: 1.3; }
.check { width: 32px; height: 32px; flex-shrink: 0; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: pop .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 90ms + .1s); transform-origin: center; }
.check.amber { stroke: var(--amber-ink); }
.check .tick { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s ease-out forwards; animation-delay: calc(var(--i) * 90ms + .45s); }
.bigcheck { width: 96px; height: 96px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: pop .5s cubic-bezier(.2,.8,.2,1) both; transform-origin: center; margin: 24px auto 0; }
.bigcheck .tick { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .35s ease-out forwards; }
.rise { animation: rise .5s ease-out both; animation-delay: var(--d, 0s); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .item, .check, .check .tick, .bigcheck, .bigcheck .tick, .rise { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1; transform: none; } }

/* tap to fix */
.tap { font: inherit; cursor: pointer; border: 1px dashed var(--faint); background: var(--bg); border-radius: 999px; padding: 3px 9px; font-size: 12px; color: var(--ink); min-height: 28px; }
.tap.room { letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tap.kind { border-style: solid; border-color: transparent; background: var(--blue-bg); color: var(--blue); font-weight: 700; }
.sheet { position: fixed; inset: 0; background: rgba(20,20,20,.45); display: flex; align-items: flex-end; z-index: 20; }
.sheet-card { background: var(--bg); width: 100%; max-width: 520px; margin: 0 auto; border-radius: 18px 18px 0 0; padding: 18px 20px max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: rise .25s ease-out both; }
.sheet .chip { min-height: 44px; font-size: 15px; cursor: pointer; border: 0; font-family: inherit; }
.sheet .chip.on { outline: 2px solid var(--blue); }
.sheet .link { background: none; border: 0; font: inherit; font-weight: 700; color: var(--blue); cursor: pointer; }

.more { border-top: 1px solid var(--line); padding-top: 10px; }
.more summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: 14px; }
.aslist { white-space: pre-wrap; font: inherit; font-size: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; }
.transcript { font-size: 14px; color: var(--muted); margin-top: 8px; }

.explain { display: flex; gap: 12px; align-items: center; background: #141414; color: #fff; border-radius: 14px; padding: 12px 14px; }
.explain .play { width: 44px; height: 44px; border-radius: 999px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.explain .play svg { width: 20px; height: 20px; fill: #fff; }
.explain b { display: block; font-size: 15px; } .explain span { font-size: 13px; opacity: .85; }

.wait { justify-content: center; padding-top: 40px; }
.spin { width: 44px; height: 44px; border-radius: 999px; border: 4px solid var(--line); border-top-color: var(--blue); animation: spin 1s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* recorder */
.rec { position: fixed; inset: 0; background: #141414; color: #fff; overflow: hidden; }
.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #141414; }
.scrim { position: absolute; left: 0; right: 0; pointer-events: none; }
.scrim.top { top: 0; height: 180px; background: linear-gradient(to bottom, rgba(14,16,15,.6), rgba(14,16,15,0)); }
.scrim.bottom { bottom: 0; height: 280px; background: linear-gradient(to top, rgba(14,16,15,.75), rgba(14,16,15,0)); }
.rec-top { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 8px; }
.pill.dark { display: inline-flex; align-items: center; gap: 8px; background: rgba(14,16,15,.6); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pill.dark .dot { width: 10px; height: 10px; border-radius: 999px; background: rgba(255,255,255,.4); }
.pill.dark .dot.live { background: var(--red); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.rec-place { position: absolute; top: calc(max(16px, env(safe-area-inset-top)) + 46px); left: 16px; right: 16px; font-size: 13px; color: rgba(255,255,255,.8); }
.rec-hint { position: absolute; left: 16px; right: 16px; bottom: 210px; background: rgba(14,16,15,.62); border-radius: 12px; padding: 12px 14px; font-size: 16px; line-height: 1.4; display: flex; flex-direction: column; gap: 4px; }
.rec-bars { position: absolute; left: 0; right: 0; bottom: 150px; display: flex; justify-content: center; align-items: flex-end; gap: 6px; height: 48px; }
.rec-bars i { display: block; width: 6px; height: 8px; border-radius: 3px; background: var(--red); transition: height .08s; }
.rec-controls { position: absolute; left: 16px; right: 16px; bottom: max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.rec-sub { font-size: 13px; text-align: center; }
.rec-upload { position: absolute; inset: 0; background: rgba(14,16,15,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; font-size: 18px; font-weight: 700; }
.rec-upload .bar { width: min(320px, 80%); height: 10px; border-radius: 5px; background: rgba(255,255,255,.2); overflow: hidden; }
.rec-upload .bar div { height: 100%; width: 0; background: var(--green); transition: width .2s; }
.rec-err { position: absolute; left: 16px; right: 16px; top: 45%; background: #fff; color: var(--ink); border-radius: 14px; padding: 16px; font-size: 16px; }
.rec-back { position: absolute; top: calc(max(16px, env(safe-area-inset-top)) + 84px); left: 16px; color: #fff; font-size: 13px; opacity: .8; }
[hidden] { display: none !important; }


/* ---- threads and item actions ---- */
.thread { display: flex; flex-direction: column; gap: 10px; }
.ev { display: flex; gap: 10px; align-items: flex-start; }
.ev-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--grey, #6B6B6B); display: grid; place-items: center; flex: none; margin-top: 2px; }
.ev-dot .ic { width: 14px; height: 14px; stroke: var(--grey, #6B6B6B); }
.ev.k-delivered .ev-dot, .ev.k-accepted .ev-dot, .ev.k-item_accepted .ev-dot, .ev.k-done .ev-dot { border-color: #157A42; background: #157A42; }
.ev.k-delivered .ev-dot .ic, .ev.k-accepted .ev-dot .ic, .ev.k-item_accepted .ev-dot .ic, .ev.k-done .ev-dot .ic { stroke: #fff; }
.ev.k-question .ev-dot, .ev.k-reopened .ev-dot { border-color: #F5B301; }
.ev.k-question .ev-dot .ic, .ev.k-reopened .ev-dot .ic { stroke: #F5B301; }
.ev.k-cancelled .ev-dot { border-color: #D62828; }
.ev.k-cancelled .ev-dot .ic { stroke: #D62828; }
.ev-head { line-height: 1.35; }
.ev-text { margin-top: 3px; padding: 8px 10px; background: #F4F4F2; border-radius: 10px; white-space: pre-wrap; }
.ev.side-requester .ev-text { background: #EAF1FE; }
.ev-photo { max-width: 220px; border-radius: 10px; margin-top: 6px; display: block; }
.reply { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.reply textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1.5px solid #CFCFCF; border-radius: 10px; resize: vertical; }
.item-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.item-actions form { display: flex; gap: 6px; align-items: center; margin: 0; }
.item-actions input { font: inherit; padding: 6px 8px; border: 1.5px solid #CFCFCF; border-radius: 8px; min-width: 0; }
.item-actions .ask summary { list-style: none; display: inline-flex; }
.item-actions .ask summary::-webkit-details-marker { display: none; }
.pill.st { background: #157A42; color: #fff; }
.item.st-done .check, .item.st-accepted .check { stroke: #157A42; }
.status.new::after { content: " new"; color: #1D5BF5; font-weight: 700; }


/* ---- the office ---- */
.office { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.office a { flex: none; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: #141414; font-weight: 700; background: #F0F0EE; }
.office a.on { background: #141414; color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters select, .filters input { font: inherit; padding: 8px 10px; border: 1.5px solid #CFCFCF; border-radius: 10px; background: #fff; min-width: 0; flex: 1 1 130px; }
a.item { text-decoration: none; color: inherit; }

input.filled, textarea.filled { border-color: #157A42; background: #EEF7F1; }


/* ---- landing ---- */
.land .hero { padding: 18px 0 8px; }
.land h1.big { font-size: clamp(34px, 8vw, 56px); line-height: 1.05; margin: 6px 0 10px; letter-spacing: -.01em; }
.land .lead { font-size: 18px; max-width: 620px; }
.land .paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.land h2 { margin: 0; font-size: 22px; }
.ticks { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 6px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 8px; border-left: 2.5px solid #157A42; border-bottom: 2.5px solid #157A42; transform: rotate(-45deg); }
.steps { display: grid; gap: 10px; margin-top: 8px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #141414; color: #fff; display: grid; place-items: center; font-weight: 700; }
code.small { font-size: 12px; word-break: break-all; }


/* ---- the shell: left nav on wide screens, a drawer behind the hamburger on phones ---- */
.shell { display: flex; min-height: 100dvh; width: 100%; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side { width: 248px; flex: none; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px calc(12px + env(safe-area-inset-bottom)); position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 8px; }
.side-who { padding: 10px 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.side-name { font-weight: 700; font-family: var(--head); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; min-height: 44px; }
.side-nav a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-nav a:hover { background: #ECECE9; }
.side-nav a.on { background: var(--ink); color: #fff; }
.side-nav a.go { background: var(--green); color: #fff; }
.side-gap { height: 10px; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 14px 8px 0; color: var(--faint); font-size: 12px; }
.burger { width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); }
.burger svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.burger:hover { background: #ECECE9; }
.scrim-nav { position: fixed; inset: 0; background: rgba(20,20,20,.45); z-index: 40; }
.only-mobile { display: none; }
@media (max-width: 899px) {
  .side { position: fixed; top: 0; left: 0; bottom: 0; height: auto; z-index: 50; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.2); width: min(300px, 86vw); }
  .side.open { transform: none; }
  .only-mobile { display: inline-flex; }
  .foot.only-mobile { display: flex; }
  .side-head .burger { display: inline-grid; }
}
@media (min-width: 900px) {
  .side-head .burger { display: none; }
  .top { padding: 18px 32px 0; }
  .page { padding: 20px 32px 40px; max-width: 880px; margin: 0; }
  body.land-page .page { max-width: 1160px; }
  .land .paths { grid-template-columns: 1fr 1fr; }
  .land .hero { padding: 28px 0 16px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 14px 28px; }
  .stack.phone { margin: 0; }
  .top-right:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

.side-legal { padding: 6px 8px 0; color: var(--faint); font-size: 11px; line-height: 1.4; }
