/* Christian Open Library
   Geist and Geist Mono are served from this site (SIL Open Font License); nothing loads from elsewhere. */

@font-face { font-family: "Geist"; src: url("fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;

  --bg: #ffffff; --tile: #f4f4f1; --tile-hover: #ecebe6;
  --ink: #1a1a1a; --text: #2e2e2e; --muted: #555555;
  --line: #e3e3e3; --line-2: #d4d4d4; --dots: #c4c4c4;
  --accent: #e2bc62; --accent-soft: #f5e6bd;
  --btn: #1a1a1a; --on-btn: #ffffff;
  --radius: 6px;
  --width: 52rem;
  --chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v10H9l-5 4z'/%3E%3C/svg%3E");
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111214; --tile: #1c1d20; --tile-hover: #24252a;
    --ink: #f2f2ef; --text: #d9d9d4; --muted: #a7a7a1;
    --line: #2b2c30; --line-2: #3a3b40; --dots: #4a4b50;
    --accent: #e2bc62; --accent-soft: rgba(226, 188, 98, .22);
    --btn: #f2f2ef; --on-btn: #111214;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; display: block; }
h1, h2, h3 { color: var(--ink); font-family: var(--sans); letter-spacing: -.015em; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--dots); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; padding: .55rem .9rem; border-radius: var(--radius); background: var(--btn); color: var(--on-btn); }
.skip:focus { left: .5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: calc(var(--width) + 3rem); margin: 0 auto; padding: 0 1.5rem; }

/* Header */
header.site { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .bar { max-width: 72rem; margin: 0 auto; padding: .55rem 1.25rem; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 600; }
.brand img { border-radius: 6px; width: 28px; height: 28px; }
.nav-desktop ul, .nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-desktop ul { display: flex; gap: .15rem; }
.nav-desktop a { display: block; padding: .38rem .7rem; border-radius: var(--radius); color: var(--text); font-size: .95rem; text-decoration: none; }
.nav-desktop a:hover { background: var(--tile); color: var(--ink); }
.nav-desktop a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }

.nav-mobile { display: none; position: relative; }
.nav-mobile summary { list-style: none; display: flex; align-items: center; gap: .5rem; min-height: 40px; padding: .4rem .8rem; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink); font-size: .95rem; font-weight: 500; cursor: pointer; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; } .burger::after { top: 5px; }
.nav-mobile[open] .burger { background: transparent; }
.nav-mobile[open] .burger::before { top: 0; transform: rotate(45deg); }
.nav-mobile[open] .burger::after { top: 0; transform: rotate(-45deg); }
.nav-mobile nav { position: absolute; right: 0; top: calc(100% + .45rem); width: min(16rem, calc(100vw - 2rem)); padding: .35rem; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 12px 28px -8px rgba(0, 0, 0, .2); }
.nav-mobile nav a { display: block; padding: .6rem .75rem; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.nav-mobile nav a:hover { background: var(--tile); }
.nav-mobile nav a[aria-current="page"] { background: var(--accent-soft); font-weight: 600; }

/* Page heading */
.page-head { padding: 2.25rem 0 0; }
.page-head h1 { font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; margin: 0 0 .85rem; }
.page-head .lead { font-size: 1.15rem; line-height: 1.55; color: var(--text); margin: .9rem 0 0; max-width: 44rem; }
.page-head .meta { margin: .6rem 0 0; font-size: .95rem; color: var(--muted); }
.home-head h1 { font-size: clamp(2.2rem, 6vw, 2.9rem); }

/* Fact strip */
ul.facts { list-style: none; margin: 0; padding: .6rem 0; display: flex; flex-wrap: wrap; row-gap: .4rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
ul.facts li { display: flex; align-items: center; gap: .45rem; padding: 0 .9rem; border-left: 1px solid var(--line); font-size: .875rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
ul.facts li:first-child { padding-left: 0; border-left: 0; }
ul.facts svg { width: 17px; height: 17px; flex: none; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.15rem; border-radius: var(--radius); font: 600 1rem/1 var(--sans); text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--btn); color: var(--on-btn); }
.btn-primary:hover { opacity: .88; }
.btn-secondary { background: var(--bg); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--muted); }

/* Content */
.prose { padding-top: .5rem; padding-bottom: 3.5rem; }
.prose h2 { display: flex; align-items: center; gap: .9rem; font-size: 1.3rem; line-height: 1.3; font-weight: 650; margin: 2.25rem 0 .8rem; }
.prose h2::after { content: ""; flex: 1; min-width: 2rem; border-top: 1px dashed var(--dots); }
.prose h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 .6rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 .9rem; }
.prose li { margin-bottom: .4rem; }
.prose ul ul { margin-top: .4rem; }
.note, .small { font-size: .95rem; color: var(--muted); }
code { font: .92em/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere; }

/* Plain bulleted list */
ul.points { list-style: none; padding: 0; margin: .4rem 0 1rem; }
ul.points li { position: relative; margin: 0 0 .55rem; padding-left: 1.15rem; line-height: 1.55; }
ul.points li::before { content: ""; position: absolute; left: .1rem; top: .62em; width: .38rem; height: .38rem; border-radius: 50%; background: var(--ink); }
ul.points ul { margin: .4rem 0 0; padding-left: 1.1rem; }
ul.points ul li { padding-left: 0; margin-bottom: .25rem; }
ul.points ul li::before { display: none; }

