/* Homepage, About page and the rest of the site's pages ("Site pages" below). Colours come from the Bootstrap theme in app.css */

:root {
  --home-navy: #2C3E50;
  --home-teal: #18BC9C;
  --home-teal-dark: #128f77;
  --home-mist: #f4f6f6;
  --home-muted: #6b7780;
  --home-display: "Comfortaa", "Nunito Sans", sans-serif;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.home-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-teal-dark);
}


.site-banners-flush .alert:last-child {
  margin-bottom: 0;
}


/* ==== Hero ==== */

/* the whole photo is shown, with its edges faded into a band that matches the wall colour in the photo */
.home-hero {
  overflow: hidden;
  color: var(--home-navy);
}

/* each band is sampled from the wall at the left and right edges of its photo */
.home-hero-tfl {
  background: linear-gradient(90deg, #eef0f4 0%, #e6e8ec 55%, #dcdee2 100%);
}

.home-hero-us {
  background: linear-gradient(90deg, #eeeeeb 0%, #d6d6d3 55%, #d2d2cf 100%);
}

/* caps the photo's height on very wide screens */
.home-hero .container-fluid {
  max-width: 1600px;
}

.home-hero .row {
  align-items: center;
}

.home-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 88%, transparent 100%);
}

.home-hero-text {
  padding-top: 32px;
  padding-bottom: 32px;
}

.home-hero h1 {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 10px 0 16px;
  color: var(--home-navy);
}

.home-hero p {
  font-size: 1.2rem;
  margin-bottom: 26px;
  color: #4b5a66;
}

.home-hero-buttons .btn {
  margin: 0 8px 8px 0;
}

@media (max-width: 1199.98px) {
  .home-hero h1 {
    font-size: 2.5rem;
  }
}

/* stacked: photo full width on top, text underneath */
@media (max-width: 991.98px) {
  .home-hero-photo {
    padding-left: 0;
    padding-right: 0;
  }

  .home-hero-photo img {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .home-hero-text {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .home-hero h1 {
    font-size: 2.2rem;
  }

  .home-hero p {
    font-size: 1.05rem;
  }
}


/* ==== Sections ==== */

.home-section {
  padding: 64px 0;
}

.home-section-tight {
  padding: 40px 0 24px;
}

.home-section-mist {
  background: var(--home-mist);
}

.home-section-navy {
  background: var(--home-navy);
  color: #fff;
}

#video {
  scroll-margin-top: 50px; /* clear the fixed navbar */
}

.home-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.home-section-head-center {
  justify-content: center;
}

.home-section-head h2 {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.home-section-head a {
  font-weight: 700;
  color: var(--home-teal-dark);
}


/* ==== Product and category cards ==== */

.home-card {
  display: block;
  color: inherit;
}

.home-card:hover,
.home-card:focus {
  color: inherit;
  text-decoration: none;
}

/* the dashed outline sits outside the photo, so the card needs room around it */
.home-card-img {
  position: relative;
  margin: 8px;
}

.home-card-img-inner {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: #e9eeee;
  aspect-ratio: 4 / 3;
}

.home-card-img-tall {
  aspect-ratio: 4 / 5;
}

.home-card-img-inner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.home-card:hover .home-card-img-inner img {
  transform: scale(1.04);
}

/* light grey outline around the photo, swapped for the moving dashed line on hover */
.home-card-img::before {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
  border: 1px solid #e3e7e9;
  pointer-events: none;
  transition: opacity 0.25s;
}

.home-card:hover .home-card-img::before,
.home-card:focus .home-card-img::before {
  opacity: 0;
}

/* dashed line that travels around the outside of the photo on hover */
.home-card-img::after {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  background:
    linear-gradient(90deg, var(--home-teal) 50%, transparent 0) repeat-x top left / 14px 2px,
    linear-gradient(90deg, var(--home-teal) 50%, transparent 0) repeat-x bottom left / 14px 2px,
    linear-gradient(0deg, var(--home-teal) 50%, transparent 0) repeat-y top left / 2px 14px,
    linear-gradient(0deg, var(--home-teal) 50%, transparent 0) repeat-y top right / 2px 14px;
  animation: home-march 0.7s linear infinite paused;
}

.home-card:hover .home-card-img::after,
.home-card:focus .home-card-img::after {
  opacity: 1;
  animation-play-state: running;
}

@keyframes home-march {
  to { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px; }
}

.home-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--home-navy);
}

.home-badge-sale {
  background: #E74C3C;
}

