:root {
  color-scheme: light;
  --color-background: #f5f7f9;
  --color-surface: #ffffff;
  --color-text: #1c2733;
  --color-muted: #596775;
  --color-border: #d8e0e7;
  --color-accent: #145d70;
  --color-accent-hover: #0d4b5b;
  --color-focus: #d97706;
  --shadow-panel: 0 18px 50px rgb(28 39 51 / 10%);
  --radius-small: 0.4rem;
  --radius-large: 1rem;
  --content-width: 72rem;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
}

a {
  color: var(--color-accent);
}

a:hover {
  color: var(--color-accent-hover);
}

button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-small);
  background: var(--color-text);
  color: white;
  transform: translateY(-200%);
}

.skip-link:focus {
  color: white;
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-header__inner,
.account-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header__inner {
  min-height: 4.5rem;
  justify-content: space-between;
}

.wordmark {
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.account-menu__identity {
  color: var(--color-muted);
  font-size: 0.925rem;
}

.project-number {
  display: grid;
  padding-right: 1rem;
  border-right: 1px solid var(--color-border);
  color: var(--color-text);
  line-height: 1.2;
  text-align: right;
  text-decoration: none;
}

.project-number__label {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page {
  padding-block: clamp(3rem, 8vw, 7rem);
}

.hero,
.auth-panel {
  max-width: 42rem;
}

.auth-panel {
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: var(--shadow-panel);
}

.eyebrow {
  margin-bottom: 0.65rem;
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.auth-panel h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

.lede {
  max-width: 58ch;
  margin: 1.25rem 0 0;
  color: var(--color-muted);
  font-size: 1.12rem;
}

.stack {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid #a9b5c0;
  border-radius: var(--radius-small);
  background: white;
  color: var(--color-text);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--color-accent);
}

.field textarea {
  resize: vertical;
}

.errorlist {
  margin: 0;
  padding-left: 1.25rem;
  color: #9b1c1c;
}

.form-errors {
  padding: 0.8rem 1rem;
  border-left: 4px solid #b42318;
  background: #fff1f0;
  color: #7a271a;
}

.button {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
  font-weight: 750;
}

.button--primary {
  background: var(--color-accent);
  color: white;
}

.button--primary:hover {
  background: var(--color-accent-hover);
}

.button--large {
  min-height: 3.25rem;
  padding-inline: 1.4rem;
}

.button--quiet {
  border-color: var(--color-border);
  background: transparent;
  color: var(--color-text);
}

.button--quiet:hover {
  background: var(--color-background);
}

.messages {
  margin-bottom: 1.5rem;
}

.message {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-surface);
}

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

.review {
  display: grid;
  gap: 1.5rem;
}

.review--focused {
  width: min(100%, 58rem);
  margin-inline: auto;
}

.review__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.review__header h1 {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.queue-count {
  min-width: 8.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-surface);
  color: var(--color-muted);
  text-align: center;
}

.queue-count strong {
  display: block;
  color: var(--color-text);
  font-size: 1.5rem;
}

.review-card,
.decision-panel {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
}

.review-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
}

.review-status--clear {
  border-color: #99c7b0;
  background: #f1faf5;
}

.review-status--attention {
  border-color: #d6b471;
  background: #fffaf0;
}

.review-status--pending {
  border-color: #b8c7d4;
  background: #f7f9fb;
}

.review-status .eyebrow {
  margin-bottom: 0.2rem;
}

.review-status h2,
.review-status p {
  margin: 0;
}

.review-status h2 {
  font-size: 1.2rem;
}

.review-status p {
  margin-top: 0.2rem;
  color: var(--color-muted);
}

.status-mark {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 2.65rem;
  place-items: center;
  border-radius: 50%;
  background: var(--color-surface);
  font-size: 1.1rem;
  font-weight: 850;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.25rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.quiet-label,
.context-flags span {
  color: var(--color-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.quiet-label {
  padding-top: 0.2rem;
  white-space: nowrap;
}

.prose--prominent {
  font-size: 1.08rem;
}

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

.context-line,
.attachment-note {
  margin: 1.25rem 0 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.current-status {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid #a9c7cf;
  background: #f2f8fa;
}

.current-status .prose {
  margin-top: 0.2rem;
}

.project-preview {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.25rem;
  margin: 0;
}

.project-preview div {
  min-width: 0;
}

.project-preview dt {
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-preview dd {
  margin: 0.3rem 0 0;
  overflow-wrap: anywhere;
}

.disclosure-list {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
}

.content-disclosure + .content-disclosure {
  border-top: 1px solid var(--color-border);
}

.content-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  font-weight: 750;
  list-style-position: inside;
}

.content-disclosure summary:hover {
  background: var(--color-background);
}

.content-disclosure__body {
  padding: 0 1.1rem 1.25rem;
}

.content-disclosure__body .answer-section:first-child {
  margin-top: 0;
  padding-top: 0.25rem;
  border-top: 0;
}

.context-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.context-flags span {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--color-background);
}

.activity-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.activity-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.activity-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.activity-meta time {
  color: var(--color-muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.activity-history .activity-list {
  margin-top: 0.8rem;
}

.change-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.change-list li {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-background);
}

.change-list__heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.change-list__heading span,
.change-value > span {
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.change-value {
  margin-top: 0.8rem;
}

.change-value--before {
  opacity: 0.72;
}

.plan-remediation {
  padding: 1rem;
  border: 1px solid #99c7b0;
  border-radius: var(--radius-small);
  background: #f1faf5;
}

.plan-remediation .field {
  margin-top: 0.75rem;
}

.proposed-plan-value {
  margin: 0.5rem 0 0;
  font-size: 1.08rem;
  font-weight: 750;
}

.document-list {
  display: grid;
  gap: 0.65rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.document-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-background);
  text-decoration: none;
}

.document-list a:hover {
  border-color: #a9c7cf;
  background: #eef8fa;
}

.document-list__name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.document-list__meta {
  flex: 0 0 auto;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.document-preview {
  display: grid;
  gap: 1.25rem;
}

.document-preview__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.document-preview__header h1,
.document-preview__header p {
  margin-bottom: 0;
}

.document-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin: 0;
}

.document-facts dt {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-facts dd {
  margin: 0.15rem 0 0;
}

.document-canvas {
  display: grid;
  min-height: min(72vh, 52rem);
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: #e8edf1;
  box-shadow: var(--shadow-panel);
}

.document-canvas iframe {
  width: 100%;
  height: min(78vh, 58rem);
  border: 0;
  background: white;
}

.document-canvas img,
.document-canvas video {
  display: block;
  max-width: 100%;
  max-height: 78vh;
}

.document-unavailable {
  max-width: 34rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.document-unavailable h2 {
  margin: 0;
}

.document-unavailable p {
  margin: 0.5rem 0 1.5rem;
  color: var(--color-muted);
}

.review-card h2,
.decision-panel h2,
.form-group h3,
.answer-section h4 {
  margin-top: 0;
}

.review-card h2,
.decision-panel h2 {
  font-size: 1.5rem;
}

.prose {
  max-width: 72ch;
}

.facts,
.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin: 1.5rem 0 0;
}

.facts div,
.answers div {
  min-width: 0;
}

.facts dt,
.answers dt {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.facts dd,
.answers dd {
  margin: 0.3rem 0 0;
  overflow-wrap: anywhere;
}

.supporting-note,
.answer-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.supporting-note h3,
.answer-section h4 {
  font-size: 1rem;
}

.form-groups,
.form-group + .form-group {
  margin-top: 2rem;
}

.decision-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-color: #a9c7cf;
  box-shadow: var(--shadow-panel);
}

.decision-panel p {
  margin-bottom: 0;
  color: var(--color-muted);
}

.finding-summary h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1rem;
}

.finding-review .eyebrow {
  margin-bottom: 0.35rem;
}

.finding-question {
  max-width: 34ch;
  margin-bottom: 0.75rem;
  font-size: clamp(1.45rem, 3vw, 2rem) !important;
  line-height: 1.2;
}

.plain-callout {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid #d6a756;
  background: #fffaf0;
}

.plain-callout p {
  margin: 0.25rem 0 0;
}

.inline-disclosure {
  margin-top: 1.5rem;
}

.inline-disclosure summary,
.decision-note summary,
.technical-details summary {
  color: var(--color-accent);
  cursor: pointer;
  font-weight: 750;
}

.evidence-list.evidence-list--plain div {
  padding: 0.75rem 0;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
}

.resolution-copy h3 {
  margin: 0;
  font-size: 1.05rem;
}

.resolution-copy p {
  max-width: 65ch;
  margin: 0.35rem 0 0;
  color: var(--color-muted);
}

.resolution-copy + .resolution-copy {
  margin-top: 1rem;
}

.supporting-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.92rem;
}

.decision-note {
  width: min(100%, 38rem);
}

.decision-note .field {
  margin-top: 0.8rem;
}

.secondary-disclosures {
  display: grid;
  width: min(100%, 30rem);
  gap: 0.8rem;
}

.technical-details p {
  margin: 0.6rem 0 0;
  font-size: 0.86rem;
}

.finding-condition {
  max-width: 60ch;
  font-size: 1.2rem;
  font-weight: 700;
}

.finding-meta,
.decision-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.finding-meta {
  margin-bottom: 1.25rem;
}

.finding-badge {
  display: inline-flex;
  padding: 0.25rem 0.55rem;
  border: 1px solid #d6a756;
  border-radius: 999px;
  background: #fff8e8;
  color: #714b0b;
  font-size: 0.78rem;
  font-weight: 800;
}

.finding-badge--error {
  border-color: #e2a29d;
  background: #fff1f0;
  color: #8f1d16;
}

.finding-badge--info {
  border-color: #a9c7cf;
  background: #eef8fa;
  color: #145d70;
}

.evidence-list,
.recommendation-list,
.suggested-actions {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
}

.evidence-list div,
.recommendation,
.suggested-action {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-background);
}

.evidence-list dt {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.evidence-list dd {
  margin: 0.3rem 0 0;
}

.recommendation h3,
.suggested-action h3 {
  margin: 0;
  font-size: 1rem;
}

.recommendation p,
.suggested-action p {
  margin: 0.35rem 0 0;
  color: var(--color-muted);
}

.suggested-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.decision-panel--stacked {
  align-items: stretch;
  flex-direction: column;
}

.finding-decision-form {
  display: grid;
  gap: 1.25rem;
}

.review-escape-hatches {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.defer-panel {
  width: min(100%, 30rem);
}

.defer-panel summary {
  color: var(--color-muted);
  cursor: pointer;
  font-weight: 700;
  text-align: right;
}

.stack--compact {
  gap: 0.9rem;
  margin-top: 1rem;
}

@media (max-width: 36rem) {
  .site-header__inner {
    align-items: flex-start;
    padding-block: 1rem;
  }

  .account-menu {
    align-items: flex-end;
    flex-direction: column;
    gap: 0.5rem;
  }

  .project-number {
    padding-right: 0;
    border-right: 0;
  }

  .review__header,
  .decision-panel,
  .review-escape-hatches,
  .suggested-action,
  .section-heading,
  .activity-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .queue-count {
    align-self: flex-start;
  }

  .facts,
  .answers,
  .facts--brief,
  .project-preview {
    grid-template-columns: 1fr;
  }

  .quiet-label {
    padding-top: 0;
    white-space: normal;
  }

  .context-flags {
    justify-content: flex-start;
  }

  .activity-meta {
    gap: 0.2rem;
  }

  .document-preview__header,
  .document-list a {
    align-items: stretch;
    flex-direction: column;
  }

  .document-list__meta {
    flex: auto;
  }

  .defer-panel summary {
    text-align: left;
  }
}
