/* Shared stylesheet for all Toppli blog articles. Matches the main
   toppli.app design language (sky gradient, glass cards) but tuned for
   long-form reading: 720px max content width, larger line-height,
   distinct H2 typography. */

:root {
  --bg-top: #5CC8F7;
  --bg-mid: #3380D9;
  --bg-bot: #142A80;
  --ink: #ffffff;
  --ink-dim: rgba(255,255,255,0.78);
  --ink-faded: rgba(255,255,255,0.55);
  --glass: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.16);
  --accent: #FFD23F;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 38%, var(--bg-bot) 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* Top nav (matches main site exactly) */
nav.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(20, 42, 128, 0.18);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}
nav.top .brand-mini { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
nav.top .brand-mini img { width: 30px; height: 30px; border-radius: 7px; }
nav.top ul { display: flex; gap: 22px; list-style: none; }
nav.top a { opacity: 0.78; transition: opacity 0.15s; font-weight: 500; }
nav.top a:hover { opacity: 1; }
@media (max-width: 640px) { nav.top ul { display: none; } }

/* Article-specific */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}
.article .crumbs {
  font-size: 13px;
  color: var(--ink-faded);
  margin-bottom: 18px;
  letter-spacing: 0.4px;
}
.article .crumbs a { color: var(--ink-dim); }
.article .crumbs a:hover { color: var(--ink); }
.article h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 18px;
}
.article .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-faded);
  font-size: 13px;
  margin-bottom: 36px;
  letter-spacing: 0.3px;
}
.article .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faded); display: inline-block; }
.article .lede {
  font-size: 19px;
  color: var(--ink-dim);
  margin-bottom: 28px;
  line-height: 1.55;
}
.article h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 42px 0 14px;
  line-height: 1.25;
}
.article h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 10px;
  line-height: 1.3;
}
.article p {
  margin-bottom: 18px;
  font-size: 16.5px;
  color: rgba(255,255,255,0.92);
}
.article ul, .article ol {
  margin: 0 0 22px;
  padding-left: 22px;
}
.article li {
  margin-bottom: 8px;
  font-size: 16.5px;
  color: rgba(255,255,255,0.92);
}
.article a.inline {
  color: var(--accent);
  border-bottom: 1px solid rgba(255,210,63,0.4);
}
.article a.inline:hover { border-bottom-color: var(--accent); }
.article strong { color: var(--ink); font-weight: 700; }
.article em { color: var(--ink); font-style: italic; }

.callout {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 15px;
  color: var(--ink-dim);
}
.callout strong { color: var(--accent); }

/* End-of-article CTA */
.end-cta {
  background: linear-gradient(135deg, rgba(255,210,63,0.18) 0%, rgba(255,255,255,0.08) 100%);
  border: 1px solid rgba(255,210,63,0.35);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  margin-top: 44px;
}
.end-cta h3 { font-size: 22px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.3px; }
.end-cta p { color: var(--ink-dim); font-size: 15px; margin-bottom: 22px; max-width: 460px; margin-left: auto; margin-right: auto; }
.end-cta .app-store-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  color: #fff;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.end-cta .app-store-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,0.45); }
.end-cta .app-store-cta .apple { width: 26px; height: 26px; flex-shrink: 0; }
.end-cta .app-store-cta .label { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.end-cta .app-store-cta small { font-size: 11px; opacity: 0.85; }
.end-cta .app-store-cta strong { font-size: 17px; font-weight: 600; }

/* Related articles */
.related {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.related h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-faded);
  margin-bottom: 18px;
}
.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: 14px; }
.related a {
  display: block;
  padding: 14px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s ease;
}
.related a:hover { background: rgba(255,255,255,0.13); }
.related a small {
  display: block;
  color: var(--ink-faded);
  font-weight: 500;
  font-size: 13px;
  margin-top: 4px;
}

/* Blog index — listing page */
.blog-index {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 24px 60px;
}
.blog-index .header { text-align: center; margin-bottom: 48px; }
.blog-index h1 {
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}
.blog-index .lede { color: var(--ink-dim); font-size: 18px; max-width: 520px; margin: 0 auto; }
.blog-index .rss-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(255,210,63,0.4);
}
.posts { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .posts { grid-template-columns: 1fr 1fr; }
}
.post-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 28px 26px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.post-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.13); }
.post-card .post-meta { font-size: 12px; color: var(--ink-faded); letter-spacing: 0.4px; text-transform: uppercase; font-weight: 700; margin-bottom: 12px; }
.post-card h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.25; margin-bottom: 10px; }
.post-card p { color: var(--ink-dim); font-size: 15px; line-height: 1.55; }
.post-card .read-more { display: inline-block; margin-top: 14px; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }

/* Footer (matches main site) */
footer {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 48px 24px 32px;
  margin-top: 60px;
  font-size: 13px;
}
footer .grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
@media (max-width: 720px) { footer .grid { grid-template-columns: 1fr 1fr; } }
footer h4 { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-faded); margin-bottom: 12px; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
footer ul a { color: var(--ink-dim); }
footer ul a:hover { color: var(--ink); }
footer .colophon {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-faded);
  font-size: 11px;
}
