/* Scripture Reading Challenge - shared styles
   Palette: plum purple with warm gold accents and soft lavender neutrals.
   (Variable names "rose" and "teal" are kept so the pages don't need changes:
   "rose" = the main plum color, "teal" = the gold accent.) */
:root {
  --bg: #f8f5fa;
  --card: #ffffff;
  --ink: #241f2b;
  --muted: #6c6475;
  --line: #e7dff0;
  --rose: #a98bd6;          /* light plum: fills, meter, map */
  --rose-strong: #6b3fa0;   /* deep plum: buttons, links, emphasis */
  --rose-soft: #efe7f8;     /* lavender: tiles, chips */
  --teal: #8a5a00;          /* gold accent text */
  --teal-soft: #fbefd4;     /* pale gold */
  --track: #ece5f3;
  --on-strong: #ffffff;
  --shadow: 0 1px 2px rgba(60, 30, 90, .05), 0 8px 24px rgba(60, 30, 90, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16141a;
    --card: #211e27;
    --ink: #f1eef5;
    --muted: #aaa3b4;
    --line: #35303e;
    --rose: #b69ae3;
    --rose-strong: #c8b0f0;
    --rose-soft: #2f2740;
    --teal: #f0c46c;
    --teal-soft: #352d1c;
    --track: #2e2937;
    --on-strong: #1c1426;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, sans-serif;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 12px 16px 48px; }

/* ---------- Top menu (built by common.js) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.langbar { max-width: 680px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 6px 16px 0; }
.langbar .brand { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 15px; color: var(--rose-strong); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.lang button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 5px 11px; color: var(--muted); cursor: pointer; }
.lang button.on { background: var(--rose-strong); color: var(--on-strong); }
.menu { max-width: 680px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px 4px; }
.menu a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600;
  padding: 6px 2px 7px; border-radius: 12px; position: relative;
}
.menu a svg { width: 22px; height: 22px; }
.menu a.on { color: var(--rose-strong); }
.menu a.on::after {
  content: ""; position: absolute; bottom: -4px; left: 28%; right: 28%; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--rose-strong);
}
.menu a:active { background: var(--rose-soft); }

/* Jump links to sections on the current page */
.jump { max-width: 680px; margin: 0 auto; display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; scrollbar-width: none; border-top: 1px solid var(--line); }
.jump::-webkit-scrollbar { display: none; }
.jump a {
  flex: none; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); white-space: nowrap;
}
.jump a.on { background: var(--rose-soft); border-color: transparent; color: var(--rose-strong); }
section[id], [data-section] { scroll-margin-top: 160px; }

/* "Go to" links inside cards that point to other pages or sections */
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.go {
  display: inline-flex; align-items: center; gap: 4px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--rose-strong);
  padding: 7px 12px; border-radius: 999px; background: var(--rose-soft);
}
.go::after { content: "\203A"; font-size: 18px; line-height: 1; margin-left: 2px; }
.go.teal { color: var(--teal); background: var(--teal-soft); }
.next-page { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.next-page a { flex: 1; text-decoration: none; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; font-size: 15px; }
.next-page a small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.next-page a.fwd { text-align: right; }

header { text-align: center; padding: 14px 0 6px; }
header.page { padding: 18px 0 2px; }
header.page h1 { font-size: clamp(26px, 6.5vw, 34px); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--rose-strong); }
h1 { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: clamp(28px, 7vw, 40px); line-height: 1.1; margin: 6px 0 8px; }
h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 22px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0; }
.chip {
  display: inline-block; margin-top: 14px; padding: 8px 14px; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal); font-weight: 600; font-size: 14px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; margin-top: 16px; box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 14px; }

/* Meter */
.big { font-family: Fraunces, Georgia, serif; font-size: 44px; font-weight: 700; line-height: 1; margin: 14px 0 2px; }
.big small { font-family: Inter, sans-serif; font-size: 16px; font-weight: 500; color: var(--muted); }
.bar { height: 18px; background: var(--track); border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.bar > span { display: block; height: 100%; width: 0; background: var(--rose); border-radius: 999px; transition: width 1.2s cubic-bezier(.2,.7,.2,1); }
.meter-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.meter-row b { color: var(--ink); }

/* Forms */
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rose); outline-offset: 1px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row > *, .row-3 > *, .row-verse > * { min-width: 0; }
input[type="date"] { min-width: 0; display: block; -webkit-appearance: none; appearance: none; min-height: 48px; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.row-verse { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 10px; }
.btn {
  width: 100%; margin-top: 18px; padding: 14px; border: 0; border-radius: 12px;
  background: var(--rose-strong); color: var(--on-strong); font: inherit; font-weight: 600; font-size: 17px; cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--rose-strong); border: 1px solid var(--line); }
.msg { margin-top: 12px; font-size: 15px; }
.msg.err { color: var(--rose-strong); font-weight: 500; }
.empty { color: var(--muted); font-size: 14px; font-style: italic; }
footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 28px; }

/* ---------- Today's reading ---------- */
.today { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.today .tt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rose-strong); }
.today .tr { font-family: Fraunces, Georgia, serif; font-size: 22px; font-weight: 700; line-height: 1.25; margin-top: 2px; }
.today .tn { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------- Streak dots ---------- */
.streak { margin-top: 14px; }
.streak-label { font-weight: 600; font-size: 15px; }
.dots { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin-top: 8px; max-width: 360px; }
.dot { aspect-ratio: 1; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); }
.dot.on { background: var(--rose); border-color: var(--rose); }
.dots-note { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Badges ---------- */
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; background: var(--card); border: 1px dashed var(--line); text-align: center; }
.badge .bi { font-size: 24px; line-height: 1.1; filter: grayscale(1); opacity: .35; }
.badge .bn { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.badge.on { border-style: solid; border-color: transparent; background: var(--rose-soft); }
.badge.on .bi { filter: none; opacity: 1; }
.badge.on .bn { color: var(--ink); }
.badges.compact { grid-template-columns: repeat(9, 1fr); gap: 4px; }
.badges.compact .badge { padding: 6px 0; border: 0; background: none; }
.badges.compact .bn { display: none; }
.badges.compact .bi { font-size: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Celebration banner ---------- */
.celebrate {
  margin-top: 16px; padding: 14px 16px; border-radius: 14px; text-align: center; font-weight: 600;
  background: var(--rose-strong); color: var(--on-strong); animation: pop .5s cubic-bezier(.2,1.4,.4,1);
}
.celebrate small { display: block; font-weight: 400; opacity: .9; margin-top: 2px; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .celebrate { animation: none; } }

/* ---------- Amen button ---------- */
.amen {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card);
  color: var(--muted); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.amen .ai { font-size: 16px; line-height: 1; }
.amen.on { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.amen:disabled { opacity: .6; cursor: default; }
.amen.bump { animation: pop .35s ease; }

/* ---------- Site footer ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 28px; padding: 18px 16px 28px; font-size: 13px; color: var(--muted); }
.sf-row { max-width: 680px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; }
.sf-left { text-align: left; }
.sf-right { text-align: right; }
.site-foot a { color: var(--rose-strong); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.site-foot a:hover { text-decoration: underline; }
.sf-note { max-width: 680px; margin: 14px auto 0; text-align: center; font-size: 12px; }
.wrap { padding-bottom: 8px; }

/* ---------- Policy pages ---------- */
.policy h2 { margin-top: 22px; font-size: 20px; }
.policy h2:first-child { margin-top: 0; }
.policy p, .policy li { font-size: 15px; line-height: 1.6; }
.policy ul { padding-left: 20px; }
.policy a { color: var(--rose-strong); font-weight: 600; }
