/* Christian Translation Project — design tokens and components.
   Motifs: Eusebian canon-table arcades, vine scroll, rosette, cinnabar
   rubrics, colophons, marginal apparatus; no cross symbol. No manuscript images: all ornament is CSS/SVG. */

:root {
  --paper: #f6f1e4;
  --paper-2: #fbf7ec;
  --ink: #1e1b18;
  --ink-2: #4c463c;
  --ink-3: #6f675a;
  --rule: #d8cdba;
  --rule-2: #c3b7a2;
  --cinnabar: #a23b2a;
  --cinnabar-soft: #c96a56;
  --ochre: #b0842c;
  --malachite: #2f5a4c;
  --indigo: #2c3e5a;
  --gold: #c49a3a;
  --display: "Newsreader", "EB Garamond", serif;
  --body: "EB Garamond", Georgia, serif;
  --label: "Inter", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", monospace;
  --coptic: "Noto Sans Coptic", "Noto Serif Coptic", serif;
  --ethiopic: "Noto Serif Ethiopic", serif;
  --syriac: "Noto Sans Syriac", "Noto Serif Syriac", serif;
  --armenian: "Noto Serif Armenian", serif;
  --georgian: "Noto Serif Georgian", serif;
  --measure: 66ch;
  --content: 1128px;
  --shadow: 0 1px 0 rgba(30,27,24,.06), 0 16px 40px rgba(30,27,24,.06);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.62;
  font-feature-settings: "onum" 1, "liga" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cinnabar); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
::selection { background: rgba(162,59,42,.16); }

.wrap { max-width: var(--content); margin: 0 auto; padding: 0 28px; }
.rule { border: 0; border-top: 1px solid var(--rule); }
.rubric {
  font-family: var(--label);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cinnabar);
  font-weight: 600;
}
.label {
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mono { font-family: var(--mono); font-size: .78em; letter-spacing: -.01em; }
.meta { color: var(--ink-3); font-size: .82rem; }

/* Masthead */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.seal {
  width: 34px; height: 34px; flex: 0 0 34px;
  border: 1px solid var(--cinnabar);
  border-radius: 50% 50% 3px 3px;
  display: grid; place-items: center;
  color: var(--cinnabar);
  font-family: var(--mono); font-size: 14px;
  position: relative;
  background: var(--paper-2);
}
.seal::before {
  content: ""; position: absolute; inset: 5px 5px 0;
  border: 1px solid var(--gold); border-bottom: 0;
  border-radius: 50% 50% 0 0;
}
.brand b { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: -.01em; }
.brand span { display: block; font-family: var(--label); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 18px; }
.masthead nav a { font-family: var(--label); font-size: 12px; letter-spacing: .02em; color: var(--ink-2); text-decoration: none; }
.masthead nav a:hover { color: var(--cinnabar); }

.citecopy { display: none; }
.jscopy .citecopy {
  display: inline-flex; align-items: center; vertical-align: 1px;
  font-family: var(--label); font-size: 10.5px; letter-spacing: .02em;
  color: var(--ink-3); background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: 2px;
  padding: 2px 7px; margin-left: 8px; cursor: pointer;
  transition: color .12s, border-color .12s;
}
.jscopy .citecopy:hover { color: var(--cinnabar); border-color: var(--cinnabar); }
.jscopy .citecopy[data-state="done"] { color: var(--malachite); border-color: var(--malachite); }
.jscopy .citecopy[data-state="error"] { color: var(--cinnabar); border-color: var(--cinnabar); }

/* Buttons and toggles */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--rule-2);
  background: var(--paper-2);
  color: var(--ink); padding: 8px 12px;
  font-family: var(--label); font-size: 12px; letter-spacing: .02em;
  border-radius: 2px; text-decoration: none;
}
.btn:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.toggle { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 2px; overflow: hidden; }
.toggle span { padding: 6px 10px; font-family: var(--label); font-size: 11px; color: var(--ink-3); background: var(--paper-2); }
.toggle span.on { background: var(--ink); color: var(--paper); }

/* Cards and canon-table stats */
.canon-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 28px 0;
}
.canon-stats div { padding: 18px 12px 16px; border-right: 1px solid var(--rule); }
.canon-stats div:last-child { border-right: 0; }
.canon-stats b { display: block; font-family: var(--display); font-size: 34px; line-height: 1; font-weight: 500; letter-spacing: -.02em; }
.canon-stats span { display: block; margin-top: 7px; font-family: var(--label); font-size: 10px; line-height: 1.35; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }

.card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 20px;
}
.card h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 500; font-size: 25px; letter-spacing: -.01em; }
.card p { margin: 8px 0; color: var(--ink-2); font-size: 16px; }

