/* assets/css/aurora.css */
/* Aurora: Artificial Understanding Response Oriented Reaction Algorithm */
/* Sky-Transition Spectrum: Nightfall -> Twilight -> Aurora -> Daylight */
/* Minimal In-Feed Atmospheric Band & Qualitative Explanation Panel */

:root {
  --aurora-nightfall: #1e293b;
  --aurora-nightfall-glow: rgba(30, 41, 59, 0.35);
  --aurora-twilight: #6366f1;
  --aurora-twilight-glow: rgba(99, 102, 241, 0.25);
  --aurora-aurora: #06b6d4;
  --aurora-aurora-glow: rgba(6, 182, 212, 0.35);
  --aurora-daylight: #f59e0b;
  --aurora-daylight-glow: rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   1. In-Feed Aurora Reception Band (Directly above Like / Comment / Share)
   ========================================================================== */
.aurora-feed-band {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 6px 0;
  padding: 8px 12px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: visible;
}

.aurora-feed-band:hover {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(203, 213, 225, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

/* Top line: Header & Reception Momentum */
.aurora-feed-band__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  line-height: 1.2;
}

.aurora-feed-band__brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #475569;
}

.aurora-feed-band__icon {
  font-size: 0.82rem;
  line-height: 1;
  color: #6366f1;
}

.aurora-feed-band__status {
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.aurora-feed-band__arrow {
  font-size: 0.78rem;
  font-weight: 700;
}

/* Track container */
.aurora-feed-band__track-wrap {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 9999px;
  background: #e2e8f0;
  overflow: visible;
}

.aurora-feed-band__track {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-size: 200% 200%;
  animation: auroraFlow 10s ease infinite;
}

/* Marker / Dot indicator along the spectrum */
.aurora-feed-band__marker {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #6366f1;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
  transform: translate(-50%, -50%);
  transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
  z-index: 2;
  pointer-events: none;
}

/* Hidden zone labels revealed on hover */
.aurora-feed-band__zones {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}

.aurora-feed-band:hover .aurora-feed-band__zones,
.aurora-feed-band:focus-within .aurora-feed-band__zones {
  opacity: 1;
  max-height: 20px;
  margin-top: 3px;
}

.aurora-feed-band__zone--active {
  color: #0f172a;
  font-weight: 700;
}

/* Spectrum State Specific Glows & Gradients */
/* 1. Daylight: Radiant warm gold and emerald resonance */
.aurora-feed-band--daylight .aurora-feed-band__track {
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 35%, #f59e0b 70%, #fbbf24 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}
.aurora-feed-band--daylight .aurora-feed-band__marker {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}
.aurora-feed-band--daylight .aurora-feed-band__icon {
  color: #f59e0b;
}

/* 2. Aurora: Shimmering celestial teal, violet, and emerald waves */
.aurora-feed-band--aurora .aurora-feed-band__track {
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 35%, #06b6d4 70%, #10b981 100%);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.25);
}
.aurora-feed-band--aurora .aurora-feed-band__marker {
  border-color: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.7);
}
.aurora-feed-band--aurora .aurora-feed-band__icon {
  color: #8b5cf6;
}

/* 3. Twilight: Calm, soft intermingling cool indigo hues */
.aurora-feed-band--twilight .aurora-feed-band__track {
  background: linear-gradient(90deg, #334155 0%, #475569 45%, #6366f1 100%);
  box-shadow: 0 0 5px rgba(99, 102, 241, 0.15);
}
.aurora-feed-band--twilight .aurora-feed-band__marker {
  border-color: #6366f1;
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
}
.aurora-feed-band--twilight .aurora-feed-band__icon {
  color: #6366f1;
}

/* 4. Nightfall: Dim, tranquil slate and deep twilight (never an angry red or punishment look) */
.aurora-feed-band--nightfall .aurora-feed-band__track {
  background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #475569 100%);
  opacity: 0.75;
}
.aurora-feed-band--nightfall .aurora-feed-band__marker {
  border-color: #475569;
  box-shadow: 0 0 5px rgba(71, 85, 105, 0.4);
}
.aurora-feed-band--nightfall .aurora-feed-band__icon {
  color: #64748b;
}

/* 5. Fresh / Quiet: Zero engagement initial state */
.aurora-feed-band--fresh {
  opacity: 0.85;
}
.aurora-feed-band--fresh .aurora-feed-band__track {
  background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 50%, #e2e8f0 100%);
}
.aurora-feed-band--fresh .aurora-feed-band__marker {
  border-color: #94a3b8;
  box-shadow: none;
}
.aurora-feed-band--fresh .aurora-feed-band__icon {
  color: #94a3b8;
}

@keyframes auroraFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==========================================================================
   2. Kebab Menu Post Status Item
   ========================================================================== */
.post-menu-item.aurora-menu-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  text-align: left;
}

.post-menu-item.aurora-menu-status:hover {
  background: #f1f5f9;
}

.post-menu-item.aurora-menu-status strong {
  font-size: 0.82rem;
  color: #0f172a;
}

.post-menu-item.aurora-menu-status span {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}

/* ==========================================================================
   3. Aurora Explanation Panel & Analytics Modal
   ========================================================================== */
.aurora-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  animation: auroraFadeIn 0.25s ease-out;
}

.aurora-modal {
  position: relative;
  width: 100%;
  max-width: 590px;
  max-height: 90vh;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28), 0 0 35px rgba(99, 102, 241, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: auroraSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.aurora-modal__ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #1e293b, #6366f1, #06b6d4, #10b981, #f59e0b, #1e293b);
  background-size: 300% 300%;
  animation: auroraFlow 8s linear infinite;
}

.aurora-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
}

