/* Devotion Schedule. Colour tokens are kept at the top so they can be matched to the main site. */
:root {
  /* Exact values from the main site */
  --wine-black: #1c0e12;
  --wine: #341019;
  --wine-light: #4a1826;
  --gold: #c69a5e;
  --gold-soft: #e3c690;
  --dust: #c98a92;
  --cream: #f2e6d9;
  --cream-dim: #cbb9ab;
  --line: rgba(230, 201, 150, 0.18);
  /* Names used below */
  --bg: var(--wine-black);
  --surface: rgba(52, 16, 25, 0.55);
  --surface-2: var(--wine);
  --text: var(--cream);
  --muted: var(--cream-dim);
  --accent: var(--gold-soft);
  --accent-ink: var(--wine-black);
  --rose: var(--dust);
  --ok: #9cc7a4;
  --warn: var(--gold);
  --danger: #e08a8a;
  --radius: 2px;
  --font-body: 'Sora', sans-serif;
  --font-display: 'Fraunces', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-weight: 300; font-size: 16px; line-height: 1.65;
}
a { color: inherit; }
strong { font-weight: 500; color: var(--cream); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 8vw, 3.2rem); line-height: 1.08; }
h2 { font-size: 1.45rem; color: var(--gold-soft); }
h3 { font-size: 1.15rem; }
h4 { margin: 1.2em 0 .4em; font-size: .95rem; font-weight: 500; color: var(--cream); }
p { margin: 0 0 .9em; }
[hidden] { display: none !important; }

