:root {
  --bg: #f7f6f1;
  --surface: #fffefa;
  --ink: #232d28;
  --muted: #5d6861;
  --line: #d7dbd1;
  --green: #255a47;
  --green-dark: #1b3f34;
  --green-soft: #e2eee4;
  --terra: #954525;
  --terra-soft: #fae7d9;
  --gold: #806120;
  --sand: #f4ead0;
  --gray-soft: #e9ebe5;
  --serif: "Spectral","Baskervville","Iowan Old Style","Palatino Linotype",Georgia,serif;
  --sans: "Inter","Source Sans 3","Avenir Next","Segoe UI",system-ui,sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  overflow-wrap: anywhere;
}

button,input,select,textarea {
  font: inherit;
  color: inherit;
}

button,a,input,select,textarea,summary {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline: 3px solid #b76d36;
  outline-offset: 3px;
}

button:disabled {
  cursor: default;
  opacity: .55;
}

h1,h2,h3,h4,p {
  margin: 0;
}

h1,h2,.serif {
  font-family: var(--serif);
  font-weight: 500;
}

h1 {
  font-size: clamp(40px,5vw,68px);
  letter-spacing: -.055em;
  line-height: 1.04;
}

h2 {
  font-size: clamp(26px,3vw,36px);
  letter-spacing: -.042em;
  line-height: 1.15;
}

h3 {
  font-size: 16px;
  line-height: 1.35;
}

p+p {
  margin-top: .65em;
}

.skip {
  position: fixed;
  left: 12px;
  top: -90px;
  z-index: 10;
  background: white;
  padding: 8px;
}

.skip:focus {
  top: 8px;
}

.masthead {
  background: var(--green-dark);
  color: #fafbf6;
}

.mast-inner {
  max-width: 1590px;
  margin: auto;
  padding: 0 clamp(20px,4.5vw,77px);
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: clamp(20px,4vw,72px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  color: inherit;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.wordmark {
  font: 600 28px/.9 var(--serif);
  letter-spacing: -.08em;
}

.brand-rule {
  width: 1px;
  height: 24px;
  background: #698172;
}

.brand-label {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .025em;
}

.masthead nav {
  align-self: stretch;
  display: flex;
  gap: 22px;
}

.masthead nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #c6d7cc;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.masthead nav a[aria-current=page] {
  color: white;
}

.masthead nav a[aria-current=page]:after {
  content: "";
  height: 3px;
  background: #b6d0a8;
  position: absolute;
  inset: auto 0 0;
}

.mast-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.local {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #d1e1d4;
  white-space: nowrap;
}

.local i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b3d498;
}

.export {
  font-size: 12px;
  font-weight: 650;
  color: #edf5ea;
  white-space: nowrap;
}

.export span {
  margin-left: 4px;
}

#main {
  max-width: 1590px;
  margin: auto;
  padding: clamp(26px,4vw,65px) clamp(20px,4.5vw,77px) 80px;
  outline: 0;
}

.loading {
  color: var(--muted);
  padding: 4rem;
  text-align: center;
}

.hero,.section-head,.between,.row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero,.section-head,.between {
  justify-content: space-between;
}

.hero {
  align-items: flex-end;
  margin-bottom: 30px;
}

.sub {
  color: var(--muted);
  margin-top: 10px;
  font-size: 15px;
}

.caption,.meta,.unit {
  color: var(--muted);
  font-size: 13px;
}

.micro {
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: var(--muted);
}

.button,.link-button,.tab {
  border: 0;
  background: none;
  text-decoration: none;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 11px 17px;
  font-weight: 650;
  font-size: 13px;
  white-space: nowrap;
}

.button:hover {
  background: var(--green-dark);
  text-decoration: none;
}

.button.secondary {
  color: var(--green);
  background: var(--surface);
  border-color: var(--line);
}

.button.secondary:hover {
  border-color: var(--green);
}

.arrow {
  font-size: 17px;
  line-height: 1;
}

.link-button {
  color: var(--green);
  font-size: 13px;
  font-weight: 650;
  padding: 0;
  text-align: left;
}