.aurora-modal__close:hover {
  background: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

/* Modal Header */
.aurora-modal__header {
  position: relative;
  padding: 24px 24px 18px 24px;
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
              radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 60%),
              #fafafa;
  border-bottom: 1px solid #f1f5f9;
}

.aurora-modal__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aurora-modal__sparkle {
  font-size: 1.4rem;
  color: #6366f1;
}

.aurora-modal__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.aurora-modal__subtitle {
  margin: 4px 0 0 0;
  font-size: 0.88rem;
  color: #64748b;
}

/* Modal Body */
.aurora-modal__body {
  padding: 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sky-Transition Visual Bar in Modal */
.aurora-spectrum-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
}

.aurora-spectrum-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.aurora-spectrum-labels .is-active {
  color: #0f172a;
  font-weight: 700;
}

.aurora-spectrum-track-wrap {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: #e2e8f0;
  overflow: visible;
}

.aurora-spectrum-track {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: linear-gradient(90deg, #1e293b 0%, #6366f1 35%, #06b6d4 65%, #f59e0b 100%);
}

.aurora-spectrum-marker {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #6366f1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
  transform: translate(-50%, -50%);
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.aurora-spectrum-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 0.76rem;
}

.aurora-spectrum-momentum {
  font-weight: 600;
  color: #059669;
}

.aurora-spectrum-score-discreet {
  color: #94a3b8;
  font-size: 0.72rem;
}

/* Qualitative 4-Dimension Grid */
.aurora-dimensions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.aurora-dimension-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aurora-dimension-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.aurora-dimension-card__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aurora-dimension-card__desc {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.4;
  margin-top: 2px;
}

/* Author Diagnostic / Temporal Shift Card */
.aurora-author-diagnostics {
  background: #f0fdf4;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-left: 4px solid #10b981;
  border-radius: 12px;
  padding: 14px 16px;
}

.aurora-author-diagnostics__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #065f46;
  margin-bottom: 4px;
}

.aurora-author-diagnostics__body {
  font-size: 0.82rem;
  color: #047857;
  line-height: 1.5;
}

/* Poetic Brigading Alert */
.aurora-brigade-alert {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  padding: 14px 16px;
  color: #7f1d1d;
}

.aurora-brigade-alert__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.aurora-brigade-alert__quote {
  margin: 0;
  font-style: italic;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #991b1b;
}

