/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f6f8;
  color: #333;
}

.container {
  max-width: 800px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Header layout */
.header {
  margin-bottom: 2rem;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  height: 80px;
  width: 80px;
  object-fit: contain;
}

.right-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-grow: 1;
  gap: 0.5rem;
}

.breadcrumbs {
  font-size: 1rem;
  color: #666;
  text-align: right;
}

.breadcrumbs a {
  color: #666;
  text-decoration: none;
  margin-right: 0.25rem;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-links a {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background-color: #ff9800;
  color: white;
  font-weight: 500;
  white-space: nowrap;
}

.nav-links a:hover {
  background-color: #e68900;
}

/* Score table */
.score-table {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

.score-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.score-cell {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: normal;
}

.metric-value {
  font-weight: bold;
  background-color: #eef;
  border: none;
  border-radius: 6px;
  color: #333;
  margin: 0.25rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Section styling */
.options-section {
  margin-bottom: 2rem;
}

.option {
  background-color: #fdfdfd;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  color: #333;
  transition: box-shadow 0.3s ease;
}

.option:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.option h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: #3f51b5;
  font-weight: 600;
}

.option ul {
  padding-left: 1.2rem;
  margin: 0;
}

.option ul li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.option p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.option a {
  color: #3f51b5;
  text-decoration: underline;
}

.option a:hover {
  text-decoration: none;
}

/* Feedback styles */
.feedback {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.feedback.correct {
  color: #4caf50;
}

.feedback.incorrect {
  color: #f44336;
}

.feedback.warning {
  color: #ff9800;
}

/* Buttons */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.check-btn {
  background-color: #3f51b5;
}

.check-btn:hover {
  background-color: #2c3e9f;
}

.next-btn {
  background-color: #3f51b5;
}

.next-btn:hover {
  background-color: #2c3e9f;
}

.hidden {
  display: none !important;
}

.separator {
  height: 3rem;
  width: 100%;
  background-color: transparent;
}

/* Slug menu layout */
.slug-menu {
  margin-top: 3rem;
  padding: 0;
  background-color: transparent;
  border: none;
  display: flex;
  justify-content: center;
}

.year-grid {
  max-width: 600px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.year-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.year-column li {
  list-style: none;
}

.year-column a {
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  color: #333;
  padding: 0.3rem 0.5rem;
  display: inline-block;
  text-decoration: none;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.year-3 a { background-color: #f8d7da; }
.year-5 a { background-color: #fff3cd; }
.year-7 a { background-color: #d4edda; }
.year-9 a { background-color: #d0e7ff; }

.year-column a:hover {
  background-color: #ddd;
}

/* Responsive layout fixes */
@media (max-width: 600px) {
  .top-row {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .logo img {
    height: 60px;
    width: 60px;
  }

  .right-column {
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    flex-grow: 1;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.25rem;
  }

  .nav-links a {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }

  .breadcrumbs {
    text-align: right;
    font-size: 0.85rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .metric-value {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
  }

  .score-row.values {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
}

/* Desktop: two-column slug layout */
@media (min-width: 600px) {
  .year-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Accessibility and touch */
.option:focus,
.option:active {
  background-color: inherit;
  outline: none;
}

.option {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}
