/* Base variables for our premium dark mode aesthetic */
:root {
  --bg-primary: #0f1115;
  --bg-secondary: #1a1d24;
  --bg-tertiary: #272b36;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-blue: #3b82f6;
  --accent-blue-dim: rgba(59, 130, 246, 0.15);
  
  /* Wordle feedback colors */
  --match-color: #22c55e;
  --match-bg: rgba(34, 197, 94, 0.15);
  --partial-color: #eab308;
  --partial-bg: rgba(234, 179, 8, 0.15);
  --mismatch-color: #475569;
  --mismatch-bg: rgba(71, 85, 105, 0.15);

  --border-radius: 8px;
  --transition: all 0.2s ease-in-out;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.game-header {
  border-bottom: 1px solid var(--bg-tertiary);
  background-color: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

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

.header-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-logo {
  height: 56px;
  width: auto;
  border-radius: 6px;
}

.header-controls {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Main Container */
.game-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex-grow: 1;
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--bg-tertiary);
  background-color: rgba(15, 17, 21, 0.96);
  margin-top: 2rem;
}

.site-footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  order: 2;
  margin-left: auto;
}

.site-footer-links p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.site-footer-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  order: 1;
}

.site-footer a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.site-footer a:hover {
  text-decoration: underline;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-primary);
  text-decoration: none;
}

.social-link:hover {
  text-decoration: none;
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.14);
}

.social-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.info-page {
  width: 100%;
}

.info-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.info-header {
  margin-bottom: 2rem;
}

.info-header h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.info-header p {
  color: var(--text-secondary);
  max-width: 70ch;
}

.info-nav {
  margin-top: 1rem;
}

.info-nav a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.info-nav a:hover {
  text-decoration: underline;
}

.info-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.info-section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}

.info-section p + p {
  margin-top: 0.8rem;
}

.info-section ul {
  margin-left: 1.25rem;
}

.info-section li + li {
  margin-top: 0.45rem;
}

.info-section strong {
  color: var(--text-primary);
}

.info-section a {
  color: var(--accent-blue);
}

.methodology-list {
  margin-left: 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.feedback-section {
  scroll-margin-top: 6rem;
}

.feedback-form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
}

.field-input {
  width: 100%;
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  padding: 0.85rem 0.95rem;
  transition: var(--transition);
}

.field-input::placeholder {
  color: var(--text-muted);
}

.field-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.field-textarea {
  min-height: 9rem;
  resize: vertical;
}

.feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.feedback-submit {
  width: auto;
  text-decoration: none;
}

.form-note {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.feedback-success-card {
  max-width: 640px;
  margin: 3rem auto 0;
}

.secondary-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.secondary-link:hover {
  text-decoration: underline;
}

/* Incident Banner */
.banner-section {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease-out;
}

.incident-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.incident-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.progress-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  transition: var(--transition);
  cursor: pointer;
}

.progress-dot.solved {
  background-color: var(--match-color);
  box-shadow: 0 0 10px var(--match-bg);
}

.progress-dot.active {
  background-color: var(--text-primary);
  box-shadow: 0 0 10px rgba(248, 250, 252, 0.4);
}

.progress-dot.failed {
  background-color: var(--accent-blue);
  box-shadow: 0 0 10px var(--accent-blue-dim);
}

/* Modes Layout - Single Column Stack */
.modes-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.mode-panel {
  width: 100%;
  max-width: 700px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: var(--transition);
}

.mode-panel:hover {
  border-color: var(--text-muted);
}

.active-panel {
  animation: fadeIn 0.24s ease-out;
}

.mode-panel-loading {
  min-height: 32rem;
  justify-content: flex-start;
}

.loading-copy {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.loading-clues-grid {
  min-height: 18rem;
}

.mode-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-transform: capitalize;
}

.mode-status {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.mode-status.solved { color: var(--match-color); }

/* Clues Section */
.clues-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.clues-container.technique-clues-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-width {
  grid-column: 1 / -1;
}

.clue-item {
  background-color: var(--bg-primary);
  border-left: 3px solid var(--accent-blue);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  min-height: 5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.clue-item-skeleton {
  border-left-color: rgba(59, 130, 246, 0.28);
}

.skeleton-bar {
  display: block;
  width: 100%;
  height: 0.92rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(100, 116, 139, 0.18) 0%,
    rgba(148, 163, 184, 0.34) 50%,
    rgba(100, 116, 139, 0.18) 100%
  );
  background-size: 220% 100%;
  animation: skeletonPulse 1.4s ease-in-out infinite;
}

.skeleton-bar-short {
  width: 38%;
  height: 0.72rem;
}

.skeleton-bar-wide {
  width: 86%;
}

.clue-value {
  display: block;
  min-height: 2rem;
}

.intel-unsealed {
  animation: intelUnsealed 0.95s cubic-bezier(0.2, 0.9, 0.25, 1);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.22), 0 0 24px rgba(34, 197, 94, 0.18);
  border-left-color: var(--match-color);
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.04) 45%, rgba(15, 23, 42, 0)),
    var(--bg-primary);
}

