:root {
  /* Category colour palette – tweak at will */
  --c-topstories: #1f3d7a;
  --c-productlaunch: #1e8449;
  --c-research: #2874a6;
  --c-policy: #c0392b;
  --c-people: #7d3c98;
  --c-tools: #e67e22;
  --c-border: #c5c5c5;
  --c-link: #0040c0;
  --c-background: #ffffff;
  --c-text: #333333;
  --c-text-secondary: #666666;
  --c-highlight-bg: #f8f8ff;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body { 
  font-family: "Inter Tight", "IBM Plex Sans Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  max-width: 1200px;
  margin: auto; 
  background: var(--c-background);
  color: var(--c-text);
  padding: 0 15px; 
}

a { 
  color: var(--c-link);
  text-decoration: none; 
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover { 
  text-decoration: underline;
  color: #002d8c;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin: 0 0 0.6em 0;
  line-height: 1.3;
  color: #222;
}

h1 {
  font-size: 24px;
  font-weight: 700;
}

h2 {
  font-size: 20px;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
}

/* Header styling */
.header { 
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 12px;
}

.siteTitle { 
  font-size: 22px;
  font-weight: 700;
}

.siteSubtitle {
  font-size: 14px;
  color: var(--c-text-secondary);
  margin-top: 4px;
}

.main-nav {
  font-size: 14px;
}

.main-nav a {
  margin: 0 6px;
  padding: 3px 2px;
}

.main-nav a.active {
  font-weight: 600;
  border-bottom: 2px solid var(--c-link);
}

.lastUpdate { 
  font-size: 13px;
  color: var(--c-text-secondary);
  margin-top: 10px;
}

/* Category headers */
.categoryHeader { 
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 0;
  margin: 15px 0 8px 0;
  background: #f5f5f5;
  text-align: center;
  color: #000;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

/* News rows - remove the left borders */
.newsRow { 
  padding: 8px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.newsRow:hover {
  background: #fafafa;
}

/* Recent news styling - keep ONLY the red left border */
.recentNews { 
  border-left: 3px solid #f00;
  padding-left: 10px;
  background-color: var(--c-highlight-bg);
}

/* News title */
.newsTitle { 
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.4;
}

/* Source count - make more subtle */
.sourceCount { 
  vertical-align: super;
  font-size: 9px;
  color: #777;
  margin-left: 2px;
}

/* News description */
.newsDescription {
  font-size: 13px;
  color: #333;
  margin: 4px 0;
  line-height: 1.4;
}

/* Source list */
.sourceList { 
  font-size: 12px;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  text-transform: underline;
  gap: 4px;
}

.sourceList a { 
  color: var(--c-link);
  font-size: 13px;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.sourceList a:hover { 
  text-decoration: underline;
  background: lightgoldenrodyellow;
}

.timestamp {
  margin-left: auto;
  font-size: 10px;
  color: #777;
}

/* Recent indicator */
.veryRecent { 
  color: #f00; 
  font-weight: normal;
}

.veryRecent::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: #f00;
  border-radius: 50%;
  margin-right: 3px;
}

/* Layout structure - based on table */
.mainContent { 
  width: 100%; 
  table-layout: fixed; 
  border-collapse: collapse;
  border-spacing: 0;
}

/* Column sizing */
.col-1 {
  width: 36%;
  padding-right: 25px;
}

.col-2, .col-3 {
  width: 32%;
  padding-right: 25px;
}

.mainContent td:last-child {
  padding-right: 0;
}

td { 
  vertical-align: top; 
}

footer { 
  text-align: center;
  margin-top: 30px; 
  padding: 20px 10px; 
  border-top: 1px solid var(--c-border); 
  font-size: 13px; 
  color: var(--c-text-secondary); 
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Search container */
.search-container {
  padding: 8px;
  background: #f0f0f0;
  margin: 10px 0;
  display: flex;
  gap: 8px;
}

.search-box {
  flex: 1;
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #aaa;
  font-size: 13px;
  min-width: 0; /* Prevents input from overflowing */
}

.search-button, .search-clear-button {
  padding: 6px 12px;
  border: 1px solid #aaa;
  background: #e9e9e9;
  font-size: 13px;
  cursor: pointer;
}

.search-clear-button {
  background: none;
  border: none;
  color: var(--c-link);
}

.search-button:hover {
  background: #dcdcdc;
}

/* Search results */
.search-results { 
  background: #fff;
  border: 1px solid var(--c-border);
  margin: 10px 0;
  padding: 10px;
}

.search-results .newsRow {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.search-pagination {
  display: flex;
  gap: 5px;
  margin-top: 15px;
  justify-content: center;
}

.pagination-btn { 
  padding: 3px 6px;
  border: 1px solid #aaa;
  background: #e9e9e9;
  border-radius: 0;
  cursor: pointer;
}

.pagination-btn.active { 
  background: #dcdcdc;
  color: #000;
  border-color: #aaa;
}

/* Different styling for different news row types */
.newsRow-withDesc {
  margin-bottom: 10px;
}

.newsRow-compact {
  margin-bottom: 6px;
}

.newsRow-compact .newsTitle {
  font-size: 14px;
  margin-bottom: 2px;
}

.newsRow-compact .sourceList {
  font-size: 10px;
}

.newsRow .newsRow-compact .recentNews {
  border-left: 3px solid #f00;
  padding-left: 10px;
  background-color: var(--c-highlight-bg);
}

/* Enhanced content page styling */
.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 32px;
  background-color: #fff;
  line-height: 1.6;
  font-size: 15px;
}

.page-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--c-border);
  text-align: center;
}

.page-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.meta-info {
  color: var(--c-text-secondary);
  font-size: 14px;
}

.page-section {
  margin-bottom: 30px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.lead-text {
  font-size: 18px;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.5;
  font-weight: 500;
}

p {
  margin-bottom: 1em;
}

.highlight-box {
  background-color: #f5f8ff;
  border-left: 4px solid var(--c-topstories);
  padding: 20px;
  margin: 30px 0;
  border-radius: 3px;
}

.privacy-highlight {
  background-color: #f5fff8;
  border-left: 4px solid var(--c-productlaunch);
}

.feature-section, .why-section, .collection-section, .contact-info {
  padding: 0 10px;
}

.feature-list, .privacy-list, .info-list {
  margin: 15px 0 20px;
  padding-left: 0;
  list-style: none;
}

.feature-list li, .privacy-list li, .info-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--c-topstories);
  font-weight: bold;
}

.privacy-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--c-productlaunch);
  font-weight: bold;
}

