/* The Gazette Experiment - Design System & Modern UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;0,6..72,700;1,6..72,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-main: #0c0f17;
  --bg-card: rgba(22, 27, 39, 0.75);
  --bg-card-hover: rgba(30, 38, 54, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.06);

  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --primary-light: #60a5fa;
  --accent: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #9c75e0;
  --accent-amber: #f59e0b;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --phone-bg: #0f141f;
  --phone-border: #1e293b;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-glow: 0 10px 30px -10px var(--primary-glow);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.05) 0px, transparent 60%);
  background-attachment: fixed;
}

/* Base Container & Grid */
.study-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Views Management */
.study-view {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.study-view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glassmorphism Card System */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.glass-panel.subtle {
  background: var(--bg-glass);
  border-color: var(--border-subtle);
  padding: 1.5rem;
}

/* Header & Typography */
.institution-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

h1.study-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2.section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.study-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Progress Step Bar */
.progress-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  position: relative;
}

.progress-stepper::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 30px;
  right: 30px;
  height: 2px;
  background: var(--border-subtle);
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.step-item.active .step-circle {
  background: var(--primary);
  border-color: var(--primary-light);
  color: white;
  box-shadow: 0 0 15px var(--primary-glow);
}

.step-item.completed .step-circle {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: white;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.step-item.active .step-label {
  color: var(--text-main);
  font-weight: 600;
}

/* Prolific Verification Box */
.prolific-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.prolific-banner .id-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.prolific-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  color: #c084fc;
}

/* Form Controls & Checkboxes */
.legal-scroll-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.custom-checkbox {
  /* display: flex; */
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
  user-select: none;
}

.custom-checkbox input {
  margin-top: 0.25rem;
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.custom-checkbox:hover {
  color: var(--text-main);
}

/* Questionnaire Styles */
.question-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.question-text {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: #fff;
}

.likert-scale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.likert-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.likert-option input[type="radio"] {
  accent-color: var(--primary);
  cursor: pointer;
}

.likert-option span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.likert-option:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.likert-option:has(input[type="radio"]:checked) {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary-light);
}

.likert-option:has(input[type="radio"]:checked) span {
  color: #fff;
  font-weight: 600;
}

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

.radio-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-item:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.radio-item:has(input[type="radio"]:checked) {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--primary-light);
}

.radio-item input {
  accent-color: var(--primary);
  cursor: pointer;
}

/* Checkbox items */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkbox-item:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.checkbox-item:has(input[type="checkbox"]:checked) {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary-light);
}

.checkbox-item:has(input[type="checkbox"]:checked) span {
  color: #fff;
  font-weight: 500;
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.likert-scale.six-options {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.likert-option.na-option {
  background: rgba(255, 255, 255, 0.03);
}

.likert-option.na-option span {
  font-size: 0.75rem;
  line-height: 1.25;
}

/* Likert Matrix Table Styles */
.matrix-container {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.9rem;
  min-width: 580px;
}

.matrix-table th, .matrix-table td {
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.matrix-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  vertical-align: middle;
}

.matrix-table th.matrix-item-col {
  text-align: left;
  padding-left: 1.25rem;
  width: 45%;
}

.matrix-table th.matrix-scale-col {
  width: 11%;
  min-width: 65px;
}

.matrix-scale-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: block;
}

.matrix-scale-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.2;
}

.matrix-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.matrix-table tbody tr:last-child td {
  border-bottom: none;
}

.matrix-item-label {
  text-align: left;
  padding-left: 1.25rem;
  font-weight: 500;
  color: #f1f5f9;
}

.matrix-radio-cell {
  vertical-align: middle;
}

.matrix-radio-cell label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: pointer;
  padding: 6px 0;
  margin: 0;
}

.matrix-radio-cell input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

textarea.form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 90px;
}

textarea.form-textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Primary Action Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* =========================================================
   MOBILE NEWS APP SIMULATION INTERFACE
   ========================================================= */

.app-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}

.app-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 390px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
}

.timer-badge.ready {
  color: #34d399;
}

