:root {
  --obsidian: #0f0d0c;
  --obsidian-deep: #0b0908;
  --charcoal: #181512;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.065);
  --bone: #eae3d2;
  --alabaster: #f6efe1;
  --taupe: #928a81;
  --champagne: #d8c397;
  --old-gold: #c5a880;
  --cedar: #586f62;
  --ember: #b96a42;
  --line: rgba(216, 195, 151, 0.15);
  --line-strong: rgba(216, 195, 151, 0.28);
  --shadow: 0 34px 110px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--obsidian);
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 24%, rgba(216, 195, 151, 0.07), transparent 28rem),
    radial-gradient(circle at 78% 12%, rgba(185, 106, 66, 0.055), transparent 24rem),
    radial-gradient(circle at 18% 82%, rgba(216, 195, 151, 0.04), transparent 26rem),
    linear-gradient(145deg, #181512 0%, var(--obsidian) 46%, var(--obsidian-deep) 100%);
  color: var(--bone);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px);
  background-size: 58px 58px, 91px 91px;
  mix-blend-mode: soft-light;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

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

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.65fr);
  gap: 18px;
  width: min(1180px, 100%);
}

.auth-card,
.panel,
.metric,
.list-item,
.summary-item,
.supporter-grid article,
.promise-list div,
.scale-grid > div {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.026)),
    rgba(15, 13, 12, 0.64);
  color: var(--bone);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.auth-card {
  padding: 32px;
  border-radius: 22px;
}

.hero-card {
  grid-row: span 2;
}

.book-card {
  background:
    linear-gradient(180deg, rgba(15, 13, 12, 0.5), rgba(15, 13, 12, 0.9)),
    url("/assets/daily-reserve-cover.jpeg") center / cover;
}

.promise-card,
.gentle-note {
  margin: 18px 0;
  padding: 15px;
  border: 1px solid rgba(88, 111, 98, 0.32);
  border-radius: 16px;
  background: rgba(88, 111, 98, 0.12);
}

.promise-card p,
.gentle-note {
  color: var(--bone);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.scripture-accent {
  font-family: "Cormorant Garamond", Georgia, serif;
}

h1,
h2,
h3 {
  color: var(--alabaster);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth-card h1 {
  margin: 0 0 14px;
  font-size: clamp(2.35rem, 7vw, 5rem);
  line-height: 0.96;
}

.lead {
  color: var(--taupe);
  font-size: 1.08rem;
  line-height: 1.65;
}

.public-link {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 14px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(216, 195, 151, 0.07);
  color: var(--champagne);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mini-grid,
.book-stack,
.stack,
.list,
.pattern-list,
.step-panel {
  display: grid;
  gap: 12px;
}

.mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-grid article,
.book-stack div {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.mini-grid span,
.book-stack span,
.muted,
.brand small,
.metric span,
.summary-item span,
.supporter-grid span,
.promise-list span {
  color: var(--taupe);
}

.cover-preview {
  display: block;
  width: min(260px, 100%);
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  min-height: 100vh;
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  background: rgba(15, 13, 12, 0.52);
  color: var(--bone);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.brand strong,
.brand small {
  display: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 84%, rgba(216, 195, 151, 0.16), transparent 1.35rem),
    rgba(255, 255, 255, 0.035);
  color: var(--champagne);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.nav-tabs {
  display: grid;
  gap: 8px;
  width: 100%;
}

.nav-tab {
  position: relative;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 10px 8px;
  background: transparent;
  color: var(--taupe);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-tab::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: -5px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.nav-tab.active,
.nav-tab:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--bone);
  transform: translateY(-1px);
}

.nav-tab.active::before {
  background: var(--champagne);
  box-shadow: 0 0 18px rgba(216, 195, 151, 0.32);
}

.user-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 100%;
  margin-top: auto;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.user-card strong {
  display: block;
  max-width: 76px;
  overflow: hidden;
  color: var(--bone);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card small {
  display: block;
  color: var(--taupe);
  font-size: 0.62rem;
  text-transform: capitalize;
}

.user-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cedar);
  box-shadow: 0 0 0 4px rgba(88, 111, 98, 0.18);
}

.main {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 42px 30px 56px;
}

.topbar,
.section-head,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  width: min(880px, 100%);
  margin: 0 auto 22px;
}

.topbar h1 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 4vw, 3.8rem);
}

a {
  color: var(--champagne);
  font-weight: 700;
  text-decoration-color: rgba(216, 195, 151, 0.36);
  text-underline-offset: 4px;
}

a:hover {
  color: var(--alabaster);
}

.eyebrow,
label,
.metric span {
  color: var(--taupe);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 8px;
}

.hero-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.75fr);
  gap: 24px;
  width: min(880px, 100%);
  margin: 0 auto 22px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 72%, rgba(216, 195, 151, 0.07), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.024)),
    rgba(15, 13, 12, 0.68);
  box-shadow: var(--shadow);
  color: var(--bone);
  backdrop-filter: blur(18px);
}

.hero-band::before {
  position: absolute;
  inset: 18px;
  z-index: -1;
  border-radius: inherit;
  background: rgba(216, 195, 151, 0.055);
  filter: blur(36px);
  content: "";
}

.hero-band h2 {
  max-width: 680px;
  margin-bottom: 10px;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 0.98;
}

blockquote {
  margin: 0;
  align-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bone);
}

.scripture-accent {
  font-style: italic;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  letter-spacing: 0.015em;
  line-height: 1.7;
}