.home-card-name {
  margin: 18px 8px 0;
  font-weight: 700;
  line-height: 1.3;
}

.home-category-name {
  font-family: var(--home-display);
  font-size: 1.2rem;
}

.home-card-category {
  margin: 2px 8px 0;
  font-size: 0.85rem;
  color: var(--home-muted);
}

.home-card-price {
  margin: 4px 8px 0;
  font-weight: 700;
}

.home-card-price del {
  margin-right: 6px;
  font-weight: 400;
  color: var(--home-muted);
}

.home-card-link {
  margin: 6px 8px 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--home-teal-dark);
}


/* ==== Products page ==== */

.home-page-head {
  padding-top: 16px;
  margin-bottom: 24px;
}

.home-page-head h1 {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 6px 0 0;
  color: var(--home-navy);
}

/* category tabs on the left, country dropdown on the right, on one ruled line */
.home-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid #e3e7e9;
  margin-bottom: 16px;
}

.home-tabs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-tabs::-webkit-scrollbar {
  display: none;
}

.home-tabs a {
  flex: none;
  margin-right: 28px;
  padding: 10px 0 12px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
  color: var(--home-muted);
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.home-tabs a:hover {
  color: var(--home-navy);
  text-decoration: none;
}

.home-tabs a.active {
  color: var(--home-navy);
  border-bottom-color: var(--home-teal);
}

/* countries sit at the right hand end of the line */
.home-tabs-countries a {
  margin-right: 0;
  margin-left: 28px;
}

/* stacked: countries get their own line under the categories */
@media (max-width: 991.98px) {
  .home-tabs {
    width: 100%;
  }

  .home-tabs-countries {
    border-top: 1px solid #e3e7e9;
  }

  .home-tabs-countries a {
    margin-left: 0;
    margin-right: 28px;
  }
}

.home-result-count {
  margin: 0 0 20px;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--home-mist);
  font-size: 0.9rem;
  color: var(--home-muted);
}

@media (max-width: 767.98px) {
  .home-page-head h1 {
    font-size: 1.9rem;
  }
}


/* ==== Breadcrumbs ==== */

.home-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--home-navy);
}

.home-breadcrumbs li + li::before {
  content: "\203A";
  padding: 0 10px;
  color: var(--home-muted);
}

.home-breadcrumbs a {
  color: var(--home-muted);
}

.home-breadcrumbs a:hover {
  color: var(--home-teal-dark);
}

.home-page-head .home-breadcrumbs {
  margin-bottom: 4px;
}


/* ==== You may also like (product and basket pages) ==== */

.home-also-like {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid #e3e7e9;
}

/* the product, basket and products pages use the site's standard light text, so the cards drop the bold to match */
.home-also-like-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.home-also-like-head h4 {
  margin: 0;
}

/* room for the outline around the photos below the filter tabs */
.home-shop {
  padding-top: 12px;
}

.home-also-like .home-card-name,
.home-shop .home-card-name {
  font-weight: 500;
}

.home-also-like .home-card-price,
.home-shop .home-card-price {
  font-weight: inherit;
}


/* ==== Product page ==== */

/* an old rule in custom.css centres #banner on phones */
.pp-page#banner {
  text-align: left;
}

.pp-title {
  margin: 0 0 4px;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
}

.pp-category {
  margin-bottom: 16px;
  color: #8a979c;
}

.pp-area-description p {
  margin-bottom: 12px;
}

.pp-features {
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.pp-features li {
  display: flex;
  align-items: center;
  padding: 5px 0;
}

.pp-features i {
  width: 28px;
  flex: none;
  color: var(--home-teal-dark);
}

/* photos beside the title and buy box, then the description beside the key features */
.pp-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas:
    "gallery info"
    "notice notice"
    "description features";
  column-gap: 30px;
}

.pp-area-notice {
  grid-area: notice;
}

.pp-area-notice .alert {
  margin: 28px 0 0;
}

.pp-divider {
  margin: 40px 0 32px;
}

.pp-area-gallery {
  grid-area: gallery;
}

.pp-area-info {
  grid-area: info;
  min-width: 0;
}

.pp-area-description {
  grid-area: description;
  margin-top: 28px;
}

.pp-area-features {
  grid-area: features;
  margin-top: 28px;
}

.pp-area-features .pp-features {
  margin-top: 0;
  padding: 14px 18px;
  border-radius: 6px;
  background: var(--home-mist);
}

.pp-area-description h4,
.pp-area-features h4 {
  margin-bottom: 12px;
}

