:root {
  --navy: #0f1a2e; --navy-2: #182540; --cream: #f3ead6; --gold: #e2b55a; --gold-2: #c99a3b;
  --bg: #fbf6ec; --card: #ffffff; --text: #22293a; --muted: #6b6a66; --accent: #b8862b;
  --line: #e9dfca; --chip: #f4ecdb; --glow: rgba(226, 181, 90, .35);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a2b; --card: #1b2439; --text: #efe8d8; --muted: #a9a394; --accent: #e2b55a;
    --line: #2d3750; --chip: #243049; --glow: rgba(226, 181, 90, .22);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }

/* ---------- brand bar + hero (always dark, like the poster) ---------- */
.brand { background: var(--navy); color: var(--cream); display: flex; align-items: center; gap: 10px; padding: 14px 24px;
  font: 600 1.05rem var(--serif); letter-spacing: .06em; text-transform: uppercase; }

.hero { position: relative; background: var(--navy); color: var(--cream); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 640px; overflow: hidden; }
/* Text panel: up to 640px wide, pushed in from the left edge on wide screens so it lines up near the content below. */
.hero-text { position: relative; z-index: 1; padding: 56px 40px 56px 24px; width: min(100%, 640px); margin-left: max(0px, calc(50vw - 660px)); }
.hero-art { background: url("img/light-wide.jpg") center 42% / cover no-repeat; }
/* fade the picture into the navy panel */
.hero-art { position: relative; }
.hero-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 0%, rgba(15, 26, 46, .6) 22%, transparent 50%); }

.hero h1 { font: 500 clamp(3rem, 7vw, 4.6rem)/1 var(--serif); margin: 0 0 18px; letter-spacing: .005em; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--gold); margin: 0 0 16px; max-width: 300px; }
.divider span { flex: 1; height: 1px; background: var(--gold); opacity: .8; }
.refcaps { color: var(--gold); font: 500 .95rem system-ui, sans-serif; letter-spacing: .28em; text-transform: uppercase; margin: 0 0 20px; }
.refcaps small { font-size: .7rem; letter-spacing: .18em; opacity: .8; }
.verse { margin: 0 0 22px; }
.verse p { margin: 0; font: 500 clamp(1.25rem, 1.1vw + .9rem, 1.5rem)/1.55 var(--serif); max-width: 36ch; }
.verse sup { color: var(--gold); font: .7rem system-ui, sans-serif; margin-right: 3px; vertical-align: .55em; }
.script { font: 400 2rem/1.1 "Great Vibes", cursive; color: var(--gold); margin: 0; padding-top: 18px; border-top: 1px solid rgba(226, 181, 90, .45); max-width: 320px; white-space: nowrap; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  /* Oversize the picture and pin it to the top so the man and his lantern fall BELOW the text, in the clear strip
     left by .hero-text's bottom padding; the overlay is heavy over the text and nearly clear around the lantern. */
  .hero-art { position: absolute; inset: 0; background-size: auto 130%; background-position: 50% 0; }
  .hero-art::before { left: 0; background: linear-gradient(180deg, rgba(15, 26, 46, .84) 0%, rgba(15, 26, 46, .84) 58%, rgba(15, 26, 46, .35) 72%, rgba(15, 26, 46, .12) 86%, var(--navy) 100%); }
  .hero-text { padding: 44px 20px 230px; width: 100%; margin-left: 0; text-shadow: 0 1px 10px rgba(15, 26, 46, .8); }
  .verse p { font-size: 1.18rem; }
}

/* ---------- finder ---------- */
main, footer.site { position: relative; max-width: 720px; margin: 0 auto; padding: 0 16px; }
main { padding-top: 40px; }
.prompt { font: 600 1.7rem var(--serif); margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 16px; }

form { display: flex; gap: 8px; align-items: stretch; }
textarea { flex: 1; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); resize: vertical; }
textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
button { font: inherit; border: 0; border-radius: 12px; padding: 0 20px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 600; }
button:disabled { opacity: .6; cursor: wait; }

#examples { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chip { background: var(--chip); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; font-weight: 400; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
#status { color: var(--muted); min-height: 1.5em; font-size: .9rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 0 0 12px; }
.ref { font-weight: 600; color: var(--accent); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ref small { color: var(--muted); font-weight: 400; }
.ref .actions { display: flex; gap: 12px; }
.ref .actions button { background: none; color: var(--muted); padding: 0; font-size: .85rem; font-weight: 400; text-decoration: underline; }
.ref .actions button:hover { color: var(--accent); }
.text { font: 500 1.2rem/1.6 var(--serif); margin: 6px 0 0; }
.text sup { color: var(--muted); font: .7rem system-ui, sans-serif; margin-right: 3px; }
.text .ctx { color: var(--muted); }
.chapter { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.hit { background: color-mix(in srgb, var(--gold) 22%, transparent); border-radius: 3px; }

/* verse for today + shared-link passage */
.feature { margin: 0 0 28px; }
.feature .label { display: flex; align-items: center; gap: 8px; color: var(--accent); font: 500 .85rem system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 8px; }
.feature .label small { color: var(--muted); letter-spacing: 0; text-transform: none; font-size: .8rem; }
.feature .card { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 10%, transparent); }
.feature .invite { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }
.feature .invite a { color: var(--accent); }
#shared { margin-top: 4px; }
#shared .line { display: none; width: 100%; text-align: left; background: var(--chip); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; font-weight: 400; }
#shared .line strong { color: var(--accent); }
#shared .line small { color: var(--muted); margin-left: 6px; text-decoration: underline; }
#shared.collapsed .full, #shared.collapsed .label { display: none; }
#shared.collapsed .line { display: block; }
#shared.collapsed .feature { margin-bottom: 12px; }

.topics { color: var(--muted); font-size: .9rem; margin: 4px 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.more { font: 600 .95rem system-ui, sans-serif; color: var(--muted); margin: 24px 0 10px; }
.crisis { background: color-mix(in srgb, var(--gold) 14%, var(--card)); border: 1px solid var(--accent); border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; }
.crisis ul { margin: 6px 0 0; padding-left: 20px; }
.note { border-left: 3px solid var(--gold); padding: 4px 0 4px 12px; margin: 0 0 14px; }
.note p { margin: 0; }
.note small { color: var(--muted); font-size: .75rem; }

footer.site { color: var(--muted); font-size: .8rem; padding: 28px 16px 44px; border-top: 1px solid var(--line); margin-top: 32px; }
footer.site p { margin: 0 0 8px; }
footer.site a { color: inherit; }

@media (max-width: 480px) {
  form { flex-direction: column; }
  form button { padding: 12px; }
}
