/* Final shell refinements: mobile navigation, content pages, footer and card affordances. */

/* Story cards should feel clickable as complete units. */
.top100-story-card {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.top100-story-card:hover,
.top100-story-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(16,185,129,.42);
  box-shadow: 0 16px 34px rgba(11,31,59,.10);
}

/* Give story cards a little more breathing room between title, byline and excerpt. */
.top100-story-title { margin-bottom: 10px; }
.top100-story-byline {
  display: block;
  margin: 0 0 14px;
  line-height: 1.4;
}
.top100-story-summary { margin-top: 0; }

/* Make post categories readable and visually consistent with the homepage chips. */
.page-content ul.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  opacity: 1;
  color: var(--top100-muted);
}
.page-content ul.post-tags::before {
  margin-right: 2px;
  color: var(--top100-muted);
}
.page-content ul.post-tags li {
  margin: 0;
}
.page-content ul.post-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 0;
  border-radius: 999px;
  color: #08755c;
  background: rgba(16,185,129,.11);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.page-content ul.post-tags a:hover {
  color: #052b22;
  background: var(--top100-emerald);
}

/* Make the archive CTA an intentional destination, not an afterthought. */
.top100-story-pagination .button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(16,185,129,.45);
  border-radius: 12px;
  color: var(--top100-white);
  background: var(--top100-navy);
  text-decoration: none;
  font-weight: 800;
}
.top100-story-pagination .button:hover {
  color: #052b22;
  background: var(--top100-emerald);
  border-color: var(--top100-emerald);
}

/* Give static pages a deliberate editorial treatment. */
.page-content .page {
  max-width: 820px;
  margin: 42px auto 60px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--top100-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(11,31,59,.06);
}
.page-content .page > .post-title {
  margin: 0 0 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--top100-border);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.page-content .page .post-content {
  font-size: 17px;
  line-height: 1.7;
}
.page-content .page .post-content h1,
.page-content .page .post-content h2,
.page-content .page .post-content h3 {
  margin-top: 1.7em;
  margin-bottom: .65em;
  line-height: 1.12;
  letter-spacing: -.025em;
}
.page-content .page .post-content h1 { font-size: clamp(28px, 4vw, 40px); }
.page-content .page .post-content h2 { font-size: clamp(24px, 3.2vw, 32px); }
.page-content .page .post-content h3 { font-size: clamp(20px, 2.6vw, 26px); }
.page-content .post-content a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.page-content .page .post-content img { border-radius: 16px; }

/* Footer: make it part of the Top 100 shell rather than disappearing into Sumo. */
.site-footer {
  margin-top: 56px;
  padding: 30px 0 24px;
  color: #AAB6C3;
  background: #071526;
  border-top: 1px solid rgba(203,213,225,.12);
}
.site-footer .wrapper {
  max-width: 1120px;
  padding-left: clamp(20px, 5vw, 54px);
  padding-right: clamp(20px, 5vw, 54px);
}
.top100-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 18px;
}
.top100-footer-brand {
  color: var(--top100-white);
  font-weight: 850;
  letter-spacing: -.03em;
}
.top100-footer-brand span { color: var(--top100-emerald); }
.top100-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.top100-footer-links a,
.site-footer .attribution a { color: #CBD5E1; }
.top100-footer-links a:hover,
.site-footer .attribution a:hover { color: var(--top100-emerald); }
.site-footer .attribution {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(203,213,225,.10);
  color: #7F8FA3;
  font-size: 11px;
}

@media (prefers-color-scheme: dark) {
  body,
  .page-content .wrapper,
  .page-content .page,
  .page-content .page .post-content,
  .page-content .page .post-content p,
  .page-content .page .post-content li,
  .page-content .page .post-content strong,
  .page-content .page .post-content em {
    color: #E6EDF5;
  }

  .page-content .page {
    background: #0D223A;
    border-color: rgba(203,213,225,.14);
    box-shadow: none;
  }
  .page-content .page > .post-title {
    color: #F8FAFC;
    border-bottom-color: rgba(203,213,225,.16);
  }
  .page-content .page .post-content h1,
  .page-content .page .post-content h2,
  .page-content .page .post-content h3 { color: #F8FAFC; }

  /* Blog posts and static pages share post-content, so make all editorial links
     readable against the dark Sumo background instead of only links inside .page. */
  .page-content .post-content a,
  .page-content article a {
    color: #7DD3FC;
    text-decoration-color: rgba(125,211,252,.55);
  }
  .page-content .post-content a:hover,
  .page-content article a:hover {
    color: var(--top100-emerald);
    text-decoration-color: var(--top100-emerald);
  }
  .page-content .page .post-content code {
    color: #E2E8F0;
    background: #17314D;
  }

  .page-content ul.post-tags,
  .page-content ul.post-tags::before {
    color: #AAB6C3;
  }
  .page-content ul.post-tags a {
    color: #5EE6BD;
    background: rgba(16,185,129,.15);
  }
  .page-content ul.post-tags a:hover {
    color: #052b22;
    background: var(--top100-emerald);
  }

  .top100-story-card {
    background: #0D223A;
    border-color: rgba(203,213,225,.14);
  }
  .top100-story-title a { color: #F8FAFC; }
  .top100-story-byline,
  .top100-story-summary,
  .top100-story-meta .post-date { color: #C7D2E0; }
  .top100-story-category {
    color: #5EE6BD;
    background: rgba(16,185,129,.15);
  }
  .top100-story-link { color: #34D399; }

  .top100-ecosystem-card {
    background: #0D223A;
    border-color: rgba(203,213,225,.14);
  }
  .top100-ecosystem-card strong { color: #F8FAFC; }
  .top100-ecosystem-card > span:last-child { color: #C7D2E0; }

  .site-footer,
  .site-footer .wrapper,
  .top100-footer-links a { color: #C7D2E0; }
}

@media (max-width: 620px) {
  .site-header {
    padding-left: 0;
    padding-right: 0;
  }
  .top100-brand-lockup {
    margin-left: 18px;
    margin-right: 18px;
  }
  .top100-global-nav {
    gap: 8px;
    overflow: hidden;
  }
  .top100-global-nav ul {
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 7px;
    padding: 0 18px 7px;
    scroll-padding-inline: 18px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .top100-global-nav ul::-webkit-scrollbar { display: none; }
  .top100-global-nav li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .top100-global-nav a {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
  }
  .top100-utility-nav a {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 600;
    opacity: .9;
  }
  .top100-utility-nav .top100-write-link { opacity: 1; }
  .top100-ecosystem-nav::after,
  .top100-utility-nav::after {
    content: "";
    flex: 0 0 11px;
  }

  .top100-story-card { padding: 20px 18px; }
  .top100-story-title { margin-bottom: 12px; }
  .top100-story-byline {
    margin-bottom: 16px;
    line-height: 1.45;
  }
  .top100-story-summary { line-height: 1.6; }
  .top100-story-link { margin-top: 20px; }

  .page-content .page {
    margin: 24px 0 38px;
    padding: 22px 18px 28px;
    border-radius: 18px;
  }
  .page-content .page .post-content {
    font-size: 16px;
    line-height: 1.65;
  }

  .site-footer {
    margin-top: 38px;
    padding-top: 24px;
  }
  .top100-footer-inner {
    display: grid;
    gap: 12px;
  }
  .top100-footer-links {
    gap: 7px 13px;
    font-size: 12px;
  }
}
