/* Libre Computer — GitHub Pages native stylesheet
 * Brand tokens from the former Tailwind theme.
 */

@font-face {
  font-family: "Montserrat";
  font-weight: 400;
  src: url(/fonts/Montserrat-Regular.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  font-weight: 500;
  src: url(/fonts/Montserrat-Medium.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  font-weight: 600;
  src: url(/fonts/Montserrat-SemiBold.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  font-weight: 700;
  src: url(/fonts/Montserrat-Bold.woff2) format("woff2");
  font-display: swap;
}

:root {
  --blue-0: #dff6ff;
  --blue-1: #c8efff;
  --blue-2: #90dfff;
  /* Brand blue, for decoration where no text sits on or against it. */
  --blue-brand: #00a0e9;
  /* Two blues by ROLE, not by theme — they have opposite contrast needs and a
     single token cannot serve both:
       --blue-fill  a background with WHITE text on it (Buy button, active tab,
                    nav highlight). White on #00a0e9 is 2.91:1 and fails AA in
                    BOTH themes — this is why the Buy button read as washed
                    out — so the fill is the darker shade everywhere: 4.92:1.
       --blue-3     blue TEXT on the page background (links, breadcrumb,
                    eyebrow, ghost button). Needs to darken on a light ground
                    (#0077b0 on white = 4.92:1) and lighten on a dark one
                    (#00a0e9 on #0f172a = 6.13:1), so it flips per theme. */
  --blue-fill: #0077b0;
  --blue-3: #0077b0;
  --gray-0: #7f7f7f;
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #7f7f7f;
  --card: #f8fafc;
  --border: #e2e8f0;
  --nav-bg: rgba(255, 255, 255, 0.82);
  --footer-bg: #dff6ff;
  --prose-link: #0077b0;
}

html.dark {
  --bg: #0f172a;
  --fg: #e2e8f0;
  --muted: #94a3b8;
  --card: #1e293b;
  --border: #334155;
  --nav-bg: rgba(15, 23, 42, 0.82);
  --footer-bg: #1e293b;
  /* Blue TEXT flips: brand blue passes on the dark ground (6.13:1 on --bg,
     5.02:1 on --card) where the darker shade would not (3.63:1 / 2.97:1).
     --blue-fill does NOT flip — white text on it fails either way. */
  --blue-3: #00a0e9;
  --prose-link: #00a0e9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* The nav bar is fixed, so an anchor target scrolled flush to the viewport
   top sits underneath it. Reserve its height on anything addressable. */
[id] {
  scroll-margin-top: 5.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", Verdana, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
select,
input,
textarea {
  font: inherit;
}

/* ---- layout ---- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
}

.wrap {
  margin: 0 auto;
  padding: 0 1rem;
  max-width: 1280px;
}

.wrap-wide {
  margin: 0 0.5rem;
  padding-top: 8rem;
}

@media (min-width: 768px) {
  .wrap-wide {
    margin: 0 4rem;
  }
}

.heading {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 2.5rem;
}

/* ---- nav ---- */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  font-weight: 700;
}

@media (min-width: 768px) {
  #site-nav {
    padding: 1rem 4rem;
  }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand img {
  height: 2.25rem;
}

.nav-brand span {
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .nav-brand span {
    font-size: 1.125rem;
  }
}

.nav-toggle {
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  display: inline-flex;
}

.nav-toggle img {
  width: 1.75rem;
  height: 1.75rem;
}

html.dark .nav-toggle img {
  filter: invert(1);
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
}

.nav-links {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  font-size: 1.125rem;
  padding-bottom: 1rem;
}

.nav-links.open {
  display: flex;
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: 2.5rem;
    font-size: 1rem;
    padding: 0;
  }
}

.nav-links a {
  transition: color 0.15s ease, transform 0.15s ease;
}

.nav-links a:hover {
  color: var(--muted);
}

.nav-links a.highlight {
  background: var(--blue-fill);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

.nav-links a.highlight:hover {
  color: #fff;
  transform: scale(1.05);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  color: var(--fg);
  font-size: 0.85rem;
}

.theme-btn .theme-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Auto is the default, so it reads as the quiet state; an explicit choice is
   marked, which is the whole point of showing the state at all. */
.theme-btn[data-theme="auto"] {
  color: var(--muted);
}

.theme-btn[data-theme="light"],
.theme-btn[data-theme="dark"] {
  border-color: currentColor;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: scale(1.03);
}

.btn-blue {
  background: var(--blue-fill);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 2px solid var(--blue-3);
  color: var(--blue-3);
}

/* ---- hero / home ---- */
.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 8rem 1rem 3rem;
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 9rem 4rem 4rem;
  }
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
  white-space: pre-line;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero img {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  display: block;
  border-radius: 1rem;
}

/* Every content photo gets the same corner. Logos and distro icons are left
   alone: they are transparent and small, so there is no plate to soften. */
.section-split img,
.soc-card img,
.dl-card img {
  border-radius: 0.7rem;
}

.path-grid {
  display: grid;
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .path-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.path-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  background: var(--card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.path-card:hover {
  border-color: var(--blue-3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.path-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.path-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.path-cta {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--blue-3);
}

.path-card-oem {
  border-color: #bae6fd;
}

html.dark .path-card-oem {
  border-color: #0369a1;
}

.section {
  padding: 3rem 1rem;
}

@media (min-width: 768px) {
  .section {
    padding: 4rem;
  }
}

.section-split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .section-split {
    grid-template-columns: 1fr 1fr;
  }
}

.section h2 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
}

.section p {
  color: var(--muted);
  white-space: pre-line;
}

.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

/* Fit as many equal cards as the column allows rather than a fixed three, so
   adding a pillar fills the row instead of leaving one card stranded. */
@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
}

.feature-card img {
  height: 4rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.soc-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .soc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.soc-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  background: var(--card);
}

.soc-card:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.latest-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .latest-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.latest-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
}

.latest-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.latest-card .body {
  padding: 1rem 1.25rem 1.5rem;
}

.latest-card h3 {
  margin: 0 0 0.5rem;
}

.latest-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- contact ---- */
#contact {
  padding: 3rem 1rem 4rem;
}

@media (min-width: 768px) {
  #contact {
    padding: 3rem 4rem 5rem;
  }
}

