/* Characters: "Written on the board" (docs/DESIGN.md). Slate and chalk for the film and the board, paper and ink for the owner's plates. */
:root {
  --slate: #11100e; --slate2: #1a1814; --slate3: #24211b; --line: #3d3930;
  --chalk: #f1ecde; --dim: #bdb7a8;
  --vm: #a81f16; --vmt: #ff8a6c;
  --gold: #dcb663;
  --paper: #f0e6cf; --paper2: #e6d9bc; --ink: #15110d; --ink2: #3a3228; --vmp: #841010; --navy: #14238a; --pline: #cbbb94;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --cjk: "Noto Serif TC", "Noto Serif SC", "Songti TC", "Noto Serif CJK TC", "PMingLiU", "MingLiU", serif;
  /* the Share widget reads the site's own theme names */
  --bg-color: #1a1814; --text-color: #f1ecde; --primary: #dcb663; --secondary: #24211b;
  --pw: min(1160px, calc(100vw - 32px), calc((100vh - 300px) * 1.7778));
}
@supports (height: 100svh) { :root { --pw: min(1160px, calc(100vw - 32px), calc((100svh - 300px) * 1.7778)); } }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--slate); color: var(--chalk); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 18px/1.62 var(--serif); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[lang="zh-Hant"] { font-family: var(--cjk); font-weight: 600; }

