/* "From 1808 to 2026" (changes/): every verse whose wording changed from the Charles Thomson Bible to the
   New Charles Thomson Bible, with the editor's marks. Loaded after base.css, home.css and page.css. */

:root {
  --mk-red: rgb(179, 38, 30);        /* Thomson's words, reworded (struck) */
  --mk-green: rgb(27, 110, 47);      /* the 2026 wording */
  --mk-blue: rgb(11, 87, 164);       /* a correction made for the New Charles Thomson Bible */
  --mk-grey-old: rgb(150, 150, 150); /* older English, struck */
  --mk-grey-new: rgb(98, 98, 98);    /* the same, brought up to date */
}
:root:not([data-theme="light"]) {
  --mk-red: rgb(255, 128, 116);
  --mk-green: rgb(118, 206, 138);
  --mk-blue: rgb(122, 180, 245);
  --mk-grey-old: rgba(255, 255, 255, .42);
  --mk-grey-new: rgba(255, 255, 255, .7);
}

.changes .wrap { max-width: calc(960px + 56px); }
@media (max-width: 600px) { .changes .wrap { max-width: calc(960px + 40px); } }
.changes .doc-head, .changes .doc-section { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- The marks ---------- */
.changes del, .changes ins { text-decoration: none; }
.changes del.x { color: var(--mk-red); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.changes del.o { color: var(--mk-grey-old); text-decoration: line-through; text-decoration-thickness: 1px; }
.changes ins.g { color: var(--mk-green); font-weight: 600; }
.changes ins.b { color: var(--mk-blue); font-weight: 600; }
.changes ins.n { color: var(--mk-grey-new); }
.changes sup { font: 700 .62em/0 var(--sans); color: var(--mk-blue); margin-left: 1px; vertical-align: .62em; }
.changes .gk { font-family: var(--greek); font-size: 1.04em; }

/* ---------- How to read the marks ---------- */
.legend { margin-top: 32px; padding: 22px 24px; max-width: 760px; }
.doc .legend .eyebrow { margin-bottom: 14px; }
.legend-list { margin: 0; display: grid; gap: 14px; }
.legend-row { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: baseline; }
.legend-row dt { font: 17px/1.4 var(--scripture); white-space: nowrap; }
.legend-row dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.legend-row dd strong { color: var(--ink); }
@media (max-width: 600px) {
  .legend { padding: 18px 18px; }
  .legend-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- The chapter bar (stays under the nav) ---------- */
.ch-bar {
  position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 5;
  margin: 36px 0 0; padding: 10px; border-radius: 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 .75px var(--stroke), 0 8px 22px var(--shadow);
}
.ch-pick, .ch-view { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ch-select { position: relative; display: block; min-width: 0; }
.ch-select select {
  appearance: none; -webkit-appearance: none; font: 600 15px/1 var(--sans); color: var(--ink);
  height: 40px; padding: 0 34px 0 14px; border: 0; border-radius: 999px; max-width: 100%;
  background: var(--raised); box-shadow: inset 0 0 0 .75px var(--stroke); cursor: pointer;
}
.ch-select::after {   /* a small chevron, drawn like the app's */
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px; pointer-events: none;
  border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: rotate(45deg); border-radius: 0 0 1px 0;
}
.ch-select select:focus-visible, .seg button:focus-visible, .ch-step:focus-visible, .ch-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ch-step {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: var(--raised); box-shadow: inset 0 0 0 .75px var(--stroke);
}
.ch-step:disabled { opacity: .35; }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--raised); box-shadow: inset 0 0 0 .75px var(--stroke); }
.seg button {
  font: 600 14px/1 var(--sans); color: var(--ink-2); height: 34px; padding: 0 14px; border-radius: 999px;
  transition: background .25s var(--ease-out), color .2s ease, box-shadow .25s ease;
}
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px var(--shadow), inset 0 0 0 .75px var(--stroke); }
:root:not([data-theme="light"]) .seg button[aria-checked="true"] { background: rgba(255, 255, 255, .14); }

.ch-check { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1.2 var(--sans); color: var(--ink-2); cursor: pointer; user-select: none; }
.ch-check input { appearance: none; -webkit-appearance: none; margin: 0; width: 40px; height: 24px; border-radius: 999px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--stroke); position: relative; cursor: pointer; transition: background .25s ease; flex: none; }
.ch-check input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s var(--spring); }
.ch-check input:checked { background: var(--brand); }
.ch-check input:checked::after { transform: translateX(16px); }

