/* Blog index (/blog/) and blog articles (/blog/<slug>/).
   Layout ported from 21st.dev components by 7ovr: "Filterable Blog Index" (blog-3) for the index,
   "Article With Author Sidebar" (article-5) for the article, "Feature Comparison Table"
   (comparison-3) for the app table. Colours and type follow STYLES.md. */

.posts,
.post{
  --ink:#0b0d10;
  --ink-2:#53606f;
  --ink-3:#7a8594;
  --line:#e6e9ee;
  --soft:#f6f8fb;
  --accent:#2a68cc;
  --pick:#f1f6ff;
  --pick-line:#cfe0fb;
  --display:"AsideDisplay", "AsideDisplay Fallback", "Arial", sans-serif;
  --body:"AsideGeist", "AsideGeist Fallback", "Geist", system-ui, sans-serif;
  box-sizing:border-box;
  width:100%;
  color:var(--ink);
  font-family:var(--body);
}

/* Both pages sit inside the homepage's .site-rail, so the rail lines line up with the logo and the
   Download button in the shared header. */
.posts-block{ padding:clamp(36px, 4.4vw, 60px) clamp(20px, 3.4vw, 56px); }
.posts-block:last-child{ padding-bottom:clamp(64px, 8vw, 104px); }
.post{ padding:clamp(40px, 5vw, 64px) clamp(20px, 3.4vw, 56px) clamp(64px, 8vw, 104px); }

.posts *,
.post *{ box-sizing:border-box; }

.posts a,
.post a{ color:inherit; }

.posts-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:5px 12px 5px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--ink);
  font-size:.82rem;
  font-weight:560;
}

.posts-head{
  display:grid;
  grid-template-columns:minmax(0, 1.15fr) minmax(0, 1fr);
  gap:24px clamp(32px, 5vw, 80px);
  align-items:end;
}

.posts-head h1{
  margin:18px 0 0;
  font-family:var(--display);
  font-size:clamp(2.5rem, 5.4vw, 4.4rem);
  font-weight:400;
  line-height:.98;
  letter-spacing:-.01em;
}

.posts-lede{
  max-width:52ch;
  margin:0;
  color:var(--ink-2);
  font-size:clamp(1rem, 1.3vw, 1.12rem);
  line-height:1.55;
}

/* Hero article */
.posts-hero{
  display:grid;
  grid-template-columns:minmax(0, 1.25fr) minmax(0, 1fr);
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:24px;
  background:#fff;
  box-shadow:0 1px 2px rgba(15, 23, 42, .04), 0 18px 48px rgba(15, 40, 80, .06);
}

.posts-hero__media,
.posts-card__media{
  position:relative;
  display:block;
  overflow:hidden;
  background:#dcebf7;
}

.posts-hero__media img,
.posts-card__media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s cubic-bezier(.2, .7, .2, 1);
}

.posts-hero:hover .posts-hero__media img,
.posts-card:hover .posts-card__media img{ transform:scale(1.025); }

.posts-hero__body{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  padding:clamp(24px, 3.4vw, 44px);
}

.posts-hero__body h2{
  margin:16px 0 0;
  font-family:var(--display);
  font-size:clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight:400;
  line-height:1.04;
}

.posts-hero__body h2 a,
.posts-card__body h2 a{ text-decoration:none; }

.posts-hero__body > p{
  margin:14px 0 0;
  color:var(--ink-2);
  line-height:1.55;
}

.posts-apps{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:20px;
}

.posts-apps img{
  width:28px;
  height:28px;
}

.posts-apps span{
  margin-left:6px;
  color:var(--ink-3);
  font-size:.85rem;
}

.posts-meta{
  margin:14px 0 0;
  color:var(--ink-3);
  font-size:.85rem;
}

.posts-hero .posts-meta{ margin-top:10px; }

.posts-button{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:22px;
  padding:11px 18px;
  border-radius:999px;
  background:#0b0d10;
  color:#fff !important;
  font-size:.92rem;
  font-weight:600;
  text-decoration:none;
  transition:background .2s ease, transform .2s ease;
}

.posts-button:hover{ background:#23272e; }
.posts-button:active{ transform:scale(.98); }

.posts-badge{
  position:absolute;
  top:12px;
  right:12px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(255, 255, 255, .88);
  color:var(--ink);
  font-size:.75rem;
  font-weight:600;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.posts-pill{
  display:inline-flex;
  align-items:center;
  padding:3px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--ink-2);
  font-size:.75rem;
  font-weight:600;
  letter-spacing:.01em;
}

.posts-pill--dark{
  border-color:#0b0d10;
  background:#0b0d10;
  color:#fff;
}

/* Filters */
.posts-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.posts-filters[hidden]{ display:none; }

.posts-filters button{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--ink-2);
  font:inherit;
  font-size:.86rem;
  font-weight:560;
  cursor:pointer;
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}