/* phones: photos, title and buy box, key features, then the description */
@media (max-width: 767.98px) {
  .pp-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "gallery"
      "info"
      "notice"
      "features"
      "description";
  }

  .pp-area-gallery {
    margin-bottom: 20px;
  }

  .pp-area-description {
    margin-top: 24px;
  }
}

/* price, stock and add to basket, kept together */
.pp-box {
  margin: 20px 0 40px;
  padding: 20px;
  border: 1px solid #e3e7e9;
  border-radius: 6px;
  background: #fff;
}

.pp-price {
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--home-navy);
}

.pp-price del {
  margin-left: 8px;
  font-size: 1.2rem;
  font-weight: 300;
  color: #95a5a6;
}

.pp-coupon {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--home-mist);
  font-size: 0.85rem;
}

.pp-stock {
  margin: 8px 0 16px;
}

.pp-note {
  margin: -8px 0 16px;
  font-size: 0.9rem;
}

.pp-buy {
  display: flex;
}

.pp-buy input {
  flex: none;
  width: 76px;
  height: 48px;
  margin-right: 8px;
  text-align: center;
}

.pp-buy .btn {
  flex: 1;
  height: 48px;
  font-size: 1.05rem;
}

.pp-small {
  font-size: 0.85rem;
  color: var(--home-muted);
}

.pp-updates {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 0.9rem;
}

.pp-box-info {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e3e7e9;
  font-size: 0.85rem;
  color: var(--home-muted);
}

.pp-box-info div {
  display: flex;
  padding: 3px 0;
}

.pp-box-info i {
  width: 22px;
  flex: none;
  margin-top: 3px;
  color: #95a5a6;
}

.pp-label {
  display: block;
  margin-top: 14px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--home-muted);
}

.pp-wifi-note {
  margin: 32px 0;
  text-align: center;
  color: var(--home-muted);
}

/* the red Sale tag on the main photo, matching the product cards */
.pp-gallery {
  position: relative;
}

.pp-sale-badge {
  z-index: 20; /* above the gallery's own layers */
}

/* the bars show the price smaller, so shrink the crossed out prices too */
.pp-topbar .pp-price del,
.pp-bar .pp-price del {
  margin-left: 4px;
  font-size: 0.9rem;
}

.pp-topbar-coupon {
  margin: 0 16px 0 -8px;
}

.pp-bar-coupon {
  color: var(--home-muted);
}

/* small buy box that slides in under the menu on desktop */
.pp-topbar {
  position: fixed;
  top: 50px; /* under the fixed menu */
  left: 0;
  right: 0;
  z-index: 1020;
  padding: 8px 0;
  border-bottom: 1px solid #e3e7e9;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-120%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s;
}

.pp-topbar.is-visible {
  transform: translateY(0);
  visibility: visible;
}

.pp-topbar .container {
  display: flex;
  align-items: center;
}

.pp-topbar img {
  width: 64px;
  height: 40px;
  margin-right: 14px;
  border-radius: 3px;
  object-fit: cover;
}

.pp-topbar-name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: var(--home-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-topbar-name small {
  margin-left: 10px;
  font-weight: 300;
}

.pp-topbar .pp-price {
  margin: 0 20px;
  font-size: 1.3rem;
}

.pp-topbar .btn {
  height: 40px;
  padding: 0 22px;
}

@media (max-width: 767.98px) {
  /* phones have the bar at the bottom of the screen instead */
  .pp-topbar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pp-topbar {
    transition: none;
  }
}

/* the price and add to basket bar fixed to the bottom of the screen on phones */
.pp-bar {
  display: none;
}

@media (max-width: 767.98px) {
  .pp-title {
    font-size: 1.6rem;
  }

  .pp-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1020;
    padding: 10px 15px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e3e7e9;
    background: #fff;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
  }

  .pp-bar .pp-price {
    font-size: 1.3rem;
  }

  .pp-bar small {
    display: block;
  }

  .pp-bar .btn {
    height: 44px;
    padding: 0 22px;
  }

  /* room for the bar so it doesn't cover the footer */
  body:has(.pp-bar) {
    padding-bottom: 70px;
  }
}


/* ==== "There's a store nearer to you" notice (product page and basket) ==== */

.other-store-notice {
  display: flex;
  align-items: flex-start;
}

.other-store-notice > i {
  margin: 4px 12px 0 0;
}

.other-store-notice a {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
}


/* ==== Video ==== */

.home-video {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

.home-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}


/* ==== Testimonials ==== */

