/* =========================================================================
   RFLXN Web — "Sacred Focus" study workspace
   Design language: warm gold on layered near-black, editorial serif for
   scripture, calm sans for the product surface. Unified with the RFLXN.app
   landing page (DM Sans + Lora) and the mobile "Sacred Dark" palette.
   ========================================================================= */

:root {
  color-scheme: dark;

  /* Base surfaces — layered near-black with a faint warmth */
  --bg: #090c13;
  --bg-2: #0e121b;
  --surface: #141926;
  --surface-2: #1a2030;
  --surface-3: #212a3c;

  /* Lines */
  --border: #262f40;
  --border-strong: #3a4658;

  /* Accents — gold reserved for sacred / primary action (aligns with mobile) */
  --gold: #f2be4e;
  --gold-2: #f8d074;
  --gold-deep: #d0a13c;
  --sage: #8fc0a9;
  --sage-deep: #6ea488;
  --rose: #e08d8d;

  /* Ink */
  --text: #f5f1e8;
  --text-2: #bcb5a5;
  --text-3: #837d70;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.34), 0 16px 44px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.45);
  --ring: 0 0 0 3px rgba(242, 190, 78, 0.32);
  --glow-gold: 0 8px 26px rgba(242, 190, 78, 0.24);

  --body-background:
    radial-gradient(120% 90% at 12% -8%, rgba(143, 192, 169, 0.14), transparent 46%),
    radial-gradient(120% 90% at 100% 0%, rgba(242, 190, 78, 0.12), transparent 42%),
    var(--bg);

  --input-bg: rgba(9, 12, 19, 0.66);
  --panel-bg: rgba(20, 25, 38, 0.86);
  --panel-bg-soft: rgba(20, 25, 38, 0.7);
  --rail-bg: rgba(11, 14, 22, 0.82);
  --card-bg: rgba(26, 32, 48, 0.6);
  --chip-bg: rgba(33, 42, 60, 0.7);
  --message-bg: rgba(9, 12, 19, 0.44);
  --track-bg: rgba(255, 255, 255, 0.08);
  --gold-wash: rgba(242, 190, 78, 0.1);
  --gold-wash-border: rgba(242, 190, 78, 0.28);
  --sage-wash: rgba(143, 192, 169, 0.1);
  --sage-wash-border: rgba(143, 192, 169, 0.26);
  --primary-button-text: #1a140a;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Type */
  --font-ui:
    "DM Sans", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-scripture: "Lora", Georgia, "Iowan Old Style", "Times New Roman", serif;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f4f6f2;
  --bg-2: #eaeee8;
  --surface: #ffffff;
  --surface-2: #f1f5f0;
  --surface-3: #e6ede7;

  --border: #d6ddd5;
  --border-strong: #b3c0b6;

  --gold: #a97615;
  --gold-2: #8a5f12;
  --gold-deep: #7a530f;
  --sage: #4f7a63;
  --sage-deep: #3f6851;
  --rose: #a1595c;

  --text: #182018;
  --text-2: #445041;
  --text-3: #6d776e;

  --shadow-sm: 0 1px 2px rgba(38, 55, 47, 0.08), 0 4px 14px rgba(38, 55, 47, 0.06);
  --shadow-md: 0 6px 20px rgba(38, 55, 47, 0.09), 0 16px 44px rgba(38, 55, 47, 0.08);
  --shadow-lg: 0 24px 60px rgba(38, 55, 47, 0.14);
  --ring: 0 0 0 3px rgba(169, 118, 21, 0.28);
  --glow-gold: 0 8px 24px rgba(169, 118, 21, 0.16);

  --body-background:
    radial-gradient(120% 90% at 12% -8%, rgba(79, 122, 99, 0.12), transparent 46%),
    radial-gradient(120% 90% at 100% 0%, rgba(169, 118, 21, 0.08), transparent 42%),
    var(--bg);

  --input-bg: rgba(255, 255, 255, 0.94);
  --panel-bg: rgba(255, 255, 255, 0.92);
  --panel-bg-soft: rgba(255, 255, 255, 0.78);
  --rail-bg: rgba(255, 255, 255, 0.86);
  --card-bg: rgba(255, 255, 255, 0.72);
  --chip-bg: rgba(230, 237, 231, 0.82);
  --message-bg: rgba(238, 242, 238, 0.8);
  --track-bg: rgba(23, 32, 23, 0.1);
  --gold-wash: rgba(169, 118, 21, 0.1);
  --gold-wash-border: rgba(169, 118, 21, 0.26);
  --sage-wash: rgba(79, 122, 99, 0.1);
  --sage-wash-border: rgba(79, 122, 99, 0.24);
  --primary-button-text: #fffdf6;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--body-background);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: var(--gold);
  text-decoration: none;
}

