/* Square & Compass — one system, three rooms. Brand: charcoal, warm white, restrained orange.
   Signature: architectural drawing language (dimension lines, plan-view office). Everything else stays quiet. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@75..100,400..700&display=swap');
:root {
  --charcoal: #1E2023; --night: #15171A; --night-2: #1B1D21; --night-3: #24272C; --night-line: #34383F;
  --paper: #F6F4F0; --paper-2: #FFFFFF; --paper-line: #DDD8CF; --graphite: #8A857C;
  --orange: #E8702A; --orange-ink: #B4511A; --orange-soft: #FBE9DD;
  --ok: #3F8A5C; --warn: #A86A12; --bad: #B83A26; --info: #3E6E9E; --violet: #6E5AA8;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r1: 4px; --r2: 8px; --r3: 14px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --tap: 44px;
}
.theme-paper { --bg: var(--paper); --surface: var(--paper-2); --raised: #FBFAF7; --ink: #17181B; --ink-2: #3D3A34; --muted: #5E5A53; --line: var(--paper-line); --line-2: #C9C3B8; --accent: var(--orange); --accent-ink: var(--orange-ink); --accent-soft: var(--orange-soft); --focus: var(--orange-ink); color-scheme: light; }
.theme-night { --bg: var(--night); --surface: var(--night-2); --raised: var(--night-3); --ink: #F1EEE8; --ink-2: #C9C4BA; --muted: #9A958B; --line: var(--night-line); --line-2: #474B53; --accent: var(--orange); --accent-ink: #F49A60; --accent-soft: #3A2516; --focus: #F49A60; color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); font-stretch: 100%; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-stretch: 78%; font-weight: 650; line-height: 1.15; margin: 0 0 var(--s3); letter-spacing: -0.005em; }
h1 { font-size: clamp(28px, 5vw, 40px); } h2 { font-size: 21px; } h3 { font-size: 17px; }
p { margin: 0 0 var(--s3); } a { color: var(--accent-ink); text-underline-offset: 3px; } a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .fine { font-size: 13px; color: var(--muted); } .pre { white-space: pre-wrap; } .num { text-align: right; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.pad { padding: var(--s3) var(--s4) 0; } .stack > * + * { margin-top: var(--s4); } .row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.wide { width: 100%; justify-content: center; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s4); border-radius: var(--r2); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 560; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.theme-night .btn.primary { color: #1A0D04; }
.link.danger { color: var(--bad); }
.btn.ghost { background: transparent; } .btn.danger { color: #fff; background: var(--bad); border-color: var(--bad); }
.btn.big { min-height: 56px; font-size: 18px; padding: 0 var(--s5); }
.btn.sm { min-height: 34px; padding: 0 var(--s3); font-size: 14px; }
.btn.on { background: var(--ink); color: var(--bg); } .btn.sharing { background: var(--accent); color: #1A0D04; border-color: var(--accent); }
.btn[disabled] { opacity: .55; cursor: progress; }
.link { background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 0; }
.icon-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; background: transparent; color: var(--ink); border-radius: var(--r2); cursor: pointer; position: relative; font-size: 22px; }
.icon-btn:hover { background: var(--raised); }
input, select, textarea { width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r2); background: var(--surface); color: var(--ink); }
textarea { resize: vertical; line-height: 1.45; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 var(--s3); } .field > span { font-weight: 560; font-size: 15px; } .field small { color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: center; min-height: var(--tap); cursor: pointer; } .check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); } .form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 560; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: currentColor; } .pill.bad, .pill.blocked { color: var(--bad); border-color: currentColor; } .pill.warn { color: var(--warn); border-color: currentColor; }
.pill.act, .pill.waiting { color: var(--accent-ink); border-color: currentColor; background: var(--accent-soft); } .pill.running { color: var(--ok); border-color: currentColor; } .pill.muted { color: var(--muted); }
.callout { border-left: 3px solid var(--line-2); background: var(--raised); padding: var(--s3) var(--s4); border-radius: 0 var(--r2) var(--r2) 0; margin: var(--s3) 0; }
.callout.warn { border-color: var(--warn); } .callout.bad { border-color: var(--bad); } .callout.act { border-color: var(--accent); }
.internal-note, .callout.internal-note { background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--warn) 9%, transparent) 8px 16px); border-left: 3px solid var(--warn); padding: 6px 10px; border-radius: 0 6px 6px 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: var(--s4) var(--s5); }
.empty { text-align: center; padding: var(--s7) var(--s4); color: var(--muted); } .empty h3 { color: var(--ink); }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-2); font-size: 13px; font-weight: 650; flex: none; color: var(--ink-2); }
.avatar.ai { border-radius: 6px; transform: rotate(45deg) scale(.84); } .avatar.ai .ai-mark { transform: rotate(-45deg); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; } .tbl th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 560; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .tbl tr.go { cursor: pointer; } .tbl tr.go:hover td { background: var(--raised); }
@media (max-width: 720px) { .tbl { display: block; overflow-x: auto; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s4); margin: 0; } .facts dt { color: var(--muted); } .facts dd { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; } .plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin: var(--s4) 0 var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s4); color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 560; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.unread { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: var(--s3); } .crumbs a { color: var(--muted); }
.page-head { margin-bottom: var(--s5); } .page-title { margin-bottom: var(--s5); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: var(--s5); align-items: start; } .two-col.wide-left { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s4); }
@media (max-width: 900px) { .two-col, .two-col.wide-left { grid-template-columns: 1fr; } }

/* ---------- frame ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s4); height: 60px; padding: 0 var(--s4); background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-stretch: 80%; font-size: 18px; } .brand .mark { color: var(--accent); display: inline-flex; }
.switcher { display: flex; gap: 2px; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.switcher a { padding: 6px 14px; border-radius: 7px; color: var(--ink-2); text-decoration: none; font-weight: 560; font-size: 15px; } .switcher a.on { background: var(--ink); color: var(--bg); }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; } .me-btn { background: none; border: 0; cursor: pointer; padding: 4px; }
.bell-dot { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.body { min-height: calc(100vh - 60px); } .body.with-nav { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidenav { position: sticky; top: 60px; height: calc(100vh - 60px); padding: var(--s4) var(--s3); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sidenav a { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 12px; border-radius: var(--r2); color: var(--ink-2); text-decoration: none; font-weight: 560; }
.sidenav a:hover { background: var(--raised); } .sidenav a.on { background: var(--raised); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.sidenav .ni { width: 22px; height: 22px; display: inline-flex; } .sidenav .ni svg { width: 22px; height: 22px; fill: none; } .sidenav .nb { margin-left: auto; background: var(--accent); color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 7px; font-weight: 700; }
main { padding: var(--s5) var(--s6) var(--s7); min-width: 0; max-width: 1360px; } main:focus { outline: none; }
@media (max-width: 860px) {
  .brand-name { display: none; } .switcher a { padding: 6px 10px; font-size: 14px; }
  .body.with-nav { display: block; } main { padding: var(--s4) var(--s4) 96px; }
  .sidenav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 30; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; }
  .sidenav a { flex-direction: column; gap: 2px; padding: 4px 6px; min-width: 64px; font-size: 12px; justify-content: center; min-height: 52px; } .sidenav a.on { box-shadow: inset 0 3px 0 var(--accent); }
  .sidenav .nb { position: absolute; margin: -4px 0 0 24px; }
  .theme-night .sidenav { background: var(--surface); }
}
.offline-bar { position: sticky; top: 0; z-index: 40; background: var(--warn); color: #fff; padding: 8px var(--s4); font-size: 14px; font-weight: 560; text-align: center; }
.preview-bar { background: var(--charcoal); color: #F1EEE8; padding: 10px var(--s4); border-radius: var(--r2); margin-bottom: var(--s4); } .preview-bar a { color: #F49A60; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 90; background: var(--charcoal); color: #F6F4F0; padding: 12px 18px; border-radius: 10px; max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.toast.error { background: var(--bad); } @media (max-width: 860px) { .toast { bottom: 92px; } }
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(15,16,18,.55); display: grid; place-items: center; padding: var(--s4); }
.sheet { width: min(640px, 100%); max-height: 88vh; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border-radius: var(--r3); border: 1px solid var(--line-2); overflow: hidden; }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: var(--s3) var(--s4) var(--s3) var(--s5); border-bottom: 1px solid var(--line); } .sheet header h2 { margin: 0; }
.sheet-body { padding: var(--s4) var(--s5); overflow-y: auto; } .sheet footer { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--s2); }
@media (max-width: 640px) { .modal { place-items: end center; padding: 0; } .sheet { border-radius: var(--r3) var(--r3) 0 0; max-height: 92vh; } }
@media (prefers-reduced-motion: no-preference) { .sheet { animation: rise .16s ease-out; } @keyframes rise { from { transform: translateY(8px); opacity: 0; } } }

/* ---------- signature: dimension line ---------- */
.dim { margin: var(--s4) 0 var(--s5); --tickc: var(--line-2); }
.dim-line { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 18px; }
.dim-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--tickc); }
.dim-line::after { content: ''; position: absolute; left: 0; top: 50%; height: 0; border-top: 2.5px solid var(--ink); width: var(--done, 0%); }
.dim .tick { position: relative; justify-self: start; width: 1.5px; height: 18px; background: var(--tickc); }
.dim .tick:first-child::before { content: ''; position: absolute; left: -2px; top: 4px; width: 0; height: 0; border: 5px solid transparent; border-left-color: var(--tickc); transform: translateX(1px); }
.dim .tick.done { background: var(--ink); } .dim .tick.now { background: var(--accent); width: 3px; }
.dim .tick.now::after { content: ''; position: absolute; top: 50%; left: 50%; width: 11px; height: 11px; transform: translate(-50%, -50%) rotate(45deg); background: var(--accent); }
.dim-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 6px; font-size: 13px; color: var(--muted); font-stretch: 85%; } .dim-labels .now { color: var(--ink); font-weight: 650; }
.dim.compact { margin: var(--s2) 0; } .dim.compact .dim-line { height: 12px; } .dim.compact .tick { height: 12px; }
@media (max-width: 480px) { .dim-labels span:not(.now) { visibility: hidden; } .dim-labels .now { visibility: visible; white-space: nowrap; } }

