/* MindMount design system
   Museo Sans 300 carries every word; Feather Bold accents headings, the wordmark
   and key numbers. Light mode is the morning sky over the mount, dark mode the
   night sky; every colour below is a token. */

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/NunitoSans.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("/fonts/SourceSerif4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Feather Bold";
  src:
    local("Feather Bold"),
    local("Feather-Bold"),
    url("/fonts/Feather-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* Ground and surfaces */
  --ground: #edf5fc;
  --surface: #ffffff;
  --surface-sunk: #e3eef8;
  --surface-hover: #f4f9fd;
  --line: #d3e2ef;
  --line-strong: #b5cce0;
  /* Text */
  --ink: #10304d;
  --text: #2a4a69;
  --muted: #4c6782;
  /* Lake blue: actions, selection, focus */
  --accent: #22598f;
  --accent-strong: #184677;
  --accent-soft: #dceaf7;
  --on-accent: #ffffff;
  --focus: #22598f;
  /* Sky and sun: illustration and gentle emphasis */
  --sky: #9ccbec;
  --sun: #e8bf6a;
  --sun-soft: #fbf0d8;
  --on-sun-soft: #6b4a12;
  /* Recall states */
  --right: #23704f;
  --right-soft: #e2f1ea;
  --right-line: #a9d5bf;
  --wrong: #9a3b3a;
  --wrong-soft: #f8e7e5;
  --wrong-line: #e5b5b0;
  --blank: #7f9bb6;
  /* Type */
  --font-ui: "Museo Sans", Arial, sans-serif;
  --font-accent: "Feather Bold", Arial, sans-serif;
  --font-scripture: var(--font-ui);
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --title-sm: 1.375rem;
  --title-md: 1.625rem;
  --title-lg: 2.25rem;
  --title-xl: 2.75rem;
  --verse-md: 1.375rem;
  --verse-lg: 1.875rem;
  /* Space, shape, depth */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgb(16 48 77 / 0.06), 0 2px 8px -4px rgb(16 48 77 / 0.1);
  --shadow-md: 0 2px 4px rgb(16 48 77 / 0.05), 0 16px 32px -16px rgb(16 48 77 / 0.24);
  --scrim: rgb(9 24 42 / 0.5);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-height: 0px;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%234c6782' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-ui);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0c1b30;
  --surface: #12253e;
  --surface-sunk: #0f2036;
  --surface-hover: #172d4a;
  --line: #213a5a;
  --line-strong: #2f4d73;
  --ink: #eef5fc;
  --text: #c9dbec;
  --muted: #93abc4;
  --accent: #8ec5ef;
  --accent-strong: #b3d9f6;
  --accent-soft: #1b3655;
  --on-accent: #0b1a2e;
  --focus: #b9dcf7;
  --sky: #2f5a85;
  --sun: #e8bf6a;
  --sun-soft: #352a17;
  --on-sun-soft: #f1d49b;
  --right: #8fd6b3;
  --right-soft: #12322b;
  --right-line: #2c6150;
  --wrong: #f3a9a1;
  --wrong-soft: #3a1f26;
  --wrong-line: #6e3540;
  --blank: #5f7fa1;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3), 0 2px 8px -4px rgb(0 0 0 / 0.4);
  --shadow-md: 0 2px 4px rgb(0 0 0 / 0.25), 0 18px 36px -18px rgb(0 0 0 / 0.6);
  --scrim: rgb(3 10 20 / 0.66);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%2393abc4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Base */
*, *::before, *::after {
  box-sizing: border-box;
  font-weight: 300;
}
html {
  scrollbar-color: var(--line-strong) var(--ground);
  accent-color: var(--accent);
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
  padding-bottom: var(--nav-height);
}
::selection {
  background: var(--accent-soft);
  color: var(--ink);
}
h1, h2, h3, p, dl, dd {
  margin: 0;
}
h1, h2 {
  font-family: var(--font-scripture);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: var(--title-xl);
  line-height: 1.1;
}
h2 {
  font-size: var(--title-md);
  line-height: 1.2;
}
h3 {
  font-size: var(--text-md);
  font-weight: 300;
  line-height: 1.35;
  color: var(--ink);
}
h1:focus {
  outline: none;
}
p {
  text-wrap: pretty;
}
small {
  font-size: var(--text-sm);
}
a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}
svg {
  flex-shrink: 0;
}
img {
  max-width: 100%;
}
button, input, textarea, select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  text-align: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
kbd {
  font-family: var(--font-ui);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: var(--s2);
  left: var(--s2);
  z-index: 200;
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  transform: translateY(calc(-100% - 48px));
}
.skip-link:focus {
  transform: none;
}

/* Scripture voice */
.scripture-text {
  font-family: var(--font-scripture);
  font-size: var(--verse-lg);
  line-height: 1.45;
  color: var(--ink);
  hanging-punctuation: first;
  max-width: 34em;
}
.reference {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--s2);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--accent);
}
.reference span {
  font-weight: 300;
  color: var(--muted);
}
.meta-line {
  margin-top: var(--s1);
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s5);
  border-radius: var(--radius);
  font-size: var(--text-md);
  font-weight: 300;
  line-height: 1.2;
  text-align: center;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.button svg {
  transition: transform 200ms var(--ease-out);
}
.button.primary {
  background: var(--accent);
  color: var(--on-accent);
}
.button.primary:hover:not(:disabled) {
  background: var(--accent-strong);
}
.button.primary:hover:not(:disabled) svg {
  transform: translateX(2px);
}
.button.primary:active:not(:disabled) {
  transform: translateY(1px);
}
.button.primary:disabled {
  background: var(--surface-sunk);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
.button.secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.button.secondary:hover:not(:disabled) {
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.button.secondary:disabled {
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
.button.text {
  min-height: 44px;
  padding: 0 var(--s1);
  color: var(--accent);
  font-weight: 300;
}
.button.text:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.button.text small {
  font-weight: 300;
  color: var(--muted);
}
.button.danger {
  color: var(--wrong);
}
.button.primary.danger {
  background: var(--wrong);
  color: var(--surface);
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
select {
  appearance: none;
  padding-right: 40px;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
textarea {
  display: block;
  min-height: 132px;
  resize: vertical;
  font-family: var(--font-scripture);
  font-size: 1.25rem;
  line-height: 1.5;
}
textarea:disabled {
  background: var(--surface-sunk);
  color: var(--text);
}
input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
}
.input-label {
  display: block;
  margin: var(--s5) 0 var(--s2);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ink);
}
.input-help {
  margin-top: var(--s2);
  font-size: var(--text-sm);
  color: var(--muted);
}
progress {
  appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: var(--line);
  border-radius: 99px;
}
progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 99px;
  transition: width 300ms var(--ease-out);
}
progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 99px;
}
.tabs {
  display: inline-flex;
  gap: var(--s1);
  max-width: 100%;
  padding: var(--s1);
  border-radius: var(--radius);
  background: var(--surface-sunk);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs button {
  flex: none;
  min-height: 40px;
  padding: 0 var(--s4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--muted);
  white-space: nowrap;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.tabs button:hover {
  color: var(--ink);
}
.tabs button.active, .tabs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.tags span {
  padding: var(--s1) var(--s3);
  border-radius: 99px;
  background: var(--surface-sunk);
  font-size: var(--text-xs);
  color: var(--text);
}

/* App frame */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr minmax(0, 640px) 1fr;
  align-items: center;
  gap: var(--s4);
  min-height: 68px;
  padding: var(--s2) var(--s6);
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(10px);
}
.wordmark {
  justify-self: start;
  font-family: var(--font-scripture);
  font-size: 1.625rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span {
  color: var(--sun);
}
.header-progress {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.header-progress span {
  flex: none;
  min-width: 4.5em;
  font-size: var(--text-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.back-button, .modal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
}
.back-button:hover:not(:disabled), .modal-close:hover {
  background: var(--surface-sunk);
}
.back-button:disabled {
  color: var(--line-strong);
}
.profile-control {
  grid-column: 3;
  position: relative;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.account-button {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  padding: 2px 2px 2px var(--s3);
  border-radius: 99px;
  font-size: var(--text-md);
  font-weight: 300;
  color: var(--ink);
}
.account-button:hover {
  background: var(--surface-sunk);
}
.account-button i, .profile-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sun-soft);
  color: var(--on-sun-soft);
}
.profile-control:has(.profile-toggle) .account-button {
  padding-right: var(--s3);
}
.profile-control:has(.profile-toggle) .account-button i {
  display: none;
}
.profile-toggle:hover {
  background: var(--sun);
  color: #3d2a06;
}
.profile-menu {
  position: absolute;
  top: calc(100% + var(--s2));
  right: 0;
  z-index: 60;
  min-width: 248px;
  padding: var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: lift 180ms var(--ease-out);
}
.profile-menu p {
  padding: var(--s2) var(--s3) var(--s3);
  font-size: var(--text-xs);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s1);
}
.profile-menu button {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 44px;
  padding: 0 var(--s3);
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.profile-menu button:hover, .profile-menu button:focus-visible {
  background: var(--surface-sunk);
  outline-offset: -2px;
}
.top-nav {
  display: flex;
  justify-content: center;
  gap: var(--s1);
  padding: 0 var(--s4);
  border-bottom: 1px solid var(--line);
}
.top-nav button {
  position: relative;
  min-height: 52px;
  padding: 0 var(--s4);
  font-size: 0.9375rem;
  color: var(--muted);
}
.top-nav button:hover {
  color: var(--ink);
}
.top-nav button.active {
  color: var(--ink);
  font-weight: 300;
}
.top-nav button.active::after {
  content: "";
  position: absolute;
  left: var(--s4);
  right: var(--s4);
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.bottom-nav {
  display: none;
}
.status-line {
  padding: var(--s2) var(--s5);
  background: var(--sun-soft);
  color: var(--on-sun-soft);
  font-size: var(--text-sm);
  text-align: center;
}
.status-line.quiet {
  display: none;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + var(--s5));
  z-index: 120;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  padding: var(--s3) var(--s5);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--ground);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-md);
  transform: translateX(-50%);
  animation: lift 220ms var(--ease-out);
}
.toast[hidden] {
  display: none;
}
.loading, .boot-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s4);
  min-height: 100dvh;
  padding: var(--s5);
  text-align: center;
}
.loading strong {
  font-family: var(--font-scripture);
  font-size: var(--title-lg);
  font-weight: 300;
  color: var(--ink);
}
.loading p, .boot-error p {
  color: var(--muted);
}