h1,
h2,
h3 {
  letter-spacing: -0.01em;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

input,
select {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  resize: vertical;
  min-height: 104px;
  padding: 12px 14px;
  line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: var(--ring);
}

button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

::selection {
  background: rgba(242, 190, 78, 0.28);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: var(--r-pill);
  background-clip: padding-box;
  background-color: var(--border-strong);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-3);
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ------------------------------------------------------------------ Entry */

.entry-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.entry-panel {
  width: min(100%, 468px);
  display: grid;
  gap: 18px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.entry-panel h1 {
  margin: 4px 0 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.12;
}

.entry-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ---------------------------------------------------------------- Brand */

.brand-lockup {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
}

.brand-mark-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}

.brand-mark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

:root[data-theme="dark"] .brand-mark-light,
:root[data-theme="light"] .brand-mark-dark {
  opacity: 0;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}

.brand-tagline {
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ------------------------------------------------------------ Theme toggle */

.theme-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(56px, 1fr));
  gap: 3px;
  align-items: center;
  min-height: 36px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.theme-toggle button {
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-3);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.theme-toggle button:hover {
  color: var(--text-2);
}

.theme-toggle button.active,
.theme-toggle button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.muted,
.status-text {
  color: var(--text-3);
  margin: 0;
}

.entry-panel .muted {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

.preview-note {
  margin: 0;
  border: 1px solid var(--sage-wash-border);
  border-radius: var(--r-md);
  background: var(--sage-wash);
  color: var(--text-2);
  padding: 13px 15px;
  font-size: 13px;
  line-height: 1.55;
}

.status-text {
  min-height: 20px;
  font-size: 13px;
}

/* ----------------------------------------------------------------- Buttons */

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--r-sm);
  padding: 0 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease,
    transform 120ms ease;
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active {
  transform: translateY(1px);
}

.primary-button {
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--primary-button-text);
  box-shadow: var(--glow-gold);
  font-weight: 700;
}

.primary-button:hover {
  background: linear-gradient(180deg, var(--gold-2), var(--gold-2));
  box-shadow: 0 10px 30px rgba(242, 190, 78, 0.34);
}

.secondary-button {
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}

.secondary-button:hover {
  border-color: var(--gold);
  background: var(--surface-3);
}

.ghost-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
}

.ghost-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}

.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12.5px;
}

.wide-button {
  flex: 1 1 220px;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row.compact {
  margin-top: -4px;
}

.divider-line {
  display: grid;
  grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.divider-line::before,
.divider-line::after {
  content: "";
  height: 1px;
  background: var(--border);
}

/* ------------------------------------------------------------- App shell */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
  padding: 26px 18px;
  border-right: 1px solid var(--border);
  background: var(--rail-bg);
  backdrop-filter: blur(18px);
}

.rail-brand {
  padding: 0 8px;
}

.rail-brand .brand-mark-wrap {
  width: 36px;
  height: 36px;
}

.rail-brand .brand-name {
  font-size: 18px;
}

.rail-brand .brand-tagline {
  font-size: 9px;
}

.rail-nav {
  display: grid;
  gap: 4px;
  align-content: start;
}

.rail-button {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  padding: 0 12px;
  text-align: left;
  font-size: 14.5px;
  font-weight: 500;
  transition:
    background 150ms ease,
    color 150ms ease;
}

.rail-button::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
  transition: transform 160ms ease;
}

.rail-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.rail-button.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.rail-button.active::before {
  transform: translateY(-50%) scaleY(1);
}

.rail-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--text-3);
  transition: color 150ms ease;
}

.rail-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.rail-button:hover .rail-icon,
.rail-button.active .rail-icon {
  color: var(--gold);
}

.rail-footer {
  display: grid;
  gap: 10px;
  padding: 14px 10px 4px;
  border-top: 1px solid var(--border);
}

.account-plan {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--panel-bg-soft);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.account-plan[hidden] {
  display: none;
}

.account-plan-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-2);
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.account-plan-badge.pro {
  border-color: var(--gold-wash-border);
  background: var(--gold-wash);
  color: var(--gold);
}

.account-plan-kicker {
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-plan strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.account-plan p {
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.45;
}

.account-plan .primary-button,
.account-plan .ghost-button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  font-size: 12.5px;
}

.mode-pill {
  width: fit-content;
  border: 1px solid var(--gold-wash-border);
  border-radius: var(--r-pill);
  background: var(--gold-wash);
  color: var(--gold);
  padding: 4px 11px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-email {
  overflow: hidden;
  color: var(--text-3);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------- Workspace */

.workspace {
  min-width: 0;
  padding: 30px 34px 44px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(260px, 100%);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text-2);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.plan-chip:disabled {
  cursor: default;
}

.plan-chip svg {
  width: 13px;
  height: 13px;
}

.plan-chip.pro {
  border-color: var(--gold-wash-border);
  background: var(--gold-wash);
  color: var(--gold);
}

.plan-chip.upgrade {
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--primary-button-text);
  font-weight: 700;
  box-shadow: var(--glow-gold);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    filter 150ms ease;
}

.plan-chip.upgrade:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.workspace-header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
}

.reader-heading h2,
.panel-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--sage);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 416px);
  gap: 22px;
  align-items: start;
}

/* Shared panel surfaces */
.home-column,
.journal-column,
.plans-column,
.saved-column,
.companion-panel,
.journal-composer {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel-bg-soft);
  box-shadow: var(--shadow-md);
}

.home-column,
.journal-column,
.plans-column,
.saved-column {
  min-width: 0;
}

/* -------------------------------------------------------------- Home / Today */

