/* Devotion — Christ Gen Kleinmond
   Brand carried over from the campus site: paper, ink, teal, green, sand.
   Display type is Anton, interface is Mulish, and the reading itself is set in a
   serif, because 300 words of devotional is read, not scanned. */

@font-face {
  font-family: 'Anton';
  src: url('/fonts/anton.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Mulish';
  src: url('/fonts/mulish.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --paper: #FBF8F3;
  --paper-2: #F4EFE6;
  --ink: #16232B;
  --muted: #5E6C73;
  --teal: #14565B;
  --teal-deep: #0E3F43;
  --teal-soft: #E4EEEB;
  --green: #41805C;
  --green-strong: #2F6B49;
  --sand: #B98A3E;
  --sand-soft: #F7EEDC;
  --line: #E3DCCE;
  --white: #fff;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(22,35,43,.06), 0 12px 30px -18px rgba(22,35,43,.35);

  --display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --sans: 'Mulish', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: 1.12; margin: 0; }
.head { font-family: var(--sans); font-weight: 800; }

/* ---------------------------------------------------------------- chrome */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--teal-deep);
  color: #fff;
  padding: 12px 18px;
  display: flex; align-items: center; gap: 12px;
  padding-top: calc(12px + env(safe-area-inset-top));
}
header.top .brand { display: flex; flex-direction: column; line-height: 1.15; }
header.top .wordmark { height: 26px; width: auto; display: block; color: #FBF8F3; }
header.top .brand span { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #BFD8D3; margin-top: 3px; }
header.top .spacer { flex: 1; }
header.top a.pill {
  color: #fff; text-decoration: none; font-size: 13px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 7px 14px;
}
header.top a.pill:hover { background: rgba(255,255,255,.1); }

main { max-width: 720px; margin: 0 auto; padding: 22px 18px 96px; }

/* ---------------------------------------------------------------- type */
.eyebrow {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--teal); font-weight: 800; margin: 0 0 10px;
}
h1.day-title { font-size: clamp(30px, 7vw, 42px); color: var(--teal-deep); margin-bottom: 6px; }
.day-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.scripture {
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
  padding: 14px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 22px;
}
.scripture .ref { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.scripture .quote { font-family: var(--serif); font-size: 18px; line-height: 1.55; margin-top: 6px; }

.focus {
  font-family: var(--serif); font-size: 19px; line-height: 1.6;
  color: var(--teal-deep); font-style: italic;
  border-bottom: 1px solid var(--line); padding-bottom: 18px; margin: 0 0 20px;
}
.prose { font-family: var(--serif); font-size: 18px; line-height: 1.78; }
.prose p { margin: 0 0 18px; }

.block {
  margin: 26px 0; padding: 16px 18px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line);
}
.block.action { background: var(--sand-soft); border-color: #EBD9B4; }
.block h3 { font-size: 15px; color: var(--sand); }
.block.action h3 { color: #8E6A30; }
.block h3 { font-family: var(--sans); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.block p { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.7; }
.block ol { margin: 0; padding-left: 20px; font-family: var(--serif); font-size: 17px; line-height: 1.7; }
.block ol li { margin-bottom: 8px; }
.block.prayer { border-left: 3px solid var(--green); }

/* ---------------------------------------------------------------- readings */
.readings { margin: 30px 0 0; }
.readings h3 { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.readings ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.readings li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.readings li span.tag { width: 42px; flex: none; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.readings a { font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(20,86,91,.25); }

/* ---------------------------------------------------------------- nav */
.daynav { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; }
.daynav a, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 800; font-size: 15px;
  padding: 12px 18px; border-radius: var(--radius); text-decoration: none;
  border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer;
}
.btn.primary { background: var(--green-strong); border-color: var(--green-strong); color: #fff; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------------------------------------------------------------- journal */
textarea {
  width: 100%; min-height: 140px; resize: vertical;
  font-family: var(--sans); font-size: 16px; line-height: 1.65;
  padding: 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--white); color: var(--ink);
}
textarea:focus, input:focus { outline: 2px solid rgba(20,86,91,.35); outline-offset: 1px; }
input[type=email], input[type=password], input[type=time] {
  width: 100%; font-family: var(--sans); font-size: 16px; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); color: var(--ink);
}
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.55; }
.status { font-size: 13px; color: var(--muted); min-height: 18px; }
.status.ok { color: var(--green-strong); }
.status.err { color: #A0372F; }

.lockpanel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 22px;
}
.lockpanel h2 { font-size: 22px; color: var(--teal-deep); margin-bottom: 8px; }
.lockpanel p { margin: 0 0 16px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* ---------------------------------------------------------------- list */
ul.daylist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
ul.daylist li { border-bottom: 1px solid var(--line); }
ul.daylist a {
  display: flex; gap: 14px; align-items: baseline; padding: 14px 2px;
  text-decoration: none; color: var(--ink);
}
ul.daylist a:hover { background: rgba(20,86,91,.04); }
ul.daylist .num { font-family: var(--display); font-size: 20px; color: var(--teal); width: 34px; flex: none; }
ul.daylist .t { flex: 1; font-weight: 700; font-size: 16px; }
ul.daylist .d { font-size: 12px; color: var(--muted); }
ul.daylist .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
ul.daylist .dot.off { background: transparent; }

/* ---------------------------------------------------------------- tabbar */
nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: var(--white); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs a {
  flex: 1; text-align: center; padding: 10px 4px 11px; text-decoration: none;
  color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
nav.tabs a .glyph { display: block; font-size: 19px; line-height: 1.2; margin-bottom: 2px; }
nav.tabs a.on { color: var(--teal); }
@media (min-width: 760px) {
  /* Keep the same navigation on a wide screen, but as a strip under the header:
     hiding it entirely left desktop readers with no way to reach the month. */
  nav.tabs {
    position: static; justify-content: center; gap: 2px;
    border-top: 0; border-bottom: 1px solid var(--line);
  }
  nav.tabs a { flex: 0 0 auto; padding: 11px 20px; font-size: 12px; }
  nav.tabs a .glyph { display: none; }
  main { padding-bottom: 60px; }
}

/* ---------------------------------------------------------------- misc */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.small { font-size: 13px; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: var(--teal-deep); color: #fff; font-size: 14px; font-weight: 700;
  padding: 11px 18px; border-radius: 999px; z-index: 40; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.notice { border-left: 3px solid var(--sand); background: var(--sand-soft); padding: 12px 14px; font-size: 14px; border-radius: 0 3px 3px 0; }

/* ---------------------------------------------------------------- reflection notes */
.q + .q { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.qtext { margin: 0 0 8px; font-family: var(--serif); font-size: 17px; line-height: 1.65; color: var(--ink); display: flex; gap: 10px; }
.qnum {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal-soft); color: var(--teal);
  font-family: var(--sans); font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 4px;
}
.qnote textarea, #day-note textarea {
  min-height: 62px; font-family: var(--sans); font-size: 15.5px;
  background: var(--paper); border-style: dashed;
}
.qnote textarea:focus, #day-note textarea:focus { background: var(--white); border-style: solid; }
.status.note-status { display: block; font-size: 12px; margin-top: 5px; min-height: 15px; }

/* ---------------------------------------------------------------- install banner */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 35;
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px 14px; box-shadow: 0 18px 40px -18px rgba(22,35,43,.5);
}
.install-banner[hidden] { display: none; }
.install-banner img { border-radius: 9px; flex: none; }
.install-banner .ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-banner .ib-text b { font-size: 14px; }
.install-banner .ib-text span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.install-banner .btn { padding: 9px 14px; font-size: 13.5px; flex: none; }
.install-close {
  flex: none; width: 30px; height: 30px; border: 0; background: transparent;
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0;
}
@media (min-width: 760px) { .install-banner { bottom: 18px; left: auto; right: 18px; max-width: 460px; } }
