/* PageVert blog: shared stylesheet for /blog and /blog/<slug>.
   Same system as the main site (work426 monochrome, Inter Tight). */
:root {
  color-scheme: light;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --line: #e0e0e0;
  --line-soft: #e9e9e9;
  --text: #121212;
  --ink: #000000;
  --muted: #6f6f6f;
  --faint: #989898;
  --tile: #ededed;
  --on-dark: #f2f2f2;
  --on-dark-muted: #a8a8a8;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav (fixed dark bar) ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  padding-top: 14px;
  background: transparent; border-bottom: none;
  color: var(--on-dark);
}
/* work472: smart hide/show, slides away on scroll down, back on scroll up. */
.nav { transition: transform 0.3s ease; }
.nav.nav-hidden { transform: translateY(-130%); }
.nav:focus-within { transform: translateY(0); }
.nav-in {
  position: relative; display: flex; align-items: center; gap: 26px; height: 60px;
  width: min(1320px, calc(100% - 28px)); margin: 0 auto;
  background: rgba(13, 13, 13, 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px;
  padding: 0 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-tile {
  width: 36px; height: 36px; border-radius: 10px; background: #262626;
  display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
}
.brand-tile img { width: 36px; height: 36px; display: block; }
.brand br { display: none; }
.brand-name { font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; line-height: 1.15; display: block; color: #ffffff; }
.brand-sub { font-size: 9.5px; letter-spacing: 0.04em; color: #8f8f8f; font-weight: 500; display: block; margin-top: 2px; line-height: 1.2; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 13.5px; color: var(--on-dark-muted); margin-left: auto; }
.nav-links a:hover { color: #ffffff; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; line-height: 1;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: #c9c9c9; }
.btn-solid { background: #252525; color: #ffffff; border-color: #252525; }
.btn-solid:hover { background: #000000; border-color: #000000; }
.btn-lg { padding: 13px 24px; font-size: 14.5px; border-radius: 999px; }
.nav .btn-solid, .hero .btn-solid, .cta-band .btn-solid {
  background: #ffffff; color: #000000; border-color: #ffffff;
}
.nav .btn-solid:hover, .hero .btn-solid:hover, .cta-band .btn-solid:hover {
  background: #e6e6e6; border-color: #e6e6e6;
}


/* ---------- Products menu (work417) ---------- */
.nav-menu { display: flex; align-items: center; }
.menu-btn {
  background: none; border: none; cursor: pointer; font: inherit; color: inherit;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 0;
}
.menu-btn .chev { width: 11px; height: 11px; flex: none; transition: transform 0.15s ease; }
html.menu-armed .nav-menu:hover .menu-btn, .nav-menu:focus-within .menu-btn, .nav-menu.open .menu-btn { color: #ffffff; }
.nav-menu.open .menu-btn .chev { transform: rotate(180deg); }
.menu-panel {
  position: absolute; top: calc(100% + 12px); left: 0; right: 0;
  transform: translateY(6px);
  padding: 24px 26px 0; z-index: 50;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.06);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.2s; /* work517: 0.2s close grace */
}
/* work517: bridge spans the whole gap from the trigger down to the panel,
   so moving the pointer down never drops :hover and the menu stays open */
.menu-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -34px; height: 34px; }
/* work541: :hover opens the panel only once the pointer has genuinely
   moved after load (html.menu-armed). A page loading under a stationary
   cursor must not open the panel. :focus-within and .open are ungated. */
html.menu-armed .nav-menu:hover .menu-panel, .nav-menu:focus-within .menu-panel, .nav-menu.open .menu-panel {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
  transition-delay: 0s; /* work517: opening stays instant despite the close grace */
}
.menu-item { display: flex; flex-direction: row; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 10px; }
.menu-item:hover { background: var(--surface-2); }
.menu-item b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--text); letter-spacing: -0.01em; white-space: nowrap; }
.menu-cols { display: grid; grid-template-columns: 1fr 1fr 1fr 300px; gap: 6px 28px; }
.menu-group-label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; color: var(--faint); padding: 6px 10px; }
.menu-ico { width: 28px; height: 28px; flex: none; border: 1px solid var(--line); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); background: var(--surface); }
.menu-ico svg { width: 15px; height: 15px; display: block; }
.menu-feature { background: #0f0f0f; color: #f2f2f2; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.menu-feature-tag { align-self: flex-start; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #ffffff; }
.menu-feature-text { font-size: 15px; font-weight: 600; line-height: 1.35; color: #ffffff; }
.menu-feature-link { font-size: 13px; font-weight: 600; color: #ffffff; margin-top: auto; }
.menu-foot { display: flex; align-items: center; gap: 16px; padding: 16px 4px 18px; margin-top: 20px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.menu-foot a { font-weight: 600; color: var(--text); }
.menu-foot a:hover { color: var(--text); } /* work518: stay visible on hover; the global .nav-links a:hover rule turned this white on the white panel */

/* ---------- Blog index ---------- */
.blog-hero { padding: 76px 0 56px; text-align: center; }
.eyebrow { font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 0 0 12px; }
.blog-hero .hero-pill { display: inline-block; font-size: 13px; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin: 0 0 20px; }
.blog-hero h1 { font-size: 56px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 16px; color: var(--ink); }
.blog-hero p.lede { font-size: 17px; color: var(--muted); max-width: 880px; margin: 0 auto; line-height: 1.55; }
.cluster { padding: 44px 0 6px; }
.cluster h2 { font-size: 27px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; color: var(--ink); }
.cluster .cluster-sub { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line);
  padding: 22px; display: flex; flex-direction: column; gap: 9px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px #cfcfcf, 0 12px 28px rgba(0,0,0,0.06); }
.card .c-meta { font-size: 12px; color: var(--faint); font-weight: 500; }
.card h3 { font-size: 18.5px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; margin: 0; color: var(--ink); }
.card p { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin: 0; flex: 1; }
.card .c-read { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* ---------- Blog cards, Sternify style (work545) ----------
   New rules only. Inserted into blog.css directly after the existing
   `.card .c-read` rule. No existing rule is changed by this block.
   Black/white only, same system as the rest of the site. */

/* Cover: dark panel at the top of the card, 16/9, dotted pattern like
   .blog-hero (same 26px dot grid, white dots on #050505). It bleeds to
   the card edges with negative margins because .card keeps its 22px
   padding (comparison cards share .card and must stay untouched). */
.card .c-cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  aspect-ratio: 16 / 9;
  margin: -22px -22px 0;
  padding: 16px 20px;
  border-radius: 20px 20px 0 0;
  background-color: #050505;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1.4px);
  background-size: 26px 26px;
}
.card .c-cover-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #a8a8a8;
}
.card .c-cover-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row under the cover: date left, read-time pill right. */
.card .c-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card .c-date {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--faint);
}
.card .c-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.card .c-time svg {
  width: 12px;
  height: 12px;
  display: block;
}

/* Bottom row: author (logo mark + PageVert) left, Read the guide right.
   .card p keeps flex: 1, so this row sits at the bottom of the card. */
.card .c-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card .c-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.card .c-author img {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 5px;
  background: #050505;
}

/* ---------- Per-category "See more" (work545) ----------
   Button is created by JS only, so no-JS means no button and all cards
   stay visible. Placed under each cluster grid, centred. */
.see-more {
  display: block;
  margin: 22px auto 0;
  padding: 11px 24px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.see-more:hover {
  border-color: #c9c9c9;
  background: var(--surface-2);
}

@media (max-width: 640px) {
  .card .c-cover-title {
    font-size: 18px;
  }
}


/* ---------- Article ---------- */
.article-wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.crumbs { font-size: 13px; color: var(--faint); padding: 30px 0 0; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { margin: 0 7px; color: #c9c9c9; }
.article-head { padding: 18px 0 6px; }
.article-head h1 { font-size: 40px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.14; margin: 0 0 14px; color: var(--ink); }
.article-meta { font-size: 13.5px; color: var(--faint); display: flex; gap: 14px; flex-wrap: wrap; }
.article-body { font-size: 17px; line-height: 1.75; color: #262626; padding-bottom: 8px; }
.article-body p { margin: 0 0 18px; }
.article-body h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; color: var(--ink); margin: 42px 0 14px; }
.article-body h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); margin: 30px 0 10px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c9c9c9; }
.article-body a:hover { text-decoration-color: var(--ink); }
.article-body strong { font-weight: 600; color: var(--ink); }
.article-body blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--ink); color: var(--text); }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15.5px; }
.article-body th, .article-body td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.article-body th { font-weight: 600; color: var(--ink); }
.faq { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 8px; }
.faq h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 26px 0 6px; }
.faq .q { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.faq .q h3 { font-size: 17.5px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.faq .q p { margin: 0; color: #3d3d3d; font-size: 16px; line-height: 1.65; }
.related { padding: 46px 0 4px; }
.related h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 18px; }
.cta-band { background: #050505; border-radius: 28px; color: #ffffff; padding: 100px 46px; margin: 44px 0 10px; text-align: center; }
.cta-band h2 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 10px; }
.cta-band p { color: #b5b5b5; font-size: 16px; margin: 0 auto 22px; max-width: 520px; }
.cta-band .btn-solid { background: #ffffff; color: #000000; border-color: #ffffff; }
.cta-band .btn-solid:hover { background: #e6e6e6; }

/* ---------- Footer (same as main site) ---------- */
footer { padding: 26px 0 36px; background: transparent; }
.sf-grid { display: grid; grid-template-columns: 1.7fr 1fr 1.25fr 0.8fr; gap: 40px; background: var(--surface); border-radius: 28px; box-shadow: inset 0 0 0 1px var(--line); padding: 46px 46px 42px; }
.sf-line { font-size: 14.5px; line-height: 1.55; color: var(--muted); max-width: 290px; margin: 2px 0 0; }
.sf-col h4 { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; margin: 0 0 12px; }
.sf-col a { display: block; font-size: 13.5px; color: var(--muted); padding: 5px 0; }
.sf-col a:hover { color: var(--text); }
.sf-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 22px; padding: 0 12px; }
.sf-bottom .copy { font-size: 12px; color: var(--faint); }
.sf-legal { margin-left: 0; display: flex; flex-wrap: wrap; gap: 20px; font-size: 12.5px; color: var(--muted); }
.sf-legal a:hover { color: var(--text); }

@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .sf-grid { grid-template-columns: 1fr 1fr; padding: 32px 26px; }
  .nav .btn { display: none; }
  .nav-links .nav-anchor { display: none; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .blog-hero { padding-top: 44px; padding-bottom: 40px; }
  .blog-hero h1 { font-size: 34px; }
  .article-head h1 { font-size: 30px; }
  .article-body { font-size: 16.5px; }
  .cta-band { padding: 60px 24px; }
}

@media (max-width: 600px) {
  .nav-in { gap: 14px; }
}

/* ---------- work580: mobile hamburger menu (mobile only) ---------- */
/* The pill bar is already dark on desktop. At or below 920px it keeps
   the PageVert logo left and gains a hamburger right; tapping it opens
   a dark panel with only existing site links: the Products mega-menu
   items, Pricing, Blog, Contact, Sign in, and the Free Access 100+
   Designs CTA. Desktop unchanged: button and panel are display none
   above 920px, and the desktop mega-menu and hide-on-scroll are
   untouched. */
.mnav-btn { display: none; }
.mnav-panel { display: none; }
@media (max-width: 920px) {
  /* work580: Sign in lives in the panel now, so the pill keeps logo + hamburger only. */
  .nav-links > a { display: none; }
  .mnav-btn {
    display: inline-flex; flex: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    width: 40px; height: 40px; margin-left: auto; padding: 0;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; cursor: pointer;
  }
  .mnav-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #ffffff; transition: transform 0.2s ease, opacity 0.2s ease; }
  .nav.mnav-open .mnav-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.mnav-open .mnav-btn span:nth-child(2) { opacity: 0; }
  .nav.mnav-open .mnav-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  /* work580 fix: tightened rows so the CTA fits on first open at 390x844. */
  .mnav-panel {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch;
    max-height: calc(100svh - 100px); overflow-y: auto;
    background: #0f0f0f; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 20px;
    padding: 6px 10px 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }
  .nav.mnav-open .mnav-panel { display: flex; }
  .mnav-panel .mnav-label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; color: #8f8f8f; padding: 8px 12px 3px; }
  .mnav-panel a { display: block; font-size: 15px; font-weight: 600; color: #f2f2f2; padding: 7px 12px; border-radius: 10px; }
  .mnav-panel a:hover { background: #1d1d1d; color: #ffffff; }
  .mnav-panel .mnav-sep { display: block; height: 1px; background: rgba(255, 255, 255, 0.12); margin: 8px 4px 3px; }
  .mnav-panel .mnav-cta { margin-top: 8px; text-align: center; background: #ffffff; color: #000000; border-radius: 999px; padding: 10px; }
  .mnav-panel .mnav-cta:hover { background: #e6e6e6; color: #000000; }
}