/* Page scaffolding */
.page {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: var(--s7) var(--s6) var(--s8);
  animation: arrive 240ms var(--ease-out);
}
.page-heading {
  margin-bottom: var(--s6);
}
.page-heading p {
  margin-top: var(--s3);
  max-width: 40em;
  font-size: var(--text-lg);
  color: var(--muted);
}
.section-head {
  margin-bottom: var(--s4);
}
.section-head h2 {
  font-size: var(--title-sm);
}
.section-head p {
  margin-top: var(--s1);
  font-size: var(--text-sm);
  color: var(--muted);
}
.quiet-card {
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.quiet-card h2 {
  font-size: var(--title-sm);
}
.quiet-card > p {
  margin-top: var(--s2);
  color: var(--text);
}
.quiet-card .tags {
  margin-top: var(--s4);
}
.quiet-card > .button.text {
  margin-top: var(--s3);
  margin-left: calc(var(--s1) * -1);
}
.subheading {
  margin: var(--s7) 0 var(--s4);
  font-size: var(--title-sm);
}
.footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin-top: var(--s7);
  font-size: var(--text-sm);
  color: var(--muted);
}
.footer-note svg {
  color: var(--accent);
}
.empty-state {
  display: grid;
  justify-items: center;
  gap: var(--s2);
  padding: var(--s7) var(--s5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}
.empty-state svg {
  color: var(--accent);
  margin-bottom: var(--s2);
}
.empty-state h2 {
  font-size: var(--title-sm);
}
.empty-state p {
  max-width: 32em;
  color: var(--muted);
}

/* Today */
.daily-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.sermon-landscape {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 1;
  object-fit: cover;
}
.landscape-night,
[data-theme="dark"] .landscape-day {
  display: none;
}
[data-theme="dark"] .landscape-night {
  display: block;
}
.daily-body {
  padding: var(--s6) var(--s6) var(--s5);
}
.daily-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  margin-bottom: var(--s4);
}
.daily-top h2 {
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: 300;
  letter-spacing: 0;
  color: var(--muted);
}
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s1) var(--s3);
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 300;
}
.daily-card .reference {
  margin-top: var(--s3);
}
.daily-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s5);
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
}
.daily-bottom span {
  font-size: var(--text-sm);
  color: var(--muted);
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: var(--s5) 0 var(--s7);
  padding: var(--s4) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric-row > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  padding: 0 var(--s4);
}
.metric-row > div + div {
  border-left: 1px solid var(--line);
}
.metric-row dt {
  font-size: var(--text-xs);
  color: var(--muted);
}
.metric-row dd {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.metric-row dd svg {
  color: var(--accent);
}
.metric-row dd small {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* The five-level ascent: steps rise like the mount */
.ascent {
  margin-bottom: var(--s7);
}
.ascent-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: var(--s2);
  padding-bottom: var(--s1);
  border-bottom: 2px solid var(--line-strong);
}
.ascent-step {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s3) var(--s3) var(--s3);
  border-radius: var(--radius) var(--radius) var(--s1) var(--s1);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  transition: background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), color 180ms var(--ease-out);
}
.ascent-step:nth-child(1) { min-height: 76px; }
.ascent-step:nth-child(2) { min-height: 92px; }
.ascent-step:nth-child(3) { min-height: 108px; }
.ascent-step:nth-child(4) { min-height: 124px; }
.ascent-step:nth-child(5) { min-height: 140px; }
.ascent-step:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--surface-hover);
}
.ascent-number {
  font-family: var(--font-scripture);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
}
.ascent-name {
  font-size: var(--text-sm);
  font-weight: 300;
  line-height: 1.3;
  color: var(--ink);
}
.ascent-step[aria-pressed="true"] {
  background: var(--accent);
  box-shadow: none;
}
.ascent-step[aria-pressed="true"] .ascent-number,
.ascent-step[aria-pressed="true"] .ascent-name {
  color: var(--on-accent);
}
.ascent-detail {
  margin-top: var(--s3);
  font-size: var(--text-sm);
  color: var(--text);
}
.ascent-detail strong {
  font-weight: 300;
  color: var(--ink);
}

