/* Rankwyre blog + glossary ext (batch "blog"). Tokens come from rw-page.css (.rwp): ink rgb(19,21,21), body rgb(73,77,77),
   fill #e8e8e8, page #f7f7f7, white blocks radius 20 + 0 8px 20px rgba(19,21,21,.05), Stack Sans Headline / Google Sans Flex.
   Sizes reused from there: H2 48/57.6 (42/50.4, 38/45.6), card title 24/28.8 (20/24), card text 18/23.4 (16/20.8), tag 14/18.2,
   FAQ question 20/24. Not in Habitline (Rankwyre choices for long reading): prose line-height 1.6, in-article H2 32 (28 phone),
   prose measure 700px. */

/* ---------- hero: a compact title hero for articles, hub and glossary ---------- */
.rwb-hero.rhv--11 { padding-bottom: 190px !important; }
.rwb-hero .rw-hero__cta { display: none; }
.rwb-hero .rw-hero__sub:empty { display: none; }
.rwb-hero .rw-hero__sub { max-width: 640px; }
.rwb-hero.rwb-hero h1 { max-width: 980px; margin-left: auto; margin-right: auto; font: 500 48px/57.6px var(--head, "Stack Sans Headline", "Stack Sans Headline Placeholder", sans-serif); text-wrap: balance; text-align: center; }
.rwb-hero h1 .rw-line { white-space: normal; }
.rwb-hero h1 .rw-line:empty { display: none; }
@media (max-width: 1199.98px) { .rwb-hero h1 { font-size: 42px; line-height: 50.4px; } .rwb-hero.rhv--11 { padding-bottom: 150px !important; } }
@media (max-width: 809.98px) { .rwb-hero h1 { font-size: 34px; line-height: 40.8px; } .rwb-hero.rhv--11 { padding-bottom: 120px !important; } }

/* ---------- shared bits ---------- */
.rwb-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; font: 500 18px/1 var(--head); }
.rwb-av--lg { width: 64px; height: 64px; font-size: 26px; }
.rwb-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rwb-who > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rwb-who b { font: 500 16px/20.8px var(--head); color: var(--ink); }
.rwb-who small { font: 400 14px/18.2px var(--sans); color: var(--body); }
.rwb-date, .rwb-rt, .rwb-by__meta span { display: inline-flex; align-items: center; gap: 6px; font: 400 14px/18.2px var(--sans); color: var(--body); white-space: nowrap; }
.rwb-date svg, .rwb-rt svg, .rwb-by__meta svg { width: 16px; height: 16px; flex: none; }

