/* WooScrub blog.
 *
 * Loaded alongside main.css on the two blog surfaces only. The marketing pages
 * have no use for a card grid or a contents rail, and main.css is long enough.
 */

/* ── Hero ────────────────────────────────────────────────────────────────── */

.blog-hero {
  border-bottom: 1px solid var(--steel);
  overflow: hidden;
  position: relative;
}

/* The artwork sits behind the copy rather than beside it: the photograph is
   wide with its subject on the right, so the left third is already the empty
   space the headline needs. A scrim keeps the text legible over whatever the
   image happens to be. */
.blog-hero-art {
  background-position: center right;
  background-repeat: no-repeat;
  background-size: cover;
  inset: 0;
  position: absolute;
}
.blog-hero-art::after {
  background: linear-gradient(90deg, var(--obsidian) 0%, rgba(11, 15, 20, 0.92) 38%, rgba(11, 15, 20, 0.35) 72%, rgba(11, 15, 20, 0.55) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.blog-hero-inner { padding: 72px 0 64px; position: relative; }
.blog-hero-copy { max-width: 620px; }

.blog-hero h1 {
  color: var(--white-smoke);
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 18px;
}
.blog-hero h1 em { color: var(--amber-400); font-style: normal; }
.blog-hero-sub { color: var(--cool-gray); font-size: 18px; margin: 0 0 28px; max-width: 46ch; }

.blog-search { display: flex; max-width: 560px; position: relative; }
.blog-search svg {
  color: var(--ash); height: 18px; left: 16px; pointer-events: none;
  position: absolute; top: 50%; transform: translateY(-50%); width: 18px;
}
.blog-search input {
  background: rgba(18, 24, 32, 0.9);
  border: 1px solid var(--steel);
  border-radius: 10px;
  color: var(--white-smoke);
  font: inherit;
  font-size: 15px;
  height: 50px;
  padding: 0 16px 0 46px;
  width: 100%;
}
.blog-search input::placeholder { color: var(--ash); }
.blog-search input:focus { border-color: var(--amber-400); outline: 2px solid rgba(244, 163, 64, 0.22); }

/* Three claims, in the order the product makes them. */
.blog-hero-pills {
  display: none;
  flex-direction: column;
  gap: 12px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
@media (min-width: 1100px) { .blog-hero-pills { display: flex; } }
.blog-pill {
  align-items: center;
  background: rgba(25, 34, 44, 0.82);
  border: 1px solid var(--steel);
  border-radius: 10px;
  color: var(--white-smoke);
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 10px;
  padding: 11px 18px;
}
.blog-pill svg { height: 17px; width: 17px; }
.blog-pill.is-discover svg { color: var(--amber-400); }
.blog-pill.is-fix svg { color: var(--amber-400); }
.blog-pill.is-prevent svg { color: #6FCB9B; }

/* ── Toolbar ─────────────────────────────────────────────────────────────── */

.blog-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  padding: 28px 0;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-link {
  background: none;
  border: 1px solid var(--steel);
  border-radius: 999px;
  color: var(--cool-gray);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  text-decoration: none;
  transition: border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.chip-link:hover { border-color: var(--cool-gray); color: var(--white-smoke); }
.chip-link.is-active {
  background: rgba(244, 163, 64, 0.12);
  border-color: var(--amber-400);
  color: var(--amber-400);
}

.blog-sort { align-items: center; display: flex; gap: 8px; }
.blog-sort svg { color: var(--ash); height: 18px; width: 18px; }
.blog-sort select {
  appearance: none;
  background: transparent url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374818E' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0 center / 16px;
  border: 0;
  color: var(--white-smoke);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding-right: 22px;
}
.blog-sort select option { background: var(--slate); color: var(--white-smoke); }

/* ── Layout ──────────────────────────────────────────────────────────────── */

.blog-layout { display: grid; gap: 28px; grid-template-columns: 1fr; padding-bottom: 80px; }
@media (min-width: 1100px) { .blog-layout { grid-template-columns: minmax(0, 1fr) 320px; } }

.post-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 680px)  { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1360px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Post card ───────────────────────────────────────────────────────────── */

.post-card {
  background: var(--graphite);
  border: 1px solid var(--steel);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.14s ease, transform 0.14s ease;
}
.post-card:hover { border-color: var(--cool-gray); transform: translateY(-2px); }

.post-card-media {
  aspect-ratio: 16 / 9;
  background: var(--slate);
  display: block;
  overflow: hidden;
}
.post-card-media img { display: block; height: 100%; object-fit: cover; width: 100%; }
/* A post with no image still needs the card to hold its shape. */
.post-card-media.is-empty {
  align-items: center;
  background: linear-gradient(135deg, var(--slate), var(--graphite));
  color: var(--steel);
  display: flex;
  justify-content: center;
}
.post-card-media.is-empty svg { height: 38px; width: 38px; }

.post-card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }

.post-card-meta {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}
.post-tag {
  color: var(--amber-400);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}
.post-tag:hover { color: var(--white-smoke); }
.post-date { color: var(--ash); font-size: 13px; white-space: nowrap; }

.post-card h2 { font-size: 18px; line-height: 1.35; margin: 0 0 10px; }
.post-card h2 a { color: var(--white-smoke); text-decoration: none; }
.post-card h2 a:hover { color: var(--amber-400); }
.post-card-excerpt { color: var(--cool-gray); font-size: 14px; line-height: 1.6; margin: 0 0 18px; }

.post-card-more {
  align-items: center;
  color: var(--amber-400);
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  gap: 7px;
  margin-top: auto;
  text-decoration: none;
}
.post-card-more:hover { gap: 11px; }
.post-card-more span { transition: transform 0.14s ease; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.blog-side { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1100px) { .blog-side { align-self: start; position: sticky; top: 24px; } }

.side-card {
  background: var(--graphite);
  border: 1px solid var(--steel);
  border-radius: 14px;
  padding: 22px;
}
.side-card.is-accent { background: linear-gradient(160deg, rgba(244, 163, 64, 0.09), var(--graphite) 60%); }

.side-head { align-items: flex-start; display: flex; gap: 12px; margin-bottom: 14px; }
.side-head .icon-badge {
  align-items: center; background: rgba(244, 163, 64, 0.14); border-radius: 9px;
  color: var(--amber-400); display: flex; flex: none; height: 34px; justify-content: center; width: 34px;
}
.side-head .icon-badge svg { height: 17px; width: 17px; }
.side-title { color: var(--white-smoke); font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.side-text { color: var(--ash); font-size: 13px; line-height: 1.5; margin: 0; }

.side-form { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 0; }
.side-form input {
  background: var(--obsidian); border: 1px solid var(--steel); border-radius: 9px;
  color: var(--white-smoke); font: inherit; font-size: 14px; height: 42px; padding: 0 13px; width: 100%;
}
.side-form input::placeholder { color: var(--ash); }
.side-form input:focus { border-color: var(--amber-400); outline: 2px solid rgba(244, 163, 64, 0.22); }
.side-form button {
  background: var(--amber-400); border: 0; border-radius: 9px; color: var(--obsidian);
  cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; height: 42px; width: 100%;
}
.side-form button:hover { background: var(--amber-500); }
.side-note { font-size: 13px; margin: 12px 0 0; }
.side-note.is-ok { color: #A9DCC2; }
.side-note.is-error { color: #F0B4B4; }

.side-list { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 0; padding: 0; }
.side-list li + li { border-top: 1px solid rgba(40, 51, 63, 0.7); padding-top: 14px; }
.side-list li { padding-bottom: 10px; }
.side-list li:last-child { padding-bottom: 0; }

.side-post { align-items: flex-start; display: flex; gap: 12px; text-decoration: none; }
.side-thumb {
  aspect-ratio: 1; background: var(--slate); border-radius: 8px; flex: none;
  height: 52px; overflow: hidden; width: 52px;
}
.side-thumb img { display: block; height: 100%; object-fit: cover; width: 100%; }
.side-post-title {
  color: var(--white-smoke); font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0 0 5px;
}
.side-post:hover .side-post-title { color: var(--amber-400); }
.side-post-meta { color: var(--ash); font-size: 12px; margin: 0; }

.side-more {
  align-items: center; color: var(--amber-400); display: inline-flex; font-size: 14px;
  font-weight: 600; gap: 7px; margin-top: 16px; text-decoration: none;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.pager { align-items: center; display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pager a, .pager span {
  align-items: center; border: 1px solid var(--steel); border-radius: 9px; color: var(--cool-gray);
  display: inline-flex; font-size: 14px; font-weight: 600; height: 38px; justify-content: center;
  min-width: 38px; padding: 0 10px; text-decoration: none;
}
.pager a:hover { border-color: var(--cool-gray); color: var(--white-smoke); }
.pager .is-current { background: var(--amber-400); border-color: var(--amber-400); color: var(--obsidian); }
.pager .is-gap { border-color: transparent; }
.pager .is-disabled { color: var(--steel); pointer-events: none; }
.pager svg { height: 16px; width: 16px; }

.blog-empty {
  background: var(--graphite); border: 1px solid var(--steel); border-radius: 14px;
  color: var(--cool-gray); padding: 48px 24px; text-align: center;
}
.blog-empty a { color: var(--amber-400); }

/* ── Single post ─────────────────────────────────────────────────────────── */

.article-layout { display: grid; gap: 40px; grid-template-columns: 1fr; padding: 32px 0 80px; }
@media (min-width: 1100px) { .article-layout { grid-template-columns: minmax(0, 1fr) 340px; } }

.crumbs { color: var(--ash); font-size: 13px; margin: 0 0 18px; }
.crumbs a { color: var(--ash); text-decoration: none; }
.crumbs a:hover { color: var(--amber-400); }
.crumbs span { margin: 0 7px; }

.article-tags { align-items: center; display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.tag-badge {
  background: rgba(244, 163, 64, 0.12); border-radius: 6px; color: var(--amber-400);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; padding: 5px 10px;
  text-decoration: none; text-transform: uppercase;
}
.article-tags .post-date { font-size: 14px; }

.article-head h1 {
  color: var(--white-smoke); font-size: clamp(30px, 4.4vw, 44px); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.12; margin: 0 0 18px;
}
.article-deck { color: var(--cool-gray); font-size: 18px; line-height: 1.6; margin: 0 0 28px; max-width: 60ch; }

.byline {
  align-items: center; border-bottom: 1px solid var(--steel); display: flex; flex-wrap: wrap;
  gap: 16px; justify-content: space-between; margin-bottom: 32px; padding-bottom: 24px;
}
.byline-who { align-items: center; display: flex; gap: 12px; }
.byline-avatar {
  align-items: center; background: var(--steel); border-radius: 50%; color: var(--white-smoke);
  display: flex; flex: none; font-size: 14px; font-weight: 700; height: 42px;
  justify-content: center; overflow: hidden; width: 42px;
}
.byline-avatar img { height: 100%; object-fit: cover; width: 100%; }
.byline-name { color: var(--white-smoke); font-size: 15px; font-weight: 600; margin: 0; }
.byline-role { color: var(--ash); font-size: 13px; margin: 0; }

.share { display: flex; gap: 8px; }
.share a, .share button {
  align-items: center; background: none; border: 1px solid var(--steel); border-radius: 9px;
  color: var(--cool-gray); cursor: pointer; display: inline-flex; height: 36px;
  justify-content: center; padding: 0; text-decoration: none; width: 36px;
}
.share a:hover, .share button:hover { border-color: var(--amber-400); color: var(--amber-400); }
.share svg { height: 16px; width: 16px; }

.article-media {
  border: 1px solid var(--steel); border-radius: 14px; margin: 0 0 32px; overflow: hidden;
}
.article-media img { display: block; height: auto; width: 100%; }

/* ── Article body ────────────────────────────────────────────────────────── */

.article-body { color: var(--cool-gray); font-size: 17px; line-height: 1.75; }
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 20px; }
.article-body a { color: var(--amber-400); }

.article-body h2 {
  align-items: flex-start;
  color: var(--white-smoke);
  display: flex;
  font-size: 25px;
  font-weight: 700;
  gap: 14px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 44px 0 16px;
  scroll-margin-top: 24px;
}
/* Numbered in the template rather than by CSS counters, so the contents list
   and the headings cannot disagree about what section three is. */
.article-body .section-number {
  align-items: center;
  background: rgba(244, 163, 64, 0.14);
  border-radius: 50%;
  color: var(--amber-400);
  display: inline-flex;
  flex: none;
  font-size: 15px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  margin-top: 3px;
  width: 30px;
}

.article-body h3 { color: var(--white-smoke); font-size: 19px; margin: 32px 0 10px; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body img { border-radius: 12px; height: auto; max-width: 100%; }
.article-body blockquote {
  border-left: 2px solid var(--amber-400); color: var(--white-smoke);
  margin: 28px 0; padding: 4px 0 4px 20px;
}
.article-body pre {
  background: var(--graphite); border: 1px solid var(--steel); border-radius: 10px;
  overflow-x: auto; padding: 16px 18px;
}
.article-body code {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 14px;
}
.article-body table { border-collapse: collapse; width: 100%; }
.article-body th, .article-body td {
  border-bottom: 1px solid var(--steel); padding: 10px 12px 10px 0; text-align: left;
}

/* Authors mark these up as <p class="note"> in the CMS. */
.article-body .note, .article-body .callout {
  background: rgba(244, 163, 64, 0.07); border: 1px solid rgba(244, 163, 64, 0.3);
  border-radius: 10px; color: var(--cool-gray); font-size: 15px; margin: 28px 0; padding: 16px 18px;
}

/* ── Contents rail ───────────────────────────────────────────────────────── */

.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { padding: 7px 0 7px 22px; position: relative; }
.toc-list li::before {
  background: var(--steel); border-radius: 50%; content: ""; height: 7px;
  left: 0; position: absolute; top: 15px; width: 7px;
}
.toc-list li.is-active::before { background: var(--amber-400); box-shadow: 0 0 0 3px rgba(244, 163, 64, 0.2); }
.toc-list a { color: var(--cool-gray); font-size: 14px; line-height: 1.45; text-decoration: none; }
.toc-list li.is-active a { color: var(--white-smoke); font-weight: 600; }
.toc-list a:hover { color: var(--amber-400); }

.side-cta-btn {
  align-items: center; background: var(--amber-400); border-radius: 9px; color: var(--obsidian);
  display: flex; font-size: 15px; font-weight: 700; gap: 8px; height: 46px;
  justify-content: center; margin-top: 16px; text-decoration: none;
}
.side-cta-btn:hover { background: var(--amber-500); }
.side-cta-note { color: var(--ash); font-size: 12px; margin: 10px 0 0; text-align: center; }