.link-button:hover {
  text-decoration: underline;
}

.section-head {
  margin-bottom: 15px;
  align-items: baseline;
}

.section-head .caption {
  white-space: normal;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.summary {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 28px;
}

.metric {
  padding: 20px clamp(15px,2.4vw,35px);
  min-width: 0;
}

.metric+.metric {
  border-left: 1px solid var(--line);
}

.metric strong {
  display: block;
  font: 500 43px/1.04 var(--serif);
  letter-spacing: -.055em;
  margin: 5px 0 4px;
}

.metric .unit {
  font-size: 12px;
}

.summary .metric:first-child {
  border-top: 3px solid var(--green);
  padding-top: 17px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(295px,.78fr);
  gap: clamp(18px,2.3vw,36px);
  align-items: start;
}

.box {
  padding: clamp(18px,2vw,29px);
}

.box h2,.patterns h2,.facts h2 {
  font-size: 30px;
}

.overview-grid .panel {
  height: 100%;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 7px;
  background: var(--green);
}

.dot.withheld {
  background: #aeb9a7;
}

.callout {
  border-left: 3px solid #aebba6;
  padding: 7px 0 7px 13px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 18px;
}

.queue {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 17px;
}

.queue button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 9px 12px;
  border-radius: 5px;
  text-align: left;
  font-size: 13px;
}

.queue button:hover {
  background: var(--green-soft);
  border-color: #a8b6a8;
}

.queue b {
  font-variant-numeric: tabular-nums;
}

.patterns {
  margin-top: 34px;
}

.pattern-list {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
}

.pattern {
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pattern h3 {
  font: 500 24px/1.15 var(--serif);
  letter-spacing: -.025em;
}

.pattern p {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
}

.pattern .observed {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.observed b {
  font-size: 17px;
}

.pattern details {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 650;
}

.pattern .link-button {
  margin-top: 13px;
}

.notes {
  margin-top: 22px;
}

.notes ul,.compact-list {
  padding-left: 19px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.notes li,.compact-list li {
  margin: 4px 0;
}

.work-hero {
  align-items: center;
  margin-bottom: 22px;
}

.work-hero h1 {
  font-size: clamp(38px,4vw,52px);
}

.workbench {
  display: grid;
  grid-template-columns: 290px minmax(0,1fr);
  gap: 20px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 26px);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  overflow: hidden;
}

.tools {
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

label.field-label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 5px;
}

.search,.filter,.note-input {
  width: 100%;
  border: 1px solid #c6cdc3;
  background: var(--surface);
  border-radius: 5px;
  padding: 8px 10px;
}

.search {
  margin: 3px 0 8px;
}

.filter {
  font-size: 12px;
  min-width: 0;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.count-label {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}

.turn-list {
  overflow: auto;
}

.turn-item {
  display: block;
  width: 100%;
  padding: 12px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.turn-item:last-child {
  border-bottom: 0;
}

.turn-item.chosen {
  background: #eaf0e5;
  box-shadow: inset 3px 0 var(--green);
}

.turn-item:hover {
  background: #edf1e9;
}

.turn-item strong {
  display: block;
  margin: 3px 0;
  font-size: 14px;
  font-weight: 660;
  line-height: 1.35;
}

.turn-item .meta {
  font-size: 11px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  font-size: 11px;
  font-weight: 660;
  padding: 3px 8px;
  line-height: 1.35;
  border-radius: 4px;
  background: var(--gray-soft);
  color: #4d5952;
}

.tag.green {
  background: var(--green-soft);
  color: #205842;
}

.tag.terra {
  background: var(--terra-soft);
  color: #874222;
}

.tag.gold {
  background: var(--sand);
  color: #72561a;
}

.case-detail {
  min-width: 0;
}

.case-head {
  padding: 0 0 15px;
}

.case-head h2 {
  margin: 6px 0 8px;
  font-size: clamp(28px,2.9vw,41px);
}

.inline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.case-head .meta {
  font-size: 12px;
}

.prompt {
  border: 1px solid #d9d1c3;
  border-left: 4px solid #ab7750;
  background: #f6efe2;
  border-radius: 5px;
  padding: 14px 19px;
  margin-bottom: 15px;
}

.prompt .micro {
  color: #7d5737;
}

.prompt .turn-text {
  font: 500 18px/1.5 var(--serif);
  margin-top: 5px;
}

.turn-text,.quote,.note-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  margin: 14px 0 16px;
}

.tab {
  white-space: nowrap;
  padding: 8px 0 9px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}

.tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 700;
}

.replies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.reply {
  padding: 0;
  overflow: hidden;
}

.reply-head {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: #edf1e8;
}

.reply-head.candidate {
  background: #f3eade;
}

.reply-head .meta {
  display: block;
  font-size: 11px;
}

.reply-text {
  padding: 15px 17px;
  font: 16px/1.62 var(--serif);
}

mark {
  background: #f2deac;
  color: inherit;
  border-bottom: 1px solid #a68331;
}

.marks-legend {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

.marks-legend:before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 9px;
  background: #f2deac;
  border-bottom: 1px solid #a68331;
  margin-right: 7px;
}

.audit-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 13px;
}

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

.small-panel {
  padding: 16px 18px;
}

.small-panel h3,.small-panel h4 {
  margin-bottom: 7px;
}

.trait {
  margin-top: 10px;
}

.trait h4 {
  font-size: 15px;
}

.trait p,.small-panel li {
  font-size: 14px;
}

.excerpts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 9px;
}

