/* Earthquakes, eclipses and famines in the Bible. A full-screen piece like the site's other interactive pieces.
   Type: GT Sectra for headings, GT Pantheon Text for reading, GT Pantheon Micro for small text and labels.
   Colours from the design system. The grade is always written as a word; its mark adds a shape
   (filled, half, ring, dashed ring), so colour never carries it alone. */

@font-face { font-family: 'GT Sectra'; font-style: normal; font-weight: 500; font-display: swap; src: url('/wp-content/uploads/fonts/GT-Sectra-Medium.woff') format('woff'), url('https://christianpure.com/wp-content/uploads/fonts/GT-Sectra-Medium.woff') format('woff'); }
@font-face { font-family: 'GT Pantheon Text'; font-style: normal; font-weight: 400; font-display: swap; src: url('/wp-content/uploads/fonts/GT-Pantheon-Text-Regular.woff2') format('woff2'), url('https://christianpure.com/wp-content/uploads/fonts/GT-Pantheon-Text-Regular.woff2') format('woff2'); }
@font-face { font-family: 'GT Pantheon Text'; font-style: normal; font-weight: 500; font-display: swap; src: url('/wp-content/uploads/fonts/GT-Pantheon-Text-Medium.woff2') format('woff2'), url('https://christianpure.com/wp-content/uploads/fonts/GT-Pantheon-Text-Medium.woff2') format('woff2'); }
@font-face { font-family: 'GT Pantheon Micro'; font-style: normal; font-weight: 400; font-display: swap; src: url('/wp-content/uploads/fonts/GT-Pantheon-Micro-Regular.woff2') format('woff2'), url('https://christianpure.com/wp-content/uploads/fonts/GT-Pantheon-Micro-Regular.woff2') format('woff2'); }
@font-face { font-family: 'GT Pantheon Micro'; font-style: normal; font-weight: 500; font-display: swap; src: url('/wp-content/uploads/fonts/GT-Pantheon-Micro-Medium.woff2') format('woff2'), url('https://christianpure.com/wp-content/uploads/fonts/GT-Pantheon-Micro-Medium.woff2') format('woff2'); }

