/* COME & SEE · Digital Devotional Companion
   Uses the same tokens, fonts and accents as the COME & SEE landing page. */
:root {
  --cream: #FDF4E4;
  --ivory: #FFFAF1;
  --peach: #FCEDD3;
  --sage-100: #F1F0DA;
  --sage-300: #E0DDB8;
  --sage-500: #7D8732;
  --green-700: #1F4D25;
  --green-900: #052F0C;
  --sunrise: #E94E06;
  --sunrise-ink: #B33800;
  --gold: #F2A93B;
  --ink: #2B2418;
  --ink-soft: #57493A;

  --font-display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --font-ui: "Montserrat", -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --shadow: 0 18px 40px -22px rgba(60, 35, 5, .4);
  --measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--green-700); text-underline-offset: .18em; }
a:hover { color: var(--sunrise-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--green-900); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 7vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 5vw, 1.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--green-900); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.eyebrow {
  font-family: var(--font-ui); font-size: .76rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--sunrise-ink); margin: 0 0 .6rem;
}
.eyebrow--center { text-align: center; }

.wordmark {
  font-family: var(--font-display); font-weight: 800; letter-spacing: .12em; color: var(--green-900);
  text-decoration: none; margin: 0;
}
.wordmark .amp { color: var(--sunrise); }
.wordmark--center { text-align: center; font-size: 1.6rem; margin-bottom: .4rem; }
.wordmark--small { font-size: 1.05rem; }
.wordmark--small:hover { color: var(--green-900); }

.swash { display: block; width: 7.5rem; height: .7rem; color: var(--sunrise); margin: .2rem auto 1.4rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.35rem; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-ui); font-weight: 700; font-size: .92rem; letter-spacing: .04em;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--green-900); color: #fff; }
.btn--primary:hover { background: var(--green-700); color: #fff; }
.btn--accent { background: var(--sunrise-ink); color: #fff; }
.btn--accent:hover { background: #8f2d00; color: #fff; }
.btn--ghost { background: transparent; color: var(--green-900); border-color: var(--sage-300); }
.btn--ghost:hover { border-color: var(--green-700); color: var(--green-900); }
.btn--done { background: var(--sage-100); color: var(--green-900); border-color: var(--sage-500); }
.btn--danger { background: transparent; color: var(--sunrise-ink); border-color: #e7b9a3; }
.btn--danger:hover { border-color: var(--sunrise-ink); color: #8f2d00; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.link-btn {
  background: none; border: 0; padding: 0; font: inherit; color: var(--green-700);
  text-decoration: underline; text-underline-offset: .18em; cursor: pointer;
}

/* ---------- Loading ---------- */
.loading { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--font-ui); color: var(--ink-soft); font-size: .95rem; }
.loading__dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--gold); }

/* ---------- Login ---------- */
.login {
  min-height: 100vh; padding: 2rem 1.1rem 3rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(40rem 20rem at 50% 105%, rgba(252, 189, 87, .45), transparent 65%),
    linear-gradient(180deg, var(--ivory) 0%, var(--peach) 100%);
}
.login__card {
  width: 100%; max-width: 32rem; background: var(--ivory); border: 1px solid var(--sage-300);
  border-radius: 20px; padding: 2.2rem 1.4rem 1.8rem; box-shadow: var(--shadow);
}
.login__title { text-align: center; font-size: clamp(1.7rem, 6.5vw, 2.3rem); margin: .6rem 0 .3rem; }
.login__intro { text-align: center; color: var(--ink-soft); }
.login__form { margin-top: 1.4rem; }
.label { display: block; font-family: var(--font-ui); font-weight: 600; font-size: .9rem; color: var(--green-900); margin-bottom: .45rem; }
.password-row { position: relative; }
.password-row input {
  width: 100%; min-height: 3.2rem; padding: .7rem 4.4rem .7rem 1rem; font-size: 1.1rem; font-family: var(--font-body);
  border: 2px solid var(--sage-300); border-radius: 12px; background: #fff; color: var(--ink);
}
.password-row input:focus { border-color: var(--green-700); outline: none; box-shadow: 0 0 0 3px rgba(242, 169, 59, .45); }
.show-pw { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); font-family: var(--font-ui); font-size: .85rem; font-weight: 600; }
.form-error { margin: .7rem 0 0; color: var(--sunrise-ink); font-family: var(--font-ui); font-size: .92rem; font-weight: 600; }
.login__form .btn { margin-top: 1rem; }
.login__help { text-align: center; margin: 1.2rem 0 0; font-family: var(--font-ui); font-size: .9rem; }
.login__back { margin-top: 1.4rem; font-family: var(--font-ui); font-size: .9rem; }