/* ---------- client portal ---------- */
.client-hero { display: flex; justify-content: space-between; align-items: end; gap: var(--s4); flex-wrap: wrap; padding: var(--s4) 0 var(--s5); border-bottom: 1.5px solid var(--ink); margin-bottom: var(--s5); }
.client-hero h1 { font-size: clamp(32px, 7vw, 56px); font-stretch: 75%; margin: 0; } .client-hero .plan { color: var(--muted); margin: 6px 0 0; }
.todo h2 { font-size: 19px; } .todo ul { list-style: none; padding: 0; margin: 0 0 var(--s6); display: grid; gap: var(--s2); }
.todo li a { display: flex; flex-direction: column; gap: 2px; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: var(--r2); color: var(--ink); text-decoration: none; min-height: var(--tap); }
.todo li.warn a { border-left-color: var(--warn); } .todo li.act a { border-left-color: var(--accent); } .todo li span { color: var(--muted); font-size: 14px; }
.proj-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; } .proj-head input { max-width: 280px; }
.chips { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s3) 0 var(--s4); scrollbar-width: none; }
.chips button { min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; white-space: nowrap; font-weight: 560; color: var(--ink-2); }
.chips button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s4); }
.proj-card { display: grid; grid-template-rows: 120px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; color: var(--ink); text-decoration: none; }
.proj-card:hover { border-color: var(--ink-2); text-decoration: none; } .proj-card img { width: 100%; height: 120px; object-fit: cover; }
.thumb-plan { background-color: var(--raised); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 20px 20px; position: relative; }
.thumb-plan::after { content: ''; position: absolute; inset: 26px 34% 22px 26px; border: 1.5px solid var(--graphite); border-right-width: 0; }
.pc-body { padding: var(--s3) var(--s4) var(--s4); } .pc-top { display: flex; justify-content: space-between; gap: var(--s2); } .pc-top h3 { margin: 0 0 2px; }
.status-line { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: var(--s2) 0 0; } .status-line.big { font-size: 18px; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--graphite); flex: none; }
.st-dot.awaiting_info { background: var(--warn); } .st-dot.review { background: var(--accent); } .st-dot.completed { background: var(--ok); } .st-dot.in_progress { background: var(--info); } .st-dot.paused { background: transparent; border: 2px solid var(--graphite); }
.next { color: var(--ink-2); font-size: 15px; margin: 0 0 6px; }
.proj-header { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; align-items: start; } .proj-header h1 { margin-bottom: 4px; } .status-block { text-align: right; }
@media (max-width: 640px) { .status-block { text-align: left; } }
.lead { font-size: 19px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 1.5px solid var(--line-2); } .timeline li { padding: 4px 0 10px 16px; position: relative; display: flex; flex-direction: column; }
.timeline li::before { content: ''; position: absolute; left: -5px; top: 10px; width: 8px; height: 8px; background: var(--bg); border: 1.5px solid var(--ink); transform: rotate(45deg); } .timeline time { font-size: 13px; color: var(--muted); }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.file-list li { display: grid; grid-template-columns: 52px 1fr auto; gap: var(--s3); align-items: center; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); }
.file-list li.latest { border-color: var(--accent); }
.file-ico { width: 52px; height: 52px; display: grid; place-items: center; border: 1.5px solid var(--ink-2); border-radius: 4px; font-size: 11px; font-weight: 700; font-stretch: 80%; color: var(--ink-2); }
.file-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .file-acts { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; align-items: center; }
@media (max-width: 640px) { .file-list li { grid-template-columns: 44px 1fr; } .file-ico { width: 44px; height: 44px; } .file-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.req-list { list-style: none; padding: 0; margin: 0; } .req-list li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); } .req-top { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin-bottom: 6px; } .req-top time { color: var(--muted); font-size: 13px; margin-left: auto; }
.response { background: var(--raised); padding: 8px 12px; border-radius: var(--r2); }
.form-embed { border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; background: #fff; } .form-embed iframe { display: block; width: 100%; height: min(78vh, 1100px); border: 0; }
.threads { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s4); min-height: 60vh; }
.thread-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; align-content: start; }
.thread-list button { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s2); padding: 10px 12px; border-radius: var(--r2); border: 1px solid transparent; background: none; cursor: pointer; min-height: var(--tap); }
.thread-list button span.muted { grid-column: 1; } .thread-list button .unread { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.thread-list button.on { background: var(--surface); border-color: var(--line); }
@media (max-width: 760px) { .threads { grid-template-columns: 1fr; } }
.faq details { border-bottom: 1px solid var(--line); padding: var(--s3) 0; } .faq summary { cursor: pointer; font-weight: 600; min-height: var(--tap); display: flex; align-items: center; }
.people { list-style: none; padding: 0; margin: 0; } .people li { display: flex; gap: var(--s3); align-items: center; padding: 8px 0; } .people li > div { display: flex; flex-direction: column; flex: 1; }
.pick-list { list-style: none; padding: 0; display: grid; gap: var(--s2); max-width: 560px; } .pick-list a { display: flex; justify-content: space-between; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); color: var(--ink); text-decoration: none; min-height: var(--tap); }