:root {
  --page: var(--cp-color-surface-page, #fbf8f3);
  --raised: var(--cp-color-surface-raised, #ffffff);
  --inset: var(--cp-color-surface-inset, #f5ede1);
  --ink: var(--cp-color-ink, #002159);
  --muted: var(--cp-color-ink-muted, #67625d);
  --gold: var(--cp-color-accent-gold, #c58c23);
  --gold-ink: var(--cp-color-ink-gold, #9b6c20);
  --line: #e6ded3;
  --rule: rgba(0, 33, 89, .10);
  --focus: #2d6db0;
  --strong: var(--cp-color-status-success, #2e6b3f);
  --possible: var(--cp-color-status-warning, #9b6c20);
  --nomatch: var(--cp-color-ink, #002159);
  --beyond: #d8d0c4;
  --wheat: #f5e9cf;
  --head-font: 'GT Sectra', Georgia, 'Times New Roman', serif;
  --body-font: 'GT Pantheon Text', Georgia, 'Times New Roman', serif;
  --label-font: 'GT Pantheon Micro', Georgia, 'Times New Roman', serif;
  --name-w: 240px;
  --rec-w: 210px;
}
@media (min-width: 1100px) { :root { --name-w: 330px; --rec-w: 290px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--page); color: var(--ink); }
body { font-family: var(--body-font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header, as on the other pieces */
.head {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 4px 12px; padding-top: max(4px, env(safe-area-inset-top)); background: var(--page); border-bottom: 1px solid var(--line);
}
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; min-width: 44px; padding: 0 6px 0 0; font: 400 16px/1 var(--body-font); color: var(--ink); text-decoration: none; white-space: nowrap; }
.back-arrow { display: inline-flex; color: var(--gold-ink); }
.back-more { display: none; margin-inline-start: .24em; }
.back:hover .back-word, .back:hover .back-more { text-decoration: underline; text-underline-offset: 3px; }
.head h1 { margin: 0; min-width: 0; text-align: center; font: 500 16px/1.15 var(--head-font); text-wrap: balance; hyphens: auto; overflow-wrap: break-word; }
@media (min-width: 900px) {
  .head h1 { white-space: nowrap; }
  .head { padding: 6px 24px; grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr); }
  .back { font-size: 17px; }
  .back-more { display: inline; }
  .head h1 { font-size: 24px; }
  .about-btn { justify-self: end; }
}

.page { max-width: 1240px; margin: 0 auto; padding: 0 16px 72px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) { .page { padding: 0 32px 64px; gap: 18px; } }

/* The finding: a small label, the answer as the heading, one line beneath */
.finding { margin-top: 22px; }
.finding .label { margin: 0 0 6px; font: 400 14px/1.4 var(--label-font); color: var(--muted); }
.finding h2 { margin: 0; font: 500 28px/1.15 var(--head-font); letter-spacing: -.01em; max-width: 30ch; text-wrap: balance; }
.finding .sub { margin: 12px 0 0; max-width: 60ch; font-size: 17px; line-height: 1.5; text-wrap: pretty; }
@media (min-width: 900px) { .finding { margin-top: 40px; } .finding .label { font-size: 15px; } .finding h2 { font-size: 42px; max-width: 30ch; } .finding .sub { font-size: 19px; } }

/* Chips: limestone tiles with the 4 px corner; the chosen one wheat with a gold rim and bold words */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--raised); cursor: pointer; font: 400 15px/1 var(--label-font); color: var(--ink); }
.chip:hover { border-color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--wheat); border-color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); font-weight: 500; }

/* Grade marks: a shape as well as a colour, and always beside the grade's name */
.mark { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; margin-inline-end: 8px; }
.m-strong { background: var(--strong); }
.m-possible { background: linear-gradient(90deg, var(--possible) 50%, transparent 50%); box-shadow: inset 0 0 0 2px var(--possible); }
.m-nomatch { box-shadow: inset 0 0 0 2px var(--nomatch); }
.m-beyond { box-shadow: inset 0 0 0 2px var(--beyond); }

.chev { display: inline-block; flex: none; width: 1em; color: var(--gold-ink); font: 500 1.05em/1 var(--label-font); transition: transform .15s ease; }
.rowbtn[aria-expanded="true"] .chev { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }
.hint { display: flex; align-items: baseline; gap: 4px; margin: 10px 0 -8px; font: 400 15px/1.35 var(--label-font); color: var(--muted); }

/* Each period: a heading row with its own ruler, then its events: event | ruler of years | what the record shows */
.era-head, .rowbtn { display: grid; grid-template-columns: var(--name-w) minmax(0, 1fr) var(--rec-w); column-gap: 24px; align-items: center; }
.era { margin-top: 30px; }
.era-head { padding-bottom: 10px; border-bottom: 1px solid var(--ink); align-items: end; }
.era-head h3 { margin: 0; display: flex; flex-direction: column; gap: 2px; font: 500 22px/1.15 var(--head-font); }
.era-head .yrs { font: 400 14px/1.3 var(--label-font); color: var(--muted); }
.era-head .track { align-self: stretch; min-height: 22px; }
.era-head .tick { position: absolute; bottom: 0; transform: translateX(-50%); font: 400 13px/1 var(--label-font); color: var(--muted); white-space: nowrap; }
.era-head .tick.end { transform: translateX(-100%); }
.era-head .tick.start { transform: none; }
.era-head .track.crowded .tick.minor { display: none; }
.tally { font: 500 15px/1.3 var(--label-font); color: var(--ink); }
.track { position: relative; align-self: stretch; }
.gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.row { border-bottom: 1px solid var(--rule); scroll-margin-top: 80px; }
.rowbtn { width: 100%; min-height: 64px; margin: 0; padding: 10px 0; border: 0; background: transparent; cursor: pointer; text-align: start; color: var(--ink); }
.rowbtn:hover { background: rgba(197, 140, 35, .06); }
.row.open { background: rgba(197, 140, 35, .08); }
.c-name { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nm .t { font: 400 17px/1.3 var(--body-font); }
.nm .p { font: 400 13.5px/1.35 var(--label-font); color: var(--muted); }
.rowbtn:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.row.open .t { font-weight: 500; }
.bar { position: absolute; top: 50%; height: 12px; margin-top: -6px; border-radius: 6px; min-width: 12px; }
.bar.dot { width: 12px !important; margin-left: -6px; }
.b-strong { background: var(--strong); }
.b-possible { background: var(--possible); }
.b-nomatch { background: var(--raised); box-shadow: inset 0 0 0 2px var(--nomatch); }
.b-beyond { background: var(--beyond); }
.c-rec { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gw { display: inline-flex; align-items: center; font: 500 15px/1.25 var(--label-font); }
.rec { font: 400 15px/1.35 var(--body-font); }
/* Events beyond the records are turned down so the eye goes to the ones the records reach */
.g-beyond .nm .t, .g-beyond .gw { color: var(--muted); }
.g-beyond .gw { font-weight: 400; }
@media (min-width: 1100px) { .nm .t { font-size: 18.5px; } .gw, .tally { font-size: 16px; } .rec { font-size: 16px; } .rowbtn { min-height: 70px; } .era-head h3 { font-size: 28px; } .era { margin-top: 40px; } }

/* Phones: the name, then the ruler the full width, then what the record shows */
@media (max-width: 699px) {
  /* Phones: back link and About on one line, the page's name on its own line below, so a long name in any language stays readable */
  .head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'back about' 'title title'; row-gap: 2px; padding-bottom: 10px; }
  .head .back { grid-area: back; justify-self: start; } .head h1 { grid-area: title; } .head .about-btn { grid-area: about; }
  .era-head, .rowbtn { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .era-head h3 { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 22px; }
  .era-head .tally { order: 2; font-size: 14.5px; padding-inline-start: 0; }
  .era-head .track { order: 3; margin: 6px 6px 0 1.05em; }
  .rowbtn { padding: 14px 0 12px; }
  .row .track { height: 16px; margin: 0 6px 0 1.05em; }
  .c-rec { padding-inline-start: 1.05em; }
}

/* One event opened: the explanation beside the facts and sources */
.detail { display: grid; gap: 18px; padding: 4px 0 26px calc(1em + 4px); }
@media (min-width: 900px) { .detail { grid-template-columns: minmax(0, 62ch) minmax(0, 1fr); gap: 40px; padding-inline-end: 8px; } }
.d-text p { margin: 0 0 12px; font-size: 18px; line-height: 1.6; max-width: 62ch; }
.d-text p:last-child { margin-bottom: 0; }
.d-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); font-size: 15.5px; line-height: 1.45; }
.facts dt { font: 500 13.5px/1.4 var(--label-font); color: var(--muted); margin-top: 10px; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.sources summary { cursor: pointer; font: 500 15px/1.4 var(--label-font); color: var(--ink); }
.sources ol { margin: 8px 0 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }

/* About */
dialog { width: min(720px, calc(100% - 24px)); max-height: calc(100% - 48px); padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--page); color: var(--ink); }
dialog::backdrop { background: rgba(0, 33, 89, .45); }
.about-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--page); border-bottom: 1px solid var(--line); }
.about-head h2 { margin: 0; font: 500 22px/1.2 var(--head-font); }
.about-body { padding: 6px 20px 22px; }
.about-body h3 { margin: 18px 0 6px; font: 500 18px/1.25 var(--head-font); }
.about-body p { margin: 0 0 10px; font-size: 16px; }
.grades { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 16px; }
.grades dt { display: flex; align-items: center; font: 500 15px/1.4 var(--label-font); margin-top: 8px; }
.grades dd { margin: 0; }

/* The page's words as plain text (reference.<lang>.html, put after </main> by the addresses plugin): read by search
   engines and shown only where the script does not run; app.js hides it once the view is drawn. */
.ne-text { max-width: 72ch; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.ne-text h2 { font: 500 28px/1.2 var(--head-font); margin: 8px 0 12px; }
.ne-text h3 { font: 500 22px/1.25 var(--head-font); margin: 32px 0 8px; }
.ne-text h4 { font: 500 18px/1.3 var(--head-font); margin: 22px 0 6px; }
.ne-text h4 span { font-size: 15px; color: var(--muted, inherit); }
.ne-text dt { font-weight: 600; margin-top: 6px; }
.ne-text dd { margin: 0; }
