/* Blog index and blog posts (everythingle.com/blog/) */
.blog-page {
  --ink: #1e2a44;
  --head: #12204a;
  --muted: #5b6785;
  --line: #e6ebf3;
  --soft: #f5f8fd;
  --link: #1d4ed8;
  --green: #43a047;
  --yellow: #f2b705;
  --grey: #7b8494;
}

.blog-page main {
  flex: 1;
  padding: clamp(10px, 1.9vw, 38px) var(--page-pad) var(--gap);
}

/* ---------- the white card that holds a post or the index ---------- */
/* The card grows with the screen, from 820px on small laptops to 1100px on big desktops.
   The type grows a little with it (16.5px to 18.5px), so lines stay a comfortable length
   (about 75-87 characters). Sizes inside the card are in em, so they scale along. */
.post,
.blog-index {
  max-width: clamp(820px, 70vw, 1100px);
  margin: 0 auto;
  padding: clamp(22px, 3.5vw, 56px) clamp(18px, 4.6vw, 84px) clamp(28px, 4vw, 60px);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(70, 100, 150, 0.12);
  color: var(--ink);
  font-size: clamp(16.5px, calc(13.4px + 0.32vw), 18.5px);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.blog-page a { color: var(--link); text-underline-offset: 3px; }
.blog-page a:hover { color: #0b2f8a; }

.crumbs { font-size: 0.82em; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; }

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f6b3a;
  background: #e8f7ec;
  border-radius: 999px;
  padding: 4px 12px;
}

.post h1,
.blog-index h1 {
  margin-top: 12px;
  font: 700 clamp(30px, 4.2vw, 46px)/1.12 "Fredoka", "Montserrat", system-ui, sans-serif;
  color: var(--head);
  letter-spacing: -0.01em;
}

.dek { margin-top: 14px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: #3c4866; }

.byline { margin-top: 14px; font-size: 0.82em; color: var(--muted); }
.byline a { color: var(--muted); font-weight: 600; }

/* ---------- hero ---------- */
.hero { margin: 26px calc(-1 * clamp(8px, 2vw, 28px)) 0; }
.hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(10px, 1.2vw, 18px);
  background: #e0f9ff;
}

/* ---------- body text ---------- */
.post h2 {
  margin-top: 2.1em;
  font: 700 clamp(23px, 2.4vw, 30px)/1.25 "Fredoka", "Montserrat", system-ui, sans-serif;
  color: var(--head);
  scroll-margin-top: 16px;
}
.post h3 {
  margin-top: 1.5em;
  font-size: 1.07em;
  font-weight: 700;
  line-height: 1.4;
  color: var(--head);
}
.post p, .post ul, .post ol { margin-top: 0.9em; }
/* on wide screens, keep lines of text near 85 characters (44em in Montserrat);
   the hero, screenshots, table and fact cards still use the card's full width */
.post p,
.post ul:not(.glance),
.post ol,
.blog-index p { max-width: 44em; }
.post ul, .post ol { padding-left: 1.3em; }
.post li + li { margin-top: 0.45em; }
.post strong { color: #111a33; }

/* ranked headings: the number sits in a letter tile */
.post h2.rank { display: flex; align-items: flex-start; gap: 14px; }
.rank-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.55em;
  height: 1.55em;
  margin-top: -0.1em;
  border-radius: 0.28em;
  color: #fff;
  font-size: 1.05em;
  box-shadow: inset 0 -0.12em 0 rgba(0, 0, 0, 0.18);
}
.rank-1 .rank-tile, .rank-4 .rank-tile { background: var(--green); }
.rank-2 .rank-tile, .rank-5 .rank-tile { background: var(--yellow); }
.rank-3 .rank-tile { background: var(--grey); }
.rank-best { display: block; font-size: 0.62em; font-weight: 600; color: var(--muted); font-family: "Montserrat", system-ui, sans-serif; margin-top: 4px; }

.site-link { margin-top: 0.4em; font-size: 0.88em; }
.site-link a { font-weight: 600; }

/* ---------- the same three facts for every site ---------- */
.post ul.glance {
  list-style: none;
  padding: 0;
  margin-top: 1.1em;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.post ul.glance li {
  margin: 0;
  padding: clamp(11px, 1.1vw, 15px) clamp(13px, 1.3vw, 18px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  font-size: 0.88em;
  line-height: 1.5;
}
.post ul.glance li strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.post ul.glance.best li { background: #eefaf0; border-color: #c9ebcf; }
.post ul.glance.best li strong { color: #0f6b3a; }

/* ---------- callouts ---------- */
.takeaways {
  margin-top: 1.6em;
  padding: clamp(16px, 1.8vw, 24px) clamp(18px, 2.2vw, 30px);
  border-radius: 14px;
}
.takeaways { background: #eefaf0; border: 1px solid #c9ebcf; }
.takeaways h2 {
  margin: 0;
  font: 800 13px/1.4 "Montserrat", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f6b3a;
}
.takeaways ul { margin-top: 10px; }

/* ---------- on this page ---------- */
.toc {
  margin-top: 1.6em;
  padding: clamp(14px, 1.6vw, 22px) clamp(18px, 2.2vw, 30px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  font-size: 0.9em;
}
.toc h2 { margin: 0; font: 800 13px/1.4 "Montserrat", system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin-top: 8px; padding-left: 1.3em; columns: 2 220px; column-gap: 28px; }
.toc li { break-inside: avoid; }
.toc li + li { margin-top: 0.3em; }

/* ---------- figures ---------- */
.shot { margin-top: 1.3em; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(70, 100, 150, 0.12);
  background: var(--soft);
}
.shot figcaption { margin-top: 8px; font-size: 0.82em; color: var(--muted); line-height: 1.5; }

/* ---------- comparison table ---------- */
.table-wrap {
  margin-top: 1.2em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.table-wrap:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.post table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: max(14px, 0.82em); line-height: 1.45; }
/* narrow screens: keep columns readable and let the table scroll sideways inside its box */
@media (max-width: 760px) { .post table { min-width: 820px; } }
/* keep the site name in view while the table is swiped sideways on phones */
.post thead th:first-child,
.post tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}
.post thead th:first-child { background: var(--soft); }
.post tbody tr:first-child th { background: #f3fbf4; }
.post th, .post td { padding: 11px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.post thead th { background: var(--soft); color: var(--head); font-weight: 700; }
.post tbody tr:last-child td, .post tbody tr:last-child th { border-bottom: 0; }
.post tbody th { font-weight: 700; color: var(--head); white-space: nowrap; }
.post tbody tr:first-child { background: #f3fbf4; }
.table-note { margin-top: 8px; font-size: 0.82em; color: var(--muted); }

/* ---------- calls to action ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2em; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--head);
  color: #fff !important;
  font-weight: 700;
  font-size: max(15px, 0.86em);
  text-decoration: none;
  box-shadow: 0 4px 0 #0b1433;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #0b1433; }
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 #0b1433; }
.cta.alt { background: #fff; color: var(--head) !important; border: 2px solid var(--head); box-shadow: 0 4px 0 #c9d3e8; }
.cta img { width: 26px; height: 26px; border-radius: 6px; }

/* ---------- about + sources ---------- */
.post-about {
  margin-top: 2.4em;
  padding: clamp(18px, 2vw, 26px) clamp(18px, 2.2vw, 30px);
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 0.9em;
  line-height: 1.6;
}
.post-about h2 { margin-top: 0; font-size: 1.3em; }
.sources { font-size: 0.85em; line-height: 1.6; color: #3c4866; }
.sources li { overflow-wrap: anywhere; }

/* ---------- blog index ---------- */
.blog-index .intro { margin-top: 12px; font-size: 1.06em; color: #3c4866; }
.post-list { list-style: none; padding: 0; margin-top: 28px; }
.post-card {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: center;
  padding: clamp(14px, 1.6vw, 22px);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.post-card:hover { box-shadow: 0 8px 22px rgba(70, 100, 150, 0.16); transform: translateY(-2px); }
.post-card img { display: block; width: 100%; height: auto; border-radius: 10px; background: #e0f9ff; }
.post-card h2 { margin-top: 8px; font: 700 clamp(21px, 2.2vw, 26px)/1.25 "Fredoka", "Montserrat", system-ui, sans-serif; }
.post-card h2 a { color: var(--head); text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card p { margin-top: 8px; font-size: 0.92em; line-height: 1.6; color: #3c4866; }
.post-card .meta { font-size: 0.8em; color: var(--muted); }
.blog-index .more { margin-top: 26px; font-size: 0.92em; color: var(--muted); }

/* tablets and small windows: the three facts stack once three columns get too narrow */
@media (max-width: 900px) {
  .post ul.glance { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 640px) {
  .post, .blog-index { font-size: 16.5px; }
  .post-card { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .post h2.rank { gap: 10px; }
  .hero { margin-left: 0; margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cta, .post-card { transition: none; }
}
