:root {
  --ink: #183a32;
  --muted: #52695f;
  --paper: #f3f7f4;
  --surface: #ffffff;
  --line: #d5e2d9;
  --accent: #286247;
  --good: #236549;
  --warn: #78520b;
  --danger: #9f2f37;
  --scroll-thumb: #52695f;
  --scroll-track: #f3f7f4;
  --scroll-hover: #286247;
  --scroll-active: #183a32;
  --radius-panel: 10px;
  --radius-control: 6px;
  --section-gap: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  scrollbar-gutter: stable;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: auto;
}
* {
  box-sizing: border-box;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}
*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 3px solid var(--scroll-track);
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
}
*::-webkit-scrollbar-thumb:active {
  background: var(--scroll-active);
}
body {
  margin: 0;
}
h1,
h2,
.brand {
  font-family: Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
}
h1 {
  font-size: 2.1rem;
  margin: 0 0 12px;
}
h2 {
  font-size: 1.5rem;
  margin: 0 0 16px;
}
h3 {
  font-size: 1.05rem;
  margin: 0 0 10px;
}
p {
  margin: 8px 0 16px;
}
small,
.muted {
  color: var(--muted);
}
button,
a,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  border: 1px solid var(--accent);
  border-radius: var(--radius-control);
  padding: 10px 16px;
  background: var(--accent);
  color: var(--surface);
  cursor: pointer;
  min-height: 44px;
  white-space: normal;
}
button:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}
button.secondary:hover:not(:disabled) {
  background: var(--paper);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button[aria-busy="true"] {
  opacity: 0.65;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--ink);
  background: var(--surface);
  min-height: 44px;
}
input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: var(--accent);
}
textarea {
  resize: none;
  min-height: 132px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.field {
  margin: 16px 0;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}
.error {
  color: var(--danger);
  min-height: 1.5em;
  margin: 10px 0;
}
.field [aria-invalid="true"] {
  border-color: var(--danger);
}
.help {
  font-size: 0.88rem;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 28px 22px;
}
.brand {
  font-size: 1.8rem;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.signed-in {
  display: grid;
  gap: 2px;
  margin: 18px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.signed-in strong {
  font-size: 1.05rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.73rem;
  color: var(--muted);
}
nav {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}
nav button {
  text-align: left;
}
nav button[aria-current="page"] {
  background: var(--accent);
  color: var(--surface);
}
main {
  padding: 38px clamp(20px, 4vw, 60px);
  max-width: 1350px;
  min-width: 0;
}
main > header {
  margin-bottom: 26px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 24px;
  margin-bottom: var(--section-gap);
  min-width: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--section-gap);
}
.grid > .panel {
  margin: 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.card {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.card:first-child {
  border-top: 0;
}
.card h3 {
  margin-bottom: 5px;
}
.spine {
  border-left: 5px solid var(--accent);
  padding-left: 16px;
}
.badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 3px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 4px 8px 8px 0;
}
.warning {
  border-left: 4px solid var(--warn);
  padding: 12px 16px;
  background: var(--paper);
  font-size: 0.9rem;
}
.hash {
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}
.terms {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.empty {
  padding: 20px 0;
  color: var(--muted);
}
.login {
  max-width: 510px;
  margin: 8vh auto;
  padding: 28px;
}
.login header {
  padding-bottom: 18px;
}
.password-row {
  display: flex;
  gap: 8px;
}
.password-row input {
  min-width: 0;
}
.password-row button {
  min-width: 78px;
}
.account {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  overflow-wrap: anywhere;
}
.banner {
  margin-top: 22px;
  font-size: 0.83rem;
}
.summary {
  font-size: 1.6rem;
  font-family: Georgia, serif;
}
.inline-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.list-count {
  font-size: 0.85rem;
  color: var(--muted);
}
/* In-flow feedback cannot cover a control; keep short-status space reserved. */
#notice {
  min-height: 3rem;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--surface);
  text-align: center;
  overflow-wrap: anywhere;
}
#notice:empty {
  background: transparent;
}

dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  max-width: min(92vw, 520px);
  max-height: 90dvh;
  overflow: auto;
  padding: 28px;
  color: var(--ink);
}
dialog::backdrop {
  background: rgb(24 58 50 / 0.35);
}
.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  background: var(--surface);
  padding: 10px;
  z-index: 30;
}
.skip:focus {
  top: 12px;
}
.letterhead {
  border-top: 4px solid var(--accent);
  padding-top: 16px;
}
.logo {
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-weight: bold;
}
.tone-navy {
  color: #17365d;
}
.tone-plum {
  color: #65385e;
}
.definition {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr;
  gap: 8px;
  margin: 12px 0;
}
.definition dt {
  color: var(--muted);
}
.definition dd {
  margin: 0;
  overflow-wrap: anywhere;
}
details {
  margin: 14px 0;
}
summary {
  cursor: pointer;
  padding: 8px 0;
  font-weight: 600;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 0.85rem;
}
.loading {
  min-height: 100px;
}
.wide {
  grid-column: 1/-1;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    margin-top: 14px;
  }
  .account {
    margin-top: 14px;
    padding-top: 12px;
  }
  .account p {
    margin: 0;
  }
  .account button {
    margin-top: 10px;
  }
  main {
    padding: 24px 16px;
  }
  .panel {
    padding: 18px;
  }
  .login {
    margin: 24px auto;
    padding: 18px;
  }
  .inline-pair {
    grid-template-columns: 1fr;
  }
  .banner {
    margin-top: 12px;
  }
  .definition {
    grid-template-columns: 1fr;
  }
  .definition dd {
    margin-bottom: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none;
  }
  button:active:not(:disabled) {
    transform: none;
  }
}
@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
  button,
  .panel,
  input,
  select,
  textarea {
    border-color: ButtonText;
  }
}
nav button[aria-current="page"]:hover:not(:disabled) {
  background: var(--ink);
  color: var(--surface);
}

