/* START HERE (start/start.js): the window, in the shared frame (nav/ui.css), and its content. The welcome from David's site
   begins in his printed panels' own look (an olive band with a gold ring, a yellow tag, heavy black type with a red line, on
   paper) and gives way, down a trail, to ours: the warm page, the serif, the verses. The steps, the questions, and the first
   steps are the site's plainest page: a column of words, one thing to do at a time. */
.sx { position: fixed; inset: 0; z-index: 2147483000; background: var(--bg); color: var(--ink); overflow: hidden; opacity: 0; transition: opacity 0.18s ease;
  --sx-olive: #56652A; --sx-ring: #C8963E; --sx-tag: #F2CE1B; --sx-red: #B4282E; --sx-black: #1B1B19; --sx-paper: #F6F4EC; }
.sx[hidden] { display: none; }
.sx.open { opacity: 1; }
.sx-box { position: absolute; inset: 0; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; }
.sx .ui-head { padding: calc(10px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 8px calc(14px + env(safe-area-inset-left)); }
.sx-top { flex: none; border-bottom: 1px solid var(--rule); background: var(--bg); }
.sx-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sx-col { max-width: 620px; margin: 0 auto; padding: 20px calc(18px + env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left)); }

/* the words */
.sx-h { margin: 6px 0 12px; font: italic 600 clamp(26px, 6.4vw, 32px)/1.15 Georgia, "Times New Roman", serif; color: var(--ink); }
.sx-h3 { margin: 30px 0 12px; font: 700 13px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sx-col p, .sx-ours p, .sx-ans p { margin: 0 0 14px; font: 18px/1.6 Georgia, "Times New Roman", serif; color: var(--ink); }
.sx-col .sx-lede { color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.sx-quiet { margin-top: 18px !important; font: 14px var(--sans) !important; color: var(--muted) !important; text-align: center; }
.sx-note { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 10%, var(--bg-raised)); font-size: 16.5px !important; }

/* a verse, in the site's version */
.sx-verse { margin: 18px 0; padding: 4px 0 4px 16px; border-left: 3px solid color-mix(in srgb, var(--gold) 55%, transparent); }
.sx-verse blockquote { margin: 0; font: italic 18px/1.6 Georgia, "Times New Roman", serif; color: var(--ink); }
.sx-verse figcaption { margin-top: 6px; }
.sx-ref { padding: 0; border: 0; background: none; font: 700 13px var(--sans); color: var(--gold); cursor: pointer; }
.sx-wait { color: var(--muted); }
.sx-card { margin-top: 4px; }
.sx-card svg { width: 16px; height: 16px; }

/* the ways in */
.sx-doors { display: grid; gap: 10px; }
.sx-door { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 16px 16px 18px; border: 1px solid var(--rule); border-radius: 16px; background: var(--bg-raised); color: var(--ink); text-align: left; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease; }
.sx-door:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--rule)); }
.sx-door:active { transform: scale(0.99); }
.sx-door span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sx-door b { font: 600 19px/1.25 Georgia, "Times New Roman", serif; }
.sx-door small { font: 14px/1.4 var(--sans); color: var(--muted); }
.sx-door svg { flex: none; width: 20px; height: 20px; color: var(--gold); }