.home-column {
  display: grid;
  gap: 16px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.home-hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(242, 190, 78, 0.14), transparent 55%),
    var(--panel-bg);
  box-shadow: var(--shadow-md);
}

.home-hero-panel h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.14;
}

.home-hero-panel > div:first-child p {
  margin: 10px 0 0;
  color: var(--text-2);
  max-width: 46ch;
}

.streak-card {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 128px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--gold-wash-border);
  border-radius: var(--r-md);
  background: var(--gold-wash);
}

.streak-card strong {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
}

.streak-card span {
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.daily-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  counter-reset: flow;
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card-bg);
  color: var(--text);
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.flow-step:hover {
  border-color: var(--gold);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.flow-step span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--gold-wash);
  border: 1px solid var(--gold-wash-border);
  color: var(--gold);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16px;
}

.flow-step strong,
.flow-step small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-step strong {
  font-weight: 600;
  font-size: 14.5px;
}

.flow-step small {
  color: var(--text-3);
  font-size: 12px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 184px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--panel-bg-soft);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.home-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-hero-panel h2,
.home-card h3 {
  color: var(--text);
}

.home-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.18;
}

.home-card p {
  margin: 0;
  color: var(--text-2);
}

.home-card .meta-line {
  margin-top: 0;
}

.home-card .secondary-button,
.home-card .primary-button {
  margin-top: auto;
  width: fit-content;
}

/* -------------------------------------------------------- Reader (shared) */

.reader-heading,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.reader-heading {
  padding: 24px 26px 10px;
}

.reader-heading h2 {
  font-size: 26px;
}

.reader-heading .eyebrow {
  color: var(--gold);
}

.reader-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: end;
}

.copyright {
  margin: 0;
  padding: 0 26px 24px;
  color: var(--text-3);
  font-size: 12px;
}

/* ------------------------------------------------------------- Companion */

.companion-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto;
  gap: 14px;
  padding: 20px;
}

.panel-heading h2 {
  font-size: 21px;
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.suggestions button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background 150ms ease;
}

.suggestions button:hover {
  border-color: var(--gold);
  color: var(--text);
  background: var(--surface-2);
}

.chat-log {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 4px;
  scrollbar-width: thin;
}

.chat-log .empty-state {
  align-self: center;
}

.message {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--message-bg);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.message.user {
  background: var(--gold-wash);
  border-color: var(--gold-wash-border);
  color: var(--text);
}

.message.assistant {
  background: var(--sage-wash);
  border-color: var(--sage-wash-border);
}

.chat-form {
  display: grid;
  gap: 10px;
}

.companion-quota {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--message-bg);
  color: var(--text-3);
  padding: 7px 11px;
  font-size: 12px;
}

.companion-quota.exhausted {
  border-color: var(--gold-wash-border);
  background: var(--gold-wash);
  color: var(--gold);
}

.companion-quota-upgrade {
  flex: 0 0 auto;
  border: 1px solid var(--gold-wash-border);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--gold);
  padding: 3px 12px;
  font-size: 11.5px;
  font-weight: 700;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.companion-quota-upgrade:hover {
  border-color: var(--gold);
  background: var(--gold-wash);
}

/* --------------------------------------------------------------- Journal */

.journal-composer {
  display: grid;
  gap: 14px;
  padding: 22px;
  margin-bottom: 16px;
}

.item-list {
  display: grid;
  gap: 12px;
}

.item-card,
.plan-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card-bg);
  padding: 18px;
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.item-card:hover,
.plan-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.item-card h3,
.plan-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.item-card p,
.plan-card p {
  margin: 0;
  color: var(--text-2);
}

.meta-line {
  color: var(--text-3);
  font-size: 12px;
  margin-top: 10px;
}

/* -------------------------------------------------------------- Journeys */

.plans-column,
.saved-column,
.journal-column {
  padding: 22px;
}

.plans-column {
  display: grid;
  gap: 18px;
}

.journey-library-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 20px;
  align-items: end;
}

.journey-library-heading h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.15;
}

.journey-library-heading p {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--text-2);
}

.journey-search-label {
  align-self: stretch;
  justify-content: end;
}

.journey-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.journey-tabs button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text-2);
  padding: 0 15px;
  font-size: 12.5px;
  font-weight: 500;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background 150ms ease;
}

.journey-tabs button:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.journey-tabs button.active,
.journey-tabs button[aria-pressed="true"] {
  border-color: var(--gold-wash-border);
  background: var(--gold-wash);
  color: var(--gold);
  font-weight: 600;
}

.journey-day-preview {
  display: grid;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--message-bg);
  padding: 13px 14px;
}

.journey-day-preview span,
.plan-card-topline {
  color: var(--sage);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-day-preview strong {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.journey-day-preview small {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--track-bg);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--sage), var(--gold));
  transition: width 400ms ease;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.plan-card {
  display: grid;
  gap: 11px;
  align-content: start;
}

.plan-card.featured {
  border-color: var(--gold-wash-border);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(242, 190, 78, 0.12), transparent 55%),
    var(--card-bg);
}

.plan-card-topline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.plan-card-topline strong {
  border: 1px solid var(--sage-wash-border);
  border-radius: var(--r-pill);
  background: var(--sage-wash);
  color: var(--sage);
  padding: 3px 10px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.plan-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--text-2);
}

