:root {
  color: #17201d;
  background: #f4f7f4;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  border-bottom: 1px solid #dce5df;
  background: rgba(255, 255, 255, 0.92);
}

.header-content,
.page-shell,
.site-footer {
  width: min(100% - 32px, 960px);
  margin-inline: auto;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #17201d;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: #267157;
  font-size: 15px;
  letter-spacing: 0;
}

.header-description,
.site-footer p {
  margin: 0;
  color: #68766f;
  font-size: 13px;
}

.page-shell {
  padding-block: 30px 18px;
}

.category-nav {
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: thin;
}

.category-tabs {
  display: flex;
  width: max-content;
  gap: 8px;
}

.category-tab {
  border: 1px solid #d6e0da;
  border-radius: 999px;
  padding: 9px 15px;
  color: #53615b;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.category-tab:hover {
  border-color: #9db8ac;
  color: #25664f;
}

.category-tab[aria-selected="true"] {
  border-color: #267157;
  color: #fff;
  background: #267157;
}

.category-tab:focus-visible,
.source-link:focus-visible {
  outline: 3px solid #b8dace;
  outline-offset: 3px;
}

.feed-section {
  margin-top: 34px;
}

.feed-heading {
  display: flex;
  min-height: 52px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-label {
  margin: 0 0 6px;
  color: #267157;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  color: #17201d;
  font-size: clamp(25px, 5vw, 34px);
  letter-spacing: -0.055em;
}

.source-link {
  flex: 0 0 auto;
  color: #267157;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.feed-card {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #dce5df;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(39, 77, 63, 0.08);
}

.twitter-timeline {
  display: block;
}

.loading-state {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: #68766f;
  background: #fff;
  font-size: 14px;
}

.loading-state[hidden] {
  display: none;
}

.loading-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid #cfddd7;
  border-top-color: #267157;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.empty-state {
  display: grid;
  min-height: 560px;
  place-content: center;
  padding: 34px;
  text-align: center;
}

.empty-state h2 {
  margin: 0;
  color: #25332e;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.empty-state p {
  max-width: 520px;
  margin: 10px auto 0;
  color: #68766f;
  font-size: 14px;
  line-height: 1.65;
}

.site-footer {
  padding-block: 10px 28px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 639px) {
  .header-content,
  .page-shell,
  .site-footer {
    width: min(100% - 22px, 960px);
  }

  .header-content {
    min-height: 62px;
  }

  .header-description {
    display: none;
  }

  .page-shell {
    padding-top: 22px;
  }

  .feed-section {
    margin-top: 26px;
  }

  .feed-card,
  .empty-state {
    min-height: 560px;
    border-radius: 14px;
  }
}
