/* Blog pages (/blog/, /blog/<category>/, /blog/<slug>/). Built by notes/blog/blog.py, copied to css/blog.css.
   Uses the hub.css tokens (--bg, --gold, --display ...) so the blog reads as the same brand. */

.bl { padding-bottom: 24px; }
.bl a { color: inherit; }

/* ---- list pages */
.bl-hero { padding: 48px 0 28px; position: relative; overflow-x: clip; }
.bl-hero::before { content: ""; position: absolute; inset: -60px 0 auto; height: 420px; pointer-events: none;
  background: radial-gradient(55% 60% at 75% 30%, rgba(240,180,41,0.09), transparent 70%); }
.bl-hero .wrap { position: relative; display: grid; gap: 16px; }
.bl-hero h1 { font-size: clamp(44px, 7vw, 92px); line-height: 0.95; }
.bl-hero .lede { max-width: 640px; }
.bl-hero .eyebrow a { text-decoration: none; }
.bl-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bl-cats a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2);
  border-radius: 999px; font-size: 14px; color: var(--text-2); text-decoration: none; transition: border-color .2s, color .2s; }
.bl-cats a:hover, .bl-cats a[aria-current] { border-color: var(--gold); color: var(--text); }
.bl-list { padding: 12px 0 64px; }

.bl-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.bl-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; min-height: 220px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); text-decoration: none;
  transition: transform .2s var(--ease), border-color .2s, background .2s; }
.bl-card:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--panel-2); }
.bl-card-cat { font: 600 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.bl-card-title { font-size: 21px; line-height: 1.25; font-weight: 700; color: var(--text); }
.bl-card-desc { font-size: 15px; line-height: 1.5; color: var(--text-2); }
.bl-card-more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--text); }

/* ---- article */
.bl-grid { display: grid; gap: 40px; padding-top: 28px; }
.bl-art { min-width: 0; max-width: 720px; }
.bl-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 600 12px/1 var(--mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.bl-crumbs a { text-decoration: none; color: var(--gold); min-height: 44px; display: inline-flex; align-items: center; }
.bl-hero .eyebrow a { display: inline-flex; align-items: center; min-height: 44px; margin: -16px 0; }
.bl-art h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1; }
.bl-meta { margin-top: 16px; font-size: 14px; color: var(--muted); }

.bl-body { margin-top: 28px; font-size: 18px; line-height: 1.7; color: var(--text-2); }
.bl-body > * + * { margin-top: 20px; }
.bl-body p, .bl-body li { overflow-wrap: anywhere; }
.bl-body strong { color: var(--text); font-weight: 650; }
.bl-body a { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.bl-body a:hover { color: var(--gold); }
.bl-body h2 { font-family: var(--sans); text-transform: none; font-weight: 750; letter-spacing: -0.01em;
  font-size: clamp(25px, 3vw, 31px); line-height: 1.2; color: var(--text); margin-top: 48px; scroll-margin-top: 84px; }
.bl-body h3 { font-size: 21px; line-height: 1.3; color: var(--text); margin-top: 32px; scroll-margin-top: 84px; }
.bl-body ul, .bl-body ol { padding-left: 1.3em; }
.bl-body li + li { margin-top: 10px; }
.bl-body li::marker { color: var(--gold); font-weight: 700; }
.bl-body code { font: 500 0.88em var(--mono); background: var(--panel-2); padding: 2px 6px; border-radius: 6px; color: var(--text); }
.bl-body blockquote { margin: 28px 0 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold); color: var(--text); font-size: 19px; }
.bl-body figure { margin: 32px 0 0; }
.bl-body figure img { border-radius: 14px; border: 1px solid var(--line); width: 100%; height: auto; }
.bl-body figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* the answer: the first paragraph, what a searcher came for */
.bl-body .bl-answer { font-size: clamp(19px, 2vw, 21px); line-height: 1.55; color: var(--text); padding: 18px 20px;
  background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; }

.bl-table { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
.bl-table table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 420px; }
.bl-table th, .bl-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bl-table th { color: var(--text); font-weight: 650; background: var(--panel); }
.bl-table tr:last-child td { border-bottom: 0; }