/* What Aurora is Seeing: Relative Influence Signals */
.aurora-signals-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aurora-signals-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.aurora-signals-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: #0f172a;
}

.aurora-signals-subtitle {
  font-size: 0.74rem;
  color: #64748b;
}

.aurora-signals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aurora-signal-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.aurora-signal-item__summary {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.aurora-signal-item__summary:hover {
  background: #f1f5f9;
}

.aurora-signal-item__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aurora-signal-item__icon {
  font-size: 1.15rem;
  line-height: 1;
}

.aurora-signal-item__name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1e293b;
}

.aurora-signal-item__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Relative Influence Badges (No raw weights!) */
.aurora-signal-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
}

.aurora-signal-badge--strong {
  background: #dcfce7;
  color: #15803d;
}

.aurora-signal-badge--moderate {
  background: #f0fdf4;
  color: #166534;
}

.aurora-signal-badge--low {
  background: #f1f5f9;
  color: #64748b;
}

.aurora-signal-badge--none {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.aurora-signal-item__chevron {
  font-size: 0.72rem;
  color: #94a3b8;
  transition: transform 0.2s;
}

.aurora-signal-item.is-open .aurora-signal-item__chevron {
  transform: rotate(180deg);
}

.aurora-signal-item__details {
  display: none;
  padding: 0 14px 12px 14px;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.5;
  border-top: 1px dashed #e2e8f0;
  margin-top: 4px;
  padding-top: 8px;
}

.aurora-signal-item.is-open .aurora-signal-item__details {
  display: block;
}

/* Philosophy Safe Harbor Box */
.aurora-philosophy-box {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
}

.aurora-philosophy-box strong {
  color: #0f172a;
}

/* Animations */
@keyframes auroraFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes auroraSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .aurora-feed-band {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(51, 65, 85, 0.7);
  }
  .aurora-feed-band:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(71, 85, 105, 0.8);
  }
  .aurora-feed-band__brand {
    color: #94a3b8;
  }
  .aurora-feed-band__status {
    color: #e2e8f0;
  }
  .aurora-feed-band__track-wrap {
    background: #1e293b;
  }
  .aurora-modal {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 35px rgba(99, 102, 241, 0.15);
  }
  .aurora-modal__header {
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 60%),
                radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.2) 0%, transparent 60%),
                #111827;
    border-color: #1e293b;
  }
  .aurora-modal__title {
    color: #f8fafc;
  }
  .aurora-modal__close {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
  }
  .aurora-modal__close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #f8fafc;
  }
  .aurora-spectrum-container {
    background: #1e293b;
    border-color: #334155;
  }
  .aurora-spectrum-labels .is-active {
    color: #f8fafc;
  }
  .aurora-spectrum-track-wrap {
    background: #0f172a;
  }
  .aurora-dimension-card {
    background: #1e293b;
    border-color: #334155;
  }
  .aurora-dimension-card__value {
    color: #f8fafc;
  }
  .aurora-dimension-card__desc {
    color: #94a3b8;
  }
  .aurora-author-diagnostics {
    background: rgba(6, 78, 59, 0.25);
    border-color: rgba(16, 185, 129, 0.4);
  }
  .aurora-author-diagnostics__head {
    color: #34d399;
  }
  .aurora-author-diagnostics__body {
    color: #a7f3d0;
  }
  .aurora-signals-title {
    color: #f8fafc;
  }
  .aurora-signal-item {
    background: #1e293b;
    border-color: #334155;
  }
  .aurora-signal-item__summary:hover {
    background: #243247;
  }
  .aurora-signal-item__name {
    color: #e2e8f0;
  }
  .aurora-signal-item__details {
    color: #94a3b8;
    border-top-color: #334155;
  }
  .aurora-philosophy-box {
    background: #1e293b;
    color: #94a3b8;
  }
  .aurora-philosophy-box strong {
    color: #f8fafc;
  }
}

/* ==========================================================================
   4. State of Words (/words) Modern Styles
   ========================================================================== */