.narration-track {
  margin-bottom: var(--s6);
}
.narration-track audio {
  display: block;
  width: 100%;
  height: 48px;
  border-radius: 99px;
}
.two-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s5);
}

/* Practice */
.practice-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--s3) var(--s5);
  margin-bottom: var(--s6);
}
.practice-toolbar label {
  display: grid;
  gap: var(--s2);
  flex: 1 1 320px;
  max-width: 440px;
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ink);
}
.mode-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s6) var(--s5);
}
.mode-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.mode-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  min-height: 72px;
  padding: var(--s3) var(--s4);
  color: var(--muted);
  transition: background-color 160ms var(--ease-out);
}
.mode-card + .mode-card {
  border-top: 1px solid var(--line);
}
.mode-card:hover {
  background: var(--surface-hover);
}
.mode-card:hover > svg {
  color: var(--accent);
  transform: translateX(2px);
}
.mode-card > svg {
  transition: transform 200ms var(--ease-out);
}
.mode-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}
.mode-text p {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Lists of verses, sections and words */
.verse-list, .weak-words, .section-list, .path-sections, .history {
  overflow: hidden;
  margin-top: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.verse-list > button, .weak-words > button, .section-list > button, .path-sections > button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  padding: var(--s4) var(--s5);
  color: var(--muted);
  transition: background-color 160ms var(--ease-out);
}
.verse-list > button + button, .weak-words > button + button, .section-list > button + button, .path-sections > button + button, .history > div + div {
  border-top: 1px solid var(--line);
}
.verse-list > button:hover, .weak-words > button:hover, .section-list > button:hover, .path-sections > button:hover {
  background: var(--surface-hover);
}
.verse-list strong, .section-list strong, .path-sections strong {
  display: block;
  font-weight: 300;
  color: var(--ink);
}
.verse-list p {
  margin: 2px 0 var(--s1);
  font-family: var(--font-scripture);
  font-size: var(--text-lg);
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.verse-list small, .section-list small, .path-sections small {
  color: var(--muted);
}
.weak-words > button {
  grid-template-columns: auto 1fr auto;
}
.weak-words strong {
  font-family: var(--font-scripture);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--ink);
}
.weak-words span {
  font-size: var(--text-sm);
}
.section-list > button > svg:first-child {
  color: var(--accent);
}
.mastery {
  display: grid;
  place-items: center;
  grid-auto-flow: column;
  align-items: baseline;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--accent-soft);
  color: var(--ink);
}
.mastery strong {
  font-family: var(--font-scripture);
  font-size: 1.25rem;
  font-weight: 300;
}
.mastery span {
  font-size: var(--text-xs);
  color: var(--muted);
}
.review-page .tabs, main > .tabs {
  margin-bottom: var(--s2);
}