.journey-chip-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.journey-chip {
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text-2);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
}

.plan-actions {
  margin-top: 4px;
}

.journey-study-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--message-bg);
  padding: 16px;
}

.journey-study-heading {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.journey-study-heading h4 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.journey-study-badge,
.journey-big-idea span,
.journey-look-for > span,
.journey-guide-step span,
.journey-lesson-point span {
  color: var(--sage);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-study-badge {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text-2);
  padding: 5px 10px;
}

.journey-big-idea {
  display: grid;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--surface);
  padding: 11px 12px;
}

.journey-lesson-copy {
  display: grid;
  gap: 10px;
}

.journey-lesson-copy p,
.journey-big-idea p,
.journey-guide-step p,
.journey-lesson-point p {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.6;
}

.journey-lesson-points,
.journey-guide-steps {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 13px;
}

.journey-lesson-point,
.journey-guide-step {
  display: grid;
  gap: 4px;
}

.journey-look-for {
  display: grid;
  gap: 9px;
}

.journey-look-for > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.journey-look-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--sage-wash-border);
  border-radius: var(--r-pill);
  background: var(--sage-wash);
  color: var(--text);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.journey-look-chip:hover,
.journey-look-chip:focus-visible {
  border-color: var(--sage);
  background: rgba(143, 192, 169, 0.18);
  color: var(--text);
  transform: translateY(-1px);
}

.journey-look-chip:focus-visible {
  box-shadow: var(--ring);
}

.journey-look-chip-icon {
  width: 13px;
  height: 13px;
  color: var(--sage);
  transition: transform 150ms ease;
}

.journey-look-chip:hover .journey-look-chip-icon,
.journey-look-chip:focus-visible .journey-look-chip-icon {
  transform: translate(1px, -1px);
}

.journey-version-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.journey-version-tabs button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text-2);
  padding: 0 12px;
  font-size: 11.5px;
  font-weight: 700;
}

.journey-version-tabs button:hover,
.journey-version-tabs button.active {
  border-color: var(--gold-wash-border);
  background: var(--gold-wash);
  color: var(--gold);
}

.journey-scripture-list {
  display: grid;
  gap: 4px;
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.journey-verse-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  border-radius: var(--r-xs);
  padding: 6px 8px;
}

.journey-verse-row:hover {
  background: var(--surface-2);
}

.journey-verse-row sup {
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
}

.journey-verse-row span {
  color: var(--text);
  font-family: var(--font-scripture);
  font-size: 17px;
  line-height: 1.65;
}

.journey-copyright {
  margin: 0;
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.5;
}

.journey-reading-error {
  display: grid;
  gap: 10px;
}

.journey-reading-error p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}

/* ------------------------------------------------------- Journey studio */

.journey-library {
  display: grid;
  gap: 18px;
}

.journey-continue-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--gold-wash-border);
  border-radius: var(--r-md);
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(242, 190, 78, 0.14), transparent 55%),
    var(--panel-bg-soft);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}

.journey-hero-copy h3 {
  margin: 2px 0 4px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
}

.journey-hero-copy p {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.55;
}

.journey-hero-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.journey-hero-minutes {
  color: var(--text-3);
  font-size: 12px;
}

.journey-ring-track {
  stroke: var(--track-bg);
}

.journey-ring-bar {
  stroke: var(--gold);
  transition: stroke-dashoffset 500ms ease;
}

.journey-ring-text {
  fill: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
}

.journey-studio {
  display: grid;
  gap: 16px;
}

.journey-studio-header {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(143, 192, 169, 0.1), transparent 55%),
    var(--panel-bg-soft);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}

.journey-studio-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.journey-studio-topline .ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.journey-studio-topline .ghost-button svg {
  width: 15px;
  height: 15px;
}

.journey-studio-mode {
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text-2);
  padding: 4px 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-studio-mode.active {
  border-color: var(--sage-wash-border);
  background: var(--sage-wash);
  color: var(--sage);
}

.journey-studio-title {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.journey-studio-title h3 {
  margin: 2px 0 4px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
}

.journey-studio-subtitle {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
}

.journey-studio-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 12px;
}

.journey-studio-progress {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.journey-studio-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.journey-day-nav {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--panel-bg-soft);
  padding: 12px;
  max-height: min(72vh, 780px);
  overflow: auto;
  scrollbar-width: thin;
}

.journey-day-nav-title {
  margin: 0;
  padding: 2px 6px 0;
  color: var(--sage);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-day-list {
  display: grid;
  gap: 4px;
}

.journey-day-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  padding: 8px 9px;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.journey-day-item:hover {
  border-color: var(--border);
  background: var(--surface-2);
}

.journey-day-item.active {
  border-color: var(--gold-wash-border);
  background: var(--gold-wash);
}

.journey-day-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
}

.journey-day-item.current .journey-day-mark {
  border-color: var(--gold-wash-border);
  background: var(--gold-wash);
  color: var(--gold);
}

.journey-day-item.done .journey-day-mark {
  border-color: var(--sage-wash-border);
  background: var(--sage-wash);
  color: var(--sage);
}

.journey-day-mark svg {
  width: 13px;
  height: 13px;
}