.state-of-words-wrapper {
  max-width: 1040px;
  margin: 2rem auto;
  padding: 0 1.25rem 5rem;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sow-hero {
  text-align: center;
  padding: 3.5rem 1.75rem 2.75rem;
  background: radial-gradient(circle at 50% 15%, rgba(56, 189, 248, 0.16) 0%, rgba(15, 23, 42, 0.85) 75%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.sow-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.8), transparent);
}

.sow-preheader {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sow-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #f8fafc;
  margin: 0 0 1rem;
  line-height: 1.15;
}

.sow-subtitle {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 680px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

.sow-stats-strip {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  flex-wrap: wrap;
}

.sow-stat-item {
  text-align: center;
}

.sow-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f1f5f9;
}

.sow-stat-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Spotlight Card */
.sow-spotlight {
  background: radial-gradient(circle at 90% 10%, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.15);
}

.sow-spotlight__label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sow-spotlight__title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #f8fafc;
  margin: 0 0 0.5rem;
  letter-spacing: 0.01em;
}

.sow-spotlight__desc {
  font-size: 0.98rem;
  color: #cbd5e1;
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.sow-spotlight__footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

/* Controls Bar: Search & Filtering */
.sow-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.sow-search-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.sow-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  color: #f8fafc;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.sow-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.sow-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.sow-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.sow-filter-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sow-filter-btn:hover {
  color: #f1f5f9;
}

.sow-filter-btn.is-active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.sow-view-toggle {
  display: flex;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.sow-view-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

.sow-view-btn.is-active {
  background: #1e293b;
  color: #38bdf8;
}

/* Bulletin Cards & Grid */
.sow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.bulletin-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  position: relative;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bulletin-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.4);
}