.help { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--sage-300); font-size: 1rem; }
.help__title { font-size: 1.35rem; }
.help h3 { font-size: 1.1rem; margin-top: 1.1rem; }
.help__note { color: var(--ink-soft); font-style: italic; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ivory); border-bottom: 1px solid var(--sage-300); position: sticky; top: 0; z-index: 5; }
.topbar__inner { max-width: 62rem; margin: 0 auto; padding: .75rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.topbar__nav { display: flex; gap: 1.1rem; align-items: center; }
.topbar__link { font-family: var(--font-ui); font-size: .85rem; font-weight: 600; color: var(--green-900); text-decoration: none; }
.topbar__link.link-btn { text-decoration: none; color: var(--green-900); font-size: .85rem; font-weight: 600; font-family: var(--font-ui); }
.topbar__link:hover { color: var(--sunrise-ink); }

/* ---------- Page ---------- */
.page { max-width: 62rem; margin: 0 auto; padding: 2rem 1.1rem 3.5rem; outline: none; }
.narrow { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.lede { color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.small { font-size: .95rem; }

.hero { text-align: center; margin-bottom: 2rem; }
.hero .swash { margin-bottom: 1.2rem; }
.hero p { max-width: 36rem; margin-left: auto; margin-right: auto; }

.panel { background: var(--ivory); border: 1px solid var(--sage-300); border-radius: var(--radius); padding: 1.4rem 1.2rem; box-shadow: var(--shadow); }
.section { margin-top: 2.6rem; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section__head h2 { margin: 0; }

/* Progress */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.stat { background: var(--sage-100); border-radius: 12px; padding: .9rem 1rem; }
.stat__num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--green-900); line-height: 1.1; }
.stat__label { font-family: var(--font-ui); font-size: .8rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .02em; }
.meter { margin-top: 1.1rem; }
.meter__row { display: flex; justify-content: space-between; font-family: var(--font-ui); font-size: .85rem; font-weight: 600; color: var(--green-900); margin-bottom: .35rem; }
.meter__track { height: .7rem; border-radius: 999px; background: var(--sage-300); overflow: hidden; }
.meter__fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--sunrise)); transition: width .3s ease; }
.meter--small { margin-top: .8rem; }
.meter--small .meter__track { height: .45rem; }

/* Theme cards */
.themes { display: grid; grid-template-columns: 1fr; gap: 1rem; list-style: none; padding: 0; margin: 0; }
.theme-card {
  display: block; height: 100%; text-decoration: none; color: inherit; background: var(--ivory);
  border: 1px solid var(--sage-300); border-left: 5px solid var(--sage-500); border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem; transition: border-color .15s, transform .15s;
}
.theme-card:hover { border-color: var(--green-700); border-left-color: var(--sunrise); color: inherit; }
.theme-card .eyebrow { margin-bottom: .2rem; }
.theme-card h3 { font-size: 1.45rem; margin-bottom: .1rem; }
.theme-card__meta { font-family: var(--font-ui); font-size: .85rem; color: var(--ink-soft); margin: 0; }
.theme-card__done { font-family: var(--font-ui); font-size: .85rem; font-weight: 600; color: var(--green-700); margin: .25rem 0 0; }

