/* The public pages (server/pages.mjs): plain reading pages in the app's own
   palette, so a visitor from a search engine lands somewhere that looks like
   the same piece of work. */

/* style.css pins the app to the window; a page of text scrolls itself. */
html, body { height: auto; min-height: 100%; overflow: auto; }
body { display: block; }

.pg-top {
  display: flex; align-items: center; gap: 16px; padding: 12px 20px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.pg-brand {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  color: var(--text); font: 600 16px var(--serif);
}
.pg-brand img { border-radius: 5px; }
.pg-top nav { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 13.5px; }
.pg-top nav a { color: var(--text-dim); text-decoration: none; }
.pg-top nav a:hover { color: var(--accent); }
.pg-top .pg-app {
  color: var(--on-accent); background: var(--accent); padding: 6px 12px; border-radius: 8px;
  text-decoration: none; white-space: nowrap; font-size: 13.5px;
}
.pg-top .pg-app:hover { color: var(--on-accent); background: var(--accent-deep); }

/* Phones. The row was already 5px too wide at 375 with four links in it
   (measured 2026-11-10: the button's right edge at 380 against a 375
   viewport), and Signs made a fifth. Below 700 the header becomes two rows --
   wordmark and the button on the first, the links wrapping on the second --
   rather than three, which is what happens if the button is left inside the
   nav. The button keeps its full tap target either way. */
@media (max-width: 700px) {
  .pg-top { flex-wrap: wrap; gap: 10px 14px; padding: 10px 16px; }
  .pg-top .pg-app { margin-left: auto; order: 1; }
  .pg-top nav {
    order: 2; margin-left: 0; width: 100%; flex-wrap: wrap; gap: 12px 14px;
    font-size: 13px;
  }
}

.pg { max-width: 46rem; margin: 0 auto; padding: 22px 20px 70px; }
.pg a { color: var(--accent); }
.pg h1 { font: 600 30px/1.2 var(--serif); margin: 10px 0 12px; color: var(--read); }
.pg h2 {
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
  margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft);
}
.pg p { line-height: 1.65; color: var(--read-2); }
.crumbs { font-size: 12.5px; color: var(--text-faint); }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.verse-main { font: 22px/1.55 var(--serif); color: var(--read) !important; margin: 4px 0 2px; }
.verse-ver { font-size: 12px; color: var(--text-faint) !important; margin: 0 0 14px; }
.verse-kjv { font: 17px/1.6 var(--serif); }

/* The way into the app, in the gold of "Follow its threads". */
.pg-open {
  display: inline-block; padding: 8px 14px; border-radius: 9px; text-decoration: none;
  border: 1px solid var(--gold-soft); color: var(--gold) !important; font-size: 14px;
}
.pg-open:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }

.note p { font: 15.5px/1.7 var(--serif); }
.note strong { color: var(--accent); }
.note-about { font: 12px/1.5 var(--sans) !important; color: var(--text-faint) !important; }

.pg-il { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.pg-il.rtl { direction: rtl; }
.il-w {
  display: inline-flex; flex-direction: column; align-items: center; text-align: center;
  padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: 8px; text-decoration: none;
  min-width: 56px; direction: ltr;
}
a.il-w:hover { border-color: var(--accent-soft); background: var(--surface-2); }
.il-orig { font: 21px/1.3 var(--serif); color: var(--read); }
.il-tr { font-size: 11.5px; color: var(--text-dim); font-style: italic; }
.il-gl { font-size: 12px; color: var(--text-faint); }

.xrefs { list-style: none; padding: 0; margin: 0; }
.xrefs li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); line-height: 1.55; color: var(--read-2); font-family: var(--serif); }
.xrefs li a { font: 600 13px var(--sans); margin-right: 6px; text-decoration: none; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a, .tags span {
  padding: 3px 10px; border-radius: 20px; border: 1px solid var(--line); font-size: 13px;
  text-decoration: none; color: var(--text-dim);
}

.pg-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; font-size: 14px; }
.pg-nav a { text-decoration: none; }