.intel-unsealed-now::after {
  content: '';
  position: absolute;
  inset: -20% auto -20% -35%;
  width: 55%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(187, 247, 208, 0.75), rgba(255, 255, 255, 0));
  transform: skewX(-20deg);
  pointer-events: none;
  animation: intelSweep 0.9s ease-out forwards;
}

.intel-unsealed-now .clue-value {
  animation: intelRevealText 0.75s ease-out;
}

.country-flag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 2.8rem;
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.country-flag-chip-unknown {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.32);
  color: var(--text-secondary);
}

.country-chip-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.clue-flag-icon {
  width: 28px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.country-flag-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 1.5rem;
  line-height: 1;
  filter: saturate(1.1);
}

.country-flag-chip-grid {
  min-width: 2.25rem;
  min-height: 1.75rem;
  padding: 0.2rem 0.45rem;
}

.clue-label {
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}

.redacted-text {
  background-color: #0d0d0d;
  color: #0d0d0d;
  border-radius: 3px;
  padding: 0 0.2rem;
  user-select: none;
  letter-spacing: 2px;
  box-shadow: inset 0 0 0 1000px #000;
}

.redacted-intel {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  background-color: var(--mismatch-bg);
  color: var(--text-muted);
  border: 1px dashed var(--mismatch-color);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-style: italic;
  user-select: none;
}

