:root {
  --ink: #18211e;
  --muted: #65706b;
  --paper: #f4f1e9;
  --card: #fffdf8;
  --line: #d8d4c9;
  --accent: #d85c36;
  --accent-dark: #a83e20;
  --forest: #234d3c;
  --shadow: 0 18px 48px rgba(35, 44, 39, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
button, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1500px, 100%); margin: auto; min-height: 100vh; padding: 0 28px; }
.topbar { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: var(--forest); font-family: Georgia, serif; }
main { padding: 58px 0 72px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: clamp(26px, 4vw, 56px); }
.hero { max-width: 1050px; margin: 3vh auto; }
.eyebrow { color: var(--accent-dark); text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 800; }
h1 { max-width: 850px; margin: 10px 0 16px; font: clamp(2.4rem, 6vw, 5.4rem)/.98 Georgia, serif; letter-spacing: -.045em; }
.lede { max-width: 760px; color: var(--muted); font-size: 1.1rem; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; }
.info-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 14px; }
.info-grid article > span { color: var(--accent); font: 1.4rem Georgia, serif; }
.info-grid h2 { margin: 12px 0 4px; font-size: 1rem; }
.info-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.consent { display: flex; gap: 13px; padding: 20px; margin: 0 0 22px; background: #f7f3e9; border-radius: 12px; }
.name-entry { display: grid; gap: 8px; max-width: 520px; margin: 0 0 18px; font-weight: 750; }
.consent input { width: 19px; height: 19px; margin-top: 3px; accent-color: var(--forest); }
.primary, .secondary { min-height: 48px; padding: 0 20px; border-radius: 10px; font-weight: 750; border: 1px solid transparent; }
.primary { color: white; background: var(--forest); }
.primary:hover:not(:disabled) { background: #18392c; transform: translateY(-1px); }
.primary:disabled { opacity: .42; cursor: not-allowed; }
.secondary { color: var(--ink); background: transparent; border-color: var(--line); }
.instruction-card { max-width: 1050px; margin: 0 auto 24px; padding: 25px 30px; border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 12px 12px 0; }
.instruction-card h2 { margin: 3px 0 10px; font: 1.5rem Georgia, serif; }
.instruction-card p { max-width: 950px; margin: 8px 0; color: var(--muted); }
.instruction-card .guide-note { margin-top: 18px; color: var(--ink); font-weight: 750; }
.anchors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.anchors span { padding: 10px 12px; background: #f7f3e9; border-radius: 8px; font-size: .82rem; }
.anchors b { color: var(--accent-dark); font-size: 1rem; }
.prompt-card { max-width: 1050px; margin: 0 auto 24px; padding: 22px 28px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.prompt-card p { margin: 0; }
.prompt-card blockquote { margin: 7px 0 0; font: clamp(1.05rem, 2vw, 1.3rem)/1.5 Georgia, serif; }
.image-grid { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 1050px; margin: 0 auto 22px; }
.image-card { overflow: hidden; width: 100%; margin: 0; background: var(--card); border: 2px solid transparent; border-radius: 14px; box-shadow: var(--shadow); }
.image-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #e8e5dd; }
.img-magnifier-wrap { position: relative; display: block; line-height: 0; overflow: visible; }
.img-magnifier-wrap > .img-magnifier-base { display: block; width: 100%; height: auto; vertical-align: top; }
.img-magnifier-lens { display: none; position: absolute; width: 220px; height: 220px; overflow: hidden; pointer-events: none; z-index: 25; border: 2px solid #fff; border-radius: 50%; background: #171b19; box-shadow: 0 0 0 1px #0002, 0 10px 28px #0006; }
.img-magnifier-lens-img { position: absolute; display: block; max-width: none !important; max-height: none !important; pointer-events: none; object-fit: fill; }
.img-magnifier-wrap.is-magnifying .img-magnifier-lens { display: block; }
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .img-magnifier-wrap { cursor: crosshair; }
}
.image-card figcaption { padding: 13px 13px 6px; text-align: center; font-weight: 800; }
.inspect { display: block; width: calc(100% - 26px); margin: 0 13px 13px; }
.rating-block { padding: 0 13px 16px; }
.rating-block > p { margin: 0 0 8px; text-align: center; color: var(--muted); font-size: .82rem; }
.rating-row { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.rating { position: relative; }
.rating input { position: absolute; opacity: 0; }
.rating label { display: grid; min-height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 6px; font-size: .75rem; font-weight: 750; cursor: pointer; }
.rating input:checked + label { color: white; border-color: var(--forest); background: var(--forest); }
.questions { max-width: 980px; margin: auto; }
fieldset { padding: 0 0 28px; margin: 0 0 28px; border: 0; border-bottom: 1px solid var(--line); }
fieldset:last-of-type { border-bottom: 0; }
legend { font: 1.2rem Georgia, serif; font-weight: 700; }
fieldset > p { margin: 4px 0 15px; color: var(--muted); font-size: .9rem; }
.choice-row, .scale-row { display: flex; gap: 10px; }
.choice { position: relative; flex: 1; }
.choice input { position: absolute; opacity: 0; }
.choice label { display: grid; min-height: 48px; place-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 9px; font-weight: 700; cursor: pointer; }
.choice input:checked + label { color: white; border-color: var(--forest); background: var(--forest); }
.viewer { width: min(96vw, 1500px); height: 94vh; padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: #101412; box-shadow: 0 24px 80px #0008; }
.viewer::backdrop { background: #101412dd; }
.viewer-toolbar { height: 58px; display: flex; align-items: center; gap: 18px; padding: 0 14px 0 20px; color: white; background: #1b211e; }
.viewer-toolbar span { color: #aeb8b2; font-size: .85rem; }
.viewer-toolbar button { margin-left: auto; color: white; }
.viewer-canvas { width: 100%; height: calc(94vh - 58px); overflow: auto; }
.viewer-canvas img { display: block; width: auto; max-width: none; height: auto; }
.actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; }
.error { color: #a52b22; font-weight: 700; }
.notice { padding: 12px 15px; color: var(--forest); background: #e5efe8; border-radius: 9px; }
#restart-btn { margin: 0 10px 18px 0; }
.study-contact { margin: 22px 0 0; color: var(--muted); font-size: .82rem; }
.study-contact a { color: inherit; }
.progress-wrap { display: flex; align-items: center; gap: 12px; min-width: 240px; color: var(--muted); font-size: .85rem; }
.progress-track { flex: 1; height: 7px; overflow: hidden; background: #ddd9ce; border-radius: 99px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.form-stack { display: grid; gap: 22px; max-width: 720px; margin: 36px 0; }
.form-stack label { display: grid; gap: 8px; font-weight: 700; }
input[type="text"], select, textarea { width: 100%; padding: 13px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 9px; }
textarea { min-height: 130px; resize: vertical; }
.complete { max-width: 760px; margin: 5vh auto; text-align: center; }
.complete .lede { margin-inline: auto; }
.check { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 22px; color: white; background: var(--forest); border-radius: 50%; font-size: 2rem; }
footer { display: flex; justify-content: space-between; padding: 24px 0; color: var(--muted); border-top: 1px solid var(--line); font-size: .8rem; }
.hidden { display: none !important; }
@media (max-width: 760px) {
  .shell { padding: 0 15px; }
  .topbar { min-height: 70px; }
  main { padding-top: 28px; }
  .info-grid { grid-template-columns: 1fr; }
  .anchors { grid-template-columns: 1fr; }
  .progress-wrap { min-width: 150px; }
  footer { gap: 20px; }
}
