/* =========================================================
   Base / Typography
   ========================================================= */

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  color: #111;
  background: #fff;
}

a {
  color: #0645ad;              /* classic web blue */
  text-decoration: underline;
}

a:visited {
  color: #5a3696;              /* classic visited purple */
}

a:hover {
  color: #000;
}

/* =========================================================
   Layout
   ========================================================= */

.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* =========================================================
   Header & Navigation
   ========================================================= */

.site-header {
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
}

.nav-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;            /* natural wrap, no breakpoints */
  align-items: center;
  gap: 18px;
}

/* Brand */

.site-nav .brand {
  margin-right: auto;
}

.site-nav .brand a {
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  color: #1b5e63;              /* calm teal = clean air */
  letter-spacing: 0.02em;
}

/* Nav links */

.site-nav a {
  font-size: 0.95rem;
  text-decoration: none;
  color: #333;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.25s ease-in-out;
}

.site-header.hide {
  transform: translateY(-100%);
}


/* =========================================================
   Headings
   ========================================================= */

.content > h1 {
  font-size: 1.9rem; 
  margin: 1.6rem 0 1rem;
}

.home .content > h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.4rem;
  margin: 2.2rem 0 0.9rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.6rem;
}

/* =========================================================
   Tables
   ========================================================= */

.table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #ccc;
  padding: 8px 10px;
}

tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
  line-height: 1.45;
}

tbody td:first-child {
  font-weight: 500;
}

.table-note {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.6rem;
}

/* =========================================================
   Code / Diagrams
   ========================================================= */

pre {
  background: #fafafa;
  padding: 12px 14px;
  border-left: 3px solid #ddd;
  overflow-x: auto;
  font-size: 0.9rem;
}

/* =========================================================
   Related Reading
   ========================================================= */

.related {
  max-width: 720px;
  margin: 3rem auto 2rem;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid #e0e0e0;
  background: #fafafa;
}

.related h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.related ul {
  margin: 0;
  padding-left: 1.2rem;
}

.related li {
  margin-bottom: 0.45rem;
}

.related a {
  font-weight: 500;
}

/* =========================================================
   Footer
   ========================================================= */

footer {
  border-top: 1px solid #e0e0e0;
  margin-top: 48px;
  padding: 22px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #555;
}

footer a {
  margin-left: 10px;
}

.affiliate-note {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: #666;
}

@media (max-width: 768px) {
  body {
    font-size: 20px;
    line-height: 1.75;
  }
  .content > h1 {
    font-size: 2.1rem; /* mobile */
  }
   table {
    font-size: 0.9rem;
  }
  .site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
  }
  .site-nav .brand {
    flex: 0 0 100%;
  }
  .site-nav .brand a {
    font-size: 1.15rem;
  }
  .site-nav a {
    font-size: 1rem;
  }
    .content {
    padding: 0 18px 36px;
  }
}
