/*
 * BS.Web.Blog: a free template's page, its overview cards, a guide's box and the pages behind the mail's links.
 *      <link rel="stylesheet" href="/_content/BS.Web.Blog/bs-template.css">   (the intro also takes bs-article.css)
 *
 * BlogTemplateView.Body writes:
 *
 *   <article class="bs-template">
 *     <header class="bs-template-head"><p class="bs-template-eyebrow">…</p><h1 class="bs-template-title">…</h1>
 *       <p class="bs-template-lead">…</p><ul class="bs-template-files"><li>As Excel</li>…</ul></header>
 *     <div class="bs-template-main"><figure class="bs-template-preview"><img …></figure>
 *       <section class="bs-template-form" id="download"><h2>…</h2><p class="bs-template-error" role="alert">…</p>
 *         <form class="bs-template-fields"><label class="bs-template-label">…</label><input class="bs-template-input" …>
 *           <div class="bs-template-hp">[the honeypot, off screen]</div><p class="bs-template-notice">…</p>
 *           <label class="bs-template-consent"><input type="checkbox"> <span>…</span></label><p class="bs-template-hint">…</p>
 *           <button class="bs-template-submit">…</button><p class="bs-template-privacy"><a>…</a></p></form>
 *         (or <p class="bs-template-closed">…</p>)</section></div>
 *     <div class="bs-article-body bs-template-body">[the intro]</div>
 *     <section class="bs-template-inside"><h2>…</h2><ol>…</ol></section>
 *     <section class="bs-template-faq"><h2>…</h2><details class="bs-template-question"><summary>…</summary><div>…</div></details></section>
 *     <section class="bs-template-related"><h2>…</h2><ul><li><a>…</a></li></ul></section>
 *     <aside class="bs-template-next"><h2>…</h2><a class="bs-template-next-link">…</a></aside>
 *   </article>
 *
 * BlogTemplatePage.Cards writes <ul class="bs-template-cards"> of <li class="bs-template-card">, Box an <aside class="bs-template-box"> for a
 * guide, and the notices <main class="bs-template-notice-page"><section class="bs-template-notice-box"> with the downloads' list.
 * The theme is the article page's: --bs-article-bg, -ink, -muted, -accent, -accent-ink, -surface, -border, -focus, -radius, -font and
 * -font-display (bs-article.css lists them); --bs-template-error colours the form's error. This file only reads them.
 */
/* The theme with its defaults (private: --_bst-*). */
:where(.bs-template, .bs-template-cards, .bs-template-box, .bs-template-notice-page, .bs-template-empty) {
  --_bst-bg: var(--bs-article-bg, #ffffff);
  --_bst-ink: var(--bs-article-ink, #172033);
  --_bst-muted: var(--bs-article-muted, #5a6478);
  --_bst-accent: var(--bs-article-accent, #1d4ed8);
  --_bst-accent-ink: var(--bs-article-accent-ink, #ffffff);
  --_bst-surface: var(--bs-article-surface, #f3f5f9);
  --_bst-border: var(--bs-article-border, #dce1ea);
  --_bst-focus: var(--bs-article-focus, var(--_bst-accent));
  --_bst-radius: var(--bs-article-radius, 1rem);
  --_bst-error: var(--bs-template-error, #b42318);
  box-sizing: border-box;
  color: var(--_bst-ink);
  font-family: var(--bs-article-font, inherit);
}

.bs-template {
  max-width: var(--bs-article-measure, clamp(40rem, 32.381rem + 9.524vw, 46.667rem));
  margin: 0 auto;
  padding: 0 1rem;
}

.bs-template-eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--_bst-accent) 12%, transparent);
  color: var(--_bst-accent);
  font-size: 0.8125rem;
  font-weight: 600;
}

.bs-template-title {
  margin: 0;
  font-family: var(--bs-article-font-display, var(--bs-article-font, inherit));
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  line-height: 1.2;
}

.bs-template-lead {
  margin: 0.75rem 0 0;
  color: var(--_bst-muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.bs-template-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.bs-template-files li {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--_bst-border);
  border-radius: 0.4rem;
  font-size: 0.8125rem;
  color: var(--_bst-muted);
}

.bs-template-main {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}
@media (min-width: 48rem) {
  .bs-template-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.bs-template-preview {
  margin: 0;
}
.bs-template-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--_bst-radius);
  box-shadow: 0 0 0 1px var(--_bst-border), 0 8px 24px color-mix(in srgb, var(--_bst-ink) 10%, transparent);
}

.bs-template-form {
  padding: 1.5rem;
  border-radius: var(--_bst-radius);
  background: var(--_bst-surface);
  box-shadow: inset 0 0 0 1px var(--_bst-border);
}
.bs-template-form h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  line-height: 1.4;
}

.bs-template-fields {
  display: grid;
  gap: 0.75rem;
  position: relative;
}

.bs-template-label {
  font-weight: 600;
  font-size: 0.9375rem;
}

.bs-template-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--_bst-border);
  border-radius: 0.5rem;
  background: var(--_bst-bg);
  color: var(--_bst-ink);
  font: inherit;
}

.bs-template-input:focus-visible,
.bs-template-submit:focus-visible,
.bs-template-consent input:focus-visible,
.bs-template a:focus-visible {
  outline: 2px solid var(--_bst-focus);
  outline-offset: 2px;
}

/* The honeypot stays off screen also when the page's inline style is blocked. */
.bs-template-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.bs-template-notice,
.bs-template-hint,
.bs-template-privacy {
  margin: 0;
  color: var(--_bst-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.bs-template-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.5;
}
.bs-template-consent input {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--_bst-accent);
}

.bs-template-submit,
.bs-template-next-link,
.bs-template-box-link,
.bs-template-download {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--_bst-accent);
  color: var(--_bst-accent-ink);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.bs-template-error {
  margin: 0 0 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--_bst-error) 10%, transparent);
  color: var(--_bst-error);
  font-size: 0.875rem;
}