@keyframes intelUnsealed {
  0% {
    transform: translateY(6px) scale(0.975);
    opacity: 0.25;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
  45% {
    transform: translateY(-1px) scale(1.015);
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3), 0 0 28px rgba(34, 197, 94, 0.22);
  }
  70% {
    transform: translateY(0) scale(1.005);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes intelSweep {
  0% {
    transform: translateX(-120%) skewX(-20deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateX(320%) skewX(-20deg);
    opacity: 0;
  }
}

@keyframes intelRevealText {
  0% {
    transform: translateY(4px);
    opacity: 0;
    filter: blur(4px);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

/* Timeline specific */
.timeline-builder-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-builder-copy {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.timeline-builder {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(39, 43, 54, 0.9));
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius);
  padding: 0.85rem 1rem;
  cursor: default;
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: var(--accent-blue);
}

.timeline-card.locked {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(39, 43, 54, 0.92));
  border-color: var(--match-color);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.timeline-card-order {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  color: var(--partial-color);
  font-weight: 700;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.timeline-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.timeline-card-id {
  color: var(--accent-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.timeline-card-name {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.timeline-card-state {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-card.locked .timeline-card-state {
  color: var(--match-color);
}

.timeline-card.locked .timeline-card-order {
  color: var(--match-color);
  border-color: rgba(34, 197, 94, 0.45);
}

.timeline-card-controls {
  display: flex;
  gap: 0.4rem;
}

.timeline-card-controls-locked {
  justify-content: flex-end;
}

.timeline-card-controls-note {
  color: var(--match-color);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-move-btn {
  border: 1px solid var(--bg-tertiary);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.timeline-move-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.timeline-move-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.timeline-builder-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

.timeline-progress {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.timeline-reset-btn {
  width: auto;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--bg-tertiary);
}

.timeline-reset-btn:hover {
  background: var(--bg-tertiary);
}

/* Input Section */
.guess-section {
  position: relative;
  margin-top: 1.5rem;
}

.multiple-choice-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.loading-choice-grid {
  align-items: stretch;
}

.choice-btn {
  background-color: var(--bg-primary);
  border: 1px solid var(--text-muted);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  flex: 1 1 calc(50% - 0.75rem);
  min-width: 250px;
}

.choice-skeleton {
  flex: 1 1 calc(50% - 0.75rem);
  min-width: 250px;
  min-height: 3.5rem;
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: var(--border-radius);
  background: rgba(15, 23, 42, 0.45);
  padding: 1rem;
  display: flex;
  align-items: center;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--accent-blue);
  background-color: var(--bg-tertiary);
}

.choice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.choice-btn.guessed-wrong {
  border-color: var(--mismatch-color);
  background-color: rgba(71, 85, 105, 0.1);
  text-decoration: line-through;
  color: var(--text-secondary);
}

.next-phase-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.primary-btn {
  background-color: var(--accent-blue);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.primary-btn:hover {
  background-color: #2563eb;
}

/* Deduction Grid */
.deduction-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.grid-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.grid-label {
  width: 120px;
  flex-shrink: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: right;
  padding-right: 0.5rem;
}

.grid-cells {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-grow: 1;
}

.grid-cell {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  animation: flipIn 0.5s ease backwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 70px;
}

.cell-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
}

.cell-value {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.flag-icon {
  width: 24px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Stagger the animations slightly based on nth-child in JS, or we can just apply a single animation. */
@keyframes flipIn {
  0% {
    transform: rotateX(-90deg);
    opacity: 0;
  }
  100% {
    transform: rotateX(0);
    opacity: 1;
  }
}

.grid-cell.match {
  background-color: var(--match-bg);
  border-color: var(--match-color);
  color: var(--match-color);
}

.grid-cell.partial {
  background-color: var(--partial-bg);
  border-color: var(--partial-color);
  color: var(--partial-color);
}

.grid-cell.mismatch {
  background-color: var(--mismatch-bg);
  border-color: var(--mismatch-color);
  color: var(--text-secondary);
}

/* Modal Specific Additions */
.score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  border: 1px dashed var(--text-muted);
}

.score-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.score-value {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--partial-color);
  line-height: 1;
}

.score-value.perfect {
  color: var(--match-color);
}

.event-summary {
  background-color: var(--bg-primary);
  border-left: 3px solid var(--accent-blue);
  padding: 1rem;
  border-radius: 4px;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.event-summary a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.event-summary a:hover {
  text-decoration: underline;
}

.return-msg {
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Modal Styling */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--accent-blue);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-title {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

#summary-content {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

#summary-content ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#summary-content li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.summary-resource-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.summary-resource-link:hover {
  text-decoration: underline;
}

.summary-resource-id {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: var(--text-secondary);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.summary-resource-icon {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.modal-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background-color: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.modal-btn:hover {
  background-color: #2563eb;
}

.timeline-builder-actions .timeline-reset-btn {
  width: auto;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--bg-tertiary);
}

.timeline-builder-actions .timeline-reset-btn:hover {
  background: var(--bg-tertiary);
}

@media (max-width: 720px) {
  .clues-container.technique-clues-grid {
    grid-template-columns: 1fr;
  }

  .choice-btn {
    min-width: 100%;
    flex-basis: 100%;
  }

  .choice-skeleton {
    min-width: 100%;
    flex-basis: 100%;
  }

  .grid-row {
    flex-direction: column;
    align-items: stretch;
  }

  .grid-label {
    width: auto;
    text-align: left;
    padding-right: 0;
  }

  .timeline-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .timeline-card-controls {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .timeline-builder-actions {
    flex-direction: column;
  }

  .timeline-reset-btn,
  .timeline-builder-actions .primary-btn {
    width: 100%;
  }

  .header-content {
    align-items: flex-start;
    gap: 1rem;
  }

  .site-footer-inner,
  .site-footer-links,
  .site-footer-socials {
    width: 100%;
  }

  .site-footer-socials {
    justify-content: flex-start;
  }

  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .feedback-actions {
    align-items: stretch;
  }

  .feedback-submit {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Archive Button */
.archive-btn {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 1rem;
}

.archive-btn:hover {
  background: var(--accent-blue);
  color: #fff;
}

/* Drawer Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 900;
  transition: opacity 0.3s ease;
}

/* Case Files Drawer */
.case-files-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--bg-tertiary);
  z-index: 950;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}

.case-files-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-tertiary);
  flex-shrink: 0;
}

.drawer-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.drawer-close:hover {
  color: var(--text-primary);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Case Cards */
.case-card {
  background: var(--bg-primary);
  border: 1px solid var(--bg-tertiary);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.case-card:hover {
  border-color: var(--accent-blue);
  background: var(--bg-tertiary);
}

.case-card.current-day {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px var(--accent-blue-dim);
}

.case-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.case-number {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.case-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.case-status {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.case-status.declassified {
  background: var(--match-bg);
  color: var(--match-color);
  border: 1px solid var(--match-color);
}

.case-status.in-progress {
  background: var(--partial-bg);
  color: var(--partial-color);
  border: 1px solid var(--partial-color);
}

.case-status.sealed {
  background: var(--mismatch-bg);
  color: var(--text-muted);
  border: 1px dashed var(--mismatch-color);
}

.case-score {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Utilities */
.hidden { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes skeletonPulse {
  0% {
    background-position: 200% 0;
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
  100% {
    background-position: -20% 0;
    opacity: 0.72;
  }
}