/* Scripture reader */
.reader-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s6);
}
.reader-toolbar label {
  flex: 0 1 320px;
}
.reader section + section {
  margin-top: var(--s7);
}
.reader h2 {
  margin-bottom: var(--s3);
  font-size: var(--title-sm);
}
.reader-verse {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  width: 100%;
  max-width: 44em;
  padding: var(--s2) var(--s3);
  margin-left: calc(var(--s3) * -1);
  border-radius: var(--radius-sm);
  font-family: var(--font-scripture);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--ink);
  transition: background-color 160ms var(--ease-out);
}
.reader-verse:hover {
  background: var(--surface-sunk);
}
.reader-verse sup {
  flex: none;
  min-width: 1.4em;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.reader-verse svg {
  color: var(--right);
  align-self: center;
}

/* Progress */
.chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: var(--s5);
}
.chart-column {
  display: grid;
  justify-items: center;
  gap: var(--s2);
}
.chart-column span, .chart-column small {
  font-size: var(--text-xs);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chart-bar {
  width: 100%;
  max-width: 40px;
  height: 120px;
}
.chart-track {
  fill: var(--surface-sunk);
}
.chart-fill {
  fill: var(--accent);
}
.path-sections > button {
  grid-template-columns: auto 1fr auto;
}
.path-marker {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.path-sections progress {
  display: block;
  margin-top: var(--s2);
  max-width: 280px;
}
.path-sections > button > span {
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.history > div {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: var(--s3);
  align-items: baseline;
  padding: var(--s3) var(--s5);
  font-size: var(--text-sm);
}
.history strong {
  font-weight: 300;
  color: var(--ink);
}
.history span, .history small {
  color: var(--muted);
}
.history b {
  font-weight: 300;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.history > p {
  padding: var(--s5);
  color: var(--muted);
}

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s5);
  align-items: start;
}
.settings-grid h2 {
  margin-bottom: var(--s4);
}
.setting-label {
  display: grid;
  gap: var(--s2);
  margin-bottom: var(--s5);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ink);
}
.setting-label small {
  font-weight: 300;
  color: var(--muted);
}
.setting-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 48px;
  margin-bottom: var(--s5);
  padding: 0 var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ink);
}
.settings-grid .quiet-card > p {
  margin-top: 0;
}
.settings-grid .quiet-card > .button.text {
  margin: var(--s3) 0 0;
}
.privacy-note {
  display: flex;
  gap: var(--s3);
  margin-top: var(--s5);
  padding: var(--s4);
  border-radius: var(--radius);
  background: var(--surface-sunk);
  font-size: var(--text-sm);
}
.privacy-note svg {
  color: var(--accent);
}
.settings-plan {
  margin-top: var(--s5);
}
.install-card {
  display: flex;
  align-items: center;
  gap: var(--s5);
  margin-top: var(--s5);
}
.install-card > span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}
.install-card > div {
  flex: 1;
}
.install-card p {
  margin-top: var(--s1);
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Questionnaire */
.question-main {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: var(--s7) var(--s6) var(--s7);
  animation: arrive 240ms var(--ease-out);
}
.question-intro h1 {
  font-size: var(--title-lg);
}
.question-note {
  margin-top: var(--s3);
  font-size: var(--text-lg);
  color: var(--muted);
}
.answer-list {
  display: grid;
  gap: var(--s3);
  margin-top: var(--s6);
}
.answer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  width: 100%;
  min-height: 64px;
  padding: var(--s3) var(--s5);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.answer > div {
  display: grid;
  gap: 2px;
}
.answer span {
  font-size: var(--text-lg);
  color: var(--ink);
}
.answer small {
  color: var(--muted);
}
.answer i {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--on-accent);
  font-style: normal;
}
.answer:hover:not(:disabled) {
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--surface-hover);
}
.answer.selected {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.answer.selected i {
  background: var(--accent);
  box-shadow: none;
}
.answer.unavailable {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}
.answer.unavailable span, .answer.unavailable small {
  color: var(--muted);
}
.answer.unavailable i {
  width: auto;
  height: auto;
  padding: 2px var(--s2);
  border-radius: 99px;
  box-shadow: none;
  background: var(--surface-sunk);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 300;
}
.question-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s6);
}
.question-hint {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  color: var(--muted);
}
.question-hint svg {
  color: var(--accent);
}
.question-privacy {
  margin-top: var(--s5);
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Lesson */
.lesson {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: var(--s7) var(--s6) var(--s7);
  animation: arrive 240ms var(--ease-out);
}
.lesson h1 {
  font-size: var(--title-lg);
}
.lesson-note {
  margin-top: var(--s2);
  color: var(--muted);
}
.lesson .reference {
  margin-top: var(--s5);
}
.exercise-card {
  margin-top: var(--s3);
  padding: var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.exercise-card > p:not(.scripture-text):not(.input-help):not(.stage-note) {
  margin-bottom: var(--s3);
  color: var(--muted);
}
.blank {
  color: var(--blank);
  letter-spacing: 0.04em;
}
.phrase-guide {
  margin-top: var(--s5);
  border-top: 1px solid var(--line);
}
.phrase-guide p {
  display: flex;
  gap: var(--s4);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-scripture);
  font-size: var(--text-lg);
  color: var(--text);
}
.phrase-guide span {
  flex: none;
  width: 1.5em;
  color: var(--accent);
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: var(--s5);
}
.choice {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 60px;
  padding: var(--s2) var(--s4);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-family: var(--font-scripture);
  font-size: 1.25rem;
  color: var(--ink);
  transition: box-shadow 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.choice kbd {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--muted);
}
.choice > span:not(.sr-only) {
  flex: 1;
}
.choice:hover:not(:disabled) {
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice.selected {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.choice:disabled {
  opacity: 0.55;
}
.choice.is-right, .choice.is-wrong {
  opacity: 1;
}
.choice.is-right {
  background: var(--right-soft);
  box-shadow: inset 0 0 0 2px var(--right);
  color: var(--ink);
}
.choice.is-right svg, .choice.is-right kbd {
  color: var(--right);
}
.choice.is-wrong {
  background: var(--wrong-soft);
  box-shadow: inset 0 0 0 2px var(--wrong);
}
.choice.is-wrong svg, .choice.is-wrong kbd {
  color: var(--wrong);
}
.stage-note, .sequence-cue, .passage-cue {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s4);
  padding: var(--s1) var(--s3);
  border-radius: 99px;
  background: var(--surface-sunk);
  font-size: var(--text-sm);
  color: var(--text);
}
.passage-cue {
  margin: 0 0 var(--s2);
}
.letter-cues {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.letter-cues button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--s3);
  border-radius: var(--radius-sm);
  background: var(--surface-sunk);
  font-family: var(--font-scripture);
  font-size: 1.25rem;
  color: var(--accent);
}
.letter-cues button:hover:not(:disabled) {
  box-shadow: inset 0 0 0 1px var(--accent);
}
.letter-cues button:disabled {
  background: transparent;
  color: var(--ink);
}
.ordered-words {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: var(--s2);
  min-height: 84px;
  padding: var(--s3);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
}
.ordered-words p {
  align-self: center;
  color: var(--muted);
  font-size: var(--text-sm);
}
.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}
.ordered-words button, .word-bank button, .puzzle-piece:not(.fixed) {
  min-height: 44px;
  padding: var(--s1) var(--s3);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line);
  font-family: var(--font-scripture);
  font-size: var(--text-lg);
  color: var(--ink);
  transition: box-shadow 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
