:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211d;
  background: #f3f0e8;
  font-size: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: #235b48; }
button, input { font: inherit; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem max(1rem, env(safe-area-inset-left));
  background: #173f34;
  color: white;
}
.site-header a { color: white; }
.brand { font-family: Georgia, serif; font-size: 1.45rem; font-weight: 700; text-decoration: none; }
nav { display: flex; align-items: center; gap: 1rem; }
nav form { margin: 0; }
.link-button { border: 0; padding: 0; color: white; background: transparent; text-decoration: underline; cursor: pointer; }

main { width: min(100% - 1.5rem, 48rem); margin: 1.25rem auto 3rem; }
.panel { padding: 1.15rem; border: 1px solid #d5d0c4; border-radius: 1rem; background: #fffdf8; box-shadow: 0 .2rem .9rem rgb(23 63 52 / 8%); }
.narrow { max-width: 30rem; margin-inline: auto; }
.center { text-align: center; }
.eyebrow { margin: 0 0 .35rem; color: #5a6c64; font-size: .8rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, serif; line-height: 1.15; }
h1 { margin: .2rem 0 1rem; }

.stack { display: grid; gap: .85rem; }
input[type="email"], input[type="text"] { width: 100%; min-height: 3rem; padding: .7rem .8rem; border: 1px solid #8f9b95; border-radius: .55rem; background: white; }
.primary { min-height: 3rem; padding: .7rem 1rem; border: 0; border-radius: .65rem; color: white; background: #1f6a50; font-weight: 800; cursor: pointer; }
.primary:hover { background: #174e3c; }
.big { min-height: 3.7rem; font-size: 1.08rem; }

.score { margin: 0 0 1rem auto; width: fit-content; padding: .45rem .8rem; border-radius: 99rem; background: #dcecdf; }
.notice { padding: .8rem 1rem; border-radius: .65rem; }
.success { background: #dcecdf; }
.error { color: #781b1b; background: #f7dcdc; }
.question-card { overflow: hidden; }
.snippet-button { display: block; width: 100%; padding: 0; border: 1px solid #bbb6aa; border-radius: .7rem; overflow: auto; background: #eeeae0; cursor: zoom-in; }
.snippet { display: block; width: 100%; max-height: 18rem; object-fit: contain; image-rendering: auto; }
.snippet-button.zoomed { cursor: zoom-out; }
.snippet-button.zoomed .snippet { width: max(52rem, 180%); max-height: none; max-width: none; }
.hint { margin: .35rem 0 1.1rem; color: #66736d; font-size: .85rem; }
fieldset { display: grid; gap: .6rem; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: .55rem; font-weight: 800; }
.choice, .review-answer { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem; border: 1px solid #d5d0c4; border-radius: .65rem; background: white; cursor: pointer; }
.choice input, .review-answer input { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.write-in { display: grid; gap: .4rem; }
.review-heading { margin-bottom: 1rem; }
.review-card { margin-bottom: 1rem; }
.admin-snippet { border: 1px solid #d5d0c4; border-radius: .5rem; }
.review-answer span { display: grid; gap: .15rem; }
.review-answer small { color: #5a6c64; }

@media (min-width: 42rem) {
  main { margin-top: 2rem; }
  .panel { padding: 1.6rem; }
}

/* --- PWA: iOS install card --- */
.ios-install-card {
  margin: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #c4953e;
  border-radius: 8px;
  background: #f7f1e3;
  font-size: 0.95rem;
}
.ios-install-card p { margin: 0 0 0.5rem; }
