:root {
  color: #24211d;
  background: #f3f0e9;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #24211d;
  --muted: #6d675e;
  --line: #d8d2c7;
  --paper: #faf8f3;
  --amber: #aa5b16;
  --amber-strong: #984d0d;
  --amber-soft: #f3dfc7;
  --danger: #a0322b;
  --danger-soft: #f6dfdb;
  --focus: #145ea8;
}

* {
  box-sizing: border-box;
}

body {
  overflow-wrap: anywhere;
  min-width: 320px;
  margin: 0;
  background: var(--paper);
}

button,
select {
  max-width: 100%;
  min-width: 0;
  font: inherit;
}

button:focus-visible,
select:focus-visible,
blockquote[tabindex]:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.masthead {
  min-height: 76px;
  padding: 14px clamp(20px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
  background: #211f1c;
  color: #fffdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.product-name,
.eyebrow,
.masthead p {
  margin: 0;
}

.brand {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.product-name {
  margin-top: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.masthead-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.staff-nav {
  color: #fffdf8;
  font-size: 0.76rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #5d5750;
  border-radius: 999px;
}

.locale-switch a {
  padding: 5px 8px;
  border-radius: 999px;
  color: #d8d2c7;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

.locale-switch a[aria-current="page"] {
  background: #fffdf8;
  color: var(--ink);
}

.session-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d8d2c7;
  font-size: 0.8rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c98a4c;
}

.session-summary.is-authenticated .status-dot {
  background: #8db78c;
}

.capability-summary {
  margin: 5px 0 0;
  color: #aaa398;
  font-size: 0.68rem;
  text-align: right;
}

.access-state {
  min-height: calc(100svh - 76px);
  padding: clamp(64px, 12vw, 160px) max(24px, calc((100vw - 780px) / 2));
  background: #eee8de;
}

.access-state h1,
.empty-workspace h2,
.case-heading h2,
.workspace-section h3,
.pane-heading h1 {
  margin: 6px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.08;
}

.access-state h1 {
  max-width: 720px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
}

.access-state > p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.danger {
  color: var(--danger);
}

.console-shell {
  min-height: calc(100svh - 76px);
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.console-shell:not([hidden]) {
  display: grid;
}

.queue-pane {
  padding: 30px 24px 48px clamp(20px, 3vw, 44px);
  border-right: 1px solid var(--line);
  background: #eee9df;
}

.work-switch {
  display: flex;
  gap: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.work-switch__button {
  margin-bottom: -1px;
  padding: 0 0 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-switch__button:hover,
.work-switch__button.is-active {
  border-bottom-color: var(--amber);
  color: var(--ink);
}

.pane-heading,
.section-heading,
.case-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.pane-heading h1 {
  font-size: 2rem;
}

.filter-bar {
  display: flex;
  gap: 4px;
  margin-top: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.filter-button,
.quiet-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.filter-button {
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.filter-button.is-active {
  background: var(--ink);
  color: #fff;
}

.quiet-button {
  padding: 5px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.scope-note,
.case-subtitle,
.inline-status,
.empty-workspace p,
.sensitive-warning p,
.expiry {
  color: var(--muted);
  line-height: 1.5;
}

.scope-note {
  margin: 12px 0;
  font-size: 0.78rem;
}

.inline-status {
  min-height: 1.5em;
  font-size: 0.82rem;
}

.inline-status.is-error {
  color: var(--danger);
}

.case-list,
.audit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-list button {
  width: 100%;
  padding: 17px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: padding-left 140ms ease, color 140ms ease;
}

.case-list button:hover,
.case-list button.is-selected {
  padding-left: 10px;
  color: var(--amber-strong);
}

.case-list__category {
  display: block;
  font-size: 0.83rem;
  font-weight: 750;
}

.case-list__meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.workspace {
  min-width: 0;
  padding: clamp(30px, 5vw, 72px) clamp(24px, 6vw, 96px) 96px;
}

.empty-workspace {
  max-width: 620px;
  padding-top: min(20vh, 170px);
}

.empty-workspace h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.case-heading {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.case-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.case-subtitle {
  margin: 9px 0 0;
}

.status-label,
.audit-only {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid currentColor;
  color: var(--amber);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.workspace-section h3 {
  font-size: 1.75rem;
}

.metadata-list {
  margin: 22px 0 0;
}

.metadata-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.38fr) minmax(0, 1fr);
  gap: 20px;
  padding: 11px 0;
  border-top: 1px solid #e8e3da;
}

.metadata-row dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.metadata-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

.button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  transition: transform 120ms ease, background 120ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button--primary {
  background: var(--ink);
  color: #fff;
}

.button--warning {
  background: var(--amber);
  color: #fff;
}

.button--danger {
  background: var(--danger);
  color: #fff;
}

.sensitive-warning {
  margin: -34px 0 24px;
  padding: 28px 0 24px 18px;
  border-left: 4px solid var(--danger);
  background: linear-gradient(90deg, var(--danger-soft), transparent 78%);
}

.enforcement-warning {
  margin-bottom: 24px;
  padding: 22px 0 20px 18px;
  border-left: 4px solid var(--danger);
  background: linear-gradient(90deg, var(--danger-soft), transparent 78%);
}

.enforcement-warning h3 {
  margin-top: 6px;
}

.enforcement-warning p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.sensitive-warning h3 {
  margin-top: 6px;
}

.sensitive-warning p:last-child {
  max-width: 680px;
  margin-bottom: 0;
}

.evidence-controls,
.decision-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(240px, 1fr);
  gap: 12px 20px;
  align-items: center;
}

.evidence-controls label,
.decision-form label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 8px 32px 8px 10px;
  border: 1px solid #bbb3a7;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
}

.evidence-controls .button,
.decision-form .button,
.expiry {
  grid-column: 2;
}

.expiry {
  min-height: 1.5em;
  margin: 0;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.evidence-object {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--danger);
  background: #fff7f5;
}

.evidence-object__scope {
  color: var(--muted);
  font-size: 0.78rem;
}

.evidence-object__text {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.audit-only {
  color: var(--danger);
}

.audit-list {
  margin-top: 20px;
}

.audit-list li {
  position: relative;
  padding: 0 0 22px 26px;
  color: var(--muted);
  font-size: 0.82rem;
}

.audit-list li::before {
  position: absolute;
  top: 4px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--amber);
  content: "";
}

.audit-list li::after {
  position: absolute;
  top: 14px;
  bottom: 1px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.audit-list li:last-child::after {
  display: none;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .console-shell:not([hidden]) {
    grid-template-columns: 1fr;
  }

  .queue-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .case-list {
    max-height: 38vh;
    overflow: auto;
  }

  .workspace {
    padding-bottom: 64px;
  }
}

@media (max-width: 560px) {
  .masthead,
  .pane-heading,
  .section-heading,
  .case-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .capability-summary {
    text-align: left;
  }

  .masthead-tools {
    justify-content: flex-start;
  }

  .metadata-row,
  .evidence-controls,
  .decision-form {
    grid-template-columns: 1fr;
  }

  .evidence-controls .button,
  .decision-form .button,
  .expiry {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