.topnav {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 16px; background: rgba(28, 14, 18, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
@media (min-width: 700px) { .topnav { padding: 24px 32px; } }
.topnav .mark { position: relative; display: inline-block; font-family: var(--font-display); font-style: italic; font-size: 1.05rem; letter-spacing: .02em; }
.topnav .mark::after {
  content: 'PODCAST'; position: absolute; top: -9px; right: -2px;
  font-family: var(--font-body); font-style: normal; font-size: .55rem; font-weight: 600; letter-spacing: .14em;
  color: var(--cream); opacity: .28; pointer-events: none;
}
.topnav .mark span { color: var(--gold-soft); }
.topnav a.back { font-size: .85rem; color: var(--cream-dim); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; white-space: nowrap; }
.topnav a.back:hover { color: var(--gold-soft); border-color: var(--gold-soft); }

main { max-width: 980px; margin: 0 auto; padding: 0 16px 60px; }
@media (min-width: 700px) { main { padding: 0 32px 100px; } }
header.gh { padding: 56px 0 40px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
@media (min-width: 700px) { header.gh { padding: 90px 0 56px; } }
header.gh .kicker { color: var(--gold-soft); font-size: .82rem; display: block; margin-bottom: 18px; }
header.gh .dek { color: var(--cream-dim); font-size: 1.05rem; max-width: 640px; }
header.gh .dek.small { font-size: .92rem; margin-top: 18px; }
a.inline { color: var(--gold-soft); border-bottom: 1px solid var(--gold-soft); text-decoration: none; }
a.inline:hover { color: var(--cream); border-color: var(--cream); }
.sub, .hint { color: var(--muted); font-size: .9rem; }
.note { padding: 12px 16px; border-radius: 2px; background: rgba(198,154,94,0.08); border-left: 2px solid var(--gold); color: var(--cream-dim); margin-top: 22px; max-width: 640px; }
.note.warn { border-left-color: var(--warn); }

.section-title { margin-top: 12px; }
.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .card-grid { grid-template-columns: 1fr 1fr; } .card-grid .section-title { grid-column: 1 / -1; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; margin: 0 0 16px;
}
.card.narrow { max-width: 520px; margin: 24px auto; }
.mode-card { display: flex; flex-direction: column; }
.mode-card > .btn, .mode-card > .row { margin-top: auto; padding-top: 12px; }
.mode-card ol, .mode-card ul, .prose ul { padding-left: 1.2em; margin: 0 0 .8em; }
.mode-card li, .prose li { margin-bottom: .35em; }

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 12px 24px; border-radius: 2px; border: 1px solid var(--line);
  background: transparent; color: var(--cream); font-family: var(--font-body); font-size: .88rem; font-weight: 400;
  letter-spacing: .02em; cursor: pointer; text-decoration: none; transition: all .3s ease;
}
.btn:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.btn.primary { background: var(--gold-soft); color: var(--wine-black); border-color: var(--gold-soft); font-weight: 500; }
.btn.primary:hover { background: var(--cream); border-color: var(--cream); color: var(--wine-black); }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: .92rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.file { position: relative; overflow: hidden; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

label { display: block; margin: 12px 0 6px; font-weight: 400; font-size: .9rem; color: var(--cream); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
input[type=text], input[type=password], textarea {
  width: 100%; padding: 11px 12px; border-radius: 2px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px;
}
textarea { resize: vertical; }
input:disabled, textarea:disabled { opacity: .7; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.error { color: var(--danger); min-height: 1.2em; margin: 8px 0; }
.code {
  font-family: var(--font-body); font-weight: 600; font-size: 1.15rem; letter-spacing: .08em; color: var(--gold-soft);
  padding: 12px; background: rgba(198,154,94,0.10); border: 1px dashed var(--gold); border-radius: 2px; text-align: center;
}

/* app */
#app { padding-top: 20px; }
.app-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.badge { text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-weight: 600; color: var(--wine-black); background: var(--gold-soft); padding: 3px 9px; border-radius: 999px; }
.sync { color: var(--muted); font-size: .88rem; }
.sync.bad { color: var(--warn); }
.view-as { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.seg { min-height: 40px; padding: 6px 16px; border-radius: 2px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.seg[aria-pressed=true] { background: var(--wine-light); border-color: var(--gold-soft); color: var(--gold-soft); }
.tabs {
  position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  background: var(--bg); padding: 8px 0; margin: 8px 0 12px; border-bottom: 1px solid var(--line);
}
.tabs button { min-height: 44px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; }
.tabs button[aria-selected=true] { color: var(--gold-soft); border-bottom-color: var(--gold-soft); }

.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.day-nav h2 { font-size: 1.15rem; margin: 0; text-align: center; }
.progress { position: relative; height: 30px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.progress .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--dust), var(--gold)); }
.progress span { position: relative; display: block; text-align: center; line-height: 30px; font-size: .85rem; font-weight: 500; color: var(--cream); }

.section h3 { color: var(--cream); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.time { font-family: var(--font-body); font-size: .8rem; color: var(--muted); font-weight: 400; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; margin: 0; border-top: 1px solid var(--line); font-weight: 400; cursor: pointer; }
.task input:checked + span { color: var(--muted); text-decoration: line-through; }

.scale { border: 0; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.scale legend { font-weight: 600; font-size: .95rem; margin-bottom: 4px; padding: 0; }
.pip { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.pip[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pip:disabled { cursor: default; }
.scale-ends { color: var(--muted); font-size: .8rem; margin-left: 4px; }

.status { font-weight: 700; }
.status.approved { color: var(--ok); }
.status.revisit { color: var(--warn); }
.status.none { color: var(--muted); font-weight: 400; }
blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; white-space: pre-wrap; }

details.section > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-size: 1.15rem; min-height: 32px; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::after { content: "+"; font-family: var(--font-body); color: var(--accent); margin-left: 10px; }
details.section[open] > summary::after { content: "−"; }
.count { margin-left: auto; font-family: var(--font-body); font-size: .85rem; color: var(--muted); }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.two label { font-weight: 400; color: var(--muted); }
.opts { list-style: none; padding: 0; margin: 12px 0; }
.opts li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.opts li textarea { padding: 8px 10px; resize: none; line-height: 1.35; }
.opts li:not(.on) textarea, .opts li:not(.on) span { color: var(--muted); }
.icon { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.icon:hover { color: var(--danger); border-color: var(--danger); }

.week { list-style: none; padding: 0; margin: 0; }
.week li { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .93rem; }
@media (min-width: 600px) { .week li { grid-template-columns: 1.2fr 1fr 1fr 1fr; } }
.card.danger { border-color: rgba(214, 90, 90, .5); }
.empty { text-align: center; }

.prose h3 { margin-top: 1em; }
.adults { margin-top: 12px; }

.gate { position: fixed; inset: 0; z-index: 50; background: rgba(28, 14, 18, .96); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate-box { max-width: 480px; background: var(--wine); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

.site-footer { border-top: 1px solid var(--line); padding: 40px 16px; text-align: center; color: var(--cream-dim); font-size: .8rem; }
.site-footer .mark { font-family: var(--font-display); font-style: italic; color: var(--gold-soft); }
.site-footer a { color: var(--muted); }

.code span { display: block; white-space: nowrap; }