.ordered-words button {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.word-bank button:hover:not(:disabled), .ordered-words button:hover {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.word-bank button:disabled {
  opacity: 0.3;
}
.audio-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s5);
}
.audio-buttons .button {
  min-height: 44px;
  padding: 0 var(--s4);
  font-size: var(--text-sm);
}
.exercise-card audio {
  width: 100%;
  margin-top: var(--s4);
}
.lesson > .button.text {
  margin-top: var(--s3);
}
.hint-content {
  margin-top: var(--s3);
  padding: var(--s4) var(--s5);
  border-radius: var(--radius);
  background: var(--surface-sunk);
  font-family: var(--font-scripture);
  font-size: var(--text-lg);
  color: var(--ink);
}
.lesson-bottom {
  display: grid;
  justify-items: end;
  gap: var(--s4);
  margin-top: var(--s5);
}
.lesson-bottom .feedback {
  justify-self: stretch;
}
.lesson-bottom > .button {
  min-width: 220px;
}
.feedback {
  padding: var(--s5);
  border-radius: var(--radius-lg);
  animation: lift 260ms var(--ease-out);
}
.feedback.correct {
  background: var(--right-soft);
  box-shadow: inset 0 0 0 1px var(--right-line);
}
.feedback.almost {
  background: var(--sun-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sun) 45%, transparent);
}
.feedback-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
}
.feedback-head strong {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-lg);
  font-weight: 300;
}
.feedback.correct .feedback-head strong {
  color: var(--right);
}
.feedback.almost .feedback-head strong {
  color: var(--on-sun-soft);
}
.feedback-head span {
  font-size: var(--text-sm);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.feedback .scripture-text {
  margin-top: var(--s3);
  font-size: var(--verse-md);
}
.feedback mark {
  padding: 0 0.15em;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--right);
  color: var(--ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.word-feedback {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  font-family: var(--font-scripture);
  font-size: var(--text-lg);
  line-height: 2;
  color: var(--ink);
}
.word-feedback > span, .feedback-legend span {
  padding: 1px 4px;
  border-radius: 4px;
}
.word-feedback .missing, .feedback-legend .missing {
  color: var(--muted);
  text-decoration: underline dotted;
  text-underline-offset: 0.25em;
}
.word-feedback .incorrect, .feedback-legend .incorrect {
  background: var(--wrong-soft);
  color: var(--wrong);
}
.word-feedback .misplaced, .feedback-legend .misplaced {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--sun);
}
.feedback-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  margin-top: var(--s3);
  font-size: var(--text-xs);
  color: var(--text);
}
.feedback-legend .correct {
  padding-left: 0;
}

