:root {
  --ground: #f2f3ef;
  --paper: #ffffff;
  --ink: #17211f;
  --ink-2: #4c5956;
  --line: #d3d9d4;
  --accent: #1e5a55;
  --warn: #8a2f2f;
  --warn-bg: #fbeceb;
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--accent); }

/* ---------- Consent / error pages ---------- */

.sheet {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.sheet.narrow { max-width: 620px; padding-top: 64px; }

.draft-note {
  background: #fff6e0;
  border: 1px solid #e3c98a;
  color: #6b4a08;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  margin: 0 0 24px;
}

.page-head { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-head h1 { font-size: 26px; line-height: 1.3; margin: 8px 0 0; }
.lead { color: var(--ink-2); margin: 14px 0 0; }
.meta { color: var(--ink-2); font-size: 13px; margin: 10px 0 0; }

.errors {
  margin: 24px 0 0;
  padding: 14px 18px;
  background: var(--warn-bg);
  border: 1px solid #e0b3b0;
  border-radius: 4px;
  color: var(--warn);
}
.errors h2 { font-size: 15px; margin: 0 0 8px; }
.errors ul { margin: 0; padding-left: 20px; }

.loi {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px 26px;
  margin: 28px 0 0;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 15px;
}
.loi h2 { font-size: 20px; margin: 0 0 16px; }
.loi h3 { font-size: 15px; margin: 22px 0 6px; }
.loi p, .loi li { color: var(--ink-2); }
.loi .loi-signature { margin-top: 28px; color: var(--ink); }

.form { margin-top: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.req {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warn);
  margin-left: 6px;
}
.field input[type="text"],
.field input[type="email"],
.field select {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.consents {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  padding: 18px 20px;
  margin: 28px 0 0;
}
.consents legend { font-size: 13px; font-weight: 600; color: var(--warn); padding: 0 6px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: 14.5px; }
.check:last-child { margin-bottom: 0; }
.check input { margin-top: 6px; flex: none; width: 18px; height: 18px; }
/* the checkbox rows sit in .field wrappers so they can carry an inline error */
.field.check-field { margin-bottom: 16px; }
.field.check-field:last-of-type { margin-bottom: 0; }
.field label.check { display: flex; font-size: 14.5px; font-weight: 400; margin-bottom: 0; }

/* inline field-level validation */
.field.field--error input,
.field.field--error select { border-color: #b42318; box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12); }
.field-error { color: #b42318; font-size: .9rem; margin: .35rem 0 0; }
.field--error .check-row {
  border-left: 3px solid #b42318;
  padding-left: 12px;
  margin-left: -15px;
}
.field--error .check-row input { box-shadow: none; accent-color: #b42318; }

.submit {
  margin-top: 28px;
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.submit:hover { background: #17443f; }

/* ---------- Watch page ---------- */

.page-watch {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  background: #101614;
  color: #e8ece7;
}

.topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  background: #0b100f;
  border-bottom: 1px solid #253330;
  font-size: 13px;
}
.topbar-left { display: flex; flex-direction: column; min-width: 0; }
.topbar-left strong { font-weight: 600; }
.viewer { color: #9db0ab; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { margin: 0; }
.leave {
  font-family: inherit;
  font-size: 13px;
  padding: 7px 16px;
  color: #e8ece7;
  background: transparent;
  border: 1px solid #3a4c48;
  border-radius: 4px;
  cursor: pointer;
}
.leave:hover { background: #1a2523; }

.watch-intro, .watch-hint {
  flex: none;
  margin: 0;
  padding: 8px 16px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #9db0ab;
}
.watch-hint { padding-bottom: 8px; color: #c2cec9; }

.stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.deck { display: block; width: 100%; height: 100%; min-width: 0; border: 0; background: #edefea; }


/* ---------- Landing / error ---------- */

.page-error h1 { font-size: 22px; margin: 0 0 12px; }
.page-error p { color: var(--ink-2); margin: 0; }

/* Watch page on small screens: give the presentation the whole viewport. */
@media (max-width: 720px) {
  .topbar { padding: 6px 12px; font-size: 12px; }
  .topbar-left strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .watch-intro { display: none; }
  .watch-hint { padding: 4px 12px 6px; font-size: 11.5px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .topbar { padding: 2px 10px; font-size: 11px; }
  .topbar-left strong { display: none; }
  .leave { font-size: 11px; padding: 3px 10px; }
  .watch-intro, .watch-hint { display: none; }
}

.notice { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #b9c9c3; border-radius: 6px; background: #e9f1ee; color: #24403a; font-size: 14px; }

/* Submit button disabled while the LOI gate is closed. */
.submit[disabled] {
  background: #9aa5a3;
  cursor: not-allowed;
}
.submit[disabled]:hover { background: #9aa5a3; }

.submit-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: #8a2f2f;
}
