:root {
  color-scheme: light;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  color: #17241f;
  background: #f3efe6;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(198, 222, 208, 0.65), transparent 32rem),
    #f3efe6;
}

button, input, textarea { font: inherit; }

.experience {
  width: min(calc(100% - 2rem), 48rem);
  min-width: 0;
  min-height: 100vh;
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
  display: flex;
  flex-direction: column;
}

.prototype-label {
  margin: 0 0 1rem;
  color: #52625b;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.progress { height: 0.2rem; background: #d9d5cc; border-radius: 999px; overflow: hidden; }
.progress span { display: block; width: 0; height: 100%; background: #286b58; }
.progress.is-gateway { visibility: hidden; }

.scene { flex: 1; padding: clamp(2.5rem, 8vh, 5rem) 0 2rem; }
.scene:focus { outline: none; }

.eyebrow {
  margin: 0 0 0.8rem;
  color: #52625b;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1, h2 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.2rem);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

h2 { font-size: clamp(1.8rem, 5.5vw, 3.15rem); }

.story-copy, .lead {
  max-width: 40rem;
  margin: 1.45rem 0 0;
  color: #405049;
  font-size: clamp(1.04rem, 2.8vw, 1.25rem);
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.story-copy p { margin: 0 0 1.05rem; }
.story-copy p:last-child { margin-bottom: 0; }
.message-line { padding-left: 1rem; color: #273b33; font-family: ui-sans-serif, system-ui, sans-serif; }

.gateway-intro { max-width: 40rem; }
.gateway-prompt { margin: 2.4rem 0 1rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 1.08rem; font-weight: 750; }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.story-card {
  min-width: 0;
  min-height: 10rem;
  padding: 1.2rem;
  border: 1px solid #aeb8b1;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.5);
  color: #17241f;
  text-align: left;
  cursor: pointer;
}
.story-card:hover { border-color: #286b58; background: rgba(224,238,231,0.72); }
.story-card strong { display: block; margin-bottom: 0.7rem; font-size: 1.35rem; }
.story-card span { display: block; color: #405049; line-height: 1.5; }

.recall-card, .aside {
  max-width: 40rem;
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid #9fb9ad;
  background: rgba(255,255,255,0.38);
  color: #33443d;
  font-family: ui-sans-serif, system-ui, sans-serif;
  line-height: 1.55;
}
.recall-label { display: block; margin-bottom: 0.35rem; color: #52625b; font-size: 0.8rem; font-weight: 750; letter-spacing: 0.03em; text-transform: uppercase; }
.recall-card p { margin: 0; }
.recall-card + h2 { margin-top: clamp(1.5rem, 3vh, 2rem); }

fieldset { min-width: 0; margin: 2rem 0 0; padding: 0; border: 0; }
legend { margin-bottom: 0.8rem; font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 750; }
.choices { display: grid; gap: 0.65rem; }
.choice { position: relative; display: block; }
.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.choice span {
  display: block;
  min-height: 3.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid #b9c0b9;
  border-radius: 0.65rem;
  background: rgba(255,255,255,0.5);
  color: #26362f;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, sans-serif;
  line-height: 1.42;
}
.choice span:hover { border-color: #6d897d; background: rgba(255,255,255,0.78); }
.choice input:checked + span { border: 2px solid #286b58; padding: calc(0.9rem - 1px) calc(1rem - 1px); background: #dfeee7; }
.choice input:focus-visible + span, button:focus-visible, textarea:focus-visible { outline: 3px solid #b85c22; outline-offset: 3px; }

.custom-response, .text-response { max-width: 40rem; margin-top: 1rem; }
.custom-response[hidden] { display: none; }
.custom-response label, .text-response label { display: block; margin-bottom: 0.5rem; color: #33443d; font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 750; }
.text-response label span { color: #64726c; font-weight: 500; }
textarea { display: block; width: 100%; min-height: 7rem; resize: vertical; padding: 0.85rem 0.95rem; border: 1px solid #9da9a2; border-radius: 0.5rem; background: rgba(255,255,255,0.7); color: #17241f; line-height: 1.5; }

.notebook {
  max-width: 40rem;
  margin-top: 1.75rem;
  padding: clamp(1.25rem, 5vw, 2.2rem);
  border: 1px solid #c9c2b5;
  border-radius: 0.4rem;
  background: repeating-linear-gradient(#fffdf7 0, #fffdf7 2rem, #dce4df 2.04rem, #fffdf7 2.08rem);
  box-shadow: 0 0.8rem 2rem rgba(46,52,47,0.08);
}
.notebook p { margin: 0 0 1rem; color: #405049; font-size: 1.05rem; line-height: 1.55; }
.notebook .written-question { margin: 1.1rem 0 1.5rem; color: #17241f; font-size: clamp(1.4rem, 5vw, 2.2rem); font-style: italic; line-height: 1.2; }
.notebook .written-question:last-child { margin-bottom: 0; }
.story-end-marker { max-width: 40rem; margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid #9fb9ad; color: #52625b; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase; }

.record-list { max-width: 40rem; margin-top: 2.25rem; border-top: 1px solid #c9cec8; }
.record-item { padding: 1.2rem 0; border-bottom: 1px solid #d6d7d1; }
.record-label { margin: 0; color: #52625b; font-family: ui-sans-serif, system-ui, sans-serif; line-height: 1.5; }
.record-item blockquote, .recall-card blockquote, .unanswered blockquote { margin: 0.65rem 0 0; color: #17241f; font-size: clamp(1.12rem, 3vw, 1.38rem); line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.unanswered { max-width: 40rem; margin-top: 2.5rem; padding: 1.25rem; border: 1px solid #9fb9ad; border-radius: 0.5rem; background: rgba(224,238,231,0.55); }
.unanswered h2 { font-size: clamp(1.55rem, 5vw, 2.35rem); }
.unanswered p { margin: 1rem 0 0; color: #405049; line-height: 1.55; }

.doorway { align-self: center; width: 100%; padding-block: clamp(2rem, 10vh, 6rem); }
.doorway .story-copy { font-size: clamp(1.15rem, 3vw, 1.4rem); }
.doorway-stop { margin-top: 2.5rem; color: #52625b; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.86rem; }
.feedback-action { margin: 1.5rem 0 0; }
.feedback-button { display: inline-flex; min-height: 2.9rem; padding: 0.7rem 1.1rem; align-items: center; justify-content: center; border: 2px solid #174e3f; border-radius: 999px; background: #174e3f; color: white; font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 750; text-decoration: none; }
.feedback-button:hover { border-color: #286b58; background: #286b58; }
.feedback-button:focus-visible { outline: 3px solid #b85c22; outline-offset: 3px; }
.feedback-link { color: #174e3f; font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 750; text-underline-offset: 0.2em; }
.feedback-link:hover { color: #286b58; }
.feedback-link:focus-visible { outline: 3px solid #b85c22; outline-offset: 3px; }

.controls { display: flex; gap: 0.75rem; justify-content: flex-end; padding-top: 1rem; border-top: 1px solid #c9cec8; }
.controls[hidden], button[hidden] { display: none; }
button { min-height: 2.9rem; padding: 0.7rem 1.1rem; border: 2px solid #174e3f; border-radius: 999px; background: #174e3f; color: white; cursor: pointer; font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 750; }
button.secondary { margin-right: auto; background: transparent; color: #174e3f; }
.prompt { min-height: 1.4rem; margin: 0.7rem 0 0; color: #8b2f24; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.9rem; text-align: right; }

@media (min-width: 42rem) { .experience { padding-top: 2rem; } .choices.two-column { grid-template-columns: 1fr 1fr; } }
@media (max-width: 32rem) { .story-grid { grid-template-columns: 1fr; } .story-card { min-height: 0; } .scene { padding-top: 2.2rem; } }
@media (prefers-reduced-motion: no-preference) { .progress span { transition: width 180ms ease-out; } }