.journey-day-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.journey-day-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-day-copy small {
  overflow: hidden;
  color: var(--text-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-day-flag {
  border: 1px solid var(--gold-wash-border);
  border-radius: var(--r-pill);
  background: var(--gold-wash);
  color: var(--gold);
  padding: 2px 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.journey-session {
  display: grid;
  gap: 16px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel-bg-soft);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.journey-session-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.journey-session-head h3 {
  margin: 3px 0 6px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.journey-session-prompt {
  margin: 0;
  max-width: 58ch;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.6;
}

.journey-session-passage {
  display: grid;
  gap: 3px;
  min-width: 170px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: 11px 13px;
}

.journey-session-passage span {
  color: var(--sage);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-session-passage strong {
  color: var(--gold);
  font-size: 14px;
}

.journey-session-passage small {
  color: var(--text-3);
  font-size: 11.5px;
}

.journey-stepper {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.journey-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text-2);
  padding: 0 14px 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.journey-step-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.journey-step-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
}

.journey-step-index svg {
  width: 12px;
  height: 12px;
}

.journey-step-pill.done {
  border-color: var(--sage-wash-border);
}

.journey-step-pill.done .journey-step-index {
  background: var(--sage-wash);
  color: var(--sage);
}

.journey-step-pill.active {
  border-color: var(--gold-wash-border);
  background: var(--gold-wash);
  color: var(--gold);
}

.journey-step-pill.active .journey-step-index {
  background: var(--gold);
  color: var(--primary-button-text);
}

.journey-step-panel {
  display: grid;
  gap: 14px;
}

.journey-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.journey-step-count {
  color: var(--text-3);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.journey-step-spacer {
  min-width: 64px;
}

.journey-reflect-label {
  display: grid;
  gap: 8px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.journey-reflect-label textarea {
  resize: vertical;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.6;
}

.journey-reflect-status {
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
}

.journey-reflect-status.saved {
  color: var(--sage);
}

.journey-pray-quiet {
  display: grid;
  gap: 5px;
  border: 1px solid var(--gold-wash-border);
  border-radius: var(--r-sm);
  background: var(--gold-wash);
  padding: 13px 14px;
}

.journey-pray-quiet span {
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-pray-quiet p {
  margin: 0;
  color: var(--text-2);
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.6;
}

.journey-complete-row {
  justify-content: flex-start;
}

.journey-day-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--sage-wash-border);
  border-radius: var(--r-pill);
  background: var(--sage-wash);
  color: var(--sage);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
}

.journey-day-done-badge svg {
  width: 14px;
  height: 14px;
}

.journey-celebrate {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 22px;
  text-align: center;
}

.journey-celebrate-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--sage-wash-border);
  border-radius: var(--r-pill);
  background: var(--sage-wash);
  color: var(--sage);
  box-shadow: var(--glow-gold);
}

.journey-celebrate-mark svg {
  width: 26px;
  height: 26px;
}

.journey-celebrate h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
}

.journey-celebrate p {
  margin: 0;
  max-width: 48ch;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.6;
}

.journey-celebrate .button-row {
  margin-top: 8px;
  justify-content: center;
}

.journey-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--gold-wash-border);
  border-radius: var(--r-pill);
  background: var(--gold-wash);
  color: var(--gold);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.journey-streak svg {
  width: 12px;
  height: 12px;
}

.journey-session-progress {
  height: 4px;
  margin-top: -6px;
}

.journey-session-hint {
  margin: -6px 0 0;
  color: var(--text-3);
  font-size: 12px;
}

.journey-recall {
  display: grid;
  gap: 6px;
  border: 1px solid var(--sage-wash-border);
  border-left: 3px solid var(--sage);
  border-radius: var(--r-sm);
  background: var(--sage-wash);
  padding: 12px 14px;
}

.journey-recall span {
  color: var(--sage);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-recall p {
  margin: 0;
  color: var(--text-2);
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
}

.journey-celebrate-idea {
  display: grid;
  gap: 5px;
  max-width: 52ch;
  border: 1px solid var(--gold-wash-border);
  border-radius: var(--r-sm);
  background: var(--gold-wash);
  padding: 12px 16px;
  text-align: left;
}

.journey-celebrate-idea span {
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-celebrate-idea p {
  margin: 0;
  color: var(--text-2);
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.6;
}

@keyframes journey-pop {
  0% {
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

.journey-step-pill.pop .journey-step-index {
  animation: journey-pop 320ms ease;
}

.journey-celebrate-mark {
  animation: journey-pop 460ms ease;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 30px 22px;
  color: var(--text-3);
  text-align: center;
  background: var(--message-bg);
}

.empty-state .empty-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 2px;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold-wash-border);
  background: var(--gold-wash);
  color: var(--gold);
}

.empty-state .empty-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state strong {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
}

.empty-state span {
  max-width: 34ch;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.5;
}

/* --------------------------------------------------------------- Bible tab */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.bible-column {
  position: relative;
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel-bg-soft);
  box-shadow: var(--shadow-md);
  padding: 20px;
}

.bible-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.bible-bar-lead,
.bible-bar-trail {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bible-ref-button {
  display: grid;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.bible-ref-button:hover {
  border-color: var(--gold);
  background: var(--surface-3);
}

.bible-ref-button .eyebrow {
  margin: 0;
}

.bible-ref-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bible-ref-row strong {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
}

.bible-ref-row .chev {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  transition: transform 200ms ease;
}

.bible-ref-button[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.bible-stepper {
  display: inline-flex;
  gap: 6px;
}

.bible-versions {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.bible-versions button {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-3);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.bible-versions button:hover {
  color: var(--text);
}

.bible-versions button.active {
  background: var(--gold);
  color: var(--primary-button-text);
  box-shadow: var(--glow-gold);
}

.bible-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bible-compare-button.active,
#bibleCompareButton.active {
  border-color: var(--gold);
  background: var(--gold-wash);
  color: var(--gold);
}

.bible-search-label {
  display: block;
}

.bible-search-label input {
  min-height: 40px;
  width: min(240px, 46vw);
}

.bible-compare-picker {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--gold-wash-border);
  border-radius: var(--r-md);
  background: var(--gold-wash);
}

.bible-compare-picker .eyebrow {
  margin: 0;
  color: var(--gold);
}

.bible-compare-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bible-compare-chips button {
  min-height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-2);
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  transition:
    border-color 140ms ease,
    color 140ms ease,
    background 140ms ease;
}

.bible-compare-chips button.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--primary-button-text);
}

/* Browser */
.bible-browser {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--message-bg);
}

