/* Simple, high-contrast, large-print layout — designed for an elderly,
   non-technical reviewer. No dark mode, no animation, no clutter. */

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f0;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 32px 16px;
}

.progress {
  font-size: 20px;
  color: #666;
  margin-bottom: 24px;
}

.card {
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.prompt {
  font-size: 30px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 32px 0;
}

/* Shown only for near-tie clusters, where the preselected default is a coin
   flip rather than a strong signal. Pulled up under the prompt so it reads as
   part of the question. */
.hint {
  font-size: 21px;
  text-align: center;
  color: #8a6d00;
  margin: -20px 0 28px 0;
}

.options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.options--other {
  margin-top: 18px;
}

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 30px;
  font-family: inherit;
  padding: 22px 34px;
  border-radius: 14px;
  border: 3px solid #cfcfc7;
  background: #fbfbf8;
  color: #1a1a1a;
  cursor: pointer;
  min-width: 140px;
}

.option:hover {
  border-color: #999;
}

.option--other {
  color: #555;
}

/* The untouched default: deliberately provisional — dashed, slate, not bold.
   It has to read as "we suggest" and never as "already decided", or a wrong
   default gets waved through with a press of Next. Tapping any option snaps
   it to the solid green below, which doubles as confirmation that the tap
   registered. */
.option--suggested {
  border-style: dashed;
  border-color: #7a8794;
  background: #f1f4f6;
}

.option--selected {
  border-color: #2e7d32;
  background: #eaf7ea;
  font-weight: 700;
}

.option--selected.option--other {
  border-color: #8a6d00;
  background: #fbf3d9;
}

/* Fixed width and no wrapping: "Suggested" and "✓ Your choice" differ in
   length, and without this the button would resize as he taps it. */
.badge {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
  color: #2e7d32;
  min-width: 116px;
  white-space: nowrap;
}

.option--suggested .badge {
  color: #56616e;
  font-weight: 600;
}

.badge--hidden {
  visibility: hidden;
}

.option--other .badge {
  color: #8a6d00;
}

.nav {
  width: 100%;
  max-width: 720px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
}

.nav[hidden] {
  display: none;
}

.nav-btn {
  flex: 1;
  font-size: 26px;
  font-family: inherit;
  padding: 20px;
  border-radius: 14px;
  border: 3px solid #cfcfc7;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.nav-btn--primary {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #ffffff;
  font-weight: 700;
}

.card--done {
  text-align: center;
}

.done-message {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

/* Downloads his answers as a file. Present even when the backend is working —
   it is the one control that needs nothing but the browser. */
#saveBtn {
  margin-top: 28px;
  flex: none;
  padding: 16px 32px;
  font-size: 22px;
}

/* Quieter than the Back/Next pair — always available, never competing with the
   action the screen is actually asking for. */
.link-btn {
  margin-top: 20px;
  font-size: 20px;
  font-family: inherit;
  background: none;
  border: none;
  color: #37618a;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px;
}

.link-btn[hidden] {
  display: none;
}

/* ---- the review table ---- */

.review {
  width: 100%;
  max-width: 720px;
}

.review[hidden] {
  display: none;
}

.review-title {
  font-size: 30px;
  margin: 0 0 6px 0;
  text-align: center;
}

.review-progress {
  font-size: 20px;
  color: #666;
  text-align: center;
  margin: 0 0 22px 0;
}

.review-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.review-controls .nav-btn {
  font-size: 20px;
  padding: 14px 18px;
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.review-table th {
  text-align: left;
  font-size: 17px;
  color: #666;
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 2px solid #e6e6df;
}

.review-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #ecece5;
  vertical-align: middle;
}

.review-table tr:last-child td {
  border-bottom: none;
}

/* His answer reads large; the spellings he passed over sit under it in grey,
   which is enough to recognise the word without repeating the whole question. */
.review-choice {
  font-size: 26px;
}

.review-others {
  font-size: 17px;
  color: #8a8a80;
  margin-top: 4px;
}

.review-state,
.review-action {
  width: 1%;
  white-space: nowrap;
}

.pill {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}

.pill--yes {
  background: #eaf7ea;
  color: #2e7d32;
}

.pill--no {
  background: #fbf3d9;
  color: #8a6d00;
}

.icon-btn {
  background: none;
  border: 2px solid #cfcfc7;
  border-radius: 10px;
  color: #37618a;
  cursor: pointer;
  padding: 10px;
  line-height: 0;
}

.icon-btn:hover {
  border-color: #999;
}

.review-empty {
  text-align: center;
  color: #666;
  font-size: 20px;
  padding: 28px 18px;
}

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

@media (max-width: 480px) {
  .prompt { font-size: 26px; }
  .option { font-size: 26px; padding: 18px 26px; min-width: 120px; }
  .review-table th, .review-table td { padding: 12px 12px; }
  .review-choice { font-size: 23px; }
  .review-controls .nav-btn { font-size: 18px; }
}
