/* Shared base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 1rem;
  color: #1f2328;
  line-height: 1.6;
}
h1, h2 { border-bottom: 1px solid #d1d9e0; padding-bottom: 0.3em; }
h2 { margin-top: 1.5em; }
h1:first-child, h2:first-child { margin-top: 0; }
a { color: #0969da; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
th, td { border: 1px solid #d1d9e0; padding: 8px 12px; text-align: left; }
th { background: #f6f8fa; }
tr.highlight td { background: #ffee00; }
code { background: #f6f8fa; padding: 0.2em 0.4em; border-radius: 3px; font-size: 0.9em; }
pre { background: #f6f8fa; padding: 1em; border-radius: 6px; overflow-x: auto; }
pre code { background: none; padding: 0; }
ul, ol { padding-left: 2em; }
hr { border: none; border-top: 1px solid #d1d9e0; margin: 2em 0 0.5em 0; }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: #656d76;
}
.footer .footer-nav { display: flex; gap: 0.5em; }
.footer .footer-github { margin-left: auto; }
@media (max-width: 600px) {
  .tab-labels {
    flex-wrap: wrap;
    gap: 0;
  }
  .tab-labels label {
    padding: 0.45em 0.6em;
    font-size: 0.8em;
  }
}

/* Page heading with back-link */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #d1d9e0;
  padding-bottom: 0.3em;
  margin-top: 0;
}
.page-header h1,
.page-header h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin: 0;
}
.page-header .back-link {
  font-size: 0.9em;
  font-weight: normal;
  white-space: nowrap;
}

/* CSS-only tabs */
.tabs { margin: 1em 0; }
.tabs input[type="radio"] { display: none; }
.tab-labels {
  display: flex;
  justify-content: center;
  border-bottom: 2px solid #d1d9e0;
  margin-bottom: 0;
}
.tab-labels label {
  padding: 0.6em 1.2em;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  color: #656d76;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-labels label:hover { color: #1f2328; }
.tab-content { display: none; padding: 1em 0; }

/* Result images (used in project pages) */
.result-img { width: 100%; border-radius: 6px; }