.books, .chapters { list-style: none; padding: 0; display: grid; gap: 6px; }
.books { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.chapters { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.books a, .chapters a {
  display: block; padding: 7px 10px; border: 1px solid var(--line-soft); border-radius: 8px;
  text-decoration: none; background: var(--surface);
}
.chapters a { text-align: center; }
.books a:hover, .chapters a:hover { border-color: var(--accent-soft); }

.chapter-text { font: 18px/1.8 var(--serif); color: var(--read-2); }
.chapter-text .vn {
  font: 600 11px var(--sans); vertical-align: super; margin: 0 3px 0 6px; text-decoration: none;
  color: var(--text-faint) !important;
}
.chapter-text .vn:hover { color: var(--accent) !important; }

.heb { font-family: var(--serif); direction: rtl; }
.w-tr { font: italic 400 20px var(--serif); color: var(--text-dim); }
.w-meta { font-size: 13px; color: var(--text-faint) !important; }

.pg-foot {
  max-width: 46rem; margin: 0 auto; padding: 22px 20px 40px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--text-faint); line-height: 1.6;
}
.pg-foot a { color: var(--text-dim); }

/* A book's introduction (data/book-intros.json), above its chapters. */
.pg-intro { margin: 18px 0 26px; }
.pg-intro dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.pg-intro dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); padding-top: 2px; }
.pg-intro dd { margin: 0; line-height: 1.6; }
.pg-open-verse { margin: 18px 0 0; padding: 12px 16px; border-left: 3px solid var(--accent-soft); font-family: var(--serif); font-size: 17px; line-height: 1.6; }
.pg-open-verse cite { display: block; margin-top: 6px; font: 12.5px var(--sans); font-style: normal; color: var(--text-faint); }
@media (max-width: 600px) { .pg-intro dl { grid-template-columns: 1fr; gap: 2px 0; } .pg-intro dd { margin-bottom: 10px; } }

/* The glossary (data/glossary.json). */
.gl-lede { font-size: 17px; line-height: 1.65; color: var(--text-dim); margin: 0 0 22px; }
.gl-term { margin: 0 0 22px; padding-left: 14px; border-left: 2px solid var(--line); }
.gl-term h3 { margin: 0 0 4px; font: 600 17px var(--serif); }
.gl-short { margin: 0 0 8px; font-size: 15px; color: var(--text); }
.gl-term p { margin: 0 0 8px; line-height: 1.6; }
.gl-not { font-size: 14px; color: var(--text-dim); }
.gl-see { font-size: 13px; }

/* Topic pages (data/topics.json). */
.tp-list { line-height: 1.8; }
.tp-verse { margin: 0 0 20px; }
.tp-verse blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--accent-soft); font-family: var(--serif); font-size: 17px; line-height: 1.6; }
.tp-verse cite { display: block; margin-top: 6px; font: 12.5px var(--sans); font-style: normal; color: var(--text-faint); }
.tp-why { margin: 8px 0 0 16px; font-size: 14.5px; line-height: 1.6; color: var(--text-dim); }
.tp-foot { margin-top: 28px; font-size: 13px; color: var(--text-faint); }
/* Study paths (data/paths/*.json). */
.pa-days { line-height: 1.9; padding-left: 22px; }
.pa-days li { margin-bottom: 4px; }
.pa-read { margin-left: 10px; font-size: 13px; color: var(--text-faint); }
.pa-read-big { font-family: var(--serif); font-size: 19px; margin: 0 0 18px; }
.pa-notice { line-height: 1.7; }
.pa-notice li { margin-bottom: 8px; }
.pa-h { margin: 16px 0 4px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.pa-links { margin: 0; padding-left: 22px; line-height: 1.8; }
.pa-votes { font-size: 12.5px; color: var(--text-faint); }
.pa-root { margin: 14px 0 0; padding: 12px 16px; border-left: 3px solid var(--gold-soft); font-size: 14.5px; line-height: 1.65; }
.pa-keep { font-family: var(--serif); font-size: 17px; line-height: 1.6; }
/* The verses the Keep question rests on, listed under it and clickable. */
.pa-context { margin-top: 2px; }
.pa-ctx-why { font-size: 12.5px; color: var(--text-faint); }

/* Signs. Each entry is a small record: what it was, what it pointed to, and
   the verses to check it against. The "not called a sign" note is meant to be
   noticed, because it is the whole reason the page is trustworthy. */
.sg-words { margin: 6px 0 0; }
.sg-note { font-size: 14px; color: var(--text-dim); line-height: 1.6; border-left: 2px solid var(--line); padding-left: 12px; }
.sg-list { list-style: none; margin: 0; padding: 0; }
.sg-seven { counter-reset: none; }
.sg-sign { margin: 0 0 22px; padding-left: 14px; border-left: 2px solid var(--line-soft); }
.sg-head { margin: 0 0 4px; font-weight: 600; }
.sg-n {
  display: inline-block; min-width: 1.6em; margin-right: 2px;
  color: var(--text-faint); font-variant-numeric: tabular-nums;
}
.sg-tag {
  margin-left: 8px; padding: 1px 7px; border-radius: 10px; font-weight: 400;
  font-size: 11.5px; color: var(--text-faint); border: 1px solid var(--line);
}
.sg-tag.is-numbered { color: var(--accent); border-color: var(--accent-soft); }
.sg-tag.is-notword { color: var(--thread-meaning); border-color: var(--thread-meaning); }
.sg-what { margin: 0 0 6px; font-family: var(--serif); }
.sg-notword {
  margin: 0 0 6px; font-size: 13px; line-height: 1.55;
  color: var(--thread-meaning);
}
.sg-points { margin: 0 0 6px; font-size: 14px; line-height: 1.6; color: var(--text-dim); }
.sg-support { margin: 0; font-size: 14px; }
.sg-group { margin: 26px 0 0; }
.sg-group h3 { margin-bottom: 2px; }
.sg-who {
  margin-left: 10px; font-size: 12px; font-weight: 400; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-faint);
}
.sg-blurb { margin: 0 0 14px; font-size: 14px; line-height: 1.65; color: var(--text-dim); }