.home-quote {
  margin: 0;
}

.home-quote blockquote {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.55;
}

.home-quote blockquote::before {
  content: "\201C";
  display: block;
  height: 32px;
  font-family: Georgia, serif;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--home-teal);
}

.home-quote figcaption {
  font-size: 0.9rem;
  opacity: 0.75;
}


/* ==== Why traintrackr ==== */

.home-trust > div {
  display: flex;
  align-items: flex-start;
}

.home-trust i,
.home-trust svg {
  flex: none;
  width: 24px;
  margin: 3px 12px 0 0;
  font-size: 1.2rem;
  color: var(--home-teal-dark);
}

.home-trust b,
.home-trust span {
  display: block;
}

.home-trust span {
  font-size: 0.9rem;
  color: var(--home-muted);
}


/* ==== Forms and contact boxes ==== */

.home-form {
  padding: 28px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e3e7e9;
}

.home-form h3 {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 1.4rem;
}

.home-form p {
  color: var(--home-muted);
}


/* ==== About page ==== */

.home-about-intro p {
  color: var(--home-muted);
  font-size: 1.05rem;
}

.home-about-photo {
  width: 100%;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.home-person {
  text-align: center;
}

.home-person-photo {
  position: relative;
  width: 100%;
  max-width: 200px;
  margin: 12px auto 16px;
  aspect-ratio: 1;
}

.home-person-photo img,
.home-person-photo span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #e9eeee;
  color: #b5c0c0;
  font-size: 3rem;
}

/* rotating dashed circle around the outside of the photo */
.home-person-photo::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  border: 2px dashed var(--home-teal);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
  animation: home-spin 14s linear infinite paused;
}

.home-person:hover .home-person-photo::after {
  opacity: 1;
  animation-play-state: running;
}

@keyframes home-spin {
  to { transform: rotate(360deg); }
}

.home-person-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.home-person-role {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--home-teal-dark);
}

.home-person p {
  margin: 6px auto 0;
  max-width: 28ch;
  color: var(--home-muted);
}

.home-email {
  display: inline-flex;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--home-navy);
  word-break: break-all;
}

.home-email i {
  margin-right: 10px;
  color: var(--home-teal-dark);
}

.home-socials a {
  display: inline-flex;
  align-items: center;
  margin: 0 8px 8px 0;
  padding: 9px 14px;
  border: 1px solid #e3e7e9;
  border-radius: 4px;
  font-weight: 700;
  color: var(--home-navy);
  transition: border-color 0.2s, color 0.2s;
}

.home-socials a:hover {
  border-color: var(--home-teal);
  color: var(--home-teal-dark);
  text-decoration: none;
}

.home-socials i {
  margin-right: 8px;
  font-size: 1.1rem;
}

/* ==== Site pages ====
   The rest of the site (support, FAQ, account, setup, basket, status ...) in the
   same style as the homepage and About page:
     .site-page                     page wrapper, room above and below
     .site-head (+ -center)         h1.site-title (the only heading in the display font), p.site-lead
     .site-card                     white box with a light border; .site-card-title inside
     a.site-card.site-link-card     a whole card that's a link, with a .site-icon
     .site-panel                    light grey box, for notes and summaries
     .site-prose                    long text (terms, privacy), readable line length
     .site-qa                       question and answer list (FAQ)
     .table.site-table              tables
     .site-narrow                   a narrow column, for sign in and short forms
     .site-steps                    the numbered steps along the top of setup
*/

.site-page {
  padding: 24px 0 56px;
}

.site-head {
  margin-bottom: 32px;
}

.site-head-center {
  text-align: center;
}

.site-head-center .site-lead {
  margin-left: auto;
  margin-right: auto;
}

.site-title {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
  color: var(--home-navy);
}

.site-lead {
  max-width: 62ch;
  font-size: 1.05rem;
  color: var(--home-muted);
}

.site-lead:last-child {
  margin-bottom: 0;
}

.site-section-title {
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--home-navy);
}

.site-card {
  display: block;
  padding: 28px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e3e7e9;
  color: inherit;
}

.site-card + .site-card {
  margin-top: 24px;
}

.site-card-title {
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 8px;
  color: var(--home-navy);
}

.site-card p,
.site-card .site-card-text {
  color: var(--home-muted);
}

.site-card > :last-child {
  margin-bottom: 0;
}

