:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #222b24;
  background: #f8f7f3;
  --forest: #244d39;
  --muted: #5b655b;
  --line: #e0e2d9;
  --paper: #fffefa;
  --serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #397d5e;
  outline-offset: 3px;
}
h1, h2, p { margin: 0; }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.topbar {
  min-height: 77px;
  padding: 12px clamp(20px, 4vw, 70px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand strong { display: block; font: 700 23px/1.1 var(--serif); color: var(--forest); }
.brand small { display: block; font-size: 14px; color: var(--muted); margin-top: 3px; }
.primary, .quiet, .canvas-toolbar button, .person-link {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--forest);
  min-height: 44px;
  padding: 8px 14px;
  font-weight: 600;
}
.primary { color: #fff; background: var(--forest); border-color: var(--forest); }
.primary:hover { background: #193a2a; }
.quiet:hover, .canvas-toolbar button:hover, .person-link:hover { background: #eaf0e7; border-color: #c4d3c7; }
.entry {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr);
  max-width: 1040px;
  margin: clamp(28px, 9vh, 112px) auto;
  padding: 0 clamp(18px, 4vw, 40px);
  align-items: center;
  gap: clamp(24px, 7vw, 95px);
}
.entry-intro { padding: 30px 0; }
.entry-monogram { width: 86px; height: 86px; margin-bottom: 28px; }
.entry-monogram img { width: 100%; height: 100%; }
.eyebrow { color: #755035; font-weight: 650; margin-bottom: 12px; }
.entry h1 { font: 600 clamp(39px, 5.2vw, 69px)/1.02 var(--serif); letter-spacing: -.035em; color: var(--forest); }
.entry-intro > p:last-child { color: var(--muted); line-height: 1.55; max-width: 37ch; margin-top: 20px; font-size: 18px; }
.login-card { background: var(--paper); padding: clamp(22px, 4vw, 40px); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 40px #2636290a; }
.login-card h2 { font: 600 31px/1.15 var(--serif); color: var(--forest); margin-bottom: 24px; }
.login-card label { display: grid; gap: 7px; margin: 0 0 17px; font-weight: 600; }
.login-card input, .search input { width: 100%; min-width: 0; min-height: 45px; border-radius: 8px; border: 1px solid #c9cec4; padding: 9px 11px; background: #fff; color: #222b24; }
.login-card button { width: 100%; margin-top: 6px; }
.error { margin-top: 13px; color: #a12828; line-height: 1.45; }
.archive { padding: clamp(22px, 3.5vw, 48px) clamp(16px, 4vw, 70px) 28px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.page-heading h1 { font: 600 clamp(36px, 4vw, 55px)/1.02 var(--serif); color: var(--forest); letter-spacing: -.025em; }
.page-heading p { color: var(--muted); margin-top: 10px; }
.add-person { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.add-person span[aria-hidden] { font-size: 24px; line-height: 1; font-weight: 400; }
.workspace { display: grid; grid-template-columns: clamp(222px, 22vw, 290px) minmax(0, 1fr); min-height: 470px; height: max(470px, calc(100dvh - 264px)); border: 1px solid #d8ded5; border-radius: 15px; overflow: hidden; background: var(--paper); }
.people { display: flex; flex-direction: column; min-height: 0; padding: 19px 13px 12px; border-right: 1px solid var(--line); }
.people-heading { padding: 0 5px 10px; }
.people-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.people-title h2 { font: 600 27px/1.15 var(--serif); color: var(--forest); }
.people-count { border-radius: 20px; background: #e8eee7; color: var(--forest); padding: 2px 9px; font-size: 14px; font-weight: 650; }
.people-list { overflow: auto; margin: 0; padding: 3px 2px; list-style: none; }
.people-list li + li { margin-top: 4px; }
.people-empty { color: var(--muted); padding: 11px 6px; line-height: 1.5; }
.person-link { width: 100%; border-color: transparent; text-align: left; padding: 8px 9px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-link[aria-current="true"] { background: #eaf0e7; border-color: #c4d3c7; }
.person-link > span:last-child { min-width: 0; }
.person-link strong, .person-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-link small { color: var(--muted); font-weight: 400; font-size: 14px; margin-top: 1px; }
.person-initials { flex: 0 0 34px; min-height: 34px; border-radius: 50%; display: grid; place-items: center; background: #eae6d9; color: #584730; font-size: 14px; }
.canvas { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.canvas-toolbar, .canvas-footer { display: flex; align-items: center; gap: 8px; background: var(--paper); padding: 8px 12px; }
.canvas-toolbar { border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.canvas-toolbar button { font-size: 15px; }
.zoom { display: flex; align-items: center; margin-left: auto; }
.zoom button { min-width: 44px; font-size: 22px; }
.zoom output { min-width: 62px; text-align: center; font-variant-numeric: tabular-nums; }
.board-host { min-width: 0; min-height: 0; position: relative; }
.canvas-footer { border-top: 1px solid var(--line); flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: 14px; min-height: 42px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 22px; border-top: 2px solid #65846a; }
.legend span + span i { border-top: 2px dashed #a96538; }
.legend span:nth-child(3) i { border-top: 2px dotted #6d608c; }
.people-toggle { display: none; }
#status[data-error="true"] { color: #a12828; }
.no-script { padding: 20px; }
.dictation-status { flex: 1 0 100%; color: var(--muted); font-size: 14px; line-height: 1.4; }

@media (max-width: 800px) {
  .entry { grid-template-columns: 1fr; margin-top: 18px; gap: 12px; }
  .entry-intro { padding: 15px 0; }
  .entry-monogram { display: none; }
  .archive { padding-block-start: 14px; }
  .page-heading { align-items: center; }
  .page-heading p { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(410px, 1fr); height: auto; min-height: 0; }
  .people-toggle { display: block; margin: 8px 10px; justify-self: start; }
  .people { display: none; max-height: 230px; border-right: 0; border-bottom: 1px solid var(--line); }
  .people-toggle[aria-expanded="true"] + .people { display: flex; }
  .canvas { grid-row: 3; min-height: max(410px, calc(100dvh - 185px)); }
  .canvas-toolbar, .canvas-footer { padding-inline: 9px; }
  .zoom { flex: 0 0 auto; }
}

@media (max-width: 900px) {
  .archive { padding-inline: clamp(10px, 2.6vw, 24px); }
  .topbar { min-height: 62px; padding-block: 8px; }
  .page-heading { margin-bottom: 14px; }
}

@media (max-width: 410px) {
  .page-heading h1 { font-size: 34px; }
  .add-person { padding-inline: 0; min-width: 46px; justify-content: center; }
  .add-person-label { display: none; }
  .zoom output { min-width: 49px; }
  .canvas-toolbar button { padding-inline: 9px; }
}