.bulletin-card.is-highlighted {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.bulletin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.bulletin-number {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #38bdf8;
}

.bulletin-term {
  font-size: 1.85rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0.25rem 0 0;
  letter-spacing: 0.02em;
}

.bulletin-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.bulletin-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.sow-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sow-badge--established {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.sow-badge--emerging {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.sow-badge--shifting {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.sow-badge--fading {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.sow-badge--trend-rising {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.sow-badge--trend-stable {
  background: rgba(100, 116, 139, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.sow-badge--trend-falling {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sow-sparkline-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.bulletin-preamble {
  font-size: 0.88rem;
  color: #94a3b8;
  font-style: italic;
  margin-bottom: 1.15rem;
}

.bulletin-senses {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.sense-item {
  margin-bottom: 1.15rem;
  padding-left: 1.75rem;
  position: relative;
}

.sense-num {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #38bdf8;
}

.sense-def {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.sense-example {
  font-size: 0.88rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.4rem 0.75rem;
  border-left: 2px solid #38bdf8;
  border-radius: 0 8px 8px 0;
  display: inline-block;
  margin-top: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bulletin-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.8rem;
  color: #64748b;
}

.provenance-note {
  width: 100%;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.35rem;
}

/* Condensed Search Mode View */
.sow-search-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sow-search-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.sow-search-item:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(4px);
}

.sow-search-item__term {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
}

.sow-search-item__def {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-top: 0.2rem;
  max-width: 600px;
}

@media (max-width: 768px) {
  .sow-title {
    font-size: 2rem;
  }
  .sow-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .sow-filter-pills {
    overflow-x: auto;
    width: 100%;
  }
  .bulletin-header {
    flex-direction: column;
  }
  .bulletin-header-right {
    align-items: flex-start;
  }
}

/* ==========================================================================
   5. Aurora Dictionary & Language Pulse (Milestone 3 - Light, High-Contrast)
   ========================================================================== */

/* 5.1 CSS Custom Properties / Tokens */
:root {
  --dict-bg: #f8fafc;
  --dict-card-bg: #ffffff;
  --dict-text-main: #090d16;
  --dict-text-def: #0f172a;
  --dict-text-sub: #334155;
  --dict-text-muted: #64748b;
  --dict-border: #e2e8f0;
  --dict-border-strong: #cbd5e1;
  --dict-cyan-accent: #0284c7;
  --dict-cyan-soft: #f0f9ff;
  --dict-cyan-border: #bae6fd;
}

/* 5.2 Top-Level Containers */
.dict-container,
.dict-page-wrapper,
.pulse-view-container,
.pulse-page-wrapper,
.dict-term-view,
.dict-term-wrapper {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 5rem;
  color: var(--dict-text-def);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}

/* 5.3 Dictionary Header & Mode Navigation (R1, R5) */
.dict-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--dict-border);
}

.dict-brand {
  flex: 1;
  min-width: 260px;
}

.dict-brand__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dict-cyan-accent);
  background: var(--dict-cyan-soft);
  border: 1px solid var(--dict-cyan-border);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.5rem;
}

.dict-brand__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--dict-text-main);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.dict-brand__subtitle {
  font-size: 1.05rem;
  color: var(--dict-text-muted);
  max-width: 620px;
  margin: 0;
  line-height: 1.55;
}

.dict-mode-nav {
  display: inline-flex;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 12px;
  border: 1px solid var(--dict-border);
  gap: 0.25rem;
  flex-shrink: 0;
}

.dict-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dict-text-muted);
  text-decoration: none;
  transition: all 0.18s ease;
  position: relative;
}

.dict-mode-btn:hover {
  color: var(--dict-text-main);
  background: rgba(255, 255, 255, 0.6);
}

.dict-mode-btn.is-active {
  background: #ffffff;
  color: var(--dict-text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.dict-pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dict-cyan-accent);
  box-shadow: 0 0 6px var(--dict-cyan-accent);
  display: inline-block;
  animation: dict-pulse-anim 2s infinite;
}

@keyframes dict-pulse-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* 5.4 Search-First Input & Auto-Suggestions (R1) */
.dict-search-container {
  position: relative;
  margin-bottom: 1.5rem;
  z-index: 30;
}

.dict-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--dict-card-bg);
  border: 1.5px solid var(--dict-border-strong);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.dict-search-bar:focus-within {
  border-color: var(--dict-cyan-accent);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.dict-search-icon {
  position: absolute;
  left: 1rem;
  color: var(--dict-text-muted);
  pointer-events: none;
}

.dict-search-input {
  width: 100%;
  padding: 0.95rem 1rem 0.95rem 2.85rem;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: var(--dict-text-main);
  font-family: inherit;
  font-weight: 500;
}

.dict-search-input::placeholder {
  color: #94a3b8;
}

.dict-search-clear {
  background: transparent;
  border: none;
  color: var(--dict-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.dict-search-clear:hover {
  color: var(--dict-text-main);
}

.dict-search-shortcut {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dict-text-muted);
  background: #f1f5f9;
  border: 1px solid var(--dict-border-strong);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  margin-right: 0.85rem;
  pointer-events: none;
}

/* Auto-Suggestions Dropdown */
.dict-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border-strong);
  border-radius: 14px;
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 50;
  max-height: 380px;
  overflow-y: auto;
}

.dict-suggestion-item {
  display: block;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease;
}

.dict-suggestion-item:last-child {
  border-bottom: none;
}

.dict-suggestion-item:hover,
.dict-suggestion-item.is-selected {
  background: var(--dict-cyan-soft);
}

.dict-suggestion-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.dict-suggestion-term {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--dict-text-main);
}

.dict-suggestion-register {
  font-size: 0.75rem;
  color: var(--dict-text-muted);
}

.dict-suggestion-def {
  font-size: 0.88rem;
  color: var(--dict-text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* 5.5 Categorical Status Filter Tabs (R1) */
.dict-filter-scroller {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
  margin-bottom: 1.75rem;
}

.dict-filter-scroller::-webkit-scrollbar {
  display: none;
}

.dict-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dict-text-muted);
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  user-select: none;
}

.dict-filter-tab:hover {
  color: var(--dict-text-main);
  border-color: var(--dict-border-strong);
  background: #f8fafc;
}

.dict-filter-tab.is-active {
  background: var(--dict-text-main);
  color: #ffffff;
  border-color: var(--dict-text-main);
  font-weight: 700;
}

.dict-filter-count {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: var(--dict-text-muted);
}

.dict-filter-tab.is-active .dict-filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* 5.6 Status Badge Palette (R1, R2) */
.dict-status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.dict-status-pill--established {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.dict-status-pill--emerging,
.dict-status-pill--rising,
.dict-status-pill--new {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.dict-status-pill--shifting,
.dict-status-pill--changing {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.dict-status-pill--fading {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.dict-status-pill--historical,
.dict-status-pill--dormant {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.dict-status-pill--observed,
.dict-status-pill--incubating {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7;
}

/* 5.7 Compact Scannable Result Cards (R1, R6) */
.dict-results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dict-card {
  display: block;
  text-decoration: none;
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  color: inherit;
}

.dict-card:hover {
  border-color: var(--dict-cyan-accent);
  box-shadow: 0 6px 20px -4px rgba(2, 132, 199, 0.12);
  transform: translateY(-1px);
}

.dict-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.dict-card__identity {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.dict-card__headword {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dict-text-main);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.dict-card__ipa {
  font-size: 0.88rem;
  color: var(--dict-text-muted);
  font-family: Georgia, serif;
}

.dict-card__register {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dict-text-muted);
  text-transform: lowercase;
}

.dict-card__status-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dict-trend-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dict-mini-sparkline {
  vertical-align: middle;
}

.dict-card__body {
  margin-bottom: 0.85rem;
}

.dict-card__definition {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--dict-text-def);
  line-height: 1.5;
  margin: 0;
}

.dict-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--dict-text-muted);
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dict-card__meta-left,
.dict-card__meta-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dict-card__stat strong {
  color: var(--dict-text-sub);
  font-weight: 700;
}

.dict-card__sep {
  color: var(--dict-border-strong);
}

.dict-card__bulletin {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dict-cyan-accent);
  background: var(--dict-cyan-soft);
  border: 1px solid var(--dict-cyan-border);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
}

/* 5.8 Empty State */
.dict-empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--dict-card-bg);
  border: 1.5px dashed var(--dict-border-strong);
  border-radius: 16px;
  margin: 2rem 0;
}

.dict-empty-icon {
  font-size: 2rem;
  color: var(--dict-cyan-accent);
  margin-bottom: 0.75rem;
}

.dict-empty-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dict-text-main);
  margin: 0 0 0.5rem;
}

