:root {
  --paper: #f5f1e8;
  --paper-deep: #ebe4d6;
  --surface: #fffdf8;
  --surface-raised: #fffffc;
  --ink: #181d1a;
  --ink-soft: #343f39;
  --muted: #657169;
  --line: #d3cabc;
  --line-strong: #aaa091;
  --matthew: #9d2f3b;
  --mark: #0f7560;
  --luke: #594b9f;
  --john: #b76a14;
  --shared: #edf6f1;
  --unique: #fff0a8;
  --variant: #f9d6c8;
  --variant-ink: #8f321c;
  --absent: #eceae4;
  --highlight: #f5cf5a;
  --focus: rgba(15, 117, 96, 0.28);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 22px 70px rgba(34, 29, 21, 0.13);
  --shadow-soft: 0 8px 26px rgba(34, 29, 21, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #f7f5ef;
  color: var(--ink);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  min-width: 320px;
  margin: 0;
}

a {
  color: inherit;
  text-decoration-color: rgba(24, 29, 26, 0.32);
  text-underline-offset: 4px;
  transition: color 160ms var(--ease-out), text-decoration-color 160ms var(--ease-out);
}

a:hover {
  color: var(--mark);
  text-decoration-color: currentColor;
}

mark {
  padding: 0 2px;
  border-radius: 2px;
  background: var(--highlight);
  color: inherit;
  box-decoration-break: clone;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.ichthys-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(211, 202, 188, 0.82);
  color: var(--muted);
  font-size: 0.9rem;
}

.ichthys-footer a {
  color: var(--ink);
  font-weight: 850;
  text-decoration-color: rgba(15, 117, 96, 0.28);
}

.ichthys-footer small {
  font-size: 0.82rem;
}

.app-header {
  position: relative;
  display: block;
  min-height: 0;
  margin-bottom: 14px;
  padding: 0;
  color: var(--ink);
}

.app-header::after {
  display: none;
}

.top-bar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.brand-lockup {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 850;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(15, 117, 96, 0.22);
  border-radius: 7px;
  background: rgba(237, 246, 241, 0.9);
  color: var(--mark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.kicker,
.source-note,
.metric p,
.table-status p {
  color: var(--muted);
}

.kicker {
  margin: 0 0 8px;
  color: var(--mark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: clamp(2.5rem, 5vw, 5.25rem);
  font-weight: 860;
  line-height: 0.97;
  letter-spacing: 0;
}

.supporting-copy {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.48;
}

.source-note {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: right;
}

.source-note a {
  color: var(--mark);
  text-decoration-color: rgba(15, 117, 96, 0.28);
}

.hero-copy {
  max-width: 980px;
}

.tool-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(211, 202, 188, 0.85);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 14px 36px rgba(34, 29, 21, 0.08);
}

.search-lead {
  display: grid;
  gap: 8px;
}

.search-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px);
  gap: 10px;
  align-items: end;
}

.filter-grid {
  display: grid;
  max-width: 360px;
}

.quick-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.quick-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.quick-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border-color: rgba(211, 202, 188, 0.9);
  border-radius: 7px;
  background: #fffefb;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.1;
}

.quick-button small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quick-button:hover,
.quick-button.is-active {
  border-color: rgba(15, 117, 96, 0.42);
  background: rgba(237, 246, 241, 0.88);
  color: #0a604f;
}

.intent-button.is-active {
  box-shadow: inset 0 -2px 0 rgba(15, 117, 96, 0.42);
}

.tool-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.search-field,
.phase-field {
  display: grid;
  gap: 6px;
}

.search-field-primary {
  gap: 8px;
}

.search-field span,
.phase-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: none;
}

input[type="search"],
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  font-size: 0.96rem;
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    background 160ms var(--ease-out);
}

input[type="search"]:hover,
select:hover {
  border-color: #7b887f;
  background: #fffefb;
}

input[type="search"]:focus-visible,
select:focus-visible,
button:focus-visible,
.toggle-field:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

