/* Augment, do not replace, the global stylesheet.
   Tighten spacing per user request (reduced paddings/margins). */

/* Page body layout */
.page-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;           /* tighter than before */
  padding: 0.75rem;    /* tighter than before */
  max-width: 980px;
  margin: 0 auto;
}

/* Headings */
.section-heading {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.25rem 0 0.5rem 0; /* minimal margins */
}

.subheading {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.75rem 0 0.5rem 0;
}

/* Paragraphs */
.styled-paragraph {
  font-size: 1rem;
  line-height: 1.55;   /* slightly tighter */
  margin: 0.25rem 0 0.5rem 0;
  color: #1b1b1b;
}

/* Lists */
.styled-list {
  margin: 0.25rem 0 0.5rem 1.25rem; /* compact */
  line-height: 1.5;
}

/* Carded grid for quarter sections (flex-based, responsive) */
.article-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;        /* compact gaps */
}

.article-card {
  flex: 1 1 360px;     /* two columns on desktop, single on mobile */
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  padding: 0.75rem;    /* compact padding */
  background: #fff;
}

.card-heading {
  font-size: 1.05rem;
  margin: 0 0 0.35rem 0;
  font-weight: 600;
}

/* Compact summary "table" using flex; intentionally narrow for mobile compatibility */
.summary-table {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  overflow: hidden;
}

.summary-row {
  display: flex;
  flex-direction: row;
  border-top: 1px solid #f0f0f0;
}

.summary-row:first-child {
  border-top: none;
}

.summary-header {
  background: #fafafa;
}

.summary-cell {
  flex: 1 1 50%;
  padding: 0.6rem;     /* compact padding */
  border-right: 1px solid #f0f0f0;
}

.summary-cell:last-child {
  border-right: none;
}

/* Flex "table" used earlier sections */
.flex-table {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  overflow: hidden;
}

.flex-row {
  display: flex;
  flex-direction: row;
  border-top: 1px solid #f0f0f0;
}

.flex-row:first-child { border-top: none; }

.header-row {
  background: #fafafa;
  font-weight: 600;
}

.flex-cell {
  flex: 1 1 50%;
  padding: 0.6rem;     /* compact */
  border-right: 1px solid #f0f0f0;
}

.flex-cell:last-child {
  border-right: none;
}

/* Navigation and logo tweaks that harmonize with the global sheet without overriding it */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.logo {
  width: 38px;
  height: auto;
}

/* Keep topnav concise; allow global styles to lead */
.topnav-container ul {
  display: flex;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

/* Hamburger only on small screens */
.hamburger-menu {
  display: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Mobile menu (minimal) */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  background: #fff;
  width: 80%;
  max-width: 320px;
  height: 100%;
  box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  padding: 0.75rem;    /* compact */
}

.mobile-menu-header {
  display: flex;
  justify-content: flex-end;
}

.close-menu {
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
}

.mobile-menu li {
  margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .topnav-container { display: none; }
  .hamburger-menu { display: block; }
  .summary-row, .flex-row { flex-direction: column; }
  .summary-cell, .flex-cell { border-right: none; border-top: 1px solid #f0f0f0; }
  .summary-cell:first-child, .flex-cell:first-child { border-top: none; }
}
