/* coming-soon.css - Secure Academic Utilities (CSP Compliant & Gold Standard) */

/* ==========================================================================
   1. LOCAL FONTS (ZERO TRACKING)
   ========================================================================== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('/fonts/inter-regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-700.woff2') format('woff2'); }

@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/lora-regular.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/lora-500.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/lora-600.woff2') format('woff2'); }

/* ==========================================================================
   2. THEME VARIABLES (LIGHT & DARK)
   ========================================================================== */
:root {
  color-scheme: light;
  --bg-main: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-subtle: #64748b;
  
  --card-bg: #ffffff;
  --card-border: #cbd5e1;
  
  --select-bg: #ffffff;
  --select-border: #94a3b8;
  --select-text: #1e293b;
  
  --icon-color: #3b82f6;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

  /* Cookie Banner Light */
  --banner-bg: rgba(255, 255, 255, 0.85);
  --banner-border: rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-main: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --card-bg: #1e293b;
  --card-border: #334155;
  
  --select-bg: #1e293b;
  --select-border: #475569;
  --select-text: #f8fafc;
  
  --icon-color: #60a5fa;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);

  /* Cookie Banner Dark */
  --banner-bg: rgba(30, 41, 59, 0.85);
  --banner-border: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   3. BASE STYLES
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: 'Inter', system-ui, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.7;
}

/* ==========================================================================
   4. UI COMPONENTS (TOOLBAR & BUTTONS)
   ========================================================================== */
.toolbar-select {
  height: 36px; border-radius: 0.5rem; border: 1px solid var(--select-border); background: var(--select-bg);
  color: var(--select-text); padding: 0 2.1rem 0 2.2rem; font-size: 0.8125rem; font-weight: 500;
  appearance: none; cursor: pointer; transition: all 0.2s ease; width: 140px;
}
.toolbar-select:hover, .toolbar-select:focus { border-color: #3b82f6; outline: none; }
.toolbar-select option { background: var(--bg-main); color: var(--text-main); }

.select-wrap { position: relative; display: inline-flex; align-items: center; }
.sel-icon-l, .sel-icon-r { position: absolute; pointer-events: none; opacity: 0.65; color: var(--select-text); }
.sel-icon-l { left: 0.65rem; } 
.sel-icon-r { right: 0.65rem; }

.theme-toggle-btn { 
  background: none; border: none; cursor: pointer; color: var(--text-muted); 
  display: flex; align-items: center; justify-content: center; padding: 0.5rem; 
  border-radius: 0.5rem; transition: all 0.2s; 
}
.theme-toggle-btn:hover { background-color: var(--card-border); color: var(--text-main); }

/* Primary Button */
.btn-util-primary { 
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; 
  padding: 0.75rem 1.5rem; border-radius: 0.5rem; font-weight: 600; font-size: 0.875rem; 
  transition: all 0.2s; cursor: pointer; border: none; width: 100%; 
  background: #3b82f6; color: white; 
}
.btn-util-primary:hover:not(:disabled) { background: #2563eb; }
.btn-util-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Secondary Button */
.btn-secondary { 
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; 
  background: transparent; color: var(--text-main); border: 1px solid var(--card-border); 
  padding: 0.75rem 1.5rem; font-size: 0.875rem; font-weight: 600; border-radius: 0.5rem; 
  cursor: pointer; transition: all 0.2s; width: 100%; text-decoration: none; 
}
.btn-secondary:hover:not(:disabled) { background: rgba(59, 130, 246, 0.05); border-color: #3b82f6; }

/* Form Inputs */
.input-field { 
  width: 100%; padding: 0.75rem 1rem; border-radius: 0.5rem; border: 1px solid var(--select-border); 
  background: var(--bg-main); color: var(--text-main); font-size: 0.875rem; outline: none; 
  transition: border-color 0.2s; 
}
.input-field:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.1); }

/* ==========================================================================
   5. ARTICLE TYPOGRAPHY & LAYOUT
   ========================================================================== */
.article-container {
  max-width: 850px; /* Slightly wider for the tables */
}

.article-container h1 {
  font-family: 'Lora', serif;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: var(--text-main);
}

.article-container h2 {
  font-family: 'Lora', serif;
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.5rem;
}

.article-container p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.article-image {
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
  display: block;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--card-border);
}

.image-caption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-subtle);
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  font-style: italic;
}

/* ==========================================================================
   6. MODALS & COOKIE BANNER
   ========================================================================== */