input[type="search"] {
  padding: 0 14px;
}

.search-field-primary input[type="search"] {
  min-height: 54px;
  padding: 0 16px;
  border-color: rgba(15, 117, 96, 0.34);
  font-size: 1.06rem;
  box-shadow: inset 0 0 0 1px rgba(15, 117, 96, 0.08);
}

select {
  padding: 0 38px 0 14px;
}

.search-hint {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.secondary-controls,
.source-details {
  border-top: 1px solid rgba(211, 202, 188, 0.76);
}

.secondary-controls summary,
.source-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.secondary-controls summary::-webkit-details-marker,
.source-details summary::-webkit-details-marker {
  display: none;
}

.secondary-controls summary::after,
.source-details summary::after {
  color: var(--mark);
  content: "+";
  font-size: 1rem;
  font-weight: 900;
}

.secondary-controls[open] summary::after,
.source-details[open] summary::after {
  content: "-";
}

.secondary-controls[open],
.source-details[open] {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.answer-panel {
  display: block;
}

.answer-card,
.answer-empty {
  border: 1px solid rgba(15, 117, 96, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(237, 246, 241, 0.95), rgba(255, 253, 248, 0.98) 44%),
    var(--surface);
  box-shadow: 0 10px 28px rgba(34, 29, 21, 0.08);
}

.answer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.68fr);
  gap: 18px;
  padding: 18px;
}

.answer-empty {
  padding: 18px;
}

.answer-eyebrow {
  margin: 0 0 8px;
  color: var(--mark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer-copy h2,
.answer-empty h2 {
  margin: 0;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 880;
  line-height: 1.08;
  letter-spacing: 0;
}

.answer-sentence {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 740;
  line-height: 1.42;
}

.answer-detail,
.answer-empty p:last-of-type {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.46;
}

.answer-detail strong {
  color: var(--ink);
  font-weight: 900;
}

.answer-primary {
  min-height: 38px;
  margin-top: 14px;
  padding: 0 14px;
  border-color: rgba(15, 117, 96, 0.48);
  border-radius: 7px;
  background: var(--mark);
  color: #fffdf8;
}

.answer-primary:hover {
  border-color: #0a604f;
  background: #0a604f;
}

.presence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.presence-pill {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(211, 202, 188, 0.75);
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.78);
}

.presence-pill .gospel-dot {
  margin-top: 4px;
}

.presence-pill strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 880;
}

.presence-pill small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.3;
}

.presence-pill.is-absent {
  background: rgba(236, 234, 228, 0.68);
}

.presence-pill.is-absent strong,
.presence-pill.is-absent small {
  color: #7d857f;
}

.answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.answer-chip {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
}

.toggle-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(211, 202, 188, 0.9);
  border-radius: 7px;
  background: #fffefb;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  transition:
    border-color 160ms var(--ease-out),
    background 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.toggle-field:hover {
  border-color: var(--line-strong);
  background: #fbfaf5;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--mark);
}

.context-strip {
  display: grid;
  gap: 9px;
  padding-top: 10px;
  border-top: 1px solid rgba(211, 202, 188, 0.76);
}

.date-context {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.context-note,
.summary-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.context-note a {
  color: var(--mark);
  text-decoration-color: rgba(15, 117, 96, 0.28);
}

.summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.summary-line strong {
  color: var(--ink);
  font-weight: 900;
}

.trust-strip,
.support-panel,
.product-grid article {
  border: 1px solid rgba(211, 202, 188, 0.82);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.trust-strip p {
  margin: 0;
  padding: 12px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.trust-strip p + p {
  border-left: 1px solid rgba(211, 202, 188, 0.82);
}

.trust-strip strong {
  color: var(--ink);
}

.support-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px;
}

.support-panel h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2vw, 1.75rem);
  line-height: 1.08;
}