.social-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.social-row img {
  width: 4rem;
  transition: transform 0.15s ease;
}

.social-row a:hover img {
  transform: scale(1.08);
}

.contact-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Off-screen until focused: the first Tab on any page offers the nav skip
   instead of walking a keyboard user through every link on every route. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0 0 0.5rem 0;
  padding: 0.6rem 1rem;
}

.skip-link:focus {
  left: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  color: var(--fg);
}

.contact-form textarea {
  min-height: 8rem;
  resize: vertical;
}

/* A placeholder is not a label: it vanishes on the first keystroke, and it is
   not a reliable accessible name. The visible label stays above the field. */
.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form .field > span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.contact-form .field > span > i {
  font-style: normal;
  font-weight: 400;
}

.toast {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 100;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 22rem;
}

.toast.ok {
  border-color: #22c55e;
}

.toast.err {
  border-color: #ef4444;
}

/* ---- products ---- */
.filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .filters {
    flex-direction: row;
    align-items: center;
  }
}

.filters select {
  border-radius: 0.5rem;
  border: 0;
  background: #f3f4f6;
  color: var(--gray-0);
  padding: 0.5rem 0.75rem;
}

html.dark .filters select {
  background: #334155;
  color: #f1f5f9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Tag groups: chips inside a group OR together, groups AND together, so the
   grouping is the UI for the filter semantics -- keep them visually separate.

   The panel slides open by animating grid-template-rows 0fr -> 1fr, which is
   the one way to transition to a content-sized height without hard-coding a
   max-height that clips when a class gains chips. */
.tag-groups {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.tag-groups.open {
  grid-template-rows: 1fr;
  margin-bottom: 1.5rem;
}

.tag-groups-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow: hidden;
}

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

.sort-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-weight: 500;
}

.tag-group {
  display: grid;
  gap: 0.35rem 1rem;
  align-items: baseline;
}

@media (min-width: 768px) {
  .tag-group {
    grid-template-columns: 8.5rem 1fr;
  }
}

.tag-group-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

/* A quiet control: it opens a panel, it is not the point of the page. */
.filter-toggle,
.filter-toggle.btn-ghost {
  border-color: var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
}

.filter-toggle:hover {
  color: var(--fg);
}

.filter-toggle.has-filters {
  border-color: var(--blue-0);
  color: var(--blue-0);
}

