:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  color: #16221c;
  background: #f6f8f5;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, .file-button { cursor: pointer; }

.review-header {
  min-height: 76px;
  padding: 14px max(24px, calc((100vw - 1320px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #fff;
  border-bottom: 1px solid #dce4de;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-logo { display: block; width: 180px; height: 30px; flex: 0 0 180px; overflow: hidden; }
.brand-logo img { display: block; width: 192.5px; max-width: none; height: auto; transform: translate(-5.8px, -11.3px); }
.back-link { color: #135f49; font-weight: 650; }

main { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 52px 0 90px; }
.intro { max-width: 940px; }
.eyebrow { margin: 0 0 12px; color: #147354; font-size: 13px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -.045em; }
.lead { max-width: 840px; margin: 24px 0; color: #52625a; font-size: 20px; line-height: 1.55; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stats span { padding: 10px 14px; border: 1px solid #d7e0da; border-radius: 12px; background: #fff; }
.stats strong { color: #086d4e; }

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid #d7e0da;
  border-radius: 16px;
  background: #fff;
}
.toolbar label { display: grid; gap: 7px; color: #52625a; font-size: 13px; font-weight: 650; }
.toolbar input, .toolbar select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #cfd9d2; border-radius: 10px; color: #16221c; background: #fff; }

.actions { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; padding: 12px; border: 1px solid #d7e0da; border-radius: 14px; background: rgba(246, 248, 245, .96); backdrop-filter: blur(12px); }
.actions button, .file-button { min-height: 42px; padding: 10px 14px; border: 1px solid #126c50; border-radius: 10px; color: #fff; background: #126c50; font-weight: 700; }
.actions .quiet, .file-button { color: #185b48; background: #fff; }
.file-button input { display: none; }
#saveStatus { margin-left: auto; color: #68776f; font-size: 13px; }
.summary { color: #52625a; }

.question-list { display: grid; gap: 14px; }
.question-card { padding: 22px; border: 1px solid #d5dfd8; border-radius: 16px; background: #fff; }
.question-card.needs-work { border-color: #d77b61; box-shadow: inset 4px 0 #df4b2f; }
.card-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.question-id { color: #65756d; font: 700 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.review-check { display: inline-flex; align-items: center; gap: 9px; color: #913520; font-weight: 750; }
.review-check input { width: 20px; height: 20px; accent-color: #df4b2f; }
.question-card h2 { max-width: 1040px; margin: 18px 0 12px; font-size: clamp(20px, 2.4vw, 29px); line-height: 1.25; letter-spacing: -.02em; }
.meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.badge { padding: 5px 9px; border-radius: 999px; background: #edf3ef; color: #35614f; font-size: 12px; font-weight: 700; }
.badge.generated { background: #fff0cf; color: #845700; }
.badge.resolved { background: #dff4e8; color: #0b6b49; }
.explanation { margin: 0 0 16px; color: #56665e; line-height: 1.5; }
details { margin: 10px 0 18px; }
summary { color: #146b50; cursor: pointer; font-weight: 700; }
.programs { margin: 10px 0 0; padding-left: 20px; color: #52625a; line-height: 1.5; }
.programs a { color: #10634a; }
.comment-label { display: grid; gap: 8px; font-weight: 750; }
.comment-label textarea { min-height: 90px; resize: vertical; padding: 12px 14px; border: 1px solid #cfd9d2; border-radius: 10px; line-height: 1.45; }
.comment-label textarea:focus, .toolbar input:focus, .toolbar select:focus { outline: 3px solid rgba(19, 114, 85, .16); border-color: #137255; }
.empty { padding: 50px 24px; border: 1px dashed #c7d2ca; border-radius: 16px; text-align: center; color: #65756d; background: #fff; }

.question-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #d7e0da;
  border-radius: 14px;
  background: #fff;
}
.question-navigation button { min-height: 48px; padding: 11px 16px; border: 1px solid #126c50; border-radius: 10px; color: #155b47; background: #fff; font-weight: 750; }
.question-navigation button:last-child { justify-self: end; color: #fff; background: #126c50; }
.question-navigation button:disabled, .actions button:disabled { cursor: default; opacity: .4; }
.question-navigation strong { color: #52625a; text-align: center; }

@media (max-width: 900px) {
  main { width: min(100% - 28px, 1320px); padding-top: 34px; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
  #saveStatus { width: 100%; margin-left: 0; }
}

@media (max-width: 560px) {
  .review-header { padding: 12px 14px; }
  .toolbar { grid-template-columns: 1fr; }
  .search { grid-column: auto; }
  .card-top { align-items: center; }
  .review-check { font-size: 14px; }
  .question-card { padding: 17px; }
  .question-navigation { grid-template-columns: 1fr 1fr; }
  .question-navigation strong { grid-column: 1 / -1; grid-row: 1; }
}
