:root {
  color-scheme: light;
  --bg: #EBB46D;
  --bg-elevated: #F4D19A;
  --bg-elevated-softer: #F7D5A9;
  --border-subtle: rgba(72, 63, 53, 0.24);
  --accent: #8a3f1b;
  --accent-soft: rgba(138, 63, 27, 0.15);
  --accent-strong: #6f3219;
  --text: #2f2920;
  --text-muted: #6b573f;
  --danger: #b9423b;
  --success: #3f7a4b;
  --shadow-soft: 0 8px 24px rgba(47, 35, 16, 0.14);
  --radius-lg: 10px;
  --radius-pill: 999px;
  --transition-fast: 150ms ease-out;
  --transition-medium: 220ms ease;
  --font-serif-display: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-serif-display);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg);
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background-color: rgba(235, 180, 109, 0.92);
  border-bottom: 1px solid rgba(98, 84, 67, 0.18);
}

.logo-area {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background-color: #d9ae6d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif-display);
  font-weight: 600;
  color: #4b3826;
  box-shadow: none;
  letter-spacing: 0.03em;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-title {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.logo-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.app-main {
  flex: 1;
  max-width: none;
  margin: 0;
  padding: 0;
}

.app-footer {
  border-top: 1px solid rgba(98, 84, 67, 0.18);
  padding: 12px 24px 18px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

input,
textarea, select {
  border: 1px solid #e6e9ef;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.6);
}

.card {
  position: relative;
  background-color: #f3d3a2;
  border-radius: 12px;
  border: 1px solid rgba(18, 23, 26, 0.08);
  box-shadow: var(--shadow-soft);
  padding: 20px 22px;
  overflow: hidden;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

/* keep card content simple and flat to feel like paper */

.card + .card {
  margin-top: 16px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 18px;
}

@media (max-width: 800px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero-title {
  font-size: clamp(28px, 3.6vw, 34px);
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}

.hero-highlight {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.hero-subtitle {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(98, 84, 67, 0.35);
  background: rgba(255, 252, 244, 0.9);
  color: var(--text-muted);
}

.badge.accent {
  background: var(--accent-soft);
  border-color: rgba(176, 91, 50, 0.55);
  color: var(--accent-strong);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: #8a3f1b;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(138, 63, 27, 0.22);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.primary-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(138, 63, 27, 0.28);
}
.primary-button:active { transform: translateY(-1px); }

.primary-button-quiet {
  border-radius: 999px;
  border: 1px solid rgba(98, 84, 67, 0.45);
  background: #f6d6a2;
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color var(--transition-fast), background var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast);
}

.primary-button-quiet:hover {
  border-color: rgba(98, 84, 67, 0.8);
  background: #f2c981;
  transform: translateY(-0.5px);
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.dataset-card {
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}
.dataset-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(31, 41, 55, 0.08);
}

.suspect-card-button {
  text-align: left;
  background: #f4d5a1;
  border: 1px solid rgba(18,23,26,0.08);
  padding: 12px;
  border-radius: 10px;
}

/* small reveal animation for dataset cards */
.reveal-animate {
  animation: datasetReveal 420ms cubic-bezier(.2,.9,.2,1) both;
}

@keyframes datasetReveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.case-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-card {
  border-radius: 14px;
  padding: 14px 14px 13px;
  border: 1px solid rgba(98, 84, 67, 0.55);
  background-color: #f2c78f;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color var(--transition-medium), transform var(--transition-medium),
    background var(--transition-medium);
  cursor: pointer;
}

.case-card:hover {
  border-color: rgba(176, 91, 50, 0.8);
  transform: translateY(-1px);
  background-color: #e8b36b;
}

.case-pill {
  width: 7px;
  border-radius: 999px;
  background-color: #b78b4b;
  align-self: stretch;
}

.case-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.case-title {
  font-size: 16px;
  font-weight: 600;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.difficulty-pill {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(98, 84, 67, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
}

.difficulty-easy {
  border-color: rgba(69, 209, 143, 0.7);
  color: var(--success);
}

.difficulty-medium {
  border-color: rgba(255, 185, 101, 0.7);
  color: #ffb965;
}

.difficulty-hard {
  border-color: rgba(255, 75, 110, 0.7);
  color: var(--danger);
}

.case-summary {
  font-size: 12px;
  color: var(--text-muted);
}

.case-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.case-cta-button {
  border-radius: 999px;
  padding: 6px 11px;
  border: none;
  font-size: 13px;
  background: rgba(138, 63, 27, 0.12);
  color: var(--accent-strong);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.case-cta-button:hover {
  background: rgba(138, 63, 27, 0.2);
  transform: translateY(-0.5px);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-strong);
}

.how-to-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.how-to-list li {
  display: flex;
  gap: 8px;
}

.how-to-step-number {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.how-to-step-text {
  flex: 1;
}

.case-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.breadcrumbs a {
  color: var(--accent-strong);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.case-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.case-header-main {
  flex: 2;
}

.case-header-main h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.case-header-main p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.case-header-side {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.pill {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .section-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.suspect-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suspect-card {
  border-radius: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(98, 84, 67, 0.45);
  background: rgba(253, 248, 236, 0.96);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.suspect-card-button {
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.suspect-card-button:hover .suspect-name {
  text-decoration: underline;
}

.suspect-detail {
  margin-top: 10px;
  border-radius: 10px;
  border: 1px dashed rgba(98, 84, 67, 0.6);
  background: rgba(253, 248, 236, 0.9);
  padding: 8px 9px;
  font-size: 12px;
  color: var(--text-muted);
}

.suspect-detail-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.suspect-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.suspect-name {
  font-weight: 600;
}

.suspect-role {
  font-size: 13px;
  color: var(--text-muted);
}

.suspect-tagline {
  font-size: 13px;
  color: var(--text-muted);
}

.datasets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dataset-row {
  border-radius: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(98, 84, 67, 0.45);
  background: rgba(253, 248, 236, 0.96);
  display: flex;
  gap: 10px;
  align-items: center;
}

.dataset-main {
  flex: 1;
}

.dataset-title {
  font-size: 14px;
  font-weight: 500;
}

.dataset-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.dataset-type-pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.dataset-open-button {
  border-radius: 999px;
  padding: 6px 11px;
  border: none;
  font-size: 13px;
  background: rgba(176, 91, 50, 0.06);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.dataset-open-button:hover {
  background: rgba(176, 91, 50, 0.16);
  transform: translateY(-0.5px);
}

.notes-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 12px;
  border: 1px solid rgba(98, 84, 67, 0.45);
  background: rgba(255, 252, 244, 0.98);
  color: var(--text);
  padding: 9px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  resize: vertical;
}

.notes-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.notes-status {
  font-size: 11px;
  color: var(--text-muted);
}

.notes-status strong {
  color: var(--accent-strong);
  font-weight: 500;
}

.accusation-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 12px;
  color: var(--text-muted);
}

.form-select,
.form-input {
  border-radius: 10px;
  border: 1px solid #e6e9ef;
  background: #ffffff;
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
}

.form-textarea {
  border-radius: 10px;
  border: 1px solid #e6e9ef;
  background: #ffffff;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  min-height: 120px;
  resize: vertical;
  transition: box-shadow 180ms ease, border-color 180ms ease, transform 220ms ease;
}

.form-textarea:focus {
  box-shadow: 0 8px 24px rgba(92, 201, 255, 0.08);
  border-color: rgba(92, 201, 255, 0.6);
}

.form-helper {
  font-size: 11px;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.result-chip {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

.result-good {
  background: rgba(63, 122, 75, 0.12);
  color: var(--success);
}

.result-good {
  animation: successPulse 420ms cubic-bezier(.2,.9,.2,1) both;
}

@keyframes successPulse {
  from { transform: scale(0.98); opacity: 0.6; }
  50% { transform: scale(1.04); opacity: 1; }
  to { transform: scale(1); opacity: 1; }
}

/* animation for a question answered correctly (before removal) */
.answered-animate {
  animation: questionAnswered 420ms cubic-bezier(.2,.9,.2,1) both;
}

@keyframes questionAnswered {
  from { opacity: 1; transform: translateY(0) scale(1); }
  30% { transform: translateY(-6px) scale(1.01); }
  to { opacity: 0; transform: translateY(-18px) scale(0.98); }
}

.result-bad {
  background: rgba(185, 66, 59, 0.12);
  color: var(--danger);
}

.solution-panel {
  margin-top: 8px;
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(253, 248, 236, 0.96);
  border: 1px solid rgba(98, 84, 67, 0.45);
  font-size: 13px;
  color: var(--text-muted);
}

.solution-panel h4 {
  margin: 0 0 4px;
  font-size: 13px;
}

.text-danger {
  color: var(--danger);
}

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

.pill-small {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Scrollytelling styles */
.scrolly-container {
  min-height: 100vh;
  position: relative;
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.intro-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #EBB46D;
  scroll-snap-align: start;
}

.intro-section::after {
  content: "↓";
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: rgba(47, 41, 32, 0.36);
  animation: bounceDown 1.8s infinite ease-in-out;
}

@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(10px); }
  60% { transform: translateX(-50%) translateY(6px); }
}

.intro-content {
  max-width: 800px;
  text-align: center;
}

.case-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.2;
}

.case-summary {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.suspects-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f4d5a1;
  scroll-snap-align: start;
}

.suspects-container {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  justify-content: center;
  flex-wrap: wrap;
}

.suspect-profile {
  background: #f9e3c2;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(47, 35, 16, 0.14);
  overflow: hidden;
  width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.suspect-profile:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(47, 35, 16, 0.22);
}

.suspect-image {
  width: 95%;
  margin: auto;
  max-height: 400px;
  overflow: hidden;
}

.suspect-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suspect-info {
  padding: 1.5rem;
}

.suspect-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: var(--text);
}

.suspect-role {
  font-size: 1rem;
  color: var(--accent-strong);
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.suspect-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.indizi-button {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: white;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(176, 91, 50, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.indizi-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(176, 91, 50, 0.4);
}

.sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: #f2cd9a;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1001;
  overflow-y: auto;
}

.sidebar-open {
  right: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(98, 84, 67, 0.18);
  background: #f4c88b;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text);
}

.close-sidebar {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.sidebar-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-content > .card {
  margin: 0;
}

@media (max-width: 768px) {
  .suspects-container {
    flex-direction: column;
    align-items: center;
  }

  .suspect-profile {
    width: 100%;
    max-width: 300px;
  }

  .sidebar {
    width: 100vw;
    right: -100vw;
  }

  .indizi-button {
    bottom: 1rem;
    left: 1rem;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}
