/* Solving Forces, Universal Thinking Spaces
   Colours taken from the process card. */

:root {
  --cream: #fef5e4;
  --cream-deep: #f6e9d0;
  --ink: #1a1a1a;
  --ink-soft: #5c5751;
  --blue: #1e9cbd;
  --blue-deep: #177f9a;
  --purple: #823e98;
  --orange: #f26722;
  --green: #0bb259;
  --yellow: #fdb71a;
  --bar-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

/* ---------- Menu ---------- */

body.menu {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 28px) calc(var(--safe-right) + 20px) calc(var(--safe-bottom) + 20px) calc(var(--safe-left) + 20px);
}

.menu-header {
  text-align: center;
  margin-bottom: 28px;
}

.menu-logo {
  display: block;
  width: 64px;
  height: auto;
  margin: 0 auto 10px;
}

.menu-brand {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.menu-brand span { font-weight: 400; }

.menu-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.menu-button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 14px 14px;
  background: #fff;
  border: 2px solid var(--blue);
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(30, 156, 189, 0.14);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.menu-button:active {
  transform: scale(0.985);
  box-shadow: 0 2px 6px rgba(30, 156, 189, 0.18);
}

.menu-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 68px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid var(--cream-deep);
  background: var(--cream);
}

.menu-thumb--top { object-position: 50% 12%; }

.menu-label {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.menu-label strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
}
.menu-label small {
  font-size: 14px;
  color: var(--ink-soft);
}

.menu-arrow {
  flex: 0 0 auto;
  font-size: 34px;
  line-height: 1;
  color: var(--blue);
  padding-bottom: 4px;
}

.call-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  margin: 24px auto 0;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 18px;
  background: var(--blue);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(30, 156, 189, 0.22);
  transition: transform 0.1s ease, background 0.1s ease;
}
.call-button:active {
  transform: scale(0.985);
  background: var(--blue-deep);
}
.call-icon { flex: 0 0 auto; }

.menu-footer {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}
.menu-footer p { margin: 0; }

/* ---------- Page with image viewer ---------- */

body.page {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  overscroll-behavior: none;
}

.page-bar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: calc(var(--bar-height) + var(--safe-top));
  padding: var(--safe-top) calc(var(--safe-right) + 8px) 0 calc(var(--safe-left) + 8px);
  background: var(--cream);
  border-bottom: 1px solid var(--cream-deep);
  z-index: 2;
}

.back-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 0 14px 0 8px;
  border-radius: 22px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.back-button:active { background: var(--blue-deep); }
.back-chevron {
  font-size: 30px;
  line-height: 1;
  padding-bottom: 4px;
}

.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.page-switch {
  justify-self: end;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--blue);
}

.viewer {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  background: var(--cream);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.viewer.is-dragging { cursor: grabbing; }

.viewer-image {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  max-width: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

.viewer-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.72);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.viewer-hint.is-hidden { opacity: 0; }

@media (orientation: landscape) and (max-height: 500px) {
  :root { --bar-height: 44px; }
  .viewer-hint { display: none; }
}

/* ---------- Question of the Day ---------- */

body.form {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.form-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 24px calc(var(--safe-right) + 20px) calc(var(--safe-bottom) + 32px) calc(var(--safe-left) + 20px);
}

.form-kicker {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
}

.form-question {
  margin: 0 0 24px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 800;
}

.form-label {
  display: block;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}

.form-input {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  padding: 12px 14px;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--cream-deep);
  border-radius: 12px;
  outline: none;
}
.form-input:focus { border-color: var(--blue); }
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.4; }

.send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin: 8px 0 0;
  padding: 0 20px;
  border-radius: 18px;
  background: var(--green);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(11, 178, 89, 0.22);
  transition: transform 0.1s ease, opacity 0.1s ease;
}
.send-button:active { transform: scale(0.985); }
.send-button.is-disabled { opacity: 0.45; pointer-events: none; }
.send-button--secondary {
  margin-top: 12px;
  min-height: 48px;
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  box-shadow: none;
  font-size: 16px;
}

.form-note {
  margin: 22px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* menu tile without a picture */
.menu-glyph {
  flex: 0 0 auto;
  width: 96px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 40px;
  font-weight: 800;
}

/* question cards */
.q-card {
  margin: 0 0 22px;
  padding: 18px 16px 16px;
  background: #fff;
  border: 2px solid var(--cream-deep);
  border-radius: 18px;
}
.q-card .form-question { font-size: 22px; margin-bottom: 14px; }
.q-card .form-input { margin-bottom: 12px; background: var(--cream); }
.q-card .send-button { min-height: 50px; font-size: 17px; }
.q-card .send-button--secondary { min-height: 44px; font-size: 15px; margin-top: 10px; }
.q-card--answered { border-color: var(--cream-deep); opacity: 0.85; }
.q-card--answered .form-question { font-size: 19px; }

.q-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.q-divider {
  margin: 28px 0 14px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.q-empty {
  margin: 12px 0 0;
  padding: 20px 16px;
  background: #fff;
  border: 2px solid var(--cream-deep);
  border-radius: 18px;
  font-size: 17px;
  text-align: center;
}

/* multiple choice */
.q-hint { margin: -6px 0 10px; font-size: 14px; color: var(--ink-soft); }
.q-options { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.q-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--cream);
  border: 2px solid var(--cream-deep);
  border-radius: 12px;
  cursor: pointer;
}
.q-option input { margin: 3px 0 0; width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--blue); }
.q-option-letter { flex: 0 0 auto; font-weight: 800; color: var(--blue); min-width: 18px; }
.q-option-text { font-size: 16px; line-height: 1.35; }
.q-option:has(input:checked) { border-color: var(--blue); background: #fff; }
.form-textarea--short { min-height: 64px; }

/* learning notes */
.q-card--lesson { background: var(--cream); border-color: var(--blue); }
.form-kicker--lesson { color: var(--purple); }
.q-card--lesson .form-question { font-size: 20px; margin-bottom: 10px; }
.q-lesson-text { margin: 0 0 10px; font-size: 16px; line-height: 1.5; }
.q-lesson-text:last-child { margin-bottom: 0; }