/* Chip tooltip: what the abbreviation on the chip actually means. Shown on
   hover AND keyboard focus, since the chip is a button people can tab to. */
.tag-tip {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: max-content;
  max-width: min(22rem, 70vw);
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.tag:hover .tag-tip,
.tag:focus-visible .tag-tip {
  opacity: 1;
  visibility: visible;
}

/* A chip at either end would push its bubble off-screen. */
.tag-row .tag:first-child .tag-tip {
  left: 0;
  transform: none;
}

.tag-row .tag:last-child .tag-tip {
  left: auto;
  right: 0;
  transform: none;
}

.filter-count {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.tag {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  background: #f3f4f6;
  cursor: pointer;
  position: relative;
}

html.dark .tag {
  background: #334155;
  color: #e2e8f0;
}

.tag.on {
  background: var(--blue-0);
  color: #0f172a;
}

html.dark .tag.on {
  background: #0ea5e9;
  color: #fff;
}

.tag-reset {
  background: #fecaca;
  color: #7f1d1d;
  border-radius: 999px;
  border: 0;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

html.dark .tag-reset {
  background: #7f1d1d;
  color: #fecaca;
}

.product-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

/* Product photography is shot on white, so in dark mode the plate is a hard
   white rectangle. Inset it and round it: the card becomes the frame instead
   of the photo punching a hole in the page. */
.product-card img {
  width: calc(100% - 1rem);
  margin: 0.5rem 0.5rem 0;
  aspect-ratio: 1;
  object-fit: cover;
  background: #fff;
  border-radius: 0.7rem;
}

.product-card .body {
  padding: 1rem;
}

.product-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.product-card .meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---- product detail ---- */
.product-detail {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .product-detail {
    grid-template-columns: 1fr 1fr;
  }
}

.gallery {
  position: relative;
  background: var(--card);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.gallery img {
  width: calc(100% - 1rem);
  height: 20rem;
  margin: 0.5rem 0.5rem 0;
  object-fit: contain;
  background: #fff;
  border-radius: 0.7rem;
  display: block;
}

@media (min-width: 769px) {
  .gallery img {
    height: 24rem;
  }
}

.gallery-nav {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
}

.gallery-thumbs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.5rem;
}

.gallery-thumbs button {
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 0.35rem;
  flex: 0 0 auto;
}

.gallery-thumbs button.on {
  border-color: var(--blue-3);
}

.gallery-thumbs img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 0.25rem;
  display: block;
}

.product-title {
  text-align: center;
}

.product-title h1 {
  font-size: 2rem;
  margin: 0;
}

.product-title .model {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.25rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 1rem;
}

.tabs button {
  border: 0;
  background: var(--card);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}

.tabs button.on {
  background: var(--blue-fill);
  color: #fff;
}

.tab-panel.hidden {
  display: none;
}

/* ---- downloads / blogs ---- */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.dl-card {
  border: 2px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.dl-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.dl-card img {
  width: 8rem;
  height: 8rem;
  object-fit: contain;
}

.blog-list {
  display: grid;
  gap: 1.5rem;
}

.blog-item {
  display: grid;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--card);
}

@media (min-width: 768px) {
  .blog-item {
    grid-template-columns: 14rem 1fr;
  }
}

.blog-item img {
  width: calc(100% - 1rem);
  height: calc(100% - 1rem);
  margin: 0.5rem;
  min-height: 10rem;
  object-fit: cover;
  border-radius: 0.7rem;
}

.blog-item .body {
  padding: 1rem 1.25rem;
}

.blog-item time {
  color: var(--muted);
  font-size: 0.85rem;
}

.blog-post img.cover {
  width: 100%;
  /* Reserve the box before the image arrives. Without a ratio the article
     text renders at the top of the page and is shoved down on decode. */
  aspect-ratio: 16 / 9;
  max-height: 24rem;
  object-fit: cover;
  border-radius: 1.5rem;
}

.blog-post .meta {
  text-align: center;
  margin: 1.5rem 0 0.5rem;
}

.blog-post .meta span {
  display: inline-block;
  background: #e5e7eb;
  color: var(--gray-0);
  padding: 0.35rem 0.75rem;
  border-radius: 0.35rem;
}

html.dark .blog-post .meta span {
  background: #334155;
  color: #cbd5e1;
}

/* ---- prose (markdown) ---- */
.prose {
  line-height: 1.7;
  max-width: 75ch;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  line-height: 1.25;
  margin: 1.5em 0 0.5em;
}

.prose p,
.prose ul,
.prose ol,
.prose table {
  margin: 0.75em 0;
}

.prose a {
  color: var(--prose-link);
  font-weight: 400;
}

.prose a:hover {
  color: var(--blue-2);
}

.prose img {
  border-radius: 0.5rem;
}

.prose code {
  background: var(--card);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.prose pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.prose-box {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 1.5rem;
}

html.dark .prose-box {
  background: #334155;
}

/* ---- footer ---- */
#site-footer {
  margin-top: 5rem;
  background: var(--footer-bg);
  color: var(--gray-0);
}

html.dark #site-footer {
  color: #94a3b8;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.5rem 1rem 1rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    padding: 2.5rem 2.5rem 1rem;
  }
}