/* Numbered steps: a short list */
ol.steps { list-style: none; padding: 0; margin: .4rem 0 1rem; counter-reset: st; }
ol.steps li { counter-increment: st; position: relative; margin: 0 0 .45rem; padding-left: 2.1rem; line-height: 1.55; }
ol.steps li::before { content: counter(st); position: absolute; left: 0; top: .1rem; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: .78rem; font-weight: 600; }

/* Setup page */
.prose h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.08rem; font-weight: 600; margin: 1.4rem 0 .45rem; }
.tag { font-size: .75rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: .1rem .45rem; border: 1px solid var(--line-2); border-radius: 4px; }
.jump { list-style: none; padding: 0; margin: .25rem 0 .25rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.jump li { margin: 0; }
.jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink); font-weight: 500; text-decoration: none; }
.jump a:hover { border-color: var(--muted); }

/* Connector address */
.address-box { margin: .5rem 0 .75rem; }
.address-box p { margin: 0 0 .35rem; font-size: .85rem; font-weight: 500; color: var(--muted); }
.address { display: flex; gap: .5rem; flex-wrap: wrap; }
.address code { flex: 1 1 20rem; display: flex; align-items: center; min-height: 44px; padding: .4rem .8rem; font-size: 1rem; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); overflow-wrap: normal; user-select: all; }
button.copy { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: 0 1.1rem; border: 0; border-radius: var(--radius); background: var(--btn); color: var(--on-btn); font: 600 .95rem/1 var(--sans); cursor: pointer; }
button.copy:hover { opacity: .88; }
button.copy svg { width: 15px; height: 15px; }

/* Example questions */
ul.questions { list-style: none; padding: 0; margin: .4rem 0 1rem; }
ul.questions li { position: relative; margin: 0 0 .4rem; padding-left: 1.75rem; color: var(--ink); line-height: 1.5; }
ul.questions li::before { content: ""; position: absolute; left: .1rem; top: .3rem; width: 1rem; height: 1rem; background: var(--muted); -webkit-mask: var(--chat) center / contain no-repeat; mask: var(--chat) center / contain no-repeat; }

/* Tables */
.tablewrap { overflow-x: auto; margin: .75rem 0 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; line-height: 1.45; }
tbody th { width: 30%; }
caption { text-align: left; padding: 0 0 .5rem; font-weight: 600; color: var(--ink); }
th, td { padding: .6rem 1rem .6rem 0; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { font-size: .8rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); border-top: 0; border-bottom: 1px solid var(--line-2); }
tbody th { font-weight: 500; color: var(--ink); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total th, tr.total td { font-weight: 700; color: var(--ink); border-top: 1px solid var(--line-2); }

/* Footer */
footer.site { border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
.foot { max-width: calc(var(--width) + 3rem); margin: 0 auto; padding: 1.75rem 1.5rem 2.25rem; }
.foot p { margin: 0 0 .6rem; }
.foot-brand { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink); margin-bottom: .9rem !important; }
.foot-brand img { border-radius: 5px; }
.foot ul { list-style: none; margin: 0 0 .9rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.foot ul a { color: var(--text); text-decoration: none; }
.foot ul a:hover { color: var(--ink); text-decoration: underline; }
.foot-small { font-size: .875rem; }

/* Small screens */
@media (max-width: 62rem) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
}
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .wrap, header.site .bar, .foot { padding-left: 1rem; padding-right: 1rem; }
  .page-head { padding-top: 1.6rem; }
  .page-head .lead { font-size: 1.07rem; }
  ul.facts li { padding: 0 .65rem; font-size: .8rem; }
  .actions .btn { flex: 1 1 auto; }
  .prose h2 { font-size: 1.2rem; margin-top: 1.9rem; }
  .address code { font-size: .88rem; overflow-wrap: anywhere; }
  button.copy { width: 100%; }

  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; width: 100%; }
  table.stack caption { display: block; }
  table.stack tr { padding: .75rem 1rem; border-top: 1px solid var(--line); }
  table.stack tbody th { border: 0; padding: 0 0 .35rem; font-weight: 600; }
  table.stack td { border: 0; padding: .1rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; white-space: normal; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: .88rem; text-align: left; flex: none; max-width: 45%; }
  table.stack tr.total th, table.stack tr.total td { background: none; }
  table.stack td[data-label="Outcome"], table.stack td[data-label="Sees"], table.stack td[data-label="Keeps"] { display: block; text-align: left; margin-bottom: .35rem; }
  table.stack td[data-label="Outcome"]::before, table.stack td[data-label="Sees"]::before, table.stack td[data-label="Keeps"]::before { display: block; margin-bottom: .05rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
  table.stack tbody th { width: auto; }
}
@media print {
  header.site, .actions, button.copy, .skip, .jump { display: none !important; }
  body { background: #fff; color: #000; }
}