/* Table */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-family: var(--label); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); padding: 9px 10px;
  border-bottom: 1px solid var(--rule-2); font-weight: 500;
}
td { padding: 12px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: 16px; }
tr:hover td { background: rgba(255,255,255,.28); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Status marks */
.pill {
  display: inline-block; font-family: var(--label); font-size: 10px;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px;
  border: 1px solid; border-radius: 1px; white-space: nowrap;
}
.st-none { color: var(--cinnabar); border-color: var(--cinnabar-soft); background: rgba(162,59,42,.05); }
.st-partial { color: #7c5a12; border-color: var(--ochre); background: rgba(176,132,44,.07); }
.st-full { color: var(--malachite); border-color: #83a094; background: rgba(47,90,76,.06); }
.st-unknown { color: var(--ink-3); border-color: var(--rule-2); }

/* Architecture — structure drawn in CSS, not pictures. A cornice of dentils, a
   framed inscription, a blind arcade. Nothing here is a standalone image. */
.cornice {
  height: 14px; border-top: 1px solid var(--ink);
  background-image: repeating-linear-gradient(90deg, var(--rule) 0 6px, transparent 6px 15px);
  background-size: auto 5px; background-position: bottom; background-repeat: repeat-x;
}
.hero {
  display: block; padding: 40px 34px 30px; position: relative;
  border-left: 1px solid var(--rule); border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule); text-align: center;
}
/* capitals: a small block where each pilaster meets the lintel and the plinth */
.hero::before, .hero::after {
  content: ""; position: absolute; top: -1px; width: 16px; height: 9px;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule-2);
  background: var(--paper-2);
}
.hero::before { left: -1px; }
.hero::after { right: -1px; }
.arcade {
  display: flex; align-items: flex-end; height: 44px; margin: 0 0 26px;
  border-bottom: 1px solid var(--ink);
}
.arcade i {
  flex: 1 1 0; height: 100%; border: 1px solid var(--rule);
  border-bottom: 0; border-left: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.35), transparent 70%);
}
.arcade i:first-child { border-left: 1px solid var(--rule); }
.interlace, .frieze {
  height: 12px; margin: 26px 0;
  border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2);
  background-image: repeating-linear-gradient(90deg, var(--rule) 0 5px, transparent 5px 13px);
  background-size: auto 5px; background-position: center; background-repeat: repeat-x;
}
.carpet { width: 100%; height: auto; display: block; }
.colophon {
  border-top: 1px solid var(--rule-2);
  margin-top: 40px; padding: 18px 0 0;
  font-size: 13px; color: var(--ink-3);
}
.colophon b { color: var(--ink); font-weight: 500; }

/* Reader rails */
.reader {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
}
.rail { position: sticky; top: 18px; }
.rail h4 { margin: 0 0 10px; }
.passage {
  border-bottom: 1px solid var(--rule);
  padding: 22px 0 24px;
}
.passage .seg {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  margin-bottom: 8px;
}
.passage .coptic {
  font-family: var(--coptic); font-size: 18px; line-height: 2;
  text-align: start; white-space: pre-line; color: #28221c;
}
.passage .english { font-size: 19px; line-height: 1.62; max-width: var(--measure); }
.apparatus { font-size: 14px; line-height: 1.5; }
.unit { border-left: 2px solid var(--rule-2); padding: 5px 0 5px 10px; margin: 10px 0; }
.unit.text { border-left-color: var(--malachite); }
.unit.background { border-left-color: var(--ochre); }
.unit.external { border-left-color: var(--indigo); }
.unit .basis { font-family: var(--label); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.unit .cite { color: var(--cinnabar); font-size: 11px; }

/* Plate / object */
.plate {
  background: #fffdf7; border: 1px solid var(--rule-2); padding: 14px;
  box-shadow: var(--shadow);
}
.plate .frame { border: 1px solid var(--gold); padding: 10px; }
.plate svg { display: block; width: 100%; height: auto; }
.tombstone { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; font-size: 15px; }
.tombstone dt { font-family: var(--label); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.tombstone dd { margin: 0; color: var(--ink-2); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 1px solid var(--rule-2); padding: 0 0 14px 14px; position: relative; }
.timeline li::before { content: ""; width: 6px; height: 6px; background: var(--cinnabar); position: absolute; left: -3px; top: 7px; border-radius: 50%; }

/* Hero */
.hero h1 { font-family: var(--display); font-size: clamp(42px, 5.2vw, 72px); line-height: .98; font-weight: 500; letter-spacing: -.035em; margin: 0 0 10px; }
.hero .lede { font-size: 22px; line-height: 1.5; color: var(--ink-2); max-width: 34ch; }
.hero .scripts { font-family: var(--label); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 0; }

@media (max-width: 980px) {
  .reader { grid-template-columns: 1fr; }
  .rail { position: static; }
  .hero { padding: 28px 20px 22px; }
  .canon-stats { grid-template-columns: repeat(3, 1fr); }
  .canon-stats div:nth-child(3) { border-right: 0; }
  .canon-stats div:nth-child(-n+3) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .arcade { height: 34px; }
  .cornice { background-position: bottom; }
  body { font-size: 18px; }
  .wrap { padding: 0 18px; }
  .masthead { grid-template-columns: 1fr; }
  .masthead nav { gap: 12px; }
  .canon-stats { grid-template-columns: repeat(2, 1fr); }
  .canon-stats div:nth-child(2n) { border-right: 0; }
  .tombstone { grid-template-columns: 1fr; }
}

@media print {
  .masthead nav, .toggle, .btn { display: none; }
  body { background: #fff; font-size: 11pt; }
  .reader { display: block; }
  .rail { display: none; }
}
/* Wide catalogue tables scroll inside their own box rather than pushing the page
   sideways on a phone. */
.tablewrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.tablewrap>table{min-width:640px}
@media(max-width:700px){
  .tablewrap>table{min-width:0;font-size:13px}
  .tablewrap th,.tablewrap td{padding:6px 7px}
}