.posts-filters button span{
  color:var(--ink-3);
  font-size:.78rem;
}

.posts-filters button:hover{ border-color:#c9ced6; color:var(--ink); }

.posts-filters button.is-active{
  border-color:#0b0d10;
  background:#0b0d10;
  color:#fff;
}

.posts-filters button.is-active span{ color:rgba(255, 255, 255, .7); }

.posts-filters button:focus-visible,
.posts-button:focus-visible,
.post a:focus-visible,
.posts a:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
}

/* Grid */
.posts-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:clamp(18px, 2.2vw, 28px);
  margin-top:24px;
}

.posts-card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  transition:box-shadow .3s ease, transform .3s ease;
}

.posts-card[hidden]{ display:none; }

.posts-card:hover{
  box-shadow:0 18px 40px rgba(15, 40, 80, .08);
  transform:translateY(-2px);
}

.posts-card__media{ aspect-ratio:16 / 9; }

.posts-card__body{
  display:flex;
  flex:1;
  flex-direction:column;
  align-items:flex-start;
  padding:18px 20px 20px;
}

.posts-card__body h2{
  margin:12px 0 0;
  font-family:var(--display);
  font-size:1.3rem;
  font-weight:400;
  line-height:1.12;
}

.posts-card__body > p:not(.posts-meta){
  display:-webkit-box;
  margin:10px 0 0;
  overflow:hidden;
  color:var(--ink-2);
  font-size:.93rem;
  line-height:1.5;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
}

.posts-card__body .posts-meta{ margin-top:auto; padding-top:14px; }

/* Article */
.post-layout{
  display:grid;
  grid-template-columns:minmax(0, 760px) 280px;
  gap:clamp(40px, 5vw, 72px);
  justify-content:center;
  align-items:start;
}

.post-crumbs{
  display:flex;
  gap:8px;
  color:var(--ink-3);
  font-size:.86rem;
}

.post-crumbs a{ color:var(--accent); text-decoration:none; }

.post-head h1{
  margin:16px 0 0;
  font-family:var(--display);
  font-size:clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight:400;
  line-height:1;
  letter-spacing:-.01em;
}

.post-lede{
  margin:18px 0 0;
  color:var(--ink-2);
  font-size:1.12rem;
  line-height:1.55;
}

.post-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:16px 0 0;
  color:var(--ink-3);
  font-size:.88rem;
}

.post-cover{
  margin:28px 0 0;
  overflow:hidden;
  border-radius:22px;
  background:#dcebf7;
  box-shadow:0 18px 48px rgba(15, 40, 80, .1);
}

.post-cover img{
  display:block;
  width:100%;
  height:auto;
}

