/* Blog CMS: small mobile-first stylesheet. Brand colors come from --primary / --accent (per site). */
:root {
  --ink: #18181b;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f7f7f8;
  --card: #fff;
  --radius: 14px;
  --pinterest: #e60023;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.small { font-size: .85rem; color: var(--muted); }
.empty { padding: 32px 0; color: var(--muted); }

/* header */
.site-header { background: var(--accent); color: #fff; position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 58px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { color: #fff; font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.01em; }
.cat-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.cat-nav::-webkit-scrollbar { display: none; }
.search-toggle { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; flex-shrink: 0; }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { background: rgba(255,255,255,.18); }
.header-search { background: var(--accent); border-top: 1px solid rgba(255,255,255,.15); padding: 12px 0 14px; }
.header-search .search-box input { border-color: transparent; }
.header-search .search-box button { background: var(--primary); }
@media (max-width: 640px) {
  .brand { flex: 1; }
  .search-toggle { order: 2; }
  .cat-nav { order: 3; flex-basis: 100%; }
}
.cat-nav a { color: #fff; text-decoration: none; white-space: nowrap; padding: 6px 12px; border-radius: 999px; font-size: .92rem; font-weight: 500; }
.cat-nav a:hover, .cat-nav a[aria-current] { background: rgba(255,255,255,.18); }
.cat-nav a[aria-current] { font-weight: 700; }

/* hero and sections */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); letter-spacing: -.02em; }
.hero p { color: var(--muted); max-width: 640px; margin: 0; }
section { margin: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { font-size: 1.3rem; }
.more { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .88rem; font-weight: 600; text-decoration: none; transition: filter .15s, transform .15s; }
.more::after { content: "\2192"; }
.more:hover { filter: brightness(1.1); transform: translateX(2px); }
@media (max-width: 480px) { .section-head { flex-wrap: wrap; } .more { padding: 7px 13px; font-size: .84rem; } }
.page-head { padding: 24px 0 4px; }
.crumbs { font-size: .88rem; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); }

/* grid and cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card-body { padding: 10px 12px 14px; border-top: 1px solid var(--line); }
.card-title { font-size: .95rem; font-weight: 600; margin: 6px 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* chips (404 page links) */
.chip { text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; }
.pager { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 28px 0; }
.pager-pages { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.pg-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.pg-btn:hover { border-color: var(--accent); color: var(--accent); }
.pg-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-current:hover { color: #fff; }
.pg-gap { color: var(--muted); padding: 0 4px; }
.pager-jump { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.pager-jump input { width: 68px; height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; font: inherit; text-align: center; margin-left: 6px; }

.aff-note { font-size: .78rem; color: var(--muted); margin: 0 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 10px; font-weight: 700; text-decoration: none; font-size: 1rem; }
.btn.pin { background: var(--pinterest); color: #fff; }

/* share buttons */
.share { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 10px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 0; color: #fff; cursor: pointer; text-decoration: none; transition: transform .15s, filter .15s; }
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.s-pinterest { background: #e60023; }
.s-facebook { background: #1877f2; }
.s-x { background: #000; }
.s-linkedin { background: #0a66c2; }
.s-reddit { background: #ff4500; }
.s-bookmark { background: #4b5563; }
.share-hint { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.share-hint kbd { font: inherit; font-size: .8rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: #fff; color: var(--ink); }

/* static pages and footer */
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; max-width: 780px; }
.prose h2 { font-size: 1.15rem; margin-top: 1.4em; }
.cat-content { max-width: none; margin-top: 36px; }
/* 404 page */
.nf { text-align: center; padding: 40px 0 12px; }
.nf-code { font-size: 4rem; font-weight: 800; color: var(--primary); margin: 0; line-height: 1; letter-spacing: -.03em; }
.nf h1 { font-size: clamp(1.4rem, 4vw, 2rem); margin: 10px 0 6px; }
.nf-text { color: var(--muted); max-width: 560px; margin: 0 auto 20px; }
.nf-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.nf .btn.nf-home { flex: 0 0 auto; min-height: 42px; padding: 0 20px; margin-right: 6px; background: var(--accent); color: #fff; }
.nf .search-box { max-width: 480px; margin: 22px auto 0; }
.crumbs span { color: var(--muted); }
.cat-content h2 { font-size: 1.25rem; }
.cat-content h3 { font-size: 1.05rem; margin-top: 1.2em; }
.cat-content > :first-child { margin-top: 0; }
.cat-content ul, .cat-content ol { padding-left: 22px; }
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0 32px; }
.site-footer .disclaimer { font-weight: 600; margin: 0 0 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0; }
.footer-links a { color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 12px 0; }
.footer-row .footer-links { margin: 0; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); color: var(--ink); transition: background .15s, color .15s; }
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* blog */
.post-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .post-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) { .archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.post-img { aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--accent) 8%, #fff); overflow: hidden; }
.post-img img { width: 100%; height: 100%; object-fit: cover; }
.post-date { margin: 4px 0 0; font-size: .8rem; color: var(--muted); }
.post-excerpt { margin: 0; font-size: .9rem; color: var(--muted); }
.post-layout { display: grid; gap: 24px; margin-top: 12px; align-items: start; }
@media (min-width: 1000px) { .post-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
@media (min-width: 860px) { .post { padding: 36px 48px; } }
.post-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.02em; }
.post-meta { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.post-hero { margin: 0 0 16px; }
.post-hero img { width: 100%; height: auto; border-radius: 12px; }
.post-disclosure { border-left: 3px solid var(--line); padding-left: 10px; }
.toc { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin: 18px 0 8px; }
.toc summary { font-weight: 700; cursor: pointer; }
.toc ol { margin: 10px 0 4px; padding-left: 22px; }
.toc li { margin: 4px 0; }
.post-body { font-size: 1.05rem; line-height: 1.7; }
.post-body h2 { font-size: 1.5rem; margin-top: 1.6em; scroll-margin-top: 80px; }
.post-body h3 { font-size: 1.2rem; margin-top: 1.3em; }
.post-body img { border-radius: 10px; margin: 12px 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.post-body th { background: var(--bg); }
.post-body blockquote { margin: 16px 0; padding: 4px 16px; border-left: 4px solid var(--accent); color: var(--muted); }
.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 32px; padding: 18px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.author-box img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-name { font-weight: 800; margin: 0 0 4px; }
.author-bio { margin: 0 0 8px; color: var(--muted); font-size: .95rem; }
.author-social { display: flex; gap: 8px; margin: 0; }
.author-social a { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.author-social a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.related-posts { margin-top: 36px; }

/* home: the newest post large */
.featured-post { display: grid; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.featured-post:hover { box-shadow: 0 10px 28px rgba(0,0,0,.09); transform: translateY(-2px); }
@media (min-width: 860px) { .featured-post { grid-template-columns: 1.25fr 1fr; } }
.featured-img { aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--accent) 8%, #fff); }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 20px 22px 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
@media (min-width: 860px) { .featured-body { padding: 32px 36px; } }
.featured-body h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -.01em; margin: 0; }
.featured-body .post-excerpt { font-size: 1rem; }
.featured-body .more { align-self: flex-start; margin-top: 6px; }
.featured-body .more::after { content: none; }
.preview-flag { background: #fef3c7; color: #92400e; padding: 10px 14px; border-radius: 10px; font-weight: 600; margin-top: 12px; }

/* post sidebar and search */
.post-sidebar { display: flex; flex-direction: column; gap: 36px; }
.post-sidebar .side-box { margin: 0; }  /* the gap alone spaces the boxes (no section margins on top) */
@media (min-width: 1000px) { .post-sidebar { position: sticky; top: 84px; } }
.side-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; }

/* previous / next post */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.post-nav a:hover { border-color: var(--accent); color: var(--accent); }
.post-nav span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.post-nav-next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav-next { grid-column: 1; text-align: left; } }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.side-posts li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.side-posts li:last-child { border-bottom: 0; padding-bottom: 0; }
.side-posts a { font-weight: 600; font-size: .92rem; color: var(--ink); text-decoration: none; }
.side-posts a:hover { color: var(--accent); }
.side-posts time { font-size: .78rem; color: var(--muted); }
.search-box { display: flex; gap: 8px; }
.search-box input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.search-box button { height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.page-head .search-box { max-width: 560px; margin-top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- "best X" posts: comparison table and product reviews (button color = the site's primary color) --- */
.mp-table { display: grid; gap: 12px; margin: 22px 0 28px; }
.mp-row { position: relative; display: grid; grid-template-columns: 40px 92px minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; transition: box-shadow .15s, transform .15s; }
.mp-row:hover { box-shadow: 0 10px 26px rgba(0,0,0,.09); transform: translateY(-2px); }
.mp-row.top { border: 2px solid var(--primary); }
.mp-ribbon { position: absolute; top: -11px; left: 16px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.mp-rank { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; }
.mp-row.top .mp-rank { background: var(--primary); }
.mp-thumb img { width: 88px; height: 88px; object-fit: contain; display: block; }
.mp-name { font-weight: 700; line-height: 1.3; color: inherit; text-decoration: none; }
.mp-name:hover { color: var(--primary); }
.mp-feats { margin: 0; padding-left: 16px; color: var(--muted); font-size: .88rem; }
.mp-cta { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 10px; background: var(--primary); color: #fff !important; font-weight: 700; font-size: .92rem; text-decoration: none !important; white-space: nowrap; box-shadow: 0 6px 14px rgba(0,0,0,.14); transition: transform .15s, filter .15s; }
.mp-cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.mp-cta.big { padding: 13px 28px; font-size: 1rem; }
.mp-review { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 18px 0; scroll-margin-top: 90px; }
.mp-review h3 { margin: 0 0 10px; }
.mp-review-top { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; }
.mp-review-img img { width: 100%; max-width: 240px; height: 240px; object-fit: contain; display: block; }
.mp-label { margin: 12px 0 6px; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.mp-review ul { margin: 0; padding-left: 18px; }
.mp-pc { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.mp-pros, .mp-cons { border-radius: 12px; padding: 4px 14px 12px; }
.mp-pros { background: #f0fdf4; } .mp-pros .mp-label { color: #15803d; }
.mp-cons { background: #fef2f2; } .mp-cons .mp-label { color: #b91c1c; }
.mp-review-cta { text-align: center; margin: 16px 0 0; }
@media (max-width: 700px) {
  .mp-row { grid-template-columns: 30px 76px minmax(0, 1fr); padding: 12px; }
  .mp-thumb img { width: 76px; height: 76px; }
  .mp-feats, .mp-row .mp-cta { grid-column: 1 / -1; }
  .mp-row .mp-cta { width: 100%; padding: 12px; }
  .mp-rank { width: 28px; height: 28px; font-size: .85rem; }
  .mp-review-top, .mp-pc { grid-template-columns: 1fr; }
  .mp-review-img { order: -1; justify-self: center; }
}

/* header menu: dropdowns on wide screens, children inline on phones */
.main-menu { overflow: visible; flex-wrap: wrap; align-items: center; }
.menu-drop { position: relative; }
.menu-drop > a { display: inline-flex; align-items: center; gap: 4px; }
.drop-caret { font-size: .7em; opacity: .8; }
.drop-panel { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; padding: 8px; margin-top: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.14); z-index: 20; }
.drop-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }  /* keeps hover across the gap */
.menu-drop:hover .drop-panel, .menu-drop:focus-within .drop-panel { display: flex; flex-direction: column; }
.main-menu .drop-panel a { color: var(--ink); border-radius: 8px; padding: 8px 12px; white-space: nowrap; }
.main-menu .drop-panel a:hover, .main-menu .drop-panel a[aria-current] { background: var(--bg); color: var(--accent); }
@media (max-width: 640px) {
  .main-menu { overflow: visible; }
  .menu-drop, .drop-panel, .menu-drop:hover .drop-panel, .menu-drop:focus-within .drop-panel { display: contents; }
  .drop-caret, .drop-panel::before { display: none; }
  .main-menu .drop-panel a { color: #fff; opacity: .85; padding: 6px 12px; }
  .main-menu .drop-panel a:hover { background: rgba(255,255,255,.18); color: #fff; }
}

/* categories */
.post-cat { color: var(--accent); font-weight: 700; }
.post-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.post-cats a { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); padding: 4px 10px; border-radius: 999px; }
.post-cats a:hover { background: var(--accent); color: #fff; }
.page-kicker { margin: 0 0 4px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sub-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.cat-intro { margin-top: 12px; }
.side-cats li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.side-cats li:last-child { border-bottom: 0; padding-bottom: 0; }
.side-cats a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.side-cats a:hover { color: var(--accent); }
.side-cats span { color: var(--muted); font-size: .82rem; }

/* authors */
.byline { font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.byline:hover { color: var(--accent); border-color: var(--accent); }
.author-name a { color: inherit; text-decoration: none; }
.author-name a:hover { color: var(--accent); }
.author-role { margin: 0 0 6px; color: var(--accent); font-weight: 600; font-size: .92rem; }
.author-profile { display: flex; gap: 24px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 16px; }
.author-profile img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-profile h1 { margin-bottom: 4px; }
.author-expertise { margin: 0 0 10px; color: var(--muted); font-size: .95rem; }
.author-profile .author-bio p { margin: 0 0 10px; }
@media (max-width: 640px) { .author-profile { flex-direction: column; align-items: center; text-align: center; } .author-profile .author-social { justify-content: center; } }

/* category hub: start here, content below the posts; home: browse by category */
.start-here { margin: 18px 0 24px; }
.start-here .post-card { max-width: 640px; border: 2px solid var(--primary); }
.cat-bottom { margin-top: 32px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.topic { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.topic:hover { border-color: var(--accent); transform: translateY(-2px); }
.topic span { color: var(--muted); font-size: .85rem; }
