:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #42504a;
  --paper: #fbf6e8;
  --surface: #fffdf6;
  --panel: #e9f0dc;
  --line: #c9d2bd;
  --accent: #b44923;
  --accent-dark: #7d2d18;
  --green: #2f6b4f;
  --shadow: 0 22px 60px rgba(23, 33, 29, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(180, 73, 35, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 12%, rgba(47, 107, 79, 0.18), transparent 26rem),
    linear-gradient(135deg, #f9efd4 0%, #edf2df 52%, #f7e3c2 100%);
  font-family: Georgia, "Times New Roman", serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf0;
  font-weight: 700;
}

.survey-shell {
  min-height: 100vh;
}

.screen {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
}

.hidden {
  display: none;
}

.hero-card {
  max-width: 920px;
  margin: 6vh auto;
  border: 1px solid rgba(125, 45, 24, 0.24);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 54px);
  background: rgba(255, 253, 246, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font: 700 12px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.04;
}

.hero-card h1 {
  max-width: 760px;
  font-size: clamp(38px, 7vw, 76px);
  letter-spacing: -0.045em;
}

.lede {
  max-width: 720px;
  margin: 18px 0 0;
  color: #38443f;
  font-size: 20px;
  line-height: 1.45;
}

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rubric-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(233, 240, 220, 0.72);
}

.rubric-card h2 {
  font-size: 20px;
}

.rubric-card p,
.fine-print,
.muted {
  color: var(--muted);
  line-height: 1.45;
}

.block-summary {
  display: inline-block;
  margin: 18px 0 0;
  border: 1px solid rgba(47, 107, 79, 0.22);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(233, 240, 220, 0.72);
  color: var(--green);
  font-weight: 700;
}

.participant-form,
.rating-form {
  display: grid;
  gap: 16px;
}

.participant-form {
  max-width: 680px;
}

.tutorial-card {
  max-width: 1120px;
  margin: 2vh auto;
  min-height: min(920px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.tutorial-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 14px;
  min-height: 0;
}

.tutorial-video-sticky,
.tutorial-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 246, 0.92);
}

.tutorial-video-sticky {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.tutorial-video-sticky h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.tutorial-video-sticky video {
  width: min(100%, 400px);
  margin: 0 auto;
  aspect-ratio: 25 / 36;
  object-fit: cover;
  object-position: center center;
}

.tutorial-panel {
  min-height: 0;
  display: grid;
  align-items: center;
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
}

.tutorial-category {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
}

.tutorial-category.single-step {
  align-items: start;
  padding: 0;
}

.tutorial-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fffaf0;
  font-weight: 700;
}

.tutorial-category h2 {
  font-size: 22px;
}

.tutorial-category h1,
.tutorial-copy h1,
.tutorial-single h1 {
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.04em;
}

.tutorial-category p {
  margin: 8px 0 0;
  color: #27332e;
  line-height: 1.45;
}

.tutorial-definition,
.tutorial-copy p {
  color: #35413c;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.45;
}

.tutorial-single {
  display: grid;
  gap: 22px;
}

.tutorial-ready-note {
  border: 1px solid rgba(180, 73, 35, 0.28);
  border-radius: 18px;
  padding: 18px;
  background: rgba(180, 73, 35, 0.08);
  color: #4b342c;
  font-size: 18px;
  line-height: 1.45;
}

.example-box {
  margin-top: 18px;
  border: 1px solid rgba(47, 107, 79, 0.24);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 253, 246, 0.74);
}

.example-box strong {
  color: var(--green);
}

.example-box p {
  margin: 7px 0 0;
  color: #3d4a45;
  font-size: 16px;
  line-height: 1.42;
}

.tutorial-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  align-self: end;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.checkbox-label input {
  width: auto;
  margin-top: 3px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  background: rgba(255, 253, 246, 0.88);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.survey-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 320px);
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.survey-topbar h1 {
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: -0.035em;
}

.progress-wrap {
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.65);
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 180ms ease;
}

.rating-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(520px, 1.18fr);
  gap: 22px;
  align-items: start;
}

.video-card,
.rating-form {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: rgba(255, 253, 246, 0.88);
  box-shadow: var(--shadow);
}

video {
  width: min(100%, 420px);
  margin: 0 auto;
  aspect-ratio: 25 / 36;
  display: block;
  border-radius: 16px;
  background: #111;
  object-fit: cover;
  object-position: center center;
}

.watch-status,
.nav-row,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.watch-status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.rating-form {
  min-height: 580px;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
}

.rating-form.review-mode {
  min-height: auto;
  grid-template-rows: auto auto auto auto auto;
}

.review-mode .rating-step-head {
  padding-bottom: 10px;
}

.review-mode .rating-step-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.review-mode .rating-step-head p:not(.eyebrow) {
  margin-top: 4px;
  font-size: 14px;
}

.shortcut-bar {
  border: 1px solid rgba(180, 73, 35, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(180, 73, 35, 0.08);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.rubric-grid {
  display: block;
}

.rating-step-card,
.rating-review {
  min-height: 400px;
  display: grid;
  align-content: start;
}

.rating-review {
  min-height: auto;
}

.rating-step-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.rating-step-head h2 {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 54px);
  letter-spacing: -0.035em;
}

.rating-step-head p:not(.eyebrow) {
  margin: 10px 0 0;
  color: #27332e;
  font-size: 18px;
  line-height: 1.45;
}

.score-row-large {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}

.score-key {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  text-align: left;
}

.score-key.active {
  border-color: var(--green);
  background: #dfeede;
  box-shadow: inset 0 0 0 2px rgba(47, 107, 79, 0.18);
}

.keycap {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font: 800 20px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.keyboard-hint {
  margin: 14px 0 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-radius: 12px;
  padding: 8px 9px;
  text-align: left;
}

.review-row strong {
  font-size: 13px;
  line-height: 1.15;
}

.review-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.review-row b {
  min-width: 44px;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--green);
  color: #fff;
  text-align: center;
}

.review-row em {
  display: none;
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 700;
}

.review-mode label {
  gap: 4px;
  font-size: 13px;
}

.review-mode textarea {
  min-height: 38px;
  padding: 8px 10px;
}

.hidden-field {
  display: none;
}

.score-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.score-option span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
}

.score-option input:checked + span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font: 700 11px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
  text-transform: uppercase;
}

.anchor-list {
  list-style: none;
  counter-reset: anchor;
  margin: 12px 0 0;
  padding-left: 0;
  color: #303d38;
  font-size: 13px;
  line-height: 1.35;
}

.anchor-list li {
  counter-increment: anchor;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
}

.anchor-list li::before {
  content: counter(anchor) ".";
  font-weight: 700;
  color: var(--accent-dark);
}

.anchor-list li + li {
  margin-top: 4px;
}

.full-width {
  grid-column: 1 / -1;
}

.form-warning {
  min-height: 20px;
  color: var(--accent-dark);
  font-weight: 700;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.summary-stats article {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--panel);
}

.summary-stats strong {
  display: block;
  font-size: 28px;
}

.completion-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 700;
}

@media (max-width: 920px) {
  .survey-topbar,
  .rating-layout,
  .tutorial-layout,
  .rubric-grid,
  .summary-stats {
    grid-template-columns: 1fr;
  }

  .tutorial-panel {
    min-height: auto;
    overflow: visible;
  }

  .tutorial-card {
    min-height: auto;
  }

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