.quote {
  border-left: 2px solid #becbbf;
  margin: 3px 0;
  padding-left: 9px;
  color: var(--muted);
  font-size: 13px;
}

.gate-list {
  padding: 0;
  list-style: none;
}

.gate-list li {
  margin: 8px 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.gate-list summary {
  font-weight: 500;
  color: var(--ink);
}

.gate-list .tag {
  margin-left: 7px;
}

.decision-form {
  max-width: 760px;
}

.note-input {
  min-height: 125px;
  resize: vertical;
}

.choices {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 15px;
}

.choice {
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 9px;
  font-size: 13px;
}

.choice:has(input:checked) {
  background: var(--green-soft);
  border-color: #80a38e;
}

.choice input {
  accent-color: var(--green);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.status-line {
  font-size: 13px;
  color: var(--muted);
}

.empty {
  padding: 19px;
  color: var(--muted);
  font-size: 14px;
}

.notice {
  position: fixed;
  right: 20px;
  bottom: 18px;
  max-width: calc(100% - 40px);
  padding: 0;
  z-index: 5;
}

.notice:not(:empty) {
  background: var(--green-dark);
  color: white;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
}

.context-turn {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.context-turn:last-child {
  border: 0;
}

.context-turn .turn-text {
  font: 15px/1.5 var(--serif);
}

.detail-table {
  display: grid;
  grid-template-columns: minmax(90px,.7fr) 1.5fr;
  gap: 7px 12px;
  margin: 8px 0;
  font-size: 13px;
}

.detail-table dt {
  color: var(--muted);
}

.detail-table dd {
  margin: 0;
}

.select-pattern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media(min-width:1500px) {
  .workbench {
    grid-template-columns: 325px minmax(0,1fr);
  }
  .reply-text {
    font-size: 18px;
  }
}

@media(max-width:1050px) {
  .mast-inner {
    gap: 20px;
  }
  .mast-end {
    gap: 12px;
  }
  .local {
    display: none;
  }
  .workbench {
    grid-template-columns: 235px minmax(0,1fr);
    gap: 15px;
  }
  .pattern-list {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media(max-width:760px) {
  .mast-inner {
    min-height: 56px;
    flex-wrap: wrap;
    gap: 0 18px;
    padding: 8px 18px 0;
  }
  .brand {
    gap: 8px;
  }
  .wordmark {
    font-size: 23px;
  }
  .brand-label {
    font-size: 12px;
  }
  .brand-rule {
    height: 17px;
  }
  .mast-end {
    order: 1;
  }
  .masthead nav {
    order: 2;
    min-width: 100%;
    gap: 18px;
  }
  .masthead nav a {
    padding: 8px 0;
  }
  .hero,.section-head {
    align-items: flex-start;
  }
  .summary {
    grid-template-columns: 1fr 1fr;
  }
  .metric:nth-child(3) {
    border-left: 0;
  }
  .metric:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }
  .overview-grid,.workbench {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    max-height: 300px;
  }
  .turn-list {
    max-height: 153px;
  }
  .turn-item {
    padding: 8px 13px;
  }
  .turn-item strong {
    display: inline;
    margin-right: 8px;
  }
  .turn-item .row {
    display: inline-flex;
  }
  .work-hero .caption {
    display: none;
  }
  .hero {
    flex-wrap: wrap;
    gap: 12px;
  }
  .summary {
    margin-bottom: 16px;
  }
  .pattern-list {
    grid-template-columns: 1fr;
  }
  .replies {
    grid-template-columns: 1fr;
  }
  .excerpts {
    grid-template-columns: 1fr;
  }
  .tabs {
    gap: 14px;
  }
  .button {
    padding: 9px 13px;
  }
  .select-pattern {
    margin-top: 6px;
  }
  .section-head {
    flex-wrap: wrap;
    gap: 4px;
  }
  .box {
    padding: 18px;
  }
}

@media(prefers-reduced-motion:no-preference) {
  button,a {
    transition: background-color .12s,border-color .12s,color .12s;
  }
}

.coverage-progress {
  display: block;
  width: 100%;
  height: 13px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  appearance: none;
  margin: 22px 0 15px;
  background: #d4ddcf;
  color: var(--green);
}

.coverage-progress::-webkit-progress-bar {
  background: repeating-linear-gradient(135deg,#bdc9b8,#bdc9b8 3px,#e6ebdf 3px,#e6ebdf 6px);
}

.coverage-progress::-webkit-progress-value {
  background: var(--green);
}

.coverage-progress::-moz-progress-bar {
  background: var(--green);
}

.queue-link {
  margin-top: 12px;
}

.decision-fields {
  border: 0;
  padding: 0;
  margin: 8px 0;
}

.decision-fields legend {
  font-size: 12px;
  font-weight: 650;
}

.conflict {
  padding: 13px 15px;
  background: var(--sand);
  border-radius: 6px;
  margin: 12px 0;
}

.conflict .note-copy {
  font-size: 13px;
}

.findings {
  margin: 8px 0 28px;
}

.table-wrap {
  overflow: hidden;
}

.findings-table {
  border-spacing: 0;
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}

.findings-table th,.findings-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.findings-table thead th {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .055em;
  text-transform: uppercase;
  background: #eff1e9;
}

.findings-table tbody th {
  font-size: 14px;
  font-weight: 650;
  width: 36%;
}

.findings-table th small,.findings-table td small {
  font-size: 12px;
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}

.findings-table tbody tr:last-child>* {
  border-bottom: 0;
}

.case-link {
  color: var(--green);
}

.finding-count {
  font-size: 13px;
  color: var(--ink);
}

.table-note {
  font-size: 13px;
  color: var(--muted);
  background: #f0f2e9;
  border-top: 1px solid var(--line);
  padding: 10px 18px;
}

.findings-table td:last-child {
  width: 24%;
}

@media(max-width:600px) {
  .findings-table th,.findings-table td {
    padding: 8px 7px;
  }
  .findings-table tbody th,.finding-count {
    font-size: 12px;
  }
  .findings-table th small,.findings-table td small {
    font-size: 11px;
  }
  .findings-table .tag {
    font-size: 10px;
  }
  .findings-table td:last-child {
    width: 23%;
  }
}

.action-finding,
.prior-review {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.action-finding p,
.prior-review p {
  margin-top: 7px;
}

.action-finding h4 {
  margin: 0;
  font-size: 14px;
}

.action-finding h4::first-letter {
  text-transform: uppercase;
}

.action-finding .excerpts + p {
  margin-top: 12px;
}

.prior-reviews {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.prior-reviews summary {
  margin-bottom: 8px;
}