.support-panel p:last-child {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.support-actions {
  display: grid;
  gap: 8px;
  min-width: min(260px, 100%);
}

.support-actions a {
  display: block;
  min-height: 38px;
  padding: 10px 13px;
  border: 1px solid rgba(15, 117, 96, 0.28);
  border-radius: 7px;
  color: var(--mark);
  font-size: 0.88rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  background: rgba(237, 246, 241, 0.84);
}

.support-actions a:first-child {
  color: #fffdf8;
  background: var(--mark);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.product-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 210px;
  padding: 16px;
}

.product-grid h2 {
  margin: 0;
  font-size: clamp(1.22rem, 2vw, 1.65rem);
  line-height: 1.08;
}

.product-grid p:not(.kicker) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.product-grid a {
  justify-self: start;
  margin-top: 6px;
  border: 1px solid rgba(15, 117, 96, 0.28);
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--mark);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  background: rgba(237, 246, 241, 0.84);
}

.dating-panel {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin-top: 10px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(245, 207, 90, 0.1), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.dating-copy {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.panel-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-transform: none;
}

.dating-copy p:last-child {
  max-width: 44rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.gospel-date-grid {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.gospel-date-card {
  position: relative;
  display: grid;
  flex: 0 0 138px;
  grid-template-columns: auto 1fr;
  gap: 7px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(211, 202, 188, 0.75);
  border-radius: 7px;
  background: #fffefb;
}

.gospel-date-card:last-child {
  border-right: 1px solid rgba(211, 202, 188, 0.75);
}

.gospel-date-card h3 {
  margin: 0 0 1px;
  font-size: 0.74rem;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: none;
}

.gospel-date-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.gospel-date-card .date-range {
  margin: 0;
  color: var(--ink);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.78rem;
  font-weight: 780;
}

.gospel-date-matthew {
  box-shadow: inset 3px 0 0 rgba(157, 47, 59, 0.62);
}

.gospel-date-mark {
  box-shadow: inset 3px 0 0 rgba(15, 117, 96, 0.68);
}

.gospel-date-luke {
  box-shadow: inset 3px 0 0 rgba(89, 75, 159, 0.68);
}

.gospel-date-john {
  box-shadow: inset 3px 0 0 rgba(183, 106, 20, 0.72);
}

.snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric {
  min-width: 0;
  padding: 12px 14px 11px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15, 117, 96, 0.05), transparent 42%),
    var(--surface);
}

.metric:last-child {
  border-right: 0;
}

.metric span {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.8vw, 2.3rem);
  font-weight: 700;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.metric p {
  margin: 5px 0 0;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legend {
  display: block;
  margin: 10px 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.table-legend summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.table-legend summary::-webkit-details-marker {
  display: none;
}

.table-legend summary::after {
  color: var(--mark);
  content: "+";
  font-size: 1rem;
  font-weight: 900;
}

.table-legend[open] summary::after {
  content: "-";
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 2px 0 8px;
}

.legend-items span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 6px;
  border: 1px solid transparent;
}

.legend-swatch {
  width: 13px;
  height: 13px;
  border: 1px solid var(--line-strong);
}

.swatch-all {
  background: linear-gradient(135deg, rgba(15, 117, 96, 0.24), rgba(183, 106, 20, 0.22));
}

.swatch-shared {
  background: var(--shared);
}

.swatch-unique {
  background: var(--unique);
}

.swatch-variant {
  background: var(--variant);
}

.swatch-absent {
  background: var(--absent);
}

.compare-shell {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 9px 12px 9px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(245, 207, 90, 0.09), transparent 40%),
    #fcfbf7;
}

.table-status p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.35;
}

button {
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

button:hover {
  border-color: #7b887f;
  background: #f6f3ea;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: default;
  opacity: 0.44;
}

button:disabled:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
}

button:disabled:active {
  transform: none;
}

#clearFilters {
  min-height: 32px;
  padding: 0 12px;
}

.synopsis-table {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}

.table-header,
.story-row,
.expanded-row {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) repeat(4, minmax(172px, 1fr));
  min-width: 1010px;
}