.testament-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  width: fit-content;
}

.testament-tabs button {
  min-height: 34px;
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-3);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
}

.testament-tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}

.book-grid button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card-bg);
  color: var(--text-2);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition:
    border-color 140ms ease,
    color 140ms ease,
    background 140ms ease;
}

.book-grid button:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.book-grid button.active {
  border-color: var(--gold);
  background: var(--gold-wash);
  color: var(--text);
}

.chapter-picker {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.chapter-picker .eyebrow {
  margin: 0;
  color: var(--gold);
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
}

.chapter-grid button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card-bg);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  transition:
    border-color 140ms ease,
    color 140ms ease,
    background 140ms ease;
}

.chapter-grid button:hover {
  border-color: var(--gold);
  color: var(--text);
}

.chapter-grid button.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--primary-button-text);
}

/* Search results */
.bible-search-results {
  display: grid;
  gap: 10px;
}

.search-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-results-head .eyebrow {
  margin: 0;
}

.search-result {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card-bg);
  padding: 14px 16px;
  text-align: left;
  transition:
    border-color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.search-result:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.search-result strong {
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.search-result span {
  color: var(--text-2);
  font-family: var(--font-scripture);
  font-size: 15px;
  line-height: 1.5;
}

/* Reader */
.bible-reader {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--panel-bg);
  padding: 4px 4px 8px;
}

.bible-reader .reader-heading {
  padding: 18px 20px 6px;
}

.bible-reader .reader-heading h2 {
  font-size: 24px;
}

.bible-reader .reader-heading .eyebrow {
  color: var(--gold);
}

.verse-list {
  display: grid;
  gap: 2px;
  padding: 8px 12px 12px;
  max-width: 42em;
}

.verse-list .muted {
  padding: 12px 8px;
}

.verse-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: baseline;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  padding: 7px 10px;
  text-align: left;
  transition:
    background 130ms ease,
    border-color 130ms ease;
}

.verse-row:hover {
  background: var(--surface-2);
}

.verse-row.selected {
  border-color: var(--gold-wash-border);
  background: var(--gold-wash);
}

.verse-num {
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  vertical-align: super;
}

.verse-text {
  color: var(--text);
  font-family: var(--font-scripture);
  font-size: 18px;
  line-height: 1.7;
}

/* Reader preference data-attributes */
.bible-reader[data-font="sm"] .verse-text { font-size: 16px; }
.bible-reader[data-font="md"] .verse-text { font-size: 18px; }
.bible-reader[data-font="lg"] .verse-text { font-size: 20px; }
.bible-reader[data-font="xl"] .verse-text { font-size: 23px; }

.bible-reader[data-spacing="compact"] .verse-text { line-height: 1.5; }
.bible-reader[data-spacing="cozy"] .verse-text { line-height: 1.7; }
.bible-reader[data-spacing="relaxed"] .verse-text { line-height: 1.95; }

.bible-reader[data-typeface="sans"] .verse-text { font-family: var(--font-ui); }

.bible-reader[data-verse-numbers="false"] .verse-num { display: none; }

/* Reader settings popover */
.reader-settings-wrap {
  position: relative;
}

.reader-settings {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 12px;
  width: 264px;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}

.reader-settings-row {
  display: grid;
  gap: 7px;
}

