:root {
  color-scheme: light;
  --paper: #f6f4ed;
  --ink: #172e26;
  --muted: #4e5d53;
  --line: #dedcd0;
  --gold: #f0d6a2;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }

.site-header {
  min-height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand, .header-link { color: var(--ink); text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 1.2rem; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #cbbb98; border-radius: 50%; color: #775319; }
.header-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 600; }
.header-link:hover { text-decoration: underline; text-underline-offset: 5px; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 455px;
  display: flex;
  align-items: center;
  border-radius: 29px;
  background: #102820;
  color: #fff9ed;
}

.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { z-index: -2; object-fit: cover; object-position: center 57%; }
.hero::after { content: ""; z-index: -1; background: linear-gradient(90deg, #0a221cf2 0%, #0a221cce 34%, #0a221c19 70%, transparent); }
.hero-copy { padding: 48px clamp(28px, 5.5vw, 78px); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(2.5rem, 5.1vw, 4.75rem); line-height: 1.04; letter-spacing: -.045em; }
h1 em { color: var(--gold); }
.hero-copy p { margin-top: 23px; color: #f1e9d9; font-size: 1.07rem; line-height: 1.55; }

.button {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  padding: 12px 23px;
  border: 0;
  border-radius: 9px;
  font: 650 .93rem/1.3 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease;
}

.hero-button { margin-top: 28px; background: var(--gold); color: #23352a; }
.hero-button:hover { background: #ffe6b4; }
:focus-visible { outline: 3px solid #916529; outline-offset: 4px; }
.hero-button:focus-visible { outline-color: #fff1d2; }

.workbook { margin-top: 54px; scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px 24px; margin-bottom: 23px; }
h2 { font-size: clamp(1.95rem, 4vw, 2.65rem); letter-spacing: -.03em; line-height: 1.12; }
.section-heading p { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.section-heading .progress { margin: 0; white-space: nowrap; border: 1px solid #d6ded0; background: #e8ede3; padding: 7px 13px; border-radius: 24px; color: #324e40; font-size: .875rem; }
.questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }

.question {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fffdf8;
  box-shadow: 0 4px 16px #273c2506;
}

.question-heading { display: flex; align-items: center; gap: 14px; }
.question-heading img { flex: 0 0 auto; object-fit: cover; border: 1px solid #d5bd8a; border-radius: 50%; }
h3 { font-size: 1.55rem; line-height: 1.12; }
.question p { color: #39473e; line-height: 1.55; }
textarea {
  width: 100%;
  min-height: 102px;
  margin-top: auto;
  padding: 12px 14px;
  resize: vertical;
  border: 1px solid #d9d7ca;
  border-radius: 10px;
  background: #f9f8f2;
  color: var(--ink);
  font: 1rem/1.5 var(--sans);
}
textarea::placeholder { color: #5f6b61; opacity: 1; }
textarea:focus { border-color: #728c73; background: #fffefa; }

.submit-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 25px;
  margin-top: 18px;
  padding: 21px 23px;
  border: 1px solid #d8dfd3;
  border-radius: 17px;
  background: #eaf0e6;
}

.submit-panel > p:first-child { max-width: 540px; color: #364c40; font-size: .925rem; line-height: 1.55; }
.submit-button { background: #214e3b; color: #fffdf5; }
.submit-button:hover { background: #173c2d; }
.submit-button:disabled { opacity: .7; cursor: default; }
.status { grid-column: 1 / -1; font-size: .95rem; line-height: 1.5; }
.status:empty { display: none; }
.status[data-kind="error"] { color: #852e23; }
.status[data-kind="success"] { color: #234f39; font-weight: 650; }
.noscript { margin-bottom: 14px; color: #852e23; }
.site-footer { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 30px 0 33px; color: #526158; font: italic 1.04rem var(--serif); }
.site-footer span { color: #775319; }

@media (max-width: 750px) {
  .shell { width: calc(100% - 34px); }
  .hero { min-height: 395px; border-radius: 22px; }
  .hero-image { object-position: 62% center; }
  .hero::after { background: linear-gradient(90deg, #0a221cf2, #0a221c82 68%, #0a221c24); }
  .workbook { margin-top: 38px; }
  .section-heading { align-items: start; flex-direction: column; }
  .questions { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 440px) {
  .site-header { min-height: 63px; }
  .brand { font-size: 1rem; gap: 7px; }
  .header-link { font-size: .85rem; }
  .hero { min-height: 0; padding-top: 159px; }
  .hero-copy { width: 100%; padding: 23px 20px 27px; }
  .hero-image { height: 244px; object-position: 65% 61%; }
  .hero::after { background: linear-gradient(0deg, #102820 38%, #10282000 80%); }
  h1 { font-size: clamp(1.82rem, 8.5vw, 2.35rem); }
  .hero-copy p { margin-top: 15px; }
  .hero-button { margin-top: 19px; }
  .question, .submit-panel { padding: 17px; }
  .submit-panel { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