/* the steps */
.sx-dots { display: flex; gap: 6px; margin: 4px 0 18px; }
.sx-dots button { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; padding: 6px 0; border: 0; background: none; color: var(--muted); text-align: left; cursor: pointer; }
.sx-dots button i { height: 4px; border-radius: 4px; background: var(--rule); }
.sx-dots button.is-done i { background: color-mix(in srgb, var(--gold) 55%, var(--rule)); }
.sx-dots button.is-on i { background: var(--gold); }
.sx-dots button span { display: none; font: 600 12.5px/1.3 var(--sans); }
.sx-dots button.is-on span { color: var(--ink); }
.sx-h2 { margin: 0 0 12px; font: italic 600 26px/1.2 Georgia, "Times New Roman", serif; color: var(--ink); }
.sx-pray { margin: 4px 0 18px; padding: 16px 18px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 9%, var(--bg-raised)); font: 18px/1.6 Georgia, "Times New Roman", serif; color: var(--ink); }
.sx-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.sx-acts-col { flex-direction: column; align-items: stretch; }
.sx-acts .ui-btn { min-height: 46px; padding: 0 22px; font-size: 16px; }
.sx-ask { margin-top: 10px; }
.sx-ans { padding: 4px 16px 16px; }
.sx-first { margin-top: 18px; }
/* (each a row of a named list, its words whole: nav/ui.css, loaded after, clips a row's words to a line, so these say more) */
.sx-first .ui-row.sx-frow { align-items: flex-start; cursor: default; padding: 14px; }
.sx-first .ui-row.sx-frow:hover { background: none; }
.sx-first .sx-frow .ui-row-ic { margin-top: 1px; }
.sx-first .sx-frow b { display: block; -webkit-line-clamp: unset; font-size: 15.5px; }
.sx-first .sx-frow small { margin-top: 3px; white-space: normal; overflow: visible; font-size: 14px; line-height: 1.45; }
.sx-go { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* (the tour: each tab's apps, a tap away; the tab's name in its own color, for finding the way) */
.sx-tk { color: var(--c, var(--muted)) !important; }
.sx-sec { display: block; margin: 18px 0 8px; }
.sx-side > .sx-sec:first-child { margin-top: 0; }
.sx-apps { display: grid; gap: 8px; }
.sx-app { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-left: 3px solid color-mix(in srgb, var(--c, var(--gold)) 70%, var(--rule)); border-radius: 12px; background: var(--bg-raised); color: var(--ink); text-align: left; cursor: pointer; }
.sx-app span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sx-app b { font: 700 14.5px var(--sans); } .sx-app small { font: 12.5px/1.4 var(--sans); color: var(--muted); }
.sx-app svg { flex: none; width: 17px; height: 17px; color: var(--gold); }
@media (hover: hover) { .sx-app:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--rule)); } }
@media (min-width: 900px) { .sx-tour .sx-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sx-tour.sx-stepg { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }

/* (the way on: Growing in Christ, a new Christian's path) */
.sx-grow { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 18px 0 4px; padding: 18px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--rule)); border-radius: 16px; background: color-mix(in srgb, var(--gold) 8%, var(--bg-raised)); }
.sx-grow span { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.sx-grow b { font: italic 600 20px/1.25 Georgia, "Times New Roman", serif; }
.sx-grow small { font: 14px/1.45 var(--sans); color: var(--muted); }
.sx-grow .ui-btn { min-height: 44px; padding: 0 20px; }

/* the welcome from David's site: his panel first, on paper whatever the site's own colors */
.sx-camp { padding: 18px calc(14px + env(safe-area-inset-right)) 0 calc(14px + env(safe-area-inset-left)); }
.sx-band { position: relative; display: flex; align-items: center; min-height: 54px; margin-left: 26px; padding: 0 16px 0 58px; border-radius: 0 30px 30px 0; background: var(--sx-olive); }
.sx-band b { font: 900 clamp(19px, 5.4vw, 30px)/1 "Arial Black", "Helvetica Neue", Arial, sans-serif; letter-spacing: 0.05em; white-space: nowrap; text-transform: uppercase; color: #FBFAF4; }
.sx-q { position: absolute; left: -26px; top: 50%; display: grid; place-items: center; width: 74px; height: 74px; margin-top: -37px; border: 5px solid var(--sx-black); border-radius: 50%; background: var(--sx-ring); font: 900 42px/1 "Arial Black", Arial, sans-serif; color: var(--sx-black); }
.sx-by { margin: 12px 0 10px 64px; font: 700 16px var(--sans); color: var(--ink); }
.sx-panel { position: relative; margin-top: 22px; padding: 34px 20px 24px; border: 4px solid var(--sx-black); border-radius: 20px; background: var(--sx-paper); color: var(--sx-black); }
.sx-tag { position: absolute; left: 14px; top: -18px; padding: 6px 14px; border: 4px solid var(--sx-black); border-radius: 10px 10px 0 10px; background: var(--sx-tag); font: 800 15px var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--sx-black); }
.sx-big { margin: 4px 0 14px; font: 900 clamp(30px, 9vw, 40px)/1.05 "Arial Black", "Helvetica Neue", Arial, sans-serif; color: var(--sx-black); }
.sx-big em { display: block; font-style: normal; color: var(--sx-red); }
.sx-panel p { margin: 0 0 12px; font: 18px/1.45 "Helvetica Neue", Arial, sans-serif; color: var(--sx-black); }
.sx-panel .sx-strong { margin: 0; font-weight: 800; }
/* the trail down from his page to ours: a dashed path, his olive giving way to our gold */
.sx-trail { display: flex; justify-content: center; height: 76px; }
.sx-trail i { position: relative; width: 3px; height: 100%; background: repeating-linear-gradient(to bottom, var(--sx-olive) 0 9px, transparent 9px 17px); }
.sx-trail i::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, var(--gold) 0 9px, transparent 9px 17px); -webkit-mask-image: linear-gradient(to bottom, transparent, #000); mask-image: linear-gradient(to bottom, transparent, #000); }
.sx-ours { max-width: 620px; margin: 0 auto; padding: 0 calc(18px + env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left)); }
.sx-ours .ui-kicker { text-align: center; }
.sx-ours .sx-h { text-align: center; }
@media (min-width: 700px) { .sx-camp { padding-top: 26px; } .sx-panel { padding: 40px 30px 28px; } }

