:root {
  color-scheme: light;
  --paper: #f3efe6;
  --ink: #221c16;
  --muted: #5e564c;
  --line: #ddd4c6;
  --card: #fbf8f2;
  --green: #1d4e45;
  --green-dark: #14362f;
  --warn-bg: #f4e4c4;
  --warn: #6d4a10;
  --bad-bg: #f6d9d4;
  --bad: #7c2f2a;
  --note-bg: #e7eef2;
  --note: #1e3f55;
  --shadow: 0 1px 0 rgba(34, 28, 22, 0.04);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(29, 78, 69, 0.06), transparent 220px),
    var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--green-dark); }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: white;
  padding: 0.4rem 0.7rem;
}

.skip:focus { top: 0.5rem; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 242, 0.92);
  margin-bottom: 1.5rem;
  padding: 1rem 0 0.85rem;
}

.header-top,
.header-project {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.header-top {
  align-items: flex-end;
  padding-bottom: 0.65rem;
}

.header-project {
  align-items: center;
  padding-top: 0.15rem;
}

.header-brand {
  min-width: 0;
}

.header-account {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem 0.85rem;
  max-width: min(100%, 28rem);
  margin: 0;
}

.header-account-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.3;
}

.header-signin {
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.header-logout {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  width: auto;
  max-width: none;
  border: 0;
  background: none;
}

.header-logout button.linkish,
.site-header .header-logout button.linkish {
  display: inline-block;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0.1rem 0;
  background: none;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  font: inherit;
  line-height: 1.3;
  cursor: pointer;
}

.header-logout button.linkish:hover,
.site-header .header-logout button.linkish:hover {
  background: none;
  color: var(--ink);
}

.header-baseline {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  max-width: 100%;
}

.header-baseline .badge {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.25;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
}

.brand {
  display: inline-block;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.7rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
}

.project-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.project-nav a {
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
}

.project-nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--green);
}

.site-header a:focus-visible,
.site-header button:focus-visible,
.project-nav a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

h1, h2 {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}

h1 { margin: 0 0 0.4rem; font-size: 2rem; }
h2 { margin: 0 0 0.6rem; font-size: 1.25rem; }

.lede { color: var(--muted); max-width: 68ch; }

.banner {
  background: #e5f0ec;
  border: 1px solid #b7d0c8;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
}

.banner-error {
  background: var(--bad-bg);
  border-color: #e3b2ab;
  color: var(--bad);
}

.split {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1rem;
  align-items: start;
}

.panel, .project-list li, .message, .stats article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel { padding: 1rem; }

.project-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.project-list li { padding: 0.9rem 1rem; margin-bottom: 0.7rem; }
.project-list a { font-size: 1.15rem; text-decoration: none; }
.project-list p { margin: 0.25rem 0 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}

.stats article { padding: 0.9rem 1rem; }
.stat { font-size: 1.6rem; margin: 0; font-family: "Iowan Old Style", Palatino, Georgia, serif; }

label { display: block; margin: 0.8rem 0 0.3rem; font-size: 0.92rem; }
input, textarea, select, button {
  font: inherit;
  color: inherit;
}
input[type="text"], input:not([type]), input[type="file"], textarea, select,
input[inputmode="decimal"] {
  width: 100%;
  background: white;
  border: 1px solid #cfc5b6;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
}
textarea { resize: vertical; }

button, .text-link {
  display: inline-block;
}

button.linkish {
  margin-top: 0;
  background: none;
  color: inherit;
  border: 0;
  padding: 0;
  text-decoration: underline;
  font: inherit;
}

button {
  margin-top: 0.9rem;
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
}

button:hover { background: var(--green-dark); }

.hint, .meta, .empty { color: var(--muted); }