.info-list li:before {
  content: "•";
  position: absolute;
  left: 8px;
  color: #555;
  font-weight: bold;
}

.contact-section {
  background-color: #f5f5f5;
  padding: 25px;
  text-align: center;
  border-radius: 3px;
  margin-top: 40px;
}

.contact-section h2 {
  margin-top: 0;
}

.contact-section a {
  font-weight: 600;
}

/* Mobile responsive layout */
@media (max-width: 768px) {
  .mainContent { 
    display: block; 
    border-spacing: 0; 
  }
  
  .mainContent td,
  .col-1, .col-2, .col-3 { 
    display: block; 
    width: 100% !important; 
    margin-bottom: 20px; 
    padding: 0 0 20px 0; 
    border-right: none;
    border-bottom: 1px solid var(--c-border);
  }
  
  .mainContent td:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }
  
  /* Adjust header for mobile */
  .header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding-bottom: 14px;
  }
  
  /* Adjust search container for mobile */
  .search-container {
    flex-direction: column;
  }
  
  .search-box {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  
  .search-input {
    flex: 1;
    min-width: 0;
  }
  
  /* Adjust news rows for mobile */
  .newsRow {
    padding: 12px 0;
  }
  
  .sourceList {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .content-container {
    padding: 16px;
  }
  
  /* Adjust font sizes for mobile */
  .siteTitle {
    font-size: 20px;
  }
  
  .newsTitle {
    font-size: 15px;
  }
  
  /* Fix recentNews styling on mobile */
  .recentNews {
    margin-left: 0;
    padding-left: 10px;
  }
  
  .page-header h1 {
    font-size: 24px;
  }
  
  .lead-text {
    font-size: 16px;
  }
  
  .highlight-box {
    padding: 15px;
  }
}