:root {
  color-scheme: light;
  --bg: #f4efe6;
  --bg-alt: #efe6d9;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-border: rgba(70, 48, 26, 0.12);
  --text: #25190f;
  --muted: #674f3f;
  --brand: #8b4f1d;
  --brand-strong: #5f3413;
  --success: #1d6d4f;
  --warning: #b35f00;
  --danger: #9e3a2f;
  --shadow: 0 18px 50px rgba(63, 39, 15, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(219, 175, 106, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(165, 112, 50, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-alt));
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
}

.page-shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

h1,
.panel h2,
.case-detail h3,
.detail-card h4,
.queue h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

h1 {
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.98;
  margin: 0 0 14px;
  max-width: 10ch;
}

.hero-copy,
.panel-note,
.muted,
.empty-state p,
.status-text,
.case-meta,
ol {
  color: var(--muted);
}

.hero-copy {
  max-width: 60ch;
  font-size: 1.05rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--brand);
}

.hero-card,
.panel,
.detail-card,
.queue,
.case-detail {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}

.site-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link,
.text-link {
  text-decoration: none;
}

.nav-link {
  border: 1px solid rgba(77, 49, 27, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-strong);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 650;
}

.nav-link.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: white;
  border-color: transparent;
}

.text-link {
  color: var(--brand-strong);
  font-weight: 650;
}

.hero-card,
.panel {
  padding: 22px;
}

.hero-card h2,
.panel h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
}

.hero-card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.layout {
  display: grid;
  gap: 20px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.panel-note {
  max-width: 32ch;
  margin: 0;
  line-height: 1.5;
}

.stack {
  display: grid;
  gap: 14px;
}

.field,
.fieldset {
  display: grid;
  gap: 8px;
}

.field span,
.fieldset legend {
  font-size: 0.95rem;
  font-weight: 650;
}

.field input,
.field textarea,
button {
  font: inherit;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(77, 49, 27, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(139, 79, 29, 0.7);
  box-shadow: 0 0 0 4px rgba(139, 79, 29, 0.14);
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.45;
  color: var(--muted);
}

.checkbox input {
  margin-top: 4px;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: 1.4fr 0.6fr 0.8fr;
}

.fieldset {
  margin: 0;
  border: 1px solid rgba(77, 49, 27, 0.15);
  border-radius: 20px;
  padding: 14px;
}

.fieldset legend {
  padding: 0 8px;
  color: var(--brand-strong);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    opacity 150ms ease;
}

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

button:active {
  transform: translateY(0);
}

.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: white;
  box-shadow: 0 12px 22px rgba(139, 79, 29, 0.2);
}

.secondary {
  background: rgba(139, 79, 29, 0.09);
  color: var(--brand-strong);
}

.success {
  background: rgba(29, 109, 79, 0.12);
  color: var(--success);
}

.warning {
  background: rgba(179, 95, 0, 0.12);
  color: var(--warning);
}

.ghost {
  background: rgba(158, 58, 47, 0.08);
  color: var(--danger);
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-text {
  min-height: 1.2em;
  margin: 0;
}

.reviewer-panel {
  padding: 22px;
}

.reviewer-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.queue {
  padding: 18px;
}

.queue-header,
.detail-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.case-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.case-card {
  border: 1px solid rgba(77, 49, 27, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: grid;
  gap: 8px;
  text-align: left;
}

.case-card.active {
  border-color: rgba(139, 79, 29, 0.55);
  box-shadow: 0 0 0 4px rgba(139, 79, 29, 0.1);
}

.case-card h4,
.case-card p {
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(139, 79, 29, 0.1);
  color: var(--brand-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.case-detail {
  padding: 18px;
  min-height: 520px;
}

.empty-state {
  min-height: 100%;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 40px 16px;
}

.hidden {
  display: none;
}

.detail-view {
  display: grid;
  gap: 16px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
}

.detail-card {
  padding: 16px;
}

.detail-card h4 {
  margin: 0 0 12px;
  font-size: 1.08rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-item {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(77, 49, 27, 0.1);
  border-radius: 16px;
  padding: 12px;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.flag {
  border-radius: 16px;
  padding: 12px;
  background: rgba(179, 95, 0, 0.09);
  border: 1px solid rgba(179, 95, 0, 0.16);
}

.flag strong {
  display: block;
  margin-bottom: 4px;
}

.check-pass {
  background: rgba(29, 109, 79, 0.09);
  border-color: rgba(29, 109, 79, 0.18);
}

.check-warn {
  background: rgba(179, 95, 0, 0.09);
  border-color: rgba(179, 95, 0, 0.16);
}

.check-note {
  background: rgba(139, 79, 29, 0.07);
  border-color: rgba(139, 79, 29, 0.14);
}

.muted {
  margin: 6px 0 0;
}

@media (max-width: 1040px) {
  .hero,
  .reviewer-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .detail-top {
    flex-direction: column;
  }

  .grid-2,
  .grid-3,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    justify-content: start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 1280px);
    padding-top: 18px;
  }

  .hero-card,
  .panel,
  .reviewer-panel {
    padding: 18px;
  }
}
