/* --- reconciled with the real hartbio stylesheet (loaded before this) --- */
/* why: docs/code-notes.md § Clearing the fixed header */

/* why: docs/code-notes.md § .s-footer */
.s-footer { display: block !important; }

/* why: docs/code-notes.md § Footer subscribe link - the input/OK button
   were removed in favour of linking straight to /news/, and the vendored
   .s-footer__copyright rule shifts left by 100px (a leftover offset for
   the old input-group's visual width) - that offset now reads as
   misaligned against the plain "Subscribe for updates" text above it, so
   it's cancelled here to keep the two lines flush. */
.s-footer__label--link {
  display: inline-block;
  color: #FFFFFF;
  text-decoration: none;
}
.s-footer__label--link:hover { text-decoration: underline; }
.s-footer__copyright--aligned {
  left: 0 !important;
  width: auto !important;
}
/* why: docs/code-notes.md § Footer subscribe link - the vendored
   .s-footer__subscribe margin-bottom (30-45px, scaling with viewport) was
   sized for the old input/OK form; now that it wraps a single line of
   link text, that much space read as a large, unintentional gap before
   the copyright line below it. */
.s-footer__subscribe--tight {
  margin-bottom: 10px !important;
}

/* why: docs/code-notes.md § .s-header box-shadow */
.s-header { box-shadow: 0 2px 16px rgba(0,0,0,.08) !important; }

/* why: docs/code-notes.md § .s-quality box-shadow */
.s-quality { box-shadow: 0 -2px 16px rgba(0,0,0,.08), 0 2px 16px rgba(0,0,0,.08); }

/* why: docs/code-notes.md § .s-banner__caption--platelet */
.s-banner__caption--platelet { bottom: 34%; }

/* why: /news/ hero - the title+paragraph block was taller than the shared
   .s-banner__title/.s-banner__content margins allow for, so on many
   viewports the paragraph spilled past the banner image's decorative
   swoosh line near the bottom. Scoped to this page's own .s-banner--news
   wrapper rather than the shared .s-banner rules other pages (jobs,
   product categories) still rely on. */
.s-banner--news .s-banner__title--less-bottom { margin-bottom: 12px; }
.s-banner--news .s-banner__content { margin-bottom: 0; font-size: 14px; line-height: 19px; }
@media (min-width: 768px) {
  .s-banner--news .s-banner__title--less-bottom { margin-bottom: 16px; }
  .s-banner--news .s-banner__content { font-size: 16px; line-height: 24px; }
}
@media (min-width: 1920px) {
  .s-banner--news .s-banner__title--less-bottom { margin-bottom: 20px; }
  .s-banner--news .s-banner__content { font-size: 18px; line-height: 27px; }
}

/* why: docs/code-notes.md § .c-submenu__title (PRODUCTS nav item) */
.c-submenu__title { width: auto !important; white-space: nowrap; gap: 5px; }

/* why: docs/code-notes.md § Category listing hero on mobile */
@media (max-width: 767px) {
  .s-banner__wrapper:has(.s-filtering--headless) .s-banner__caption {
    position: static;
  }
  /* why: docs/code-notes.md § Category listing hero on mobile (centering) */
  .s-banner__wrapper:has(.s-filtering--headless) .s-banner__title,
  .s-banner__wrapper:has(.s-filtering--headless) .s-banner__content {
    text-align: center;
  }
  .s-banner__wrapper:has(.s-filtering--headless) .s-filtering__categories {
    justify-content: center;
  }
}

/* why: docs/code-notes.md § Category listing filter row */
@media (max-width: 1199px) {
  .s-filtering__mob { flex-direction: column; align-items: stretch; gap: 12px; }
  .s-filtering__mob .s-filtering__input-wrapper { margin-left: 0; width: 100%; }
  .s-filtering__mob-select-wrapper { width: 100%; }
  .s-filtering__mob-select { width: 100%; }
}
@media (max-width: 767px) {
  .s-filtering__category label, .s-filtering__category a {
    height: auto;
    min-height: 44px;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1.3;
  }
}