.reader-settings-row > span {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seg {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.seg button {
  flex: 1;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  padding: 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  transition:
    background 130ms ease,
    color 130ms ease,
    box-shadow 130ms ease;
}

.seg button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.seg[data-setting="fontScale"] button {
  font-family: var(--font-serif);
}

.seg .tiny-a { font-size: 11px; }
.seg .big-a { font-size: 16px; }
.seg .huge-a { font-size: 19px; }

.reader-focus-toggle.active {
  border-color: var(--gold);
  background: var(--gold-wash);
  color: var(--gold);
}

/* Focus / immersive reading mode */
body.reader-focus .rail,
body.reader-focus .companion-panel,
body.reader-focus .workspace-header {
  display: none;
}

body.reader-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.reader-focus .workspace-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.reader-focus .workspace {
  max-width: 860px;
  margin: 0 auto;
  padding-top: 40px;
}

body.reader-focus .bible-reader {
  background: transparent;
  border-color: transparent;
}

/* Compare */
.compare-grid {
  display: grid;
  gap: 0 18px;
  padding: 12px 18px 16px;
  align-items: start;
}

.compare-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--gold-wash-border);
  background: var(--panel-bg);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.compare-cell {
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-scripture);
  font-size: 16px;
  line-height: 1.6;
}

.compare-cell .verse-num {
  margin-right: 5px;
}

/* Verse action bar */
.verse-actionbar {
  position: sticky;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.verse-actionbar-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.verse-actionbar-label {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
}

.verse-actionbar-buttons {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Highlight swatches + painted verses */
.verse-swatches {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  padding: 0;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

.swatch:hover {
  transform: scale(1.12);
}

.swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--panel-bg), 0 0 0 3px var(--text-3);
}

.swatch-gold {
  background: #f2be4e;
}

.swatch-sage {
  background: #8fc0a9;
}

.swatch-sky {
  background: #7bb0e0;
}

.swatch-rose {
  background: #e08d8d;
}

.swatch-none {
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-3);
  font-size: 15px;
  line-height: 1;
}

.swatch-none:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.verse-row.hl {
  border-color: transparent;
}

.verse-row.hl-gold {
  background: rgba(242, 190, 78, 0.16);
}

.verse-row.hl-sage {
  background: rgba(143, 192, 169, 0.16);
}

.verse-row.hl-sky {
  background: rgba(123, 176, 224, 0.17);
}

.verse-row.hl-rose {
  background: rgba(224, 141, 141, 0.16);
}

.verse-row.selected {
  box-shadow: inset 0 0 0 1.5px var(--gold);
}

/* Saved cards with highlight dots */
.saved-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.saved-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: var(--r-pill);
  vertical-align: middle;
}

.saved-dot.hl-gold {
  background: #f2be4e;
}

.saved-dot.hl-sage {
  background: #8fc0a9;
}

.saved-dot.hl-sky {
  background: #7bb0e0;
}

.saved-dot.hl-rose {
  background: #e08d8d;
}

/* ------------------------------------------------------------ Command palette */

.cmdk {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 12vh 20px 20px;
}

.cmdk-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 12, 0.62);
  backdrop-filter: blur(5px);
}

.cmdk-panel {
  position: relative;
  width: min(94vw, 620px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: cmdk-pop 140ms ease;
}

@keyframes cmdk-pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.99);
  }
}

.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.cmdk-search-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--text-3);
}

.cmdk-input-row input {
  flex: 1;
  min-height: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: 16px;
  color: var(--text);
}

.cmdk-input-row input:focus {
  box-shadow: none;
}

kbd,
.cmdk-esc {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-3);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
}

.cmdk-list {
  max-height: min(52vh, 420px);
  overflow: auto;
  display: grid;
  gap: 2px;
  padding: 8px;
}

.cmdk-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  text-align: left;
}

.cmdk-item.active {
  background: var(--surface-2);
  border-color: var(--border);
}

.cmdk-item-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--gold);
}

.cmdk-item-icon svg {
  width: 18px;
  height: 18px;
}

.cmdk-item-body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.cmdk-item-label {
  overflow: hidden;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-item-sub {
  overflow: hidden;
  color: var(--text-3);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}

.cmdk-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12px;
}

.cmdk-footer-brand {
  margin-left: auto;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cmdk-trigger kbd {
  pointer-events: none;
}

/* ------------------------------------------------------------ Modals */

.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 12, 0.66);
  backdrop-filter: blur(5px);
}

.modal-panel {
  position: relative;
  width: min(94vw, 460px);
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
  animation: cmdk-pop 150ms ease;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
}

.modal-head .eyebrow {
  margin-bottom: 4px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-actions .primary-button,
.modal-actions .secondary-button {
  flex: 1 1 auto;
}

/* Verse card */
.card-preview {
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--message-bg);
}

.card-preview canvas {
  width: min(100%, 340px);
  height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.card-styles {
  display: inline-flex;
  gap: 6px;
  justify-self: center;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.card-styles button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-3);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
}

.card-styles button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Memorize */
.modal-memorize {
  width: min(94vw, 560px);
}

.modal-journey-dive {
  width: min(94vw, 680px);
}

.modal-checkout {
  width: min(94vw, 560px);
}

.plan-compare {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.plan-compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 84px;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 9px 13px;
  color: var(--text-2);
  font-size: 12.5px;
}

.plan-compare-row:first-child {
  border-top: none;
}

.plan-compare-row > :nth-child(2),
.plan-compare-row > :nth-child(3) {
  justify-self: center;
  text-align: center;
}