a.site-link-card {
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

a.site-link-card:hover,
a.site-link-card:focus {
  color: inherit;
  text-decoration: none;
  border-color: var(--home-teal);
  box-shadow: 0 10px 24px rgba(44, 62, 80, 0.08);
  transform: translateY(-2px);
}

.site-link-card .site-card-link {
  font-weight: 700;
  color: var(--home-teal-dark);
}

.site-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(24, 188, 156, 0.12);
  color: var(--home-teal-dark);
  font-size: 1.25rem;
}

/* a photo shown whole in a .home-card rather than cropped, e.g. a live map snapshot */
.home-card-img-contain img {
  object-fit: contain;
}

.site-panel {
  padding: 20px 24px;
  border-radius: 4px;
  background: var(--home-mist);
}

.site-panel > :last-child {
  margin-bottom: 0;
}

.site-prose {
  max-width: 760px;
}

.site-prose h2,
.site-prose h3 {
  font-weight: 600;
  color: var(--home-navy);
  margin: 2rem 0 0.75rem;
}

.site-prose h2 { font-size: 1.4rem; }
.site-prose h3 { font-size: 1.15rem; }

.site-prose p,
.site-prose li {
  line-height: 1.7;
  color: #4a5560;
}

.site-qa {
  max-width: 820px;
}

.site-qa-item {
  padding: 22px 0;
  border-bottom: 1px solid #e3e7e9;
}

.site-qa-item:first-child {
  padding-top: 0;
}

.site-qa-item h2,
.site-qa-item h3 {
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 8px;
  color: var(--home-navy);
}

.site-qa-item p,
.site-qa-item li {
  color: #4a5560;
  line-height: 1.65;
}

.site-qa-item > :last-child {
  margin-bottom: 0;
}

.table.site-table {
  background: #fff;
  border: 1px solid #e3e7e9;
}

.table.site-table thead th {
  border-top: 0;
  border-bottom: 1px solid #e3e7e9;
  background: var(--home-mist);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--home-muted);
}

.table.site-table td,
.table.site-table th {
  border-color: #e3e7e9;
  vertical-align: middle;
}

