:root {
  color-scheme: light;
  --ink: #27281f;
  --muted: #68675c;
  --paper: #f7f0e4;
  --paper-deep: #ecdfce;
  --red: #d9232e;
  --red-dark: #ad1721;
  --line: #d5c6b3;
  --white: #fffdf8;
  font-family: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  border-bottom: 4px solid var(--red);
  background: var(--ink);
  color: var(--white);
}

.header-inner {
  width: min(100% - 32px, 760px);
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  width: 58px;
  height: 68px;
  object-fit: contain;
  background: var(--white);
}

.header-inner p {
  margin: 0;
  font: 700 1rem/1.2 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 38px 0 64px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red-dark);
  font: 800 0.82rem/1.2 system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.notice {
  margin: -10px 0 24px;
  padding: 12px 14px;
  border-left: 4px solid var(--red);
  background: #fff2f0;
  color: #6d151b;
  font: 600 0.95rem/1.45 system-ui, sans-serif;
}

.notice.warning {
  border-color: #a56400;
  background: #fff7dc;
  color: #5b3a00;
}

.progress-panel {
  margin: 24px 0 20px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper-deep);
  font-family: system-ui, sans-serif;
}

progress {
  width: 100%;
  height: 12px;
  margin-top: 12px;
  accent-color: var(--red);
}

.review-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 16px 40px rgb(57 45 30 / 10%);
}

.review-photo {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  background: var(--paper-deep);
}

.card-body {
  padding: clamp(22px, 5vw, 38px);
}

.current-caption {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-left: 4px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  line-height: 1.45;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 14px;
  font-size: 1.35rem;
  font-weight: 700;
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 2px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font: 700 1rem/1.3 system-ui, sans-serif;
}

.choice:has(input:checked) {
  border-color: var(--red);
  background: #fff2f0;
}

.choice input {
  width: 22px;
  height: 22px;
  accent-color: var(--red);
}

.comment-label {
  display: block;
  margin-top: 24px;
  font: 700 1rem/1.3 system-ui, sans-serif;
}

.comment-label span {
  color: var(--muted);
  font-weight: 400;
}

textarea {
  width: 100%;
  min-height: 100px;
  margin-top: 9px;
  padding: 12px;
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--ink);
  resize: vertical;
}

.button {
  width: 100%;
  min-height: 54px;
  margin-top: 22px;
  padding: 13px 18px;
  border: 2px solid var(--red);
  background: var(--red);
  color: white;
  cursor: pointer;
  font: 800 1rem/1.2 system-ui, sans-serif;
}

.button:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
}

.button.secondary {
  background: transparent;
  color: var(--red-dark);
}

.button:focus-visible,
.nav-button:focus-visible,
.choice:focus-within,
textarea:focus-visible,
h1:focus-visible,
h2:focus-visible {
  outline: 4px solid #f3b100;
  outline-offset: 3px;
}

.error {
  margin: 16px 0 0;
  color: #8b1018;
  font: 700 0.95rem/1.4 system-ui, sans-serif;
}

.saved-answer {
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.saved-answer h2,
.completion h2 {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.1;
}

.saved-answer p {
  margin: 14px 0 0;
  font: 600 1rem/1.45 system-ui, sans-serif;
}

.saved-answer .saved-comment {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 400;
}

.review-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 22px 0 0;
  font: 700 0.85rem/1.2 system-ui, sans-serif;
  text-align: center;
}

.nav-button {
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.nav-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.completion {
  margin-top: 42px;
  padding: clamp(22px, 5vw, 38px);
  border: 4px solid var(--ink);
  background: var(--white);
}

.completion > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

.export-preview {
  max-height: 330px;
  overflow: auto;
  margin: 22px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.loading,
noscript {
  font: 600 1rem/1.5 system-ui, sans-serif;
}

@media (max-width: 480px) {
  .page,
  .header-inner {
    width: min(100% - 24px, 760px);
  }

  .page {
    padding-top: 28px;
  }

  .review-photo {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .review-navigation {
    grid-template-columns: 1fr 1fr;
  }

  .review-navigation span {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .review-navigation .nav-button {
    grid-row: 2;
  }
}