.post-label{
  margin:0;
  color:var(--ink-3);
  font-size:.74rem;
  font-weight:650;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.post-answer{
  margin-top:32px;
  padding:22px 24px;
  border:1px solid var(--pick-line);
  border-radius:18px;
  background:var(--pick);
}

.post-answer .post-label{ color:var(--accent); }

.post-answer p:last-child{
  margin:10px 0 0;
  font-size:1.05rem;
  line-height:1.6;
}

.post-section{ margin-top:clamp(44px, 5vw, 60px); }

.post-section h2,
.post-cta h2,
.post-related h2,
.post-sources h2{
  margin:0;
  font-family:var(--display);
  font-size:clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight:400;
  line-height:1.08;
}

.post-section > p{
  margin:12px 0 0;
  color:var(--ink-2);
  line-height:1.65;
}

/* Comparison table */
.post-table{
  position:relative;
  margin-top:20px;
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}

.post-table table{
  width:100%;
  min-width:640px;
  border-collapse:collapse;
  font-size:.93rem;
}

.post-table thead th{
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  background:var(--soft);
  color:var(--ink-3);
  font-size:.74rem;
  font-weight:650;
  letter-spacing:.06em;
  text-align:left;
  text-transform:uppercase;
}

.post-table tbody th,
.post-table tbody td{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  vertical-align:middle;
  text-align:left;
}

.post-table tbody tr:last-child > *{ border-bottom:0; }

.post-table tbody td{ color:var(--ink-2); line-height:1.45; }

.post-table tr.is-pick > *{ background:var(--pick); }

.post-app{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:170px;
}

.post-app__icons{
  display:inline-flex;
  flex-shrink:0;
}

.post-app__icons img + img{ margin-left:-10px; }

.post-table .post-app__icons img{
  width:36px;
  height:36px;
}

.post-app__name{
  display:flex;
  flex-direction:column;
  gap:3px;
  color:var(--ink);
  font-weight:620;
}

.post-app__name em{
  width:max-content;
  padding:1px 8px;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  font-size:.68rem;
  font-style:normal;
  font-weight:650;
  letter-spacing:.02em;
}

.post-price{
  color:var(--ink) !important;
  font-weight:560;
  white-space:nowrap;
}

.post-price a,
.post-visit a{
  color:var(--accent);
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
}

.post-price a:hover,
.post-visit a:hover{ text-decoration:underline; }

.post-visit a.post-get{
  display:inline-flex;
  padding:7px 14px;
  border-radius:999px;
  background:#0b0d10;
  color:#fff;
  font-size:.84rem;
}

.post-visit a.post-get:hover{ background:#23272e; text-decoration:none; }

.post-visit{ text-align:right !important; }

.post-sr{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}

/* Quick picks */
.post-picks{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:20px;
}

.post-pick{
  padding:18px 20px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}

.post-pick.is-pick{
  border-color:var(--pick-line);
  background:var(--pick);
}

.post-pick img{
  display:block;
  width:44px;
  height:44px;
  margin-bottom:12px;
}

.post-pick h3{
  margin:6px 0 0;
  font-family:var(--display);
  font-size:1.35rem;
  font-weight:400;
}

.post-pick p:last-child{
  margin:8px 0 0;
  color:var(--ink-2);
  font-size:.93rem;
  line-height:1.5;
}

/* App cards */
.post-apps{
  display:grid;
  gap:14px;
  margin:20px 0 0;
  padding:0;
  list-style:none;
}

.post-appcard{
  padding:20px 22px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
}

.post-appcard.is-pick{
  border-color:var(--pick-line);
  background:linear-gradient(180deg, var(--pick), #fff 70%);
}

.post-appcard header{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  gap:16px;
  align-items:center;
}

.post-appcard header .post-app__icons img{
  width:56px;
  height:56px;
}

.post-appcard h3{
  margin:4px 0 0;
  font-family:var(--display);
  font-size:1.45rem;
  font-weight:400;
  line-height:1.1;
}

.post-appcard__best{
  margin:4px 0 0;
  color:var(--ink-2);
  font-size:.92rem;
}

.post-chip{
  padding:5px 11px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--ink);
  font-size:.8rem;
  font-weight:600;
  white-space:nowrap;
}

.post-appcard dl{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  margin:16px 0 0;
  padding-top:16px;
  border-top:1px dashed var(--line);
}

.post-appcard dt{
  color:var(--ink-3);
  font-size:.74rem;
  font-weight:650;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.post-appcard dd{
  margin:6px 0 0;
  color:var(--ink);
  font-size:.94rem;
  line-height:1.5;
}

.post-appcard__link{
  display:inline-flex;
  gap:6px;
  margin-top:14px;
  color:var(--accent) !important;
  font-size:.9rem;
  font-weight:600;
  text-decoration:none;
}

.post-appcard__link:hover{ text-decoration:underline; }

/* Prose */
.post-prose p,
.post-faq p{
  margin:12px 0 0;
  color:#29313b;
  font-size:1.03rem;
  line-height:1.72;
}

.post-prose ul{
  display:grid;
  gap:8px;
  margin:16px 0 0;
  padding:0;
  list-style:none;
}

.post-prose li{
  position:relative;
  padding-left:26px;
  color:#29313b;
  line-height:1.6;
}

.post-prose li::before{
  content:"";
  position:absolute;
  top:.62em;
  left:6px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--accent);
}

.post-faq > div{
  margin-top:18px;
  padding:18px 20px;
  border:1px solid var(--line);
  border-radius:16px;
}

.post-faq h3{
  margin:0;
  font-size:1.05rem;
  font-weight:650;
  line-height:1.4;
}

.post-faq > div p{ margin-top:8px; font-size:.98rem; }

/* CTA */
.post-cta{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 250px);
  gap:24px;
  align-items:center;
  margin-top:clamp(48px, 6vw, 72px);
  overflow:hidden;
  padding:clamp(24px, 3vw, 36px);
  border-radius:24px;
  background:linear-gradient(135deg, #eef6ff 0%, #f8fbff 60%, #eaf4ff 100%);
  border:1px solid var(--pick-line);
}

.post-cta h2{ margin-top:10px; }

.post-cta__copy > p:not(.post-label){
  margin:12px 0 0;
  color:var(--ink-2);
  line-height:1.6;
}

.post-cta__shot{
  width:100%;
  height:auto;
  border-radius:18px;
  box-shadow:0 18px 40px rgba(20, 60, 120, .18);
}

/* Sources and related */
.post-sources{ margin-top:48px; }

.post-sources h2{ font-size:1.2rem; }

.post-sources ul{
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  margin:12px 0 0;
  padding:0;
  list-style:none;
  font-size:.9rem;
}

.post-sources a{ color:var(--ink-2) !important; }

.post-related{ margin-top:56px; }

.post-related__grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
  margin-top:18px;
}

.post-related__grid a{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  padding:12px 12px 18px;
  border:1px solid var(--line);
  border-radius:18px;
  text-decoration:none;
  transition:box-shadow .3s ease;
}

.post-related__grid a:hover{ box-shadow:0 14px 32px rgba(15, 40, 80, .08); }

.post-related__grid img{
  width:100%;
  height:auto;
  border-radius:12px;
}

.post-related__grid .posts-pill{ margin-left:6px; }

.post-related__grid strong{
  padding:0 6px;
  font-family:var(--display);
  font-size:1.15rem;
  font-weight:400;
  line-height:1.2;
}

/* Rail */
.post-rail{ align-self:stretch; }

.post-rail__sticky{
  position:sticky;
  top:96px;
  display:grid;
  gap:16px;
}

.post-toc{
  display:grid;
  gap:2px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:18px;
}

.post-toc .post-label{ margin-bottom:8px; }

.post-toc a{
  padding:5px 8px;
  border-radius:8px;
  color:var(--ink-2) !important;
  font-size:.86rem;
  line-height:1.35;
  text-decoration:none;
}

.post-toc a:hover{
  background:var(--soft);
  color:var(--ink) !important;
}

.post-promo{
  padding:18px;
  border:1px solid var(--pick-line);
  border-radius:18px;
  background:var(--pick);
}

.post-promo img{ display:block; width:48px; height:48px; }

.post-promo__name{
  margin:10px 0 0;
  font-family:var(--display);
  font-size:1.3rem;
}

.post-promo p:not(.post-promo__name){
  margin:6px 0 0;
  color:var(--ink-2);
  font-size:.88rem;
  line-height:1.5;
}

.post-promo .post-promo__price{
  color:var(--ink) !important;
  font-weight:600;
}

.post-promo .posts-button{
  justify-content:center;
  width:100%;
  margin-top:14px;
}

@media (max-width:1100px){
  .posts-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .post-layout{ grid-template-columns:minmax(0, 760px); }
  .post-rail{ display:none; }
}

@media (max-width:900px){
  .posts-hero{ grid-template-columns:1fr; }
  .posts-hero__media{ aspect-ratio:16 / 9; }
}

@media (max-width:900px){
  .posts-head{ grid-template-columns:1fr; }
}

@media (max-width:720px){
  .posts-block,
  .post{ padding-left:16px; padding-right:16px; }
  .post-table{ overflow:visible; border:0; background:none; }
  .post-table table,
  .post-table tbody{ display:grid; gap:10px; min-width:0; }
  .post-table thead{ display:none; }
  .post-table tbody tr{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    gap:8px 12px;
    align-items:center;
    padding:14px 16px;
    border:1px solid var(--line);
    border-radius:16px;
    background:#fff;
  }
  .post-table tbody tr.is-pick{ border-color:var(--pick-line); background:var(--pick); }
  .post-table tbody tr > *{ padding:0; border:0 !important; background:none !important; }
  .post-table tbody th,
  .post-table tbody td:first-of-type{ grid-column:1 / -1; }
  .post-price{ white-space:normal; }
  .posts-grid,
  .post-picks,
  .post-related__grid{ grid-template-columns:1fr; }
  .post-appcard header{ grid-template-columns:auto minmax(0, 1fr); }
  .post-chip{ grid-column:1 / -1; justify-self:start; }
  .post-appcard dl{ grid-template-columns:1fr; }
  .post-cta{ grid-template-columns:1fr; }
  .post-cta__shot{ max-width:260px; }
  .post-cover{ border-radius:16px; }
}

@media (prefers-reduced-motion:reduce){
  .posts-hero__media img,
  .posts-card__media img,
  .posts-card,
  .posts-button{ transition:none; }
  .posts-hero:hover .posts-hero__media img,
  .posts-card:hover .posts-card__media img,
  .posts-card:hover{ transform:none; }
}