/* ---- the two keys (Menu, Share) ---- */
.keys { position: fixed; z-index: 30; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 10px clamp(10px, 2vw, 22px); pointer-events: none; }
.keys > * { pointer-events: auto; }
.key { display: inline-flex; align-items: center; gap: .55em; min-height: 44px; min-width: 44px; padding: 0 16px; cursor: pointer; color: var(--chalk); background: rgba(17, 16, 14, .82);
  border: 1px solid #5a554a; border-radius: 22px; font: 600 16px/1 var(--serif); letter-spacing: .02em; }
.key:hover { border-color: var(--gold); }
.key .glyph { color: var(--gold); font: 400 17px/1 var(--serif); }
@media (max-width: 360px) { .key .kl { display: none; } }

/* ---- 1 the stage ---- */
.stage { padding: calc(62px + env(safe-area-inset-top)) 16px 30px; text-align: center; background: radial-gradient(90% 55% at 50% 0, #26221b 0, var(--slate) 72%); }
.stage h1 { margin: 0; font: 600 clamp(34px, 5.2vw, 58px)/1.05 var(--serif); letter-spacing: .01em; color: var(--chalk); }
.sub { margin: .3em 0 .9em; color: var(--dim); font-style: italic; font-size: clamp(17px, 1.6vw, 20px); }
.screen { margin: 0 auto; width: var(--pw); }
.frame { position: relative; aspect-ratio: 16 / 9; background: #000; border: 2px solid #5b564b; box-shadow: 0 0 0 6px var(--slate2), 0 24px 54px rgba(0, 0, 0, .7); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.begin { position: absolute; inset: 0; display: block; color: var(--chalk); text-decoration: none; cursor: pointer; }
.poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.playseal { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: var(--vm); border: 3px solid rgba(241, 236, 222, .55); box-shadow: 0 6px 24px rgba(0, 0, 0, .55); transition: transform .25s ease; }
.playseal::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 34px; margin: -17px 0 0 -10px; background: var(--chalk); clip-path: polygon(0 0, 100% 50%, 0 100%); }

.begin[hidden] { display: none; }
.begin:hover .playseal, .begin:focus-visible .playseal { transform: scale(1.08); }
.begincap { position: absolute; left: 12px; top: 12px; padding: 6px 12px; background: rgba(17, 16, 14, .82); border: 1px solid var(--line); font-size: 16px; }
.begincap b { font-weight: 600; font-variant-numeric: tabular-nums; }
.begincap em { color: var(--dim); font-style: italic; margin-left: .4em; }

/* the ledge: the chalk tray under the board, where the film writes */
.ledge { display: flex; align-items: stretch; margin-top: 12px; background: var(--slate2); border: 1px solid var(--line); border-top: 6px solid #6a645a; min-height: 78px; text-align: left; }
.ledge[hidden] { display: none; }
.lg-btn { flex: 0 0 54px; min-height: 44px; background: transparent; color: var(--chalk); border: 0; font: 400 38px/1 var(--serif); cursor: pointer; }
.lg-btn:hover { color: var(--vmt); }
.lg-now { flex: 1; display: flex; align-items: center; gap: 18px; padding: 6px 8px; min-width: 0; }
.lg-glyph { flex: 0 0 auto; min-width: 56px; text-align: center; font: 600 54px/1.1 var(--cjk); color: #fff; }
.lg-glyph img { display: block; height: 50px; width: auto; margin: 0 auto; }
.lg-glyph:empty { display: none; }
.lg-write { animation: chalk .7s ease-out both; }
@keyframes chalk { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.lg-text { display: grid; gap: 0; min-width: 0; }
.lg-text b { font: 600 clamp(19px, 2.2vw, 24px)/1.2 var(--serif); }
.lg-text i { color: var(--dim); font-size: 17px; }
.lg-text i:empty { display: none; }
.lg-text span { color: var(--dim); font-size: 15px; line-height: 1.35; }
.lg-text span a { display: inline-block; padding: 15px 4px; margin: -15px -4px; color: var(--chalk); }

.quick { list-style: none; margin: 18px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.quick a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 18px; border: 1px solid #6a655a; color: var(--chalk); text-decoration: none; background: rgba(255, 255, 255, .03); }
.quick a:hover { border-color: var(--vmt); }

.own { max-width: var(--pw); margin: 14px auto 0; text-align: left; border: 1px solid var(--line); background: var(--slate2); }
.own summary { min-height: 44px; display: flex; align-items: center; padding: 0 16px; cursor: pointer; color: var(--dim); }
.own-body { padding: 0 16px 16px; }
.own-body p { margin: 0 0 12px; color: var(--dim); font-size: 16px; text-align: justify; hyphens: auto; }
.own video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* ---- 2 the board ---- */
.board { padding: 60px 16px 76px; background: var(--slate); }
.wrap { max-width: 1200px; margin: 0 auto; }
h2 { margin: 0 0 .35em; font: 600 clamp(30px, 4vw, 44px)/1.1 var(--serif); }
h2::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 12px; background: var(--vm); }
.lede { max-width: 46em; margin: 0; color: var(--dim); font-size: 19px; text-align: justify; hyphens: auto; }
.grp { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.gh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.gh h3 { margin: 0; font: 600 25px/1.2 var(--serif); }
.gsub { margin: 0; color: var(--dim); font-style: italic; font-size: 16px; }
.grefs { flex-basis: 100%; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.grefs:empty { display: none; }
.vr { display: inline-flex; align-items: center; gap: 8px; }
.vref { color: var(--gold); }
.at { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 6px; color: var(--dim); font-variant-numeric: tabular-nums; font-size: 15px; }
.gnote { margin: 14px 0 0; color: var(--dim); }

.tiles { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile a { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; min-height: 164px; height: 100%; padding: 30px 8px 12px; background: #161411; border: 1px solid var(--line); color: var(--chalk); text-decoration: none; text-align: center; transition: border-color .2s ease, background-color .2s ease; }
.tile a:hover { border-color: var(--vmt); background: #1d1a15; }
.tg { font: 600 58px/1.1 var(--cjk); color: var(--chalk); }
.tg.n2 { font-size: 44px; }
.tg.n3 { font-size: 33px; padding-top: 10px; }
.tg-img { display: block; height: 52px; width: auto; margin-top: 2px; }
.te { margin-top: 6px; font-size: 16px; line-height: 1.25; }
.tp { color: var(--dim); font-size: 15px; line-height: 1.25; }
.tn { color: var(--dim); font-size: 14px; line-height: 1.25; }
.tt { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--dim); font-variant-numeric: tabular-nums; }
.seal { position: absolute; left: 8px; top: 8px; min-width: 25px; height: 25px; padding: 0 3px; display: grid; place-items: center; border: 1.5px solid var(--vmt); border-radius: 3px; color: var(--vmt); font: 600 13px/1 var(--serif); font-variant-numeric: tabular-nums; }
.tile.is-heard .seal { background: var(--vm); border-color: var(--vm); color: #fff; }
.tile.is-now a { outline: 2px solid var(--vmt); outline-offset: -3px; background: #221b16; }

.cards { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.card { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); background: #161411; }
.ct { display: inline-flex; align-items: center; align-self: start; min-height: 44px; color: var(--chalk); font-variant-numeric: tabular-nums; }
.cb { min-width: 0; align-self: center; }
.cb p { margin: 0; }
.cl b { font-weight: 600; }
.cn { color: var(--dim); font-size: 16px; }
.three { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; }
.three i { color: var(--dim); }
.q { margin: 0; }
.qen { font-size: 18px; margin-bottom: .45em !important; }
.qs { color: var(--dim); margin-bottom: .6em !important; }
.qzh { display: grid; gap: 2px; font: 600 20px/1.55 var(--cjk); }
.qz { margin-top: .4em !important; color: var(--dim); font-size: 17px; }

/* ---- 3 taken apart: paper and ink ---- */
.ink { position: relative; padding: 78px 16px 84px; background: var(--paper); color: var(--ink); }
.ink::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 17px; background: var(--paper);
  clip-path: polygon(0 100%, 0 55%, 2% 30%, 4% 62%, 7% 18%, 9% 50%, 12% 24%, 15% 66%, 18% 28%, 21% 58%, 24% 14%, 27% 48%, 30% 70%, 33% 26%, 36% 56%, 39% 20%, 42% 64%, 45% 32%, 48% 60%, 51% 16%, 54% 52%, 57% 28%, 60% 68%, 63% 22%, 66% 54%, 69% 30%, 72% 62%, 75% 18%, 78% 50%, 81% 34%, 84% 66%, 87% 24%, 90% 56%, 93% 20%, 96% 58%, 98% 36%, 100% 52%, 100% 100%); }
.ink h2::after { background: var(--vmp); }
.ink .lede { color: var(--ink2); }
.ink :focus-visible, .about :focus-visible { outline-color: var(--navy); }
.story { margin-top: 46px; }
.story h3 { margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1px solid #b9a982; font: 600 26px/1.2 var(--serif); }
.story h3 small { margin-left: .5em; color: var(--ink2); font: italic 400 18px/1 var(--serif); }
.eqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.eq { margin: 0; padding: 18px 16px 8px; background: rgba(255, 252, 243, .55); border: 1px solid var(--pline); }
.eq.wide { grid-column: 1 / -1; }
.eqline { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; }
.unit { display: inline-flex; align-items: flex-start; gap: 4px 8px; }
.whole, .part { display: grid; justify-items: center; text-align: center; align-content: start; }
.g { display: block; font: 600 clamp(44px, 6.2vw, 64px)/1.05 var(--cjk); color: var(--ink); }
.g.split { display: inline-flex; gap: .12em; }
.part .g { font-size: clamp(38px, 5.4vw, 56px); }
.part.sub .g { font-size: clamp(30px, 4.4vw, 44px); }
.l { max-width: 8.5em; font: 400 15px/1.25 var(--serif); font-style: normal; color: var(--ink); }
.op { align-self: flex-start; padding: .22em .04em 0; font: 700 clamp(40px, 5.6vw, 64px)/1 var(--serif); color: var(--vmp); }
.subs .op { font-size: clamp(30px, 4vw, 44px); padding-top: .2em; }
.br { align-self: flex-start; font: 400 clamp(44px, 6.4vw, 70px)/1 var(--serif); color: var(--navy); }
.subs { display: inline-flex; flex-wrap: wrap; align-items: flex-start; gap: 2px 6px; }
.eq figcaption { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; font-size: 16px; color: var(--ink2); }
.rf { color: var(--navy); }
.py { font-style: italic; }
.infilm, .plate { display: inline-flex; align-items: center; min-height: 44px; color: var(--vmp); }
.infilm { padding: 0 12px; border: 1px solid var(--vmp); margin: 3px 0; text-decoration: none; font-weight: 600; }
.infilm:hover { background: var(--vmp); color: var(--paper); }

/* the pieces come together once, as an equation first scrolls into view */
.js .eq .whole, .js .eq .part, .js .eq .op, .js .eq .br { transition: opacity .55s ease, transform .55s ease; }
.js .eq:not(.in) .whole { opacity: 0; transform: scale(.9); }
.js .eq:not(.in) .part, .js .eq:not(.in) .op, .js .eq:not(.in) .br { opacity: 0; transform: translateX(24px); }
.js .eq .whole, .js .eq .part, .js .eq .op, .js .eq .br { transition-delay: calc(var(--k, 0) * 70ms); }

/* ---- 4 about ---- */
.about { padding: 60px 16px 68px; background: var(--paper2); color: var(--ink); }
.about h2::after { background: var(--vmp); }
.about-grid { display: grid; gap: 30px; }
.desc { font-size: 21px; line-height: 1.5; max-width: 34em; text-align: justify; hyphens: auto; }
.about p { max-width: 38em; text-align: justify; hyphens: auto; }
.about a { color: var(--vmp); }
.files { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 2px; }
.files li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.files a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.files span { color: var(--ink2); font-size: 15px; }
.boardshot { margin: 0; }
.boardshot img { display: block; width: 100%; border: 6px solid #1a1814; box-shadow: 0 4px 12px rgba(21, 17, 13, .22); }
.boardshot figcaption { margin-top: 18px; color: var(--ink2); font-size: 15px; font-style: italic; }
.foot { padding: 28px 16px 40px; background: var(--slate); text-align: center; color: var(--dim); }
.foot p { margin: 0; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--chalk); }

/* ---- Bible references (R37): the colour comes from this page; the popup card stays his light card ---- */
a.bible-ref { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; margin: 0 -6px; color: var(--gold); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
a.bible-ref:hover { text-decoration-style: solid; }
.ink a.bible-ref, .about a.bible-ref { color: var(--navy); }

@media (min-width: 900px) { .about-grid { grid-template-columns: 1.1fr .9fr; align-items: start; } }
@media (max-width: 560px) {
  body { font-size: 17px; }
  .card { grid-template-columns: 1fr; gap: 0; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .lg-btn { flex-basis: 44px; font-size: 32px; }
  .lg-glyph { font-size: 42px; min-width: 44px; }
  .lg-glyph img { height: 40px; }
  .lg-now { gap: 10px; }
  .playseal { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
  .playseal::after { width: 24px; height: 28px; margin: -14px 0 0 -8px; }
  .begincap { left: 6px; top: 6px; font-size: 14px; padding: 4px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lg-write { animation: none; }
  .js .eq .whole, .js .eq .part, .js .eq .op, .js .eq .br { transition: none !important; opacity: 1 !important; transform: none !important; }
  .playseal, .tile a { transition: none; }
}