blockquote cite {
  display: block;
  margin-top: 14px;
  color: var(--champagne);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.book-hero {
  background:
    linear-gradient(90deg, rgba(15, 13, 12, 0.94), rgba(15, 13, 12, 0.58)),
    url("/assets/daily-reserve-cover.jpeg") center 58% / cover;
}

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

.grid.five {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.panel,
.metric,
.list-item {
  border-radius: 22px;
}

.panel {
  width: min(880px, 100%);
  margin: 0 auto 18px;
  padding: 24px;
}

label {
  display: grid;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(216, 195, 151, 0.16);
  border-radius: 16px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--bone);
  font-size: 16px;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(216, 195, 151, 0.52);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 4px rgba(216, 195, 151, 0.08);
}

::placeholder {
  color: rgba(234, 227, 210, 0.38);
}

option {
  background: var(--obsidian);
  color: var(--bone);
}

textarea {
  min-height: 136px;
  resize: vertical;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 8px;
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.check-grid input {
  width: auto;
}

.primary-button,
.secondary-button,
.ghost-button,
.inline-button {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 12px 17px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

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

.primary-button {
  background: var(--champagne);
  color: var(--obsidian);
  box-shadow: 0 16px 34px rgba(216, 195, 151, 0.16);
}

.primary-button:hover {
  box-shadow: 0 20px 44px rgba(216, 195, 151, 0.26);
}

.secondary-button,
.ghost-button {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.026);
  color: var(--bone);
}

.inline-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--champagne);
  font-size: 0.64rem;
}

.danger {
  color: var(--ember);
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  margin-bottom: 16px;
}

.inline-form.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(880px, 100%);
  margin: 0 auto 18px;
}

.summary-grid,
.supporter-grid,
.promise-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-item,
.supporter-grid article,
.promise-list div {
  display: grid;
  gap: 7px;
  padding: 15px;
  border-radius: 18px;
  box-shadow: none;
}

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

.chips span,
.active-chips button,
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--taupe);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chips span,
.pill {
  padding: 6px 10px;
}

.active-chips button {
  padding: 8px 12px;
}

.active-chips button:hover {
  border-color: var(--line-strong);
  color: var(--bone);
}

.metric {
  padding: 18px;
  box-shadow: none;
}

.metric strong {
  display: block;
  margin-top: 7px;
  color: var(--alabaster);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
}

.list-item {
  padding: 15px;
  box-shadow: none;
}

.premium-hero {
  min-height: 360px;
  align-items: end;
}

.practice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.sanctuary-card {
  border-color: rgba(88, 111, 98, 0.34);
  background:
    radial-gradient(circle at 85% 14%, rgba(88, 111, 98, 0.16), transparent 14rem),
    rgba(255, 255, 255, 0.04);
}

.practice-shell {
  padding-bottom: 0;
  overflow: hidden;
}

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

.step-dots {
  display: flex;
  gap: 7px;
  padding-top: 9px;
}

.step-dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(234, 227, 210, 0.2);
  transition: width 0.18s ease, background 0.18s ease;
}

.step-dots span.active {
  width: 30px;
  background: var(--champagne);
  box-shadow: 0 0 18px rgba(216, 195, 151, 0.22);
}

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

.scale-grid > div {
  padding: 15px;
  border-radius: 18px;
  box-shadow: none;
}

.scale-grid strong {
  color: var(--bone);
}

.scale-pills {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.scale-pills button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--taupe);
  font-size: 0.78rem;
  font-weight: 900;
}

.scale-pills button.active {
  border-color: rgba(216, 195, 151, 0.7);
  background: var(--champagne);
  color: var(--obsidian);
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 8px -24px 0;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  background: rgba(15, 13, 12, 0.78);
  backdrop-filter: blur(18px);
}

.admin-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
}

.onboarding-card {
  width: min(680px, 100%);
}

.pattern-bar {
  display: grid;
  grid-template-columns: 130px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--champagne);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 13, 12, 0.9);
  color: var(--bone);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.18s ease;
  backdrop-filter: blur(16px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.legal-page {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 30px;
}

.legal-hero {
  padding: 34px 0 18px;
}

.legal-hero h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.02;
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 12;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: auto;
    gap: 10px;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
    background: rgba(15, 13, 12, 0.9);
  }

  .brand {
    display: none;
  }

  .user-card {
    display: flex;
    width: auto;
    margin-top: 0;
    padding: 9px 10px;
    border-radius: 999px;
  }

  .user-card .user-dot,
  .user-card div {
    display: none;
  }

  .nav-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(86px, 1fr);
    gap: 7px;
    overflow-x: auto;
  }

  .nav-tab {
    min-height: 42px;
    padding: 9px 8px;
    white-space: nowrap;
    font-size: 0.68rem;
  }

  .nav-tab::before {
    display: none;
  }

  .main {
    padding: 22px 18px 104px;
  }

  .hero-band,
  .auth-layout,
  .mini-grid,
  .grid.two,
  .grid.five,
  .metric-grid,
  .inline-form,
  .summary-grid,
  .supporter-grid,
  .promise-list {
    grid-template-columns: 1fr;
  }

  .admin-settings,
  .scale-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .auth-screen,
  .main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .auth-card,
  .hero-band,
  .panel {
    border-radius: 20px;
    padding: 22px;
  }

  .check-grid {
    grid-template-columns: 1fr;
  }

  .scale-pills {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .sticky-actions {
    margin-right: -22px;
    margin-left: -22px;
  }
}