.bcheck-explanation {
  margin-top: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--warn);
  border-radius: 0 6px 6px 0;
  background: var(--warn-bg);
  font-size: 0.92rem;
}
.bcheck-explanation p { margin: 0.35rem 0 0; }
.bcheck-review-cell { min-width: 16rem; }
.bcheck-review-cell .meta { display: block; margin: 0.35rem 0; }
.bcheck-review-attention { color: var(--warn); }
.bcheck-review-kept { color: var(--green-dark); }
.bcheck-review-removed { color: var(--bad); }
.bcheck-review-notes {
  margin: 0.5rem 0;
  padding: 0.5rem 0.6rem;
  background: var(--note-bg);
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bcheck-review-controls { max-width: 23rem; }
.bcheck-review-controls fieldset { margin: 0.75rem 0; padding: 0.5rem 0.65rem; }
.bcheck-review-controls .check { margin: 0.3rem 0; }
.bcheck-review-controls textarea, .bcheck-review-controls input[type="text"] { width: 100%; }

.finding {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--note-bg);
  color: var(--note);
  font-size: 0.82rem;
}
.empty {
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.badge, .flag {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.78rem;
}
.badge-draft { background: var(--warn-bg); color: var(--warn); }
.badge-approved { background: #dce8e3; color: var(--green-dark); }
.flag-missing { background: var(--bad-bg); color: var(--bad); margin: 0 0.25rem 0.25rem 0; }
.flag-duplicate { background: var(--warn-bg); color: var(--warn); margin-bottom: 0.25rem; }
.flag-note { background: var(--note-bg); color: var(--note); }

.toolbar, .pager, .inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: end;
}
.toolbar a[aria-current="true"] { font-weight: 700; }
.inline-fields input { width: min(280px, 100%); }
.inline-fields button { margin-top: 0; }

.table-scroll, .table-wrap { overflow-x: auto; margin: 0.8rem 0 1.2rem; }
table { width: 100%; border-collapse: collapse; background: var(--card); min-width: 760px; }
th, td { border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; padding: 0.65rem; }
th { font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
td a, td span, td strong { display: block; }
td .flag, td .meta { display: inline-block; }

.check { display: flex; gap: 0.5rem; align-items: flex-start; }
.check input { width: auto; margin-top: 0.25rem; }

.source-fields { margin: 0.4rem 0 0; }
.source-fields div { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); gap: 0.4rem; }
.source-fields dt { color: var(--muted); }
.source-fields dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.evidence-list { margin: 0; padding-left: 1rem; }
.summary {
  white-space: pre-wrap;
  background: #f7f4ee;
  border-radius: 6px;
  padding: 0.7rem;
  overflow-x: auto;
}
.routing { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.routing li { margin: 0.25rem 0; }
.chat-log { display: grid; gap: 0.7rem; margin-bottom: 1rem; }
.message { padding: 0.8rem 1rem; }
.message header { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.message pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0.4rem 0 0;
}
.message.note { border-color: #b7c9d4; }
.message.assistant { background: #f7fbf9; }
.project-chat-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}
.project-chat-toggle {
  margin: 0;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(34, 28, 22, 0.2);
}
.project-chat-panel {
  order: -1;
  display: flex;
  flex-direction: column;
  width: min(26rem, calc(100vw - 2rem));
  height: min(37rem, calc(100dvh - 6rem));
  min-height: 16rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 35px rgba(34, 28, 22, 0.2);
  overflow: hidden;
}
.project-chat-panel[hidden] { display: none; }
.project-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--green);
  color: white;
}
.project-chat-header div { min-width: 0; }
.project-chat-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.86;
}
.project-chat-close {
  margin: 0;
  padding: 0.25rem 0.4rem;
  background: transparent;
  text-decoration: underline;
}
.project-chat-close:hover { background: var(--green-dark); }
.project-chat-description, .project-chat-status {
  margin: 0;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.project-chat-status:empty { display: none; }
.project-chat-error { color: var(--bad); }
.project-chat-content { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.project-chat-content .chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  padding: 0.6rem;
  margin: 0;
}
.project-chat-content .message { min-width: 0; padding: 0.6rem; font-size: 0.88rem; }
.project-chat-content .message pre { overflow-wrap: anywhere; white-space: pre-wrap; }
.project-chat-content .chat-compose {
  flex: none;
  margin: 0;
  padding: 0.5rem 0.75rem 0.75rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  max-height: 45%;
  overflow-y: auto;
}
.project-chat-content .chat-compose label { margin-top: 0.3rem; }
.project-chat-content .chat-compose textarea { height: 3.5rem; min-height: 3.5rem; max-height: 8rem; }
.project-chat-content .chat-compose button {
  position: sticky;
  bottom: 0;
  width: 100%;
  margin-top: 0.35rem;
}
.project-chat-widget :focus-visible { outline: 3px solid #a97824; outline-offset: 2px; }
.locked { border-style: dashed; }

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

code { font-size: 0.9em; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Discovery run results */
.run-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.2rem;
  margin: 0.6rem 0 0.4rem;
}
.run-summary-grid dt {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.run-summary-grid dd {
  margin: 0.15rem 0 0;
}
.run-summary-grid .meta {
  display: block;
  margin-top: 0.25rem;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--note-bg);
  color: var(--note);
}
.status-pill.status-found,
.status-pill.status-complete { background: #dce8e3; color: var(--green-dark); }
.status-pill.status-none,
.status-pill.status-incomplete,
.status-pill.status-not_started,
.status-pill.status-locked,
.status-pill.status-not_applicable { background: var(--warn-bg); color: var(--warn); }
.status-pill.status-failed,
.status-pill.status-analysis_failed,
.status-pill.status-bad { background: var(--bad-bg); color: var(--bad); }
.status-pill.status-running { background: var(--note-bg); color: var(--note); }
.completion-time {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.retry-analysis {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.campaign-decision {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}
.campaign-decision h3 {
  margin: 0 0 0.45rem;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
}
.campaign-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}
.campaign-actions form {
  margin: 0;
}
.campaign-actions button.secondary {
  background: var(--note-bg);
  color: var(--note);
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.6rem 0;
}
.stage-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 0.95rem;
}
.stage-card h3 {
  margin: 0 0 0.45rem;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.05rem;
}
.stage-card p { margin: 0.35rem 0 0; }

.candidate-cards,
.source-cards {
  display: grid;
  gap: 0.85rem;
  margin: 0.8rem 0;
}
.candidate-card,
.source-card {
  min-width: 0;
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}
.candidate-card header,
.source-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.candidate-card h3,
.source-card h4 {
  margin: 0;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.1rem;
}
.candidate-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
}
.candidate-actions input,
.candidate-actions select { margin: 0; }
.candidate-evidence h4 {
  margin: 0.7rem 0 0.35rem;
  font-size: 0.95rem;
}

.source-groups { display: grid; gap: 1rem; margin-top: 0.8rem; }
.source-group h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
}
.source-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.35rem 0.8rem;
  margin: 0.45rem 0;
}
.source-meta dt {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.source-meta dd { margin: 0.1rem 0 0; word-break: break-word; }
.source-excerpt {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid #b7d0c8;
  background: #f7fbf9;
  color: var(--ink);
  font-size: 0.95rem;
}
.source-card.source-lead {
  border-style: dashed;
}

.name-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}
.name-list > li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.name-list .meta { display: block; margin-top: 0.2rem; }
.name-list .related-source-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.3rem;
}
.name-list .related-source-list li { padding: 0; border: 0; overflow-wrap: anywhere; }
.name-list .related-source-list .meta { display: inline; }