.plan-compare-head {
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-compare .pro-col {
  color: var(--gold);
  font-weight: 600;
}

.plan-compare-check {
  width: 14px;
  height: 14px;
  color: var(--sage);
  vertical-align: middle;
}

.pro-col .plan-compare-check {
  color: var(--gold);
}

.plan-compare-highlight {
  background: var(--gold-wash);
  color: var(--text);
  font-weight: 600;
}

.plan-compare-note {
  margin: -6px 0 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
}

.checkout-status {
  color: var(--text-2);
}

.checkout-terms {
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
}

.checkout-terms a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.checkout-terms a:hover {
  text-decoration: underline;
}

.checkout-packages {
  display: grid;
  gap: 10px;
}

.checkout-package {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 78px;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--message-bg);
  color: var(--text);
  padding: 14px 15px;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.checkout-package:hover,
.checkout-package.active {
  border-color: var(--gold);
  background: var(--surface-2);
}

.checkout-package.active {
  box-shadow: var(--ring);
}

.checkout-package span {
  display: grid;
  gap: 4px;
}

.checkout-package strong,
.checkout-package b {
  font-size: 15px;
}

.checkout-package small {
  color: var(--text-3);
  font-size: 12px;
}

.checkout-package b {
  white-space: nowrap;
}

.checkout-paywall {
  min-height: 320px;
}

.journey-dive-body {
  display: grid;
  gap: 12px;
  max-height: min(62vh, 620px);
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.journey-dive-summary,
.journey-dive-section {
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--message-bg);
  padding: 13px 14px;
}

.journey-dive-summary {
  border-color: var(--gold-wash-border);
  background:
    linear-gradient(135deg, var(--gold-wash), transparent 68%),
    var(--message-bg);
}

.journey-dive-summary span,
.journey-dive-section span {
  color: var(--sage);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-dive-summary p,
.journey-dive-section p {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.6;
}

.journey-dive-summary p {
  color: var(--text);
}

.journey-dive-questions {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.55;
}

.modal-copy {
  width: min(94vw, 540px);
}

.modal-copy textarea {
  min-height: 150px;
  font-family: var(--font-ui);
  font-size: 14px;
}

.copy-fallback-note {
  margin: -4px 0 0;
}

.memorize-levels {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.memorize-levels button {
  flex: 1 1 auto;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-3);
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
}

.memorize-levels button.active {
  background: var(--gold);
  color: var(--primary-button-text);
}

.memorize-text {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--message-bg);
  color: var(--text);
  font-family: var(--font-scripture);
  font-size: 21px;
  line-height: 2;
  text-align: center;
  min-height: 140px;
}

.memo-word {
  transition: color 120ms ease;
}

.memo-revealed {
  color: var(--gold);
  font-weight: 600;
}

.memo-blank {
  color: var(--gold);
  letter-spacing: 2px;
  font-family: var(--font-ui);
  font-weight: 700;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 1160px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .daily-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .companion-panel {
    position: static;
    max-height: none;
  }

  .journey-studio-layout {
    grid-template-columns: 232px minmax(0, 1fr);
  }
}

@media (max-width: 840px) {
  body {
    font-size: 14.5px;
  }

  .entry-screen {
    padding: 20px;
  }

  .entry-panel {
    padding: 24px;
  }

  .entry-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .entry-topline .theme-toggle {
    width: min(100%, 240px);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    height: auto;
    grid-template-rows: none;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .rail-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .rail-button {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    padding: 10px 4px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }

  .rail-button > span:last-child {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rail-button::before {
    display: none;
  }

  .rail-footer {
    border-top: none;
    padding: 0;
  }

  .account-plan {
    max-width: 520px;
  }

  .daily-flow,
  .home-grid,
  .journey-library-heading,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .journey-tabs button {
    flex: 1 1 132px;
  }

  .journey-continue-hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .journey-hero-actions {
    justify-items: start;
  }

  .journey-studio-layout {
    grid-template-columns: 1fr;
  }

  .journey-day-nav {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .journey-day-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 240px);
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .journey-session {
    padding: 16px;
  }

  .journey-session-head {
    grid-template-columns: 1fr;
  }

  .journey-session-passage {
    min-width: 0;
  }

  .journey-step-actions {
    flex-wrap: wrap;
  }

  .journey-study-heading {
    flex-direction: column;
  }

  .journey-study-heading .ghost-button,
  .journey-study-badge {
    align-self: flex-start;
  }

  .journey-version-tabs button {
    flex: 1 1 68px;
  }

  .journey-scripture-list {
    max-height: none;
  }

  .home-hero-panel {
    grid-template-columns: 1fr;
  }

  .streak-card {
    min-width: 0;
    width: min(100%, 220px);
  }

  .workspace {
    padding: 18px;
  }

  .workspace-header,
  .reader-heading,
  .panel-heading {
    align-items: start;
    flex-direction: column;
  }

  .header-actions {
    justify-items: start;
    width: 100%;
  }

  .header-actions .theme-toggle {
    width: min(100%, 240px);
  }

  .bible-column {
    padding: 14px;
  }

  .bible-bar-lead,
  .bible-bar-trail {
    width: 100%;
    justify-content: space-between;
  }

  .bible-search-label,
  .bible-search-label input {
    width: 100%;
  }

  .bible-tools {
    flex: 1 1 100%;
  }

  .compare-grid {
    overflow-x: auto;
    grid-auto-flow: row;
  }

  .verse-text {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