.firm-logo {
  width: 96px;
  height: 64px;
  max-width: 128px;
  max-height: 96px;
  object-fit: contain;
}
.mail-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}

.calendar-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.calendar-table {
  width: 100%;
  min-width: 56rem;
  table-layout: fixed;
}
.calendar-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}
.calendar-table h3 {
  font-size: 0.9rem;
}
.calendar-table caption {
  text-align: left;
  padding: 0.75rem 0;
}

/* Intake board: existing palette, scoped overflow and readable action columns. */
.intake-board-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.intake-board-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 44rem;
}
.intake-board-wrap th,
.intake-board-wrap td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line, #d5e2d9);
}
.intake-board-wrap th {
  background: var(--paper, #f3f7f4);
}
.intake-board-wrap td {
  min-width: 7rem;
  max-width: 24rem;
  overflow-wrap: anywhere;
}
.intake-board-wrap ul {
  padding-left: 1.1rem;
  margin: 0;
  font-size: 0.875rem;
}

/* Intake board progress updates */
.latest-update {
  min-width: 220px;
  max-width: 340px;
}
.latest-update > * {
  display: block;
}
.update-snippet {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.row-actions {
  display: grid;
  gap: 6px;
  min-width: 120px;
}
.pin-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff3cd;
  color: #6b4e00;
  margin-right: 6px;
}
.pin-badge.pin-urgent,
.update.pin-urgent .pin-badge {
  background: #fde2e1;
  color: #8a1c14;
}
.pin-badge.pin-high,
.update.pin-high .pin-badge {
  background: #ffe8cc;
  color: #7a3e00;
}
.updates-row > td {
  background: var(--surface);
}
.updates-panel {
  display: grid;
  gap: 14px;
  padding: 6px 2px;
  max-width: 900px;
}
.update-form textarea {
  width: 100%;
  min-height: 80px;
}
.update-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.updates-list {
  display: grid;
  gap: 10px;
}
.update {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.update.pinned {
  border-left-color: #c9a227;
}
.update.pin-high {
  border-left-color: #d9822b;
}
.update.pin-urgent {
  border-left-color: #c0392b;
}
.update-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 6px 0;
}
.update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
}

/* Staff schedule */
.week-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.schedule-wrap {
  overflow-x: auto;
}
table.schedule {
  min-width: 900px;
}
table.schedule th.today {
  background: #e7f1ec;
}
table.schedule td {
  vertical-align: top;
  min-width: 110px;
}
.role-label {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
}
.shift {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: #eef5f1;
  border-left: 3px solid #2f6b4f;
  font-size: 0.85rem;
}
.shift-note {
  overflow-wrap: anywhere;
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: #8a1c14;
  text-decoration: underline;
  font-size: 0.8rem;
  justify-self: start;
  cursor: pointer;
  min-height: 0;
}
.week-total {
  font-weight: 600;
  white-space: nowrap;
}
.shift-form .who {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
}
.shift-form .check {
  display: flex;
  align-items: center;
  gap: 4px;
}
.shift-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

/* Client files */
.file-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.file-name.big {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 6px;
}
.file-name.preview {
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 6px;
}
.file-head {
  margin-bottom: 16px;
}
.file-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 800px) {
  .file-layout {
    grid-template-columns: 1fr;
  }
}
.folder-list {
  display: grid;
  gap: 6px;
}
.folder-list button {
  text-align: left;
}
.small-h {
  font-size: 1rem;
  margin: 0 0 8px;
}
.small {
  font-size: 0.82rem;
}
.pre {
  white-space: pre-wrap;
}
.file-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.file-form textarea,
.file-form input:not([type="checkbox"]),
.file-form select {
  width: 100%;
}
.file-form button[type="submit"] {
  justify-self: start;
}
.doc-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}
.status-pill {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f0;
}
.status-pill.s-done {
  background: #dff3e6;
}
.a-done td,
.a-cancelled td {
  opacity: 0.65;
}
.access-table select {
  min-width: 70px;
}
.lvl-view {
  background: #eef5ff;
}
.lvl-edit {
  background: #e3f4e8;
}
.comm-subject {
  font-weight: 600;
  margin-top: 4px;
}
.pin-badge.kind {
  background: #e8eef6;
  color: #23415f;
}
.history {
  margin: 0;
  padding-left: 16px;
}

