/* Fire protection blog: the /blog index and every article under /blog/.
   Sits on top of learn.css and uses its tokens, so light and dark mode come
   for free, and the callout styles (.callout.field) are the Learning
   Center's own. */

/* ------------------------------------------------------------------ index */
.bl { max-width: 1080px; padding-top: 8px; }
.bl h1 { font-family: "Poppins", sans-serif; font-weight: 800; font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08; letter-spacing: -.02em; color: var(--ink); margin: 10px 0 0; text-wrap: balance; }
.bl-lede { font-size: 19px; line-height: 1.6; color: var(--body); margin: 18px 0 0; max-width: 62ch; }

.bl-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 34px; }
.bl-chip { font: inherit; font-size: 15px; font-weight: 500; padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--body); cursor: pointer; }
.bl-chip:hover { border-color: var(--brand); color: var(--brand-d); }
.bl-chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.bl-chip span { opacity: .7; margin-left: 4px; }

.bl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bl-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); text-decoration: none;
  transition: border-color .15s ease, transform .15s ease; }
.bl-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.bl-card[hidden] { display: none; }
.bl-card.is-feature { grid-column: 1 / -1; padding: 30px; }
.bl-card h2 { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 20px; line-height: 1.3;
  color: var(--ink); margin: 12px 0 10px; letter-spacing: -.01em; }
.bl-card.is-feature h2 { font-size: clamp(22px, 3vw, 28px); }
.bl-card p { font-size: 15.5px; line-height: 1.6; color: var(--body); margin: 0; }
.bl-card .bl-meta { margin-top: auto; padding-top: 18px; }

/* Shared by cards and article headers. */
.bl-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bl-tag { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-d); background: var(--brand-l); border-radius: 999px; padding: 4px 10px; }
.bl-cite { font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px; }
.bl-meta { font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- article */
.ar { max-width: 760px; padding-top: 8px; }
.ar-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.ar-crumbs a { color: var(--brand-d); font-weight: 600; }
.ar h1 { font-family: "Poppins", sans-serif; font-weight: 800; font-size: clamp(28px, 4.6vw, 42px);
  line-height: 1.12; letter-spacing: -.02em; color: var(--ink); margin: 14px 0 0; text-wrap: balance; }
.ar-dek { font-size: 19px; line-height: 1.6; color: var(--body); margin: 16px 0 0; }
.ar-by { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-bottom: 26px;
  border-bottom: 1px solid var(--line); }
.ar-by img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ar-by b { display: block; font-size: 15px; color: var(--ink); font-weight: 600; }
.ar-by span { font-size: 14px; color: var(--muted); }

/* Shown until Joe signs an article off. Remove the element (and the robots
   noindex in <head>) when he does. */
.ar-draft { margin-top: 22px; background: color-mix(in srgb, var(--amber) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line)); border-radius: 12px;
  padding: 12px 16px; font-size: 14.5px; color: var(--ink); }
.ar-draft b { color: var(--amber); }

.ar-body { margin-top: 30px; }
.ar-body h2 { font-family: "Poppins", sans-serif; font-weight: 700; font-size: clamp(21px, 2.8vw, 26px);
  letter-spacing: -.015em; color: var(--ink); margin: 40px 0 12px; scroll-margin-top: 96px; }
.ar-body p, .ar-body li { font-size: 17.5px; line-height: 1.7; color: var(--body); }
.ar-body p { margin: 0 0 16px; }
.ar-body ul, .ar-body ol { margin: 0 0 18px; padding-left: 22px; }
.ar-body li { margin-bottom: 6px; }
.ar-body li::marker { color: var(--brand); }
.ar-body strong { color: var(--ink); }
.ar-body .callout { margin: 24px 0; }
.ar-body .callout p { font-size: 16px; margin: 0; }