.table-header {
  position: sticky;
  top: 0;
  z-index: 8;
  border-bottom: 1px solid var(--line-strong);
  background: #252b27;
  color: #fffaf0;
}

.header-cell {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid rgba(255, 250, 240, 0.12);
  color: rgba(255, 250, 240, 0.7);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.header-cell:last-child,
.gospel-cell:last-child,
.expanded-cell:last-child {
  border-right: 0;
}

.header-cell.gospel-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fffaf0;
}

.gospel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 250, 240, 0.08);
}

.dot-matthew {
  background: var(--matthew);
}

.dot-mark {
  background: var(--mark);
}

.dot-luke {
  background: var(--luke);
}

.dot-john {
  background: var(--john);
}

.story-row {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.story-row:hover .gospel-cell.present {
  filter: saturate(1.06);
}

.story-row.is-expanded {
  border-bottom-color: var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(24, 29, 26, 0.05);
}

.story-axis {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-content: start;
  width: 100%;
  min-width: 0;
  padding: 18px 15px 18px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.story-axis:hover h2 {
  text-decoration: underline;
  text-decoration-color: rgba(24, 29, 26, 0.26);
  text-underline-offset: 4px;
}

.story-axis::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 34px;
  width: 1px;
  background: var(--line);
  content: "";
}

.story-row:first-of-type .story-axis::before {
  top: 24px;
}

.axis-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.story-axis h2 {
  margin: 2px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.14;
  letter-spacing: 0;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 7px;
}

.phase-name {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.coverage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 248, 0.72);
  color: #46534b;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.coverage-all {
  border-color: rgba(15, 117, 96, 0.26);
  background: rgba(237, 246, 241, 0.88);
}

.coverage-unique {
  border-color: rgba(183, 106, 20, 0.32);
  background: rgba(255, 240, 168, 0.76);
}

.variant-pill {
  border-color: rgba(143, 50, 28, 0.26);
  background: rgba(249, 214, 200, 0.74);
  color: var(--variant-ink);
}

.relation-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.relation-match {
  border-color: rgba(15, 117, 96, 0.32);
  color: #0a604f;
}

.relation-partial {
  border-color: rgba(183, 106, 20, 0.32);
  color: #86500f;
}

.relation-unique {
  border-color: rgba(157, 47, 59, 0.26);
  color: #832936;
}

.relation-text {
  border-color: rgba(143, 50, 28, 0.34);
  background: rgba(249, 214, 200, 0.74);
  color: var(--variant-ink);
}

.row-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 560;
  line-height: 1.48;
}

.expand-cue {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-top: 11px;
  color: var(--mark);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.expand-cue::after {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid rgba(15, 117, 96, 0.38);
  background: rgba(15, 117, 96, 0.06);
  content: "+";
  font-size: 0.88rem;
  line-height: 1;
}

.story-axis[aria-expanded="true"] .expand-cue::after {
  content: "-";
}

.gospel-cell {
  position: relative;
  min-width: 0;
  min-height: 150px;
  padding: 16px 14px 17px;
  border-right: 1px solid var(--line);
  background: var(--shared);
}

.gospel-cell::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
  content: "";
}

.gospel-cell[data-gospel="matthew"]::after {
  background: rgba(157, 47, 59, 0.62);
}

.gospel-cell[data-gospel="mark"]::after {
  background: rgba(15, 117, 96, 0.62);
}

.gospel-cell[data-gospel="luke"]::after {
  background: rgba(89, 75, 159, 0.62);
}

.gospel-cell[data-gospel="john"]::after {
  background: rgba(183, 106, 20, 0.7);
}

.story-row.all-four .gospel-cell.present {
  background: linear-gradient(180deg, rgba(237, 246, 241, 0.98), rgba(255, 253, 248, 0.88));
}

.gospel-cell.unique {
  background: var(--unique);
}

.gospel-cell.variant {
  background: var(--variant);
}