.site-narrow {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.site-steps {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  counter-reset: site-step;
}

.site-steps li {
  flex: 1 1 0;
  position: relative;
  text-align: center;
  font-size: 0.85rem;
  color: var(--home-muted);
}

.site-steps li::before {
  counter-increment: site-step;
  content: counter(site-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 2px solid #e3e7e9;
  background: #fff;
  font-weight: 700;
  color: var(--home-muted);
}

.site-steps li.done::before {
  content: "\2713";
  border-color: var(--home-teal);
  background: var(--home-teal);
  color: #fff;
}

.site-steps li.active {
  font-weight: 700;
  color: var(--home-navy);
}

.site-steps li.active::before {
  border-color: var(--home-teal);
  color: var(--home-teal-dark);
}

/* pages written in Markdown (App\SitePage): headings and text in the site page style */
.site-markdown h1 {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 10px 0 16px;
  color: var(--home-navy);
}

.site-markdown h2,
.site-markdown h3 {
  font-weight: 600;
  color: var(--home-navy);
  margin: 1.5rem 0 0.75rem;
}

.site-markdown h2 { font-size: 1.5rem; }
.site-markdown h3 { font-size: 1.2rem; }

.site-markdown > p,
.site-markdown > ul,
.site-markdown > ol {
  max-width: 760px;
}

.site-markdown p,
.site-markdown li {
  line-height: 1.7;
  color: #4a5560;
}

/* the first paragraph under the page's title reads like a page lead */
.site-markdown h1 + p {
  font-size: 1.05rem;
  color: var(--home-muted);
}

.site-markdown img {
  max-width: 100%;
  height: auto;
}

.site-markdown .site-panel > h2:first-child,
.site-markdown .site-panel > h3:first-child {
  margin-top: 0;
  font-size: 1.25rem;
}

@media (max-width: 767.98px) {
  .site-page {
    padding: 16px 0 40px;
  }

  .site-title,
  .site-markdown h1 {
    font-size: 1.9rem;
  }

  .site-card {
    padding: 20px;
  }

  /* just the numbered circles on phones, without their labels */
  .site-steps li {
    font-size: 0;
  }

  .site-steps li::before {
    font-size: 0.85rem;
  }
}


/* ==== Docs pages (/docs/{part_number}) ====
   .docs-head           navy header across the page: title, headline facts, the product photo
   .docs-tabs-bar       the tabs, which stay at the top of the screen
   .docs-panel          one tab's content (public/js/docs.js shows one at a time once it adds
                        .docs-tabbed to the page; without it, or printed, they all show)
   .docs-block          a box in a panel, e.g. Schematic and LED Positions on Hardware
   .docs-markdown       Markdown in a block: tables and code as well
   .docs-serial         the serial console (public/js/docs.js)
   .docs-firmware       firmware builds and the steps to flash one
*/

.docs-page {
  padding-top: 0;
  margin-top: -24px; /* up to the navbar: the layout leaves a gap above every page */
}

/* the header: navy, full width (the box-shadow fills out to the edges without making the page scroll sideways) */
.docs-head {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 48px 0 52px;
  background: var(--home-navy);
  box-shadow: 0 0 0 100vmax var(--home-navy);
  clip-path: inset(0 -100vmax);
  color: #fff;
}

.docs-head-text {
  flex: 1 1 auto;
  min-width: 0;
}

/* for people who can edit Docs pages: top right of the header */
.docs-head {
  position: relative;
}

.docs-edit {
  position: absolute;
  top: 12px;
  right: 0;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.docs-edit:hover {
  background: #fff;
  color: var(--home-navy);
}

.docs-crumb {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--home-teal);
}

.docs-crumb:hover {
  color: #fff;
}

.docs-part {
  display: none;
}

.docs-head .site-title {
  color: #fff;
  font-size: 2.8rem;
}

.docs-head .site-lead {
  color: rgba(255, 255, 255, 0.75);
}

.docs-head .btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.docs-head .btn-outline-secondary:hover {
  background: #fff;
  color: var(--home-navy);
}

.docs-head-image {
  flex: 0 0 40%;
  max-width: 440px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.docs-head-image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* headline numbers as tiles */
.docs-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
}

.docs-fact {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  min-width: 110px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.docs-fact dt {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.docs-fact dd {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
}

/* the tabs: a bar across the page that stays below the fixed navbar */
.docs-tabs-bar {
  position: sticky;
  top: 51px;
  z-index: 20;
  margin-bottom: 32px;
  background: #fff;
  box-shadow: 0 0 0 100vmax #fff, 0 1px 0 100vmax #e3e7e9;
  clip-path: inset(0 -100vmax -1px);
}

.docs-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.docs-tabs::-webkit-scrollbar {
  display: none;
}

.docs-tab {
  flex: 0 0 auto;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--home-navy);
}

.docs-tab:hover {
  background: rgba(24, 188, 156, 0.12);
  color: var(--home-navy);
  text-decoration: none;
}

.docs-tab.is-active,
.docs-tab.is-active:hover {
  background: var(--home-teal);
  color: #fff;
}

.docs-tab:focus-visible {
  outline: 2px solid var(--home-teal-dark);
  outline-offset: 2px;
}

/* the panels: all of them, one after another, until the tabs take over */
.docs-panel {
  scroll-margin-top: 124px; /* below the navbar and the tabs */
}

.docs-panel + .docs-panel {
  margin-top: 48px;
}

.docs-panel-title {
  font-weight: 600;
  font-size: 1.75rem;
  margin: 0 0 16px;
  color: var(--home-navy);
}

.docs-tabbed .docs-panel:not(.is-active) {
  display: none;
}

.docs-tabbed .docs-panel + .docs-panel {
  margin-top: 0;
}

/* the tab says what the panel is */
.docs-tabbed .docs-panel-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.docs-panel:focus {
  outline: none;
}

.docs-block {
  scroll-margin-top: 124px;
  padding: 36px 40px;
  border-radius: 12px;
  background: var(--home-mist);
}

.docs-block + .docs-block {
  margin-top: 24px;
  background: #fff;
  border: 1px solid #e3e7e9;
}

.docs-block-title {
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 16px;
  color: var(--home-navy);
}

.docs-block .site-panel {
  background: #fff;
}

.docs-block + .docs-block .site-panel {
  background: var(--home-mist);
}

@media (max-width: 991.98px) {
  .docs-head {
    flex-direction: column;
    align-items: stretch;
    padding: 28px 0 32px;
  }

  .docs-head-image {
    max-width: 280px;
    padding: 10px;
  }
}

@media (max-width: 767.98px) {
  .docs-head .site-title {
    font-size: 2rem;
  }

  .docs-block {
    padding: 24px 20px;
  }
}

/* printed: every panel, no tabs */
@media print {
  .docs-tabs-bar {
    display: none;
  }

  .docs-tabbed .docs-panel:not(.is-active) {
    display: block;
  }

  .docs-tabbed .docs-panel-title {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
  }

  .docs-panel + .docs-panel {
    margin-top: 32px;
  }
}

.docs-markdown > :first-child {
  margin-top: 0;
}

.docs-markdown > :last-child {
  margin-bottom: 0;
}

.docs-markdown h2 { font-size: 1.25rem; }
.docs-markdown h3 { font-size: 1.1rem; }

.docs-markdown table {
  width: 100%;
  max-width: 760px;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.docs-markdown th,
.docs-markdown td {
  padding: 6px 10px;
  border: 1px solid #e3e7e9;
  vertical-align: top;
}

.docs-markdown th {
  background: var(--home-mist);
  color: var(--home-navy);
}

.docs-markdown code {
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--home-mist);
  color: #b03a5b;
  font-size: 0.875em;
}

.docs-markdown pre {
  padding: 12px 16px;
  border-radius: 8px;
  background: #1a2530;
  color: #e8edf0;
  overflow-x: auto;
}

.docs-markdown pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.docs-specs .docs-specs-group {
  padding-top: 16px;
  color: var(--home-navy);
  border-top: 0;
}

.docs-specs td:first-child {
  width: 40%;
}

.docs-schematic-pdf {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 420px;
  border: 1px solid #e3e7e9;
  border-radius: 4px;
}

.docs-schematic-img {
  border: 1px solid #e3e7e9;
  border-radius: 4px;
}

.docs-led-map,
.docs-block .docs-led-map,
.docs-block + .docs-block .docs-led-map {
  background: #1a2530;
}

/* the map is drawn small: shown larger, keeping its squares sharp */
.docs-led-map img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  image-rendering: pixelated;
}

/* serial console: the console on the left, its instructions on the right. The instructions are
   as long as they need to be and scroll with the page; the console stays in view below the tabs
   as they go past */
.docs-serial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 32%);
  gap: 40px;
  align-items: start;
}