/* product box: one of our tools, wording from products.json only; the picture is shown whole */
.bl-prod { display: grid; gap: 18px; margin-top: 36px !important; padding: 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); }
.bl-prod-img { background: #050505; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.bl-prod-img img { width: 100%; height: auto; max-height: 260px; object-fit: contain; }
.bl-prod-txt { display: grid; gap: 8px; align-content: start; font-size: 16px; line-height: 1.55; }
.bl-kind { font: 600 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bl-prod-name { font: 400 28px/1 var(--display); text-transform: uppercase; color: var(--text); }
.bl-prod-line { color: var(--text); font-weight: 600; }
.bl-prod .btn { justify-self: start; margin-top: 6px; text-decoration: none; }

/* call to action: the same box in every article, text from settings.json */
.bl-cta { margin-top: 48px !important; padding: 30px 24px; border-radius: var(--radius); text-align: left;
  background: radial-gradient(80% 120% at 100% 0%, rgba(240,180,41,0.16), transparent 60%), var(--panel);
  border: 1px solid rgba(240,180,41,0.35); display: grid; gap: 14px; }
.bl-cta-title { font: 400 clamp(30px, 4vw, 44px)/1 var(--display); text-transform: uppercase; color: var(--text); }
.bl-cta p { font-size: 17px; }
.bl-cta .btn { justify-self: start; text-decoration: none; color: var(--ivory-ink); max-width: 100%; }
.bl-cta .btn:hover { color: var(--ivory-ink); }
.bl-cta-note { font-size: 14px !important; color: var(--muted); }

.bl-side { display: none; }
.bl-toc { display: grid; gap: 2px; }
.bl-toc p { font: 600 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.bl-toc a { font-size: 14.5px; line-height: 1.4; color: var(--text-2); text-decoration: none; padding: 8px 0 8px 14px;
  border-left: 2px solid var(--line); transition: color .2s, border-color .2s; }
.bl-toc a:hover { color: var(--text); border-color: var(--gold); }

.bl-related { margin-top: 72px; padding: 48px 0 40px; border-top: 1px solid var(--line); }
.bl-h { font: 400 clamp(30px, 4vw, 44px)/1 var(--display); text-transform: uppercase; margin-bottom: 24px; }

/* phones: each table row becomes a small card, label beside value, nothing scrolls sideways */
@media (max-width: 639px) {
  .bl-table { border: 0; overflow: visible; }
  .bl-table table { min-width: 0; font-size: 16px; }
  .bl-table thead { display: none; }
  .bl-table tr { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; background: var(--panel); }
  .bl-table tr + tr { margin-top: 10px; }
  .bl-table td { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .bl-table td::before { content: attr(data-label); color: var(--muted); font-size: 14px; }
  .bl-table td:first-child { color: var(--text); font-weight: 650; }
  .bl-table tr td:last-child { border-bottom: 0; }
}
@media (min-width: 640px) {
  .bl-prod { grid-template-columns: 220px 1fr; align-items: center; }
  .bl-cta { padding: 40px; }
}
@media (min-width: 1080px) {
  .bl-grid { grid-template-columns: minmax(0, 720px) 280px; justify-content: space-between; gap: 64px; padding-top: 40px; }
  .bl-side { display: block; }
  .bl-toc { position: sticky; top: 96px; }
}
@media (max-width: 380px) {
  .bl-cta .btn.big { height: auto; min-height: 56px; padding: 14px 20px; white-space: normal; text-align: center; }
  .bl-body { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .bl-card, .bl-toc a { transition: none; } .bl-card:hover { transform: none; } }

/* pictures drawn in code ({{figure:<name>}}, notes/blog/figures/<name>.svg, inlined) */
.bl-body .bl-fig { margin: 36px 0 0; padding: 20px 16px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.bl-body .bl-fig svg { display: block; width: 100%; height: auto; }
.bl-body .bl-fig text { font-family: var(--sans); }
.bl-body .bl-fig figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
@media (max-width: 480px) { .bl-body .bl-fig { padding: 14px 8px 12px; margin-left: -4px; margin-right: -4px; } }