.bs-template-closed {
  margin: 0;
  color: var(--_bst-muted);
}

.bs-template-inside,
.bs-template-faq,
.bs-template-related,
.bs-template-next {
  margin: 2.5rem 0 0;
}
.bs-template-inside h2,
.bs-template-faq h2,
.bs-template-related h2,
.bs-template-next h2 {
  margin: 0 0 1rem;
  font-family: var(--bs-article-font-display, var(--bs-article-font, inherit));
  font-size: 1.375rem;
  line-height: 1.35;
}

.bs-template-inside ol,
.bs-template-related ul {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.8;
}

.bs-template-related a {
  color: var(--_bst-accent);
}

.bs-template-question {
  border-bottom: 1px solid var(--_bst-border);
  padding: 0.75rem 0;
}
.bs-template-question summary {
  cursor: pointer;
  font-weight: 600;
}
.bs-template-question div {
  color: var(--_bst-ink);
  line-height: 1.6;
}

.bs-template-next {
  padding: 1.5rem;
  border-radius: var(--_bst-radius);
  background: color-mix(in srgb, var(--_bst-accent) 8%, var(--_bst-bg));
}

/* The overview's cards. */
.bs-template-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bs-template-card a {
  display: grid;
  gap: 0.5rem;
  height: 100%;
  box-sizing: border-box;
  padding: 1.25rem;
  border-radius: var(--_bst-radius);
  background: var(--_bst-surface);
  box-shadow: inset 0 0 0 1px var(--_bst-border);
  color: inherit;
  text-decoration: none;
}

.bs-template-card-title {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
}

.bs-template-card-text,
.bs-template-card-files {
  margin: 0;
  color: var(--_bst-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.bs-template-card-link {
  color: var(--_bst-accent);
  font-weight: 600;
}

/* A guide's box offering its template. */
.bs-template-box {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
  margin: 2rem 0;
  padding: 1.25rem;
  border-radius: var(--_bst-radius);
  background: var(--_bst-surface);
  box-shadow: inset 0 0 0 1px var(--_bst-border);
}

.bs-template-box-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.bs-template-box-text {
  margin: 0;
  color: var(--_bst-muted);
}

/* The pages behind the mail's links. */
.bs-template-notice-page {
  max-width: 36rem;
  margin: 3rem auto;
  padding: 0 1rem;
}

.bs-template-notice-box h1 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  line-height: 1.3;
}
.bs-template-notice-box p {
  line-height: 1.6;
}
.bs-template-notice-box form {
  margin: 1.5rem 0 0;
}

.bs-template-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