.footer-cols {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-cols {
    flex-direction: row;
    gap: 4rem;
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 1.05rem;
}

.footer-links a,
.footer-links button {
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
  font: inherit;
  transition: transform 0.15s ease;
}

.footer-links a:hover,
.footer-links button:hover {
  transform: scale(1.03);
}

.footer-social {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-social a {
  font-size: 1.35rem;
}

.footer-copy {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.footer-credit {
  text-align: center;
  padding-bottom: 1rem;
  font-size: 0.9rem;
}

/* ---- modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: var(--bg);
  color: var(--fg);
  border-radius: 1rem;
  max-width: 32rem;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.modal header button {
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}

/* ---- 404 ---- */
.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 8rem 1rem 3rem;
  text-align: center;
}

/* ---- OEM redesign additions ---- */
.photo-banner {
  margin: 4.5rem 1rem 0;
  padding: 0.6rem 1rem;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.85rem;
  text-align: center;
  border-radius: 0.5rem;
}

.photo-banner.soft {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border);
}

html.dark .photo-banner {
  background: #1e293b;
  border: 1px solid var(--border);
  color: #e2e8f0;
}

html.dark .photo-banner.soft {
  background: #1e293b;
  color: #94a3b8;
}


@media (min-width: 768px) {
  .photo-banner {
    margin: 5.5rem 4rem 0;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-3);
  margin: 0 0 0.75rem;
}

/* Audience names stay whole; the line breaks between them. Without this,
   "Design-in" breaks at its hyphen and leaves "in" alone on the next line. */
.eyebrow span {
  white-space: nowrap;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 40rem;
}

.preline {
  white-space: pre-line;
  color: var(--muted);
}

.proof-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.proof-bar li,
.spec-chips li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg);
}

.proof-bar.tight {
  margin-top: 1rem;
}

.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.section-lead {
  text-align: center;
  color: var(--muted);
  max-width: 40rem;
  margin: -1.5rem auto 2rem;
}

.section-cta {
  text-align: center;
  margin-top: 1.5rem;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.list-price {
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  font-size: 0.95rem;
}

.list-price-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
  margin-right: 0.25rem;
}

.list-price.muted {
  font-weight: 500;
  color: var(--muted);
}

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

.product-card-rich .body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-card-rich h3 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.product-card-rich .card-sku {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

#site-footer {
  background: #0f172a;
  color: #94a3b8;
}

html.dark #site-footer {
  background: #020617;
}

/* Scoped to .footer-inner, NOT to #site-footer as a whole. The purchase modal
   is authored inside the footer element but paints itself on the page
   background, so a blanket #site-footer rule put this near-white on a white
   panel: the seller links measured 1.23:1 in light mode — the same colour as
   the surface behind them. An ID selector also outranks anything the modal
   could set on itself, so the fix has to be here. */
#site-footer .footer-inner a,
#site-footer .footer-inner button {
  color: #e2e8f0;
}

/* The modal sits on --bg, so its links take the page's link colour: 4.92:1 in
   light, 6.13:1 in dark. */
.modal a {
  color: var(--blue-3);
}

.footer-social img {
  opacity: 0.85;
  filter: brightness(0) invert(0.85);
}

.commercial-band {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.commercial-inner {
  display: grid;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .commercial-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.design-in-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
}

.social-row.compact img {
  width: 2.5rem;
  height: 2.5rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--blue-3);
}