/* a wide screen: laid out for it. The welcome's panel a banner, its words beside its headline; the verses and the ways in, three
   across; a step's words beside its verses, the five named across its top; the questions beside the answer; the first steps
   as cards. From the owner: "Desktop versions should always take advantage of the screen size in a way that complements the
   content" */
@media (min-width: 700px) {
  .sx-first .ui-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .sx .sx-first.ui-list { border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .sx-first .ui-rows > li, .sx-first .ui-rows > li + li { border: 1px solid var(--rule); border-radius: 16px; background: var(--bg-raised); }
  .sx-first .ui-row.sx-frow { flex-direction: column; gap: 12px; height: 100%; padding: 18px; }
  .sx-first .sx-frow > span { height: 100%; }
  .sx-first .sx-go { margin-top: auto; padding-top: 12px; }
}
@media (min-width: 900px) {
  .sx-box { max-width: 1120px; }
  .sx-col.sx-wide { max-width: 1040px; padding-top: 28px; }
  .sx-wide > .sx-h, .sx-wide > .sx-lede { text-align: center; }
  .sx-wide > .sx-lede { max-width: 640px; margin-left: auto; margin-right: auto; }
  .sx-doors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .sx-door { flex-direction: column; align-items: flex-start; gap: 14px; min-height: 150px; padding: 22px; }
  .sx-door b { font-size: 21px; }
  .sx-door svg { margin-top: auto; }
  /* the welcome */
  .sx-camp { max-width: 1040px; margin: 0 auto; padding-top: 30px; }
  .sx-band { min-height: 64px; margin-left: 34px; padding-left: 74px; }
  .sx-band b { font-size: 34px; }
  .sx-q { left: -34px; width: 92px; height: 92px; margin-top: -46px; font-size: 52px; }
  .sx-by { margin-left: 80px; font-size: 18px; }
  .sx-panel { margin-top: 30px; padding: 46px 40px 36px; }
  .sx-pgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
  .sx-big { margin: 0; font-size: 54px; }
  .sx-panel p { font-size: 19px; }
  .sx-trail { height: 96px; }
  .sx-ours { max-width: 1040px; }
  .sx-ours .sx-intro { max-width: 680px; margin: 0 auto 26px; text-align: center; }
  .sx-verses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .sx-verses .sx-verse { display: flex; flex-direction: column; margin: 0; padding: 20px 20px 16px; border: 1px solid var(--rule); border-top: 3px solid color-mix(in srgb, var(--gold) 60%, transparent); border-radius: 14px; background: var(--bg-raised); }
  .sx-verses .sx-verse blockquote { flex: 1; font-size: 17px; }
  .sx-ours .sx-h3 { margin-top: 40px; text-align: center; }
  /* a step */
  .sx-dots { gap: 10px; margin-bottom: 30px; }
  .sx-dots button span { display: block; }
  .sx-stepg { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); grid-template-areas: "main side" "acts side"; gap: 0 56px; align-items: start; }
  .sx-step { grid-area: main; }
  .sx-side { grid-area: side; padding: 6px 0 0 28px; border-left: 1px solid var(--rule); }
  .sx-side .sx-verse:first-child { margin-top: 0; }
  .sx-stepg .sx-acts { grid-area: acts; justify-content: flex-start; margin-top: 18px; }
  .sx-stepg .sx-acts-col { flex-direction: row; }
  /* the questions */
  .sx-qa { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 36px; margin-top: 24px; align-items: start; }
  .sx-qs { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 12px; }
  .sx-qs button { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--ink); font: 600 16.5px/1.3 Georgia, "Times New Roman", serif; text-align: left; cursor: pointer; }
  .sx-qs button svg { flex: none; width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
  .sx-qs button:hover { background: color-mix(in srgb, var(--gold) 6%, transparent); }
  .sx-qs button.is-on { border-color: var(--rule); background: var(--bg-raised); }
  .sx-qs button.is-on svg { color: var(--gold); }
  .sx-a { padding: 26px 30px; border: 1px solid var(--rule); border-radius: 18px; background: var(--bg-raised); }
  .sx-wide > .sx-acts-col { flex-direction: row; justify-content: center; margin-top: 34px; }
  /* first steps */
  .sx-fhead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 40px; align-items: center; }
  .sx-fhead .sx-h { text-align: left; }
  .sx-first .ui-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
