@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --sb-primary: #2E65DC;
  --sb-primary-light: #4F7DE3;
  --sb-text: #F8F6F2;
  --sb-bg: #F8F6F2;
  --sb-border: #E6E8EB;
  --sb-radius: 6px;
  --sb-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  --page-bg: #254E70;
  --sb-text-secondary: #465562;
}

/* 2) Card wrapper around all content */
.container {
  margin: 40px auto;            /* give some breathing room from edges */
  padding: 20px 50px;
  background: none;
  box-shadow: none;
}

/* 3) Logo centering & sizing */
.logo {
  display: block;
  margin: 30px auto 20px;  /* center + space below */
  max-width: 200px;
  height: auto;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--sb-text);
  background-color: var(--page-bg);
  line-height:1.6em;
}

h1, h2, h3 {
  font-weight: 600;
  margin: 1em 0 0 0;
  color: var(--sb-text);
}

h1 { font-size: 3rem; }
h2 { font-size: 1.5rem; }
h3 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0.3em 0 0.4em;
  color: var(--page-bg);
}

a {
  color: var(--sb-primary);
  transition: color 0.2s;
}

a:hover {
  color: #fff;
  background: var(--sb-primary);
}

.article {
  position: relative;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  padding: 1.2rem;
  padding-top:1rem;
  margin: 0 auto 1.5rem;
  max-width: 580px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  display: block;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 44px;
  margin-bottom: 6px;
}

.topic-tag {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--sb-text-secondary);
  background-color: var(--sb-bg);
  border-radius: 99px;
  max-width: fit-content;
  border: 1px solid #ccc;
  line-height: normal;
  margin-bottom: 0.2rem;
  margin-top: 0;
}

/* Importance line as plain text */
.importance-line {
  font-weight: 500;
  font-size: 17px;
  color: var(--page-bg);
  display: inline-block;
  margin: 0 0.5em 0 0;
  max-width: calc(100% - 60px);
}

/* Toggle summary button - cleaner appearance */
.toggle-summary-btn {
  position: absolute;
  top: 88px;
  right: 16px;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--sb-primary);
  background-color: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  padding: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  box-sizing: border-box;
}

.toggle-summary-btn:hover,
.toggle-summary-btn:focus-visible {
  background-color: #F8CF3E;
  color: #000;
  border-color: #333;
  text-decoration: none;
}

.toggle-summary-btn:focus-visible {
  outline: 2px solid #333 !important;
  outline-offset: 3px;
  border-radius: 99px;
  background-clip: padding-box;
}

/* Summary text - spacing and subtle separator */
.summary-text {
  margin-top: 0.2em;
  padding-top: 0.2em;
  border-top: 1px solid var(--page-bg);
  line-height: 1.6;
  color: var(--sb-text-secondary);
  margin-bottom: 0.2em;
}


/* Article-level date: for use inside articles (dark-on-light) */
.article-date {
  font-size: 0.8rem;
  color: #555;
  font-weight: 400;
  line-height: 44px;
}

/* Global header date: for use on dark backgrounds */
.update-date {
  font-size: 0.8rem;
  color: var(--sb-text);
  font-weight: 400;
}

.no-results {
  text-align: center;
  margin: 40px 0;
  color: var(--sb-text-secondary);
  font-style: italic;
}

.subtitle {
  color: var(--sb-bg);
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.2em;
}

.footer {
    text-align: center;
    padding: 0;
    font-size: 0.9em;
    color: var(--sb-border);
}

.footer a {
    color: var(--sb-border);
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }
  .topics-wrapper {
    padding: 0 15px;
  }
}

/* Topic Filters */
.topic-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sb-border);
    justify-content: flex-start;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.filter-btn {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sb-text-secondary);
  background-color: white;
  border: 1px solid var(--sb-text-secondary);
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0.4em 1.1em;
  height: 36px;
  line-height: 1;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  z-index: 0;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: -6.5px;
  bottom: -6.5px;
  left: -6px;
  right: -6px;
  z-index: -1;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  outline: 2px solid #F8CF3E;
  outline-offset: 3px;
  background-color: #F8CF3E;
  color: #000;
  box-shadow: 0 0 0 3px rgba(248, 207, 62, 0.3);
  border-color: #F8CF3E;
}

.filter-btn.active {
  background-color: var(--sb-primary);
  color: #fff;
  border-color: var(--sb-primary);
  height: 36px;
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.chevron {
  width: 0.75rem;
  height: 0.75rem;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg) translateY(-1.5px);
  transition: transform 0.2s ease;
  margin: 0;
  display: inline-block;
}

.toggle-summary-btn[aria-expanded="true"] .chevron {
  transform: rotate(45deg);
}

.article-footer {
  display: flex;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.topics-wrapper {
  max-width: 580px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-header {
  max-width: 580px;
  margin: 0 auto;
  padding: 0;
}

:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
  background-color: #F8CF3E;
  color: #000;
}

.read-more {
  display: inline-block;
  padding: 0.2em 0.4em;
  line-height: 1.2;
  text-decoration: underline;
  border-radius: 4px;
  margin-top: 0;
}

.read-more:focus-visible {
  outline: 2px solid #333;
  outline-offset: 3px;
  background-color: #F8CF3E;
  color: #000;
}

.read-more:hover {
  text-decoration: underline;
  background-color: #F8CF3E;
  color: #000;
}
.article-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5em;
}

.article-header h3 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--page-bg);
  flex: 1;
  max-width: calc(100% - 60px);
}