.docs-serial-help {
  grid-column: 2;
  grid-row: 1;
}

.docs-serial-help > :last-child,
.docs-serial-help .docs-markdown > :last-child {
  margin-bottom: 0;
}

.docs-serial-help .docs-markdown p,
.docs-serial-help .docs-markdown li {
  font-size: 0.95rem;
}

.docs-serial {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  position: sticky;
  top: 136px; /* below the navbar and the tabs */
}

/* as tall as fits on the screen under the tabs, with the controls around it */
.docs-serial .docs-serial-output {
  height: clamp(260px, calc(100vh - 350px), 720px);
}

/* the Serial Console tab is wider than the rest of the page on big screens, for more of the
   board's output on each line */
@media (min-width: 1200px) {
  .docs-panel-wide {
    --docs-wide: min(1600px, calc(100vw - 64px));
    width: var(--docs-wide);
    margin-left: calc((100% - var(--docs-wide)) / 2);
  }
}

/* narrower: the instructions above the console, which scrolls with the page */
@media (max-width: 991.98px) {
  .docs-serial-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .docs-serial-help,
  .docs-serial {
    grid-column: 1;
    grid-row: auto;
  }

  .docs-serial {
    position: static;
  }

  .docs-serial .docs-serial-output {
    height: 360px;
  }
}

.docs-serial-bar,
.docs-serial-commands,
.docs-serial-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.docs-serial-baud {
  width: auto;
}

.docs-serial-status {
  font-size: 0.9rem;
  color: var(--home-muted);
}

