/* ===== BASE STYLES ===== */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 2rem;
}
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: #e7e7e7;
  background: #0a0d11;
  line-height: 1.7;
}
header, footer {
  background: #10151a;
  padding: 1rem 2rem;
}
h1, h2, h3 { color: #00c8ff; }
a { color: #00c8ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== TABLE - RESPONSIVE ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}
th, td {
  border: 1px solid #222;
  padding: 0.6em;
  text-align: left;
}

/* ===== NAVIGATION ===== */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
nav a {
  margin-right: 0;
  padding: 0.3rem 0;
}
footer {
  font-size: 0.9em;
  color: #999;
  text-align: center;
  border-top: 1px solid #111;
}

/* ===== BUTTONS ===== */
button, .cbutton {
  display: inline-block;
  background: #00c8ff;
  color: #0a0d11;
  padding: 0.6em 1.2em;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 1em;
}
button:hover, .cbutton:hover {
  background: #5ce1ff;
}

/* ===== HEADER / SITE TITLE ===== */
header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.site-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.6rem;
  margin: 0;
  flex-wrap: wrap;
}
.site-title a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.site-title img.logo {
  height: 48px;
  width: 48px;
  vertical-align: middle;
}
.site-title .title-text {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
/* Hide duplicate logos on mobile */
.site-title img.logo:last-of-type {
  display: none;
}
.pagewrap {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== TABLET (max-width: 768px) ===== */
@media (max-width: 768px) {
  main {
    padding: 0 1.5rem;
    margin: 1.5rem auto;
  }
  header, footer {
    padding: 1rem 1.5rem;
  }
  .site-title {
    font-size: 1.3rem;
  }
  .site-title .title-text {
    font-size: 1.7rem;
  }
  .site-title img.logo {
    height: 40px;
    width: 40px;
  }
  /* Make table scrollable horizontally */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1em -1rem;
    padding: 0 1rem;
  }
  table {
    min-width: 600px;
    font-size: 0.9em;
  }
  th, td {
    padding: 0.5em;
  }
}

/* ===== MOBILE (max-width: 600px) ===== */
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  main {
    padding: 0 1rem;
    margin: 1rem auto;
  }
  header, footer {
    padding: 0.8rem 1rem;
  }
  .pagewrap {
    padding: 0 0.5rem;
  }
  
  /* Header stacking */
  header {
    text-align: center;
  }
  .site-title {
    font-size: 1.1rem;
    justify-content: center;
  }
  .site-title .title-text {
    font-size: 1.5rem;
  }
  .site-title img.logo {
    height: 32px;
    width: 32px;
  }
  
  /* Navigation - centered and wrapping */
  nav {
    justify-content: center;
    gap: 0.3rem 0.8rem;
  }
  nav a {
    font-size: 0.95rem;
    padding: 0.4rem 0.5rem;
    background: #1a2029;
    border-radius: 4px;
  }
  nav a:hover {
    background: #252d38;
  }
  
  /* Typography adjustments */
  h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  h2 {
    font-size: 1.3rem;
  }
  h3 {
    font-size: 1.1rem;
  }
  
  /* Lists */
  ul {
    padding-left: 1.2rem;
  }
  
  /* Buttons - full width on mobile */
  .cbutton {
    width: 100%;
    font-size: 1.1em;
    text-align: center;
    box-sizing: border-box;
  }
  
  /* Table - card layout on mobile */
  table {
    min-width: auto;
    font-size: 0.85em;
  }
  th, td {
    padding: 0.4em;
  }
  
  /* Footer */
  footer {
    font-size: 0.8em;
  }
}

/* ===== EXTRA SMALL (max-width: 400px) ===== */
@media (max-width: 400px) {
  .site-title {
    font-size: 1rem;
  }
  .site-title img.logo {
    height: 28px;
    width: 28px;
  }
  nav a {
    font-size: 0.85rem;
  }
  h1 {
    font-size: 1.3rem;
  }
}