/* Device Frame (Fully visible on participant screen) */
.device-frame {
  width: min(390px, 92vw);
  height: min(760px, calc(100vh - 140px));
  background: #f2f2f4;
  border: 10px solid #1e293b;
  border-radius: 42px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Simulated Smartphone Status Bar */
.phone-status-bar {
  background: #ffffff;
  padding: 12px 18px 4px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 50;
}

.status-time {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

.status-indicators {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #000000;
}

.status-icon {
  display: block;
}

/* App Header with Logo & Info Button */
.phone-header {
  background: #ffffff;
  padding: 4px 18px 14px 18px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand-center {
  display: flex;
  align-items: center;
}

.the-gazette-logo {
  height: 20px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* Header Info Icon & Hover Legend Popover */
.header-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-info-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s, transform 0.15s;
}

.btn-info-icon:hover {
  color: #0f172a;
  background-color: #f1f5f9;
  transform: scale(1.05);
}

.info-legend-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 12px 14px;
  z-index: 1000;
  color: #1e293b;
  text-align: left;
  pointer-events: auto;
}

.header-info-wrap:hover .info-legend-popover,
.info-legend-popover.active {
  display: block;
  animation: popoverFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.legend-popover-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
}

.legend-popover-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.legend-row .meta-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #4b5563;
}

.legend-text-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.legend-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.2;
}

.legend-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
}

/* Phase 3 Briefing Icon Guide Styles */
.briefing-guide-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.briefing-guide-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.briefing-guide-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.briefing-icons-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.briefing-icon-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.briefing-icon-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #38bdf8;
}

.briefing-icon-item .meta-icon {
  width: 22px;
  height: 22px;
  color: #38bdf8;
}

.briefing-icon-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.briefing-icon-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 2px;
}

/* Feed Container (Scrollable with mouse) */
.feed-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f2f2f4;
  scroll-behavior: smooth;
}

/* Custom Slim Scrollbar for Feed */
.feed-content::-webkit-scrollbar {
  width: 5px;
}

.feed-content::-webkit-scrollbar-track {
  background: transparent;
}

.feed-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 9999px;
}

.feed-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* News Article Card */
.news-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 16px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.news-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #000000;
  line-height: 1.25;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  flex: 1;
}

.card-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-top: 1px;
}

.meta-icon {
  color: #4b5563;
  width: 20px;
  height: 20px;
  display: block;
}

.topic-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #71717a;
  border-radius: 9999px;
  padding: 1px 8px;
  font-size: 11px;
  font-style: italic;
  font-weight: 400;
  color: #27272a;
  background: transparent;
  line-height: 1.2;
}

.card-subtitle {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.35;
  margin-top: 6px;
  margin-bottom: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
}

.card-content-preview {
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
}

/* Home Indicator Bar */
.phone-home-indicator-bar {
  background: #ffffff;
  padding: 4px 0 8px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.home-indicator {
  width: 120px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
}

/* =========================================================
   ARTICLE READER VIEW
   ========================================================= */

.article-reader-view {
  display: none;
  background: #ffffff;
  color: #111827;
  height: 100%;
  overflow-y: auto;
  padding: 14px 16px 20px 16px;
}

.article-reader-view.active {
  display: block;
}

.reader-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.btn-back-feed {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-back-feed:hover {
  background: #e5e7eb;
}

.reader-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.5rem 0 0.5rem;
  color: #000000;
}

.reader-header-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.reader-body-paragraph {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 0.9rem;
}

/* Deep Transparency Modal / Drawer */
.transparency-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.transparency-modal-overlay.active {
  display: flex;
}

.transparency-modal {
  background: #131826;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.factor-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

.factor-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.factor-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Completion Screen Box */
.completion-code-box {
  background: rgba(0, 0, 0, 0.4);
  border: 2px dashed rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}

.code-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

/* Responsive adjust */
@media (max-width: 600px) {
  .study-container {
    padding: 1.25rem 0.75rem;
  }

  .glass-panel {
    padding: 1.5rem 1rem;
  }

  .device-frame {
    border-width: 4px;
    border-radius: 24px;
    min-height: 600px;
  }
}