.dict-empty-desc {
  font-size: 0.95rem;
  color: var(--dict-text-muted);
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.55;
}

.dict-empty-reset {
  background: var(--dict-cyan-accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.dict-empty-reset:hover {
  opacity: 0.9;
}

/* 5.9 Canonical Word Detail View (R2, R3, R4) */
.dict-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--dict-text-muted);
  margin-bottom: 1.5rem;
}

.dict-crumb {
  color: var(--dict-cyan-accent);
  text-decoration: none;
  font-weight: 600;
}

.dict-crumb:hover {
  text-decoration: underline;
}

.dict-crumb.is-active {
  color: var(--dict-text-main);
  font-weight: 700;
}

.dict-crumb-sep {
  color: var(--dict-border-strong);
}

.dict-hero {
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.dict-hero__badges {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.dict-bulletin-seal {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dict-cyan-accent);
  background: var(--dict-cyan-soft);
  border: 1px solid var(--dict-cyan-border);
  border-radius: 9999px;
  padding: 0.25rem 0.8rem;
}

.dict-timetravel-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 9999px;
  padding: 0.25rem 0.8rem;
}

.dict-hero__headword-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.dict-hero__headword {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 900;
  color: var(--dict-text-main);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.1;
}

.dict-hero__phonetic {
  font-size: 1.15rem;
  color: var(--dict-text-muted);
  font-family: Georgia, serif;
}

.dict-hero__register {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dict-text-muted);
  text-transform: lowercase;
}

.dict-hero__stats {
  display: flex;
  gap: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.dict-stat-chip {
  display: flex;
  flex-direction: column;
}

.dict-stat-chip__num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dict-text-main);
}

.dict-stat-chip__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dict-text-muted);
}

