/* Scale Marketing · the insights library and its articles, in the site's own idiom.
   21 Oct 2026: loads after /assets/css/site.css and adds only what the library needs:
   the shelf grid, the article measure, the "what if" lines, the "what it adds up to" panel
   and the in-shelf aside. Tokens, nav, footer, contact and motion come from site.css. */

/* ---------- The library ---------- */
.library-hero h1 { max-width: 14ch; }
.library-hero .lede { max-width: 54ch; }
.shelf-nav { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.shelf-nav .chip { color: var(--ice); border-color: rgba(255,255,255,.22); }
.shelf-nav a.chip:hover { background: var(--chalk); color: var(--midnight); border-color: var(--chalk); }
.shelf-nav .chip .n { color: var(--teal-bright); font-weight: 700; font-variant-numeric: tabular-nums; }

.shelf { scroll-margin-top: 84px; }
.shelf .sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 32px; align-items: baseline; max-width: none; margin-bottom: clamp(28px, 4vw, 44px); }
.shelf .sec-head h2 { grid-column: 1 / span 5; font-size: clamp(28px, 3.2vw, 44px); }
.shelf .sec-head p { grid-column: 6 / span 6; margin-top: 0; }
.shelf .sec-head .count { grid-column: 12 / span 1; justify-self: end; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.shelf + .shelf { padding-top: 0; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards a { display: flex; flex-direction: column; gap: 12px; min-height: 100%; padding: 24px 22px 20px; border-radius: var(--radius); background: var(--milk); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .25s; }
.cards a:hover { transform: translateY(-3px); box-shadow: 0 24px 50px rgba(13,19,72,.14); border-color: rgba(21,21,46,.2); }
.cards .k { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--royal); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cards .k time { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.cards h3 { font-size: clamp(20px, 1.7vw, 24px); letter-spacing: -0.025em; line-height: 1.12; }
.cards p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.cards .rd { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; text-decoration-color: rgba(21,21,46,.3); transition: text-decoration-color .25s; }
.cards a:hover .rd { text-decoration-color: currentColor; }
.cards li.lead a { background: linear-gradient(180deg, #171F66 0%, #101756 100%); color: var(--chalk); border-color: rgba(47,212,190,.3); }
.cards li.lead .k { color: var(--teal-bright); }
.cards li.lead .k time { color: var(--sky); }
.cards li.lead h3 { color: var(--milk); }
.cards li.lead p { color: var(--ice); }
.cards li.lead .rd { color: var(--milk); text-decoration-color: rgba(157,180,255,.5); }

/* ---------- An article ---------- */
.article-hero h1 { max-width: 20ch; font-size: clamp(34px, 4.6vw, 68px); }
.article-hero h1 .nw { white-space: nowrap; }
.article-hero .meta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; font-size: var(--small); color: var(--sky); }
.article-hero .meta b { color: var(--ice); font-weight: 600; }
.article-hero .meta time { font-variant-numeric: tabular-nums; }

.article-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 48px; align-items: start; }
.article-body { grid-column: 2 / span 7; max-width: 66ch; }
.article-aside { grid-column: 10 / span 3; position: sticky; top: 96px; }

.article-body > * + * { margin-top: 18px; }
.article-body p { font-size: var(--lede); line-height: 1.55; color: var(--ink); }
.article-body p.lead { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.4; letter-spacing: -0.015em; font-weight: 500; }
.article-body p.lead + p.lead { margin-top: 14px; }
.article-body h2 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.025em; line-height: 1.15; margin-top: 44px; max-width: 28ch; }
.article-body h2 + p { margin-top: 14px; }
.article-body a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(21,21,46,.3); font-weight: 600; }
.article-body a:hover { text-decoration-color: currentColor; }
.article-body ul, .article-body ol { padding-left: 20px; color: var(--ink); font-size: var(--lede); line-height: 1.5; }
.article-body li + li { margin-top: 8px; }

/* The "what if" lines: the same shape as the five questions on your-book. */
.article-body .wi { margin-top: 0; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: clamp(17px, 1.45vw, 21px); font-weight: 500; letter-spacing: -0.015em; line-height: 1.35; display: flex; gap: 14px; align-items: baseline; }
.article-body :not(.wi) + .wi { margin-top: 26px; border-top: 1px solid var(--line); }
.article-body .wi::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex: none; position: relative; top: -4px; }
.article-body .wi + :not(.wi) { margin-top: 26px; }

/* What it adds up to: the outcome, in a panel the rest of the site would recognise. */
.article-body .addsup { margin-top: 40px; background: linear-gradient(180deg, #171F66 0%, #101756 100%); color: var(--chalk); border: 1px solid rgba(47,212,190,.3); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px) clamp(22px, 3vw, 32px); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; font-weight: 500; letter-spacing: -0.015em; box-shadow: 0 30px 60px rgba(13,19,72,.16), 0 2px 6px rgba(13,19,72,.08); text-wrap: pretty; }
.article-body .addsup + p { margin-top: 24px; }
.article-body p.more { font-size: var(--small); color: var(--muted); }

/* In the same shelf: a short list beside the article. */
.article-aside .kicker { display: block; }
.article-aside h2 { margin-top: 12px; font-size: clamp(20px, 1.7vw, 24px); letter-spacing: -0.025em; line-height: 1.15; }
.article-aside ul { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.article-aside li { border-bottom: 1px solid var(--line); }
.article-aside li a { display: block; padding: 14px 0; font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; transition: color .2s; }
.article-aside li a:hover { color: var(--royal); }
.article-aside li a small { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.article-aside .back { display: inline-block; margin-top: 18px; font-size: var(--small); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .article-body { grid-column: 1 / span 8; }
  .article-aside { grid-column: 9 / span 4; }
}
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf .sec-head h2 { grid-column: 1 / span 6; }
  .shelf .sec-head p { grid-column: 7 / span 5; }
}
@media (max-width: 820px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .shelf .sec-head { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .shelf .sec-head h2, .shelf .sec-head p, .shelf .sec-head .count { grid-column: 1 / -1; justify-self: start; }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .article-body, .article-aside { grid-column: 1 / -1; position: static; max-width: none; }
  .article-hero h1 { max-width: none; }
}