details > summary {
  cursor: pointer;
  list-style-position: inside;
}

.run-details,
.compact-details {
  margin-top: 0.5rem;
}
.run-details > summary,
.compact-details > summary {
  font-weight: 600;
  color: var(--green-dark);
}
.run-details > summary:focus-visible,
.compact-details > summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.run-details[open],
.compact-details[open] {
  margin-top: 0.6rem;
}
.run-details .summary { margin-top: 0.6rem; }

.overview-details { margin: 0 0 1rem; }
.overview-details > summary {
  color: var(--ink);
  font-size: 1.25rem;
}
.overview-details > summary .meta { font-size: 0.9rem; font-weight: 400; }
.overview-details[open] { margin-top: 0; }
.overview-details[open] > summary { margin-bottom: 0.8rem; }

/* Context: short project snapshot and browsable event history. */
.context-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.7rem 0;
}
.context-overview-grid > div {
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}
.context-overview-grid dt,
.context-kind {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.context-overview-grid dd {
  margin: 0.25rem 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.context-project-more { margin-top: 0.8rem; }
.context-project-more > summary,
.context-event-details > summary { list-style-position: inside; }
.context-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.85rem 0;
}
.context-filters a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--green-dark);
  text-decoration: none;
  font-size: 0.9rem;
}
.context-filters a[aria-current="page"] {
  border-color: var(--green);
  background: var(--green);
  color: white;
}
.context-filters a span { font-size: 0.8rem; opacity: 0.8; }
.context-timeline { list-style: none; padding: 0; margin: 0.8rem 0 1.2rem; display: grid; gap: 0.65rem; }
.context-event {
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid #b7d0c8;
  border-radius: 8px;
  background: var(--card);
}
.context-event-review { border-left-color: #c29c62; }
.context-event-stage1 { border-left-color: #8daaba; }
.context-event header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
}
.context-event h3 { margin: 0.15rem 0 0; font-size: 1.06rem; overflow-wrap: anywhere; }
.context-run-status {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: var(--note-bg);
  color: var(--note);
  font-size: 0.78rem;
  font-weight: 600;
}
.context-run-status-completed { background: #dce8e3; color: var(--green-dark); }
.context-run-status-failed, .context-run-status-blocked { background: var(--bad-bg); color: var(--bad); }
.context-event time { color: var(--muted); font-size: 0.84rem; white-space: nowrap; }
.context-event-time { display: grid; justify-items: end; font-size: 0.84rem; }
.context-preview { margin: 0.35rem 0 0.45rem; overflow-wrap: anywhere; }
.context-event-details { margin: 0.4rem 0; }
.context-event-details h4 { margin: 0.8rem 0 0.25rem; font-size: 0.9rem; }
.context-full-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.context-sources { padding-left: 1.2rem; }
.context-sources li { margin: 0.6rem 0; overflow-wrap: anywhere; }
.context-event-link { display: inline-block; margin-top: 0.35rem; font-size: 0.9rem; }

@media (max-width: 800px) {
  .split, .stats, .stage-grid, .run-summary-grid, .context-overview-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.7rem; }
  .header-top,
  .header-project {
    align-items: flex-start;
  }
  .header-account {
    max-width: 100%;
  }
  .candidate-actions { grid-template-columns: 1fr; }
}

.denomination-review-form {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line, #d5d0c8);
}

.review-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  background: var(--surface, #faf8f2);
  border: 1px solid var(--border, #dcd4c8);
  border-radius: 8px;
  box-shadow: 0 -3px 12px #0000000d;
}
.review-save-bar[hidden] { display: none; }
.review-save-bar p { margin: 0 0 .35rem; }
.review-save-bar button { flex-shrink: 0; }
.review-save-status:empty { display: none; }
.review-save-error { color: #972a20; font-weight: 600; }
.wcd-identifier { margin-top: 1rem; }
@media (max-width: 600px) {
  .review-save-bar { flex-direction: column; align-items: stretch; }
  .review-save-bar button { width: 100%; }
}
.denomination-review-form fieldset.review-decision {
  border: 0;
  padding: 0;
  margin: 0 0 0.75rem;
}
.denomination-review-form fieldset.review-decision legend {
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.denomination-review-form textarea {
  width: min(100%, 36rem);
  max-width: 100%;
  margin-bottom: 0.75rem;
}
.denomination-review-form .wcd-identifier input[type="text"] {
  width: min(100%, 20rem);
  font-variant-numeric: tabular-nums;
}

.result-card .result-five-fields {
  margin: 0.6rem 0 0.8rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.result-five-fields dl {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: 0.45rem 1rem;
  margin: 0;
}
.result-five-fields dt {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.result-five-fields dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.source-link-list { margin: 0; padding-left: 1.1rem; }
button.secondary {
  background: var(--note-bg);
  color: var(--note);
}

@media (max-width: 520px) {
  .project-chat-widget { right: 0.5rem; bottom: 0.5rem; }
  .project-chat-panel { width: calc(100vw - 1rem); height: min(37rem, calc(100dvh - 5rem)); }
  .brand { font-size: 1.45rem; }
  .site-header { padding: 0.85rem 0 0.7rem; }
  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-account {
    justify-content: flex-start;
  }
  .result-five-fields dl { grid-template-columns: 1fr; }
  .source-fields div { grid-template-columns: 1fr; gap: 0.1rem; }
  .campaign-actions { grid-template-columns: 1fr; }
}