.docs-serial-status.is-ok { color: var(--home-teal-dark); }
.docs-serial-status.is-error { color: #c0392b; }

.docs-serial-output {
  height: 360px;
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #1a2530;
  color: #e8edf0;
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-y: auto;
}

.docs-serial-sent { color: #7fd8c4; }
.docs-serial-note { color: #8a99a6; font-style: italic; }

.docs-serial-input {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.docs-serial-input .form-control:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.docs-serial-ending {
  flex: 0 0 auto;
  width: auto;
}

.docs-serial-options {
  font-size: 0.85rem;
  color: var(--home-muted);
  margin-bottom: 0;
}

.docs-serial-options label {
  margin: 0 12px 0 0;
}

.docs-serial-options input {
  margin-right: 4px;
}

/* firmware */
.docs-firmware-build {
  padding: 16px 0;
  border-top: 1px solid #e3e7e9;
}

.docs-firmware-build:first-child {
  border-top: 0;
  padding-top: 0;
}

.docs-firmware-build.is-picked .docs-firmware-version {
  color: var(--home-teal-dark);
}

.docs-firmware-version {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--home-navy);
}

.docs-firmware-description {
  color: #4a5560;
  max-width: 760px;
}

.docs-flash-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--home-navy);
}

.docs-flash-steps {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.docs-flash-steps li + li {
  margin-top: 14px;
}

.docs-flash-steps p {
  color: #4a5560;
}

.docs-flash-message {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e3e7e9;
}

.docs-flash-message.is-ok { border-color: var(--home-teal); }
.docs-flash-message.is-error { border-color: #c0392b; color: #c0392b; }

@media (max-width: 767.98px) {
  .docs-serial-input {
    flex-wrap: wrap;
  }

  .docs-serial-output {
    height: 280px;
  }
}

@media (max-width: 767.98px) {
  .home-section {
    padding: 44px 0;
  }

  .home-section-head h2 {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-card-img::after,
  .home-person-photo::after {
    animation: none;
  }

  .home-card-img-inner img {
    transition: none;
  }
}


/* ==== Markdown page blocks for the free gift page (App\Support\PageMarkdown) ==== */

.site-markdown .site-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-teal-dark);
  margin-bottom: 6px;
}

/* :::header - a navy title box */
.site-markdown .site-hero {
  background: var(--home-navy);
  color: #fff;
  border-radius: 14px;
  text-align: center;
  padding: 64px 32px 56px;
  margin-bottom: 24px;
}

.site-markdown .site-hero .site-eyebrow {
  color: var(--home-teal);
}

.site-markdown .site-hero h1 {
  color: #fff;
  font-size: 3.2rem;
  margin: 8px 0 14px;
}

.site-markdown .site-hero p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.site-markdown .site-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.site-markdown .site-pill {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 0.95rem;
}

/* [[gift-rows]] - one large row per gift, the photo on alternate sides */
.site-markdown .site-gift-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin: 64px 0;
}

.site-markdown .site-gift-row-flip .site-gift-art {
  order: 2;
}

.site-markdown .site-gift-art {
  position: relative;
  height: 400px;
  border-radius: 14px;
  background: var(--home-mist);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.site-markdown .site-gift-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 11rem;
  letter-spacing: -0.04em;
  color: rgba(44, 62, 80, 0.06);
  white-space: nowrap;
}

.site-markdown .site-gift-art img {
  position: relative;
  max-width: 70%;
  max-height: 75%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.site-markdown .site-gift-text h2 {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 2.2rem;
  margin: 4px 0 14px;
}

.site-markdown .site-gift-text h2 a,
.site-markdown .site-gift-text p a {
  color: inherit;
}

.site-markdown .site-gift-text p {
  font-size: 1.05rem;
  color: var(--home-muted);
}

.site-markdown .site-checklist {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
}

.site-markdown .site-checklist li {
  padding: 3px 0;
  color: var(--home-navy);
}

.site-markdown .site-checklist li::before {
  content: "\2713";
  color: var(--home-teal);
  font-weight: 700;
  margin-right: 10px;
}

/* :::photo - a wide photo with a white card on it */
.site-markdown .site-photo-card {
  position: relative;
  min-height: 400px;
  border-radius: 14px;
  background: var(--home-mist) center / cover no-repeat;
  display: flex;
  align-items: center;
  padding: 40px 48px;
  margin: 72px 0;
}

.site-markdown .site-photo-card-body {
  background: #fff;
  border-radius: 12px;
  padding: 32px 36px 24px;
  width: 420px;
  max-width: 100%;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}

.site-markdown .site-photo-card-body h2 {
  margin-top: 0;
}

/* :::questions - ### headings and their answers side by side */
.site-markdown .site-questions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  border-top: 1px solid #e3e7e9;
  padding-top: 48px;
  margin: 72px 0 32px;
}

.site-markdown .site-question h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.site-markdown .site-question p {
  color: var(--home-muted);
}

@media (max-width: 767.98px) {
  .site-markdown .site-hero {
    padding: 40px 20px 36px;
  }

  .site-markdown .site-hero h1 {
    font-size: 2.1rem;
  }

  .site-markdown .site-gift-row {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 40px 0;
  }

  .site-markdown .site-gift-row-flip .site-gift-art {
    order: 0;
  }

  .site-markdown .site-gift-art {
    height: 260px;
  }

  .site-markdown .site-gift-ghost {
    font-size: 7rem;
  }

  .site-markdown .site-photo-card {
    min-height: 0;
    padding: 180px 16px 16px;
    margin: 48px 0;
  }

  .site-markdown .site-questions {
    gap: 24px;
    margin-top: 48px;
  }
}
