/* Fonts (SIL Open Font License): Patrick Hand by Patrick Wagesreiter; Atkinson Hyperlegible by the Braille Institute. */
@font-face { font-family: "Patrick Hand"; src: url("../fonts/patrick-hand-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* FFBC — "Sunday School room" design.
   Plain white pages; manila-paper sheets for lessons and schedules; marker-blue handwriting for headings. */
:root {
  --paper: #ffffff;
  --manila: #ecdfb4;
  --manila-edge: #d8c58c;
  --ink: #26282c;
  --soft: #5b5f66;
  --rule: #e4e1d8;
  --blue: #1e4e9c;
  --blue-dark: #153a76;
  --red: #c23b2a;
  --hand: "Patrick Hand", "Comic Neue", "Segoe Print", cursive;
  --text: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font-family: var(--text); font-size: 18px; line-height: 1.6; color: var(--ink); background: var(--paper); }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--hand); font-weight: 400; color: var(--blue); line-height: 1.1; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.4vw, 2.8rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; max-width: 66ch; }
.wrap { width: min(1080px, 92vw); margin: 0 auto; }
.narrow { max-width: 720px; }
.soft { color: var(--soft); }
.small { font-size: .92rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: #fff; padding: .5rem 1rem; }
section { padding: clamp(2.8rem, 7vw, 5rem) 0; }
section + section { border-top: 1px solid var(--rule); }
.todo { background: #fff3b8; padding: 0 .2em; }

/* Buttons: plain, solid, no arrows */
.btn { display: inline-block; font: 700 1rem/1 var(--text); padding: .85rem 1.3rem; border-radius: 6px; background: var(--blue); color: #fff; text-decoration: none; border: 2px solid var(--blue); cursor: pointer; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-small { padding: .55rem .9rem; font-size: .92rem; }
.btn.disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 0; }

/* Header */
#site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; }
.brand strong { display: block; font-family: var(--hand); font-weight: 400; font-size: 1.55rem; color: var(--blue); line-height: 1; }
.brand small { display: block; font-size: .72rem; color: var(--soft); white-space: nowrap; }
#main-nav ul { display: flex; align-items: center; gap: .9rem; list-style: none; margin: 0; padding: 0; }
#main-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; white-space: nowrap; }
#main-nav a:hover { color: var(--blue); }
#main-nav a[aria-current="page"] { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; }
#main-nav .btn { color: #fff; }
#main-nav .btn-ghost { color: var(--blue); }
#main-nav .btn-ghost:hover { color: #fff; }
.menu-toggle { display: none; font: 700 .95rem var(--text); background: none; border: 2px solid var(--rule); border-radius: 6px; padding: .45rem .8rem; color: var(--ink); }
@media (max-width: 1180px) {
  .menu-toggle { display: block; }
  #main-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; max-height: calc(100vh - 68px); overflow-y: auto; background: #fff; border-bottom: 1px solid var(--rule); }
  #site-header.open #main-nav { display: block; }
  #main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .4rem 4vw 1.2rem; }
  #main-nav li a:not(.btn) { display: block; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
  #main-nav .nav-cta { margin-top: .7rem; }
  #main-nav .nav-cta .btn { display: block; text-align: center; }
}

/* The manila sheet — used for the hero, schedules and lessons */
.sheet { position: relative; background: var(--manila); border: 1px solid var(--manila-edge); border-radius: 3px; padding: clamp(1.6rem, 5vw, 3rem); box-shadow: 0 1px 0 var(--manila-edge), 0 14px 24px -18px rgba(70, 52, 10, .45); }
.sheet::before, .sheet::after { content: ""; position: absolute; top: -12px; width: 92px; height: 26px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(0, 0, 0, .05); }
.sheet::before { left: 8%; transform: rotate(-4deg); }
.sheet::after { right: 8%; transform: rotate(3deg); }
.sheet h1, .sheet h2 { color: var(--blue); }
.sheet .note { font-family: var(--hand); color: var(--red); font-size: 1.35rem; }

/* Home hero */
.hero { padding: clamp(2rem, 6vw, 4rem) 0 clamp(2.4rem, 6vw, 4.4rem); }
.hero .sheet { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.hero .lede { font-size: 1.2rem; max-width: 34ch; }
@media (max-width: 820px) { .hero .sheet { grid-template-columns: 1fr; } }

/* Sunday program list (looks like the printed program) */
.program { background: #fffdf3; border: 1px dashed var(--manila-edge); padding: 1.2rem 1.3rem; border-radius: 3px; }
.program h2 { font-size: 1.7rem; margin-bottom: .6rem; }
.services { list-style: none; padding: 0; margin: 0; }
.services li { display: flex; gap: 1rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px dotted #c9b77e; }
.services li:last-child { border-bottom: 0; }
.svc-day { flex: 0 0 6.4rem; font-weight: 700; }
.svc-name { flex: 1; }
.svc-time { white-space: nowrap; font-weight: 700; color: var(--blue); }
.tag { font-size: .78rem; font-weight: 700; color: var(--red); margin-left: .35rem; }
@media (max-width: 520px) { .services li { flex-wrap: wrap; gap: 0 .8rem; } .svc-day { flex-basis: 100%; font-size: .85rem; color: var(--soft); } }
.next-note { margin-top: 1rem; }
.next-note strong { font-weight: 700; }

/* Page title (inner pages) */
.page-title { padding: clamp(2.4rem, 6vw, 4rem) 0 0; }
.page-title p { font-size: 1.15rem; color: var(--soft); max-width: 58ch; }
.page-title + section { border-top: 0; }

/* Two-column text + aside */
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Simple lists with rules instead of card grids */
.ruled { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.ruled > li { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; }
.ruled > li > strong { font-family: var(--hand); font-weight: 400; font-size: 1.45rem; color: var(--blue); line-height: 1.2; }
.ruled > li p { margin: 0; }
@media (max-width: 640px) { .ruled > li { grid-template-columns: 1fr; gap: .2rem; } }

.verse { font-size: 1.15rem; border-left: 4px solid var(--manila-edge); padding: .2rem 0 .2rem 1rem; margin: 1.4rem 0; max-width: 52ch; }
.verse cite { display: block; font-style: normal; font-size: .9rem; color: var(--soft); margin-top: .3rem; }

.people { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1rem; }
.person { display: flex; align-items: center; gap: .8rem; }
.person img, .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 64px; }
.avatar { display: grid; place-items: center; background: var(--manila); color: var(--blue); font-family: var(--hand); font-size: 1.5rem; }
.person h3 { font-family: var(--text); font-weight: 700; font-size: 1rem; color: var(--ink); margin: 0; }
.person p { margin: 0; font-size: .9rem; color: var(--soft); }

.photo { margin: 0; }
.photo img { border-radius: 3px; border: 8px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); transform: rotate(-1deg); }
.photo figcaption { font-family: var(--hand); color: var(--soft); font-size: 1.15rem; margin-top: .4rem; }

/* Embeds */
.ratio { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #000; }
.ratio iframe, .cal iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ratio-map { aspect-ratio: 4 / 3; background: var(--rule); }
.ratio-vertical { aspect-ratio: 9 / 16; max-width: 320px; }
.cal { position: relative; height: 640px; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.form-frame iframe { width: 100%; height: 900px; border: 0; }
.fb-wrap { max-width: 500px; }
.fb-tap { border: 1px solid var(--rule); border-radius: 6px; padding: 1.1rem; }
.setup-note { background: #fff8d6; border: 1px dashed #c9a94a; color: #5f4b10; border-radius: 4px; padding: .9rem 1rem; font-size: .92rem; }
.setup-note code { background: rgba(0,0,0,.06); padding: 0 .3em; border-radius: 3px; }

/* Give */
.give-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.give-card { background: #fffdf3; border: 1px dashed var(--manila-edge); border-radius: 3px; padding: 1.3rem; }
.give-card h3 { margin-bottom: .2rem; }
.give-card .eyebrow { display: block; font-size: .92rem; color: var(--soft); margin-bottom: .2rem; }
.give-row { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: .5rem; align-items: center; padding: .55rem 0; border-bottom: 1px dotted #c9b77e; }
.give-row strong { overflow-wrap: anywhere; }
.copy { font: 700 .82rem var(--text); border: 1px solid var(--blue); color: var(--blue); background: #fff; border-radius: 4px; padding: .3rem .6rem; cursor: pointer; }
.qr { width: 180px; margin: .5rem 0 1rem; }

/* Questions (details) */
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2.5rem 1rem 0; font-weight: 700; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: .7rem; font-family: var(--hand); font-size: 1.8rem; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1rem; }

/* Know God: chronological chart */
.chart-wrap { overflow-x: auto; padding: 18px 2px 6px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
.chart { min-width: 980px; padding: 2rem 2rem 1.6rem; }
.chart ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(11, 1fr); position: relative; }
.chart ol::before { content: ""; position: absolute; left: 3%; right: 3%; top: 21px; border-top: 3px solid var(--blue); }
.chart li { text-align: center; position: relative; padding: 0 .2rem; }
.chart a { text-decoration: none; color: var(--ink); display: block; }
.chart .pt { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto .5rem; border-radius: 50%; background: #fff; border: 3px solid var(--blue); font-family: var(--hand); font-size: 1.3rem; color: var(--blue); position: relative; }
.chart li.cross .pt { background: var(--red); border-color: var(--red); color: #fff; }
.chart li.done .pt { background: var(--blue); color: #fff; }
.chart .lbl { font-family: var(--hand); font-size: 1.12rem; line-height: 1.15; display: block; }
.chart .bk { font-size: .78rem; color: var(--soft); display: block; margin-top: .15rem; }
.chart-hint { font-size: .9rem; color: var(--soft); margin-top: .6rem; }

/* Know God: studies */
.study { padding: 2.4rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 80px; }
.study:first-of-type { border-top: 0; }
.study-head { display: flex; gap: 1rem; align-items: baseline; }
.study-head .no { font-family: var(--hand); font-size: 2.2rem; color: var(--red); line-height: 1; min-width: 2.2rem; }
.study-head h3 { font-size: 2rem; margin: 0; }
.study .ask { font-size: 1.08rem; color: var(--soft); margin: .3rem 0 1rem 3.2rem; }
.study-body { margin-left: 3.2rem; }
@media (max-width: 560px) { .study .ask, .study-body { margin-left: 0; } }
.read { display: inline-flex; gap: .5rem; align-items: center; background: #fffdf3; border: 1px dashed var(--manila-edge); padding: .5rem .8rem; border-radius: 4px; margin-bottom: 1rem; font-weight: 700; }
.think { background: var(--manila); border-radius: 3px; padding: 1rem 1.2rem; margin: 1.2rem 0 1rem; }
.think h4 { font-family: var(--hand); font-weight: 400; font-size: 1.4rem; color: var(--blue); margin: 0 0 .4rem; }
.think ol { margin: 0; padding-left: 1.2rem; }
.think li { margin-bottom: .35rem; }
.notes label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.notes textarea { width: 100%; min-height: 90px; font: 1rem/1.5 var(--text); padding: .7rem .8rem; border: 1px solid var(--rule); border-radius: 4px; background-image: repeating-linear-gradient(#fff 0 27px, #e9eef7 27px 28px); line-height: 28px; }
.study-foot { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: .8rem; }
.done-btn[aria-pressed="true"] { background: #fff; color: var(--blue); }
.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.contrast div { border-top: 3px solid var(--ink); padding-top: .5rem; font-size: .98rem; }
.contrast div:last-child { border-color: var(--blue); }
.contrast strong { display: block; font-family: var(--hand); font-weight: 400; font-size: 1.35rem; color: var(--blue); }
@media (max-width: 560px) { .contrast { grid-template-columns: 1fr; } }
.chapter-video { margin-top: 1rem; }

/* Footer */
#site-footer { background: #f6f4ee; border-top: 1px solid var(--rule); padding: 3rem 0 1.6rem; font-size: .95rem; }
#site-footer h2 { font-family: var(--text); font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: .6rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid p { margin: 0 0 .4rem; }
.footer-grid li { margin-bottom: .3rem; }
.social { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: .8rem; }
.footer-bottom { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); font-size: .82rem; color: var(--soft); }

/* Messenger button */
.msgr-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: .5rem; background: #0a7cff; color: #fff; text-decoration: none; font-weight: 700; padding: .75rem 1.05rem; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.msgr-fab:hover { background: #0066d6; color: #fff; }
@media (max-width: 520px) { .msgr-fab span { display: none; } .msgr-fab { padding: .85rem; } }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; padding-left: 2.4rem; position: relative; margin-bottom: .9rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -.1rem; font-family: var(--hand); font-size: 1.6rem; color: var(--red); }

.split.solo { grid-template-columns: 1fr; }

/* "Where do I start" jump list */
.jump { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.jump li { border-bottom: 1px solid var(--rule); }
.jump a { display: block; padding: .9rem 0; font-family: var(--hand); font-size: 1.45rem; text-decoration: none; color: var(--blue); }
.jump a:hover { text-decoration: underline; }
.jump-inline { display: flex; flex-wrap: wrap; gap: .6rem; border: 0; }
.jump-inline li { border: 0; }
.jump-inline a { display: inline-block; padding: .45rem .9rem; font-size: 1.25rem; background: var(--manila); border: 1px solid var(--manila-edge); border-radius: 3px; }
section[id] { scroll-margin-top: 76px; }

/* The path: four steps of Matthew 28:19-20 */
.path4 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.path4::before { content: ""; position: absolute; left: 12%; right: 12%; top: 25px; border-top: 3px solid var(--blue); }
.path4 li { text-align: center; padding: 0 .6rem; position: relative; }
.path4 a { text-decoration: none; color: var(--ink); display: block; }
.path4 .pt { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto .6rem; border-radius: 50%; background: #fff; border: 3px solid var(--blue); font-family: var(--hand); font-size: 1.5rem; color: var(--blue); position: relative; }
.path4 li.here .pt { background: var(--blue); color: #fff; }
.path4 .lbl { font-family: var(--hand); font-size: 1.45rem; line-height: 1.15; display: block; color: var(--blue); }
.path4 .bk { font-size: .9rem; color: var(--soft); display: block; margin-top: .3rem; font-style: italic; }
@media (max-width: 700px) {
  .path4 { grid-template-columns: 1fr; }
  .path4::before { left: 25px; right: auto; top: 25px; bottom: 25px; border-top: 0; border-left: 3px solid var(--blue); }
  .path4 li { text-align: left; padding: 0 0 1.1rem 0; }
  .path4 a { display: grid; grid-template-columns: 50px 1fr; column-gap: 1rem; align-items: start; }
  .path4 .pt { margin: 0; grid-row: span 2; }
}
.commission { font-size: 1.15rem; max-width: 62ch; margin-top: 1.4rem; }
.commission cite { display: block; font-style: normal; font-size: .9rem; color: var(--soft); margin-top: .3rem; }
.ifyou { list-style: none; padding: 0; margin: 1rem 0 0; }
.ifyou li { padding: .9rem 0 .9rem 1.2rem; border-left: 3px solid var(--manila-edge); margin-bottom: .6rem; }
.ifyou strong { display: block; }
.ifyou p { margin: .2rem 0 0; }
.step-tag { font-family: var(--hand); font-size: 1.3rem; color: var(--red); margin-bottom: .2rem; display: block; }
.crisis { background: #eef3fb; border: 1px solid #c7d5ee; border-radius: 4px; padding: .8rem 1rem; font-size: .95rem; margin: 1rem 0; }