/* Time Travel Interactive Controls (R3) */
.dict-timetravel-box {
  background: #f8fafc;
  border: 1px solid var(--dict-border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  margin-top: 1.5rem;
}

.dict-timetravel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.dict-timetravel-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dict-text-def);
  margin: 0;
}

.dict-timetravel-desc {
  font-size: 0.84rem;
  color: var(--dict-text-muted);
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.dict-timetravel-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dict-timetravel-select {
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  border: 1px solid var(--dict-border-strong);
  border-radius: 8px;
  background: var(--dict-card-bg);
  color: var(--dict-text-def);
  font-weight: 500;
}

.dict-timetravel-btn {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--dict-cyan-accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.dict-timetravel-btn:hover {
  opacity: 0.9;
}

.dict-timetravel-reset {
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dict-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.dict-timetravel-reset:hover {
  color: var(--dict-text-main);
}

.dict-historical-alert {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 0.85rem 1.15rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: #92400e;
  line-height: 1.45;
}

/* Numbered Senses List (R2, R7) */
.dict-senses-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dict-sense-card {
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dict-sense-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dict-sense-card__number-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dict-sense-card__number {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dict-cyan-accent);
  background: var(--dict-cyan-soft);
  border: 1px solid var(--dict-cyan-border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
}

.dict-sense-card__prevalence {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dict-prevalence-bar {
  height: 6px;
  min-width: 40px;
  background: var(--dict-cyan-accent);
  border-radius: 9999px;
}

.dict-prevalence-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dict-text-muted);
}

.dict-sense-definition {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--dict-text-def);
  line-height: 1.5;
  margin: 0 0 0.85rem;
}

.dict-sense-nuance {
  font-size: 0.9rem;
  color: var(--dict-text-sub);
  background: #f8fafc;
  border-left: 3px solid var(--dict-border-strong);
  padding: 0.55rem 0.85rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.dict-nuance-label {
  font-weight: 700;
  margin-right: 0.35rem;
}

/* Privacy-Safe Representative Examples (R2) */
.dict-sense-examples {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.dict-examples-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dict-text-muted);
  margin: 0 0 0.65rem;
}

.dict-examples-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dict-example-item {
  display: block;
}

.dict-example-quote {
  font-size: 0.95rem;
  color: var(--dict-text-sub);
  background: #f8fafc;
  border-left: 3px solid var(--dict-cyan-accent);
  padding: 0.65rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 0;
  font-style: normal;
  line-height: 1.5;
}

.dict-sense-collocations {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.dict-collocations-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dict-text-muted);
  margin-right: 0.25rem;
}

.dict-collocation-chip {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dict-cyan-accent);
  background: var(--dict-cyan-soft);
  border: 1px solid var(--dict-cyan-border);
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  text-decoration: none;
}

/* 5.10 Visual Evolution Timeline (R3) */
.dict-evolution-section {
  margin-bottom: 2.5rem;
}

.dict-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dict-text-main);
  margin: 0 0 0.35rem;
}

.dict-section-sub {
  font-size: 0.88rem;
  color: var(--dict-text-muted);
  margin-bottom: 1.25rem;
  display: block;
}

.dict-timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--dict-cyan-border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dict-timeline__node {
  position: relative;
}

.dict-timeline__marker {
  position: absolute;
  left: calc(-2rem - 6px);
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dict-cyan-accent);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px var(--dict-cyan-accent);
}

.dict-timeline__date {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dict-cyan-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.dict-timeline__content {
  background: #ffffff;
  border: 1px solid var(--dict-border);
  border-radius: 10px;
  padding: 0.9rem 1.15rem;
}

.dict-timeline__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dict-text-main);
  display: block;
  margin-bottom: 0.25rem;
}

.dict-timeline__text {
  font-size: 0.88rem;
  color: var(--dict-text-sub);
  margin: 0;
  line-height: 1.45;
}

/* 5.11 Calibrated Etymology Section (R4) */
.dict-etymology-section {
  margin-bottom: 2.5rem;
}

.dict-etymology-card {
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border);
  border-radius: 14px;
  padding: 1.5rem;
}

