/* Lectern shared theme — Abbey/Scriptorium palette */

:root {
  /* Primary: Forest green */
  --primary:     #1B3D2F;
  --primary-90:  #234D3C;
  --primary-70:  #3D6B56;
  --primary-15:  rgba(27, 61, 47, 0.15);
  --primary-08:  rgba(27, 61, 47, 0.08);
  --primary-04:  rgba(27, 61, 47, 0.04);

  /* Backward-compat aliases — inline var(--navy-*) still resolves */
  --navy:    var(--primary);
  --navy-90: var(--primary-90);
  --navy-70: var(--primary-70);
  --navy-15: var(--primary-15);
  --navy-08: var(--primary-08);
  --navy-04: var(--primary-04);

  /* Gold: unchanged */
  --gold:        #c9a84c;
  --gold-strong: #a8862e;
  --gold-15:     rgba(201, 168, 76, 0.20);
  --gold-08:     rgba(201, 168, 76, 0.10);

  /* Vellum backgrounds */
  --bg:      #F7F0E6;
  --bg-deep: #EDE4D4;
  --surface: #FDFAF5;
  --white:   #FFFFFF;

  /* Backward-compat aliases */
  --ivory:      var(--bg);
  --ivory-deep: var(--bg-deep);

  /* Warm text */
  --text:      #1C1C1A;
  --text-soft: #5C5347;

  /* Backward-compat aliases */
  --slate:      var(--text);
  --slate-soft: var(--text-soft);

  /* Muted institutional status colors — unchanged */
  --st-pending-fg: #6b7280;
  --st-pending-bg: #f1efea;
  --st-pending-bd: #d6d2c9;

  --st-uploading-fg: #2c5282;
  --st-uploading-bg: #ecf1f7;
  --st-uploading-bd: #b9c9de;

  --st-progress-fg: #8a6a1f;
  --st-progress-bg: #f5eedb;
  --st-progress-bd: #d8c98c;

  --st-ready-fg: #2f6b4d;
  --st-ready-bg: #ebf2ec;
  --st-ready-bd: #b3ccbd;

  --st-failed-fg: #8b2a2a;
  --st-failed-bg: #f4eaea;
  --st-failed-bd: #d4b1b1;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

h1, h2, h3, .serif {
  font-family: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  color: var(--primary);
  font-weight: 500;
  letter-spacing: -0.005em;
}

h1 { font-size: 38px; line-height: 1.15; font-weight: 500; }
h2 { font-size: 28px; line-height: 1.2; font-weight: 500; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 500; }

.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-soft);
}

.eyebrow-gold {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold-strong);
}

.divider-gold {
  height: 1px;
  background: var(--gold);
  width: 32px;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; color: var(--primary); }
input:focus, textarea:focus { outline: none; }

/* Primary button */
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
  border-radius: 2px;
  padding: 10px 20px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: var(--primary-90); }
.btn-primary:disabled { background: #c0bbb2; border-color: #c0bbb2; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary-15);
  border-radius: 2px;
  padding: 9px 18px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover { border-color: var(--gold); background: var(--surface); }

.btn-link {
  background: transparent;
  border: none;
  color: var(--primary);
  border-bottom: 1px solid var(--gold);
  border-radius: 0;
  padding: 2px 0;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.btn-link:hover { color: var(--gold-strong); }

/* Underline-only input (search bar) */
.input-underline {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--primary-15);
  padding: 14px 0;
  font-size: 18px;
  width: 100%;
  color: var(--primary);
  transition: border-color 0.2s ease;
}
.input-underline:focus { border-bottom-color: var(--gold); border-bottom-width: 1px; }
.input-underline::placeholder { color: var(--text-soft); font-weight: 300; }

/* Bordered input */
.input-bordered {
  background: var(--surface);
  border: 1px solid var(--primary-15);
  border-radius: 2px;
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
  color: var(--primary);
  transition: border-color 0.15s ease;
}
.input-bordered:focus { border-color: var(--gold); }

/* Wordmark — color set by context via inline override */
.wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.wordmark::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--gold);
  position: relative;
  top: -6px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-15); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-70); }

/* Skeleton shimmer */
@keyframes shimmer {
  0% { opacity: 0.55; }
  50% { opacity: 0.85; }
  100% { opacity: 0.55; }
}
.skeleton {
  background: var(--bg-deep);
  animation: shimmer 1.6s ease-in-out infinite;
}

/* Top hairline gold accent — unchanged */
.top-rule {
  height: 2px;
  background: var(--gold);
}

/* Status badge — square, 1px border, small caps */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid;
  border-radius: 2px;
  padding: 3px 8px 3px 7px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Drag-drop zone */
.dropzone {
  border: 1px dashed var(--primary-15);
  border-radius: 2px;
  background: var(--bg);
  transition: all 0.15s ease;
}
.dropzone--active {
  border-color: var(--gold);
  background: var(--gold-08);
}

/* Highlight for query terms */
mark {
  background: var(--gold-15);
  color: var(--primary);
  padding: 0 2px;
  border-radius: 1px;
  font-weight: 500;
}

/* Table hover */
.row-hover { transition: background 0.12s ease; cursor: pointer; }
.row-hover:hover { background: var(--bg); }
.row-hover.active { background: var(--bg-deep); }
