/* Deep-space midnight, per the owner's mockup: navy vignette, silver serif,
   glowing 42 emblem, steel-blue numerals and citations. */

:root {
  --bg: #0a0f1c;
  --bg-glow: #1b2b4d;
  --text: #e9edf5;
  --muted: #8b9cba;
  --accent: #7d9bd8;
  --rule: rgba(180, 200, 235, 0.18);
  --edge: #5b6f94;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  line-height: 1.6;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 90% 55% at 50% 0%, var(--bg-glow), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

main {
  max-width: 62rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* -- header ------------------------------------------------------------- */

header { text-align: center; margin-bottom: 3.5rem; }

.emblem-wrap {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2.75rem;
}

.emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  border: 1px solid var(--edge);
  outline: 1px solid rgba(125, 155, 216, 0.25);
  outline-offset: 5px;
  color: var(--accent);
  font-size: 2.3rem;
  text-decoration: none;
  box-shadow:
    0 0 30px rgba(125, 155, 216, 0.25),
    inset 0 0 18px rgba(125, 155, 216, 0.12);
}

.titles {
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 0 2.25rem;
}

.masthead {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
}

.tagline {
  color: var(--muted);
  font-style: italic;
  font-size: 1.35rem;
  margin: 0.75rem 0 0;
}

/* -- verse -------------------------------------------------------------- */

.verse-body {
  display: grid;
  grid-template-columns: minmax(4.5rem, max-content) 1fr;
  column-gap: 1.75rem;
  row-gap: 1.5rem;
  align-items: start;
}

.verse-num {
  font-size: 4rem;
  line-height: 0.9;
  text-align: right;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(125, 155, 216, 0.35);
}

.verse-text {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  line-height: 1.5;
}

.citation {
  text-align: right;
  font-style: italic;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  font-size: 1.35rem;
  color: var(--accent);
  margin: 1.5rem 0 0;
}

.citation a { color: var(--accent); text-decoration: none; }

/* -- actions ------------------------------------------------------------ */

.actions {
  margin-top: 3.25rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.actions a,
.actions button {
  appearance: none;
  background: transparent;
  border: 1px solid var(--edge);
  color: #c3cfe4;
  padding: 0.85rem 2.4rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.actions a:hover,
.actions button:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 16px rgba(125, 155, 216, 0.2);
}

.hint {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  margin-top: 2.5rem;
}

.api-hint {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.api-hint a { color: var(--muted); opacity: 0.7; }

/* -- stats -------------------------------------------------------------- */

.stats h1, .stats h2 {
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.totals div {
  border: 1px solid var(--edge);
  padding: 0.6rem 1rem;
  text-align: center;
}

.totals dt { font-size: 0.75rem; color: var(--muted); }
.totals dd { margin: 0; font-size: 1.4rem; }

.stats table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.stats td, .stats th {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  overflow-wrap: anywhere;
}

.stats .note { color: var(--muted); font-size: 0.8rem; }

/* -- footer ------------------------------------------------------------- */

footer {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
}

article.verse { padding-bottom: 4rem; }

footer a { color: #c9d4e8; }

@media (max-width: 40rem) {
  .verse-body { grid-template-columns: minmax(2.5rem, max-content) 1fr; column-gap: 1rem; }
  .verse-num { font-size: 2.6rem; }
}
