/* ============================================================================
   Interactive terminal overlay — "Divine light meets the command line".
   Extends the existing token set rather than replacing it: the gold/navy
   identity stays, and a thin cyber layer sits on top of it.
   Zero dependencies, ~4 KB, no build step.
   ============================================================================ */
:root {
  --term-bg:      #0A0E17;
  --term-glass:   rgba(26, 32, 48, 0.72);
  --term-cyan:    #5CE1E6;
  --term-green:   #7CFFB2;
  --term-dim:     #6C7891;
  --term-glow:    0 0 24px rgba(92, 225, 230, 0.16);
}

.term-launch {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; letter-spacing: 0.06em;
  padding: 11px 18px; cursor: pointer;
  color: var(--term-cyan);
  background: var(--term-glass);
  border: 1px solid rgba(92, 225, 230, 0.35);
  border-radius: 6px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.term-launch:hover { border-color: var(--term-cyan); box-shadow: var(--term-glow); transform: translateY(-1px); }
.term-launch .blink { color: var(--term-green); animation: term-blink 1.2s steps(1) infinite; }

@keyframes term-blink { 0%,49% { opacity: 1 } 50%,100% { opacity: 0 } }

.term-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(7, 10, 17, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.term-overlay[data-open="true"] { opacity: 1; pointer-events: auto; }

.term-window {
  width: min(760px, 100%); max-height: min(70vh, 620px);
  display: flex; flex-direction: column;
  background: var(--term-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6), var(--term-glow);
  transform: translateY(8px) scale(.99);
  transition: transform .2s ease;
}
.term-overlay[data-open="true"] .term-window { transform: none; }

.term-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; color: var(--term-dim); letter-spacing: .08em;
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.term-dot.live { background: var(--term-green); box-shadow: 0 0 8px var(--term-green); }
.term-bar .spacer { flex: 1; }
.term-close {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 4px; padding: 3px 9px; cursor: pointer; font: inherit;
}
.term-close:hover { color: var(--ink-light); border-color: var(--muted); }

.term-log {
  flex: 1; overflow-y: auto; padding: 16px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px; line-height: 1.65;
  color: var(--ink-light);
  overflow-wrap: anywhere;
}
.term-log p { margin: 0 0 2px; }
.term-log .u { color: var(--term-cyan); }
.term-log .dim { color: var(--term-dim); }
.term-log .ok { color: var(--term-green); }
.term-log .gold { color: var(--gold-soft); }
.term-log .tag {
  display: inline-block; margin-right: 6px; padding: 1px 7px;
  font-size: 11px; border-radius: 999px;
  color: var(--term-cyan); border: 1px solid rgba(92,225,230,.3);
}
.term-log .verse { color: var(--gold-soft); font-style: italic; }
.term-log .rule { border-top: 1px dashed var(--line); margin: 10px 0; }

.term-input-row {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--line); padding: 12px 16px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.term-prompt { color: var(--term-green); font-size: 13.5px; }
.term-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--ink-light); font: inherit; font-size: 13.5px;
}
.term-input::placeholder { color: var(--term-dim); }

@media (max-width: 560px) {
  .term-window { max-height: 78vh; }
  .term-log { font-size: 12.5px; }
}

/* Honour the existing accessibility contract in style.css. */
@media (prefers-reduced-motion: reduce) {
  .term-overlay, .term-window, .term-launch { transition: none; }
  .term-launch .blink { animation: none; opacity: 1; }
}

/* ============================================================================
   Ambient scripture widget — the daily read.
   ============================================================================ */
