/*
 * AI Is Nuts overrides for Blogzine v1.3.0 (Stage 1-3; main staging design since Stage 3).
 * Keep all site-specific styling here so a Blogzine update can be dropped in.
 */

/* Hop Reveal STAGING banner above the sticky navbar (same fix as layouts/_site) */
#hop_reveal_1 > div { z-index: 2000 !important; }
/* On phones the centered STAGING tab would cover the logo: push the header down (staging only, the banner never renders on live) */
@media (max-width: 991.98px) { #hop_reveal_1 + header.header-static { padding-top: 26px; } }

/* Logo C (Nuts Meter gauge) in the navbar */
.navbar-brand { padding-top: 20px; padding-bottom: 20px; }
.navbar-brand .navbar-brand-item { height: 44px; width: auto; }
.navbar-sticky-on .navbar-brand { padding-top: 10px; padding-bottom: 10px; }
.navbar-sticky-on .navbar-brand .navbar-brand-item { height: 34px; }
@media (max-width: 767.98px) {
  .navbar-brand { padding-top: 14px; padding-bottom: 14px; }
  .navbar-brand .navbar-brand-item { height: 34px; }
}
/* Search form inside the dropdown: EE's hidden-fields div must not take a flex slot */
.bz-search .hiddenFields { display: none; }
.nav-search .dropdown-menu { min-width: 300px; }

/* Brand gradient text (hero) */
.bz-grad-text {
  background: linear-gradient(90deg, #2fd4c4 0%, #8c84ff 45%, #ff3b5c 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Card media: one aspect ratio per context, images cropped to fit */
.bz-media { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.bz-r-1x1 .bz-media { aspect-ratio: 1 / 1; border-radius: .5rem; }
.bz-r-3x4 .bz-media { aspect-ratio: 3 / 4; }

/* Neutral placeholder for posts without a lead image (our gauge mark on a dark gradient) */
.bz-ph {
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 20%, #2a2456 0%, #12102a 55%, #07060f 100%);
}
.bz-ph::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(47,212,196,.22) 0%, rgba(140,132,255,.10) 50%, rgba(255,59,92,.22) 100%);
}
.bz-ph-news::before   { background: linear-gradient(135deg, rgba(255,59,92,.30), rgba(140,132,255,.10) 60%, rgba(47,212,196,.12)); }
.bz-ph-music::before  { background: linear-gradient(135deg, rgba(247,195,46,.26), rgba(255,59,92,.14) 55%, rgba(140,132,255,.12)); }
.bz-ph-videos::before { background: linear-gradient(135deg, rgba(76,196,255,.28), rgba(140,132,255,.14) 55%, rgba(255,59,92,.12)); }
.bz-ph-personal::before { background: linear-gradient(135deg, rgba(47,212,196,.28), rgba(140,132,255,.12) 55%, rgba(247,195,46,.12)); }
.bz-ph-mark { position: relative; z-index: 1; width: 34%; max-width: 170px; height: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.55)); }
.bz-r-1x1 .bz-ph-mark { width: 62%; }
.bz-r-3x4 .bz-ph-mark { width: 55%; margin-bottom: 35%; }
.bz-ph-play {
  position: absolute; z-index: 2; right: .75rem; bottom: .75rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(214,41,62,.92); color: #fff; font-size: 1.35rem; box-shadow: 0 6px 20px rgba(0,0,0,.45);
}
.bz-r-1x1 .bz-ph-play { width: 1.6rem; height: 1.6rem; font-size: .95rem; right: .4rem; bottom: .4rem; }
.bz-r-3x4 .bz-ph-play { display: none; }
@media (max-width: 575.98px) {
  .bz-r-3x4 .bz-media { aspect-ratio: 4 / 3; }
  .bz-r-3x4 .bz-ph-mark { width: 30%; margin-bottom: 18%; }
}

/* Badges on cards stay clickable above stretched links */
.bz-cat, .bz-nuts-badge { position: relative; z-index: 2; }
.bz-nuts-badge { white-space: nowrap; }

