/* ==========================================================================
   Blog and glossary hubs, 2026 - the Toybox Calm look (assets/css/toybox-calm.css) for the two index pages
   On top of the shared family stylesheet (loaded first by _ToyboxCalmHead):
   - the blog: the family's blue header with the search, the topics and the latest post; on the light page below, white
     cards with each post's artwork inset on the header's blue and a yellow arrow, every post on the one page; the
     sign-up, large and centred, to close;
   - the glossary: a dictionary page (the search in the header, a sticky A to Z, the terms in newspaper columns) and the
     sign-up panel the posts end with.
   Every class starts with bh-. Used by Views/Public/Blog.cshtml (/blog) and Views/Public/Glossary.cshtml (/glossary),
   which link it after the head partial with a ?v= cache buster from StaticAssetVersion. Scripts/blog-hub/blog-hub.js
   runs the search and the blog's topics (hooks: [data-bh-search], [data-bh-item], [data-bh-group],
   [data-bh-topic-filter], [data-bh-count], [data-bh-empty]); without it every card shows.
   Picked from the hub design options in October 2026 ("Blue header, light library"; "B1, larger pictures").
   ========================================================================== */

/* The blue the posts' artwork is drawn for: the article header's, top to bottom */
.bh-root { --bh-art-bg: radial-gradient(ellipse 60% 45% at 20% 18%, rgba(255, 255, 255, .12), transparent 70%), linear-gradient(170deg, #211B58 0, #2D2981 42%, #3F50C2 100%); }

/* ==========================================================================
   SHARED: the header's spacing, the search, the count, an empty search, a picture
   ========================================================================== */
.bh-hero { padding-bottom: 72px; }
@media (min-width: 992px) { .bh-hero { padding-bottom: 96px; } }
.bh-main { padding-top: 0; }

/* The search, its count inside it */
.bh-find { display: flex; align-items: center; gap: 4px; min-height: 60px; padding: 0 22px 0 20px; border: 3px solid var(--tc-ink); border-radius: 999px; background: #fff; box-shadow: 0 6px 0 var(--tc-deep); color: var(--tc-ink); }
/* Focused: a yellow ring, with the drop shadow moved out to sit under the ring (drawn under it, so it never cuts it) */
.bh-find:focus-within { box-shadow: 0 0 0 5px var(--tc-yellow), 0 6px 0 5px var(--tc-deep); }
.tc-root .bh-find > i.bx { font-size: 1.4rem; color: var(--tc-muted); }
.tc-root .bh-find__input { flex: 1 1 auto; min-width: 0; height: 54px; margin: 0; padding: 0 10px; border: 0; background: none; font: 600 1.0625rem/1 var(--tc-display); color: var(--tc-ink); -webkit-appearance: none; appearance: none; }
.tc-root .bh-find__input::placeholder { color: var(--tc-muted); opacity: 1; }
.tc-root .bh-find__input:focus { outline: none; box-shadow: none; }
.bh-count { flex: none; margin: 0; font: 600 .875rem/1.3 var(--tc-display); color: var(--tc-muted); font-variant-numeric: tabular-nums; }
.bh-count b { color: var(--tc-ink); }

/* Nothing matches the search */
.bh-empty { margin: 0 0 30px; padding: 28px 22px; border: 2px dashed rgba(47, 42, 79, .35); border-radius: 20px; background: rgba(255, 255, 255, .7); text-align: center; color: var(--tc-ink-2); }
.bh-empty p { margin: 0 0 6px; font: 600 1.0625rem/1.4 var(--tc-display); color: var(--tc-ink); }

/* A picture: a post's or term's header artwork centred on the header's blue, with room all round (in a card it floats;
   only the post's own header stands it on the edge), or an older post's picture shown whole */
.bh-pic { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bh-art-bg); }
.bh-pic img { display: block; width: auto; height: 80%; max-width: 86%; object-fit: contain; object-position: 50% 50%; }
.bh-pic--photo { align-items: center; padding: 14px; }
.bh-pic--photo img { width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: 50% 50%; }

/* The yellow arrow on a post's picture */
.bh-go { position: absolute; z-index: 1; right: 10px; bottom: 10px; display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--tc-ink); border-radius: 13px; background: var(--tc-yellow); box-shadow: 0 3px 0 var(--tc-ink); font-size: 1.25rem; color: var(--tc-ink); transition: transform .15s ease; }

/* A byline: the author's photo (linked as before), name and date */
.bh-by { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 12px; border-top: 2px dashed var(--tc-line); font-size: .8125rem; color: var(--tc-muted); }
.bh-by__link { flex: none; display: block; border-radius: 50%; }
.bh-by__photo { display: block; width: 30px; height: 30px; border: 2px solid var(--tc-ink); border-radius: 50%; object-fit: cover; background: var(--tc-sky-2); }
.bh-by__name { font: 600 .875rem/1.2 var(--tc-display); color: var(--tc-ink); }
.bh-by__dot { flex: none; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.bh-by time { white-space: nowrap; }

/* ==========================================================================
   THE BLOG: the header holds the title, the search, the topics and the latest post
   ========================================================================== */
.bh-hero--blog { padding-bottom: 84px; }
.bh-hero__grid { display: grid; gap: 34px; align-items: center; }
@media (min-width: 992px) { .bh-hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; } }
.bh-hero__copy { min-width: 0; }
.bh-hero--blog .bh-find { max-width: 470px; }

/* The topics: chips that filter the cards */
.bh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.bh-chip { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 5px 6px 5px 14px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(255, 255, 255, .06); font: 600 .9375rem/1 var(--tc-display); color: #fff; cursor: pointer; transition: border-color .15s ease; }
.bh-chip::before { content: ""; position: absolute; inset: -3px -2px; }
.bh-chip:hover { border-color: #fff; }
/* How many posts the topic has: a badge of its own inside the chip */
.bh-chip__count { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .18); font: 700 .8125rem/1 var(--tc-display); font-variant-numeric: tabular-nums; color: #fff; }
.bh-chip[aria-pressed="true"] { border-color: var(--tc-ink); background: var(--tc-yellow); color: var(--tc-ink); box-shadow: 0 3px 0 var(--tc-deep); }
.bh-chip[aria-pressed="true"] .bh-chip__count { background: var(--tc-ink); color: #fff; }

/* The latest post, in the header */
.bh-lead { position: relative; display: grid; min-width: 0; background: #fff; color: var(--tc-ink); border: 3px solid var(--tc-ink); border-radius: 28px; box-shadow: 0 8px 0 var(--tc-deep), 0 30px 60px -24px rgba(15, 12, 44, .6); }
@media (min-width: 640px) { .bh-lead { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.bh-lead__pic { position: relative; display: block; overflow: hidden; border-bottom: 3px solid var(--tc-ink); border-radius: 25px 25px 0 0; }
.bh-lead__pic .bh-pic { height: 100%; }
@media (min-width: 640px) {
  .bh-lead__pic { border-bottom: 0; border-right: 3px solid var(--tc-ink); border-radius: 25px 0 0 25px; }
  .bh-lead__pic .bh-pic { aspect-ratio: auto; min-height: 330px; }
  /* Pinned to the tile's middle, so the artwork's own height doesn't stretch the card: the words set its height */
  .bh-lead__pic .bh-pic img { position: absolute; top: 50%; left: 50%; height: 80%; transform: translate(-50%, -50%); }
}
.bh-lead__body { display: flex; flex-direction: column; justify-content: center; gap: 12px; min-width: 0; padding: 26px; }
.bh-tag { display: inline-flex; align-self: flex-start; align-items: center; gap: 5px; margin: 0; padding: 4px 11px 3px; border: 2px solid var(--tc-ink); border-radius: 999px; background: var(--tc-yellow); box-shadow: 0 2px 0 var(--tc-ink); font: 700 .75rem/1.2 var(--tc-display); letter-spacing: .08em; text-transform: uppercase; color: var(--tc-ink); white-space: nowrap; }
.tc-root .bh-lead__title { margin: 0; font: 700 clamp(1.4rem, 1.1rem + .9vw, 1.85rem)/1.15 var(--tc-display); color: var(--tc-ink); }
.tc-root .bh-lead__title a, .tc-root .bh-post__title a { color: var(--tc-ink); text-decoration: none; }
.tc-root .bh-lead__title a:hover, .tc-root .bh-post__title a:hover { text-decoration: underline; text-decoration-color: var(--tc-yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.bh-lead__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; margin: 0; font-size: .9688rem; line-height: 1.55; color: var(--tc-ink-2); }
.bh-lead .bh-go { right: 14px; bottom: 14px; }
.bh-lead:hover .bh-go, .bh-post:hover .bh-go { transform: translate(2px, -2px); }

/* ---------- The cards, on the light page ---------- */
/* What the cards are (every article, a topic or the search's results) and how many */
.bh-rule { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0 0 26px; padding: 10px 0 14px; border-bottom: 2px solid rgba(47, 42, 79, .14); }
.bh-rule__title { margin: 0; font: 700 1.5rem/1.1 var(--tc-display); color: var(--tc-ink); }
.bh-rule__shown { margin: 0; font: 600 .9375rem/1.2 var(--tc-display); color: var(--tc-muted); }

.bh-posts { display: grid; gap: 24px; }
@media (min-width: 640px) { .bh-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .bh-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* A card: the picture inset on blue with the arrow, the topic, the title, the line and the byline */
.bh-post { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 10px; background: #fff; border: 3px solid var(--tc-ink); border-radius: 24px; box-shadow: 0 6px 0 var(--tc-ink); transition: transform .15s ease, box-shadow .15s ease; }
.bh-post:hover { transform: translateY(-4px); box-shadow: 0 9px 0 var(--tc-ink); }
.bh-post__pic { position: relative; display: block; overflow: hidden; border-radius: 16px; }
.bh-post__pic .bh-pic { aspect-ratio: 16 / 11; }
.bh-post__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 9px; padding: 16px 10px 6px; }
.bh-topic { align-self: flex-start; margin: 0; padding: 2px 9px 1px; border-radius: 999px; background: var(--tc-lilac); font: 600 .75rem/1.5 var(--tc-display); color: var(--tc-ink); }
.tc-root .bh-post__title { margin: 0; font: 700 1.25rem/1.25 var(--tc-display); color: var(--tc-ink); text-wrap: balance; }
.bh-post__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0; font-size: .9063rem; line-height: 1.55; color: var(--tc-ink-2); }
.bh-post__text + .bh-post__text { -webkit-line-clamp: 2; }
.bh-post .bh-by { margin-top: auto; }
.bh-post__text + .bh-by { margin-top: auto; }

/* The Blog Library: its heading and its three cards take their places in the grid */
.bh-library { display: contents; }
.tc-root .bh-library__title { grid-column: 1 / -1; margin: 18px 0 -4px; font: 700 clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem)/1.1 var(--tc-display); color: var(--tc-ink); }

/* The sign-up: the posts' sign-up words, large and centred on the light page, "Try for free." on the title's yellow
   card, so the page closes the way it opens */
.bh-signup { padding: 16px 0 88px; text-align: center; }
.bh-signup__kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 18px; padding: 5px 13px 4px; border: 2px solid var(--tc-ink); border-radius: 999px; background: #fff; box-shadow: 0 3px 0 var(--tc-ink); font: 600 .8125rem/1.2 var(--tc-display); letter-spacing: .08em; text-transform: uppercase; color: var(--tc-ink); }
.tc-root .bh-signup__kicker i.bx { font-size: 1.05rem; color: var(--tc-coral); }
.tc-root .bh-signup__title { margin: 0 0 14px; font: 700 clamp(2.4rem, 1.4rem + 3.6vw, 4.6rem)/1.06 var(--tc-display); color: var(--tc-ink); text-wrap: balance; }
.bh-signup__title .tc-title__hl { box-shadow: 0 5px 0 var(--tc-ink); }
.bh-signup__sub { margin: 0 0 28px; font: 500 1.25rem/1.4 var(--tc-display); color: var(--tc-ink-2); }
.bh-signup .tc-btns { justify-content: center; }

/* ==========================================================================
   THE GLOSSARY: a dictionary page. The search in the header, the A to Z stuck under the site's header, and every term
   on one white page in newspaper columns, under its letter, beside its page's artwork
   ========================================================================== */
.bh-hero__row { display: grid; gap: 24px 56px; align-items: end; }
@media (min-width: 992px) { .bh-hero__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* Room under the header for the A to Z, which rises into it */
.bh-hero--glossary { padding-bottom: 104px; }
@media (min-width: 992px) { .bh-hero--glossary { padding-bottom: 112px; } }

/* The A to Z: rises into the header, then sticks under the site's fixed header (76px) as the page scrolls */
.bh-az { position: sticky; top: 84px; z-index: 5; margin: -64px 0 28px; }
.bh-az__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 9px 10px; background: #fff; border: 3px solid var(--tc-ink); border-radius: 999px; box-shadow: var(--tc-drop); }
.bh-az__letter { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 700 1.0625rem/1 var(--tc-display); color: var(--tc-ink); text-decoration: none; transition: background-color .15s ease; }
.tc-root a.bh-az__letter:hover, .tc-root a.bh-az__letter:focus { color: var(--tc-ink); text-decoration: none; background: var(--tc-yellow); }
/* The letter the reader jumped to (the script marks it) */
.tc-root a.bh-az__letter[aria-current="location"] { background: var(--tc-yellow); box-shadow: inset 0 0 0 2px var(--tc-ink); }
/* A letter no term starts with: shown for the shape of the alphabet, but quiet (and left out on phones) */
.bh-az__letter--off { color: rgba(47, 42, 79, .25); }
/* On phones: one row that slides sideways, so the bar stays one line tall */
@media (max-width: 767.98px) {
  .bh-az__list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; border-radius: 22px; scrollbar-width: none; }
  .bh-az__list::-webkit-scrollbar { display: none; }
  .bh-az__list li { flex: none; }
  .bh-az__letter--off { display: none; }
}

/* The page: its letters in newspaper columns */
.bh-dict { padding: 30px 30px 8px; background: #fff; border: 3px solid var(--tc-ink); border-radius: 30px; box-shadow: var(--tc-drop-lg); column-gap: 36px; column-rule: 2px dashed rgba(47, 42, 79, .12); }
@media (min-width: 720px) { .bh-dict { columns: 2; } }
@media (min-width: 1150px) { .bh-dict { columns: 3; } }
@media (max-width: 575.98px) { .bh-dict { padding: 20px 16px 4px; border-radius: 24px; } }
/* A letter and its terms stay together; a jump to a letter stops clear of both bars */
.bh-dict__letter { break-inside: avoid; margin: 0 0 22px; }
.tc-root .bh-dict__letter { scroll-margin-top: 168px; }
/* ...and lands lit: the letter's section on butter, ringed in ink (drawn outside it, so nothing moves) */
.bh-dict__letter:target { border-radius: 18px; background: var(--tc-butter); box-shadow: 0 0 0 12px var(--tc-butter), 0 0 0 15px var(--tc-ink); }
.bh-dict__mark { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 700 2.25rem/1 var(--tc-display); color: var(--tc-ink); }
.bh-dict__mark::before { content: ""; width: 14px; height: 14px; border: 3px solid var(--tc-ink); border-radius: 50%; background: var(--tc-yellow); }

/* A term: its artwork, its name (the link covers the row) and three lines of its definition (the rest is in the page) */
.bh-term { position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: center; margin: 0 -8px; padding: 10px 8px; border-radius: 18px; transition: background-color .15s ease; }
.bh-term:hover { background: var(--tc-sky-0); }
/* A link to #Quishing lands with its row lit, clear of both bars */
.bh-term:has(.bh-term__name:target) { background: var(--tc-butter); }
.bh-term__pic { width: 104px; height: 104px; border: 3px solid var(--tc-ink); border-radius: 22px; box-shadow: 0 4px 0 var(--tc-ink); transition: transform .15s ease; }
.bh-term__pic img { height: 82%; }
.bh-term:hover .bh-term__pic { transform: translateY(-2px); }
/* A term whose page isn't a glossary page has no artwork: the definition's book mark instead */
.tc-root .bh-term__pic i.bx { align-self: center; width: auto; font-size: 2.6rem; color: var(--tc-yellow); }
.bh-term__copy { min-width: 0; }
.tc-root .bh-term__name { margin: 0 0 4px; font: 700 1.1875rem/1.2 var(--tc-display); color: var(--tc-ink); scroll-margin-top: 200px; }
.tc-root .bh-term__name a { color: var(--tc-ink); text-decoration: none; }
.tc-root .bh-term__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 18px; }
.tc-root .bh-term:hover .bh-term__name a { text-decoration: underline; text-decoration-color: var(--tc-yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.tc-root .bh-term__name a:focus-visible { outline: none; box-shadow: none; }
.tc-root .bh-term__name a:focus-visible::after { outline: 3px solid var(--tc-ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--tc-yellow); }
.bh-term__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0; font-size: .875rem; line-height: 1.45; color: var(--tc-ink-2); }
@media (max-width: 575.98px) { .bh-term { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; } .bh-term__pic { width: 84px; height: 84px; border-radius: 18px; } }

/* The glossary's sign-up panel: the posts' closing panel, in the words of the site's own sign-up form */
.bh-cta { gap: 22px; margin-top: 64px; }
@media (min-width: 992px) { .bh-cta { padding: 44px 48px; } }
.tc-root .bh-cta .tc-h3 { margin: 0 0 6px; color: #fff; }
.bh-cta p { margin: 0; }

/* ---------- Reduced motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  .bh-post:hover, .bh-lead:hover .bh-go, .bh-post:hover .bh-go, .bh-term:hover .bh-term__pic { transform: none; }
}
@media print {
  .bh-find, .bh-chips, .bh-signup, .bh-az, .bh-empty, .bh-cta { display: none !important; }
  .bh-post, .bh-term { break-inside: avoid; box-shadow: none; }
  .bh-post[hidden] { display: flex !important; }
  .bh-term__text, .bh-post__text, .bh-lead__text { display: block; }
}