.gospel-cell.absent {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(24, 29, 26, 0.018) 0,
      rgba(24, 29, 26, 0.018) 8px,
      transparent 8px,
      transparent 18px
    ),
    var(--absent);
  color: #7d857f;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.gospel-cell.absent::after {
  background: transparent;
}

.gospel-cell.absent span {
  max-width: 10ch;
  text-align: center;
}

.ref-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}

.ref-badge,
.note-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.note-badge {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  border-color: rgba(143, 50, 28, 0.24);
  background: rgba(255, 253, 248, 0.74);
  color: var(--variant-ink);
  white-space: normal;
}

.note-badge small {
  max-width: 20ch;
  color: #704133;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 780;
  line-height: 1.2;
}

.cell-note {
  margin: 0 0 9px;
  color: #3f4b44;
  font-size: 0.8rem;
  font-weight: 780;
  line-height: 1.38;
}

.excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #222a25;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.44;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.expanded-row {
  border-bottom: 1px solid var(--line-strong);
  background: #f6f4ee;
}

.expanded-axis,
.expanded-cell {
  min-width: 0;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
}

.expanded-axis {
  color: var(--muted);
  background: #f0ede5;
}

.expanded-axis h3 {
  margin: 0 0 9px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.expanded-axis p,
.variant-note p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.relation-detail {
  margin-top: 14px !important;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.relation-detail strong {
  color: var(--ink);
}

.row-insights {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.row-insights p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.48;
}

.row-insights span {
  color: var(--ink);
  font-weight: 900;
}

.expanded-cell {
  background: rgba(255, 253, 248, 0.64);
}

.expanded-cell.absent {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(24, 29, 26, 0.016) 0,
      rgba(24, 29, 26, 0.016) 8px,
      transparent 8px,
      transparent 18px
    ),
    var(--absent);
  color: var(--muted);
}

.expanded-cell.variant {
  background: rgba(249, 214, 200, 0.72);
}

.full-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 12px;
}

.full-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 950;
}

.full-passage {
  max-height: 24rem;
  overflow: auto;
  padding-right: 6px;
  scrollbar-color: var(--line-strong) transparent;
}

.verse {
  margin: 0 0 10px;
  color: #1f2924;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.99rem;
  line-height: 1.55;
}

.verse-number {
  display: inline-block;
  margin-right: 7px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 900;
}

.variant-note {
  margin: 12px 0 0;
  padding: 11px 12px;
  border-left: 3px solid var(--variant-ink);
  background: rgba(255, 253, 248, 0.62);
  color: #5b2b20;
}

.variant-meta {
  margin-top: 8px !important;
  color: #704133;
  font-size: 0.8rem !important;
}

.variant-meta span {
  color: var(--variant-ink);
  font-weight: 900;
}

