/* TOPS blog — loaded only on /blog pages, on top of styles.css */

/* quiet dark hero for the index and every post */
/* slides under the sticky header (72px + 1px border), like the other heroes, so the transparent header sits on navy */
.hero.post-hero { margin-top: -73px; padding: calc(73px + clamp(48px, 7vw, 88px)) 0 clamp(48px, 7vw, 80px); background-color: #071A33; background-image: radial-gradient(rgba(244,248,252,.16) 1.2px, transparent 1.4px), linear-gradient(180deg, #071A33 0%, #0C2748 60%, #11325A 100%); background-size: 24px 24px, 100% 100%; }
.post-hero .hero-copy { max-width: 820px; }
.post-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.06; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 26px; font: 500 .8rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-2); }
.post-meta span + span::before { content: "·"; margin-right: 18px; opacity: .6; }
.crumb { font: 500 .78rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); text-decoration: none; display: inline-block; margin-bottom: 22px; }
.crumb:hover { color: var(--on-dark); }
.crumb::before { content: "← "; }
.tag-eng { color: #8FC7FF !important; }

/* index: image-led cards. The newest post is featured full width (image left, text right); the rest sit two
   to a row with the 16:9 cover on top, big enough that the dashboard/flow illustrations stay readable. */
.post-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.post-filters button { font: 600 .85rem var(--font); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.post-filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; list-style: none; margin: 0; padding: 0; }
.post-list li[hidden] { display: none; }
.post-list li.featured { grid-column: 1 / -1; }
.post-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.post-card:hover { border-color: var(--ink-3); transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(10,35,66,.55); }
.post-card-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--night); border-bottom: 1px solid var(--line); }
.post-card-text { display: flex; flex-direction: column; flex: 1; padding: 26px 28px 28px; }
.featured .post-card { flex-direction: row; }
.featured .post-card-img { width: 58%; flex-shrink: 0; border-bottom: 0; border-right: 1px solid var(--line); }
.featured .post-card-text { justify-content: center; padding: clamp(28px, 3.4vw, 48px); }
.featured .post-card h2 { font-size: clamp(1.5rem, 2.3vw, 2rem) !important; }
.post-card .kind { font: 600 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; }
.post-card .kind.eng { color: #1F6FB8; }
.post-card .kind.admin { color: #23795A; }  /* HubSpot playbooks */
.post-card h2 { font-size: 1.35rem !important; line-height: 1.2 !important; letter-spacing: -0.02em; margin-bottom: 12px; max-width: none !important; }
.post-card p { color: var(--ink-2); font-size: .98rem; flex: 1; }
.post-card .date { margin-top: 20px; font: 500 .78rem var(--mono); color: var(--ink-3); }

/* post cover: sits under the hero, overlapping its bottom edge */
.post-hero.has-cover { padding-bottom: clamp(130px, 15vw, 200px); }
.post-body { padding-top: 0 !important; }
.post-cover { max-width: 1000px; margin: calc(-1 * clamp(90px, 11vw, 150px)) auto clamp(44px, 6vw, 72px); position: relative; z-index: 1; }
.post-cover img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 30px 60px -30px rgba(6,21,41,.6); background: var(--night); }
.post-body:not(:has(.post-cover)) { padding-top: clamp(64px, 9vw, 112px) !important; }

/* article body */
.article { max-width: 720px; margin-inline: auto; font-size: 1.125rem; line-height: 1.72; color: #1F344F; }
.article > * + * { margin-top: 1.2em; }
.article h2 { font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.15; color: var(--ink); margin-top: 2.2em; max-width: none; }
.article h3 { font-size: 1.25rem; line-height: 1.25; color: var(--ink); margin-top: 1.8em; }
.article ul, .article ol { padding-left: 1.3em; margin: 0; }
.article ul > li + li, .article ol > li + li { margin-top: .45em; }
.article a { color: var(--accent-ink); text-underline-offset: 3px; }
.article strong { color: var(--ink); }
.article .lead { font-size: 1.3rem; line-height: 1.55; color: var(--ink); }
.article code { font: .9em var(--mono); background: var(--stone); padding: .12em .4em; border-radius: 4px; }
.article pre { background: var(--navy-deep); color: #DDE6F2; border-radius: var(--r); padding: 20px 22px; overflow-x: auto; font: .88rem/1.65 var(--mono); }
.article pre code { background: none; padding: 0; color: inherit; font: inherit; }
.article pre .k { color: #FF9C94; } .article pre .s { color: #9FD8A8; } .article pre .c { color: #7F93AE; }
.article blockquote { margin: 1.8em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); font-size: 1.3rem; line-height: 1.5; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.article hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }

/* callouts */
.tldr, .note, .takeaways { border-radius: var(--r); padding: 22px 24px; font-size: 1rem; }
.tldr { background: var(--ink); color: var(--on-dark); }
.tldr strong, .tldr b { color: #fff; }
.tldr .label, .note .label, .takeaways .label { display: block; font: 600 .74rem var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px; }
.tldr .label { color: var(--accent-bright); }
.note { background: #fff; border: 1px solid var(--line); border-left: 3px solid #1F6FB8; }
.note .label { color: #1F6FB8; }
.takeaways { background: var(--stone); }
.takeaways .label { color: var(--accent-ink); }
.takeaways ol { margin: 0; }

/* proof: stat strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 2em 0 !important; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.stat b { display: block; font: 800 2rem/1 var(--font); letter-spacing: -0.03em; color: var(--ink); }
.stat span { display: block; margin-top: 8px; font-size: .9rem; line-height: 1.4; color: var(--ink-2); }

/* before / after */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare > div { border-radius: var(--r); padding: 20px 22px; font-size: 1rem; }
.compare .before { background: #fff; border: 1px solid var(--line); }
.compare .after { background: var(--ink); color: var(--on-dark); }
.compare h3 { margin: 0 0 10px !important; font-size: .78rem !important; font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.compare .before h3 { color: var(--ink-3); } .compare .after h3 { color: var(--accent-bright); }
.compare ul { padding-left: 1.1em; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.article table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.article th, .article td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { font: 600 .76rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); background: var(--paper); }
.article tr:last-child td { border-bottom: 0; }

/* ---------- diagrams (engineering posts) ---------- */
/* The drawing vocabulary itself (.figure .canvas, the dg- classes, .walk) lives in styles.css, because the service
   pages use it too. Here: only the margins that make a figure wider than the text column on desktop. */
.figure { margin: 2.2em calc(min(0px, (720px - min(100vw - 40px, 1000px)) / 2)) !important; }

/* end-of-post call to action */
.post-cta { max-width: 720px; margin: 3.2em auto 0; background: var(--ink); color: var(--on-dark); border-radius: 14px; padding: clamp(26px, 4vw, 40px); background-image: radial-gradient(rgba(244,248,252,.12) 1.1px, transparent 1.3px); background-size: 22px 22px; }
.post-cta h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.15; color: #fff; }
.post-cta p { margin-top: 12px; color: var(--on-dark-2); }
.post-cta .hero-actions { margin-top: 24px; }
.post-cta .btn-text { color: #fff; }

@media (max-width: 860px) { .featured .post-card { flex-direction: column; } .featured .post-card-img { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 640px) {
  .post-list, .stats, .compare { grid-template-columns: 1fr; }
  .article { font-size: 1.06rem; }
  .figure { margin-inline: 0 !important; }
}