.modal-overlay { 
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
  background: rgba(15,23,42,0.7); backdrop-filter: blur(4px); z-index: 100; 
  display: flex; align-items: center; justify-content: center; 
  opacity: 1; transition: opacity 0.3s ease; 
}
.hidden-modal { opacity: 0; pointer-events: none; }

.modal-box { 
  background: var(--card-bg); border: 1px solid var(--card-border); 
  border-radius: 1rem; box-shadow: var(--shadow-md); 
  display: flex; flex-direction: column; 
  transform: translateY(0); transition: transform 0.3s ease; max-height: 90vh; 
}
.hidden-modal .modal-box { transform: translateY(20px); }

.modal-header { 
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--card-border); 
  display: flex; align-items: center; justify-content: space-between; 
}
.modal-title { font-size: 1.125rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; color: var(--text-main); }

.modal-close { 
  background: transparent; border: none; color: var(--text-main); opacity: 0.5; cursor: pointer; 
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; 
  border-radius: 0.375rem; transition: all 0.2s; 
}
.modal-close:hover { background: rgba(59, 130, 246, 0.1); opacity: 1; color: #3b82f6; }

.modal-body { padding: 1.5rem; overflow-y: auto; }

#cookie-banner { 
  background: var(--banner-bg);
  border-top: 1px solid var(--banner-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
}
.cookie-banner-hidden { transform: translateY(100%); }

.spinner { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ==========================================================================
   7. SPECIFIC COMPONENTS FOR RATING PAGES
   ========================================================================== */

/* Hero Section (Title + Badge) */
.hero-section {
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
  margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--card-border);
}
@media (min-width: 768px) {
  .hero-section { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}
.hero-text-wrap { flex: 1; text-align: center; }
@media (min-width: 768px) { .hero-text-wrap { text-align: left; } }
.hero-text-wrap h1 { margin-bottom: 0.5rem; }
.hero-subtitle { font-family: 'Lora', serif; font-size: 1.25rem; font-weight: 500; color: #3b82f6; margin: 0; line-height: 1.3; }
@media (min-width: 768px) { .hero-subtitle { font-size: 1.5rem; } }
.hero-badge-wrap { flex-shrink: 0; }
.hero-badge-img { width: 100%; max-width: 280px; }

/* Table of Contents */
.toc-box {
  background-color: var(--card-bg); border: 1px solid var(--card-border); border-radius: 0.75rem; 
  padding: 1.5rem; margin-bottom: 2.5rem; box-shadow: var(--shadow-sm);
}
.toc-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; color: var(--text-main); }
.toc-list { list-style: none; padding-left: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.95rem; }
.toc-link { color: #3b82f6; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.toc-link:hover { text-decoration: underline; color: #2563eb; }
[data-theme="dark"] .toc-link:hover { color: #60a5fa; }

/* Article Lists */
.article-list {
  list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1.5rem; color: var(--text-muted); 
  display: flex; flex-direction: column; gap: 0.5rem; font-size: 1.125rem;
}
.article-list li { margin: 0; line-height: 1.7; }
.article-list strong { color: var(--text-main); font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; margin-bottom: 1.5rem; }
.rating-table {
  width: 100%; text-align: left; border-collapse: collapse; border: 1px solid var(--card-border); font-size: 0.9rem;
}
.rating-table th, .rating-table td {
  padding: 0.75rem; border-right: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border);
}
.rating-table th:last-child, .rating-table td:last-child { border-right: none; }
.rating-table thead.head-primary tr { background-color: #3b82f6; color: #ffffff; }
.rating-table thead.head-primary th { border-color: #2563eb; }
.rating-table thead.head-secondary tr { background-color: var(--card-border); color: var(--text-main); }
.rating-table thead.head-secondary th { border-color: var(--card-border); }

.rating-table tbody tr.row-card { background-color: var(--card-bg); }
.rating-table tbody tr.row-main { background-color: var(--bg-main); }

/* Text Color Utilities for Tables */
.txt-green { color: #22c55e; }
.txt-blue { color: #3b82f6; }
.txt-yellow { color: #eab308; }
.txt-red { color: #ef4444; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-medium { font-weight: 500; }

/* Source Info & Back to Top */
.source-info { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--card-border); font-size: 0.875rem; font-style: italic; opacity: 0.8; color: var(--text-muted); }
.back-to-top-wrap { margin-top: 2.5rem; margin-bottom: 1rem; text-align: center; }
