/* Header: flex layout, fixed min-height, left/right alignment */
.header {
  padding: 0 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Logo: remove old float/margin-top, set fixed height */
.nav-logo {
  float: none;
  margin-top: 0;
  flex-shrink: 0;
}

.nav-logo img {
  display: block;
  width: auto;
  height: 40px;
  border-radius: 50%;
}

/* Nav links: reset text-align since flex handles layout */
.nav-links {
  text-align: left;
}

/* csslit: force small font for note points, override theme li styles */
.csslit-notes-content,
.csslit-notes-content ul,
.csslit-notes-content li,
.csslit-notes-content p {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #555 !important;
}

.csslit-notes summary {
  font-size: 14px !important;
}

.csslit-notes-content ul {
  margin-top: 4px;
}

/* readings: small font for note points */
.readings-notes-content,
.readings-notes-content ul,
.readings-notes-content li,
.readings-notes-content p {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #555 !important;
}

.readings-notes summary {
  font-size: 14px !important;
}

.readings-summary {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
}

.readings-fullnote-link {
  display: inline-block;
  font-size: 13px;
  color: #999;
  text-decoration: none;
  border-top: 1px dashed #eee;
  padding-top: 8px;
  width: 100%;
}

.readings-fullnote-link:hover {
  color: #4a7fa5;
}

/* Mobile: stack logo above nav links, center both */
@media screen and (max-width: 768px) {
  .nav {
    flex-direction: column;
    align-items: center;
    min-height: auto;
    padding: 12px 15px;
    gap: 8px;
  }

  .nav-links {
    margin: 0;
    padding: 0;
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
    display: flex;
    gap: 0 10px;
  }

  .nav-links li {
    margin: 0;
  }

  .content {
    padding: 0 20px;
    text-align: justify;
    hyphens: auto;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}