/* Session result */
.completion {
  width: min(600px, 100%);
  margin: 0 auto;
  padding: var(--s8) var(--s6);
  text-align: center;
  animation: arrive 280ms var(--ease-out);
}
.completion-icon {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto var(--s5);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.completion.tier-early .completion-icon {
  background: var(--sun-soft);
  color: var(--on-sun-soft);
}
.completion h1 {
  font-size: var(--title-lg);
}
.completion > p {
  margin: var(--s3) auto 0;
  max-width: 30em;
  font-size: var(--text-lg);
  color: var(--muted);
}
.completion-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--s6) 0 var(--s4);
  padding: var(--s5) 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.completion-stats > div {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--s1);
}
.completion-stats > div + div {
  border-left: 1px solid var(--line);
}
.completion-stats dt {
  font-size: var(--text-xs);
  color: var(--muted);
}
.completion-stats dd {
  font-family: var(--font-scripture);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.completion .completion-note {
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  background: var(--surface-sunk);
  font-size: var(--text-sm);
  color: var(--text);
}
.completion-actions {
  display: grid;
  gap: var(--s3);
  width: min(360px, 100%);
  margin: var(--s6) auto 0;
}
.completion-actions .button.text {
  min-height: 40px;
}

/* A brief sunrise over the mount after each round */
.summit-moment {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 150;
  width: min(280px, calc(100vw - 48px));
  padding: var(--s5) var(--s5) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
  transform: translate(-50%, -50%);
  animation: summit-card 2450ms var(--ease-out) both;
  pointer-events: none;
}
.summit-moment svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.summit-sun {
  fill: var(--sun);
  animation: sun-rise 1100ms var(--ease-out) both;
}
.summit-far {
  fill: var(--sky);
}
.summit-near {
  fill: var(--accent);
}
.summit-moment p {
  margin-top: var(--s3);
  font-family: var(--font-scripture);
  font-size: var(--title-sm);
  line-height: 1.25;
  color: var(--ink);
}
.reaction-summit { --sun-height: -30px; }
.reaction-ridge { --sun-height: -20px; }
.reaction-slope { --sun-height: -10px; }
.reaction-foothill { --sun-height: 0px; }
.reaction-dawn { --sun-height: 12px; }
.summit-sun {
  transform: translateY(var(--sun-height));
}

/* Dialogs */
body.modal-open {
  overflow: hidden;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--s4);
  background: var(--scrim);
  animation: fade 180ms var(--ease-out);
}
.modal {
  position: relative;
  display: grid;
  gap: var(--s3);
  width: min(460px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: var(--s6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: lift 220ms var(--ease-out);
}
.modal h2 {
  padding-right: var(--s7);
}
.modal > p:not(.scripture-text):not(.meta-line):not(.input-help) {
  color: var(--muted);
}
.modal-close {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
}
.modal form {
  display: grid;
  gap: var(--s4);
  margin-top: var(--s2);
}
.modal label {
  display: grid;
  gap: var(--s2);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ink);
}
.modal .scripture-text {
  font-size: var(--verse-md);
}
.form-error {
  min-height: 0;
  font-size: var(--text-sm);
  color: var(--wrong);
}
.form-error:empty {
  display: none;
}
.verse-stat {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) 0;
}
.verse-stat strong {
  font-weight: 300;
  color: var(--ink);
}
.verse-stat p {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Playground */
.playground-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--s3);
  margin: var(--s5) 0 var(--s4);
}
.playground-toolbar label {
  display: grid;
  gap: var(--s2);
  flex: 1 1 220px;
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ink);
}
.playground > p:not(.reference):not(.scripture-text) {
  max-width: 44em;
  font-size: var(--text-sm);
  color: var(--muted);
}
.playground > .scripture-text {
  margin-top: var(--s2);
}
.playground > .reference {
  margin-top: var(--s5);
}
.passage-puzzle {
  display: grid;
  gap: var(--s4);
  margin-top: var(--s5);
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.puzzle-verse small {
  display: block;
  margin-bottom: var(--s1);
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--accent);
}
.puzzle-verse > div {
  font-family: var(--font-scripture);
  font-size: 1.25rem;
  line-height: 2.1;
  color: var(--ink);
}
.puzzle-slot {
  min-width: 4ch;
  padding: 0 var(--s2);
  border-radius: 6px;
  background: var(--surface-sunk);
  box-shadow: inset 0 -2px 0 var(--accent);
  font-family: var(--font-scripture);
  color: var(--accent);
}
.puzzle-slot:hover {
  background: var(--accent-soft);
}
.piece-correct {
  background: var(--right-soft);
  box-shadow: inset 0 -2px 0 var(--right);
  color: var(--right);
}
.piece-wrong {
  background: var(--wrong-soft);
  box-shadow: inset 0 0 0 1.5px var(--wrong);
  color: var(--wrong);
}
.playground h2 {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  margin: var(--s6) 0 var(--s3);
  font-size: var(--title-sm);
}
.playground h2 small {
  font-family: var(--font-ui);
  color: var(--muted);
}
.fallen-pieces {
  position: sticky;
  bottom: calc(var(--nav-height) + var(--s3));
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  max-height: 28vh;
  overflow-y: auto;
  margin-bottom: var(--s4);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--muted);
}
.puzzle-piece.selected {
  background: var(--accent);
  box-shadow: none;
  color: var(--on-accent);
}
.playground-status {
  margin-top: var(--s3);
  font-size: var(--text-sm);
  color: var(--text);
}
.memory-temple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: var(--s5);
}
.palace-room {
  display: grid;
  align-content: start;
  gap: var(--s2);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.palace-room h3 {
  font-size: var(--text-sm);
  color: var(--accent);
}
.palace-object {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0 var(--s2);
}
.palace-object span {
  grid-row: span 2;
  font-size: 1.5rem;
}
.palace-object strong {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ink);
}
.palace-object small {
  font-family: var(--font-scripture);
  font-size: var(--text-md);
  color: var(--muted);
}
.palace-story {
  margin-top: var(--s4);
  padding: var(--s4) var(--s5);
  border-radius: var(--radius);
  background: var(--surface-sunk);
  font-family: var(--font-scripture);
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text);
}
.playground details {
  margin-top: var(--s4);
}
.playground summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 300;
  color: var(--accent);
  cursor: pointer;
}
.palace-editor {
  display: grid;
  gap: var(--s3);
  margin: var(--s3) 0 var(--s4);
}
.palace-editor > div {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--s3);
}
.palace-editor label {
  display: grid;
  gap: var(--s1);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ink);
}
.playground > [role="status"]:empty {
  display: none;
}
.playground > .button.primary {
  margin-top: var(--s4);
}