/* Most Nuts band: our realistic Nuts Meter art, darkened */
.bz-mostnuts { position: relative; background: linear-gradient(90deg, rgba(8,7,20,.55), rgba(8,7,20,.92) 40%, rgba(8,7,20,.96)), url(/images/brand/nuts-meter-gauge.jpg) left center / auto 100% no-repeat, #07060f; }

/* Entry: Nuts Meter panel used as the lead when a post has no image */
.bz-score-panel {
  background: radial-gradient(120% 100% at 30% 15%, #2a2456 0%, #12102a 55%, #07060f 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.bz-score-mark { width: 112px; height: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.55)); }
.bz-score-big { font-family: Rubik, sans-serif; font-weight: 700; font-size: 5rem; line-height: 1; }
.bz-score-of { font-size: 2rem; opacity: .6; margin-left: .15rem; }
.bz-score-label { letter-spacing: .25em; opacity: .8; }
.bz-score-track { background-color: rgba(255,255,255,.12); }
.bz-lead-img { aspect-ratio: 16 / 9; object-fit: cover; }

/* Entry body: content comes from the existing blog_content field */
.bz-body { font-size: 1.0625rem; line-height: 1.75; }
.bz-body img { max-width: 100%; height: auto; border-radius: .5rem; }
.bz-body .ratio { border-radius: .5rem; overflow: hidden; margin: 1.5rem 0 .75rem; }
.bz-body ul, .bz-body ol { margin-bottom: 1.25rem; }
.bz-body li { margin-bottom: .4rem; }
.bz-body > p:first-child::first-letter { float: left; font-family: Rubik, sans-serif; font-weight: 700; font-size: 3.2rem; line-height: .9; padding: .3rem .5rem 0 0; color: var(--bs-primary); }

/* Stage 1-2 comments embed styles (kept harmless; Stage 3 comment styles are further down) */
.bz-comments h1 { font-size: 1.5rem; }
.bz-comments h2 { font-size: 1.15rem; }
.bz-comments h5 { font-size: 1rem; }
.bz-comments .alert { padding: 1rem 0; border: 0; background: transparent; }
.bz-comments em { display: block; font-size: .8rem; opacity: .7; }
.bz-comments .comment { border-bottom: 1px solid var(--bs-border-color); padding: 1rem 0; }
.bz-comments .required { color: var(--bs-danger); }

/* Prev / next cards */
.bz-prevnext a:hover { border-color: var(--bs-primary) !important; }

/* ================= Stage 3: inner pages ================= */
/* Bylines inside cards stay clickable above stretched links */
.bz-author-link { position: relative; z-index: 2; }

/* Inner-page intro banner (listing, about, contact, RSS): dark brand panel instead of a demo photo */
.bz-intro {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 15% 0%, #2a2456 0%, #12102a 55%, #07060f 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.bz-intro::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(47,212,196,.20) 0%, rgba(140,132,255,.08) 45%, rgba(255,59,92,.20) 100%);
}
.bz-intro::after {
  content: ""; position: absolute; right: -60px; top: 50%; width: 260px; height: 260px; transform: translateY(-50%);
  background: url(/images/brand/logo-c-mark-256.png?v=3) center / contain no-repeat; opacity: .14; pointer-events: none;
}
.bz-intro > * { position: relative; z-index: 1; }
.bz-intro .breadcrumb-item a { color: rgba(255,255,255,.8); }
.bz-intro .breadcrumb-item.active { color: rgba(255,255,255,.6); }
.bz-kicker { letter-spacing: .2em; margin-bottom: .35rem; }
@media (max-width: 575.98px) { .bz-intro::after { width: 160px; height: 160px; right: -50px; } }

/* Sidebar category rows */
.bz-catrow { transition: transform .15s ease, box-shadow .15s ease; }
.bz-catrow:hover, .bz-catrow.active { transform: translateX(3px); }
.bz-catrow.active { --bs-bg-opacity: .22; }
html:not([data-bs-theme="dark"]) .bz-catrow .h6 { color: var(--bs-heading-color, #191a1f) !important; }
.bz-catrow { box-shadow: inset 3px 0 0 currentColor; }

/* Search results: small media keeps 16:9 */
.bz-r-16x9 .bz-media { border-radius: .5rem; }
.bz-r-16x9 .bz-ph-mark { width: 40%; }

/* Author box */
.bz-authorbox .avatar-xxl { width: 7rem; height: 7rem; }
.bz-authorbox .avatar-img { object-position: 50% 30%; }

/* About: page nav + body */
.bz-aboutnav .nav-link { color: var(--bs-body-color); border-radius: .5rem; padding: .5rem .75rem; }
.bz-aboutnav .nav-link:hover { background: rgba(var(--bs-primary-rgb), .08); }
.bz-aboutnav .nav-link.active { background: var(--bs-primary); color: #fff; }
.bz-about-body > p:first-child::first-letter { float: none; font-size: inherit; padding: 0; color: inherit; font-weight: inherit; font-family: inherit; }
.bz-about-body h2, .bz-about-body h3 { margin-top: 2rem; }
.bz-figure { display: block; margin-bottom: 1.5rem; }
.bz-figure-left { float: left; max-width: 45%; margin-right: 1.5rem; }
.bz-figure-right { float: right; max-width: 45%; margin-left: 1.5rem; }
@media (max-width: 575.98px) { .bz-figure-left, .bz-figure-right { float: none; max-width: 100%; margin: 0 0 1.5rem; } }
.bz-about-body::after { content: ""; display: table; clear: both; }

/* Comments */
.bz-comment-initial {
  display: inline-flex !important; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2fd4c4, #8c84ff 55%, #ff3b5c); color: #fff;
  font-family: Rubik, sans-serif; font-weight: 700; font-size: 1.25rem; text-transform: uppercase;
}
.bz-comment-avatar { width: 3rem; height: 3rem; object-fit: cover; object-position: 50% 30%; }
.bz-comment-author { background: rgba(var(--bs-primary-rgb), .06); border-radius: .75rem; padding: 1rem; }
.bz-comment-body p:last-child { margin-bottom: 0; }
.bz-comment-form .hiddenFields { display: none; }

/* Contact: "Email Sent" box fades out after 10 s (script in contact/index); thin timer bar shows the countdown */
.bz-thanks { position: relative; overflow: hidden; }
.bz-thanks.fade { transition: opacity .9s ease; }
.bz-thanks-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: .35; transform-origin: left; animation: bz-thanks-timer 10s linear forwards; }
@keyframes bz-thanks-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .bz-thanks.fade { transition: none; } .bz-thanks-timer { animation: none; display: none; } }
.contact-form .hiddenFields { display: none; }

/* 404 */
.bz-404-art img { max-height: 520px; width: 100%; object-fit: cover; }

/* About pages on phones: one swipeable row of pills */
.bz-aboutpills { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.bz-aboutpills .btn { white-space: nowrap; flex: 0 0 auto; margin: 0; }
/* Contact intro text (no drop cap) */
.bz-text p:last-child { margin-bottom: 0; }

/* Linked listing thumbnails (bz_card_media): image -> entry permalink, Blogzine-style hover zoom.
   Blogzine sets .card .card-img-overlay{z-index:2}, which sat above the image and the title's stretched-link and swallowed clicks;
   the overlay now lets clicks through, and its badges/links stay clickable. */
.bz-media-link { display: block; overflow: hidden; border-radius: var(--bs-card-inner-border-radius, .7rem); cursor: pointer; }
.bz-r-1x1 .bz-media-link, .bz-r-16x9 .bz-media-link { border-radius: .5rem; }
.bz-media-link .bz-media { transition: transform .3s ease-in-out, filter .3s ease-in-out; }
.card:not(.card-img-scale):hover .bz-media-link .bz-media, .bz-media-link:hover .bz-media, .bz-media-link:focus-visible .bz-media { transform: scale(1.05); filter: brightness(1.06); }
.card .card-img-overlay { pointer-events: none; }
.card .card-img-overlay a, .card .card-img-overlay button, .card .card-img-overlay .bz-nuts-badge { pointer-events: auto; }

/* Off the Clock category colour (purple), Oct 14 2026 */
a.bz-cat[href$="/category/off-the-clock"] { background-color: #6f42c1 !important; color: #fff !important; }
a.bz-catrow[href$="/category/off-the-clock"] { background-color: rgba(111, 66, 193, var(--bs-bg-opacity, .1)) !important; color: #6f42c1 !important; }
[data-bs-theme="dark"] a.bz-catrow[href$="/category/off-the-clock"] { color: #b195e6 !important; }

/* Oct 14 2026: phone side-to-side wobble fix. Blogzine's .container has 15px side padding but .g-4 rows pull out 16px (2rem gutter), so rows stuck 1px past the screen. Match the gutter to the container on phones. */
@media (max-width: 575.98px) { .container > .row.g-4, .container .row.g-4 { --bs-gutter-x: 1.875rem; } }
/* Long one-line buttons (e.g. "Looking for older posts? Browse the archive") wrap instead of running off the screen. */
.btn { max-width: 100%; white-space: normal; }

/* ================= Oct 17, 2026 polish: home page (home/index) ================= */
.bz-home-intro { max-width: 46rem; }
.bz-home-h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.bz-home-intro .lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); }
.bz-lead-title { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem); line-height: 1.2; }
.bz-lead-text { font-size: 1.0625rem; }
.bz-lead .bz-gauge > span { font-size: calc(var(--size) * .4); }
.bz-strip { background: rgba(var(--bs-primary-rgb), .06); border: 1px solid rgba(var(--bs-primary-rgb), .12); }
.bz-cast-link { display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 5rem; color: var(--bs-body-color); font-size: .85rem; font-weight: 600; text-decoration: none; }
.bz-cast-link img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bs-body-bg), 0 0 0 3px rgba(var(--bs-primary-rgb), .35); }
.bz-cast-link:hover span { color: var(--bs-primary); text-decoration: underline; }
.bz-scale li { display: flex; align-items: center; gap: .75rem; padding: .3rem 0; }
.bz-scale-n { display: inline-block; min-width: 3.25rem; padding: .15rem .4rem; border-radius: .375rem; text-align: center; font-family: Rubik, sans-serif; font-weight: 700; font-size: .85rem; color: #fff; }
.bz-scale-n.tone-success { background: var(--bs-success); } .bz-scale-n.tone-warning { background: var(--bs-warning); color: #1d1d1d; } .bz-scale-n.tone-danger { background: var(--bs-danger); }
.bz-rows .bz-row { border-bottom: 1px solid var(--bs-border-color); }
.bz-row-media { width: 120px; }
.bz-row-media .bz-media { aspect-ratio: 4 / 3; }
@media (min-width: 768px) { .bz-row-media { width: 200px; } .bz-row-media .bz-media { aspect-ratio: 16 / 9; } }
.bz-row-title { line-height: 1.3; }
.bz-row-text { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 767.98px) { .bz-row-text { display: none; } }
.min-w-0 { min-width: 0; }
.bz-score-text { white-space: nowrap; }
.bz-score-text::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin: 0 .35rem 0 .5rem; vertical-align: .05rem; background: var(--bs-warning); }
.bz-score-text.tone-danger::before { background: var(--bs-danger); } .bz-score-text.tone-success::before { background: var(--bs-success); }
.bz-cat-dot { font-size: .5rem; vertical-align: .15rem; }
/* Oct 17 polish: phones get 16px body text and 44px tap targets in the header */
@media (max-width: 575.98px) { body { font-size: 1rem; } }
@media (max-width: 991.98px) {
  .navbar-toggler { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  #navSearch { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  #navbarCollapse .dropdown-item { padding-top: .6rem; padding-bottom: .6rem; }
}
/* Phones: the 26px colour-mode button gets an invisible 44px tap area */
.modeswitch { position: relative; }
.modeswitch::after { content: ""; position: absolute; inset: -9px; }
/* Oct 17 polish: Font Awesome was dropped, so the three theme glyphs that used it now come from Bootstrap Icons */
.dropdown-toggle:after { content: "\f282"; font-family: "bootstrap-icons"; font-weight: 400; font-size: .6rem; }
.dropup .dropdown-toggle:after { content: "\f286"; font-family: "bootstrap-icons"; font-weight: 400; }
.navbar .dropdown-menu .dropdown-submenu.dropend .dropdown-toggle:after, .navbar .dropdown-menu .dropdown-submenu.dropstart .dropdown-toggle:before { content: "\f64d"; font-family: "bootstrap-icons"; font-weight: 400; transform: none; }
.modeswitch:before { content: "\f288"; font-family: "bootstrap-icons"; font-weight: 400; }
.nav-search .dropdown-toggle:after, .dropdown-toggle-icon-none .dropdown-toggle:after { content: none; }

/* Oct 17: tiny-slider gallery arrows use Font Awesome chevrons (functions.js); FA is no longer loaded, so draw them with bootstrap-icons */
.tns-controls .fa-chevron-left:before, .tns-controls .fa-chevron-right:before { font-family: "bootstrap-icons"; font-weight: 400; font-style: normal; }
.tns-controls .fa-chevron-left:before { content: "\f284"; }
.tns-controls .fa-chevron-right:before { content: "\f285"; }

/* Nov 9 2026: always show gallery left/right arrows (Gary OK).
   Blogzine's .arrow-hover parks arrows off-screen until hover, so phones and
   light images make extra slides hard to notice. Keep stock dots; make arrows
   a solid semi-transparent dark circle with a white chevron. */
.arrow-hover [data-controls=prev] { left: 0 !important; }
.arrow-hover [data-controls=next] { right: 0 !important; }
.tiny-slider .tns-controls [data-controls] {
  opacity: 1;
  width: 44px;
  height: 44px;
  line-height: 44px;
  margin: 0 8px;
  border-radius: 50%;
  color: #fff !important;
  background: rgba(0, 0, 0, 0.55) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.tiny-slider .tns-controls [data-controls]:hover,
.tiny-slider .tns-controls [data-controls]:focus {
  color: #fff !important;
  background: rgba(0, 0, 0, 0.75) !important;
}
.tiny-slider .tns-nav [data-nav] {
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.55);
}
.tiny-slider .tns-nav [data-nav]:after {
  background-color: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.55);
}

/* Nov 9 2026 fix2: center gallery arrows on the IMAGE only (Gary: on phones the
   arrows sat mid image+caption and covered the first caption words). Gallery
   slides are 16:9. Limit .tns-controls to that image box so theme top:50%
   centers on the photo, not the caption. */
.tiny-slider .tns-outer { position: relative; }
.tiny-slider .tns-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  pointer-events: none;
  z-index: 9;
}
.tiny-slider .tns-controls [data-controls] {
  pointer-events: auto;
}

/* Nov 10 2026: Blogzine's .blockquote::before is an 8rem quote mark at left:0
   with 80px padding, but post HTML also uses .ps-3 (padding-left: 1rem
   !important), so the icon sits on the first words (Gary, Meet Wizzy haiku,
   dark-mode phone). Give the mark its own space and a smaller stock-like
   size so it never overlaps on phone or desktop, light or dark. */
.blockquote {
  position: relative;
  padding-left: 2.75rem !important;
}
.blockquote::before {
  font-size: 2.15rem;
  line-height: 1;
  font-weight: 700;
  top: 0.05em;
  left: 0.1rem;
  width: 2.4rem;
  pointer-events: none;
}