.product-detail-oem {
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 1024px) {
  .product-detail-oem {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
  }
}

.pdp-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0.25rem 0 0.5rem;
  line-height: 1.2;
}

.pdp-title .model {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.25rem;
}

.variant-table {
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.variant-table th,
.variant-table td {
  text-align: left;
  padding: 0.3rem 1.5rem 0.3rem 0;
  border-bottom: 1px solid var(--border);
}

.variant-table th {
  color: var(--muted);
  font-weight: 600;
}

.variant-table td:last-child {
  font-weight: 700;
}

.pdp-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.lifecycle-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

html.dark .lifecycle-badge {
  background: #064e3b;
  color: #a7f3d0;
  border-color: #065f46;
}

.pdp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.price-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

.pdp-tabs-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.distro-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.distro-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--bg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.distro-chip:hover {
  border-color: var(--blue-3);
  transform: translateY(-1px);
}

.dl-heading {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}

.dl-heading:first-child {
  margin-top: 0;
}

.dl-notes {
  margin-top: 0.5rem;
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Product page polish */
.pdp {
  padding-bottom: 3rem;
}

.pdp .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.gallery {
  position: relative;
  background: var(--card);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* The photo carries its own white studio background in the raster, so a dark
   element background behind a contained image just framed that white in hard
   corners. Keep the plate white in both themes, inset it, and round it: one
   soft card rather than a white rectangle punched into the page. */
.gallery #gallery-main {
  width: calc(100% - 1rem);
  margin: 0.5rem 0.5rem 0;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border-radius: 0.7rem;
  display: block;
  min-height: 16rem;
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
}

.gal-btn {
  min-width: 2.5rem;
  padding: 0.35rem 0.6rem !important;
}

.gal-counter {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.gallery-thumbs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 0.75rem 0.75rem;
  scrollbar-width: thin;
}

.gallery-thumbs button {
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 0.4rem;
  flex: 0 0 auto;
  opacity: 0.75;
}

.gallery-thumbs button.on {
  border-color: var(--blue-3);
  opacity: 1;
}

.gallery-thumbs img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 0.3rem;
  display: block;
  background: #fff;
}

.sticky-tabs {
  position: sticky;
  top: 4.5rem;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.5rem 0;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.sticky-tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related h2 {
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
}

.related-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pdp-buybox {
  position: sticky;
  top: 5.5rem;
}

@media (max-width: 1023px) {
  .pdp-buybox {
    position: static;
  }
}

.tab-panel.prose-box {
  max-width: none;
}

.tab-panel.prose table {
  display: block;
  overflow-x: auto;
  font-size: 0.9rem;
}

.pillars .feature-card img {
  width: 3rem;
  height: 3rem;
}

.section-split.reverse {
  direction: ltr;
}

@media (min-width: 1024px) {
  .section-split.reverse {
    grid-template-columns: 1fr 1fr;
  }
  .section-split.reverse > :first-child {
    order: 0;
  }
}

/* Footer no longer pastel */
:root {
  --footer-bg: #0f172a;
}

/* ---- desktop content column ----
   The column is measured in rem, not viewport percent: it is text that sets
   the scale, and a percentage column keeps growing on a wide display while the
   type stays put, so images and figures swell out of proportion to the words
   beside them. It grows with the window up to --page-max and then stops, with
   --page-gutter as the minimum breathing room on smaller desktops.

   Full-bleed surfaces (the nav bar, home sections, footer) keep their
   edge-to-edge background and inset their contents to the same column, so the
   brand, the body and the footer share one left edge. Last in the file on
   purpose: it has to win over the per-component `padding: … 4rem` shorthands
   above. */
@media (min-width: 768px) {
  :root {
    --page-max: 72rem;
    --page-gutter: 4rem;
  }

  .wrap-wide {
    width: min(100% - 2 * var(--page-gutter), var(--page-max));
    margin-left: auto;
    margin-right: auto;
  }

  #site-nav,
  .hero,
  .section,
  .footer-inner {
    padding-left: max(var(--page-gutter), (100% - var(--page-max)) / 2);
    padding-right: max(var(--page-gutter), (100% - var(--page-max)) / 2);
  }
}

/* Buy modal: the market picker sits above the lists, quiet until used. */
.ship-to {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.ship-to select {
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}

.buy-note {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Design-in form: which board the enquiry arrived with. */
.form-note {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}