/* Motion */
@keyframes arrive {
  from { opacity: 0; transform: translateY(6px); }
}
@keyframes lift {
  from { opacity: 0; transform: translateY(8px); }
}
.toast {
  animation-name: toast-lift;
}
@keyframes toast-lift {
  from { opacity: 0; transform: translate(-50%, 8px); }
}
@keyframes fade {
  from { opacity: 0; }
}
@keyframes sun-rise {
  from { transform: translateY(40px); }
}
@keyframes summit-card {
  0% { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
  12%, 82% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -50%); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .summit-moment {
    animation: none;
  }
}

/* Tablet */
@media (max-width: 1000px) {
  .mode-groups {
    grid-template-columns: 1fr;
  }
}

/* Phone */
@media (max-width: 760px) {
  :root {
    --title-xl: 2.125rem;
    --title-lg: 1.875rem;
    --title-md: 1.5rem;
    --title-sm: 1.25rem;
    --verse-lg: 1.5rem;
    --verse-md: 1.25rem;
  }
  :root:has(.bottom-nav) {
    --nav-height: calc(64px + env(safe-area-inset-bottom));
  }
  .app-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--s3);
    min-height: 60px;
    padding: var(--s2) var(--s4);
  }
  .wordmark {
    font-size: 1.375rem;
  }
  .header-progress {
    gap: var(--s2);
  }
  .header-progress span {
    display: none;
  }
  .header-progress ~ .profile-control .account-button i {
    display: none;
  }
  .header-progress ~ .profile-control .account-button {
    padding: 0 var(--s2);
  }
  .account-button {
    font-size: var(--text-sm);
  }
  .top-nav {
    display: none;
  }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: var(--nav-height);
    padding: 0 var(--s1) env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
  }
  .bottom-nav button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-width: 0;
    font-size: 0.75rem;
    color: var(--muted);
  }
  .bottom-nav button span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .bottom-nav button.active {
    color: var(--accent);
    font-weight: 300;
  }
  .bottom-nav button.active svg {
    stroke-width: 2.2;
  }
  .page, .question-main, .lesson {
    padding: var(--s6) var(--s4) var(--s7);
  }
  .page-heading {
    margin-bottom: var(--s5);
  }
  .page-heading p {
    font-size: var(--text-md);
  }
  .daily-body {
    padding: var(--s5) var(--s4) var(--s4);
  }
  .daily-bottom {
    margin-top: var(--s5);
    padding-top: var(--s4);
  }
  .daily-bottom .button {
    width: 100%;
  }
  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s4) 0;
    margin-bottom: var(--s6);
  }
  .metric-row > div:nth-child(3) {
    border-left: 0;
  }
  .ascent-steps {
    gap: var(--s1);
  }
  .ascent-step {
    align-items: center;
    justify-content: flex-end;
    padding: var(--s2) var(--s1);
  }
  .ascent-step:nth-child(1) { min-height: 48px; }
  .ascent-step:nth-child(2) { min-height: 58px; }
  .ascent-step:nth-child(3) { min-height: 68px; }
  .ascent-step:nth-child(4) { min-height: 78px; }
  .ascent-step:nth-child(5) { min-height: 88px; }
  .ascent-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .two-cards, .settings-grid {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }
  .tabs {
    display: flex;
  }
  .mode-card {
    gap: var(--s3);
    padding: var(--s3);
  }
  .verse-list > button, .weak-words > button, .section-list > button, .path-sections > button {
    gap: var(--s3);
    padding: var(--s3) var(--s4);
  }
  .history > div {
    grid-template-columns: 1fr auto;
    padding: var(--s3) var(--s4);
  }
  .history small {
    grid-column: 1;
  }
  .chart {
    gap: var(--s2);
  }
  .install-card {
    flex-wrap: wrap;
  }
  .question-bottom, .lesson-bottom {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-left: calc(var(--s4) * -1);
    margin-right: calc(var(--s4) * -1);
    padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--ground) 94%, transparent);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }
  .question-bottom {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: var(--s2);
    text-align: center;
  }
  .question-hint {
    justify-content: center;
  }
  .question-bottom .button, .lesson-bottom > .button {
    width: 100%;
  }
  .lesson-bottom {
    justify-items: stretch;
  }
  .lesson-bottom .feedback {
    max-height: 46dvh;
    overflow-y: auto;
  }
  .exercise-card {
    padding: var(--s5) var(--s4);
  }
  .choice-grid {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }
  .choice {
    min-height: 52px;
  }
  .completion {
    padding: var(--s7) var(--s4);
  }
  .completion-stats dd {
    font-size: 1.625rem;
  }
  .memory-temple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .palace-editor > div {
    grid-template-columns: 1fr;
  }
  .modal {
    padding: var(--s5);
  }
  .toast {
    bottom: calc(var(--nav-height) + var(--s3));
  }
}
@media (max-width: 380px) {
  .memory-temple {
    grid-template-columns: 1fr;
  }
}

/* Accent face for semantic headings and key progress numbers (see typography.ts). */
.feather-title {
  font-family: var(--font-accent) !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}