/* ---------- category chips ---------- */
.rwb-chips { margin-bottom: 40px; }
.rwb-chips__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rwb-chip { display: inline-flex; align-items: center; padding: 8px 20px; border: 0; border-radius: 100px; background: #fff; color: var(--ink); font: 400 14px/18.2px var(--sans); text-decoration: none; cursor: pointer; box-shadow: var(--shadow); transition: background-color 160ms ease-out, color 160ms ease-out; }
.rwb-chip:hover { background: var(--fill); }
.rwb-chip.is-on { background: var(--ink); color: #fff; }
.rwb-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rwb-hub, .rwg { padding-top: 40px; }
@media (max-width: 809.98px) {
  .rwb-chips { margin: 0 -20px 30px; }
  .rwb-chips__row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 4px 20px 10px; scrollbar-width: none; }
  .rwb-chips__row::-webkit-scrollbar { display: none; }
  .rwb-chip { flex: none; }
}

/* ---------- card grid (hub, category pages, related) ---------- */
.rwb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rwb-card { display: flex; flex-direction: column; padding: 6px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); transition: transform 160ms ease-out; }
.rwb-card[hidden] { display: none; }
.rwb-card:hover { transform: translateY(-2px); }
.rwb-card__img { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 1619 / 971; background: var(--fill); }
.rwb-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rwb-badge { position: absolute; left: 12px; top: 12px; padding: 4px 12px; border-radius: 100px; background: var(--ink); color: #fff; font: 400 14px/18.2px var(--sans); }
.rwb-card__body { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 18px 14px 14px; }
.rwb-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rwb-cat { display: inline-flex; padding: 4px 12px; border-radius: 100px; background: var(--fill); color: var(--ink); font: 400 14px/18.2px var(--sans); text-decoration: none; transition: background-color 160ms ease-out; }
.rwb-cat:hover { background: #dcdcdc; }
.rwb-card__t { font: 500 24px/28.8px var(--head); color: var(--ink); }
.rwb-card__t a { color: inherit; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rwb-card__t a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rwb-card__ex { font: 400 16px/20.8px var(--sans); color: var(--body); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rwb-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(19, 21, 21, .08); }
.rwb-card__foot .rwb-av { width: 36px; height: 36px; font-size: 15px; }
.rwb-card__foot .rwb-who b { font-size: 14px; line-height: 18.2px; }
.rwb-card__foot .rwb-who small { display: none; }
@media (max-width: 1199.98px) { .rwb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 809.98px) {
  .rwb-grid { grid-template-columns: 1fr; gap: 14px; }
  .rwb-card__t { font-size: 20px; line-height: 24px; }
}

/* ---------- article ---------- */
.rwb-post { padding-top: 40px; }
.rwb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; align-items: start; }
.rwb-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.rwb-by { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.rwb-by__meta { display: flex; align-items: center; gap: 20px; }
.rwb-cover { border-radius: 20px; overflow: hidden; background: var(--fill); box-shadow: var(--shadow); aspect-ratio: 1619 / 971; }
.rwb-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rwb-article { padding: 56px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }

.rwb-ai { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; max-width: 700px; margin: 0 auto 40px; padding-bottom: 28px; border-bottom: 1px solid rgba(19, 21, 21, .08); }
.rwb-ai__t { display: inline-flex; align-items: center; gap: 8px; font: 500 16px/20.8px var(--head); color: var(--ink); }
.rwb-ai__t svg { width: 16px; height: 16px; fill: currentColor; }
.rwb-ai__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.rwb-ai__btns a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 100px; background: var(--fill); color: var(--ink); font: 400 14px/18.2px var(--sans); text-decoration: none; transition: background-color 160ms ease-out; }
.rwb-ai__btns a:hover { background: #dcdcdc; }
.rwb-ai__btns svg { width: 16px; height: 16px; flex: none; }
.rwb-ai__btns a:not([data-rw-ico]) svg { fill: currentColor; }

/* prose */
.rwb-prose { max-width: 700px; margin: 0 auto; font: 400 18px/1.6 var(--sans); color: var(--body); overflow-wrap: break-word; }
.rwb-prose > * + * { margin-top: 20px; }
.rwb-prose p { font: inherit; color: inherit; }
.rwb-prose strong { font-weight: 500; color: var(--ink); }
.rwb-prose a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(19, 21, 21, .35); text-underline-offset: 3px; transition: text-decoration-color 160ms ease-out; }
.rwb-prose a:hover { text-decoration-color: var(--ink); }
.rwb-prose h2 { margin-top: 56px; font: 500 32px/38.4px var(--head); color: var(--ink); scroll-margin-top: 120px; }
.rwb-prose h3 { margin-top: 36px; font: 500 24px/28.8px var(--head); color: var(--ink); scroll-margin-top: 120px; }
.rwb-prose h2 + *, .rwb-prose h3 + * { margin-top: 16px; }
.rwb-prose ul, .rwb-prose ol { display: flex; flex-direction: column; gap: 10px; padding: 0; list-style: none; counter-reset: rwbn; }
.rwb-prose li { position: relative; padding-left: 28px; }
.rwb-prose ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--ink); }
.rwb-prose ol > li { counter-increment: rwbn; }
.rwb-prose ol > li::before { content: counter(rwbn); position: absolute; left: 0; top: .2em; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font: 500 13px/1 var(--sans); }
/* key takeaways callout: the list straight after the first heading */
.rwb-prose h2#key-takeaways + ul { padding: 26px 28px; border-radius: 16px; background: var(--page); border: 1px solid rgba(19, 21, 21, .08); }
.rwb-prose blockquote { margin-left: 0; margin-right: 0; padding: 24px 28px; border-radius: 16px; background: var(--page); border: 1px solid rgba(19, 21, 21, .08); font: 500 22px/1.45 var(--head); color: var(--ink); }
.rwb-prose blockquote p { font: inherit; color: inherit; }
.rwb-prose figure, .rwb-fig { margin-top: 32px; margin-bottom: 8px; border-radius: 16px; overflow: hidden; background: var(--fill); }
.rwb-prose figure img { display: block; width: 100%; height: auto; }
.rwb-tbl { overflow-x: auto; border-radius: 16px; border: 1px solid rgba(19, 21, 21, .1); background: #fff; }
.rwb-tbl:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rwb-prose table { width: 100%; min-width: 560px; border-collapse: collapse; font: 400 16px/22px var(--sans); }
.rwb-prose th { padding: 14px 18px; text-align: left; background: var(--fill); color: var(--ink); font-weight: 500; white-space: nowrap; }
.rwb-prose td { padding: 14px 18px; vertical-align: top; color: var(--body); border-top: 1px solid rgba(19, 21, 21, .08); }
.rwb-prose td:first-child { color: var(--ink); font-weight: 500; }
.rwb-prose .rwb-faq { margin-top: 16px; }
.rwb-faq .rwp-q { background: var(--page); box-shadow: none; border: 1px solid rgba(19, 21, 21, .08); }
.rwb-q { margin: 0 !important; font: inherit; }
.rwb-faq .rwp-q__btn { font-family: var(--sans); }
.rwb-faq .rwp-q__text { font: 500 20px/24px var(--head); }
.rwb-qa { font: 400 16px/1.6 var(--sans); color: var(--body); }
.rwb-qa p { font: inherit; color: inherit; margin: 0; }
.rwb-qa p + p { margin-top: 12px; }

.rwb-bio { display: flex; gap: 20px; align-items: flex-start; padding: 30px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.rwb-bio p { margin: 0; }
.rwb-bio__k { font: 400 14px/18.2px var(--sans); color: var(--body); }
.rwb-bio__n { margin-top: 4px !important; font: 500 20px/24px var(--head); color: var(--ink); }
.rwb-bio__r { margin-top: 2px !important; font: 400 14px/18.2px var(--sans); color: var(--body); }
.rwb-bio__d { margin-top: 12px !important; font: 400 16px/1.6 var(--sans); color: var(--body); }
.rwb-share { display: flex; align-items: center; gap: 10px; font: 500 16px/20.8px var(--head); color: var(--ink); }
.rwb-share a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; transition: background-color 160ms ease-out; }
.rwb-share a:hover { background: #2a2d2d; }
.rwb-share svg { width: 18px; height: 18px; }

/* table of contents */
.rwb-aside { position: sticky; top: 120px; align-self: start; }
.rwb-toc { padding: 24px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.rwb-toc__t { margin-bottom: 14px; font: 500 20px/24px var(--head); color: var(--ink); }
.rwb-toc__list { display: flex; flex-direction: column; gap: 2px; list-style: none; padding: 0; margin: 0; font: 400 16px/20.8px var(--sans); }
.rwb-toc__list a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--body); text-decoration: none; transition: background-color 160ms ease-out, color 160ms ease-out; }
.rwb-toc__list a:hover { background: var(--page); color: var(--ink); }
.rwb-toc__list a.is-on { background: var(--ink); color: #fff; }
.rwb-toc--d .rwb-toc__list { max-height: calc(100vh - 260px); overflow-y: auto; }
.rwb-toc--m { display: none; padding: 0; }
.rwb-toc--m summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; list-style: none; font: 500 18px/22px var(--head); color: var(--ink); }
.rwb-toc--m summary::-webkit-details-marker { display: none; }
.rwb-toc--m summary svg { width: 22px; height: 22px; transition: transform 200ms ease-out; }
.rwb-toc--m[open] summary svg { transform: rotate(180deg); }
.rwb-toc--m .rwb-toc__list { padding: 0 12px 14px; }
.rwb-rel { padding-top: 120px; }
@media (max-width: 1199.98px) {
  .rwb-layout { grid-template-columns: minmax(0, 1fr); }
  .rwb-aside { display: none; }
  .rwb-toc--m { display: block; }
  .rwb-article { padding: 40px; }
  .rwb-rel { padding-top: 90px; }
}
@media (max-width: 809.98px) {
  .rwb-main { gap: 14px; }
  .rwb-post { padding-top: 10px; }
  .rwb-cover { border-radius: 16px; }
  .rwb-article { padding: 24px 20px; border-radius: 16px; }
  .rwb-ai { margin-bottom: 28px; padding-bottom: 20px; }
  .rwb-prose { font-size: 16px; }
  .rwb-prose h2 { margin-top: 44px; font-size: 26px; line-height: 31.2px; }
  .rwb-prose h3 { margin-top: 28px; font-size: 20px; line-height: 24px; }
  .rwb-prose h2#key-takeaways + ul { padding: 18px 16px; }
  .rwb-prose blockquote { font-size: 19px; }
  .rwb-prose th, .rwb-prose td { padding: 12px 14px; }
  .rwb-faq .rwp-q__text { font-size: 16px; line-height: 19.2px; }
  .rwb-bio { padding: 20px; gap: 14px; }
  .rwb-av--lg { width: 48px; height: 48px; font-size: 20px; }
  .rwb-rel { padding-top: 70px; }
}

/* ---------- glossary ---------- */
.rwg-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.rwg-search { position: relative; flex: 1 1 360px; max-width: 520px; display: block; }
.rwg-search svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--body); pointer-events: none; }
.rwg-search input { width: 100%; height: 52px; padding: 0 20px 0 48px; border: 0; border-radius: 100px; background: #fff; box-shadow: var(--shadow); color: var(--ink); font: 400 16px/20.8px var(--sans); }
.rwg-search input::placeholder { color: var(--body); opacity: .8; }
.rwg-search input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rwg-count { font: 400 14px/18.2px var(--sans); color: var(--body); }
.rwg-chips { justify-content: flex-start; margin-bottom: 24px; }
.rwg-az { position: sticky; top: 108px; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; margin-bottom: 40px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.rwg-az a, .rwg-az span { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; font: 500 15px/1 var(--head); }
.rwg-az a { color: var(--ink); text-decoration: none; transition: background-color 160ms ease-out, color 160ms ease-out; }
.rwg-az a:hover { background: var(--ink); color: #fff; }
.rwg-az a.is-off { opacity: .3; pointer-events: none; }
.rwg-az span { color: var(--mute); }
.rwg-groups { display: flex; flex-direction: column; gap: 40px; }
.rwg-grp { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 30px; align-items: start; scroll-margin-top: 190px; }
.rwg-grp[hidden], .rwg-term[hidden] { display: none; }
.rwg-letter { position: sticky; top: 190px; font: 500 48px/57.6px var(--head); color: var(--ink); }
.rwg-list { display: flex; flex-direction: column; border-radius: 20px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.rwg-term { display: flex; flex-direction: column; gap: 10px; padding: 22px 30px; scroll-margin-top: 190px; }
.rwg-term + .rwg-term:not([hidden]) { border-top: 1px solid rgba(19, 21, 21, .08); }
.rwg-term__h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rwg-abbr, .rwg-topic { display: inline-flex; padding: 3px 10px; border-radius: 100px; background: var(--fill); color: var(--ink); font: 400 14px/18.2px var(--sans); }
.rwg-topic { background: transparent; border: 1px solid rgba(19, 21, 21, .12); color: var(--body); }
.rwg-term .rwp-body { max-width: 680px; font-size: 17px; line-height: 1.55; }
.rwg-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--ink); font: 500 15px/20px var(--sans); text-decoration: underline; text-decoration-color: rgba(19, 21, 21, .35); text-underline-offset: 3px; }
.rwg-link svg { width: 16px; height: 16px; transition: transform 160ms ease-out; }
.rwg-link:hover svg { transform: translateX(2px); }
.rwg-empty { padding: 60px 0; text-align: center; font: 400 18px/23.4px var(--sans); color: var(--body); }
@media (max-width: 1199.98px) { .rwg-grp { grid-template-columns: 90px minmax(0, 1fr); gap: 20px; } .rwg-letter { font-size: 42px; line-height: 50.4px; } }
@media (max-width: 809.98px) {
  .rwg-az { position: static; flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 30px; padding: 8px 20px; border-radius: 0; box-shadow: none; background: transparent; scrollbar-width: none; }
  .rwg-az::-webkit-scrollbar { display: none; }
  .rwg-az a, .rwg-az span { flex: none; width: 34px; background: #fff; }
  .rwg-grp { grid-template-columns: 1fr; gap: 10px; }
  .rwg-letter { position: static; font-size: 38px; line-height: 45.6px; }
  .rwg-term { padding: 20px; }
  .rwg-term .rwp-body { font-size: 16px; }
  .rwg-chips { flex-wrap: nowrap; margin: 0 -20px 24px; }
}
@media (prefers-reduced-motion: reduce) { .rwb-card, .rwb-chip, .rwb-toc--m summary svg, .rwg-link svg { transition: none; } }

/* Hamza 12/2: author avatar is the real Rankwyre mark, not a letter */
.rwb-av { background: none; overflow: hidden; }
.rwb-av img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* item 42 (Hamza 12/3): list built for scanning. Term and topic on the left, definition on the right. A to Z bar sits below the navbar pill (bottom edge about 94px), sections land below both. */
.rwg-term { display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: 30px; row-gap: 6px; align-items: start; }
.rwg-term__h { grid-column: 1; grid-row: 1 / span 2; flex-direction: column; align-items: flex-start; gap: 6px; }
.rwg-term__h .rwp-h3 { font-size: 20px; line-height: 24px; }
.rwg-term > .rwp-body, .rwg-term > .rwg-link { grid-column: 2; }
.rwg-term .rwp-body { max-width: none; font-size: 16px; line-height: 1.55; }
.rwg-topic { padding: 0; border: 0; background: none; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.rwg-grp { grid-template-columns: 70px minmax(0, 1fr); }
.rwg-letter { font-size: 44px; line-height: 1; }
.rwg-term:target { background: var(--fill); }
@media (max-width: 1023.98px) { .rwg-term { grid-template-columns: 1fr; } .rwg-term__h { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; align-items: center; } .rwg-term > .rwp-body, .rwg-term > .rwg-link { grid-column: 1; } .rwg-grp { grid-template-columns: 60px minmax(0, 1fr); } }
@media (max-width: 809.98px) {
  .rwg-az { position: sticky; top: 90px; margin: 0 -20px 24px; padding: 8px 20px; background: #f7f7f7; border-bottom: 1px solid rgba(19, 21, 21, .08); }
  .rwg-grp { scroll-margin-top: 154px; grid-template-columns: 1fr; }
  .rwg-term { scroll-margin-top: 154px; }
  .rwg-letter { position: static; font-size: 34px; }
}
@media (min-width: 1200px) { .rwg-az { flex-wrap: nowrap; justify-content: space-between; } .rwg-az a, .rwg-az span { flex: 1 1 0; min-width: 0; } }