/* The index: the whole page on one or two screens, before any prose. */
.sg-index { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 0 0 6px; }
.sg-index th {
  text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 500; padding: 0 10px 6px 0;
  border-bottom: 1px solid var(--line);
}
.sg-index td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.sg-index tbody tr:hover { background: var(--line-soft); cursor: pointer; }
.sg-c-ref { white-space: nowrap; }
.sg-c-what { color: var(--text); }
.sg-c-who, .sg-c-f { color: var(--text-faint); white-space: nowrap; }
.sg-none { color: var(--text-faint); }
.sg-foot-note { font-size: 13px; color: var(--text-dim); margin: 2px 0 0; line-height: 1.6; }

/* What a sign is for. Five kinds, five colours, used in the table and on each
   entry so the two read as the same thing. */
.sg-kind {
  display: inline-block; padding: 1px 8px; border-radius: 10px; white-space: nowrap;
  font-size: 11px; letter-spacing: .02em; border: 1px solid var(--line); color: var(--text-faint);
}
.sg-head .sg-kind { margin-left: 8px; font-weight: 400; }
.sg-kind.is-token { color: var(--thread-meaning); border-color: var(--thread-meaning); }
.sg-kind.is-prediction { color: var(--accent); border-color: var(--accent-soft); }
.sg-kind.is-authentication { color: var(--read); border-color: var(--line); }
.sg-kind.is-refusal { color: var(--text-faint); border-color: var(--line); }
.sg-kind.is-deception { color: #d98a8a; border-color: #7a4a4a; }

.sg-fulfilled { margin: 0 0 6px; font-size: 13.5px; color: var(--text-dim); }

/* The filter bar ships hidden and web/signs.js reveals it, so a page with no
   JavaScript never shows a control that does nothing. */
.sg-controls { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 0 0 14px; }
.sg-chip {
  font: inherit; font-size: 12px; padding: 4px 11px; border-radius: 13px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--text-dim);
}
.sg-chip:hover { border-color: var(--accent-soft); color: var(--accent); }
.sg-chip.on { background: var(--accent-soft); color: var(--on-accent); border-color: var(--accent); }
.sg-count { opacity: .6; font-variant-numeric: tabular-nums; }
.sg-sep { flex-basis: 100%; height: 0; }
.sg-empty { font-size: 14px; color: var(--text-dim); }

@media (max-width: 700px) {
  /* Five columns do not fit a phone. Who and Kind fold into the What cell. */
  .sg-index { font-size: 13px; }
  .sg-index th:nth-child(3), .sg-index td:nth-child(3) { display: none; }
  .sg-index th:nth-child(5), .sg-index td:nth-child(5) { display: none; }
  .sg-index td { padding-right: 6px; }
}
.pa-next { margin-top: 18px; font-size: 13.5px; color: var(--text-faint); }
/* Person pages (/people, /person/david-h1732). */
.pp-list { line-height: 1.85; }
.pp-list li { margin-bottom: 3px; }
.pp-n { margin-left: 8px; font-size: 12px; color: var(--text-faint); }
.pp-meaning { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 16px 0; padding: 10px 14px; border-left: 3px solid var(--gold-soft); background: color-mix(in srgb, var(--gold) 6%, transparent); border-radius: 0 4px 4px 0; }
.pp-meaning-label { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }
.pp-meaning strong { font-family: var(--serif); font-size: 18px; font-weight: 400; color: var(--gold-dim); }
.pp-src { font-size: 11.5px; color: var(--text-faint); }
.pp-lead { font-size: 16.5px; line-height: 1.6; }
.pp-article { padding: 12px 16px; border-left: 2px solid var(--accent-soft); font-size: 14.5px; line-height: 1.65; }
.pp-src-note { margin-top: 8px; font-size: 12px; color: var(--text-faint); }
.pp-fam { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 5px 0; line-height: 1.7; }
.pp-fam-label { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); padding-top: 4px; }
@media (max-width: 700px) { .pp-fam { grid-template-columns: 1fr; gap: 2px; } }