.empty-state {
  padding: 46px 18px;
  color: var(--muted);
  font-size: 0.96rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (min-width: 681px) {
  .table-header .header-cell:first-child,
  .story-axis,
  .expanded-axis {
    position: sticky;
    left: 0;
  }

  .table-header .header-cell:first-child {
    z-index: 9;
    background: #252b27;
  }

  .story-axis {
    z-index: 5;
    background: var(--surface);
  }

  .story-row.all-four .story-axis {
    background: #fbfcf7;
  }

  .expanded-axis {
    z-index: 4;
    background: #f0ede5;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    width: min(100% - 24px, 1100px);
  }

  .app-header {
    min-height: 0;
    padding: 0;
  }

  .orientation-panel {
    grid-template-columns: 1fr 1fr;
  }

  .orientation-copy {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .toggle-field {
    justify-content: flex-start;
  }

  .answer-card {
    grid-template-columns: 1fr;
  }

  .presence-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dating-panel {
    grid-template-columns: 1fr;
  }

  .dating-copy {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .gospel-date-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .snapshot {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric:nth-child(2) {
    border-right: 1px solid var(--line);
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 760px);
    padding-top: 10px;
  }

  .app-header {
    padding: 0;
  }

  .top-bar {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
  }

  .brand-lockup {
    align-items: center;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  h1 {
    font-size: 2.55rem;
    line-height: 0.94;
  }

  .tagline {
    max-width: 34rem;
    font-size: 1.04rem;
  }

  .supporting-copy {
    max-width: 34rem;
    font-size: 0.9rem;
  }

  .source-note {
    max-width: none;
    text-align: left;
  }

  .quick-row,
  .date-context {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .presence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gospel-date-card:nth-child(2) {
    border-right: 1px solid var(--line);
  }

  .gospel-date-card:nth-child(-n + 2) {
    border-bottom: 0;
  }

  .snapshot {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric {
    padding: 12px;
  }

  .metric:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .metric:nth-child(even) {
    border-right: 1px solid var(--line);
  }

  .metric:last-child {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 0;
  }

  .metric:nth-child(n + 3) {
    border-bottom: 0;
  }

  .table-header {
    display: none;
  }

  .story-row,
  .expanded-row {
    display: block;
    min-width: 0;
  }

  .story-axis {
    grid-template-columns: 32px 1fr;
    min-height: 44px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .story-axis::before {
    left: 33px;
  }

  .axis-marker {
    width: 32px;
    height: 32px;
  }

  .gospel-cell,
  .expanded-cell,
  .expanded-axis {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .gospel-cell {
    padding: 15px 14px 15px 17px;
  }

  .gospel-cell::before,
  .expanded-cell::before {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.11em;
    text-transform: uppercase;
  }

  .gospel-cell[data-gospel="matthew"]::before,
  .expanded-cell[data-gospel="matthew"]::before {
    color: var(--matthew);
    content: "Matthew";
  }

  .gospel-cell[data-gospel="mark"]::before,
  .expanded-cell[data-gospel="mark"]::before {
    color: var(--mark);
    content: "Mark";
  }

  .gospel-cell[data-gospel="luke"]::before,
  .expanded-cell[data-gospel="luke"]::before {
    color: var(--luke);
    content: "Luke";
  }

  .gospel-cell[data-gospel="john"]::before,
  .expanded-cell[data-gospel="john"]::before {
    color: var(--john);
    content: "John";
  }

  .expanded-cell:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 600px) {
  .orientation-panel {
    grid-template-columns: 1fr;
  }

  .orientation-copy,
  .quick-group {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quick-group:last-child {
    border-bottom: 0;
  }

  .gospel-date-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gospel-date-card:nth-child(2) {
    border: 1px solid rgba(211, 202, 188, 0.75);
  }

  .gospel-date-card:nth-child(-n + 2) {
    border: 1px solid rgba(211, 202, 188, 0.75);
  }

  .snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 440px) {
  .app-shell {
    width: min(100% - 14px, 440px);
  }

  .app-header {
    padding: 0;
  }

  .brand-lockup {
    gap: 12px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .legend {
    gap: 4px;
  }

  .snapshot {
    grid-template-columns: 1fr;
  }

  .gospel-date-grid {
    grid-template-columns: 1fr;
  }

  .gospel-date-card,
  .gospel-date-card:nth-child(2) {
    border: 1px solid rgba(211, 202, 188, 0.75);
  }

  .gospel-date-card:last-child {
    border: 1px solid rgba(211, 202, 188, 0.75);
  }

  .answer-card,
  .answer-empty {
    padding: 14px;
  }

  .presence-grid {
    grid-template-columns: 1fr;
  }

  .search-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip,
  .support-panel,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip p + p {
    border-top: 1px solid rgba(211, 202, 188, 0.82);
    border-left: 0;
  }

  .quick-button {
    min-height: 32px;
  }

  .table-status {
    align-items: flex-start;
    flex-direction: column;
  }

  #clearFilters {
    align-self: flex-start;
  }

  .search-field,
  .phase-field {
    grid-column: auto;
  }

  .metric,
  .metric:nth-child(odd),
  .metric:nth-child(even),
  .metric:nth-child(n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .legend span {
    padding: 0 5px;
  }
}