/* File team + staff board */
.team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  background: #fff;
}
.new-version summary,
.reply-box summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: #2f6b4f;
  margin-top: 4px;
}
.post-title {
  margin: 6px 0 0;
  font-size: 1.05rem;
}
.update.unread {
  box-shadow: 0 0 0 2px #f0b429 inset;
}
.replies {
  display: grid;
  gap: 8px;
  margin: 8px 0 4px 14px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}
.reply .update-body {
  margin: 2px 0 0;
}

/* My work */
tr.overdue td {
  background: #fdecea;
}
.overdue-num {
  color: #8a1c14;
  font-weight: 700;
}
.file-link {
  color: inherit;
  text-align: left;
  font-size: 0.9rem;
}
.new-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.my-files + *,
input[type="search"] {
  width: 100%;
  margin-bottom: 12px;
}

.template-picker {
  max-width: 340px;
  font-size: 0.9rem;
}

/* Sign-off, deadlines, conflict check */
.pin-badge.approved {
  background: #dff3e6;
  color: #1d5c36;
}
.muted-badge {
  background: #f1f1f1;
  color: #555;
}
.deadlines-table td {
  vertical-align: top;
}

/* Time, invoices, trust */
.timer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.time-table td {
  vertical-align: top;
}
.ts-written-off td,
.ts-billed td {
  opacity: 0.7;
}
.money-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}
.money-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
}
.money-card strong {
  font-size: 1.15rem;
}
.invoice {
  background: #fff;
  padding: 12px 4px;
}
.invoice-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.invoice-meta {
  text-align: right;
}
.invoice-totals {
  margin-left: auto;
  max-width: 320px;
}
.invoice-totals tr.strong th,
.invoice-totals tr.strong td {
  font-weight: 700;
}
.print-only {
  display: none;
}
@media print {
  body.printing > *:not(.print-only) {
    display: none !important;
  }
  body.printing .print-only {
    display: block;
  }
}

/* Document builder */
.doc-builder {
  display: grid;
  gap: 12px;
}
.doc-text {
  width: 100%;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.45;
}
.doc-fields label {
  font-size: 0.82rem;
}
.doc-fields .missing-field input {
  border-color: #d9822b;
  background: #fff8ef;
}
.fields-details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}
.doc-preview {
  white-space: pre-wrap;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.9rem;
  max-height: 360px;
  overflow: auto;
  background: #fafafa;
  padding: 10px;
}