/* why: docs/code-notes.md § Palette source */

:root {
  --ink: #353535;
  --muted: #6c757d;
  --line: #dee2e6;
  --brand: #024a94;      /* Hart primary blue */
  --accent: #0099d5;     /* Hart light blue */
  --saffron: #f8bd46;    /* CTA yellow */
  --bg: #ffffff;
  --soft: #f4f7fa;
  --wrap: 1140px;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.6 Arial, Helvetica, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
/* why: docs/code-notes.md § Global img sizing */
img { max-width: 100%; }
.page__body img, .post__body img, .s-about__subtitle img { height: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 20; }

/* Header */
.site-header { border-bottom: 3px solid var(--brand); position: sticky; top: 0; background: #fff; z-index: 10; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 20px; }
.brand img { display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  color: var(--ink); font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.02em; padding: 8px 10px; border-radius: 4px;
}
.nav a:hover { color: var(--brand); background: var(--soft); text-decoration: none; }
.nav-toggle { display: none; font-size: 24px; background: none; border: 0; color: var(--brand); cursor: pointer; }

main.wrap { padding-top: 32px; padding-bottom: 56px; }
/* why: docs/code-notes.md § No global heading styles */

.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }

/* Buttons / CTAs */
.enquire {
  display: inline-block; background: var(--saffron); color: #222; font-weight: 700;
  padding: 11px 22px; border-radius: 4px;
}
.enquire:hover { text-decoration: none; filter: brightness(0.96); }

/* why: docs/code-notes.md § .s-detail__content */
.s-detail__content p { text-align: justify; }
.s-detail__content table {
  margin-bottom: 20px;
  /* why: docs/code-notes.md § .s-detail__content (table-layout) */
  border: 1px solid #dededf; width: 100%; table-layout: fixed;
  border-collapse: collapse; border-spacing: 1px; text-align: center;
}
.s-detail__content th { border: 1px solid #dededf; background-color: #eceff1; color: #000; padding: 5px; word-wrap: break-word; }
.s-detail__content td { border: 1px solid #dededf; background-color: #fff; color: #000; padding: 5px; word-wrap: break-word; }

/* why: docs/code-notes.md § Gated downloads */
.docs__note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
/* why: docs/code-notes.md § Gated downloads (label wrap) */
.s-detail__button, .c-dropdown__title, .c-dropdown__link { white-space: nowrap; }
/* why: docs/code-notes.md § Gated downloads (Turnstile modal) */
.docs__turnstile-backdrop {
  position: fixed; inset: 0; z-index: 1000; background: rgba(2,74,148,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.docs__turnstile-modal {
  position: relative; background: #fff; border-radius: 8px; padding: 32px 24px 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25); max-width: 100%;
}
.docs__turnstile-close {
  position: absolute; top: 6px; right: 10px; background: none; border: 0; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--muted); padding: 4px;
}
.docs__turnstile-close:hover { color: var(--ink); }

/* Product grid + category listings */
.grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.card a { display: block; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 16px; height: 100%; transition: border-color .15s, box-shadow .15s; }
.card a:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 4px 14px rgba(2,74,148,.08); }
.card__title { display: block; font-weight: 700; margin-top: 10px; font-size: 14px; }
.card__code { display: block; color: var(--accent); font-size: 12px; margin-top: 2px; }
.cat-block { margin-bottom: 18px; }
.cat-block h2 a { color: var(--brand); }
.cat-block ul { margin: 0; }

/* News */
.news-list { list-style: none; padding: 0; }
.news-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-row__date, .post__date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.post__body { max-width: 760px; }
.post__body img { border-radius: 6px; margin: 14px 0; }
.post__placeholder { color: var(--muted); font-style: italic; }
.page__body { max-width: 820px; }
.page__body img { border-radius: 6px; margin: 12px 0; }

/* Footer */
.site-footer { background: var(--brand); color: #dbe6f2; margin-top: 48px; padding: 36px 0 20px; font-size: 14px; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
.site-footer__links { display: flex; flex-direction: column; gap: 6px; }
.site-footer__legal { margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); font-size: 13px; color: #b9cbe0; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; gap: 0; order: 3; }
  .nav--open { display: flex; }
  .nav a { padding: 12px 6px; border-bottom: 1px solid var(--line); }
  .site-header__inner { flex-wrap: wrap; }
  .product { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* Enquiry form */
.enquire-block { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 24px; }
.enquiry__hp { position: absolute; left: -9999px; }
.enquiry__status { min-height: 20px; font-weight: 700; color: var(--brand); }

/* Savings calculator */
.calc-intro, .calc-note { max-width: 720px; }
.calc-note { color: var(--muted); font-size: 13px; margin-top: 18px; }
.calc { max-width: 720px; margin-top: 20px; }
.calc-field { display: grid; grid-template-columns: 1fr 150px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.calc-field label { font-size: 14px; }
.calc-field input { padding: 8px 10px; font: inherit; border: 1px solid var(--line); border-radius: 5px; text-align: right; }
.calc-field--in input { border-color: var(--accent); }
.calc-field--out input { background: var(--soft); color: var(--ink); }
.calc-field--total { border-bottom: 0; margin-top: 8px; }
.calc-field--total label { font-weight: 700; color: var(--brand); font-size: 16px; }
.calc-field--total input { background: var(--brand); color: #fff; font-weight: 700; border-color: var(--brand); }
@media (max-width: 560px) { .calc-field { grid-template-columns: 1fr 110px; } }

/* Product grid (category / products index) - laid out with Bootstrap cols,
   since we don't ship the filter JS that reveals .s-tagf__section. */
.s-tagf__block { margin-bottom: 40px; }
.s-tagf__title { color: var(--brand, #024a94); border-bottom: 3px solid #f8bd46; display: inline-block; padding-bottom: 4px; margin-bottom: 20px; }
.s-tagf__grid { margin-bottom: 10px; }
.s-tagf__item { margin-bottom: 28px; }
.s-tagf__heading { margin-bottom: 24px; font-size: 30px; font-weight: 700; color: var(--brand); }

/* why: docs/code-notes.md § Homepage CSS */

/* Static-page banner buttons spacing */
.s-banner__buttons { margin-top: 10px; }
.s-banner__buttons .button { margin-right: 12px; margin-bottom: 8px; }

/* HartBeat archive grid */
.s-archive__title { font-size: 24px; font-weight: 700; color: #024a94; margin-bottom: 20px; }
.s-archive__card { margin-bottom: 34px; }
.s-archive__image { border-radius: 8px; }
/* why: docs/code-notes.md § .news-hover__img-blind */
.news-hover__img-blind { aspect-ratio: 199 / 135; overflow: hidden; }
.news-hover__img-blind img.s-archive__image {
  width: 100%; height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  margin-bottom: 0;
}
.s-archive__subtitle { display: block; font-weight: 700; color: #024a94; margin-top: 12px; font-size: 15px; }
.s-archive__subtitle:hover { text-decoration: none; color: #0099d5; }
.s-archive__date { font-size: 13px; color: #6c757d; margin-top: 2px; }
.news-hover { position: relative; overflow: hidden; border-radius: 8px; }
.news-hover__overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(2,74,148,0); transition: background .2s; }
.news-hover__overlay:hover { background: rgba(2,74,148,.55); text-decoration: none; }
.news-hover__description { color: #fff; font-weight: 700; opacity: 0; transition: opacity .2s; }
.news-hover__overlay:hover .news-hover__description { opacity: 1; }

/* why: docs/code-notes.md § #map.s-global__map:empty */
#map.s-global__map:empty { background: linear-gradient(135deg, #eef4fa, #dce8f4); }

/* why: docs/code-notes.md § .s-about__title */
.s-about__title { width: 100%; text-align: center; }

/* Our own component headings (their CSS doesn't cover these classes). */
.calc h1, .page > h1 { font-size: 30px; line-height: 1.2; margin: 0 0 18px; color: var(--brand); }
.enquire-block h2 { font-size: 22px; margin: 0 0 14px; color: var(--brand); }

/* why: docs/code-notes.md § Self-contained "Global Reach" distributor map */
.hb-map { height: 390px; position: relative; z-index: 2;
  background:
    url("/media/home/global/worldmap.svg") center/100% 100% no-repeat,
    radial-gradient(120% 120% at 50% 30%, #0b63a6 0%, #024a94 60%, #013a74 100%);
}
/* why: docs/code-notes.md § Self-contained "Global Reach" distributor map (pin coordinates) */
.hb-map__inner { position: absolute; inset: 0; }
.hb-map__pin { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; z-index: 1; }
/* why: docs/code-notes.md § Self-contained "Global Reach" distributor map (:focus-visible) */
.hb-map__pin:hover, .hb-map__pin:focus-visible { z-index: 100; outline: none; }
.hb-map__dot { display: block; width: 12px; height: 12px; border-radius: 50%;
  background: #f8bd46; border: 2px solid #fff; box-shadow: 0 0 0 rgba(248,189,70,.6); transition: transform .12s; }
.hb-map__pin:hover .hb-map__dot, .hb-map__pin:focus-visible .hb-map__dot { transform: scale(1.35); }
/* why: docs/code-notes.md § Self-contained "Global Reach" distributor map (.hb-card transition) */
.hb-card { position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  min-width: 200px; max-width: 260px; background: #fff; color: #353535; text-align: left;
  border-radius: 8px; padding: 12px 14px; box-shadow: 0 2px 16px rgba(0,0,0,.08);
  opacity: 0; visibility: hidden; pointer-events: none; z-index: 100; }
.hb-map__pin--left .hb-card { left: auto; right: 18px; }
.hb-map__pin:hover .hb-card, .hb-map__pin:focus-visible .hb-card { opacity: 1; visibility: visible; transition: opacity .12s; }
.hb-card__name { display: block; font-weight: 700; color: #024a94; margin-bottom: 5px; font-size: 14px; }
.hb-card__row { display: block; font-size: 12.5px; line-height: 1.5; word-break: break-word; }
@media (max-width: 768px) { .hb-map__inner { inset: 16px 24px; } .hb-card { min-width: 150px; max-width: 190px; } }

/* why: docs/code-notes.md § .contact-map */
.contact-map {
  position: relative; overflow: hidden;
  background: url("/media/contact/streets.svg") center/cover no-repeat,
    radial-gradient(120% 120% at 50% 30%, #0b63a6 0%, #024a94 60%, #013a74 100%);
}

/* why: docs/code-notes.md § News archive collapse */
.s-archive__older { margin-top: 12px; }
.s-archive__older-toggle {
  cursor: pointer; list-style: none; font-family: Arial, Helvetica, sans-serif;
  font-weight: 700; font-size: 16px; color: var(--brand); padding: 10px 0;
}
.s-archive__older-toggle::-webkit-details-marker { display: none; }
.s-archive__older-toggle::before { content: '+ '; }
.s-archive__older[open] .s-archive__older-toggle::before { content: '\2212 '; }
.s-archive__older-toggle:hover { text-decoration: underline; }
.s-archive__older .s-archive__articles { margin-top: 8px; }

/* why: docs/code-notes.md § Contact form dropdown */
.select2--congress-blue { position: relative; display: block; }
.forms__select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  border-radius: 30px; border: 0; height: 60px; background-color: #EFEFEF;
  padding-left: 30px; padding-right: 56px; font-size: 24px; line-height: 60px;
  color: #353535; cursor: pointer;
}
.forms__select:focus { background-color: #EFEFEF; outline: 2px solid var(--accent); }
.forms__select-chevron {
  position: absolute; right: 26px; top: 50%; transform: translateY(-50%);
  color: #353535; font-size: 18px; pointer-events: none;
}

/* Jobs / vacancies (CMS-managed) */
.job-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; margin-bottom: 45px; }
.job-row { display: block; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; padding: 16px 18px; color: var(--ink); }
.job-row:hover { text-decoration: none; border-color: var(--accent); border-left-color: var(--accent); box-shadow: 0 4px 14px rgba(2,74,148,.08); }
.job-row__title { display: block; font-weight: 700; color: var(--brand); font-size: 17px; }
.job-row__meta { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.job__body h2 { color: var(--brand); font-size: 20px; margin: 22px 0 10px; }
.job__body ul { margin: 0 0 14px; }
.job__body { margin-bottom: 56px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }

/* No open positions (/jobs/ empty state) */
.jobs-empty { max-width: 620px; margin: 20px auto; text-align: center; padding: 20px 0 10px; }
.jobs-empty__title { color: var(--brand); font-size: 24px; margin-bottom: 14px; }
.jobs-empty__text { color: var(--ink); margin-bottom: 26px; line-height: 1.6; }

/* why: docs/code-notes.md § .s-application__title override */
.s-application__title { font-size: 18px !important; line-height: 1.3 !important; margin-bottom: 18px !important; }

/* why: docs/code-notes.md § Application form fields */
.application .forms__input,
.application .forms__textarea {
  border-radius: 8px;
  height: 46px !important;
  font-size: 15px;
  line-height: 46px;
  background-color: #fff;
  border: 1px solid var(--line);
  padding-left: 16px;
  padding-right: 16px;
}
.application .forms__textarea { height: 140px !important; line-height: 1.5; padding-top: 14px; }
.application .forms__input:focus,
.application .forms__textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.application .s-application__form-group { margin-bottom: 16px; }

/* Publishing guide (/tutorial): an internal, readable how-to page. */
.tut { max-width: 820px; margin: 0 auto 60px; }
.tut__head { border-bottom: 2px solid #e6eef6; padding-bottom: 18px; margin-bottom: 24px; }
.tut h1 { font-size: 34px; color: var(--brand); margin: 0 0 10px; }
.tut__lead { font-size: 17px; color: var(--ink); max-width: 640px; }
.tut__h2 { font-size: 21px; color: var(--brand); margin: 34px 0 12px; }
.tut__note {
  background: #eaf4fb; border-left: 4px solid var(--accent);
  padding: 14px 18px; border-radius: 6px; margin: 18px 0; font-size: 15px;
}
.tut__steps { margin: 0 0 8px; padding-left: 22px; }
.tut__steps > li { margin-bottom: 12px; line-height: 1.55; }
.tut__sub { margin: 8px 0 4px; padding-left: 20px; list-style: disc; }
.tut__sub > li { margin-bottom: 6px; line-height: 1.5; }
.tut__sub--flat { margin: 6px 0 14px; }
.tut__tip { font-size: 14px; color: var(--muted); margin: 4px 0 8px; }
.tut__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f2f6fa; color: var(--brand); padding: 1px 6px; border-radius: 4px;
  font-size: 0.92em; text-decoration: none;
}
.tut__code:hover { background: #e3edf6; text-decoration: none; }

/* why: docs/code-notes.md § .s-careers__info */
.s-careers__info { min-width: 0; }

/* Cap the homepage YouTube embed to 80vh so its 16:9 box stays comfortably
   under one viewport (min() picks the smaller of full-width and the width
   that yields an 80vh-tall 16:9 box; the existing embed-responsive
   padding-top hack does the rest). */
.s-about__video .embed-responsive-16by9 {
  width: min(100%, calc(80vh * 16 / 9));
  max-height: 80vh;
  margin-left: auto;
  margin-right: auto;
}
