/* Blogger Engine - Luxury Editorial Technology Platform */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-deep: #070b14;
  --bg-surface: #0c1322;
  --bg-elevated: #111a2f;
  --bg-cream: #fbf9f4;
  --bg-cream-tint: #f4efe4;

  --text-ivory: #f7f5ed;
  --text-cream-muted: #c4bfb2;
  --text-dim: #7f8a9e;
  --text-navy: #090e1c;
  --text-navy-muted: #3a4760;

  --gold-primary: #c5a059;
  --gold-light: #dfc386;
  --gold-subtle: rgba(197, 160, 89, 0.22);
  --gold-border: rgba(197, 160, 89, 0.4);

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-ivory);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 12%, rgba(20, 31, 56, 0.7) 0%, rgba(7, 11, 20, 0.98) 70%);
  pointer-events: none;
  z-index: -1;
}

/* Header */
header {
  border-bottom: 1px solid var(--gold-subtle);
  background: rgba(7, 11, 20, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-bar {
  max-width: 940px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}

.brand-emblem {
  color: var(--gold-primary);
  font-size: 1.15rem;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-ivory);
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-weight: 600;
  border-left: 1px solid var(--gold-subtle);
  padding-left: 0.75rem;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--gold-subtle);
  background: rgba(197, 160, 89, 0.05);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 6px var(--gold-primary);
}

.nav-link {
  color: var(--text-ivory);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-primary);
}

/* Main Container - Compact Spacing */
.container {
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 5rem 1.5rem;
  flex: 1;
}

/* Hero Section - Reduced Height (~25% less vertical space) */
.hero {
  text-align: center;
  margin-bottom: 1.85rem;
}

.hero-ornament {
  font-size: 0.72rem;
  color: var(--gold-primary);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
}

.hero h2 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-ivory);
  margin-bottom: 0.5rem;
}

.hero h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--gold-light);
}

.hero p {
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Mode Switcher */
.mode-tabs {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.mode-tab {
  background: var(--bg-surface);
  border: 1px solid var(--gold-subtle);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.6rem 1.35rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mode-tab:hover {
  color: var(--text-ivory);
  border-color: var(--gold-primary);
}

.mode-tab.active {
  background: var(--bg-elevated);
  color: var(--gold-light);
  border-color: var(--gold-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(197, 160, 89, 0.08);
}

/* Search Bar - Visual Focal Point */
.search-form {
  margin-bottom: 1.5rem;
}

.search-bar {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55), 0 0 1px rgba(197, 160, 89, 0.5);
  transition: all 0.2s;
}

.search-bar:focus-within {
  box-shadow: 0 0 0 1px var(--gold-light), 0 14px 44px rgba(0, 0, 0, 0.7);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 1.15rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  color: var(--text-ivory);
  outline: none;
}

.search-input::placeholder {
  color: #55627a;
  font-weight: 300;
}

.submit-btn {
  background: var(--gold-primary);
  color: var(--bg-deep);
  border: none;
  padding: 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  background: var(--gold-light);
}

.submit-btn:disabled {
  background: #383733;
  color: #777;
  cursor: not-allowed;
}

/* Sample Queries */
.sample-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.75rem;
  margin-top: 0.85rem;
}

.sample-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: var(--gold-primary);
  font-weight: 600;
}

.sample-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.25rem 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-cream-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.sample-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-light);
  background: rgba(197, 160, 89, 0.06);
}

/* Results Section Header */
.results-header {
  margin-top: 2.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gold-subtle);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.results-label {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.results-stats {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* QA Answer Box - Centerpiece Dominant Block */
.qa-box {
  margin-top: 1.5rem;
  margin-bottom: 2.75rem;
  background: var(--bg-cream);
  color: var(--text-navy);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.6);
  padding: 2.25rem;
  position: relative;
}

.qa-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--gold-primary);
}

.qa-box.refused {
  background: #fdfaf3;
  border-color: #d97706;
}

.qa-box.refused::before {
  background: #d97706;
}

.qa-headline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.09);
}

.qa-badge {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-navy);
}

.qa-confidence {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-navy-muted);
  letter-spacing: 0.04em;
}

.qa-body {
  font-size: 1.05rem;
  line-height: 1.74;
  color: var(--text-navy);
  white-space: pre-wrap;
}

.qa-citations {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.09);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.citation-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-navy-muted);
}

.citation-tag {
  background: #ffffff;
  border: 1px solid rgba(197, 160, 89, 0.6);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  color: var(--text-navy);
  transition: all 0.15s;
}

.citation-tag:hover {
  background: var(--gold-primary);
  color: #fff;
  border-color: var(--gold-primary);
}

/* Results Editorial Rows */
.results-list {
  display: flex;
  flex-direction: column;
}

.result-row {
  border-bottom: 1px solid var(--gold-subtle);
  padding: 1.4rem 0;
  transition: all 0.2s;
}

.result-row.highlighted {
  background: rgba(197, 160, 89, 0.08);
  padding-left: 1rem;
  padding-right: 1rem;
  border-left: 2px solid var(--gold-primary);
}

.row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.row-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.row-index {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.row-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-ivory);
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.row-title:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* Unboxed, Understated Score Display */
.row-score {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold-light);
  opacity: 0.9;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.row-author-source {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.55rem;
  display: flex;
  gap: 0.5rem;
}

.row-excerpt {
  font-size: 0.91rem;
  color: var(--text-cream-muted);
  line-height: 1.62;
}

.row-full {
  display: none;
  font-size: 0.91rem;
  color: var(--text-ivory);
  line-height: 1.65;
  margin-top: 0.6rem;
  white-space: pre-wrap;
  border-left: 1px solid var(--gold-subtle);
  padding-left: 0.85rem;
}

/* Technical Details Revealed ONLY on Expansion */
.row-expanded-meta {
  display: none;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--gold-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  gap: 1.25rem;
}

.toggle-passage-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--gold-primary);
  cursor: pointer;
  margin-top: 0.45rem;
  display: inline-block;
  padding: 0;
  transition: color 0.15s;
}

.toggle-passage-btn:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* Spinner */
.spinner-icon {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(7, 11, 20, 0.4);
  border-top-color: #070b14;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-msg {
  padding: 3.5rem 0;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
}

/* In-Page Editorial Status / Error Notice */
.editorial-notice {
  margin-top: 1.25rem;
  margin-bottom: 1.75rem;
  padding: 1.1rem 1.4rem;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.4);
  border-left: 3px solid #d97706;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  transition: all 0.25s ease;
}

.editorial-notice.notice-error {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.4);
  border-left-color: #ef4444;
}

.editorial-notice.notice-warning {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.4);
  border-left-color: #d97706;
}

.editorial-notice.notice-info {
  background: rgba(197, 160, 89, 0.08);
  border-color: var(--gold-border);
  border-left-color: var(--gold-primary);
}

.notice-icon {
  color: #d97706;
  font-size: 1rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.editorial-notice.notice-error .notice-icon {
  color: #ef4444;
}

.editorial-notice.notice-info .notice-icon {
  color: var(--gold-primary);
}

.notice-content {
  flex: 1;
}

.notice-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-ivory);
  margin-bottom: 0.25rem;
}

.notice-body {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-cream-muted);
}

.notice-dismiss {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: color 0.15s;
}

.notice-dismiss:hover {
  color: var(--text-ivory);
}

