/* Base layout */
body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 1.5rem;
  background: #f9f9f9;
  color: #333;
}

header h1 {
  text-align: center;
  margin-bottom: 1rem;
}

main p {
  margin-bottom: 1.5rem;
}

/* Introductory text styling */
.intro-text {
  text-align: center;
  margin: 0.5rem auto;
  max-width: 800px;
  line-height: 1.4;
  font-size: 1.05rem;
}

@media (max-width: 1024px) {
  .intro-text {
    font-size: 0.95rem;
  }
}

@media (max-width: 599px) {
  .intro-text {
    font-size: 0.85rem;
    line-height: 1.3;
  }
}

/* Section spacing */
section {
  margin-top: 2rem;
}

/* Center section headings */
section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Navigation bar */
nav {
  background: #eee;
  border-bottom: 1px solid #ccc;
  margin-bottom: 1rem;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

nav li {
  margin: 0.5rem 0;
}

nav a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #ddd;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  color: #0066cc;
  font-weight: 500;
}

nav a:hover {
  background: #ccc;
  text-decoration: none;
}

@media (min-width: 600px) {
  nav ul {
    flex-direction: row;
    justify-content: center;
  }

  nav li {
    margin: 0 1rem;
  }
}

/* Table wrapper */
.table-wrapper {
  width: 100%;
  overflow-x: hidden;
}

/* Tables (general) */
table {
  width: 100%;
  max-width: 1200px;
  margin: 1rem auto;
  border-collapse: collapse;
  table-layout: fixed;
}

th, td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

th {
  background: #eee;
}

tr:nth-child(even) {
  background: #f2f2f2;
}

tr:hover {
  background: #e6f2ff;
}

/* Column width balancing for GRCC table (desktop) */
.grcc-table th:nth-child(1),
.grcc-table td:nth-child(1) { width: 26%; }

.grcc-table th:nth-child(2),
.grcc-table td:nth-child(2) { width: 38%; }

.grcc-table th:nth-child(3),
.grcc-table td:nth-child(3) { width: 30%; }

.grcc-table th.rubric-col,
.grcc-table td.rubric-col {
  width: 6%;
  text-align: center;
  white-space: nowrap;
}

/* Rubric icon styling */
.grcc-table .rubric-link {
  display: inline-block;
  font-size: 1.2rem;
  text-decoration: none !important;
}

.grcc-table .rubric-link:hover {
  text-decoration: none !important;
}

/* Mobile tweaks */
@media (max-width: 599px) {
  th {
    font-size: 0.8rem;
    padding: 0.3rem;
  }

  th, td {
    font-size: 0.85rem;
    line-height: 1.2;
    padding: 0.4rem;
  }

  .grcc-table th.rubric-col,
  .grcc-table td.rubric-col {
    width: 68px;
    min-width: 68px;
    max-width: none;
    padding: 0.3rem;
    white-space: nowrap;
    text-align: center;
  }

  .grcc-table .rubric-link {
    font-size: 1.05rem;
  }

  .grcc-table td:nth-child(2),
  .grcc-table td:nth-child(3) {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

/* Tablet-specific column balancing */
@media (min-width: 600px) and (max-width: 1023px) {
  .grcc-table th:nth-child(1),
  .grcc-table td:nth-child(1) { width: 24%; }

  .grcc-table th:nth-child(2),
  .grcc-table td:nth-child(2) { width: 36%; }

  .grcc-table th:nth-child(3),
  .grcc-table td:nth-child(3) { width: 30%; }

  .grcc-table th.rubric-col,
  .grcc-table td.rubric-col {
    width: 10%;
    min-width: 60px;
    white-space: nowrap;
    text-align: center;
  }
}

/* Caption/legend styling for rubric icon */
.table-caption {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Breadcrumb + back button area */
#breadcrumb {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  text-align: center;
  background: #f5f5f5;
  border-bottom: 1px solid #ccc;
  padding: 0.5rem;
}

#breadcrumb a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
  margin: 0 0.2rem;
}

#breadcrumb a:hover {
  text-decoration: underline;
}

/* Wrapper to center back button */
.back-button-wrapper {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 1rem;
}

/* Back button styled like breadcrumb links with fade-in */
#back-button {
  display: none;
  background: none;
  border: none;
  color: #0066cc;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  opacity: 0;
  animation: fadeIn 0.4s ease-in forwards;
}

#back-button::before {
  content: "⬅ ";
  font-size: 1.1rem;
}

#back-button:hover {
  text-decoration: underline;
  background: #eaeaea;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive body padding */
@media (min-width: 600px) and (max-width: 1023px) {
  body { padding: 1rem; }
}

@media (min-width: 1024px) {
  body { padding: 2rem; }
}

/* Footer styling */
footer {
  background: #eee;
  border-top: 1px solid #ccc;
  padding: 1rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
}

footer p {
  margin: 0.3rem 0;
}

footer a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}
/* End of styles.css */