.dict-etymology-badge {
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dict-cyan-accent);
  background: var(--dict-cyan-soft);
  border: 1px solid var(--dict-cyan-border);
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.5rem;
}

.dict-etymology-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dict-text-main);
  margin: 0 0 0.5rem;
}

.dict-etymology-text {
  font-size: 0.95rem;
  color: var(--dict-text-sub);
  line-height: 1.55;
  margin: 0 0 1rem;
}

.dict-etymology-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--dict-text-muted);
  flex-wrap: wrap;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
}

.dict-etymology-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dict-etymology-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dict-text-muted);
}

.dict-etymology-val {
  font-weight: 600;
  color: var(--dict-text-def);
}

.dict-etymology-disclaimer {
  font-size: 0.78rem;
  color: var(--dict-text-muted);
  font-style: italic;
  margin-top: 0.75rem;
  display: block;
}

/* 5.12 Related Terms & Cross-Links (R2) */
.dict-related-section {
  margin-bottom: 2.5rem;
}

.dict-related-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dict-related-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dict-cyan-accent);
  text-decoration: none;
  transition: all 0.15s ease;
}

.dict-related-link:hover {
  background: var(--dict-cyan-soft);
  border-color: var(--dict-cyan-accent);
}

/* 5.13 Language Pulse View (R5) */
.pulse-header {
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.pulse-header__badge {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dict-cyan-accent);
  background: var(--dict-cyan-soft);
  border: 1px solid var(--dict-cyan-border);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.6rem;
}

.pulse-header__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  color: var(--dict-text-main);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.pulse-header__desc {
  font-size: 1.05rem;
  color: var(--dict-text-muted);
  max-width: 640px;
  margin: 0 0 1rem;
  line-height: 1.55;
}

.pulse-return-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dict-cyan-accent);
  text-decoration: none;
}

.pulse-return-link:hover {
  text-decoration: underline;
}

/* Metrics Summary Strip */
.pulse-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.pulse-metric-card {
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border);
  border-radius: 12px;
  padding: 1.15rem;
  text-align: center;
}

.pulse-metric-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dict-text-main);
}

.pulse-metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dict-text-muted);
  margin-top: 0.35rem;
}

/* Discovery 3-Column Panels */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.pulse-panel {
  background: var(--dict-card-bg);
  border: 1px solid var(--dict-border);
  border-radius: 14px;
  padding: 1.5rem;
}

.pulse-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.pulse-panel__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dict-text-main);
  margin: 0;
}

.pulse-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pulse-card {
  background: #f8fafc;
  border: 1px solid var(--dict-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pulse-card__term {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dict-text-main);
  text-decoration: none;
}

.pulse-card__term:hover {
  color: var(--dict-cyan-accent);
}

.pulse-decree-card {
  background: #f8fafc;
  border: 1px solid var(--dict-cyan-border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.pulse-decree-card__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dict-cyan-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.pulse-decree-card__term {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--dict-text-main);
  margin: 0 0 0.4rem;
}

.pulse-decree-card__proclamation {
  font-size: 0.92rem;
  color: var(--dict-text-sub);
  font-style: italic;
  line-height: 1.5;
  margin: 0 0 0.85rem;
}

.pulse-decree-card__link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dict-cyan-accent);
  text-decoration: none;
}

/* 5.14 Mobile-First Responsive Overrides (Down to 320px) (R6) */
@media (max-width: 640px) {
  .dict-container,
  .pulse-view-container,
  .dict-term-view {
    padding: 1rem 0.75rem 4rem;
  }
  .dict-brand__title,
  .pulse-header__title {
    font-size: 1.85rem;
  }
  .dict-hero__headword {
    font-size: 2rem;
  }
  .dict-card,
  .dict-sense-card,
  .dict-hero,
  .dict-etymology-card,
  .pulse-panel,
  .pulse-header {
    padding: 1rem;
    border-radius: 12px;
  }
  .dict-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .dict-card__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .dict-hero__stats {
    gap: 1rem;
  }
  .pulse-grid {
    grid-template-columns: 1fr;
  }
}
