/* Speech Hub — fcc.cc/speech */

:root {
  --bg: #0c0d0f;
  --panel: #111214;
  --panel-hover: #161719;
  --text: #e5e5e5;
  --text-dim: #9aa3b2;
  --accent: #c7d2fe;
  --accent-glow: rgba(199, 210, 254, .12);
  --border: #2a2a2a;
  --line: #1e1e1e;
  --tag-bg: #1a1c20;
  --tag-text: #8b95a5;
  --quote-border: #c7d2fe;
  --radius: 10px;
  --radius-sm: 6px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Topbar */
.site-header { position: sticky; top: 0; z-index: 100; }
.topbar {
  background: rgba(12, 13, 15, .82);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.topbar-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  height: 48px;
  gap: 16px;
}
.brand a {
  font-family: 'Lilex', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 56px 0 28px;
  text-align: center;
}
.hero-title {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.hero-sub {
  color: var(--text-dim);
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
  max-width: 540px;
  margin: 0 auto;
}

/* Controls */
.controls {
  margin-bottom: 28px;
}
.search-box {
  margin-bottom: 14px;
}
.search-input {
  width: 100%;
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.search-input:focus {
  border-color: var(--accent);
}
.search-input::placeholder {
  color: var(--text-dim);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-btn {
  padding: 5px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.filter-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

/* Speech Grid */
.speech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}

.speech-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all .25s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.speech-card:hover {
  background: var(--panel-hover);
  border-color: rgba(199, 210, 254, .3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.card-date {
  font-family: 'Lilex', monospace;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: .03em;
}
.card-title {
  font-family: 'Source Serif 4', serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}
.card-speaker {
  font-size: 14px;
  color: var(--accent);
}
.card-snippet {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}
.card-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 10px;
}
.card-media-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
}
.card-media-badge svg {
  width: 14px;
  height: 14px;
}

/* Detail Overlay */
.speech-detail {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 48px 18px 48px;
}
.speech-detail[hidden] { display: none; }

.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
}
.detail-panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 760px;
  width: 100%;
  padding: 32px;
  z-index: 1;
}
.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color .2s;
}
.detail-close:hover { color: var(--text); }

.detail-header { margin-bottom: 20px; }
.detail-date {
  font-family: 'Lilex', monospace;
  font-size: 13px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}
.detail-title {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 6px;
}
.detail-speaker {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 2px;
}
.detail-location {
  font-size: 13px;
  color: var(--text-dim);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.detail-tags .card-tag {
  font-size: 12px;
  padding: 3px 10px;
}

.detail-panel h3 {
  font-family: 'Lilex', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-context-text,
.detail-impact-text {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text);
}

.detail-quote {
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
  padding: 16px 20px;
  border-left: 3px solid var(--quote-border);
  background: rgba(199, 210, 254, .04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}

.detail-video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.detail-video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.detail-transcript-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
  white-space: pre-wrap;
}
.detail-transcript-text::-webkit-scrollbar { width: 6px; }
.detail-transcript-text::-webkit-scrollbar-track { background: transparent; }
.detail-transcript-text::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.detail-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-link-list li a {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 15px;
  grid-column: 1 / -1;
}

/* Footer */
.fineprint {
  text-align: center;
  padding: 24px 18px;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
}

/* Responsive */
@media (max-width: 640px) {
  .speech-grid {
    grid-template-columns: 1fr;
  }
  .detail-panel {
    padding: 20px;
  }
  .hero { padding: 40px 0 20px; }
}