/* ---------- conversations ---------- */
.chat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); min-height: 420px; max-height: 76vh; }
.chat-status { font-size: 13px; padding: 0 var(--s4); } .chat-status.bad { color: var(--bad); padding-top: 8px; }
.msgs { list-style: none; margin: 0; padding: var(--s3) var(--s4); overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: var(--s2); }
.msgs-empty { color: var(--muted); text-align: center; margin: auto; }
.msgs .day { align-self: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.msg { max-width: min(680px, 92%); padding: 8px 12px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); align-self: flex-start; position: relative; }
.msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.msg.internal { background: repeating-linear-gradient(135deg, var(--raised) 0 10px, color-mix(in srgb, var(--warn) 10%, var(--raised)) 10px 20px); border: 1px dashed var(--warn); }
.msg.sys { align-self: center; background: transparent; border: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); border-radius: 0; color: var(--ink-2); font-size: 14px; max-width: 100%; text-align: center; }
.msg.failed { border-color: var(--bad); } .msg.sending { opacity: .7; }
.msg .who { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; flex-wrap: wrap; } .msg .who .avatar { width: 24px; height: 24px; font-size: 10px; } .msg .who time { color: var(--muted); }
.tag-internal { font-size: 12px; font-weight: 650; color: var(--warn); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; } .msg blockquote { margin: 0 0 6px; padding-left: 8px; border-left: 2px solid var(--line-2); color: var(--muted); font-size: 13px; }
.msg .meta { font-size: 12px; margin-top: 4px; color: var(--muted); } .msg .reply-btn { font-size: 12px; opacity: 0; } .msg:hover .reply-btn, .msg:focus-within .reply-btn { opacity: 1; }
@media (pointer: coarse) { .msg .reply-btn { opacity: 1; } }
.mention { background: var(--accent-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .att { background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 13px; color: var(--ink); }
.composer { border-top: 1px solid var(--line); padding: var(--s2) var(--s3) var(--s3); } .composer.is-internal { background: color-mix(in srgb, var(--warn) 6%, transparent); }
.compose-row { display: flex; gap: var(--s2); align-items: flex-end; } .compose-row textarea { min-height: 46px; max-height: 200px; }
.audience { display: inline-flex; gap: 2px; margin-bottom: 6px; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; }
.audience button { border: 0; background: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 560; font-size: 14px; color: var(--ink-2); min-height: 34px; }
.audience button.on.aud-client { background: var(--ink); color: var(--bg); } .audience button.on.aud-internal { background: var(--warn); color: #fff; }
.att-tray { display: flex; flex-wrap: wrap; gap: 6px; } .att-chip { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: 6px; margin-bottom: 6px; } .att-chip progress { width: 60px; }
.reply-bar { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 0; }

/* ---------- office (night) ---------- */
.office-head { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; margin-bottom: var(--s5); } .office-head > div:first-child { flex: 1; } .office-head h1 { margin-bottom: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; } .seg button { border: 0; background: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; color: var(--ink-2); font-weight: 560; } .seg button.on { background: var(--ink); color: var(--bg); }
.office-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s5); align-items: start; } @media (max-width: 1100px) { .office-layout { grid-template-columns: 1fr; } }
.floorplan { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(8, minmax(52px, 1fr)); gap: 0; border: 3px solid var(--ink-2); background: var(--surface);
  background-image: linear-gradient(color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px); background-size: 24px 24px; }
.room { position: relative; display: flex; flex-direction: column; gap: 4px; padding: var(--s3) var(--s4); border: 1.5px solid var(--ink-2); margin: -0.75px; color: var(--ink); text-decoration: none; min-height: 100px; }
/* password boxes: show/hide eye */
.pw-wrap { position: relative; display: block; } .pw-wrap input { width: 100%; padding-right: 52px; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; }
.pw-eye:hover { color: var(--ink); } .pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