/* Theme page day list */
.crumb { font-family: var(--font-ui); font-size: .85rem; font-weight: 600; margin-bottom: 1.2rem; }
.crumb a { text-decoration: none; }
.days { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .75rem; }
.day {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: 12px;
  background: var(--ivory); border: 1px solid var(--sage-300); text-decoration: none; color: inherit;
}
a.day:hover { border-color: var(--green-700); color: inherit; }
.day__num { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-ui); font-weight: 700; font-size: .95rem; background: var(--sage-100); color: var(--green-900); }
.day--done .day__num { background: var(--green-900); color: #fff; }
.day__title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--green-900); line-height: 1.25; display: block; }
.day__sub { font-family: var(--font-ui); font-size: .82rem; color: var(--ink-soft); }
.day--soon { opacity: .7; border-style: dashed; background: transparent; }
.day--soon .day__title { font-family: var(--font-ui); font-size: .95rem; font-weight: 600; color: var(--ink-soft); }

/* Devotional */
.devo-head { margin-bottom: 1.6rem; }
.devo-head h1 { margin-bottom: .2rem; }
.devo-section { margin-top: 2.2rem; }
.devo-section > h2 {
  font-family: var(--font-ui); font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sunrise-ink); margin-bottom: .7rem;
}
.scripture { background: var(--sage-100); border-radius: var(--radius); padding: 1.2rem 1.2rem 1.1rem; border-left: 5px solid var(--sage-500); }
.scripture__ref { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--green-900); margin: 0 0 .4rem; }
.scripture__text { margin: .6rem 0 .5rem; }
.verse { margin: 0 0 .55em; line-height: 1.7; }
.verse__num { font-family: var(--font-ui); font-size: .68rem; font-weight: 700; color: var(--sage-500); vertical-align: super; line-height: 0; margin-right: .1rem; }
.scripture__translation { font-family: var(--font-ui); font-size: .78rem; font-weight: 600; color: var(--ink-soft); margin: .2rem 0 0; }
.scripture__invite { font-size: .95rem; color: var(--ink-soft); margin: .6rem 0 0; }
.scripture p:last-child { margin-bottom: 0; }
.encouragement p { margin-bottom: 1.05em; }
.question { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--green-900); line-height: 1.35; }
.reflection label { display: block; font-family: var(--font-ui); font-weight: 600; font-size: .9rem; color: var(--green-900); margin: 1rem 0 .45rem; }
.reflection textarea {
  width: 100%; min-height: 11rem; padding: .9rem 1rem; resize: vertical; font-family: var(--font-body); font-size: 1.08rem; line-height: 1.7;
  border: 2px solid var(--sage-300); border-radius: 12px; background: #fff; color: var(--ink);
}
.reflection textarea:focus { border-color: var(--green-700); outline: none; box-shadow: 0 0 0 3px rgba(242, 169, 59, .4); }
.reflection__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: .7rem; }
.save-status { font-family: var(--font-ui); font-size: .85rem; color: var(--ink-soft); }
.prayer { font-style: italic; font-size: 1.15rem; padding-left: 1.1rem; border-left: 3px solid var(--gold); }

.devo-actions { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--sage-300); display: grid; gap: .8rem; }
.devo-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.devo-nav .btn { width: 100%; }
.devo-actions .btn--back { justify-self: center; }

.notice { font-family: var(--font-ui); font-size: .9rem; background: var(--peach); border-radius: 12px; padding: .9rem 1rem; color: var(--ink); }
.notice strong { color: var(--green-900); }
.tools { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1rem; }
.confirm { margin-top: 1rem; padding: 1rem; border: 2px solid #e7b9a3; border-radius: 12px; background: #fff7f1; }
.confirm p { font-family: var(--font-ui); font-size: .92rem; margin-bottom: .8rem; }

.footer { text-align: center; padding: 2rem 1.1rem 2.6rem; font-family: var(--font-ui); font-size: .8rem; color: var(--ink-soft); border-top: 1px solid var(--sage-300); }
.footer p { margin: .2rem 0; }

@media (min-width: 640px) {
  .login__card { padding: 2.8rem 2.6rem 2.2rem; }
  .themes { grid-template-columns: 1fr 1fr; }
  .stats { gap: .8rem; }
  .panel { padding: 1.8rem 1.8rem; }
}
@media (min-width: 960px) {
  .themes { grid-template-columns: repeat(3, 1fr); }
  .page { padding-top: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