.verse-card {
  background: var(--term-glass);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 8px;
  padding: 20px 22px;
  max-width: 620px;
}
.verse-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--term-dim); margin-bottom: 14px;
}
.verse-next {
  background: none; border: 1px solid var(--line); color: var(--term-cyan);
  border-radius: 4px; padding: 3px 10px; cursor: pointer;
  font: inherit; font-size: 11px; letter-spacing: .08em;
  transition: border-color .15s ease, color .15s ease;
}
.verse-next:hover { border-color: var(--term-cyan); }
.verse-body { margin: 0 0 12px; border: 0; padding: 0; }
.verse-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 21px; line-height: 1.5; color: var(--gold-soft);
  margin: 0 0 8px;
}
.verse-ref {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; font-style: normal; color: var(--gold); letter-spacing: .06em;
}
.verse-note {
  font-size: 14px; color: var(--muted); margin: 0 0 14px;
}
.verse-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.verse-tag {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  color: var(--term-cyan); border: 1px solid rgba(92, 225, 230, .28);
}
@media (max-width: 560px) { .verse-text { font-size: 18px; } }

/* Inside the full-width scripture band the widget drops its card chrome and
   takes on the band's own presentation, so the designed moment is preserved. */
.scripture-band .verse-card {
  background: none; border: 0; border-left: 0;
  padding: 0; max-width: 760px; margin: 0 auto; text-align: center;
}
.scripture-band .verse-meta { justify-content: center; gap: 16px; }
.scripture-band .verse-text { font-size: clamp(21px, 3vw, 30px); }
.scripture-band .verse-tags { justify-content: center; }
.scripture-band .verse-note { max-width: 54ch; margin-left: auto; margin-right: auto; }

/* ============================================================================
   System Diagnostics wizard
   ============================================================================ */
.diag {
  background: var(--term-glass);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 640px;
  overflow: hidden;
}
.diag-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; letter-spacing: .09em; color: var(--term-dim);
}
.diag-probe { color: var(--term-green); }
.diag-body { padding: 22px; }
.diag-meter { height: 2px; background: var(--line); border-radius: 2px; margin-bottom: 20px; }
.diag-meter-fill {
  height: 100%; background: var(--term-cyan); border-radius: 2px;
  box-shadow: 0 0 8px rgba(92,225,230,.5);
  transition: width .3s ease;
}
.diag-title {
  font-family: 'Cinzel', serif; font-size: 22px; color: var(--gold);
  margin: 0 0 10px; letter-spacing: .03em;
}
.diag-lede, .diag-result-body { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.diag-result-body { color: var(--ink-light); line-height: 1.7; }
.diag-q {
  font-family: 'Montserrat', sans-serif; font-weight: 600;
  font-size: 17px; color: var(--ink-light); margin: 0 0 18px; line-height: 1.45;
}
.diag-options { display: flex; flex-direction: column; gap: 9px; }
.diag-btn {
  display: block; width: 100%; text-align: left;
  padding: 12px 15px; cursor: pointer;
  font-family: 'Montserrat', sans-serif; font-size: 14px;
  color: var(--ink-light);
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line); border-radius: 6px;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.diag-btn:hover {
  border-color: var(--term-cyan);
  background: rgba(92,225,230,.06);
  transform: translateX(2px);
}
.diag-btn-primary {
  width: auto; text-align: center; text-decoration: none;
  color: var(--deep-navy); background: var(--gold); border-color: var(--gold);
  font-weight: 600; letter-spacing: .03em;
}
.diag-btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); transform: none; }
.diag-back {
  margin-top: 16px; background: none; border: 0; cursor: pointer;
  color: var(--term-dim); font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; padding: 4px 0;
}
.diag-back:hover { color: var(--term-cyan); }
.diag-result-label {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; letter-spacing: .1em; color: var(--term-dim); margin: 0 0 6px;
}
.diag-verse {
  border-left: 2px solid var(--gold); padding: 12px 0 12px 16px; margin: 0 0 20px;
}
.diag-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.diag-actions .diag-btn { width: auto; }
.diag-footnote {
  margin: 16px 0 0; font-size: 12px; color: var(--term-dim);
}
@media (prefers-reduced-motion: reduce) {
  .diag-btn, .diag-meter-fill { transition: none; }
  .diag-btn:hover { transform: none; }
}