@media (max-width: 700px) {
  .ch-bar { top: calc(60px + env(safe-area-inset-top)); border-radius: 18px; padding: 8px; gap: 8px; }
  .ch-pick { width: 100%; flex-wrap: nowrap; }
  .ch-select:first-child { flex: 1 1 auto; }
  .ch-select:first-child select { width: 100%; }
  .ch-view { width: 100%; justify-content: space-between; }
  .seg button { padding: 0 12px; font-size: 13.5px; }
  .ch-check span { font-size: 13px; }
}
@media (max-width: 420px) {
  .ch-step { display: none; }      /* (the chapter's own Previous and Next are under it) */
  .ch-select:first-child { flex: 1 1 55%; }
  .ch-select.narrow { flex: 1 1 45%; }
  .ch-select.narrow select { width: 100%; }
}

/* ---------- A chapter ---------- */
.ch-chapter { margin-top: 28px; min-height: 60vh; }
.ch-chapter[aria-busy="true"] .ch-verses { opacity: .4; transition: opacity .2s ease .15s; }
.ch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.ch-head h2 { margin: 0; }
.ch-count { margin: 0; font: 500 14px/1.3 var(--sans); color: var(--ink-2); }

.ch-verses { list-style: none; margin: 0; padding: 0; }
.ch-verse { padding: 14px 0 15px; box-shadow: inset 0 -.75px 0 var(--stroke); scroll-margin-top: var(--ch-space, 170px); }
.ch-verse:target { background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 12px; }
.ch-text { margin: 0; font: 18px/1.65 var(--scripture); color: var(--ink); overflow-wrap: break-word; }
.ch-ref {
  font: 700 14px/1 var(--sans); color: var(--ink); margin-right: 8px; white-space: nowrap; text-decoration: none;
}
.doc-body a.ch-ref { color: var(--ink); text-decoration: none; }
.doc-body a.ch-ref:hover { color: var(--accent); }
.ch-ref .th { font-weight: 500; color: var(--ink-2); margin-left: 4px; font-size: 12.5px; }
.ch-notes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.ch-notes li { margin: 0; padding: 0; font: 13.5px/1.45 var(--sans); color: var(--ink-2); }
.ch-notes b { color: var(--mk-blue); font-weight: 700; margin-right: 6px; font-size: 12px; }
.ch-none { padding: 26px 0; color: var(--ink-2); font-size: 16px; }

/* Side by side: Thomson's words and the 2026 words in two columns (stacked on a phone) */
.ch-cols { display: none; }
.side .ch-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 6px 0 8px;
  font: 700 11.5px/1.2 var(--sans); letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent);
  box-shadow: inset 0 -.75px 0 var(--stroke);
}
.ch-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 6px; }
.ch-pair .ch-text { font-size: 17px; }
.ch-pair .was del { text-decoration: none; }
.ch-pair .was del.x { background: color-mix(in srgb, var(--mk-red) 12%, transparent); border-radius: 4px; padding: 0 2px; }
.ch-pair .now ins.g, .ch-pair .now ins.b { background: color-mix(in srgb, currentColor 11%, transparent); border-radius: 4px; padding: 0 2px; }
.ch-pair .tag { display: none; }
@media (max-width: 700px) {
  .side .ch-cols { display: none; }
  .ch-pair { grid-template-columns: 1fr; gap: 6px; }
  .ch-pair .tag { display: block; font: 700 10.5px/1.2 var(--sans); letter-spacing: 1.3px; text-transform: uppercase; color: var(--ink-2); margin: 4px 0 2px; }
}

.ch-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.ch-pager .capsule { min-height: 44px; padding: 0 18px; font-size: 15px; max-width: 48%; }
.ch-pager .capsule:disabled { visibility: hidden; }
.ch-pager-label { overflow: hidden; text-overflow: ellipsis; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 18px 0 20px; -webkit-overflow-scrolling: touch; }
.ch-table { width: 100%; border-collapse: collapse; font: 15px/1.45 var(--sans); min-width: 620px; }
.ch-table.two { min-width: 520px; }
.ch-table th { text-align: left; font-weight: 700; font-size: 13px; color: var(--ink); padding: 8px 10px 8px 0; box-shadow: inset 0 -1px 0 var(--stroke); vertical-align: bottom; }
.ch-table td { padding: 9px 10px 9px 0; vertical-align: top; color: color-mix(in srgb, var(--ink) 86%, transparent); box-shadow: inset 0 -.75px 0 var(--stroke); }
.ch-table td:first-child { white-space: nowrap; color: var(--ink-2); }
.ch-table.two td:first-child { white-space: normal; color: inherit; }