.ar-table { width: 100%; border-collapse: collapse; margin: 8px 0 22px; font-size: 16px; }
.ar-table th, .ar-table td { text-align: left; vertical-align: top; padding: 12px 14px;
  border-bottom: 1px solid var(--line); line-height: 1.55; }
.ar-table th { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 14px; color: var(--ink);
  background: var(--tint); }
.ar-table td { color: var(--body); }
.ar-table td:first-child { color: var(--ink); font-weight: 600; width: 38%; }
.ar-scroll { overflow-x: auto; }

.ar-sources { margin-top: 40px; background: var(--tint); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; }
.ar-sources h2 { font-size: 18px !important; margin: 0 0 10px !important; }
.ar-sources p, .ar-sources li { font-size: 15.5px !important; }
.ar-sources ul { margin-bottom: 10px; }

.ar-more { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 32px; }
.ar-more h2 { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 21px; color: var(--ink); margin: 0 0 18px; }

@media (max-width: 760px) {
  .bl-grid { grid-template-columns: 1fr; }
  /* One row that scrolls sideways, so the chips do not fill the first screen. */
  .bl-chips { flex-wrap: nowrap; overflow-x: auto; margin: 26px -24px 28px; padding: 0 24px 6px; scrollbar-width: none; }
  .bl-chip { flex: 0 0 auto; white-space: nowrap; }
  .bl-card, .bl-card.is-feature { padding: 22px; }
  .ar-table td:first-child { width: auto; }
}

/* ---------------------------------------------------------------- sign-up */
.bl-sub { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-sm); }
.bl-sub h3 { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 18px; color: var(--ink); margin: 0 0 4px; }
.bl-sub p { font-size: 15px; line-height: 1.55; color: var(--body); margin: 0 0 14px; }
.bl-sub-row { display: flex; gap: 10px; flex-wrap: wrap; }
.bl-sub-row input { flex: 1 1 240px; min-height: 44px; padding: 0 14px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--page); border: 1px solid var(--line); border-radius: 10px; }
.bl-sub-row input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.bl-sub-row .btn { min-height: 44px; }
.bl-sub .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.bl-sub-msg { font-size: 14.5px; margin: 10px 0 0 !important; min-height: 1.2em; color: var(--muted); }
.bl-sub-msg.ok { color: var(--brand-d); font-weight: 600; }
.bl-sub-msg.err { color: var(--fa); font-weight: 600; }
.bl-index-sub { margin: 26px 0 0; max-width: 640px; }
.bl-confirm { max-width: 560px; margin-top: 8px; }
.ar-sub { margin-top: 40px; }

/* ----------------------------------------------------------------- images */
.bl-card-img { margin: -24px -24px 18px; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0; background: var(--tint); }
.bl-card.is-feature .bl-card-img { margin: -30px -30px 20px; }
.bl-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.bl-card:hover .bl-card-img img { transform: scale(1.03); }
.ar-hero { margin: 26px 0 0; }
.ar-hero img { width: 100%; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.ar-hero.is-diagram img { border: 1px solid var(--line); box-shadow: none; }
.ar-hero figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.ar-hero figcaption a { color: var(--muted); text-decoration: underline; }
@media (max-width: 760px) {
  .bl-card-img, .bl-card.is-feature .bl-card-img { margin: -22px -22px 16px; }
}

/* The newest article: image left, text right, so it does not fill the screen. */
@media (min-width: 761px) {
  .bl-card.is-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: 30px; align-content: center; }
  .bl-card.is-feature > * { grid-column: 2; }
  .bl-card.is-feature .bl-card-img { grid-column: 1; grid-row: 1 / span 4; margin: -30px 0 -30px -30px;
    aspect-ratio: auto; min-height: 100%; height: calc(100% + 60px);
    border-radius: var(--radius) 0 0 var(--radius); }
  .bl-card.is-feature .bl-tags { align-self: end; }
  .bl-card.is-feature .bl-meta { margin-top: 0; padding-top: 14px; align-self: start; }
}