/* Attendance */
.clock {
  display: grid;
  gap: 6px;
  margin: 8px 0 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
}
.clock.in { background: #e7f1ec; border-color: #2f6b4f; }
.clock.on-break { background: #fff4dc; border-color: #b7791f; }
.clock.out { background: #f6f6f4; }
.clock-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.clock-actions button { padding: 6px 10px; font-size: 0.85rem; }
.clock select { width: 100%; }
.status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.82rem; }
.st-in { background: #dcefe4; color: #1e5038; }
.st-remote { background: #e2ecf8; color: #1f4a7a; }
.st-break { background: #fff1cf; color: #7a5410; }
.st-out { background: #eee; color: #555; }
.st-late { background: #fbe0dd; color: #8a1c14; }
.st-expected, .st-off { background: #f3f3f1; color: #666; }
table.presence { width: 100%; }
.ts-cell {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  background: #fafaf8;
  color: inherit;
  border: 1px solid var(--line);
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 400;
}
.ts-cell.flagged { border-left: 3px solid #b7791f; }
.ts-cell.approved { background: #eef5f1; }
.ts-cell.selected { outline: 2px solid #2f6b4f; }
.ts-cell .flag, p.flag { color: #8a4b0f; }
.ts-cell .ok { color: #1e5038; }
.ts-total { display: grid; gap: 4px; font-size: 0.85rem; }
.ts-record { border-top: 1px solid var(--line); padding: 8px 0; }
.ts-edit { display: grid; gap: 8px; max-width: 420px; margin: 8px 0; }
.ts-edit label { display: grid; gap: 2px; }
.firm-pick { display: block; margin-bottom: 12px; }
table.timesheet td { min-width: 96px; }
table.timesheet td.ts-total { min-width: 140px; }
/* Payroll */
.pay-form { display: grid; gap: 10px; max-width: 460px; margin-top: 10px; }
.pay-form label { display: grid; gap: 4px; }
.pay-rate { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-rate input[name=rate] { width: 110px; }
.pay-rate input[name=vac] { width: 70px; }
.pay-rate .inline { display: flex; gap: 4px; align-items: center; }
table.pay-rates td, table.pay-rates th { vertical-align: top; }
.pay-lines { width: 100%; max-width: 560px; }
.pay-lines td.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pay-inputs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 10px 0; }
.pay-inputs fieldset { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.pay-inputs label { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: center; }
.pay-inputs button { justify-self: start; }
.pay-sum { display: flex; flex-wrap: wrap; gap: 18px; align-items: baseline; }
.pay-net { font-size: 1.15rem; }
@media print {
  body.print-pay .sidebar, body.print-pay #notice, body.print-pay main > :not(div),
  body.print-pay main > div > :not(.pay-statement), body.print-pay .pay-statement button { display: none !important; }
}

/* Page header: sticky top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: -38px calc(-1 * clamp(20px, 4vw, 60px)) 22px;
  padding: 10px clamp(20px, 4vw, 60px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  font-size: 0.9rem;
}
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; min-width: 0; }
.crumb-sep { color: var(--muted); }
.crumb-firm { font-weight: 600; }
.crumb-file { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; overflow-wrap: anywhere; }
.crumb-link, .back-button { padding: 3px 10px; font-size: 0.85rem; }
.crumb-link { background: none; border: 0; text-decoration: underline; color: inherit; padding: 0; font-weight: 400; }
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.top-user { overflow-wrap: anywhere; }
.top-clock.in { color: #1e5038; }
.top-clock.on-break { color: #7a5410; }
.top-clock.out { color: var(--muted); }
.env { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 10px; }
.env-live { background: #dcefe4; color: #1e5038; }
.env-test { background: #fbe4c4; color: #7a4510; }
.recent-files { max-width: 220px; font-size: 0.85rem; padding: 4px 6px; }
.alerts { position: relative; }
.bell { padding: 3px 10px; font-size: 0.9rem; }
.bell.has-alerts { background: #fff1cf; border-color: #b7791f; color: #5c3d06; }
.alerts-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  width: min(360px, 90vw); max-height: 70vh; overflow: auto;
  display: grid; gap: 6px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.alerts-pop[hidden] { display: none; }
.alert-item { display: grid; gap: 2px; text-align: left; font-weight: 400; background: #fafaf8; color: inherit; border: 1px solid var(--line); padding: 8px 10px; }
.alert-item .file-name { font-size: 0.78rem; }
.idle-warning {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  max-width: min(640px, calc(100vw - 32px)); padding: 14px 18px;
  background: #fff4dc; border: 1px solid #b7791f; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}
.menu-toggle { display: none; margin-top: 12px; }
.print-meta { display: none; }
@media (max-width: 650px) {
  .topbar { margin: -24px -16px 18px; padding: 8px 16px; }
  .menu-toggle { display: inline-block; }
  .sidebar nav { display: none; }
  .sidebar.menu-open nav { display: flex; }
  .sidebar .signed-in { display: none; }
  .recent-files { max-width: 150px; }
}
@media print {
  .topbar, .menu-toggle, .clock, .idle-warning, .alerts-pop { display: none !important; }
  .print-meta { display: block; font-size: 9pt; color: #333; border-bottom: 1px solid #999; padding-bottom: 4px; margin-bottom: 10px; }
  body.printing .print-meta, body.print-pay .print-meta { display: none !important; }
}
/* Hiring */
.doc-preview { white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; font-size: 0.92rem; line-height: 1.45; max-height: 420px; overflow: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fffefb; margin: 8px 0 12px; }
.sign-form { display: grid; gap: 8px; max-width: 560px; margin: 10px 0; }
.sign-form label { display: grid; gap: 4px; }
.sign-form label.inline { display: flex; gap: 8px; align-items: flex-start; }
.profile-editor, .offer-form { display: grid; gap: 10px; margin-top: 10px; }
.offer-form { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: end; }
.offer-form label, .profile-editor label { display: grid; gap: 4px; }
.offer-form button[type=submit] { justify-self: start; }
.noc-results { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.noc-hit { text-align: left; font-weight: 400; background: #fafaf8; color: inherit; border: 1px solid var(--line); padding: 6px 10px; }
.duty-list { display: grid; gap: 6px; }
.duty { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; }
.duty input[type=checkbox] { margin-top: 10px; }
.duty textarea { min-height: 44px; }
.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; }
.hire-item { border-top: 1px solid var(--line); padding: 12px 0; }
.hire-item.selected { background: #f6faf7; }
.hire-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.update-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.waiting-for-you { border-color: #b7791f; }
/* Documents inside the portal */
.viewer-bar { margin-bottom: 12px; }
.viewer-pages { display: grid; gap: 14px; justify-items: center; }
.viewer-page { box-shadow: 0 1px 6px rgba(0,0,0,.15); background: #fff; max-width: 100%; height: auto; }
.doc-preview.tall { max-height: none; }
.doc-open { font-weight: 600; text-align: left; }
.fill-btn { margin-left: 8px; padding: 2px 10px; font-size: 0.8rem; }
.form-filler { display: grid; gap: 10px; max-width: 760px; }
.ff-row { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 10px; align-items: center; }
.ff-row.ff-check { grid-template-columns: minmax(180px, 1fr) 2fr; }
.ff-row.ff-check input { justify-self: start; width: 20px; height: 20px; }
.ff-label { font-weight: 600; font-size: 0.9rem; overflow-wrap: anywhere; }
.ff-tag { display: inline-block; margin-left: 6px; font-size: 0.7rem; font-weight: 600; padding: 1px 6px; border-radius: 8px; background: #e2ecf8; color: #1f4a7a; }
.ff-save { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.from-web { margin: 10px 0; }
.doc-security { margin-top: 18px; }
.doc-security > summary { font-weight: 600; cursor: pointer; }
@media (max-width: 650px) { .ff-row { grid-template-columns: 1fr; } }
@media print {
  body.print-viewer .sidebar, body.print-viewer .viewer-bar, body.print-viewer main > header, body.print-viewer .topbar { display: none !important; }
  body.print-viewer .viewer-page { box-shadow: none; page-break-after: always; width: 100% !important; }
}
.pay-form label.inline, .sign-form label.inline { display: flex; gap: 8px; align-items: center; }
.pay-form label.inline input { width: auto; }
.ff-save select { min-width: 260px; }
.personal-form { display: grid; gap: 10px; max-width: 640px; grid-template-columns: 1fr 1fr; }
.personal-form h3, .personal-form p, .personal-form button { grid-column: 1 / -1; }
.personal-form h3 { margin: 10px 0 0; }
.personal-form label { display: grid; gap: 4px; }
.personal-form button { justify-self: start; }
@media (max-width: 650px) { .personal-form { grid-template-columns: 1fr; } }
.form-error { color: #8a1c14; grid-column: 1 / -1; font-weight: 600; }
.offer-form .full, .offer-form .offer-section { grid-column: 1 / -1; }
.offer-form .full-left { grid-column: 1; justify-self: start; }
.offer-section { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.offer-form h3 { margin: 8px 0 0; }
.emp-card { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafaf8; }
.emp-card:empty { display: none; }
.emp-card .status { justify-self: start; }
.wage-hint:empty { display: none; }

/* Grouped left menu */
.nav-heading { margin: 14px 0 4px; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
nav .nav-heading:first-child { margin-top: 0; }
/* Intake pipeline */
.stage-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.stage-count { border: 1px solid var(--line, #d6dfdb); border-radius: 999px; padding: 3px 10px; font-size: 0.82rem; opacity: 0.65; }
.stage-count.has { opacity: 1; border-color: currentColor; }
.stage-cell { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.stage-badge { border-radius: 6px; padding: 2px 8px; font-size: 0.82rem; background: #eef3f1; }
.stage-badge.stage-file-open { background: #dff3e6; }
.stage-badge.stage-closed { background: #eee; }
.stage-badge.stage-conflict-review, .stage-badge.stage-admin-assign { background: #fff1d6; }
.stage-badge.stage-lawyer-offer { background: #e5ecff; }
.pass-badge { border-radius: 6px; padding: 2px 8px; font-size: 0.78rem; background: #dff3e6; color: #17603a; font-weight: 600; }
.pipeline-table tr.mine td:first-child { box-shadow: inset 4px 0 0 #2f7d5b; }
.pipeline-detail { display: grid; gap: 12px; padding: 8px 0; }
.pipeline-detail .facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.pipeline-detail .facts dt { font-weight: 600; }
.pipeline-detail .facts dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pipeline-step { display: grid; gap: 10px; }
.radios { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.pipeline-log { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.9rem; }
.position-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line, #e3e9e6); }
.position-row select { max-width: 100%; }
@media (prefers-color-scheme: dark) {
  .stage-badge { background: #24302c; }
  .stage-badge.stage-file-open, .pass-badge { background: #1f3a2a; color: #bfe8cf; }
  .stage-badge.stage-conflict-review, .stage-badge.stage-admin-assign { background: #3a321f; }
  .stage-badge.stage-lawyer-offer { background: #222c45; }
}

/* Signatures */
.sig-pad { display: grid; gap: 10px; max-width: 520px; }
.sig-canvas { width: 100%; max-width: 480px; aspect-ratio: 480 / 140; height: auto; border: 1px dashed #8a9b94; border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }
.sig-image { color: #123; background: #fff; border-radius: 6px; }
.sig-typed { font-family: "Brush Script MT", "Segoe Script", "Snell Roundhand", cursive; font-style: italic; fill: #123; }
.sig-preview { display: grid; gap: 4px; padding: 12px; border: 1px solid #c9d6d0; border-radius: 8px; max-width: 420px; background: #fff; color: #123; }
.sig-current { padding: 8px; display: inline-block; border: 1px solid #c9d6d0; border-radius: 8px; background: #fff; }
.td1-form label.inline { display: flex; gap: 6px; align-items: center; }
.doc-preview p { margin: 0 0 8px; } .doc-preview ul { margin: 0 0 8px 18px; } .doc-preview h4 { margin: 12px 0 6px; } .doc-preview .right { text-align: right; } .doc-preview hr.page-break { border: 0; border-top: 2px dashed #c9d6d0; margin: 14px 0; }
/* Calendar */
.cal-toolbar { align-items: center; }
.cal-scroll { overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(170px, 1fr)); gap: 0 6px; min-width: min-content; }
.cal-head { height: 46px; font-size: 0.85rem; overflow: hidden; }
.cal-time { font-size: 0.75rem; color: #6b7b75; border-top: 1px solid #e3e9e6; }
.cal-body { position: relative; background: #eef1f0; border-radius: 6px; background-image: repeating-linear-gradient(#0000 0 51px, #d9e1dd 51px 52px); }
.cal-open { position: absolute; left: 0; right: 0; background: #fff; opacity: 0.85; }
.cal-block { position: absolute; left: 2px; right: 2px; background: repeating-linear-gradient(45deg, #e6e6e6 0 6px, #f3f3f3 6px 12px); font-size: 0.72rem; padding: 2px 4px; overflow: hidden; border-radius: 4px; color: #555; }
.appt { position: absolute; left: 3px; right: 3px; text-align: left; font-size: 0.78rem; line-height: 1.2; padding: 3px 5px; border-radius: 5px; border: 1px solid #2f7d5b; background: #dff3e6; color: #12392a; overflow: hidden; min-height: 24px; }
.cal-week .appt { position: static; display: block; width: 100%; margin: 2px 0; }
.appt-done { background: #eef1f0; border-color: #9fb3aa; }
.appt-no-show { background: #fde4e1; border-color: #c9584a; }
.court-flag { font-size: 0.74rem; background: #fff1d6; color: #6b4b00; border-radius: 4px; padding: 1px 5px; margin: 2px 0; }
.slot-list { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-list button.picked { background: #2f7d5b; color: #fff; }
.hours-grid { display: grid; gap: 4px; margin: 8px 0; }
.hours-row { display: grid; grid-template-columns: 100px auto 24px auto; gap: 6px; align-items: center; }
/* Planner */
.plan-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.plan-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid #eef1f0; }
.plan-item.done span:first-of-type { text-decoration: line-through; opacity: 0.6; }
.plan-item button { margin-left: auto; padding: 2px 8px; }
.badge-carried { font-size: 0.72rem; background: #fff1d6; color: #6b4b00; border-radius: 999px; padding: 1px 7px; }
.overdue { color: #a1362b; }
.target-row { display: grid; gap: 4px; margin: 6px 0; }
.bar { height: 8px; background: #e3e9e6; border-radius: 99px; overflow: hidden; max-width: 420px; }
.bar span { display: block; height: 100%; background: #2f7d5b; }
@media (prefers-color-scheme: dark) {
  .cal-body { background-color: #1f2724; }
  .cal-open { background: #2a3531; }
  .appt { background: #1f3a2a; color: #d7f0e0; }
}
.cal-toolbar input[type=date] { width: auto; }

/* File setup */
.file-status-card { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.steps-nav button[aria-current], .steps-nav button:not(.secondary) { font-weight: 600; }
.folder-setup { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.folder-card { border: 1px solid var(--line, #d6dfdb); border-radius: 8px; padding: 10px; display: grid; gap: 4px; }
.folder-setup > button { grid-column: 1 / -1; justify-self: start; }
.team-pick { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.access-grid th div { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.access-grid th div button { padding: 2px 6px; font-size: 0.72rem; }
.access-grid select { font-size: 0.85rem; }
.plan-action { display: grid; grid-template-columns: auto minmax(180px, 2fr) minmax(120px, 1fr) auto auto minmax(140px, 1.4fr); gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid #eef1f0; }
@media (max-width: 760px) { .plan-action { grid-template-columns: auto 1fr; } }
.check-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0; }
.check-row.done > span:first-child { color: #2f7d5b; }

/* Update 20: full folder names (file identity + number + label) */
.folder-full { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.78rem; color: var(--muted, #5b6b63); word-break: break-word; margin: 0.25rem 0; }
.folder-card.extra { border-style: dashed; }
.bank-table { border-collapse: collapse; width: 100%; }
.bank-table th, .bank-table td { padding: 0.35rem 0.9rem 0.35rem 0; text-align: left; vertical-align: middle; }
.bank-table td.num, .bank-table th:nth-child(3) { text-align: right; padding-right: 1.4rem; }
.panel.inner { margin-top: 0.8rem; }
.t4-filing fieldset { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.6rem 1rem; }
.t4-people td, .t4-people th { padding: 0.3rem 0.5rem; vertical-align: top; }
.ok-note { color: var(--ok, #1f6b45); font-weight: 600; }
.plan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.4rem 0; }
.plan-row input, .plan-row select { width: auto; min-width: 7rem; }
.bk-txns td { vertical-align: top; }
.bk-txns select { max-width: 16rem; }
.bk-txns tr.to-check td { background: var(--warn-bg, #fff8e1); }
.bk-txns td.neg { color: var(--danger, #8a1c1c); }
.bk-txns td.num { white-space: nowrap; }
.qr-box { background: #fff; display: inline-block; padding: 8px; border-radius: 6px; margin: 0.5rem 0; }
.recovery pre { font-size: 1.05rem; letter-spacing: 0.06em; background: var(--surface-2, #f4f6f5); padding: 0.75rem 1rem; border-radius: 6px; }
/* ---- Marketing (Update 27) ---- */
.mk-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.mk-credits { margin: 6px 0; }
.mk-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 16px; margin: 10px 0; }
.mk-field { display: grid; gap: 4px; font-size: 0.92rem; }
.mk-field textarea, .mk-field input, .mk-field select { width: 100%; box-sizing: border-box; }
.mk-wide { width: 100%; box-sizing: border-box; margin: 6px 0; }
.mk-modes { display: flex; flex-wrap: wrap; gap: 18px; margin: 8px 0; }
.mk-issues { margin: 6px 0; padding-left: 18px; font-size: 0.9rem; }
.mk-issues li { margin: 4px 0; }
.mk-block { color: var(--danger); }
.mk-warn { color: var(--warn); }
.mk-ok { color: var(--good); }
.mk-plus { color: var(--good); }
.mk-pre { white-space: pre-wrap; font: inherit; font-size: 0.9rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 8px; margin: 6px 0; }
.mk-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 10px 0; }
.mk-clip { border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 10px; display: grid; gap: 6px; align-content: start; }
.mk-chosen { border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 30%, transparent); }
.mk-vid { width: 100%; border-radius: var(--radius-control); background: #000; aspect-ratio: 16 / 9; }
.mk-vid.tall { aspect-ratio: 9 / 16; max-height: 460px; }
.mk-making { color: var(--warn); }
.mk-captions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 8px 0; }
.mk-cap { display: grid; gap: 4px; align-content: start; }
.mk-pic { margin: 10px 0; }
.mk-img { max-width: 320px; width: 100%; border-radius: var(--radius-control); border: 1px solid var(--line); }
.mk-dialog { max-width: 620px; width: calc(100vw - 32px); }
.mk-checks { display: grid; gap: 8px; margin: 12px 0; }
.mk-terms { white-space: pre-wrap; font: inherit; font-size: 0.9rem; }
.mk-list { padding-left: 18px; }
.mk-list li { margin: 6px 0; }
.mk-packs { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.mk-pack { border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 12px 16px; min-width: 150px; }
.button-link { display: inline-block; padding: 6px 12px; border: 1px solid var(--accent); border-radius: var(--radius-control); color: var(--accent); text-decoration: none; }
.sl-grid { display: grid; grid-template-columns: 170px minmax(240px, 1fr) 44px minmax(0, 250px); gap: 8px 10px; align-items: center; margin: 10px 0; }
.sl-row { display: contents; }
.sl-name { font-weight: 600; }
.sl-action { font-size: 0.9rem; }
@media (max-width: 720px) { .sl-grid { grid-template-columns: 1fr; } .sl-name { margin-top: 8px; } }
.mk-trow { border-top: 1px solid var(--line); padding: 8px 0; }
.mk-target { margin: 6px 0 0 24px; }
.mk-when { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0; }
.mk-cal-day h3 { font-size: 1rem; margin: 14px 0 4px; }
.mk-cal-item { list-style: none; margin: 2px 0 10px; }
.mk-dialog input[type="radio"], .mk-dialog input[type="checkbox"], .mk-modes input[type="radio"] { width: auto; height: auto; margin: 0 6px 0 0; }

/* ---- Update 31: photos, page header, ethics reminders, Go to… ---- */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #2f6e52, #183a32); color: #fff; font-weight: 650; letter-spacing: 0.02em; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-sm { width: 26px; height: 26px; font-size: 0.68rem; vertical-align: middle; margin-right: 6px; }
.avatar-md { width: 36px; height: 36px; font-size: 0.8rem; }
.avatar-lg { width: 46px; height: 46px; font-size: 0.95rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.25rem; }
.signed-in { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; }
.signed-in-text { display: grid; gap: 1px; min-width: 0; }
.nav-find { width: 100%; margin-top: 18px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); font: inherit; font-size: 0.92rem; }
.nav-find:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--surface); }
nav .nav-heading[hidden], nav button[hidden] { display: none; }
nav button[aria-current="page"] { box-shadow: inset 4px 0 0 #9cc9ae; font-weight: 600; }
main > header.page-head { margin-bottom: 24px; padding: 22px 24px; background: linear-gradient(120deg, var(--surface) 55%, #e6f0ea); border: 1px solid var(--line); border-radius: var(--radius-panel); }
.page-head-main { display: flex; align-items: center; gap: 18px; }
.page-head-text { min-width: 0; }
.page-head h1 { margin: 2px 0 4px; line-height: 1.2; }
.page-head-text > .muted { margin: 0; max-width: 72ch; }
.page-hello { margin: 0; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.01em; }
.page-where { opacity: 0.85; }
.ethics { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 10px 12px 10px 14px; border-left: 3px solid #b48a3c; background: #fbf7ee; border-radius: 0 var(--radius-control) var(--radius-control) 0; color: #4a3b1c; font-size: 0.9rem; }
.ethics p { margin: 0; flex: 1; font-style: italic; }
.ethics-mark { font-style: normal; color: #8a6420; line-height: 1.5; }
.ethics-ref { font-style: normal; font-size: 0.8rem; white-space: nowrap; color: #6d4f17; margin-left: 4px; }
.ethics-hide { flex: none; min-height: 0; min-width: 0; width: auto; height: auto; box-shadow: none; background: none; border: 0; padding: 0 4px; font-size: 1.1rem; line-height: 1.2; color: #8a6420; cursor: pointer; }
.ethics-hide:hover { color: var(--ink); background: none; }
.photo-row { display: flex; gap: 20px; align-items: flex-start; }
.photo-row .avatar-xl { width: 96px; height: 96px; font-size: 1.8rem; }
.photo-row input[type=file] { margin: 6px 0; }
@media (max-width: 650px) {
  .page-head-main { gap: 12px; }
  .page-head .avatar-xl { width: 46px; height: 46px; font-size: 0.95rem; }
  main > header.page-head { padding: 16px; }
  .photo-row { flex-direction: column; }
}
@media print {
  .ethics, .nav-find, .page-head .avatar { display: none; }
  main > header.page-head { background: none; border: 0; padding: 0; }
}
@media (forced-colors: active) {
  .ethics { border-left-color: CanvasText; }
}
.ai-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-start; margin: 6px 0 10px; }
.inline-help summary { cursor: pointer; color: var(--accent); text-decoration: underline; }
.inline-help ol { margin: 6px 0 0; padding-left: 20px; max-width: 70ch; }
.mk-job { display: inline-block; min-width: 230px; }
.update-meta .avatar, .reply .avatar { margin-right: 8px; vertical-align: middle; }
.update-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; }
.staff-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; }
.staff-card > :not(.avatar) { grid-column: 2; }
.staff-card > .avatar { grid-row: span 2; }
.link-chips { display: inline-flex; gap: 10px; font-size: 0.85rem; margin-left: 6px; }
.cp-form { display: grid; gap: 12px; margin-top: 12px; }
.cp-form textarea { width: 100%; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.cp-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cp-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.cp-results button { padding: 4px 10px; font-size: 0.85rem; }
.cp-summary { font-weight: 600; cursor: pointer; font-size: 1.05rem; }
.cp-card { margin: 10px 0; }
.cp-card summary { cursor: pointer; }
.cp-card .badge { margin-left: 8px; }
.cp-urgent { border-left: 4px solid var(--danger); }
.cp-badge-urgent { background: #fbe9ea; color: var(--danger); }
.cp-tips ol { margin: 8px 0 0; padding-left: 22px; max-width: 80ch; }
.cp-tips summary { cursor: pointer; font-weight: 600; }
.pre-line { white-space: pre-line; }
button.linklike { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); text-decoration: underline; font-size: 0.85rem; box-shadow: none; }
.cp-inline select { flex: 1 1 260px; }
.cp-inline button { flex: none; }
.page-title-row { display: flex; align-items: center; gap: 12px; }
.help-q { width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 50%; font-weight: 700; font-size: 0.95rem; display: inline-grid; place-items: center; flex: none; background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent); }
.help-q[aria-expanded="true"] { background: var(--accent); color: var(--surface); }
.help-panel { margin-top: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control); max-width: 90ch; }
.help-panel ol, .help-panel ul { margin: 6px 0 8px; padding-left: 22px; }
.help-about { margin: 0 0 4px; font-weight: 600; }
.help-admin { margin: 8px 0 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
@media print { .help-q, .help-panel { display: none; } }
/* Update 32: a firm's own sign-in page */
.login-firm .firm-brand { text-align: left; }
.login-firm .brand { font-size: 2rem; margin: 6px 0 2px; }
.firm-mark { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; font-size: 1.2rem; letter-spacing: 0.02em; }
.login-firm.tone-navy { --accent: #24406b; }
.login-firm.tone-plum { --accent: #5d2f5b; }

/* Update 34: Learning Academy and Policies */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.ac-course > summary, .ac-edit > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ac-list { padding-left: 1.2rem; }
.ac-list > li { margin: 0 0 14px; }
.ac-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.ac-tick { color: var(--good); font-weight: 600; }
.ac-seen strong { color: var(--muted); }
.ac-player { margin: 8px 0; }
.ac-video { width: 100%; max-width: 720px; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-control); background: #000; display: block; }
.ac-bar { display: inline-flex; align-items: center; gap: 6px; }
.ac-track { display: inline-block; width: 80px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ac-fill { display: block; height: 100%; background: var(--good); }
.ac-pct { font-size: 0.85em; color: var(--muted); white-space: nowrap; }
.ac-picks { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
.ac-table { width: 100%; border-collapse: collapse; }
.ac-table th, .ac-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ac-overdue td { background: #fbf1e4; }
.ac-edit { border-top: 1px solid var(--line); padding: 8px 0; }
.table-wrap { overflow-x: auto; }
input.short { width: 6rem; }
.policy-text { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; }
.pub-box { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); display: flex; flex-direction: column; gap: 8px; }
.brand-mark { width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; }
/* Update 35.2: collapsible sidebar groups */
nav .nav-group { display: grid; gap: 6px; }
nav .nav-group[hidden], nav .nav-items[hidden] { display: none; }
nav .nav-items { display: grid; gap: 6px; }
nav button.nav-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 10px 0 0; padding: 6px 4px; border: 0; background: none; box-shadow: none;
  color: inherit; font: inherit; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; cursor: pointer;
}
nav .nav-group:first-child button.nav-toggle { margin-top: 0; }
nav button.nav-toggle:hover:not(:disabled) { opacity: 1; background: none; }
nav button.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
nav .nav-toggle .nav-count { margin-left: auto; font-weight: 500; letter-spacing: 0; opacity: 0.7; }
nav .nav-toggle .nav-chev { transition: transform 0.15s; }
nav .nav-toggle[aria-expanded="true"] .nav-chev { transform: rotate(90deg); }
nav .nav-toggle[aria-expanded="true"] .nav-count { visibility: hidden; }
nav .nav-group.has-current .nav-toggle { opacity: 1; }
@media (max-width: 650px) { .sidebar.menu-open nav { flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { nav .nav-toggle .nav-chev { transition: none; } }
nav .nav-group + .nav-group > p.nav-heading { margin-top: 12px; }
nav .nav-group > p.nav-heading { margin-bottom: 0; }
