:root {
  color-scheme: light;
  --ink: #202522;
  --muted: #606963;
  --line: #dedfda;
  --paper: #fff;
  --soft: #f5f6f3;
  --green: #38543f;
  --green-soft: #eaf0e8;
  --rust: #a44832;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
:focus-visible {
  outline: 3px solid #a44832;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -80px;
  left: 20px;
  background: white;
  padding: 12px;
  z-index: 50;
}
.skip:focus {
  top: 12px;
}
.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-weight: 800;
  letter-spacing: -0.7px;
  font-size: 19px;
  text-decoration: none;
  width: 160px;
  flex-shrink: 0;
}
.brand small {
  color: var(--rust);
}
.workspace-label {
  font-size: 12px;
  color: var(--muted);
}
.top-spacer {
  flex: 1;
}
.profile-link {
  font-size: 13px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.avatar {
  display: grid;
  place-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  height: 32px;
  width: 32px;
  font-size: 12px;
  font-weight: 650;
}
.app {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}
.sidebar {
  background: #f5f6f3;
  border-right: 1px solid var(--line);
  padding: 30px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  padding: 11px 14px;
  min-height: 44px;
  border-left: 3px solid transparent;
  color: #525953;
}
.sidebar a:hover {
  background: #e9ebe6;
}
.sidebar a[aria-current="page"] {
  border-color: var(--rust);
  background: #e8eae4;
  color: #202522;
  font-weight: 650;
}
.sidebar .nav-symbol {
  font-size: 17px;
  width: 19px;
  text-align: center;
}
.sidebar .nav-bottom {
  margin-top: auto;
  padding-top: 40px;
  font-size: 12px;
}
.sidebar .nav-bottom a {
  padding: 8px 14px;
}
.main {
  min-width: 0;
  padding: 40px clamp(24px, 4vw, 64px) 70px;
  max-width: 1530px;
  width: 100%;
  margin: 0 auto;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 650;
  color: var(--muted);
  margin: 0 0 8px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1.1px;
  line-height: 1.2;
  font-weight: 650;
  margin: 0 0 9px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.35px;
  font-weight: 650;
  margin: 0 0 16px;
}
h3 {
  font-size: 14px;
  margin: 0 0 12px;
  font-weight: 650;
}
p {
  margin: 0 0 14px;
}
.muted {
  color: var(--muted);
}
.subtitle {
  color: var(--muted);
  margin-bottom: 28px;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 15px;
}
.section-head h2 {
  margin: 0;
}
.text-link {
  font-size: 13px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--green);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  background: var(--green);
  color: white;
}
.btn:hover {
  background: #263e2c;
}
.btn.secondary {
  color: var(--ink);
  background: white;
  border-color: #bfc5bd;
}
.btn.secondary:hover {
  background: var(--soft);
}
.actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: 48px;
}
.resume {
  border-bottom: 1px solid var(--line);
  padding: 4px 0 32px;
  margin-bottom: 29px;
}
.case-ref {
  font:
    11px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.resume h2 {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.7px;
  margin: 8px 0 10px;
  max-width: 660px;
}
.resume p {
  max-width: 650px;
}
.status {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  white-space: nowrap;
}
.status:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #777e77;
}
.status.in-progress:before {
  background: #95672e;
}
.status.completed:before {
  background: var(--green);
}
.status.locked:before {
  background: #7e6b71;
}
.resume .status {
  margin-bottom: 14px;
}
.small {
  font-size: 12px;
}
.rail {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}
.rail section {
  padding: 0 0 25px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.rail section:last-child {
  border-bottom: 0;
}
.rail p {
  font-size: 13px;
}
.rail .quiet-tag {
  font-size: 11px;
  color: var(--muted);
}
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.list li a {
  display: block;
  text-decoration: none;
  font-size: 13px;
}
.list li a:hover {
  text-decoration: underline;
}
.list li small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin: 20px 0;
}
.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  min-height: 44px;
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
}
.tab[aria-selected="true"] {
  border-color: var(--rust);
  font-weight: 650;
  color: var(--ink);
}
.count {
  font-size: 11px;
  background: var(--soft);
  padding: 2px 6px;
  margin-left: 6px;
  border-radius: 3px;
}
.filters {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 180px 160px;
  gap: 12px;
  margin-bottom: 20px;
}
.field label {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  height: 44px;
  border: 1px solid #bfc5bd;
  border-radius: 4px;
  background: white;
  padding: 9px 12px;
  color: var(--ink);
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  font-weight: 650;
  color: var(--muted);
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 14px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
td:first-child,
th:first-child {
  padding-left: 0;
}
td:last-child,
th:last-child {
  padding-right: 0;
}
.case-button {
  border: 0;
  background: none;
  text-align: left;
  padding: 6px 0;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  display: block;
  width: 100%;
}
.case-button small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 3px;
}
.selected td {
  background: var(--green-soft);
}
.selected td:first-child {
  padding-left: 12px;
}
.case-table .subject {
  max-width: 340px;
}
.case-table .subject span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.case-table tr:not(.selected):hover td {
  background: #fafbf8;
}
.mobile-cases {
  display: none;
}
.detail {
  border: 1px solid var(--line);
  margin-top: 28px;
  border-radius: 4px;
  padding: 24px;
}
.detail h2 {
  font-size: 21px;
  line-height: 1.35;
  margin: 8px 0;
}
.detail-meta {
  font-size: 12px;
  color: var(--muted);
}
.detail .tabs {
  margin: 14px 0 20px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 32px;
}
.detail-grid aside {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.detail-grid aside a {
  font-size: 12px;
  display: block;
  margin: 12px 0;
}
.detail dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 9px;
  margin: 20px 0;
  font-size: 12px;
}
.detail dt {
  color: var(--muted);
}
.detail dd {
  margin: 0;
}
.detail-footer {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.note-input {
  width: 100%;
  min-height: 170px;
  border: 1px solid #bfc5bd;
  border-radius: 4px;
  padding: 14px;
  line-height: 1.6;
  resize: vertical;
}
.note-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.note-controls {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.activity {
  list-style: none;
  padding: 0;
  margin: 0;
}
.activity li {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  font-size: 13px;
}
.activity time {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.feedback {
  padding: 14px 18px;
  background: #f9f4eb;
  border: 1px solid #e2d5bf;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.feedback.error {
  background: #fcf0f0;
  border-color: #d8a9ac;
}
.feedback button {
  margin-left: auto;
  background: white;
  min-height: 40px;
  border: 1px solid #bfc5bd;
  border-radius: 3px;
  padding: 6px 12px;
}
.empty {
  padding: 32px 0;
  color: var(--muted);
  font-size: 13px;
}
.empty strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 7px;
}
.loading {
  padding: 70px 0;
  color: var(--muted);
}
.footer-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 35px;
}
.bottom-nav {
  display: none;
}
.role-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.role-control select {
  background: white;
  border: 1px solid var(--line);
  padding: 7px;
  min-height: 44px;
  max-width: 190px;
  border-radius: 3px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 5px;
  max-width: 570px;
  width: calc(100% - 36px);
  padding: 30px;
  color: var(--ink);
  line-height: 1.7;
}
dialog::backdrop {
  background: rgb(25 31 26 / 0.35);
}
dialog h2 {
  font-size: 24px;
}
dialog ol {
  padding-left: 22px;
}
dialog li {
  padding-bottom: 14px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mobile-summary {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-bottom: 8px;
}
.danger {
  color: #8c3542;
}
.decision-table td {
  vertical-align: top;
}
.role-notice {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}
@media (min-width: 1600px) {
  .main {
    padding-top: 50px;
  }
}
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 175px minmax(0, 1fr);
  }
  .topbar {
    padding: 0 20px;
    gap: 15px;
  }
  .brand {
    width: 140px;
  }
  .sidebar {
    padding: 24px 10px;
  }
  .desk-grid {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 25px;
  }
  .rail {
    padding-left: 20px;
  }
  .case-table .owner-col {
    display: none;
  }
  .main {
    padding: 30px 24px 60px;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 20px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 60px;
    padding: 0 18px;
    gap: 12px;
  }
  .brand {
    font-size: 17px;
    width: auto;
  }
  .workspace-label,
  .profile-link .profile-name {
    display: none;
  }
  .role-control {
    margin-left: auto;
  }
  .role-control label {
    display: none;
  }
  .role-control select {
    font-size: 11px;
    max-width: 150px;
    border: 0;
    padding: 4px;
  }
  .top-spacer {
    display: none;
  }
  .profile-link {
    margin-left: 0;
  }
  .app {
    display: block;
    min-height: calc(100vh - 60px);
  }
  .sidebar {
    display: none;
  }
  .main {
    padding: 26px 18px 110px;
  }
  h1 {
    font-size: 26px;
    letter-spacing: -0.8px;
  }
  .subtitle {
    font-size: 13px;
    margin-bottom: 25px;
  }
  .desk-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .resume {
    padding-bottom: 24px;
    margin-bottom: 24px;
  }
  .resume h2 {
    font-size: 22px;
  }
  .rail {
    border-left: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    padding-top: 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .rail section {
    padding-bottom: 20px;
    margin-bottom: 0;
  }
  .rail section:last-child {
    display: none;
  }
  .actions {
    gap: 14px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .filters .search-field {
    grid-column: 1/-1;
  }
  .filters input {
    font-size: 16px;
  }
  .filters select {
    font-size: 13px;
  }
  .case-table {
    display: none;
  }
  .mobile-cases {
    display: block;
  }
  .mobile-case {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 13px 14px;
    margin-bottom: 10px;
  }
  .mobile-case.selected {
    background: var(--green-soft);
    border-color: #9dac98;
  }
  .mobile-case .case-button {
    font-size: 14px;
    padding: 3px 0;
  }
  .mobile-case p {
    font-size: 12px;
    margin: 8px 0;
  }
  .mobile-case .status {
    font-size: 10px;
  }
  .tabs {
    gap: 23px;
    margin: 18px 0;
  }
  .tab {
    font-size: 12px;
  }
  .detail {
    padding: 18px;
    margin-top: 20px;
  }
  .detail-grid {
    display: block;
  }
  .detail-grid aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
    margin-top: 20px;
  }
  .detail-grid aside a {
    display: inline-flex;
    margin: 5px 16px 5px 0;
    min-height: 44px;
    align-items: center;
  }
  .detail-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .detail-footer .btn {
    width: 100%;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: white;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px max(7px, env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    text-decoration: none;
    font-size: 10px;
    min-height: 50px;
    color: var(--muted);
    border-top: 2px solid transparent;
  }
  .bottom-nav a .nav-symbol {
    font-size: 18px;
    line-height: 1.2;
  }
  .bottom-nav a[aria-current="page"] {
    border-color: var(--rust);
    color: #873722;
    font-weight: 650;
  }
  .decision-table th:nth-child(3),
  .decision-table td:nth-child(3) {
    display: none;
  }
  .decision-table td {
    font-size: 11px;
    padding: 12px 6px;
  }
  .section-head .text-link {
    font-size: 12px;
  }
  .feedback {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .footer-note {
    max-width: 310px;
  }
  .empty {
    padding: 18px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
@media print {
  .topbar,
  .sidebar,
  .bottom-nav,
  .filters,
  .actions,
  .detail-footer {
    display: none;
  }
  .app {
    display: block;
  }
  .main {
    padding: 0;
  }
  .detail {
    break-inside: avoid;
  }
  body {
    font-size: 11pt;
  }
}
