/* BibleJoy mockups: one stylesheet for home + reader, light + dark. */
:root {
  --bg: #f8f6f4;
  --surface: #ffffff;
  --sunk: #f1eeeb;
  --line: #e9e5e1;
  --line-soft: #efebe7;
  --ink: #1b1a19;
  --ink-2: #4a4745;
  --muted: #8d8884;
  --faint: #b3aea9;
  --accent: #c4531f;
  --accent-soft: #fbeee6;
  --red: #b42318;
  --btn: #1b1a19;
  --btn-ink: #ffffff;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 14px;
}
[data-theme="dark"] {
  --bg: #0e0e0e;
  --surface: #171717;
  --sunk: #222221;
  --line: #262626;
  --line-soft: #202020;
  --ink: #ededec;
  --ink-2: #c9c7c4;
  --muted: #8b8986;
  --faint: #5c5a58;
  --accent: #e0703a;
  --accent-soft: #2a1b13;
  --red: #f0766a;
  --btn: #f4f3f1;
  --btn-ink: #121212;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--sans); letter-spacing: -0.006em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* the lamp glyph */
.lamp {
  display: inline-block; width: 13px; height: 13px; flex: none;
  background: var(--accent); vertical-align: -1px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.2 1.2c.3 1.3-.6 2-.6 2.9 0 .6.4 1 1 1 .9 0 1.4-.9 1.1-2-.2-.8-.8-1.4-1.5-1.9z'/%3E%3Cpath d='M1 7.2h9.6c.9 0 1.7-.5 2.2-1.2l.5-.7c.3-.4.9-.4 1.2 0 .3.3.3.8 0 1.1l-1.4 1.8C11.8 10 10 11 8 11H5.8C3.2 11 1 9.4 1 7.2z'/%3E%3Crect x='4.6' y='12' width='4.8' height='1.6' rx='.5'/%3E%3Crect x='3.2' y='13.9' width='7.6' height='1.3' rx='.5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.2 1.2c.3 1.3-.6 2-.6 2.9 0 .6.4 1 1 1 .9 0 1.4-.9 1.1-2-.2-.8-.8-1.4-1.5-1.9z'/%3E%3Cpath d='M1 7.2h9.6c.9 0 1.7-.5 2.2-1.2l.5-.7c.3-.4.9-.4 1.2 0 .3.3.3.8 0 1.1l-1.4 1.8C11.8 10 10 11 8 11H5.8C3.2 11 1 9.4 1 7.2z'/%3E%3Crect x='4.6' y='12' width='4.8' height='1.6' rx='.5'/%3E%3Crect x='3.2' y='13.9' width='7.6' height='1.3' rx='.5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ico { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* site header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); }
.top-in { max-width: 1320px; margin: 0 auto; height: 56px; padding: 0 32px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15.5px; letter-spacing: -0.02em; }
.brand .lamp { width: 17px; height: 17px; }
.nav { display: flex; gap: 2px; margin-left: 10px; }
.nav a { padding: 6px 11px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.nav a.on { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.nav .n { color: var(--faint); margin-left: 4px; font-size: 12.5px; }
.spacer { flex: 1; }
.search { display: flex; align-items: center; gap: 8px; width: 290px; height: 34px; padding: 0 12px; border-radius: 9px; background: var(--sunk); color: var(--muted); font-size: 14px; }
.search kbd { margin-left: auto; font: 500 11.5px var(--sans); color: var(--faint); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #d8a27c, #a2643f); flex: none; }
.iconbtn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-2); }
.iconbtn:hover { background: var(--sunk); }
.m-only { display: none !important; }

/* buttons + pills */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.btn-dark { background: var(--btn); color: var(--btn-ink); }
.btn-line { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.btn .count { font-size: 12px; font-weight: 600; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; display: grid; place-items: center; background: color-mix(in srgb, var(--btn-ink) 18%, transparent); }
.btn .t { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.btn-sm { height: 28px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; gap: 6px; }
.ghost { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--muted); }
.pills { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--sunk); width: max-content; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.pill .n { color: var(--muted); font-size: 13px; }
.pill.on { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px var(--line); }
.hint { font-size: 13px; color: var(--muted); margin-left: 12px; }
.badge { font-size: 11.5px; font-weight: 600; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 6px; display: inline-grid; place-items: center; background: var(--btn); color: var(--btn-ink); }

/* the lamp voice */
.voice { display: flex; gap: 9px; font: 400 17.5px/1.5 var(--serif); color: var(--ink); letter-spacing: -0.005em; }
.voice .lamp { margin-top: 6px; }

/* ===== HOME ===== */
.page { max-width: 1320px; margin: 0 auto; padding: 30px 32px 64px; }
.brief-meta { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); }
.brief-meta b { color: var(--accent); font-weight: 500; }
.brief-row { display: flex; align-items: flex-start; gap: 40px; margin-top: 10px; }
.brief { flex: 1; max-width: 1000px; font: 400 29px/1.36 var(--serif); letter-spacing: -0.012em; color: var(--ink-2); }
.brief strong { font-weight: 400; color: var(--ink); }
.brief u { text-decoration: none; color: var(--ink); background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 94%; }
.brief-actions { display: flex; gap: 8px; margin-top: 44px; }
.bar { display: flex; align-items: center; margin-top: 30px; }
.sec { display: flex; align-items: baseline; gap: 9px; margin: 34px 0 14px; }
.sec h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.sec .n { color: var(--muted); font-size: 15px; }
.sec .d { color: var(--muted); font-size: 14px; }
.sec .r { margin-left: auto; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.sec:first-of-type { margin-top: 26px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 14px; display: flex; flex-direction: column; min-width: 0; }
.card-h { display: flex; align-items: flex-start; gap: 11px; }
.tile { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; font: 500 14px var(--serif); color: var(--ink-2); background: var(--sunk); }
.tile.gos { background: #f6e6dc; color: #9b4318; }
.tile.law { background: #e7ecdf; color: #4f6437; }
.tile.hist { background: #e3e7ef; color: #3e4f73; }
[data-theme="dark"] .tile.gos { background: #33211a; color: #ec9a6e; }
[data-theme="dark"] .tile.law { background: #1f2719; color: #a5c083; }
[data-theme="dark"] .tile.hist { background: #1b2130; color: #9aaed6; }
.card-t { font-weight: 500; font-size: 15.5px; letter-spacing: -0.012em; }
.card-s { font-size: 13.5px; color: var(--muted); margin-top: 1px; }
.card-time { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.bubble { margin-top: 14px; background: var(--sunk); border-radius: 12px; padding: 9px 12px; font-size: 14.5px; line-height: 1.5; color: var(--ink); width: max-content; max-width: 100%; }
.bubble + .bubble { margin-top: 6px; }
.bubble .vn { font-size: 11px; color: var(--muted); font-weight: 500; vertical-align: 1px; margin-right: 3px; }
.bubble.chip { display: inline-flex; align-items: center; gap: 7px; }
.bubble .mono { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.wj { color: var(--red); }
.sep { height: 1px; background: var(--line-soft); margin: 14px 0; }
.card .voice { font-size: 16.5px; }
.card .voice .lamp { margin-top: 5px; }
.note { margin: 14px 0 0 22px; border: 1px dashed var(--line); border-radius: 12px; padding: 9px 12px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
[data-theme="light"] .note, :root:not([data-theme]) .note { border-color: #dcd6d0; }
.card-f { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: auto; padding-top: 14px; }
.stats { display: flex; gap: 14px; margin-top: 12px; margin-left: 22px; font-size: 13.5px; color: var(--muted); }
.stats b { color: var(--ink); font-weight: 600; }

.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; font-size: 14.5px; }
.row + .row { border-top: 1px solid var(--line-soft); }
.row .when { font-family: var(--mono); font-size: 12.5px; color: var(--muted); width: 74px; flex: none; }
.row .what { flex: none; }
.row .why { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 40px; }
.row .done { margin-left: auto; color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; flex: none; }

.foot { max-width: 1320px; margin: 0 auto; padding: 22px 32px 40px; display: flex; gap: 20px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); }
.foot .spacer { flex: 1; }

/* ===== READER ===== */
.rd { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: calc(100vh - 56px); }
.rd-main { border-right: 1px solid var(--line-soft); }
.rd-head { display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 28px 0 20px; border-bottom: 1px solid var(--line-soft); }
.rd-title { font-weight: 600; font-size: 16px; letter-spacing: -0.015em; }
.rd-sub { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.rd-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.rd-mode { display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--muted); margin-right: 10px; }
.rd-mode b { color: var(--ink); font-weight: 500; }
.vbar { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }

.rd-body { max-width: 760px; margin: 0 auto; padding: 18px 28px 80px; }
.divider { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--muted); margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider.new { color: var(--accent); font-weight: 500; }
.divider.new::before, .divider.new::after { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.passage-hero { text-align: center; padding: 34px 0 6px; }
.passage-hero .tile { width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 14px; font-size: 19px; }
.passage-hero h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.passage-hero p { color: var(--muted); font-size: 15px; margin-top: 3px; }
.passage-hero .src { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }

.kjv { font-size: 17.5px; line-height: 1.72; color: var(--ink); letter-spacing: -0.008em; }
.kjv p + p { margin-top: 14px; }
.kjv sup { font-size: 10.5px; font-weight: 600; color: var(--muted); margin-right: 4px; vertical-align: 5px; letter-spacing: 0; }
.kjv .hl { background: var(--accent-soft); border-radius: 4px; box-shadow: 0 0 0 3px var(--accent-soft); }

.explain { margin-top: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px 16px; }
.explain-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.explain-h b { color: var(--accent); font-weight: 500; }
.explain .voice { margin-top: 10px; }
.explain .voice + .voice { margin-top: 8px; }
.explain .card-f { padding-top: 12px; }

.ask { position: sticky; bottom: 16px; margin-top: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px 10px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.ask .ph { color: var(--muted); font-size: 15.5px; }
.ask-f { display: flex; align-items: center; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 13.5px; }
.ask-f .ghost:first-child { color: var(--ink-2); }
.ask-f .btn { margin-left: auto; }

/* reader side: the plain-English page */
.side { padding: 26px 22px 60px; }
.side-top { text-align: center; padding-bottom: 20px; }
.side-top .tile { width: 58px; height: 58px; border-radius: 16px; margin: 0 auto 12px; }
.side-top .tile .lamp { width: 24px; height: 24px; }
.side-top h2 { font: 500 21px/1.25 var(--serif); letter-spacing: -0.015em; }
.side-top p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 0 8px; border-radius: 11px; background: var(--sunk); font-size: 13px; color: var(--ink-2); }
.act.on { background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink); font-weight: 500; }
.blk { border-top: 1px solid var(--line-soft); padding: 18px 0; }
.blk-h { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); font-weight: 500; margin-bottom: 10px; }
.blk-h .n { color: var(--muted); font-weight: 400; }
.blk-h .r { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 13.5px; }
.pe { font: 400 16.5px/1.56 var(--serif); color: var(--ink); }
.pe p + p { margin-top: 10px; }
.pe h3 { font: 600 13px var(--sans); letter-spacing: -0.005em; color: var(--muted); margin: 18px 0 8px; }
.pe h3:first-child { margin-top: 0; }
.bul { list-style: none; font: 400 16.5px/1.5 var(--serif); }
.bul li { position: relative; padding-left: 14px; }
.bul li + li { margin-top: 6px; }
.bul li::before { content: ""; position: absolute; left: 0; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.tell { margin-top: 12px; background: var(--sunk); border-radius: 9px; padding: 8px 11px; font-size: 13.5px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.box { width: 16px; height: 16px; border: 1.5px solid var(--faint); border-radius: 4px; flex: none; margin-top: 3px; }
.check .t { font-size: 15px; }
.check .s { font-size: 13px; color: var(--muted); margin-top: 1px; }
.xref { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.xref + .xref { margin-top: 9px; }
.xref .k { font-weight: 500; }
.xref .v { margin-left: auto; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); padding: 3px; background: var(--sunk); border-radius: 10px; }
.seg span { text-align: center; padding: 6px 0; border-radius: 7px; font-size: 13.5px; color: var(--muted); }
.seg span.on { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--line); }
.seg-note { margin-top: 9px; font-size: 13.5px; color: var(--muted); }

.mtabs { display: none; }

/* ===== MOBILE ===== */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .top-in { padding: 0 16px; height: 52px; gap: 8px; }
  .nav, .search, .d-only { display: none !important; }
  .m-only { display: grid !important; }
  .page { padding: 20px 16px 48px; }
  .brief-row { flex-direction: column; gap: 18px; }
  .brief { font-size: 23px; line-height: 1.38; }
  .brief-actions { margin-top: 0; width: 100%; }
  .brief-actions .btn { flex: 1; justify-content: center; height: 42px; }
  .bar { margin-top: 22px; overflow: hidden; margin-right: -16px; }
  .pills { overflow: hidden; }
  .sec { flex-wrap: wrap; row-gap: 2px; margin-top: 28px; }
  .sec .d { width: 100%; font-size: 13.5px; }
  .sec .r { position: absolute; right: 16px; }
  .sec { position: relative; }
  .grid { grid-template-columns: 1fr; }
  .row .why { display: none; }
  .row .when { width: 62px; }
  .foot { flex-wrap: wrap; padding: 20px 16px 32px; }

  .rd { grid-template-columns: minmax(0, 1fr); }
  .rd-tools .iconbtn:nth-child(n+5) { display: none; }
  .rd-sub { font-size: 12.5px; }
  .rd-main { border-right: 0; }
  .rd-head { height: 58px; padding: 0 12px 0 8px; gap: 8px; }
  .rd-mode { display: none; }
  .rd-body { padding: 8px 18px 60px; }
  .passage-hero { padding-top: 22px; }
  .kjv { font-size: 17px; line-height: 1.7; }
  .side { display: none; }
  .mtabs { display: grid; margin: 14px 18px 0; }
  .explain { padding: 16px 16px 14px; }
  .ask { bottom: 12px; }
  .ask-f .ghost:not(:first-child) { display: none; }
}
