/* === /public/css/style.css === */
/* v2025-08-03 10:31:21 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* === Fonts === */
@font-face {
  font-family: Inter;
  src: url('/public/fonts/Inter-Light.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url('/public/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url('/public/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Existing */
  --card-bg: #1e293b;
 --card-border: #60a5fa;
/*   --text-secondary: #93c5fd; */
  --link-color: #93c3ce;
/*   --spotlight-max-width: 100%; */
  /* New (neutral defaults) */
  --card-radius: .25rem;
/*   --card-pad-x: 1.5rem; */
/*  --card-pad-y: 1.5rem; */
  --card-shadow: 0 4px 12px rgb(0 0 0 / 10%);


  /* Optional: base text color token (keeps cards consistent) */
  --text-color: #eee;
  --text-secondary: #cbd5e1;
  --text-1: var(--text-color);
  --border-3: var(--card-border);
}
/* === Global heading reset === */
/* h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  line-height: 1.2;
  margin-top: 0rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
} */


/* === v2025-08-25 Global Typeface (Manrope headings) === */
@font-face{
  font-family: "ManropeVar";
  src: url("/public/fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Body font (adjust if you already set this elsewhere) */
/* === v2025-08-25 Body Typeface === */
:where(html, body){
  font-family: "ManropeVar", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 200;      /* lighter than 400, still very readable */
  line-height: 1.55;
}
:where(p, li, dd, td, label, input, textarea, small){
  font-weight: inherit;  /* ensure everything follows the body weight */
}


/* Headings (light & elegant) */
:where(h1,h2,h3,h4,h5,h6){
  font-family: "ManropeVar", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.005em;           /* subtle tighten */
}

/* Progressive enhancement: only add balanced wrapping if the browser supports it */
@supports (text-wrap: balance) {
  :where(h1,h2,h3,h4,h5,h6){
    text-wrap: balance;
  }
}

:where(h1){ font-weight: 200; }
:where(h2){ font-weight: 250; }
:where(h3){ font-weight: 300; }
:where(h4){ font-weight: 500; }
:where(h5){ font-weight: 500; }
:where(h6){ font-weight: 500; }

/* Lists and small text inherit body; no per-page overrides needed */

/* === Base layout === */
/* Body reset + colors only (let global rules set fonts/weights) */
body {
  margin: 0;
  background: #111;
  color: #fff;
}

/* Make dark mode work whether .dark is on <html> or <body> */
html.dark,
body.dark {
  background: #111;
  color: #eee;
}


/* === Links === */
a {
  color: #1e40af; /* blue-800 */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: #1e3a8a; /* blue-900 */
}

@media (prefers-color-scheme: dark) {
  a {
    color: #93c5fd; /* blue-300 */
  }

  a:visited {
    color: #bfdbfe; /* blue-200 */
  }
}

/* === Card Globals === */
/* Global card skin (visual only — no layout changes) */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-pad-y) var(--card-pad-x);
  box-shadow: var(--card-shadow);
  color: var(--text-color);
}



/* === Base layout === */
.wrap {
  max-width: 1024px;
  margin: 0 auto;
/*   padding: 1rem; */
}

/* === Header / Footer === */

.site-footer {
/*   margin-top: 1rem; */
}

.site-footer a {
  color: #fff;
  margin-right: 0.4rem;
  text-decoration: none;
}

/* === Logo position and dark mode switch === */
img.logo-light {
  display: none;
}
img.logo-dark {
  display: inline;
}
.dark img.logo-dark {
  display: none;
}
.dark img.logo-light {
  display: inline;
}

.wrap.card h1 img {
  vertical-align: middle;
  position: relative;
  top: 3px;
}

/* === Card layout (header/footer/content) === */
.wrap.card {
  /* display: flex; */
  /* justify-content: space-between; */
  /* align-items: center; */ 
  /* flex-wrap: wrap; */
  /* gap: 1.5rem; */
  /* background: #0369a1; */
  /* color: #fff; */
  border: 1px solid #001845;
/*   border-radius: 0.25rem; */
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
  padding: 1.5rem;
  max-width: 1024px;
  margin: 1rem auto 1rem;
}

.dark .wrap.card {
  background: #1e293b;
  color: #eee;
  border-color: #60a5fa;
}

.wrap.card.flex-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* === Nav area === */
.wrap.card nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  justify-content: flex-end;
  align-items: center;
  flex-grow: 1;
}

/* Primary inline anchors spacing */
/* nav #main-nav a + a { margin-left: 0.8rem; } */

/* Dropdown behavior */
.dropdown { position: relative; }
.dropdown .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  max-height: 60vh;      /* long lists scroll */
  overflow: auto;
  padding: 0.5rem 0.75rem;
  z-index: 1000;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content { display: block; }

/* Links inside dropdowns */
.dropdown .dropdown-link {
  display: block;
  padding: 0.25rem 0;
  white-space: normal;   /* allow wrapping */
  line-height: 1.3;
}

/* Optional spacing between primary links and dropdowns */
/* nav #main-nav { margin-right: 1rem; }  */
/* === Dropdown structure === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  padding: 0.5rem;
  border-radius: 0.5rem;
  z-index: 1000;
  box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
  background: #fff;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dark .dropdown-content {
  background: #1e293b;
}

/* === Dropdown links (shared size, separate color) === */
.dropdown-content a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: #111;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 4px;
  margin-bottom: 0.3rem;
}

.dropdown-content a:hover {
  background: #e0f2fe;
  border-color: #93c5fd;
}

.dark .dropdown-content a {
  color: #eee;
  border-color: transparent;
}

.dark .dropdown-content a:hover {
  background: #334155;
  border-color: #60a5fa;
}


/* === Utility: heading spacing === */

/* === Theme toggle button === */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #111;
  cursor: pointer;
  z-index: 10000;
  padding: 0.5rem;
}

.dark .theme-toggle {
  color: #eee;
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

.site-footer {
  margin-bottom: 2rem;
}

/* === Footer layout === */
.site-footer .wrap.card {
  background: #0369a1;
  color: #fff;
/*   border: 2px solid #001845; */
/*   border-radius: 0.5rem; */
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1.5rem;
  font-size: 11px;
}

.dark .site-footer .wrap.card {
  background: #1e293b;
  border-color: #60a5fa;
  color: #eee;
}

.footer-links {
  font-size: 1rem;
  text-align: right;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  margin-left: 0.5rem;
}

.footer-links a:first-child {
  margin-left: 0;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* === Visually hidden text for accessibility === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* === Animated icon toggle === */
.theme-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
  transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

/* === Page-level card wrapper (around content-card blocks) === */
.page-main > .wrap.card {
  background: #fff;
  color: #111;
  border: 1px solid #001845;
/*   border-radius: 0.5rem; */
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
  padding: 1.5rem;
  margin: 0 auto 1rem;
  max-width: 1024px;
}

.dark .page-main > .wrap.card {
  background: #1e293b;
  color: #eee;
  border-color: #60a5fa;
}

/* === Forms inside .wrap.card === */
form:not(.contact-form):not(.quote-contact-form):not(.qr-form) {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
  align-items: start;
}

form textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 6px;
  background: #fff;
  color: #111;
  border: 1px solid var(--card-border);
  min-height: 120px;
  resize: vertical;
}

form fieldset {
  grid-column: 1 / -1;
  border: none;
  padding: 0;
  margin: 1.5rem 0 0.5rem;
}

form input[type='submit'] {
  grid-column: 2 / 3;
  justify-self: end;
  background: #0369a1;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

form input[type='submit']:hover {
  background: #025f8f;
}

.dark form textarea {
  background: #1e293b;
  color: #eee;
  border-color: #334155;
}

.dark form input[type='submit'] {
  background: #60a5fa;
  color: #000;
}

.dark form input[type='submit']:hover {
  background: #93c5fd;
}

/* === Enforced global link styles for cards and content blocks === */


.page-main a {
  color: #1e40af;
}

.dark .page-main h1 {
  color: #eee;
}

.page-main a:visited {
  color: #1e3a8a;
}

.page-main a:hover {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {

  .page-main a {
    color: #93c5fd;
  }

  .page-main a:visited {
    color: #bfdbfe;
  }
}

/* === Content layout variants === */
.wrap.card.content {
  display: block;
}

.wrap.card.align-top {
  align-items: flex-start;
}

/* === Quote Summary (Single Column) === */



/* === Button Row Layout === */
.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

/* === Heading Letter Spacing === */

/* h3 {
  letter-spacing: 0.02em;
  font-weight: 300;
} */

/* === Tag Styling === */
.tag {
  font-size: 0.75rem;
  background: #e5e7eb;
  color: #374151;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.dark .tag {
  background: #374151;
  color: #d1d5db;
}

/* === Form Spacing Fixes === */
form:not(.contact-form):not(.quote-contact-form):not(.qr-form) {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem 1.5rem;
  margin-top: 0rem;
  align-items: start;
}

form label {
  text-align: right;
  margin-top: 0.75rem;
}

.quote-contact-form form:not(.contact-form):not(.quote-contact-form):not(.qr-form) {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
  align-items: start;
}



/* === Contact Page Layout (Left: Title, Right: Form) === */

/* === Left Column (Heading) === */
.contact-heading h1 {
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
}

/* === Right Column (Form Container) === */
.contact-form-wrapper {
  padding-right: 1rem;
}

/* === Submit Button === */
.contact-heading {
  align-self: start;
}

.availability {
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.contact-grid-layout {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

/* Reuse your card style, apply extra alignment if needed */
.contact-info-card h1 {
  margin-top: 0;
}

.hour-table {
  width: 100%;
  font-size: 0.95rem;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem 0;
}

.hour-table td {
  padding: 0.25rem 0.5rem 0.25rem 0;
  vertical-align: top;
  color: var(--text-secondary);
}

.availability {
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.contact-grid-layout {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 2rem;
  align-items: start;
  margin: 0 auto 2rem;
  max-width: 1024px;
}

/* Prevent overlap and enforce consistent layout */
.page-main {
  padding-bottom: 2rem;
}

/* Remove unintended outer margin that could break alignment */
.contact-grid-layout > .wrap.card {
  margin-bottom: 0;
}

.availability {
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.card-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  max-width: 1024px;
  margin: 0 auto 1rem;
}

/* Drop .wrap for inner cards to prevent max-width override */
.page-main {
  padding-bottom: 0;
}

/* Outer row card (full width like header/footer) */
.page-main {
  padding-bottom: 0;
}

.contact-info-card {
  flex: 3;
}

.contact-form-card {
  flex: 7;
}

.card.contact-form-card {
  padding: 1.5rem;
  background: var(--card-bg, #fff);
  color: inherit;
  border: 1px solid var(--card-border);
  border-radius: .25rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
}

.dark .card.contact-form-card {
  background: #1e293b;
  color: #eee;
  border-color: #60a5fa;
}

 .status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 0.5rem;
  border-radius: 50%;
  vertical-align: middle;
}

.status-dot.online {
  background-color: #25d366;
}

.status-dot.offline {
  background-color: #b91c1c;
} 
.contact-grid-layout {display: grid;
  grid-template-columns: 30% 70%;
  gap: 2rem;
  align-items: start;
  margin: 0 auto 2rem;
  max-width: 1024px;}

/* .status-dot.online {background-color: #25d366;}

.hour-table {width: 100%;
  font-size: 0.95rem;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem 0;}

.hour-table td {padding: 0.25rem 0.5rem 0.25rem 0;
  vertical-align: top;
  color: var(--text-secondary);} */

form textarea {width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 6px;
  background: #fff;
  color: #111;
  border: 1px solid;}

.availability {font-weight: 500;
  font-size: 0.95rem;
  margin-top: 0.5rem;}


.card.contact-info-card {
  padding: 1.5rem;
  background: var(--card-bg, #fff);
  color: inherit;
  border: 1px solid;
  border-radius: .25rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
}

.dark .card.contact-info-card {
  background: #1e293b;
  color: #eee;
  border-color: #60a5fa;
}

.contact-form {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem 1.5rem;
  align-items: start;

  margin-top: 0.75rem;
}

.contact-form label {
  text-align: right;
  font-weight: 400;

  margin-top: -1px;
}


.contact-form button {
  grid-column: 2 / 3;
  justify-self: end;
  padding: 0.5rem 1rem;
  background: #0369a1;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.contact-form button:hover {
  background: #025f8f;
}


.contact-info-card h1 {
  font-size: 1.75rem;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.2;
}


.card.contact-form-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.card.contact-form-card .contact-thankyou {
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

.card.contact-form-card .contact-thankyou h1 {
  align-self: flex-start;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.2;
}


@media (prefers-color-scheme: dark) {
  .contact-form input,
  .contact-form textarea {
    background: #1e293b;
    color: #eee;
    border-color: #334155;
  }
}


@media (min-width: 768px) {
  .contact-form {
    grid-template-columns: 140px 1fr;
    gap: 1rem 1rem;
  }

  .contact-form button {
    justify-self: start;
  }
}


.contact-form button {
  grid-column: 2 / 3;
  justify-self: start;
  max-width: 200px;
}


.price-display {
  font-size: 1.1em;
  margin: 0;
}

.form-group {
  margin-bottom: 1em;
}

.form-input,
.form-select {
  width: 100%;
  max-width: 300px;
  padding: 0.5em;
}

/* v2025-08-31 — Submenu refinement */
.site-nav .submenu a{
  font-size: 0.9375rem;   /* 15px @16 base */
  line-height: 1.25;      /* tighter, still readable */
  padding: .4rem .75rem;  /* slightly slimmer than top-level */
  letter-spacing: .01em;
}

/* If your submenu uses <li> > a, keep hit area generous */
.site-nav .submenu li > a {
  display: block;
}

/* Optional: subtle separators for elegance (comment out if not needed) */
.site-nav .submenu li + li > a {
  border-top: 1px solid var(--border-muted, rgba(255,255,255,.08));
}
/* v2025-09-01 — nav split + submenu refinement */
.site-nav { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }
/* push the whole group (About + dropdowns + Contact) to the right */
#nav-static-left { 
  margin-left: auto;           /* <-- move the 'push' here */
  display: flex; 
  gap: .35rem; 
}

/* Contact block no longer needs to push; just sit to the right of the group */
.nav-static-right { 
  margin-left: .35rem;          /* spacing before Contact */
  display: flex; 
  align-items: center; 
  gap: .35rem; 
}
/* Spacing for the in-between dropdowns */
header nav .dropdown + .dropdown { 
  margin-left: .35rem;            /* space between consecutive dropdowns */
}

/* Space between left static group and first dropdown */
#nav-static-left + .dropdown { 
  margin-left: .35rem;
}

/* Space between last dropdown and the right static group */
header nav .dropdown + .nav-static-right { 
  margin-left: .35rem;
}

/* (Optional) make each dropdown link a comfy, aligned hit area */
header nav .dropdown > a {
  display: flex;
  align-items: center;
  padding: .5rem .6rem;          /* keeps ~44px tap height with your header line-height */
  /* font-size: 0.95rem;         <- uncomment if you also want the subtle size tweak */
}

/* existing container layout (leave as is) */
.site-nav { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }


/* Primary inline anchors spacing (new left block) */
#nav-static-left a + a { margin-left: 0.35rem; }

/* Optional extra gap between “About” and the dropdowns */
#nav-static-left { margin-right: .35rem; }
@media (max-width: 700px){
  #nav-static-left { margin-left: 0; }
}
/* Tighter spacing between dropdowns and static groups */
header nav .dropdown + .dropdown { 
  margin-left: .2rem;   /* was .8rem */
}
#nav-static-left + .dropdown { 
  margin-left: .2rem;   /* was .8rem */
}
header nav .dropdown + .nav-static-right { 
  margin-left: .2rem;   /* was .8rem */
}

/* Top-level triggers: smaller text + tighter horizontal padding
   (covers common structures whether anchors are direct children or inside UL > LI) */
header nav #nav-static-left > a,
header nav #nav-static-left > ul > li > a,
header nav .dropdown > a,
header nav > ul > li.dropdown > a,
header nav .nav-static-right > a,
header nav .nav-static-right > ul > li > a {
  font-size: .93rem;
  line-height: 1.1;
  padding: .45rem .5rem;   /* tighter inline padding, keeps good hit area */
}

/* (Optional) nudge caret/icons in triggers down a touch */
header nav .dropdown > a svg {
  inline-size: .9em;
  block-size: .9em;
}
/* Make gap the single source of truth */
.site-nav { display:flex; align-items:center; gap:.35rem; flex-wrap:wrap; }

#nav-static-left {
  margin-left: auto;         /* keep the spacer that pushes the group right */
  display: flex;
  gap: .35rem;               /* was .8rem */
}

/* Remove additive margins; let gap handle spacing */
#nav-static-left a + a { margin-left: 0; }                /* was 0.8rem */
header nav .dropdown + .dropdown { margin-left: 0; }      /* was .8rem */
#nav-static-left + .dropdown { margin-left: 0; }          /* was .8rem */

.nav-static-right {
  margin-left: 0;            /* was .8rem; rely on gap instead */
  display: flex;
  align-items: center;
  gap: .35rem;               /* was .8rem */
}

header nav .dropdown + .nav-static-right { margin-left: 0; } /* was .8rem */
.flex-row { gap: .5rem; }   /* was 1rem */

/* ===== NAV EMERGENCY NORMALIZE — v2025-09-07 ===== */
/* Make gap the only spacing source; kill all additive margins inside nav */

.site-header .site-nav { 
  gap: .32rem !important;
}

.site-header #nav-static-left,
.site-header .nav-static-right {
  gap: .32rem !important;
}

/* Remove ALL margin-left inside the nav tree (this is the big reset) */
.site-header .site-nav * + * { 
  margin-left: 0 !important;
}

/* Keep the nav pushed to the right, but no extra jumps */
.site-header #nav-static-left { 
  margin-left: auto !important; 
}
.site-header .nav-static-right { 
  margin-left: 0 !important; 
}

/* Ensure dropdown siblings don't reintroduce margins */
.site-header .dropdown + .dropdown,
.site-header #nav-static-left + .dropdown,
.site-header .dropdown + .nav-static-right {
  margin-left: 0 !important;
}

/* Optional: slightly tighten top-level link padding so items look less bulky */
.site-header .site-nav a {
  padding: .30rem .45rem !important;
  line-height: 1.15;
}
/* ===== NAV NORMALIZE + REBUILD — v2025-09-07 ===== */
/* 0) Kill all gaps + margins inside the nav so nothing stacks */
.site-header nav.site-nav,
.site-header #nav-static-left,
.site-header .nav-static-right { gap: 0 !important; }

/* Remove ANY adjacent margin inside the nav tree (anchors, divs, lis, etc.) */
.site-header nav.site-nav * + * { margin-left: 0 !important; }

/* 1) Rebuild spacing with ONE knob (direct children of the nav) */
.site-header nav.site-nav > * + * { margin-left: .28rem !important; }

/* 2) Left group: consistent spacing between its immediate children */
.site-header #nav-static-left > * + * { margin-left: .28rem !important; }

/* 3) Keep the nav pushed to the right next to the logo (but no extra jumps) */
.site-header #nav-static-left { margin-left: auto !important; }
.site-header .nav-static-right { margin-left: 0 !important; }

/* 4) Ensure the dropdown sibling combos don’t reintroduce margins */
.site-header .dropdown + .dropdown,
.site-header #nav-static-left + .dropdown,
.site-header .dropdown + .nav-static-right { margin-left: 0 !important; }

/* 5) Slightly trim top-level link padding so the items don’t feel bulky */
.site-header nav.site-nav a {
  padding: .1rem .1rem !important;
  line-height: 1.15;
}
/*.flex-row { gap: .2rem; }   */
/* ===== Header quote badge ===== */
.site-header .nav-quote {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.site-header .nav-quote .quote-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444; /* red */
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 0 0 2px var(--card-bg, #fff);
}
.dark .site-header .nav-quote .quote-badge {
  box-shadow: 0 0 0 2px var(--header-bg, #0f172a);
}
/* ===== Quote Request – bring new classes to life (final) ===== */

/* 1) Neutralize global .card flex just on this page */
#quote-summary .qr-card {
  display: block !important;
  align-items: initial !important;
  justify-content: initial !important;
  flex-wrap: initial !important;
  gap: 0 !important;
}

/* 2) Cancel global form grid for this one form */
#quote-summary .qr-form { 
  display: block !important;
}

/* 3) Two-column wrapper: Personal (L) | Job (R) */
#quote-summary .qr-cols {
  display: grid;
  grid-template-columns: 1fr;          /* mobile: 1 column */
  gap: 1.25rem 1.5rem;
  width: 100%;
}
@media (min-width: 900px) {
  #quote-summary .qr-cols { grid-template-columns: 1fr 1fr; }
}

/* 4) Inside each column, stack fields neatly */
#quote-summary .qr-col > .grid {
  display: grid !important;
  grid-template-columns: 1fr;
  row-gap: 1rem;
  column-gap: 1rem;
}

/* 5) Labels above inputs; controls full-width */
#quote-summary .qr-col .item-field > span {
  display: block;
  margin-bottom: .4rem;
  font-weight: 600;
  line-height: 1.25;
}
#quote-summary .qr-col .item-field input,
#quote-summary .qr-col .item-field select,
#quote-summary .qr-col .item-field textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.25rem;
  padding: .5rem .6rem;
}

/* 6) Details block spacing (full-width by default) */
#quote-summary details { margin-top: 1rem; }
#quote-summary details > .grid { margin-top: .5rem; }

/* 7) Actions aligned right */
#quote-summary .form-actions {
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
/* Make the quote page's <main> stack, not row */
#quote-summary.wrap.card.quote-layout {
  flex-direction: column !important;
  align-items: stretch !important;   /* don't center-shrink the child */
}

/* Ensure the inner card behaves like a normal block, not a flex row */
#quote-summary .qr-card {
  display: block !important;
  width: 100% !important;
  max-width: none !important;        /* ignore any global card max-width */
}

/* ===== Home layout (scoped) ===== */
#home .home-columns {
  display: grid;
  grid-template-columns: 4fr 1fr; /* ~80/20 */
  gap: 1rem;
}
@media (max-width: 1200px) {
  #home .home-columns { grid-template-columns: 7fr 3fr; } /* ~70/30 */
}
@media (max-width: 900px) {
  #home .home-columns { grid-template-columns: 1fr; }
  /* Optional: surface sidebar above main on mobile */
  /* #home .home-side { order: -1; } */
}

/* Hero actions row (reuses .button from your site if present) */
#home .hero-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .75rem; /* if your typography scale doesn’t already give spacing */
}

/* Link lists and bullet lists (compact, readable) */
#home .link-list,
#home .bullets {
  margin: 0;
  padding-left: 1.1rem; /* respect your base list indent */
}
#home .link-list li + li,
#home .bullets li + li {
  margin-top: .35rem;
}

/* Optional: light spacing for “more” links under lists */
#home .more-link { margin-top: .75rem; }

/* Optional: CTA links separator */
#home .cta-links { margin-top: .5rem; }
/* ===== Home layout (scoped to the front page) ===== */
#home .home-columns{
  display:grid;
  grid-template-columns:4fr 1fr;   /* ~80/20 split */
  column-gap:1rem;                 /* horizontal gap between columns */
  align-items:start;
}

/* On slightly narrower viewports, relax to ~70/30 */
@media (max-width:1200px){
  #home .home-columns{ grid-template-columns:7fr 3fr; }
}

/* Stack vertically on phones/tablets */
@media (max-width:900px){
  #home .home-columns{
    grid-template-columns:1fr;
    row-gap:1rem;                  /* vertical gap between the two columns when stacked */
  }
}

/* Vertical space between cards inside each column */
#home .home-main > .card + .card,
#home .home-side > .card + .card{
  margin-top:1rem;                 /* vertical rhythm between full cards */
  margin-bottom:1rem;
}

/* Optional: extra top space when sidebar follows main on mobile */
@media (max-width:900px){
  #home .home-side{ margin-top:0; } /* rely on row-gap + per-card spacing */
}

/* Optional: icon-only variant */
.btn.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
}
.btn.icon-only svg { margin-right: 0; }
.btn svg { width: 1.5em; height: 1.5em; vertical-align: -0.15em; }
.btn.icon-only { display:inline-flex; align-items:center; justify-content:center; width:2.25rem; height:2.25rem; padding:0; }
.btn.icon-only svg { margin-right: 0; }

/* Off-screen honeypot container */
.hp {
  position: absolute !important;
  left: -100vw; /* far off-screen; not display:none so naive bots still see it */
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Standard visually-hidden utility for the label */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(50%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* =========================
   Dark-only link colours
   ========================= */

/* Header/nav links inherit header colour (no iOS blue/purple) */
.site-header nav.site-nav a,
.site-header nav.site-nav a:visited,
.site-header nav.site-nav a:hover,
.site-header nav.site-nav a:active,
.site-header nav.site-nav a:focus {
  color: inherit;
  text-decoration: none;
}

/* Stop iOS auto-styling tel/mail links inside header */
.site-header nav.site-nav a[href^="tel:"],
.site-header nav.site-nav a[href^="mailto:"] {
  color: inherit;
  text-decoration: none;
}

/* Content links use single dark palette token; visited same */
.page-main a,
.page-main a:visited { color: var(--link-color); }
.page-main a:hover,
.page-main a:focus { text-decoration: underline; }

/* Reduce tap highlight just for the nav */
.site-header nav.site-nav { -webkit-tap-highlight-color: transparent; }

/* =========================
   Hamburger collapse (<=720px)
   Activates ONLY when .has-hamburger is on .site-header
   ========================= */

/* Desktop default: show menu, hide trigger */
.site-header .nav-trigger { display: none; }

@media (max-width: 720px) {
  .site-header.has-hamburger { position: relative; }

  /* Show the trigger on mobile when feature-flagged */
  .site-header.has-hamburger .nav-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .4rem .6rem;
    border: 1px solid var(--border-muted, rgba(255,255,255,.15));
    border-radius: .5rem;
    background: var(--header-bg, #0f172a);
    color: var(--header-fg, #e5e7eb);
    cursor: pointer;
  }
  .site-header.has-hamburger .nav-trigger:focus-visible {
    outline: 2px solid var(--focus-ring, #93c5fd);
    outline-offset: 2px;
  }
  .site-header.has-hamburger .nav-trigger svg { pointer-events: none; }

  /* Hide menu by default at mobile size */
  .site-header.has-hamburger nav.site-nav {
    display: none;
  }

  /* Open state: reveal menu as a panel under header */
  .site-header.has-hamburger.is-open nav.site-nav {
    display: flex;
    position: absolute;
    left: 0; right: 0; top: 100%;
    z-index: 40;
    flex-direction: column;
    gap: .25rem;
    padding: .5rem;
    background: var(--header-bg, #0f172a);
    border-top: 1px solid var(--border-muted, rgba(255,255,255,.12));
    box-shadow: 0 10px 30px rgb(0 0 0 / 30%);
  }

  /* Comfy tap targets in the dropdown */
  .site-header.has-hamburger nav.site-nav a {
    padding: .6rem .75rem;
    line-height: 1.25;
  }

  .site-header.has-hamburger.is-open nav.site-nav a:focus-visible {
    outline: 2px solid var(--focus-ring, #93c5fd);
    outline-offset: 2px;
    border-radius: .375rem;
  }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  .site-header.has-hamburger.is-open nav.site-nav { transition: none; }
}
/* ========== Mobile menu overlay (top-anchored, content-height) ========== */
@media (max-width: 1024px) {
  .site-header.has-hamburger.is-open nav.site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;                        /* anchor to the very top */
    z-index: 9999;

    /* Reserve space for header + safe-area, so links start just below header */
    padding-top: calc(var(--menu-top, 64px) + env(safe-area-inset-top, 0px));

    /* Usual padding + safe-area at the bottom */
    padding-left: .5rem;
    padding-right: .5rem;
    padding-bottom: calc(.5rem + env(safe-area-inset-bottom, 0px));

    /* Don’t *force* full height; allow content height, up to viewport */
    max-height: calc(100dvh - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;

    /* Layout: stack items from the top, no big empty area */
    display: grid;
    grid-auto-rows: min-content;
    row-gap: .25rem;
    align-content: start;          /* <- keep content at the top */
    justify-items: stretch;

    background: var(--header-bg, #0f172a);
    border-top: 1px solid var(--border-muted, rgba(255,255,255,.12));
    box-shadow: 0 10px 30px rgb(0 0 0 / 30%);
  }

  /* Comfy tap targets remain */
  .site-header.has-hamburger nav.site-nav a {
    padding: .6rem .75rem;
    line-height: 1.25;
  }
}
/* ========== Mobile menu: single-row pill bar (top-anchored) ========== */
@media (max-width: 1024px) {
  .site-header.has-hamburger.is-open nav.site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 0; /* anchor at very top */
    z-index: 9999;

    /* push content down by header height (+ safe area) so first item sits under header */
    padding-top: calc(var(--menu-top, 64px) + env(safe-area-inset-top, 0px));
    padding-left: .5rem;
    padding-right: .5rem;
    padding-bottom: calc(.5rem + env(safe-area-inset-bottom, 0px));

    background: var(--header-bg, #0f172a);
    border-top: 1px solid var(--border-muted, rgba(255,255,255,.12));
    box-shadow: 0 10px 30px rgb(0 0 0 / 30%);

    /* one-line horizontal layout */
    display: flex;
    flex-wrap: wrap;               /* keep on a single row */
    gap: .5rem;
    align-items: center;
    justify-content: flex-start;

    overflow-x: auto;                 /* scroll if it ever overflows */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Make top-level items compact “pills” */
  .site-header.has-hamburger nav.site-nav > .dropdown > a,
  .site-header.has-hamburger nav.site-nav > a,
  .site-header.has-hamburger nav.site-nav > .nav-static-right > a,
  .site-header.has-hamburger nav.site-nav > #nav-static-left > a {
    display: inline-flex;
    align-items: flex-end;
    padding: .5rem .75rem;            /* ~44px hit height */
    line-height: 1.25;
    border-radius: .5rem;
    border: 1px solid var(--border-muted, rgba(255,255,255,.12));
    background: transparent;
    white-space: nowrap;              /* keep each pill intact */
  }

  /* Don’t let icons shrink */
  .site-header.has-hamburger nav.site-nav > a.nav-quote,
  .site-header.has-hamburger nav.site-nav > a.search-toggle-icon {
    flex: 0 0 auto;
  }
}
/* ===== Mobile menu: column layout (one item per row) ===== */
@media (max-width: 1024px) {
  /* Top-anchored overlay under the header, content starts at the top */
  .site-header.has-hamburger.is-open nav.site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 9999;

    /* push content below header height (+ safe-area) */
    padding-top: calc(var(--menu-top, 64px) + env(safe-area-inset-top, 0px));
    padding-left: .5rem;
    padding-right: .5rem;
    padding-bottom: calc(.5rem + env(safe-area-inset-bottom, 0px));

    background: var(--header-bg, #0f172a);
    border-top: 1px solid var(--border-muted, rgba(255,255,255,.12));
    box-shadow: 0 10px 30px rgb(0 0 0 / 30%);

    display: flex;
    flex-direction: column;   /* <-- column, not row */
    align-items: stretch;     /* each child fills width */
    gap: .375rem;

    max-height: calc(100dvh - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Ensure each top-level child is block & full-width */
  .site-header.has-hamburger nav.site-nav > .dropdown,
  .site-header.has-hamburger nav.site-nav > #nav-static-left,
  .site-header.has-hamburger nav.site-nav > .nav-static-right,
  .site-header.has-hamburger nav.site-nav > a {
    display: block;
    width: 100%;
  }

  /* Make all visible links render as their own row */
  .site-header.has-hamburger nav.site-nav > .dropdown > a,
  .site-header.has-hamburger nav.site-nav > a,
  .site-header.has-hamburger nav.site-nav #nav-static-left a,
  .site-header.has-hamburger nav.site-nav .nav-static-right a {
    display: block;           /* not inline */
    width: 100%;
    padding: .6rem .75rem;    /* ~44px tap height */
    line-height: 1.25;
    border: 1px solid var(--border-muted, rgba(255,255,255,.12));
    border-radius: .5rem;
    background: transparent;
    white-space: normal;      /* allow wrap if needed */
  }

  /* Disable desktop hover dropdowns on mobile */
  .site-header.has-hamburger nav.site-nav .dropdown .dropdown-content {
    display: none !important;
  }
}
/* ====== FIX: Safari value + enforce column rows (mobile open) ====== */
@media (max-width: 1024px) {

  /* Use flex-start instead of 'start' for iOS/Safari compatibility */
  .site-header.has-hamburger.is-open nav.site-nav {
    align-items: flex-start;   /* was: start (parsing error) */
    align-content: flex-start; /* for any grid/flex cross-axis alignment */
  }

  /* Make every top-level item fill the row */
  .site-header.has-hamburger.is-open nav.site-nav > .dropdown,
  .site-header.has-hamburger.is-open nav.site-nav > #nav-static-left,
  .site-header.has-hamburger.is-open nav.site-nav > .nav-static-right,
  .site-header.has-hamburger.is-open nav.site-nav > a {
    display: block !important;
    width: 100% !important;
  }

  /* And ensure their links are block-level too (no side-by-side) */
  .site-header.has-hamburger.is-open nav.site-nav > .dropdown > a,
  .site-header.has-hamburger.is-open nav.site-nav > a,
  .site-header.has-hamburger.is-open nav.site-nav #nav-static-left > a,
  .site-header.has-hamburger.is-open nav.site-nav .nav-static-right > a {
    display: block !important;
    width: 100% !important;
    padding: .6rem .75rem;
    line-height: 1.25;
    border: 1px solid var(--border-muted, rgba(255,255,255,.12));
    border-radius: .5rem;
    background: transparent;
    white-space: normal; /* allow wrapping if label is long */
  }

  /* Disable hover drop-downs on mobile */
  .site-header.has-hamburger.is-open nav.site-nav .dropdown .dropdown-content {
    display: none !important;
  }
}
/* === Mobile menu: extend to bottom (no clipping), scroll within === */
@media (max-width: 1024px) {
  .site-header.has-hamburger.is-open nav.site-nav {
    /* Fill viewport height safely */
    position: fixed;
    top: 0;
    bottom: 0; /* <-- extend to bottom so long lists aren’t cut */
    z-index: 9999;

    /* Keep the content starting just under the header */
    padding-top: calc(var(--menu-top, 64px) + env(safe-area-inset-top, 0px));
    padding-left: .5rem;
    padding-right: .5rem;

    /* Make sure the last item clears iOS bars */
    padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));

    /* Let the menu scroll instead of clipping */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;

    /* Remove any earlier height caps that caused truncation */
    max-height: none;
    height: auto;
  }

  /* Safari/iOS dynamic viewport friendly fallbacks */
  .site-header.has-hamburger.is-open nav.site-nav {
    /* Prefer the small viewport unit when supported */
    max-height: calc(100svh - 0px); /* harmless when bottom:0 is in effect */
    contain: content;
    overscroll-behavior: contain;
  }
}
/* Glossary links */
.glossary-link {
  border-bottom: 1px dotted currentColor;
  text-decoration: none;
}
.glossary-link:hover,
.glossary-link:focus,
.glossary-link:focus-visible {
  outline: none;
  text-decoration: underline;
}

/* Definition list styling (glossary page) */
.page-section dl { margin: .75rem 0; }
.page-section dt { font-weight: 600; margin-top: .5rem; }
.page-section dd { margin: .25rem 0 .75rem 0; color: var(--muted, #9aa1ad); }

/* Keep glossary wrappers inline and out of layout */
.glossary,
.glossary-term,
.glossary-link,
.glossary-anchor,
.glossary-mark {
  display: inline !important;
  white-space: inherit;
  line-height: inherit;
  margin: 0;
  padding: 0;
}

/* Terms/links act as positioning anchors for their own tooltip */
.glossary-term,
.glossary-link {
  position: relative; /* anchor for absolutely-positioned .glossary-tip */
}

/* Tooltip (per-term) — hidden by default */
.glossary-tip {
  position: absolute;
  bottom: 100%;       /* sit above the term */
  left: 0;
  transform: translateY(-0.4rem);
  display: none;      /* hidden until term gets .is-open */
  z-index: 40;        /* above cards; below modals if those are >40 */

  max-width: 34ch;
  padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
  border-radius: var(--radius-2xl, 1rem);
  box-shadow: var(--shadow-md, 0 6px 20px rgba(0,0,0,.18));
  background: var(--card-bg, #111);
  color: var(--card-fg, #eee);
  line-height: 1.35;
  font-size: 0.9375rem;
}

/* Show tooltip when JS adds .is-open to the term/link */
.glossary-term.is-open .glossary-tip,
.glossary-link.is-open .glossary-tip {
  display: block;
}

/* Content tweaks */
.glossary-tip__title { font-weight: 600; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .glossary-tip { transition: none; }
}

/* Brief highlight ring for in-page term targets */
.glossary-focus {
  outline: 2px solid var(--accent, #4da3ff);
  outline-offset: 4px;
}

/* ensure tooltip sizes to content nicely */
.glossary-tip {
  white-space: normal;
  overflow-wrap: anywhere;   /* allow long words to wrap if needed */
}

/* render tip as an inline-block (prevents 1-char wrapping weirdness) */
.glossary-term.is-open .glossary-tip,
.glossary-link.is-open .glossary-tip {
  display: inline-block;     /* was: display:block */
}

/* keep title + short on one line unless it needs to wrap */
.glossary-tip__inner { display: inline; }
.glossary-tip__title,
.glossary-tip__short { display: inline; }
.glossary-tip__short { margin-left: .25rem; }

/* Anchor terms as inline-block so the abspos tooltip has a sane containing block */
.glossary-term,
.glossary-link {
  display: inline-block;          /* was inline */
  position: relative;
}

/* Tooltip sizing + placement */
.glossary-tip {
  bottom: calc(100% + 0.4rem);    /* little gap above the term */
  left: 0;

  /* Let content define width, but keep sensible guards */
  width: max-content;             /* size to content */
  min-width: 20ch;                /* don’t collapse to a sliver */
  max-width: min(90vw, 42ch);     /* don’t overflow viewport */

  white-space: normal;            /* wrap as needed */
  overflow-wrap: break-word;      /* wrap long words (not every char) */
  word-break: normal;
  hyphens: auto;
}

/* Render tip as inline-block when open to avoid full-width blocks */
.glossary-term.is-open .glossary-tip,
.glossary-link.is-open .glossary-tip {
  display: inline-block;          /* was block */
}

/* Inline content flow so title + short sit naturally */
.glossary-tip__inner { display: inline; }
.glossary-tip__title,
.glossary-tip__short { display: inline; }
.glossary-tip__short { margin-left: .25rem; }


/* logo container baseline */
.site-logo {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 32px;
}

/* static logo */
.logo-static {
  width: 100%;
  height: auto;
  display: block;
}

/* animated logo block (existing behaviour preserved) */
.brand-anim {
  position: absolute;
  inset: 0;
  display: block;
}

/* hide animation when motion is reduced or iOS Safari */
@media (prefers-reduced-motion: reduce) {
  .brand-anim { display: none; }
}

/* simple WebKit test → hide anim on iOS Safari */
@supports (-webkit-touch-callout: none) {
  .brand-anim { display: none; }
}

/* === Footer (scoped) ===================================================== */
.site-footer { /* your card already handles radius/border/padding */
  /* leave visual card styles to existing classes; only layout/alignment here */
}

/* Layout container */
.site-footer .footer-inner {
  width: 100%;
}

/* Columns: Brand/Address • Contact • Policies */
.site-footer .footer-sections {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;   /* address a touch wider */
  gap: 1.25rem;
  align-items: start;
}

/* Stack on narrower screens */
@media (max-width: 960px) {
  .site-footer .footer-sections {
    grid-template-columns: 1fr;
  }
}

/* Hard reset any inherited right-aligns in this region */
.site-footer .footer-col,
.site-footer .footer-col * {
  text-align: left;
}

/* Titles */
.site-footer .footer-title {
  margin: 0 0 .5rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.9;
}

/* Address block (prevent <address> default italics on some UA styles) */
.site-footer .footer-address {
  font-style: normal;
  line-height: 1.5;
}
.site-footer .footer-address > div { /* each line */
  margin: 0.1rem 0;
}

/* Contact lines */
.site-footer .contact-line {
  margin: 0.15rem 0;
}
.site-footer .contact-line a {
  text-decoration: none;
}
.site-footer .contact-line a:hover,
.site-footer .contact-line a:focus {
  text-decoration: underline;
}

/* Small notes (hours, ICO, build) */
.site-footer .muted,
.site-footer .legal-note,
.site-footer .contact-note {
  opacity: 0.8;
  font-size: 0.92em;
  margin: 0.4rem 0 0;
}

/* “All contact details” link */
.site-footer .contact-more {
  margin-top: 0.5rem;
}

/* Policies — supports BOTH <ul> and <div> versions */

/* If you use a UL list */
.site-footer .footer-links {
  margin: 0.25rem 0 0;
}
.site-footer ul.footer-links {
  padding-left: 1.15rem;           /* space for bullets */
  list-style: disc outside;        /* tidy left-aligned bullets */
}
.site-footer ul.footer-links li {
  display: list-item;              /* defeat any flex utilities */
  margin: 0.15rem 0;
}

/* If you use a DIV with inline links + pipes */
.site-footer div.footer-links {
  padding-left: 0;                 /* no indent when not a UL */
}
.site-footer div.footer-links a {
  text-decoration: none;
  padding: 0 .4rem;
}
.site-footer div.footer-links a:first-child { padding-left: 0; }
.site-footer div.footer-links a:hover,
.site-footer div.footer-links a:focus {
  text-decoration: underline;
}

/* Bottom bar */
.site-footer .footer-bottom {
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  margin-top: 1rem;
  padding-top: 0.75rem;
}
.site-footer .footer-bottom small { opacity: 0.9; }

/* Optional: link color inherits theme; ensure focus ring is visible */
.site-footer a:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
/* 1) Visible focus everywhere (keyboard-friendly, WCAG 2.4.7) */
:where(a, button, input, select, textarea, [role="button"], [tabindex])
:where(:not(:disabled)):focus-visible {
  outline: 2px solid #7dd3fc;       /* sky-300-ish over dark */
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(125,211,252,0.15);
}

/* 2) Respect prefers-reduced-motion globally */
@media (prefers-reduced-motion: reduce) {
  html:where(:not(.allow-motion)) {
    scroll-behavior: auto !important; /* disable smooth scroll */
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 3) Anchor targets don’t hide under fixed header */
:root {
  --header-offset: 80px; /* adjust to your header height */
}
[id] {
  scroll-margin-top: var(--header-offset);
}

/* 4) Mirror hover styles on keyboard focus for cards/links */
.card a:focus-visible {
  outline: 2px solid #60a5fa; /* blue-400 */
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  top: -1000px; left: 0;
  background: #111; color: #fff;
  padding: .5rem .75rem; border-radius: .5rem;
  z-index: 1000;
}
.skip-link:focus {
  top: .5rem; left: .5rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
/* Safari support for user-select:none (WebKit) */
:where(
  .spotlight-watermark,
  .wrap.item-layout .item-form .item-billing-list .pill,
  .wrap.item-layout .item-panel-right .item-billing-list .pill,
  .sort-dropdown summary,
  #tuts .sort-dropdown summary,
  .page-main .cat-filter-panel label,
  .page-main .cat-filter-panel > label
){
  -webkit-user-select: none; /* Safari / iOS Safari */
  -webkit-touch-callout: none; /* iOS: suppress long-press callout */
  user-select: none;         /* Standard */
}
/* Reuse existing .btn — add only if not already covered */
.btn {
  min-height: 44px;        /* meets tap target */
  line-height: 1.2;
  padding: .6rem .9rem;    /* adjust to match your scale */
}
.btn:focus-visible {
  outline: 2px solid var(--focus, #8ab4f8);
  outline-offset: 2px;
}
/* Base button look applies to both anchors and buttons */
a.btn, button.btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .6rem .9rem;
  border-radius: var(--radius, .6rem);
  text-decoration: none;         /* critical for anchors */
}

/* Primary variant (if using .btn-primary) */
a.btn.btn-primary,
button.btn.btn-primary {
  /* your existing primary styles */
}
/* Ensure anchors get the button look */
a.btn, button.btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .6rem .9rem;
  border-radius: var(--radius, .6rem);
  text-decoration: none;      /* critical for anchors */
}

/* Primary button variant */
a.btn.btn-primary,
button.btn.btn-primary,
/* Primary (shared for <a> and <button>) */
.btn.btn-primary {
  /* colors */
  --btn-primary-bg: #2b2f36;   /* dark grey */
  --btn-primary-bg-hover: #3a3f47;
  --btn-primary-bg-active: #22262c;

  background: var(--btn-primary-bg);
  color: #fff;
  border: 1px solid #fff;

  /* feel */
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 60ms ease;
  text-decoration: none; /* anchors */
}

/* Hover / focus */
.btn.btn-primary:hover {
  background: var(--btn-primary-bg-hover);
  color: #fff;
  border-color: #fff;
}

.btn.btn-primary:focus-visible {
  outline: 2px solid var(--focus, #8ab4f8);
  outline-offset: 2px;
}

/* Active press */
.btn.btn-primary:active {
  background: var(--btn-primary-bg-active);
  transform: translateY(0.5px);
}

/* Disabled (if used) */
.btn.btn-primary[disabled],
.btn.btn-primary:disabled,
.btn.btn-primary[aria-disabled="true"] {
  opacity: .6;
  cursor: not-allowed;
  filter: none;
}

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

/* Two-column layout for the contact page cards */
.card-row.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* info | form */
}

/* collapse to one column on narrower screens */
@media (max-width: 960px) {
  .card-row.contact-row {
    grid-template-columns: 1fr;
  }
}

/* Form grid: labels in col 1, inputs in col 2 */
.contact-form {
  display: grid;
  grid-template-columns: minmax(40px, 1fr) 2fr; /* tweak 120px to taste */
  column-gap: 1rem;
  row-gap: .85rem;
  align-items: start;
}

/* place each piece */
.contact-form label { grid-column: 1; }
.contact-form input,
.contact-form textarea { 
  grid-column: 2;
  width: 100%;    /* ensure full width in the input column */
}

/* help text should span across both columns */
#message-help { grid-column: 1 / -1; margin-top: .25rem; }

/* honeypot: keep it out of visual flow */
.contact-form .hp { display: none; }

/* submit button aligns with inputs (col 2) */
.contact-form button { 
  grid-column: 2; 
  justify-self: start;   /* aligns left with inputs */
}

/* legal note spans across both columns */
.contact-form .form-note { grid-column: 1 / -1; }

/* responsive: stack label above input on narrow screens */
@media (max-width: 960px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
  .contact-form label,
  .contact-form input,
  .contact-form textarea,
  #message-help,
  .contact-form button,
  .contact-form .form-note {
    grid-column: 1;
  }
}
/* Contact page card layout: 1:2 split */
.card-row.contact-row {
  display: grid;
  grid-template-columns: 1fr 2fr;  /* left = 1/3, right = 2/3 */
  gap: 1.2rem;
}

/* Collapse to single column on narrower screens */
@media (max-width: 960px) {
  .card-row.contact-row {
    grid-template-columns: 1fr;
  }
}
/* Tighten left padding on the right card so labels sit closer to the page edge */
.card.contact-form-card {
  padding-left: 1.0rem;         /* was likely larger; bring it in */
  padding-right: 1.2rem;        /* keep breathing room on the right */
}

/* Form: two-column grid — narrow label col, spacious input col */
.contact-form {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;  /* adjust 120–220 to taste */
  column-gap: 1rem;                                 /* smaller gap brings labels closer */
  row-gap: .85rem;
  align-items: start;
  margin: 0;                                        /* avoid extra left indent */
}

/* Place things explicitly */
.contact-form label { grid-column: 1; }

/* Inputs/Textareas align in the input column */
.contact-form input,
.contact-form textarea {
  grid-column: 2;
  width: 100%;
}

/* Helper/paragraph content aligns with inputs (NOT spanning both) */
#message-help,
.contact-form .form-note {
  grid-column: 2;                /* align with inputs as requested */
  margin-top: .25rem;
}

/* Send button lines up under inputs (input column) */
.contact-form button {
  grid-column: 2;
  justify-self: start;
}

/* Hide honeypot visually */
.contact-form .hp { display: none; }

/* Responsive: stack everything at narrow widths */
@media (max-width: 960px) {
  .card.contact-form-card { padding-left: 1.2rem; }  /* restore balance on mobile */

  .contact-form {
    grid-template-columns: 1fr;
  }
  .contact-form label,
  .contact-form input,
  .contact-form textarea,
  #message-help,
  .contact-form button,
  .contact-form .form-note {
    grid-column: 1;
  }
}
/* === Contact: message card internal grid (20 / 80) === */
.contact-form {
  display: grid;
  grid-template-columns: 20% 80%;
  column-gap: 1rem;         /* visual gutter between label/input columns */
  row-gap: .85rem;
  padding-left: .6rem;      /* small inset so labels aren't hard against the card edge */
  align-items: start;
}

/* Labels in column 1, left-aligned */
.contact-form label {
  grid-column: 1;
  text-align: left;
  justify-self: start;
}

/* Inputs, textarea, help text, button, and note all align in column 2 */
.contact-form input,
.contact-form textarea,
#message-help,
.contact-form button,
.contact-form .form-note {
  grid-column: 2;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
}

/* Honeypot stays out of flow */
.contact-form .hp { display: none; }

/* Responsive: stack on narrower screens */
@media (max-width: 960px) {
  .contact-form {
    grid-template-columns: 1fr;
    padding-left: 0;        /* remove the inset on mobile */
  }
  .contact-form label,
  .contact-form input,
  .contact-form textarea,
  #message-help,
  .contact-form button,
  .contact-form .form-note {
    grid-column: 1;
  }
}
/* === Contact form: 20/80 grid with proper inner gutters === */

/* Ensure the right-hand card has breathing room on the inside */
.card.contact-form-card {
  /* keep your existing padding, but guarantee a right gutter */
  padding-right: 1.2rem;   /* adjust to match your card rhythm */
}

/* Internal grid: labels 20%, inputs 80% */
.contact-form {
  display: grid;
  grid-template-columns: 20% 80%;
  column-gap: 1rem;        /* gutter between label and input columns */
  row-gap: .85rem;
  padding-left: 1rem;     /* keep labels off the hard edge */
  padding-right: 1.5rem;    /* extra insurance so inputs never touch the card edge */
  padding-top: 1rem;
  align-items: start;
  box-sizing: border-box;  /* padding doesn’t shrink the columns */
}

/* Labels in column 1, left-aligned (not jammed) */
.contact-form label {
  grid-column: 1;
  text-align: left;
  justify-self: start;
}

/* Inputs, textarea, help, button, note → column 2 (aligned) */
.contact-form input,
.contact-form textarea,
#message-help,
.contact-form button,
.contact-form .form-note {
  grid-column: 2;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
}

/* Honeypot stays out of flow */
.contact-form .hp { display: none; }

/* Responsive collapse */
@media (max-width: 960px) {
  .contact-form {
    grid-template-columns: 1fr;
    padding-left: 0;
    padding-right: 0;
  }
  .contact-form label,
  .contact-form input,
  .contact-form textarea,
  #message-help,
  .contact-form button,
  .contact-form .form-note {
    grid-column: 1;
  }
}

/* === /public/css/search.css === */
/* ==== Search modal—final overrides (load last) ==== */

/* 1) Define defaults for light mode */
:root {
  --search-overlay: rgba(0,0,0,.60);
  --search-bg: #ffffff;
  --search-fg: #0b1220;              /* near-black text in light mode */
  --search-border: #cbd5e1;          /* slate-300 */
  --search-input-bg: #ffffff;
  --search-input-border: #cbd5e1;
}

/* 2) Dark mode overrides (keep your selectors if different) */
html.dark, [data-theme="dark"] {
  --search-overlay: rgba(0,0,0,.70);
  --search-bg: #111827;              /* gray-900 */
  --search-fg: #e5e7eb;              /* gray-200 */
  --search-border: #374151;           /* gray-700 */
  --search-input-bg: #0f172a;         /* slate-900 */
  --search-input-border: #334155;     /* slate-700 */
}

/* 3) Overlay */
#searchModal {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--search-overlay);
  z-index: 9999;
}
@supports (scrollbar-gutter: stable) {
  #searchModal.is-open { scrollbar-gutter: stable both-edges; }
  #searchModal #searchResults.search-results { scrollbar-gutter: stable; }
}

/* optional tiny fallback to reduce layout jiggle when scrollbars appear */
#searchModal #searchResults.search-results {
  padding-right: 0.25rem; /* adjust if needed; safe in all browsers */
}

/* 4) Dialog box — FIXED HEIGHT + FLEX COLUMN */
#searchModal > .search-box,
#searchModal > *:first-child {
  position: relative;
  box-sizing: border-box;
  background: var(--search-bg);
  color: var(--search-fg);
  border: 1px solid var(--search-border);
  border-radius: 8px;

  /* dialog box */
  width: min(550px, 92vw) !important;
  height: min(300px, 80vh) !important;
  margin: 0;                                      /* centered by flex; no external margin */
  padding: 2em;

  display: flex;
  flex-direction: column;
  gap: 0;                                         /* keep compact */
}

/* 5) Top controls don’t grow */
#searchModal #searchInput,
#searchModal .search-filter {
  flex: 0 0 auto;
}

/* 6) Input colors from vars */
#searchModal #searchInput {
  width: 100%;
  padding: 0.5em;
  font-size: 1.2em;
  margin-bottom: 1em;
  background: var(--search-input-bg);
  color: var(--search-fg);
  border: 1px solid var(--search-input-border);
}

/* 7) Filters row */
#searchModal .search-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  margin-bottom: 1rem;
}

/* 8) Results fill remaining space and SCROLL
   The critical piece is min-height: 0 to allow flex shrinking. */
#searchModal #searchResults.search-results {
  flex: 1 1 auto;
  min-height: 0;                /* ← prevents child from forcing container taller */
  overflow: auto;
  overscroll-behavior: contain;
}

/* 9) Result rows */
#searchModal #searchResults .result {
  padding: 0.5em 0;
  border-bottom: 1px solid var(--search-border);
}
#searchModal #searchResults .result a {
  text-decoration: none;
  color: inherit;
}

/* 10) Empty/loading states keep visual stability */
#searchModal #searchResults .search-empty,
#searchModal #searchResults .search-loading {
  min-height: 8rem;
  display: grid;
  place-items: center;
}

/* 11) Close button positioning (if present) */
#searchModal .search-close {
  position: absolute;
  top: .5rem; right: .5rem;
  width: 2rem; height: 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer;
  color: var(--search-fg);
}
#searchModal .hint { opacity: 0.75; font-size: 0.9em; }
/* Centring and visible state */
#searchModal.is-open {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* === /public/css/legal.css === */
/* LEGAL PAGE STYLING */
.legal {
  line-height: 1.6;
  font-size: .9rem;
  color: var(--text, #222);
  overflow-wrap: anywhere;
}

.legal h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.legal h2,
.legal h3 {
  margin-top: 1.5rem;
  font-weight: lighter;
}

.legal p,
.legal li {
  margin: 0.75rem 0;
  word-break: break-word;
  line-height: 1.5;
}

.legal ul,
.legal ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.legal a {
  color: var(--link, #07c);
  text-decoration: underline;
}

/* DARK MODE OVERRIDES */
@media (prefers-color-scheme: dark) {
  .legal {
    color: #ddd;
  }

  .legal a {
    color: #4ea7ff;
  }
}
/* Ensure policy content wraps inside cards */
.legal,
.legal * {
  white-space: normal;         /* defeat any global nowrap */
  overflow-wrap: anywhere;     /* wrap long words/urls */
  word-break: normal;          /* prefer natural breaks */
}

/* Code & pre need different behavior: keep formatting but don’t blow layout */
.legal pre,
.legal code {
  white-space: pre-wrap;       /* allow wrap inside long code lines */
  overflow-x: auto;            /* horizontal scroll if really needed */
}

/* Images/tables shouldn’t overflow the card */
.legal img,
.legal table {
  max-width: 100%;
  height: auto;
}

.legal table {
  display: block;              /* enables horizontal scroll if wide */
  overflow-x: auto;
}
.legal ul { list-style: disc outside;  margin-left: 1.25rem; padding-left: 0.25rem; }
.legal ol { list-style: decimal outside; margin-left: 1.25rem; padding-left: 0.25rem; }
.legal li { margin: 0.25rem 0; }
.legal table th,
.legal table td {
  border: 1px solid var(--border-color, #333);
  padding: 0.6em 0.8em;
  vertical-align: top;
}

.legal table thead th {
  background: var(--card-accent, #181818);
  font-weight: 600;
  text-align: left;
}

.legal table tbody tr:nth-child(even) td {
  background: var(--table-row-alt, #121212);
}
/* Keep borders + collapse for a crisp grid */
.legal table {
  border-collapse: collapse;
}

/* Stop awkward wraps in Type (col 2) and Expiry (col 4) */
.legal table th:nth-child(2),
.legal table td:nth-child(2),
.legal table th:nth-child(4),
.legal table td:nth-child(4) {
  white-space: nowrap;   /* keep on one line */
  word-break: keep-all;  /* don’t split words */
  hyphens: manual;       /* ignore auto hyphenation */
  min-width: 10ch;       /* gentle width so text isn’t crushed */
}

/* Allow comfy wrapping in Purpose (col 3) and Notes (col 5) */
.legal table th:nth-child(3),
.legal table td:nth-child(3),
.legal table th:nth-child(5),
.legal table td:nth-child(5) {
  overflow-wrap: anywhere;  /* long strings won’t blow layout */
}

/* Tiny screens: if needed, allow wrap on col 2/4 to avoid overflow */
@media (max-width: 380px) {
  .legal table th:nth-child(2),
  .legal table td:nth-child(2),
  .legal table th:nth-child(4),
  .legal table td:nth-child(4) {
    white-space: normal;
  }
}
.legal table { display:block; overflow-x:auto; }

/* === /public/css/spotlight.css === */

/* =========================================================
   SPOTLIGHT — Tuning Variables (easy knobs)
   Adjust these in one place to tweak layout quickly.
   ========================================================= */
:root {
  /* Overall max width (useful for right-column embeds) */
  --spotlight-max-width: 336px; /* e.g., 360px–760px */

  /* Right-hand column width hint (used by demo sidebar) */
  --spotlight-sidebar-width: clamp(300px, 28vw, 380px);

  /* Background icon size (if used in the card decoration) */
  --spotlight-bg-icon-size: 88px; /* e.g., 64px, 96px, 128px */

  /* Internal spacing (stack gap between blocks inside the card) */
  --spotlight-stack-gap: 0.75rem;

  /* Extra spacing under the tagline/subtitle */
  --spotlight-tagline-gap: 0.5rem;
}

/* Scope variables to the component too, so local overrides are possible */
.spotlight {
  --spotlight-max-width: var(--spotlight-max-width);
  --spotlight-sidebar-width: var(--spotlight-sidebar-width);
  --spotlight-bg-icon-size: var(--spotlight-bg-icon-size);
  --spotlight-stack-gap: var(--spotlight-stack-gap);
  --spotlight-tagline-gap: var(--spotlight-tagline-gap);
}

/* Apply variables to common elements (non-destructive if selectors exist) */
.spotlight,
.spotlight-card{
  max-width: var(--spotlight-max-width);
}

.spotlight-sidebar-sim{
  width: var(--spotlight-sidebar-width);
  margin-left: auto;
}

.spotlight .spotlight-tagline,
.spotlight-card .spotlight-tagline{
  margin-bottom: var(--spotlight-tagline-gap);
}

.spotlight .spotlight-stack > * + *,
.spotlight-card .spotlight-stack > * + *{
  margin-top: var(--spotlight-stack-gap);
}

/* Optional background icon sizing if you use ::after decoration */
.spotlight-card::after{
  background-size: var(--spotlight-bg-icon-size) var(--spotlight-bg-icon-size);
}


/* spotlight.css — all classes prefixed with spotlight- */
/* :root {
  --spotlight-bg: var(--card-bg, rgba(255,255,255,0.9));
  --spotlight-fg: var(--text, #0f1222);
  --spotlight-muted: rgba(0,0,0,0.55);
  --spotlight-pill-bg: rgba(0,0,0,0.06);
  --spotlight-pill-fg: var(--spotlight-fg);
  --spotlight-border: rgba(0,0,0,0.08);
  --spotlight-shadow: 0 6px 24px rgba(0,0,0,0.06);
 */
  /* Accent tokens */
/*   --spotlight-accent: hsl(188 86% 45%);
  --spotlight-accent-weak: hsl(188 86% 45% / 0.28);
  --spotlight-accent-ring: hsl(188 86% 45% / 0.75);
} */
@media (prefers-color-scheme: dark) {
  :root {
    --spotlight-bg: var(--card-bg, rgba(22,24,33,0.85));
    --spotlight-fg: var(--text, #e9e9ee);
    --spotlight-muted: rgba(255,255,255,0.65);
    --spotlight-pill-bg: rgba(255,255,255,0.08);
    --spotlight-pill-fg: var(--spotlight-fg);
    --spotlight-border: rgba(255,255,255,0.08);
    --spotlight-shadow: 0 6px 24px rgba(0,0,0,0.35);

    --spotlight-accent: hsl(188 86% 60%);
    --spotlight-accent-weak: hsl(188 86% 60% / 0.35);
    --spotlight-accent-ring: hsl(188 86% 60% / 0.85);
  }
}

.spotlight-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--spotlight-bg);
  color: var(--spotlight-fg);
  border: 1.5px solid red;
  border-radius: 5px; 
  box-shadow: var(--spotlight-shadow), 0 -1px 0 hsl(0 0% 100% / 0.06) inset; 
  overflow: hidden;
}
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
/*   background: var(--spotlight-accent-weak); */
  pointer-events: none;
}

/* Header with bright border */
.spotlight-header{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 2px solid var(--spotlight-accent);
  border-radius: 12px;
}
.spotlight-header-main{ display: inline-flex; align-items: center; gap: 0.6rem; }
.spotlight-header-icon{ width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.spotlight-header-title{ font-size: 1.05rem; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Dots */
.spotlight-dots{ display: inline-flex; gap: 6px; }
.spotlight-dot{
  width: 8px; height: 8px; border-radius: 999px;
  border: 1px solid var(--spotlight-border);
  background: transparent; cursor: pointer; padding: 0; line-height: 0;
}
.spotlight-dot.is-active{ background: var(--spotlight-accent); /*border-color: var(--spotlight-accent);*/ }
.spotlight-dot:focus-visible{ outline: none; box-shadow: 0 0 0 2px var(--spotlight-accent-ring); }

.spotlight-body { position: relative; min-height: 200px; }

.spotlight-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 260ms ease;
  display: grid;
  grid-template-rows: auto auto 1fr;
  z-index: 0;
}
.spotlight-slide.is-active { opacity: 1; z-index: 1; }

/* Watermark centered and larger */
.spotlight-watermark{
  position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 80%; max-width: none;
  -webkit-user-select: none;
  opacity: 0.12; pointer-events: none; user-select: none;
  filter: blur(0.3px); mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) { .spotlight-watermark { opacity: 0.16; mix-blend-mode: normal; } }

/* Slide text rhythm */
.spotlight-h3 { font-size: 1.125rem; line-height: 1.25; margin: 0; }
.spotlight-tagline{ margin: 0.5rem 0 0.4rem; font-weight: 500; letter-spacing: 0.01em; color: var(--spotlight-fg); opacity: 0.95; }
.spotlight-desc{ margin: 0 0 0.9rem; color: var(--spotlight-muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Footer CTAs and pills centered */
.spotlight-footer{ display: grid; grid-template-rows: auto auto; gap: 0.5rem; margin-top: 0.25rem; }
.spotlight-footer-ctas{ display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.spotlight-footer-pills{ display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }

/* Hide in-body CTAs (mirrored into footer via JS) */
.spotlight-ctas{ display: none; }

/* CTA button */
.spotlight-btn{
  display: inline-block; padding: 0.4rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--spotlight-accent-weak);
  text-decoration: none; color: var(--spotlight-accent); background: transparent;
  transition: transform 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.spotlight-btn:hover, .spotlight-btn:focus-visible{
  transform: translateY(-1px); border-color: var(--spotlight-accent); box-shadow: 0 0 0 2px var(--spotlight-accent-ring); outline: none;
}

/* Secondary link */
.spotlight-link{ font-size: 0.92rem; color: var(--spotlight-muted); text-decoration: none; }
.spotlight-link:hover, .spotlight-link:focus-visible{ color: var(--spotlight-accent); text-decoration: underline; }

/* Pills */
.spotlight-pill{ display: inline-block; padding: 0.25rem 0.55rem; border-radius: 999px; background: var(--spotlight-pill-bg); color: var(--spotlight-pill-fg); text-decoration: none; font-size: 0.9rem; }


/* --- In-body pills (moved from footer) --- */
.spotlight-pills{
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin: 0.25rem 0 1rem;
}

/* More space between subtitle (tagline) and content (desc/pills/ctas) */
.spotlight-tagline{ margin: 0.65rem 0 0.55rem; }
.spotlight-desc{ margin: 0 0 1.1rem; }

/* Footer now holds CTAs only */
.spotlight-footer{ grid-template-rows: auto; }
.spotlight-footer-pills{ display: none !important; }
/* 2-column layout: make columns equal height */
.wrap.item-layout {
  display: flex;
  align-items: stretch;       /* both columns match tallest column */
  gap: var(--gap, 1.25rem);
}

/* Left column should stretch */
.item-panel-left {
  flex: 1 1 0;
  min-height: 0;              /* avoid accidental overflow */
}

/* Right column is a vertical stack of cards */
.item-panel-right {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;              /* critical so flex children can shrink */
}

/* Cards in right column are content-height by default */
.item-panel-right .item-card {
  flex: 0 0 auto;
}

/* Spotlight flexes to fill the remaining vertical space */
.item-panel-right .spotlight-card {
  flex: 1 1 auto;
  min-height: 0;              /* allows shrink when content is short */
  display: flex;              /* keeps any internal layout stable */
  flex-direction: column;
}

.spotlight {
  --spotlight-accent: hsl(30 80% 50%);
  --spotlight-accent-ring: hsl(30 80% 50% / 0.85);
}

.spotlight-slide-hd {
	display: none;
	
}

/* Spotlight cycling card */
.card.spotlight-card {
  position: relative;
  overflow: hidden;
  background: var(--site-bg, var(--bg));
  border: 2px solid var(--accent, #f97316);
  border-radius: var(--card-radius, 8px);
  box-shadow: var(--card-shadow, 0 2px 6px rgba(0,0,0,0.15));
  padding: 1.5em;
  min-height: 8rem;
}

/* Slides stacked */
.spotlight-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  padding: 1.5em;
}

.spotlight-slide.is-active {
  opacity: 1;
  position: relative;
}

.spotlight-header {
  display: flex;
  align-items: center;
  gap: .5em;
}

.spotlight-icon {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

.spotlight-title {
  color: var(--accent, #f97316);
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0;
}

.spotlight-description {
  margin-top: .75em;
  color: var(--fg, #e5e7eb);
  line-height: 1.5;
}
.spotlight-card {
  background: var(--site-bg, var(--bg));
  border-top: 2px solid var(--accent, #f97316); /* subtle accent divider */
  padding: 1.5em;
}
.spotlight-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius, 8px);
}

/* make entire card clickable */
.spotlight-card a.spotlight-slide {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

/* remove legacy inner card padding if double */
.spotlight-slide {
  padding: 1.5em;
  border: none;
  background: transparent;
}

/* optional: visual hover cue */
.spotlight-card a.spotlight-slide:hover {
  background: color-mix(in srgb, var(--accent, #f97316) 8%, transparent);
  cursor: pointer;
}

/* === /public/css/items.css === */
/* =====================================================================
   items.css — CLEAN CONSOLIDATED from your live file (2025‑08‑22)
   Purpose:
   • Remove leftover L‑layout (no grid-template-areas; no grid-area mapping)
   • Single desktop row with equal-height columns via align-items: stretch
   • Right column stacks: Details (fixed) + Options/Form (flex‑fill)
   • Option A surrounds: Options + Billing fill the card width
   • Keep your existing visual system (cards, borders, dark mode)
   ===================================================================== */
/* == V2025-08-27 12:38:24 ==*/
/* === Icon alignment ===================================================== */
.item-icon { height: 48px; vertical-align: top; margin-right: 0.4em; margin-top: 0.1rem; }
@media (prefers-color-scheme: dark) {
  .item-icon { filter: invert(63%) sepia(99%) saturate(448%) hue-rotate(180deg) brightness(97%) contrast(92%); }
}

/* === Cards (keep your palette/borders) ================================= */
.card {
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 1.5rem;
  border-radius: 0.25rem;
  box-shadow: 0 .25px 4px rgba(0,0,0,0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.dark .card {
  /* background-color: #1e1e1e; */
  color: #eee;
   /*border: 1px solid rgba(255, 255, 255, 0.1); */
}

/* === Layout wrapper ===================================================== */
/* Mobile: stack */
.wrap.item-layout { display: grid; gap: 1.5rem; max-width: 1024px; padding: 0; }
@media (max-width: 959.98px) { .wrap.item-layout { grid-template-columns: 1fr; align-items: start; } }
/* Desktop: two columns, equal height */
@media (min-width: 960px) {
  .wrap.item-layout { grid-template-columns: 2fr 1fr; align-items: stretch; }
}

/* === Panels ============================================================= */
.item-panel-left, .item-panel-right { min-width: 0; }
@media (min-width: 960px) { .item-panel-left, .item-panel-right { align-self: stretch; } }

/* Right column holds two stacked cards: Details (top) + Options/Form (bottom) */
.item-panel-right { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0; }
.item-panel-right > .card:first-child { flex: 0 0 auto; }
.item-panel-right > .card:last-child  { flex: 1 1 auto; display: flex; flex-direction: column; }
/* Form fills the bottom card; CTA row pins to the bottom */
.item-panel-right > .card:last-child .item-form { display: flex; flex-direction: column; flex: 1 1 auto; justify-content: flex-start; }
.item-panel-right > .card:last-child .item-actions { margin-top: auto; }

/* === Header & info bits (from your file) =============================== */
.item-header { display: flex; align-items: flex-start; gap: 0.75rem; justify-content: space-between; margin: 0; }
.item-header-left { display:flex; align-items:center; gap:0.5rem; }
.item-title { font-size: 1.6em; margin: 0; justify-content: start; line-height: 1.2; }
.item-info-box { text-align: right; font-size: 0.92em; line-height:1.2; }
.item-priceguide { margin-bottom: 0.15rem; }

/* === Description / details ============================================ */
.item-description { line-height: 1.6; font-size: 1em; color: var(--text-color, #222); }
.item-expanded-description { margin-top: 0rem; font-size: 0.95rem; line-height: 1.6; color: var(--text-secondary, #444); white-space: pre-wrap; }
.dark .item-expanded-description { color: #ccc; }
.item-details{ display:grid; grid-template-columns:max-content 1fr; gap:6px 16px; }
.item-detail{ display:contents; }
.item-detail dt{ /* inherits global weight */ }
.item-detail dd{ margin:0; }
.item-details-content { margin-top: 0.4rem; font-size: 0.95rem; color: var(--muted, #555); }

/* === Options / form ===================================================== */
.item-form { display: flex; flex-direction: column; gap: 1.5rem; margin: 0; padding: 0; color: var(--text-color, #222); }
.dark .item-form { color: var(--text-color, #eee); }
.item-config-heading { /* inherits global weight; keep other props */ }
.item-price-preview { font-size: 1rem; line-height: 1.4; color: var(--text-color, #222); }
.dark .item-price-preview { color: var(--text-color, #eee); }

.item-config-wrap { background: var(--card-bg, #fff); border: 1px solid var(--card-border, #ccc); border-radius: 0.75rem; padding: 1.25rem; margin-bottom: 1.25rem; display:block; max-width:100%; }
.dark .item-config-wrap { background: #1e293b; border-color: #334155; }
#item-config-area { display: flex; flex-direction: column; gap: 1.25rem; }
.item-panel-right .item-config-wrap #item-price-preview { margin-top: 1rem; padding-top: 0.5rem; border-top: 1px solid var(--card-border, #ccc); }
.dark .item-panel-right .item-config-wrap #item-price-preview { border-top-color: #334155; }

/* Per-row grid inside options */
.item-panel-right .item-config-wrap .item-config-block {
  display: grid;
  grid-template-columns: minmax(12ch, max-content) minmax(0, 1.15fr) minmax(0, 1.15fr);
  row-gap: 0.75rem; column-gap: 1.25rem; align-items: start; margin-bottom: 0; max-width: 100%;
}
.item-panel-right .item-config-wrap .item-config-block > label { grid-column: 1; text-align: left; align-self: start; white-space: normal; overflow-wrap: anywhere; padding-top: 0.2rem; }
.item-panel-right .item-config-wrap .item-config-block > input,
.item-panel-right .item-config-wrap .item-config-block > select,
.item-panel-right .item-config-wrap .item-config-block > textarea { grid-column: 2 / 4; grid-row: 1; width: 100%; min-width: 0; height: 2.25rem; box-sizing: border-box; padding: 0.4rem 0.6rem; }
.item-panel-right .item-config-wrap .item-config-block > .item-config-note { grid-column: 2 / 4; grid-row: 2; font-size: 0.85rem; line-height: 1.2; opacity: 0.75; margin-top: 0.25rem; }

/* Neutralize any global caps inside this card */
.item-panel-right .item-config-wrap input,
.item-panel-right .item-config-wrap select,
.item-panel-right .item-config-wrap textarea { max-width: none; }

/* Mobile collapse for options rows */
@media (max-width: 720px) {
  .item-panel-right .item-config-wrap .item-config-block { grid-template-columns: 1fr; column-gap: 0; }
  .item-panel-right .item-config-wrap .item-config-block > label,
  .item-panel-right .item-config-wrap .item-config-block > input,
  .item-panel-right .item-config-wrap .item-config-block > select,
  .item-panel-right .item-config-wrap .item-config-block > textarea,
  .item-panel-right .item-config-wrap .item-config-block > .item-config-note { grid-column: 1; grid-row: auto; }
}

/* === Buttons ============================================================ */
.item-submit { width: 100%; padding: 0.6em; font-size: 1em; background-color: var(--button-bg, #004085); color: var(--button-text, #fff); border: none; border-radius: 0.3em; cursor: pointer; margin-top: auto; align-self: center; max-width: 240px; }
.item-submit:hover { background-color: var(--button-bg-hover, #002752); }

/* === Billing section ==================================================== */
.item-billing { border: 1px solid rgba(0,0,0,.12); border-radius: 10px; padding: 0.75rem 0.85rem; margin-top: 0.75rem; }
.dark .item-billing { border-color: rgba(255,255,255,.18); }

/* Pills (also reusable for tags, if desired) */
.item-billing-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.item-billing-list .pill { display: inline-flex; align-items: center; justify-content: center; padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.9rem; line-height: 1; white-space: nowrap; border: 1px solid var(--pill-border, rgba(0,0,0,0.06)); background: var(--pill-bg, rgba(0,0,0,0.04)); color: var(--pill-fg, inherit); }
.item-billing-list .pill:focus { outline: 2px solid var(--focus, #6ea8fe); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { .item-billing-list .pill { border-color: var(--pill-border-dark, rgba(255,255,255,0.06)); background: var(--pill-bg-dark, rgba(255,255,255,0.04)); color: var(--pill-fg-dark, inherit); } }

/* === Surrounds fill width inside the right card (Option A) ============= */
.item-panel-right .item-config-wrap,
.item-panel-right .item-billing { display: block; width: 100%; margin-inline: 0; box-sizing: border-box; }

/* === Safe cleanup guards =============================================== */
/* Kill any legacy equal-height blockers or L‑layout leftovers in older sheets */
.item-layout { align-items: initial; }              /* neutral; desktop sets stretch on wrapper */
.item-panel-left, .item-panel-right { height: auto; }
/* IMPORTANT: no grid-template-areas or grid-area mapping anywhere in this file */

.item-panel-left .item-header { margin-bottom: 0.75rem; }
.item-panel-left .item-section:first-of-type { margin-top: 0.75rem; }
.item-panel-left .item-section:first-of-type h3 { margin-top: 0.5rem; }
.item-expanded-description { margin-top: 0.75rem; }

/* Item page cards: match contact cards look, but scoped */

.wrap.item-layout .card {
  background: #1e293b;   /* same as contact cards */
  color: #eee;
  border-color: #60a5fa; /* same as contact cards */
  box-shadow: none;
}

/* === Item page: dark text palette + link colors ========================= */
.wrap.item-layout {
  /* Page-scoped tokens so text is always readable on dark surfaces */
  --text-color: #e5e7eb;      /* main text */
  --text-muted: #cbd5e1;      /* secondary text */
  --link: #93c5fd;
  --link-hover: #bfdbfe;
}

/* Apply text colors consistently inside the item page */
.wrap.item-layout,
.wrap.item-layout .item-section,
.wrap.item-layout .item-config-wrap,
.wrap.item-layout .item-form {
  color: var(--text-color);
}

.wrap.item-layout h1,
.wrap.item-layout h2,
.wrap.item-layout h3,
.wrap.item-layout label {
  color: var(--text-color);
}

.wrap.item-layout .muted,
.wrap.item-layout .item-expanded-description {
  color: var(--text-muted);
}

.wrap.item-layout a { color: var(--link); text-decoration: none; }
.wrap.item-layout a:hover,
.wrap.item-layout a:focus { color: var(--link-hover); text-decoration: underline; }

/* === Form controls on dark ============================================== */
.wrap.item-layout input,
.wrap.item-layout select,
.wrap.item-layout textarea {
  background: #0f172a;         /* deep slate */
  color: var(--text-color);
  border: 1px solid #334155;
}

.wrap.item-layout ::placeholder {
  color: #94a3b8;              /* slate-400 */
  opacity: 1;
}

/* If you show helper notes under inputs */
.wrap.item-layout .item-config-note { color: var(--text-muted); }

/* Item page scope */
/* Item page scope (typography inherits globally) */
:where(.wrap.item-layout){
  /* removed: font-family, font-weight, font-synthesis-weight, smoothing */
  /* keep everything else in this block (colors, spacing, layout) */
}

/* Make headings actually look like headings on item pages */
/* Headings follow global typography */
.wrap.item-layout h1,
.wrap.item-layout h2,
.wrap.item-layout h3{
  /* removed: font-weight, letter-spacing (now set globally) */
}

/* 3-row structure without markup changes */
.item-panel-left{
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

/* Shared neutrals that adapt to light/dark */
.wrap.item-layout{ --il-border: rgba(0,0,0,.14); --il-muted: rgba(0,0,0,.65); }
@media (prefers-color-scheme: dark){
  .wrap.item-layout{ --il-border: rgba(255,255,255,.16); --il-muted: rgba(255,255,255,.72); }
}

/* First child becomes the header row */
.item-panel-left > :first-child{
  padding-bottom: .75rem;
  margin-bottom: .25rem;
  border-bottom: 1px solid var(--il-border);
}

/* Last child becomes the footer row (related/tags/meta) */
.item-panel-left > :last-child{
  padding-top: .75rem;
  margin-top: .25rem;
  border-top: 1px solid var(--il-border);
  color: var(--il-muted);
  font-size: .9375rem;
}

/* keep the icon tidy next to the H1 (you already use this selector) */
.wrap.item-layout .item-icon{ height: 1.4em; vertical-align: middle; margin-right: .4em; }
/* 3-row structure without markup changes */
.item-panel-left{
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

/* Shared neutrals that adapt to light/dark */
.wrap.item-layout{ --il-border: rgba(0,0,0,.14); --il-muted: rgba(0,0,0,.65); }
@media (prefers-color-scheme: dark){
  .wrap.item-layout{ --il-border: rgba(255,255,255,.16); --il-muted: rgba(255,255,255,.72); }
}

/* First child becomes the header row */
.item-panel-left > :first-child{
  padding-bottom: .75rem;
  margin-bottom: .25rem;
  border-bottom: 1px solid var(--il-border);
}

/* Last child becomes the footer row (related/tags/meta) */
.item-panel-left > :last-child{
  padding-top: .75rem;
  margin-top: .25rem;
  border-top: 1px solid var(--il-border);
  color: var(--il-muted);
  font-size: .9375rem;
}

/* keep the icon tidy next to the H1 (you already use this selector) */
.wrap.item-layout .item-icon{ height: 1.4em; vertical-align: middle; margin-right: .4em; }
/* === Related items (icons + links) === */
.item-related{
  list-style: none;
  margin: .25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .8rem;        /* row / column gap */
}

.item-related a{
  display: inline-flex;    /* icon + text align neatly */
  align-items: center;
  gap: .45em;
  text-decoration: none;   /* keep your link styling */
}

/* Small icon variant used in Related items */
.item-icon-sm{
  width: 1.5em;            /* square box – tweak to taste (1.0–1.2em) */
  height: 1.5em;
  object-fit: contain;     /* keeps wide logos contained */
  vertical-align: middle;
  flex: 0 0 auto;
  /* Optional: if you use an icon color filter elsewhere, uncomment: */
  /* filter: var(--icon-filter); */
}
/* === Related items tidy === */
.item-related{
  list-style: none;
  margin: .25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .8rem;
}
.item-related a{
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .2rem .35rem;          /* bigger hit target */
  border-radius: .4rem;
}
.item-related a:focus-visible{
  outline: 2px solid var(--focus, #6aa8ff);
  outline-offset: 2px;
}
.item-icon-sm{
  width: 1.3em;
  height: 1.3em;
  object-fit: contain;
  vertical-align: middle;
  flex: 0 0 auto;
  transition: transform .12s ease;
}
.item-related a:hover .item-icon-sm{ transform: translateY(-1px); }

/* === Tags list spacing align (uses your existing .pill) === */
.item-billing-list{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .5rem;
  padding: 0;
  margin: .75rem 0 0;
  list-style: none;
}
.item-billing-list .pill{ margin: 0; }
/* === Item page: tighten group labels in bottom-right card === */
.wrap.item-layout .item-panel-right .item-form h3{
  margin: .25rem 0 .35rem;       /* kill big default gaps */
  font-size: 1rem;
  line-height: 1.25;
}

/* When a heading is immediately followed by its section, keep it tight */
.wrap.item-layout .item-panel-right .item-form h3 + .item-section{
  margin-top: 0;                  /* no extra gap above the section */
}

/* Normal rhythm between sections (section → next heading) */
.wrap.item-layout .item-panel-right .item-form .item-section + h3{
  margin-top: .8rem;              /* controlled space before the next label */
}

/* Lists inside these sections shouldn’t add their own margins */
.wrap.item-layout .item-panel-right .item-form .item-billing-list{
  margin: 0;
}

/* If you see weird “mystery” space, prevent margin-collapsing at the card edge */
.wrap.item-layout .item-panel-right .item-form{
  display: flow-root;             /* or: overflow: auto; */
}

/* Billing period pills — selected vs others */
.wrap.item-layout .item-form .item-billing-list{
  display:flex; gap:.4rem; list-style:none; padding:0; margin:.5rem 0;
}

.wrap.item-layout .item-form .item-billing-list .pill{
  border:1px solid var(--border, #c8c8c8);
  border-radius:.45rem;
  padding:.25rem .6rem;
  -webkit-user-select: none;
  cursor:pointer; user-select:none;
  transition:opacity .12s ease, filter .12s ease, border-color .12s ease, background .12s ease;
}

/* grey anything that isn't selected */
.wrap.item-layout .item-form .item-billing-list .pill:not(.is-selected):not([aria-selected="true"]){
  opacity:.6; filter: grayscale(40%);
}

/* make the selected pill stand out */
.wrap.item-layout .item-form .item-billing-list .pill.is-selected,
.wrap.item-layout .item-form .item-billing-list .pill[aria-selected="true"]{
  opacity:1; filter:none;
  font-weight:600;
  border-color: var(--accent, #5078ff);
  background: var(--accent-bg, rgba(80,120,255,.10));
}

/* small hover/focus hint for unselected */
.wrap.item-layout .item-form .item-billing-list .pill:not(.is-selected):not([aria-selected="true"]):hover,
.wrap.item-layout .item-form .item-billing-list .pill:not(.is-selected):not([aria-selected="true"]):focus-visible{
  opacity:.85; filter: grayscale(20%);
  outline:2px solid var(--focus, #6aa8ff); outline-offset:2px;
}

/* v2025-08-26 Item inputs: tidy grid + right-aligned controls */
.wrap.item-layout .item-config-wrap .item-option {
  display: grid;
  grid-template-columns: minmax(160px, 32%) 1fr; /* label | control */
  gap: .4rem 1rem; 
  align-items: center;
  margin-bottom: .75rem;
}

.wrap.item-layout .item-config-wrap .item-option label { margin: 0; }

/* Right-align controls inside their column without breaking width */
.wrap.item-layout .item-config-wrap .item-option input:not([type="checkbox"]),
.wrap.item-layout .item-config-wrap .item-option select {
  justify-self: end;      /* push to right edge of column */
  text-align: right;      /* numbers/text appear neat on the right */
  width: min(100%, 320px);
}

@media (max-width: 700px) {
  .wrap.item-layout .item-config-wrap .item-option {
    grid-template-columns: 1fr; /* stack label above control on narrow */
  }
  .wrap.item-layout .item-config-wrap .item-option input:not([type="checkbox"]),
  .wrap.item-layout .item-config-wrap .item-option select {
    justify-self: stretch;
    text-align: left;
  }
}
/* v2025-08-27 Item inputs — tidy grid + right-aligned controls */
.wrap.item-layout .item-config-wrap .item-option{
  display:grid;
  grid-template-columns:minmax(160px,32%) 1fr; /* label | control */
  gap:.4rem 1rem;
  align-items:center;
  margin-bottom:.75rem;
}
.wrap.item-layout .item-config-wrap .item-option label{ margin:0; }

.wrap.item-layout .item-config-wrap .item-option input:not([type="checkbox"]),
.wrap.item-layout .item-config-wrap .item-option select{
  justify-self:end;         /* right edge of control column */
  text-align:right;         /* numbers/text align right */
  width:min(100%,320px);    /* sensible max width */
}

@media (max-width:700px){
  .wrap.item-layout .item-config-wrap .item-option{ grid-template-columns:1fr; }
  .wrap.item-layout .item-config-wrap .item-option input:not([type="checkbox"]),
  .wrap.item-layout .item-config-wrap .item-option select{
    justify-self:stretch; text-align:left;
  }
}

/* == V2025-08-27 12:58:00 – Card head spacing + top alignment (additive) == */

/* 1) Make sure card content starts at the top (in case any flex sneaks in) */
.item-panel-right > .card:first-child {
  display: block;              /* kills any stray flex-centering */
  align-items: initial;
  justify-content: initial;
}

/* 2) Pull card heads closer to the top edge (cuts the big gap) */
.item-panel-right > .card:first-child,
.item-panel-right > .card:last-child {
  padding-top: 0.75rem;        /* was 1.5rem via .card; keep sides/bottom as-is */
}

/* 3) Normalize the first heading inside each card */
.wrap.item-layout .item-card > .item-section > h2.item-subtitle,
.wrap.item-layout .item-card > form > h3:first-of-type {
  margin-top: 0;               /* no extra space above the title */
  margin-bottom: 0.75rem;      /* modest gap after */
  /* optional visual bar:
  border-bottom: 1px solid var(--il-border);
  padding-bottom: .5rem;
  */
}
/* == V2025-08-27 13:12:00 – Dark mode border tweak (optional) == */
@media (prefers-color-scheme: dark) {
  .wrap.item-layout .item-card > .item-section > h2.item-subtitle,
  .wrap.item-layout .item-card > form > h3:first-of-type {
    border-bottom-color: rgba(255,255,255,.18); /* a touch brighter than default */
  }
}
/* If you also toggle a class, keep both without adding new selectors */
.dark .wrap.item-layout .item-card > .item-section > h2.item-subtitle,
.dark .wrap.item-layout .item-card > form > h3:first-of-type,
[data-theme="dark"] .wrap.item-layout .item-card > .item-section > h2.item-subtitle,
[data-theme="dark"] .wrap.item-layout .item-card > form > h3:first-of-type {
  border-bottom-color: rgba(255,255,255,.18);
}
/* == V2025-08-27 13:40 – Item inputs: final layout & sizing (additive) == */

/* 2-col grid: label | control */
.wrap.item-layout .item-config-wrap .item-option{
  display:grid;
  grid-template-columns:minmax(160px,32%) 1fr;
  gap:.45rem 1rem;           /* row / col */
  align-items:center;
  margin:.6rem 0;
}

.wrap.item-layout .item-config-wrap .item-option label{
  margin:0;
  line-height:1.35;
}

/* Base: don’t overflow the control column */
.wrap.item-layout .item-config-wrap .item-option input,
.wrap.item-layout .item-config-wrap .item-option select{
  max-width:100%;
}

/* Numbers: compact width, right aligned */
.wrap.item-layout .item-config-wrap .item-option input[type="number"]{
  justify-self:end;
  text-align:right;
  width:clamp(6ch,30%,140px);
}

/* Selects: comfy width, left aligned text */
.wrap.item-layout .item-config-wrap .item-option select{
  justify-self:end;
  width:clamp(12ch,40%,360px);
  text-align:left;
}

/* Ranges: wider track */
.wrap.item-layout .item-config-wrap .item-option input[type="range"]{
  justify-self:end;
  width:min(100%,360px);
}

/* Dates/times: natural width, right aligned numerics */
.wrap.item-layout .item-config-wrap .item-option input[type="date"],
.wrap.item-layout .item-config-wrap .item-option input[type="datetime-local"],
.wrap.item-layout .item-config-wrap .item-option input[type="time"],
.wrap.item-layout .item-config-wrap .item-option input[type="month"],
.wrap.item-layout .item-config-wrap .item-option input[type="week"]{
  justify-self:end;
  width:auto;
  min-width:16ch;
  text-align:right;
}

/* Text fields (if any) fill neatly */
.wrap.item-layout .item-config-wrap .item-option input[type="text"]{
  justify-self:end;
  width:min(100%,420px);
  text-align:left;
}

/* Radio groups rendered by JS */
.wrap.item-layout .item-config-wrap .item-option .radio-group{
  justify-self:end;
  display:grid;
  gap:.25rem .75rem;
}

/* Mobile: stack label above control */
@media (max-width:700px){
  .wrap.item-layout .item-config-wrap .item-option{ grid-template-columns:1fr; }
  .wrap.item-layout .item-config-wrap .item-option input,
  .wrap.item-layout .item-config-wrap .item-option select,
  .wrap.item-layout .item-config-wrap .item-option .radio-group{
    justify-self:stretch;
    text-align:left;
    width:100%;
  }
}

/* == V2025-08-27 14:05 – Price preview total alignment (additive) == */
.wrap.item-layout #item-price-preview .item-total{
  display:flex;
  align-items:baseline;
  gap:.5rem;
}
.wrap.item-layout #item-price-preview .item-total strong{
  margin-left:auto; /* pushes the amount to the right edge */
  font-variant-numeric: tabular-nums; /* steadier alignment */
}

/* == V2025-08-27 15:55 – Align labels left (visual outdent), keep inputs put == */

/* Pull the label text left by the card/form inner padding */

/* Don’t let labels hang off the edge on narrow screens */

/* current (too far left) */

/* change to: leave ~0.5rem inner gap */

/* v2025-08-27 Label vertical alignment (baseline) */
.item-panel-right .item-config-wrap .item-config-block{
  align-items: baseline;       /* label text baseline aligns with input text */
}

.item-panel-right .item-config-wrap .item-config-block > label{
  padding-top: 0;              /* remove earlier 0.2rem lift if present */
  line-height: 1.2;            /* crisper baseline */
}
/* == V2025-08-27 16:48 – Label left + vertical nudge without transforms (additive) == */
.item-panel-right .item-config-wrap .item-config-block > label{
  transform: none;          /* neutralize any earlier translateX/translateY */
  margin-left: -0.2rem;    /* horizontal outdent; tweak to taste */
  margin-top: 2px;         /* vertical nudge up; try -1px…-4px as you like */
  padding-top: 0;           /* remove any lift from previous rules */
  line-height: 1.2;
}

@media (max-width: 700px){
  .item-panel-right .item-config-wrap .item-config-block > label{
    margin-left: 0;
    margin-top: 0;
  }
}
/* v2025-08-27 17:55: removed duplicate -0.75rem label block */
@media (max-width: 700px){
  .item-panel-right .item-config-wrap .item-config-block > label{
    margin-left: 0;
    margin-top: 0;
  }
}
/* v2025-08-28: label nudge without transforms */
.item-panel-right .item-config-wrap .item-config-block > label{
  transform: none;
  margin-left: -0.2rem;
  margin-top: 2px;
}
@media (max-width:700px){
  .item-panel-right .item-config-wrap .item-config-block > label{
    margin-left: 0;
    margin-top: 0;
  }
}

/* v2025-08-28 Options gap fix (scoped to item page) */
.wrap.item-layout .item-panel-right .item-card h2 {
  margin-block-end: 1.75rem;
}

.wrap.item-layout .item-panel-right .item-card h2 + .item-form {
  margin-block-start: 0;
  padding-top: 0;
}

.wrap.item-layout .item-panel-right .item-card .item-form > *:first-child {
  margin-top: 0;
}

.wrap.item-layout .item-panel-right .item-card .item-config-wrap {
  margin-top: 0;
  padding-top: 0;
}
/* v2025-08-28 Form alignment (transform-free, scoped to item page) */
.wrap.item-layout .item-panel-right .item-card .item-form .item-config-block{
  display: grid;
  grid-template-columns: minmax(10ch, 160px) 1fr; /* label | field */
  align-items: center;
  column-gap: .75rem;
}

.wrap.item-layout .item-panel-right .item-card .item-form .item-config-block > label{
  text-align: right; line-height: 1.2;
}

.wrap.item-layout .item-panel-right .item-card .item-form .item-config-block > :not(label){
  min-width: 0; width: 100%; box-sizing: border-box;
}

/* Stack on small screens */
@media (max-width:700px){
  .wrap.item-layout .item-panel-right .item-card .item-form .item-config-block{
    grid-template-columns: 1fr;
  }
  .wrap.item-layout .item-panel-right .item-card .item-form .item-config-block > label{
    text-align: inherit; margin-bottom: .25rem;
  }
}
/* Canonical override: labels use margins, not transforms */
.wrap.item-layout .item-panel-right .item-config-wrap .item-config-block > label{
  transform: none !important;
  margin-left: -0.2rem;
  margin-top: 2px;
}
@media (max-width:700px){
  .wrap.item-layout .item-panel-right .item-config-wrap .item-config-block > label{
    margin-left: 0; margin-top: 0;
  }
}
/* v2025-08-28 Options top cushion (fix flush-to-border) */
.wrap.item-layout .item-panel-right .item-card .item-form{
  padding-top: 0.5rem;     /* small buffer above the inputs */
  display: flow-root;     /* prevents first-child margin from collapsing */
}

/* if you want the cushion on the inner wrapper instead (either-or) */
.wrap.item-layout .item-panel-right .item-card .item-form .item-config-wrap{
  padding-top: 1.5rem;
}
/* v2025-08-29 Label vertical nudge (options panel) */
.wrap.item-layout .item-panel-right .item-card .item-form .item-config-block{
  align-items: baseline; /* aligns label text to input text */
}

.wrap.item-layout .item-panel-right .item-card .item-form .item-config-block > label{
  margin-top: 8px;       /* tweak: try 2–4px to taste */
  /* if you previously added any label padding/margins, this overrides cleanly */
}

@media (max-width:700px){
  /* when stacked, don’t push the label down */
  .wrap.item-layout .item-panel-right .item-card .item-form .item-config-block > label{
    margin-top: 0;
  }
}
/* v2025-08-29: show debug panel on staging */
html[data-debug="1"] .price-debug-panel { display: block; }

/* v2025-08-29 Billing Options card */
.wrap.item-layout .item-panel-right .item-billing-card { margin-top: 1rem; }

/* Pills */
.wrap.item-layout .item-panel-right .item-billing-list {
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.wrap.item-layout .item-panel-right .item-billing-list .pill {
  padding: .45rem .75rem;
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 999px;
  line-height: 1;
  -webkit-user-select: none;
  cursor: pointer; user-select: none;
}
.wrap.item-layout .item-panel-right .item-billing-list .pill.is-selected {
  outline: 2px solid var(--accent, #5bb);
}
.wrap.item-layout .item-panel-right .item-billing-card.is-hidden { display: none; }
/* v2025-08-30 — Right panel card spacing unify (details ⇄ config ⇄ billing) */
.wrap.item-layout .item-panel-right .item-card{
  margin-top: 0;
  margin-bottom: 0;           /* kill one-off card margins so we have a single source of truth */
}

.wrap.item-layout .item-panel-right .item-card + .item-card{
  margin-top: .5rem;        /* match Details → Config gap; tweak to your taste (e.g. 1.5rem) */
}

/* If some pages use plain `.card` instead of `.item-card`, keep spacing consistent too */
.wrap.item-layout .item-panel-right > .card{
  margin-top: 0;
  margin-bottom: 0;
}
.wrap.item-layout .item-panel-right > .card + .card{
  margin-top: 0.3rem;
}
/* Item page: tighten only the space between the two columns */
@media (min-width: 960px) {
  .wrap.item-layout {
    column-gap: 1rem;   /* was 1.5rem */
    row-gap: 1.5rem;    /* keep your current vertical spacing */
  }
}
.button svg { width: 1.1em; height: 1.1em; vertical-align: -0.15em; margin-right: .4rem; }
/* Item page CTA row — align buttons to the right */
.item-card .item-actions {
  display: flex;
  justify-content: flex-end; /* right-align the whole group */
  gap: 0.6rem;               /* even spacing between buttons */
  flex-wrap: wrap;           /* wrap on small screens */
  margin-top: 0.75rem;       /* gentle breathing room */
}

/* Make buttons align icon + text nicely */
.item-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;               /* space between icon and text */
}

/* Consistent SVG size in buttons */
.item-actions .button svg {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.15em;
}
@media (max-width: 560px) {
  .item-card .item-actions { justify-content: center; }
}
.item-header { display:flex; align-items:center; gap:.75rem; }
.item-title { flex:1; } /* lets actions sit on the right */
.item-quick-actions { margin-left:auto; display:flex; gap:.4rem; }

.btn.icon-only {
  display:inline-flex; align-items:center; justify-content:center;
  width:2.25rem; height:2.25rem; padding:0;
}
.btn.icon-only svg { width:1.1em; height:1.1em; }
/* === Spotlight in item cards (container-aware) === */
/* Let the card define sizing; Spotlight fills the card and never overflows */
.item-page .card .spotlight,
.item-page .card .spotlight-card{
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

/* Ensure decorative backgrounds never spill outside the card */
.item-page .card{
  overflow: hidden;
}

/* Optional: card-level presets via CSS variables (set once per card) */
.item-page .card.spotlight-host{
  --spotlight-max-width: 100%;
  --spotlight-bg-icon-size: 88px;      /* tweak per placement */
  --spotlight-tagline-gap: 0.5rem;     /* space under tagline */
  --spotlight-stack-gap: 0.75rem;      /* vertical rhythm */
}

/* Optional quick variants you can toggle on the CARD (not the component) */
.item-page .card.spotlight-host.is-compact{
  --spotlight-bg-icon-size: 72px;
  --spotlight-tagline-gap: 0.4rem;
  --spotlight-stack-gap: 0.6rem;
}
.item-page .card.spotlight-host.is-roomy{
  --spotlight-bg-icon-size: 104px;
  --spotlight-tagline-gap: 0.65rem;
  --spotlight-stack-gap: 0.9rem;
}

/* Defensive: never show POA/no-options spiel on non-POA items */
/* Hide spiel text on non-POA pages (you already added .not-poa on the wrapper) */
.wrap.item-layout.not-poa .item-config-wrap .item-muted { display: none; }

/* For true POA pages, keep container visually collapsed since JS won’t fill it */
.wrap.item-layout.is-poa #item-config-area,
.wrap.item-layout.is-poa #item-price-preview { display: none; }


/* === /public/css/catalogue.css === */
/* catalogue.css — v2025-09-06 15:58:40
   - Scoped to catalogue components only (no global overrides)
   - Dark-only palette via site tokens (with safe fallbacks)
   - Equal-height cards, footer pinned to bottom
   - Title/icon alignment, description clamp, accessible buttons
*/

/* ========== Grid ========== */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

/* ========== Filter panel (tokenized, dark) ========== */
.cat-filter-panel {
  background-color: var(--card-bg, #1e293b);
  color: var(--text-1, #e5e7eb);
  border: 1px solid var(--border-3, #334155);
  border-radius: var(--radius-2, 12px);
  padding: .75rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ========== Card base (tokenized, dark, equal-height) ========== */
.cat-card {
  background-color: var(--card-bg, #1e293b);   /* dark-slate fallback */
  color: var(--text-1, #e5e7eb);               /* light text fallback */
  border: 1px solid var(--border-3, #334155);  /* subtle slate border */
  border-radius: var(--card-radius);

  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Remove stray top gaps and pin footer to bottom */
.cat-card > :first-child { margin-top: 0; }
.cat-card > :last-child {
  margin-top: auto;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ========== Icon sizing (prevent jumbo SVGs) ========== */
.cat-icon img,
.cat-card .item-icon {
  width: 48px;
  height: 48px;
  display: block;
}

/* ========== Title + icon alignment ========== */
.cat-card .card-title,
.cat-card .cat-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .5rem 0;
}

/* If title uses inline icon variant, keep spacing tidy */
.cat-card .card-title .item-icon,
.cat-card .cat-title .item-icon { margin-right: .4em; }

/* ========== Clamps (avoid tall outliers) ========== */
.cat-card .card-title,
.cat-card .cat-title,
.cat-card h3,
.cat-card h4 {
	
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
}

.cat-card .description,
.cat-card .desc,
.cat-card p.description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 3;
}

/* ========== Buttons (size + accessibility) ========== */
.cat-card .btn {
  min-height: 2.25rem;
  line-height: 1.1;
}

/* Ensure links inherit the card’s foreground color */
.cat-card a { color: inherit; }

/* ========== No-results block (tokenized, dark) ========== */
.cat-no-results {
  background-color: var(--card-bg, #1e293b);
  color: var(--text-1, #e5e7eb);
  border: 1px dashed var(--border-3, #334155);
  border-radius: var(--radius-2, 12px);
  padding: 1rem;
  text-align: center;
}

/* ========== Responsive tweaks ========== */
@media (max-width: 640px) {
  .cat-card > :last-child {
    flex-direction: column;
    align-items: stretch;
  }
}
/* v2025-09-02 catalogue overrides: colors, grid, footer pin */

.page-main .cat-card {
  /* Beat .cat-card { background:white } and any earlier shadows */
  background-color: var(--card-bg, #1e293b);
  color: var(--text-1, #e5e7eb);
  border: 1px solid var(--border-3, #334155);
 /*  border-radius: var(--radius-2, 12px); */
  box-shadow: none;

  /* Column layout so the footer can pin */
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Ensure the first child inside the card doesn't create extra top gap */
.page-main .cat-card > :first-child { margin-top: 0; }

/* Footer/actions: prefer a dedicated footer class, with fallbacks */
.page-main .cat-card .cat-actions,
.page-main .cat-card footer.cat-actions,
.page-main .cat-card .actions {
  margin-top: auto;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Button sizing (consistent hit targets) */
.page-main .cat-card .btn {
  min-height: 2.25rem;
  line-height: 1.1;
}

/* Title/description clamps to avoid “tall” outliers */
.page-main .cat-card .cat-info h2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
  margin: 0 0 .5rem 0;
}
.page-main .cat-card .cat-info p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 3;
  margin: .25rem 0 .5rem;
}

/* Keep icons sane (you already had this, duplicating here for locality) */
.page-main .cat-card .cat-icon img,
.page-main .cat-card .item-icon {
  width: 48px;
  height: 48px;
  display: block;
}

/* Grid: max 3 columns, collapses elegantly */
.page-main .cat-card-list {
  display: grid;
  grid-template-columns: 1fr;      /* 1-up by default */
  gap: 1rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .page-main .cat-card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .page-main .cat-card-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Panel + empty state: tokenized to match cards */
.page-main .cat-filter-panel,
.page-main .cat-no-results {
  background-color: var(--card-bg, #1e293b);
  color: var(--text-1, #e5e7eb);
  border: 1px solid var(--border-3, #334155);
  border-radius: var(--card-radius);
}

/* (Optional) if a box-shadow sneaks back in via older rules, kill it here too */
.page-main .cat-filter-panel,
.page-main .cat-no-results { box-shadow: none; }
/* v2025-09-02 catalogue layout + dark card override (scoped & minimal) */

/* 1) Two-column layout with sticky filter (desktop); single column on mobile */
.page-main .cat-wrapper {
  display: grid;
  grid-template-columns: 1fr;        /* mobile: filter above, then grid */
  gap: 1rem 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .page-main .cat-wrapper {
    grid-template-columns: 260px 1fr;  /* left = filter, right = cards */
  }
  .page-main .cat-filter-panel {
    grid-column: 1;
    position: sticky;
/*     top: 1rem;     */                      /* adjust if your header needs more */
    align-self: start;
    max-height: calc(100dvh - 2rem);
    overflow: auto;
  }
  .page-main .cat-card-list { grid-column: 2; }
}


/* v2025-09-02 catalogue item layout — flex column header/content/footer
   - Scope: catalogue page only
   - Shrink type, shrink icon, kill top gaps
   - Header divider, footer divider
   - Pin footer by growing .cat-info and pushing .cat-actions down
*/

/* Local type scale (does not touch header/nav) */
.catalogue-page { font-size: 0.95rem; }

/* Stronger border (you can drop to 1px later) */
.catalogue-page .cat-card { border-width: 1px; }

/* Smaller, tidy icon in the header area */
.catalogue-page .cat-card .cat-icon img { width: 32px; height: 32px; }

/* Make the middle block grow; footer can then pin */
.catalogue-page .cat-card .cat-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/* Title: smaller, no top gap, clamp to 2 lines */
.catalogue-page .cat-card .cat-info > h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 600;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Thin divider under the title to mark "header" */
.catalogue-page .cat-card .cat-info > h2::after {
  content: "";
  display: block;
  margin-top: .5rem;
  border-top: 1px solid var(--card-border);
  opacity: .7;
}

/* Description: clamp to 3 lines; consistent rhythm */
.catalogue-page .cat-card .cat-info > p {
  margin: .5rem 0 .5rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Tags spacing (if present) */
.catalogue-page .cat-card .cat-tags { margin-top: .25rem; gap: .3rem; }

/* Footer: divider + pinned at bottom */
.catalogue-page .cat-card .cat-actions {
  margin-top: .75rem;          /* spacing from content */
  padding-top: .5rem;
  border-top: 1px solid var(--card-border);
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;

  /* Pin footer by taking remaining space in .cat-info */
  margin-top: auto;
}

/* Ensure the very first child never adds extra space at the top */
.catalogue-page .cat-card > :first-child { margin-top: 0; }

/* Buttons: consistent hit area */
.catalogue-page .cat-card .btn { min-height: 2.25rem; line-height: 1.1; }

/* v2025-09-03 — Catalogue header/content/footer fit + font scale + icon normalize */
.catalogue-page {
  --cat-icon-size: 28px;        /* was 48px earlier; keep smaller here for cards */
  --cat-gap: .5rem;
  --header-left-pad: calc(var(--cat-icon-size) + var(--cat-gap));
}

.page-main.catalogue-page .cat-card {
  position: relative;           /* anchor absolute icon */
}

/* Place icon over the top-left; content shifts via padding */
.page-main.catalogue-page .cat-card .cat-icon {
  position: absolute;
  inset-block-start: .75rem;
  inset-inline-start: .75rem;
}
.page-main.catalogue-page .cat-card .cat-icon img {
  width: var(--cat-icon-size);
  height: var(--cat-icon-size);
  object-fit: contain;          /* tame weird viewBoxes */
  display: block;
}

/* Content column: grow, and create left space for the icon */
.page-main.catalogue-page .cat-card .cat-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding-inline-start: var(--header-left-pad);

  min-height: 9.5rem;}

/* Title: icon + title appear as one line (title clamps to 2) */
.page-main.catalogue-page .cat-card .cat-info > h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Full-width header rule (extends under the icon via negative margin) */
.page-main.catalogue-page .cat-card .cat-info > h2::after {
  content: "";
  display: block;
  margin-top: .5rem;
  border-top: 1px solid var(--card-border);
  opacity: .7;

  /* extend the rule to the card edges while keeping text aligned */
  margin-inline-start: calc(-1 * var(--header-left-pad));
  padding-inline-start: var(--header-left-pad);
}

/* Content size drop (was too big) */
.page-main.catalogue-page .cat-card .cat-info > p {
  margin: .5rem 0 .5rem;
  font-size: .94em;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Tag text just a touch smaller */
.page-main.catalogue-page .cat-card .cat-tags {
  margin-top: .25rem;
  gap: .3rem;
  font-size: .9em;
}

/* Footer: full-width rule + right-aligned icons */
.page-main.catalogue-page .cat-card .cat-actions {
  margin-top: .75rem;
  padding-top: .5rem;
  border-top: 1px solid var(--card-border);

  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;             /* right-align footer icons */

  /* extend the rule full width while keeping content aligned */
  margin-inline-start: calc(-1 * var(--header-left-pad));
  padding-inline-start: var(--header-left-pad);
}
/* v2025-09-03 — Catalogue card alignment + rules + footer pin + font drop */

/* Local knobs (safe defaults) */
.page-main.catalogue-page {
  --cat-icon-size: 28px;   /* normalize logos (Office/Google) */
  --cat-gap: .5rem;        /* space between icon and title */
}

/* Give cards an inner padding so the icon + rule math is stable */
.page-main.catalogue-page .cat-card {
  position: relative;
  padding: var(--card-pad-y, .75rem) var(--card-pad-x, .75rem);
}

/* Icon: anchored to the card’s top-left padding, consistent size */
.page-main.catalogue-page .cat-card .cat-icon {
  position: absolute;
  top: var(--card-pad-y, .75rem);
  left: var(--card-pad-x, .75rem);
}
.page-main.catalogue-page .cat-card .cat-icon img {
  width: var(--cat-icon-size);
  height: var(--cat-icon-size);
  display: block;
  object-fit: contain; /* tames odd viewBoxes */
}

/* Content column grows; footer can pin inside it */
.page-main.catalogue-page .cat-card .cat-info {
  display: flex;
  flex-direction: column;
  /* keep text off the icon */
  --header-left-pad: calc(var(--cat-icon-size) + var(--cat-gap));
  padding-inline-start: var(--header-left-pad);
}

/* Title: align visually with icon top; clamp to 2 lines */
.page-main.catalogue-page .cat-card .cat-info > h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Header rule: draw full card width (extends under the icon) */
.page-main.catalogue-page .cat-card .cat-info > h2::after {
  content: "";
  display: block;
  margin-top: .5rem;
  border-top: 1px solid var(--card-border, currentColor);
  /* stretch the rule to the card edges while keeping text aligned */
  margin-inline-start: calc(-1 * var(--header-left-pad));
  padding-inline-start: var(--header-left-pad);
}

/* Content: drop size a notch, keep airy leading; clamp to 3 lines */
.page-main.catalogue-page .cat-card .cat-info > p {
  margin: .5rem 0 0;
  font-size: .94em;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Tags a touch smaller */
.page-main.catalogue-page .cat-card .cat-tags {
  margin-top: .25rem;
  gap: .3rem;
  font-size: .9em;
}

/* Footer: full-width rule, right-aligned icons, stays pinned */
.page-main.catalogue-page .cat-card .cat-actions {
  padding-top: .5rem;
  border-top: 1px solid var(--card-border, currentColor);

  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;      /* right-align */

  /* extend the top rule under the icon too */
  margin-inline-start: calc(-1 * var(--header-left-pad));
  padding-inline-start: var(--header-left-pad);

  /* this pins the footer to the bottom of the card */
  margin-top: auto;
}
/* v2025-09-03 — Catalogue: narrower filter, 2-line headers, tiny type, consistent rules */

/* A) Narrower filter column on desktop */
@media (min-width: 1024px) {
  .page-main .cat-wrapper {
    grid-template-columns: clamp(160px, 18vw, 220px) 1fr; /* was 260px */
  }
}

/* B) Local variables for card spacing, icon, and tiny type */
.page-main.catalogue-page {
  --card-pad-x: .75rem;
  --card-pad-y: .75rem;

  --cat-icon-size: 28px;
  --cat-gap: .5rem;
  --header-left-pad: calc(var(--cat-icon-size) + var(--cat-gap));

  --cat-title-size: 11px;    /* h2 */
  --cat-title-lh: 1.25;
  --cat-body-size: 10px;     /* content + tags */
  --cat-body-lh: 1.5;

  --header-gap: .5rem;       /* space between title and hr */
  --header-height: calc(2 * var(--cat-title-size) * var(--cat-title-lh)); /* exact 2 lines */
}

/* C) Card shell + full-width header rule drawn as a background line */
.page-main.catalogue-page .cat-card {
  position: relative;
  padding: var(--card-pad-y) var(--card-pad-x);

  /* Header rule: spans the card’s inner width exactly */
  background-image: linear-gradient(var(--card-border, currentColor), var(--card-border, currentColor));
  background-repeat: no-repeat;
  background-size: calc(100% - (2 * var(--card-pad-x))) 1px;
  background-position:
    var(--card-pad-x)
    calc(var(--card-pad-y) + var(--header-height) + var(--header-gap));
}

/* D) Icon normalized and anchored to card padding */
.page-main.catalogue-page .cat-card .cat-icon {
  position: absolute;
  top: var(--card-pad-y);
  left: var(--card-pad-x);
}
.page-main.catalogue-page .cat-card .cat-icon img {
  width: var(--cat-icon-size);
  height: var(--cat-icon-size);
  display: block;
  object-fit: contain;
}

/* E) Content column + title exactly two lines high */
.page-main.catalogue-page .cat-card .cat-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding-inline-start: var(--header-left-pad);
}

.page-main.catalogue-page .cat-card .cat-info > h2 {
  margin: 0;
  font-size: var(--cat-title-size);
  line-height: var(--cat-title-lh);

  /* clamp to 2 and reserve the space so the hr aligns */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;

  /* fallback first, modern second */
  min-block-size: calc(2 * var(--cat-title-size) * var(--cat-title-lh));
  min-block-size: 2lh;
}

/* Kill any previous inline header rule so we don't double up */
.page-main.catalogue-page .cat-card .cat-info > h2::after {
  content: none !important;
}

/* F) Tiny content type */
.page-main.catalogue-page .cat-card .cat-info > p {
  margin: .5rem 0 0;
  font-size: var(--cat-body-size);
  line-height: var(--cat-body-lh);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.page-main.catalogue-page .cat-card .cat-tags {
  margin-top: .25rem;
  gap: .3rem;
  font-size: calc(var(--cat-body-size) * .95);
}

/* G) Footer: full-width top rule + right-aligned icons + pinned */
.page-main.catalogue-page .cat-card .cat-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  justify-content: flex-end;

  margin-top: auto;            /* pin to bottom of card */
  padding-top: .5rem;
  border-top: 1px solid var(--card-border, currentColor);

  /* stretch the rule to card edges while keeping content aligned */
  margin-inline-start: calc(-1 * var(--header-left-pad));
  padding-inline-start: var(--header-left-pad);
}
/* v2025-09-03 — title↔icon vertical align, hr width match, right-aligned footer */

/* Toggle: set to 'right' if you decide to right-align titles */
.page-main.catalogue-page { 
  --cat-title-align: left; 
}

/* 1) Vertically center the icon against the 2-line header block */
.page-main.catalogue-page .cat-card .cat-icon {
  /* center icon inside the reserved 2-line header height */
  top: calc(var(--card-pad-y) + (var(--header-height) - var(--cat-icon-size)) / 2);
  left: var(--card-pad-x);
}

/* 2) Title alignment (left by default; flip var above to 'right') */
.page-main.catalogue-page .cat-card .cat-info > h2 {
  text-align: var(--cat-title-align);
}

/* 3) Footer buttons: hard-right; make multi-row wraps also right */
.page-main.catalogue-page .cat-card .cat-actions {
  position: relative;                 /* anchor the hr pseudo */
  padding-left: var(--header-left-pad);/* keep content aligned with title */
  border-top: 0;                       /* we'll draw a custom hr */
  justify-content: flex-end; 
  align-content: flex-end; 
  gap: .5rem;
}

/* Footer hr: match header hr width exactly (card inner width) */
.page-main.catalogue-page .cat-card .cat-actions::before {
  content: "";
  position: absolute;
  top: 0;
  /* extend from card inner left edge to card inner right edge */
  left: calc(-1 * var(--header-left-pad)); /* pull back over the icon gap */
  right: 0;
  height: 1px;
  background: var(--card-border, currentColor);
  opacity: .7;
}
/* ensure footer actions are hard-right on all breakpoints */
.page-main.catalogue-page .cat-card .cat-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
/* v2025-09-03 — Fix footer “extra columns”, full-width hr, hard-right actions */

/* Ensure we have the same left pad used for the icon gap */
.page-main.catalogue-page {
  --header-left-pad: calc(var(--cat-icon-size, 28px) + var(--cat-gap, .5rem));
}

/* 1) Neutralize legacy row-flex on the last child (.cat-info here) */
.page-main.catalogue-page .cat-card > :last-child {
  display: block;         /* .cat-info will control its own layout */
  gap: 0;
  align-items: normal;
}

/* 2) Put .cat-info back to a vertical flow and stretch children */
.page-main.catalogue-page .cat-card .cat-info {
  display: flex;
  flex-direction: column;
  align-items: stretch;   /* make rows full width */
  gap: .25rem;
}

/* 3) Footer: full card width + right-aligned buttons + matching hr */
.page-main.catalogue-page .cat-card .cat-actions {
  /* occupy the full inner width (extend under icon gap) */
  align-self: stretch;
  width: calc(100% + var(--header-left-pad));
  margin-left: 0;
  padding-left: 0;
display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;  /* hard right */
  align-items: center;

  border-top: 1px solid var(--card-border, currentColor); /* hr same width as header */
  padding-top: .5rem;
}
/* v2025-09-03 — Unify hr thickness + anchor to card padding; prevent bleed */

/* Standardize line thickness/color once */
.page-main.catalogue-page {
  --hr-thickness: 1px;
  --hr-color: var(--card-border, currentColor);
}

/* Guard: nothing (lines) can bleed past rounded card edges */
.page-main.catalogue-page .cat-card {
  overflow: hidden;
  /* neutralize any older header-hr background trick */
  background-image: none;
}

/* Header hr: draw as a precise line, edge-to-edge within card padding */
.page-main.catalogue-page .cat-card::after {
  content: "";
  position: absolute;
  left: var(--card-pad-x);
  right: var(--card-pad-x);
  top: calc(var(--card-pad-y) + var(--header-height) + var(--header-gap));
  height: var(--hr-thickness);
  background: var(--hr-color);
  pointer-events: none;
}

/* Footer actions: remove width/negative-margin hacks; hard-right align */
.page-main.catalogue-page .cat-card .cat-actions {
  position: relative;
  margin-left: 0;            /* kill earlier left pull */
  width: auto;               /* no artificial stretching */
  border-top: 0;             /* we'll draw a custom hr below */
  padding-top: .5rem;
  padding-left: var(--header-left-pad);   /* text aligns with title column */

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end; /* hard-right buttons */
}

/* Footer hr: same width as header (anchored to card padding) */
.page-main.catalogue-page .cat-card .cat-actions::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--card-pad-x);
  right: var(--card-pad-x);
  height: var(--hr-thickness);
  background: var(--hr-color);
  pointer-events: none;
}
/* v2025-09-03 — Canonical catalogue card block: unify HR + footer, neutralize overlaps */

/* Shared knobs (scoped) */
.page-main.catalogue-page {
  --card-pad-x: .75rem;
  --card-pad-y: .75rem;

  --cat-icon-size: 28px;
  --cat-gap: .5rem;
  --header-left-pad: calc(var(--cat-icon-size) + var(--cat-gap));

  --cat-title-size: 11px;
  --cat-title-lh: 1.25;
  --header-gap: .5rem;
  --header-height: calc(2 * var(--cat-title-size) * var(--cat-title-lh));

  --hr-thickness: 1px;
  --hr-color: var(--card-border, currentColor);
}

/* Neutralize earlier header-line approaches + legacy row-flex */
.page-main.catalogue-page .cat-card {
  position: relative;
  overflow: hidden;
  background-image: none !important;      /* kills background-image HR */
  padding: var(--card-pad-y) var(--card-pad-x);
}
.page-main.catalogue-page .cat-card .cat-info > h2::after {
  content: none !important;               /* kills h2::after HR */
  border: 0 !important;
}
.page-main.catalogue-page .cat-card > :last-child {
  display: block;                          /* let .cat-info control layout */
  gap: 0;
  align-items: normal;
}

/* Header HR: exact inner width (pad→pad), consistent gauge */
.page-main.catalogue-page .cat-card::after {
  content: "";
  position: absolute;
  left: var(--card-pad-x);
  right: var(--card-pad-x);
  top: calc(var(--card-pad-y) + var(--header-height) + var(--header-gap));
  height: var(--hr-thickness);
  background: var(--hr-color);
  pointer-events: none;
}

/* Icon + content alignment */
.page-main.catalogue-page .cat-card .cat-icon {
  position: absolute;
  top: calc(var(--card-pad-y) + (var(--header-height) - var(--cat-icon-size)) / 2);
  left: var(--card-pad-x);
}
.page-main.catalogue-page .cat-card .cat-icon img {
  width: var(--cat-icon-size);
  height: var(--cat-icon-size);
  display: block;
  object-fit: contain;
}
.page-main.catalogue-page .cat-card .cat-info {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-inline-start: var(--header-left-pad); /* keeps text off the icon */
}
.page-main.catalogue-page .cat-card .cat-info > h2 {
  margin: 0;
  font-size: var(--cat-title-size);
  line-height: var(--cat-title-lh);
  min-block-size: calc(2 * var(--cat-title-size) * var(--cat-title-lh)); /* 2 lines */
  min-block-size: 2lh;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Footer: right-aligned actions + HR that starts at card pad (not the text column) */
.page-main.catalogue-page .cat-card .cat-actions {
  position: relative;
  margin-top: auto;
  padding-top: .5rem;
  padding-inline-start: var(--header-left-pad); /* align with title column */
  border-top: 0;                                /* we draw our own HR */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;                    /* hard-right buttons */
}
.page-main.catalogue-page .cat-card .cat-actions::before {
  content: "";
  position: absolute;
  top: 0;
  /* compensate the left text column so the line begins at card padding */
  left: calc(-1 * var(--header-left-pad) + var(--card-pad-x));
  right: var(--card-pad-x);
  height: var(--hr-thickness);
  background: var(--hr-color);
  pointer-events: none;
}

/* v2025-09-03 — Footer hr = exact header width; no centering drift */

/* Kill any earlier footer pseudo so we don't double-draw */
.page-main.catalogue-page .cat-card .cat-actions::before {
  content: none !important;
}

/* Draw the footer hr with border-top and expand left by the icon column */
.page-main.catalogue-page .cat-card .cat-actions {
  /* same thickness/color as header */
  border-top: var(--hr-thickness, 1px) solid var(--hr-color, currentColor);

  /* pull the hr left to the card's inner padding, not the text column */
  margin-left: 0;
  padding-left: 0;
/* keep the right edge aligned to the card padding */
  margin-right: 0;
  padding-right: 0;

  /* keep actions hard-right */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
/* v2025-09-03 — Catalogue: taller cards, price-left footer, tooltips, filter layout
   ──⚙️ FONT SIZE CONTROLS live in the block below──
*/

/* ────────────────────────────────
   ⚙️ FONT SIZE CONTROLS (catalogue cards)
   - Change ONLY the four values below to tune sizes
   - Header rule alignment auto-updates via --header-height
   ──────────────────────────────── */
.page-main.catalogue-page {
  /* Card vertical rhythm (taller cards) */
  --card-pad-y: 1.1rem;            /* ↑ was ~.75rem; ~30% taller look */
  --card-pad-x: .75rem;

  /* Title/content font sizes (your "one size up") */
  --cat-title-size: 14px;          /* ⟵ H2 size (try 11–13px) */
  --cat-title-lh: 1.25;            /* line-height for title */
  --cat-body-size: 12px;           /* ⟵ Body/Tags (try 10–11px) */
  --cat-body-lh: 1.5;              /* line-height for body */

  /* Derived: header block reserved height (do not change) */
  --header-gap: .5rem;
  --header-height: calc(2 * var(--cat-title-size) * var(--cat-title-lh));

  /* Footer/header rule thickness + color (shared) */
  --hr-thickness: 1px;
  --hr-color: var(--card-border, currentColor);

  /* Icon spacing (unchanged) */
  --cat-icon-size: 28px;
  --cat-gap: .5rem;
  --header-left-pad: calc(var(--cat-icon-size) + var(--cat-gap));

  /* Title alignment toggle: left | right */
  --cat-title-align: left;
}

/* Keep header HR: pad→pad, exact gauge */
.page-main.catalogue-page .cat-card {
  position: relative;
  overflow: hidden;                 /* prevents bleed under rounded corners */
  padding: var(--card-pad-y) var(--card-pad-x);
  background-image: none !important;
}
.page-main.catalogue-page .cat-card::after {
  content: "";
  position: absolute;
  left: var(--card-pad-x);
  right: var(--card-pad-x);
  top: calc(var(--card-pad-y) + var(--header-height) + var(--header-gap));
  height: var(--hr-thickness);
  background: var(--hr-color);
  pointer-events: none;
}

/* Icon + title vertical centering */
.page-main.catalogue-page .cat-card .cat-icon {
  position: absolute;
  top: calc(var(--card-pad-y) + (var(--header-height) - var(--cat-icon-size)) / 2);
  left: var(--card-pad-x);
}
.page-main.catalogue-page .cat-card .cat-icon img {
  width: var(--cat-icon-size);
  height: var(--cat-icon-size);
  display: block;
  object-fit: contain;
}
.page-main.catalogue-page .cat-card .cat-info {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-inline-start: var(--header-left-pad); /* keep text off the icon */
}

/* Title: fixed 2 lines, alignment toggle */
.page-main.catalogue-page .cat-card .cat-info > h2 {
  margin: 0;
  text-align: var(--cat-title-align);
  font-size: var(--cat-title-size);
  line-height: var(--cat-title-lh);
  min-block-size: calc(2 * var(--cat-title-size) * var(--cat-title-lh));
  min-block-size: 2lh; /* modern */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
/* Kill older h2::after rules to avoid double lines */
.page-main.catalogue-page .cat-card .cat-info > h2::after { content: none !important; border: 0 !important; }

/* Content: 4 lines now, using body size */
.page-main.catalogue-page .cat-card .cat-info > p {
  margin: .5rem 0 0;
  font-size: var(--cat-body-size);
  line-height: var(--cat-body-lh);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;   /* was 3 */
  overflow: hidden;
}
.page-main.catalogue-page .cat-card .cat-tags {
  margin-top: .25rem;
  gap: .3rem;
  font-size: calc(var(--cat-body-size) * .95);
}

/* Footer: hr matches header width; price on left, buttons right */
.page-main.catalogue-page .cat-card .cat-actions::before { content: none !important; } /* kill any old pseudo */
.page-main.catalogue-page .cat-card .cat-actions {
  /* draw footer hr with exact gauge + width */
  border-top: var(--hr-thickness) solid var(--hr-color);

  /* expand the line left to pad→pad while keeping content aligned to text column */
  margin-left: 0;
  padding-left: 0;
display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  justify-content: flex-end; /* buttons right */
  margin-top: auto;          /* pin footer */
  padding-top: .5rem;
}
/* Price: sits on the left; buttons remain right */
.page-main.catalogue-page .cat-card .cat-price {
  margin-right: auto;                      /* push buttons to the right */
  font-size: var(--cat-body-size);
  line-height: 1.1;
  font-weight: 600;
  opacity: .9;

  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;}

/* ────────────────────────────────
   FILTER CARD LAYOUT (neat block)
   - Narrower sidebar (we already set in earlier step)
   - Proportional headings/body
   - Clear group separation
   ──────────────────────────────── */

/* Sidebar width (desktop) — keep from earlier; adjust if needed */
@media (min-width: 1024px) {
  .page-main .cat-wrapper {
    grid-template-columns: clamp(160px, 18vw, 220px) 1fr;
    column-gap: 1rem;
  }
}

/* Proportional typography for filter panel */
.page-main .cat-filter-panel {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  /* padding: .75rem; */
  font-size: var(--filter-body-size, 11px);   /* default body size */
  line-height: 1.45;
}
.page-main .cat-filter-panel h2 {
  margin: 0 0 .5rem 0;
  font-size: var(--filter-title-size, 12px);
  line-height: 1.25;
  font-weight: 700;
}
.page-main .cat-filter-panel h3 {
/*   margin: .75rem 0 .25rem 0; */
/*   padding-top: .5rem; */
  border-top: 1px solid var(--card-border, currentColor);
  font-size: var(--filter-title-size, 12px);
  line-height: 1.25;
  font-weight: 600;
}

/* Labels and inputs neat alignment */
.page-main .cat-filter-panel label {
  display: flex;
  align-items: center;
  gap: .5rem;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  padding: .15rem 0;
}
.page-main .cat-filter-panel input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: currentColor; /* uses theme color */
}
.page-main .cat-filter-panel .cat-filter-search {
  width: 95%;
  font-size: inherit;
  line-height: 1.35;
  padding: .4rem .5rem;
  border: 1px solid var(--card-border, currentColor);
  border-radius: .375rem;
  background: var(--surface-1, transparent);
  color: inherit;
}
/* v2025-09-03 — Filter panel: native two-column grid, tidy typography, no centering */

/* ⚙️ FILTER FONT SIZE CONTROLS
   Tweak these two to taste; everything else adapts. */
.page-main .cat-filter-panel {
  --filter-title-size: 14px;  /* h2/h3 */
  --filter-body-size: 12px;   /* labels/input */
}

/* Base panel styling (mobile-first: single column) */
.page-main .cat-filter-panel {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: .5rem;
  column-gap: .75rem;
  /* padding: .75rem; */
  text-align: left;                 /* kill centering */
  font-size: var(--filter-body-size);
  line-height: 1.45;
}

/* Headings */
.page-main .cat-filter-panel h2,
.page-main .cat-filter-panel h3 {
  grid-column: 1 / -1;             /* span all columns */
  margin: 0;
  font-size: var(--filter-title-size);
  line-height: 1.25;
  font-weight: 700;
}
.page-main .cat-filter-panel h3 {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--card-border, currentColor);
  font-weight: 600;
}

/* Search input (full width, matches site inputs) */
.page-main .cat-filter-panel .cat-filter-search {
  grid-column: 1 / -1;
  width: 100%;
  font-size: inherit;
  line-height: 1.35;
  padding: .4rem .5rem;
  border: 1px solid var(--card-border, currentColor);
  border-radius: .375rem;
  background: var(--surface-1, transparent);
  color: inherit;
}

/* Checkbox rows: compact, left-aligned */
.page-main .cat-filter-panel > label {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  min-width: 0;                     /* allow wrapping */
  overflow-wrap: anywhere;          /* long labels behave */
}
.page-main .cat-filter-panel > label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  accent-color: currentColor;       /* theme color */
}

/* Desktop: two-column filter layout + sticky */
@media (min-width: 1024px) {
  .page-main .cat-filter-panel {
    grid-template-columns: 1fr 1fr; /* two equal columns for labels */
    align-items: start;
    justify-items: start;
    position: sticky;               /* optional: follows scroll */
    top: 1rem;                      /* adjust if you have a fixed header */
  }

  /* Keep headings & search spanning both columns */
  .page-main .cat-filter-panel h2,
  .page-main .cat-filter-panel h3,
  .page-main .cat-filter-panel .cat-filter-search {
    grid-column: 1 / -1;
  }
}
/* v2025-09-03 — Filter: single-row categories + font control mapping */

/* Make filter inherit the same size knobs as cards by default */
.page-main.catalogue-page {
  --filter-title-size: var(--cat-title-size, 12px);
  --filter-body-size: var(--cat-body-size, 11px);
}

/* Base panel (leave your earlier block as-is; this augments it) */
.page-main .cat-filter-panel {
  font-size: var(--filter-body-size);
}

/* Headings use the mapped size by default */
.page-main .cat-filter-panel h2,
.page-main .cat-filter-panel h3 {
  font-size: var(--filter-title-size);
}

/* Categories row: single line on desktop, wraps only when needed */
.page-main .cat-filter-panel .cat-categories {
  grid-column: 1 / -1;                 /* span full width of the panel grid */
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;                      /* allow wrap on very narrow widths */
}

/* On desktop the sidebar is wide enough — keep them in one row */
@media (min-width: 1024px) {
  .page-main .cat-filter-panel .cat-categories {
    flex-wrap: nowrap;                  /* force a single row */
  }
}

/* Label styling applies both to direct-child labels and those in .cat-categories */
.page-main .cat-filter-panel label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;                  /* keep short labels on one line */
  min-width: 0;
}

.page-main .cat-filter-panel label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  accent-color: currentColor;
}
.page-main .cat-filter-panel {
  --filter-title-size: 14px;
  --filter-body-size: 12px;
}

/* v2025-09-03 — Filter categories: 1 row when possible, clean 2 rows when not */

/* Make filter inherit the card size knobs (so 14/12 affects it too) */
.page-main.catalogue-page {
  --filter-title-size: var(--cat-title-size, 12px);
  --filter-body-size: var(--cat-body-size, 11px);
}

.page-main .cat-filter-panel { font-size: var(--filter-body-size); }
.page-main .cat-filter-panel h2,
.page-main .cat-filter-panel h3 { font-size: var(--filter-title-size); }

/* Categories row: prefer 3 across, gracefully wrap to a second row */
.page-main .cat-filter-panel .cat-categories {
  grid-column: 1 / -1;             /* span full panel */
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* aim for 3 across */
  column-gap: .6rem;
  row-gap: .4rem;
  align-items: center;
}

/* If the sidebar is too tight, drop to 2 columns; on mobile, 1 column */
@media (max-width: 1200px) {
  .page-main .cat-filter-panel .cat-categories {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .page-main .cat-filter-panel .cat-categories {
    grid-template-columns: 1fr;
  }
}

/* Compact label + input so larger fonts still fit neatly */
.page-main .cat-filter-panel .cat-categories label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;                       /* tighter than default */
  min-width: 0;                     /* allows natural wrapping if ever needed */
  overflow-wrap: anywhere;          /* avoid overflow on long labels */
}
.page-main .cat-filter-panel .cat-categories input[type="checkbox"] {
  width: .95rem;
  height: .95rem;                   /* slightly smaller box to reduce crowding */
  flex: 0 0 auto;
  accent-color: currentColor;
}
/* v2025-09-03 — Filter panel: single-column compact layout */

/* Density + size knobs (tweak these to taste) */
.page-main .cat-filter-panel {
  --filter-title-size: var(--cat-title-size, 12px);  /* ties to card controls */
  --filter-body-size:  var(--cat-body-size, 11px);
  --filter-row-gap: .35rem;    /* vertical spacing between rows */
  --filter-col-gap: .5rem;     /* not used much in 1-col, but kept */
  --filter-label-pad-y: .18rem;/* top/bottom padding per label line */
  --filter-checkbox-size: .95rem; /* slightly smaller box to reduce crowding */
}

/* Base: single column, compact rhythm */
.page-main .cat-filter-panel {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: var(--filter-row-gap);
  column-gap: var(--filter-col-gap);
  /* padding: .65rem .75rem; */
  text-align: left;
  font-size: var(--filter-body-size);
  line-height: 1.45;
}

/* Headings (compact) */
.page-main .cat-filter-panel h2,
.page-main .cat-filter-panel h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--filter-title-size);
  line-height: 1.25;
}
.page-main .cat-filter-panel h3 {
  margin-top: .4rem;
  padding-top: .4rem;
  border-top: 1px solid var(--card-border, currentColor);
  font-weight: 600;
}

/* Search (compact input) */
.page-main .cat-filter-panel .cat-filter-search {
  grid-column: 1 / -1;
  width: 95%;
  font-size: inherit;
  line-height: 1.3;
  padding: .35rem .5rem;
  border: 1px solid var(--card-border, currentColor);
  border-radius: .375rem;
  background: var(--surface-1, transparent);
  color: inherit;
}

/* Categories wrapper: force single column even if earlier CSS said 2-cols */
.page-main .cat-filter-panel .cat-categories {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr !important; /* force 1 column */
  row-gap: calc(var(--filter-row-gap) * 0.9);
}

/* Labels (tight, left-aligned) */
.page-main .cat-filter-panel label {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: var(--filter-label-pad-y) 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  min-width: 0;
  overflow-wrap: anywhere; /* long labels behave */
  white-space: normal;     /* allow wrapping if needed */
}

/* Checkbox size */
.page-main .cat-filter-panel label input[type="checkbox"] {
  width: var(--filter-checkbox-size);
  height: var(--filter-checkbox-size);
  flex: 0 0 auto;
  accent-color: currentColor;
}
/* v2025-09-03 — Ensure space between header HR and first content */
.page-main.catalogue-page {
  --content-gap-top: .5rem;       /* tweak to taste */
  --content-gap-bottom: .5rem;    /* used by footer padding you already have */
}

/* Put the first thing after the title BELOW the HR:
   header gap (title→hr) + extra content gap (hr→content) */
.page-main.catalogue-page .cat-card .cat-info > h2 + * {
  margin-top: calc(var(--header-gap) + var(--content-gap-top)) !important;
}

/* Keep the gap ABOVE the footer HR (you likely have this already) */
.page-main.catalogue-page .cat-card .cat-actions {
  padding-top: var(--content-gap-bottom) !important;
}
/* v2025-09-04 — Oversized logo normalization (no transforms) */
/* Keeps the icon box the same; shrinks the visual glyph with padding.
   Padding is proportional to --cat-icon-size, so it adapts if you change it. */

.page-main.catalogue-page .cat-card .cat-icon img[src$="microsoft-365.svg"],
.page-main.catalogue-page .cat-card .cat-icon img[src$="microsoft-365-home.svg"] {
  box-sizing: border-box;
  /* ~4% padding each side ≈ 0.92 visual scale */
  padding: calc(var(--cat-icon-size) * 0.04);
}

.page-main.catalogue-page .cat-card .cat-icon img[src$="google-workspace.svg"] {
  box-sizing: border-box;
  /* ~5% padding each side ≈ 0.90 visual scale */
  padding: calc(var(--cat-icon-size) * 0.05);
}

/* (Optional, if not already present) ensure the glyph stays within the box */
.page-main.catalogue-page .cat-card .cat-icon img {
  width: var(--cat-icon-size);
  height: var(--cat-icon-size);
  object-fit: contain;
  display: block;
}
/* v2025-09-04 — Icon box + glyph standardization (no transforms) */
/* ⚙️ Knobs: tweak these two to taste */
.page-main.catalogue-page {
  --cat-icon-size: 36px;                 /* box size used across the cards */
  --cat-icon-inset: calc(var(--cat-icon-size) * 0.04); /* inner padding for ALL icons (~4%) */
}

/* Make the icon container a fixed square box */
.page-main.catalogue-page .cat-card .cat-icon {
  width: var(--cat-icon-size);
  height: var(--cat-icon-size);
  aspect-ratio: 1 / 1;                   /* belt-and-braces */
}

/* Every SVG fills the box, then gets the same inner inset */
.page-main.catalogue-page .cat-card .cat-icon img {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: var(--cat-icon-inset);        /* uniformly shrinks the glyph */
  object-fit: contain;
  display: block;
}
/* v2025-09-04 — Per-icon micro-inset to equalize visual size (no transforms) */
.page-main.catalogue-page .cat-card .cat-icon img[src$="dns-svgrepo-com.svg"] {
  /* dns looked small → give it less padding */
  box-sizing: border-box;
  padding: calc(var(--cat-icon-size) * 0.02); /* ~2% */
}

.page-main.catalogue-page .cat-card .cat-icon img[src$="office-1.svg"] {
  /* office looked large → give it more padding */
  box-sizing: border-box;
  padding: calc(var(--cat-icon-size) * 0.06); /* ~6% */
}
/* v2025-09-04 — Enlarge all icons (no transform), keep extra inset on outliers */

/* Make every glyph fill its box */
.page-main.catalogue-page .cat-card .cat-icon img {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0 !important;     /* ← bigger everywhere */
  object-fit: contain;
  display: block;
}

/* Keep the “big” logos visually in check with a small uniform inset */
.page-main.catalogue-page .cat-card .cat-icon img[src$="microsoft-365.svg"],
.page-main.catalogue-page .cat-card .cat-icon img[src$="microsoft-365-home.svg"],
.page-main.catalogue-page .cat-card .cat-icon img[src$="google-workspace.svg"],
.page-main.catalogue-page .cat-card .cat-icon img[src$="office-1.svg"] {
  padding: calc(var(--cat-icon-size) * 0.05) !important; /* ~5% inset */
}


/* Ensure price text (incl. POA) never wraps */
.page-main.catalogue-page .cat-card .cat-price,
.page-main.catalogue-page .cat-card .cat-price * {
  white-space: nowrap;
}
/* catalogue card 3×3 layout override — v2025-09-04 */
/* Scope tightly to the catalogue page to avoid side-effects */
.page-main.catalogue-page .cat-card {
  display: grid;
  grid-template-columns: var(--cat-icon-size, 28px) 1fr auto;
  grid-auto-rows: min-content;
  row-gap: .5rem; /* sensible vertical rhythm */
}

/* Row 1 — icon (col 1), title (cols 2–3), both vertically centered */
.page-main.catalogue-page .cat-card .cat-icon {
  position: static !important;     /* reset any absolute placement */
  inset: auto !important;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  inline-size: var(--cat-icon-size, 28px);
  block-size: var(--cat-icon-size, 28px);
}

.page-main.catalogue-page .cat-card .cat-title {
  grid-column: 2 / 4;
  grid-row: 1;
  align-self: center;               /* middle align with icon */
  display: flex;
  align-items: center;
  gap: .5rem;                       /* sensible spacing */
}

/* If title lives inside .cat-info, keep it tidy */
.page-main.catalogue-page .cat-card .cat-info > h2 {
  margin: 0;
}

/* Row 2 — full-width content (all 3 columns) with clear separation from footer */
.page-main.catalogue-page .cat-card .cat-info {
  grid-column: 1 / -1;
  grid-row: 2;
  padding-inline-start: 0 !important;  /* drop any legacy icon padding */
  margin-block-end: .5rem;              /* small gap before footer */
}

/* Row 3 — full-width footer; price left, actions right; vertically centered */
.page-main.catalogue-page .cat-card .cat-actions {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  align-items: center;                  /* middle align price + icons */
  gap: .5rem;
  border-top: var(--hr-thickness, 1px) solid var(--hr-color, currentColor);
  margin-inline: 0;
  margin-left: 0 !important;            /* neutralize old stripe math */
  padding-left: 0 !important;
  padding-top: .5rem;
}

/* Price: one line, visually stable digits, sits on the left */
.page-main.catalogue-page .cat-card .cat-price {
  margin-inline-end: auto;              /* push actions to the right */
  white-space: nowrap;                  /* never wrap “From £n” */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  align-self: center;                   /* vertical middle */
}

/* Actions: shrink icon visuals ~25% without touching text size */
.page-main.catalogue-page .cat-card .cat-actions svg,
.page-main.catalogue-page .cat-card .cat-actions img.icon {
  inline-size: .75em;
  block-size: .75em;
}

/* Keep all footer controls on one line */
.page-main.catalogue-page .cat-card .cat-actions > * {
  white-space: nowrap;
}
/* HEADER — icon left + title same line, left & middle aligned, stubborn override */
.page-main.catalogue-page .cat-card {
  /* kill grid/flex centering that can override later */
  justify-items: start !important;     /* grid items default left */
  align-items: start !important;       /* rows start unless overridden per-item */
  text-align: left !important;         /* safety for text align tricks */
}

/* Icon: left, centered vertically relative to the title line */
.page-main.catalogue-page .cat-card .cat-icon {
  position: static !important;         /* cancel absolute/pseudo placement */
  inset: auto !important;
  justify-self: start !important;      /* win against grid centering */
  align-self: start !important;       /* vertical middle */
  margin: 0 .6rem 0 0 !important;      /* gap to title */
  display: block;                      /* avoid baseline wobble */
}

/* Title container — force same line, left, middle */
.page-main.catalogue-page .cat-card .cat-title,
.page-main.catalogue-page .cat-card .cat-info > h2 {
  display: flex !important;
  align-items: center !important;      /* vertical middle with icon */
  justify-content: flex-start !important;
  text-align: left !important;
  margin: 0 !important;                /* neutralize margin auto centering */
  justify-self: start !important;      /* win against grid justify-items */
  align-self: start !important;
}

/* Tighten the actual heading text */
.page-main.catalogue-page .cat-card .cat-title h2 {
  margin: 0;
  line-height: 1.15;
}

/* If any utility classes are sneaking in (text-center, centered...), null them here */
.page-main.catalogue-page .cat-card [class*="text-center"],
.page-main.catalogue-page .cat-card [class*="center"] {
  text-align: left !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

/* LAST-RESORT FALLBACK (only used if a grid parent ignores justify-self):
   Make icon float left so title naturally sits inline and left-aligned */
@supports not (justify-self: start) {
  .page-main.catalogue-page .cat-card .cat-icon { float: left; }
  .page-main.catalogue-page .cat-card .cat-title,
  .page-main.catalogue-page .cat-card .cat-info > h2 { overflow: hidden; }
}
/* Header: icon + title same line (left & vertically centered),
   rest of content stays full width below */
.page-main.catalogue-page .cat-card {
  display: grid !important;                 /* beat the inline flex */
  grid-template-columns: auto 1fr;          /* icon | title */
  column-gap: .6rem;                        /* space between icon and title */
  row-gap: .5rem;                           /* sensible vertical rhythm */
}

/* Icon in col 1, row 1 */
.page-main.catalogue-page .cat-card .cat-icon {
  position: static !important;              /* cancel any absolute tricks */
  inset: auto !important;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;                        /* true middle with the title line */
}

/* Make .cat-info transparent to layout so its children become grid items */
.page-main.catalogue-page .cat-card .cat-info {
  display: contents;
}

/* Title in col 2, row 1 (same line as icon) */
.page-main.catalogue-page .cat-card .cat-info > h2 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;                        /* middle with the icon */
  margin: 0;
}

/* Everything after the title spans full width beneath the header */
.page-main.catalogue-page .cat-card .cat-info > *:not(h2),
.page-main.catalogue-page .cat-card .cat-actions {
  grid-column: 1 / -1;                       /* full width rows below */
}
.page-main.catalogue-page .cat-card .cat-tags { display: none; }
/* HR full-width in catalogue card footers — safe, focused override */

/* If the card is flex (your snippet shows inline style="display:flex") */
.page-main.catalogue-page .cat-card {
  flex-wrap: wrap; /* allow footer to occupy its own full-width row */
}

/* Footer: occupy full width in both flex and grid layouts */
.page-main.catalogue-page .cat-card .cat-actions {
  /* FLEX case */
  flex-basis: 100%;
  width: 100%;

  /* GRID case */
  grid-column: 1 / -1;
  justify-self: stretch;

  /* Keep the rule full-width and tidy */
  display: flex;
  align-items: center;
  gap: .5rem;
  border-top: var(--hr-thickness, 1px) solid var(--hr-color, currentColor);
  margin-inline: 0;
  padding-inline: 0;

  /* Nuke any legacy indent from icon stripe logic */
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Price left; actions right (one line) */
.page-main.catalogue-page .cat-card .cat-price { margin-right: auto; white-space: nowrap; }
/* v2025-09-06: enable JS filter */
.catalogue-hide {
  display: none !important;
}
/* v2025-09-06 — Catalogue filter tidy (scoped to the form) */

/* 1) Kill the apparent top gap: stop margin-collapsing + zero the first heading’s top margin */
.cat-filter-panel {
  margin: 0;
  padding-top: 1rem;         /* keep if you want a tiny cushion, change to .25rem */
  max-width: 95%;
  overflow-x: hidden;     /* kill horizontal scroll within the panel */
}
.cat-filter-panel > h2,
.cat-filter-panel > h3 {
  margin-top: 0;          /* prevents the big gap at the top */
}

/* 2) Make the options feel cohesive: tighten vertical rhythm for the group */
.cat-filter-panel .cat-categories {
  display: grid;          /* simple stack */
  gap: 0.25rem;           /* tighter spacing between rows */
  min-width: 0;           /* prevent child overflow from forcing a scrollbar */
}
.cat-filter-panel .cat-categories label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;              /* remove default label margin */
  line-height: 1.2;       /* tighter line height */
}

/* 3) Ensure the search input never triggers a horizontal scrollbar */
.cat-filter-panel .cat-filter-search {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  overflow: hidden;       /* defensive */
  min-width: 0;           /* critical in some grids/flex contexts */
}

/* Optional: tighten spacing between blocks for cohesion */
.cat-filter-panel > * + * {
  margin-top: 0.5rem;     /* consistent compact spacing between groups */
}

/* v2025-09-06 — Catalogue icon-only buttons */
.page-main.catalogue-page .cat-card .btn {
  display: inline-flex;         /* center icon inside */
  align-items: center;
  justify-content: center;
  padding: .4rem;               /* square shape, not text padding */
  width: 2.25rem;               /* same height/width as text buttons */
  height: 2.25rem;
}

.page-main.catalogue-page .cat-card .btn .icon {
  width: 1.25rem;               /* scales icon to fit nicely inside */
  height: 1.25rem;
  display: block;
}
/* v2025-09-06 — icon-only button sizing */
.page-main.catalogue-page .cat-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .4rem;
  width: 2.25rem;
  height: 2.25rem;
}

/*-- DO NOT CHANGE 2025-09-06 --*/
.page-main .cat-filter-panel { overflow-x: hidden; }
.page-main .cat-filter-panel > h2 { margin-top: 0; }
.page-main.catalogue-page .cat-card .btn {
  display:inline-flex; align-items:center; justify-content:center;
  width:2.25rem; height:2.25rem; padding:.4rem;
}
.page-main.catalogue-page .cat-card .btn svg {
  width:1.25rem; height:1.25rem; display:block;
}
/* v2025-09-06 — tighten icon button spacing */
.page-main.catalogue-page .cat-card .cat-actions {
  gap: .2rem;   /* was .5rem */
}
.page-main.catalogue-page .cat-card .cat-actions .btn {
  margin-right: 0rem;
}
.page-main.catalogue-page .cat-card .cat-actions .btn:last-child {
  margin-right: 0; /* no extra space after the last one */
}

/* v2025-10-06 — Catalogue link-cards: true 3-row grid, footer hard-pinned */
.page-main.catalogue-page a.cat-card.is-link-card {
  display: grid !important;
  grid-template-columns: var(--cat-icon-size, 36px) 1fr; /* icon | title */
  grid-template-rows: auto 1fr auto;                     /* header | grow | footer */
  align-items: start;
  min-height: 100%;
}

/* Row 1: icon + title on the same line */
.page-main.catalogue-page a.cat-card.is-link-card .cat-icon {
  position: static !important;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: start;
}
.page-main.catalogue-page a.cat-card.is-link-card .cat-info { display: contents; }
.page-main.catalogue-page a.cat-card.is-link-card .cat-info > h2 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin: 0;
}

/* Row 2: content & tags expand */
.page-main.catalogue-page a.cat-card.is-link-card .cat-info > p,
.page-main.catalogue-page a.cat-card.is-link-card .cat-info > .cat-tags {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-block: .5rem 0;
}

/* Row 3: footer always at the bottom; price left, actions right */
.page-main.catalogue-page a.cat-card.is-link-card .cat-actions {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 0 !important;          /* neutralize any old flex pin */
  border-top: var(--hr-thickness, 1px) solid var(--hr-color, currentColor);
  padding-top: .5rem;
  display: flex;
  align-items: center;
  gap: .2rem;
  justify-content: flex-end;
}
.page-main.catalogue-page a.cat-card.is-link-card .cat-price {
  margin-right: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
/* ==========================================================================
   Blue Canoe — Catalogue (FINAL)
   v2025-10-06.final — stable, scoped, dark, footer-pinned link-cards
   Scope: catalogue page only (no globals)
   --------------------------------------------------------------------------
   Knobs:
     --cat-title-size / --cat-body-size  (type scale)
     --cat-icon-size                     (icon box)
     --card-pad-x / --card-pad-y         (card rhythm)
   ========================================================================== */

.page-main.catalogue-page {
  /* Type + rhythm */
  --cat-title-size: 14px;
  --cat-title-lh: 1.25;
  --cat-body-size: 12px;
  --cat-body-lh: 1.5;
  --card-pad-x: .75rem;
  --card-pad-y: 1.1rem;

  /* Icon */
  --cat-icon-size: 36px;

  /* Lines + borders (use theme tokens if present) */
  --hr-thickness: 1px;
  --hr-color: var(--card-border, currentColor);

  /* Colors (dark fallbacks) */
  --card-bg: var(--card-bg, #1e293b);
  --text-1: var(--text-1, #e5e7eb);
  --border-3: var(--border-3, #334155);
}

/* ====== Wrapper layout: filter left, grid right ====== */
.page-main .cat-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .page-main .cat-wrapper {
    grid-template-columns: clamp(160px, 18vw, 220px) 1fr;
  }
}

/* ====== Card list grid ====== */
.page-main .cat-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .page-main .cat-card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .page-main .cat-card-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ====== Card shell (link-card; 3-row grid, footer pinned) ====== */
.page-main.catalogue-page a.cat-card.is-link-card {
  background: var(--card-bg);
  color: var(--text-1);
  border: 1px solid var(--border-3);
  border-radius: var(--card-radius, 12px);
  box-shadow: none;
  text-decoration: none;

  display: grid !important;
  grid-template-columns: var(--cat-icon-size) 1fr;
  grid-template-rows: auto 1fr auto; /* header | grow | footer */
  align-items: start;
  min-height: 100%;
  padding: var(--card-pad-y) var(--card-pad-x);
  position: relative;
  overflow: hidden; /* keeps HRs inside rounded corners */
}
.page-main.catalogue-page a.cat-card.is-link-card * { color: inherit; }

/* Header row — icon + title on one line */
.page-main.catalogue-page a.cat-card.is-link-card .cat-icon {
  grid-column: 1; grid-row: 1;
  justify-self: start; align-self: center;
  width: var(--cat-icon-size); height: var(--cat-icon-size);
}
.page-main.catalogue-page a.cat-card.is-link-card .cat-icon img {
  box-sizing: border-box;
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  /* Small uniform inset to normalize “big” logos */
  padding: calc(var(--cat-icon-size) * .05);
}

.page-main.catalogue-page a.cat-card.is-link-card .cat-info { display: contents; }

.page-main.catalogue-page a.cat-card.is-link-card .cat-info > h2 {
  grid-column: 2; grid-row: 1;
  margin: 0;
  font-size: var(--cat-title-size);
  line-height: var(--cat-title-lh);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Content row (expands) */
.page-main.catalogue-page a.cat-card.is-link-card .cat-info > p,
.page-main.catalogue-page a.cat-card.is-link-card .cat-info > .cat-tags {
  grid-column: 1 / -1; grid-row: 2;
  margin: .5rem 0 0;
}
.page-main.catalogue-page a.cat-card.is-link-card .cat-info > p {
  font-size: var(--cat-body-size);
  line-height: var(--cat-body-lh);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden;
}
.page-main.catalogue-page a.cat-card.is-link-card .cat-tags {
  font-size: calc(var(--cat-body-size) * .95);
}

/* Footer row (always bottom) — price left, actions right */
.page-main.catalogue-page a.cat-card.is-link-card .cat-actions {
  grid-column: 1 / -1; grid-row: 3;
  border-top: var(--hr-thickness) solid var(--hr-color);
  padding-top: .5rem;
  display: flex; align-items: center; gap: .2rem; justify-content: flex-end;
}
.page-main.catalogue-page a.cat-card.is-link-card .cat-price {
  margin-right: auto;
  white-space: nowrap;
  font-weight: 600;
  font-size: var(--cat-body-size);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Icon-only buttons in footer */
.page-main.catalogue-page a.cat-card.is-link-card .btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; padding: .4rem;
}
.page-main.catalogue-page a.cat-card.is-link-card .btn .icon,
.page-main.catalogue-page a.cat-card.is-link-card .btn svg {
  width: 1.25rem; height: 1.25rem; display: block;
}

/* ====== Filter panel (compact, sticky on desktop) ====== */
.page-main .cat-filter-panel {
  background: var(--card-bg);
  color: var(--text-1);
  border: 1px solid var(--border-3);
  border-radius: var(--card-radius, 12px);
  font-size: var(--filter-body-size, var(--cat-body-size));
  line-height: 1.45;

  display: grid;
  grid-template-columns: 1fr;
  row-gap: .5rem;
  column-gap: .75rem;

  margin: 0;
  padding: 1rem .75rem .75rem;
  max-width: 95%;
  overflow-x: hidden;
}
.page-main .cat-filter-panel h2,
.page-main .cat-filter-panel h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--filter-title-size, var(--cat-title-size));
  line-height: 1.25;
  font-weight: 700;
}
.page-main .cat-filter-panel h3 {
  margin-top: .4rem; padding-top: .4rem;
  border-top: 1px solid var(--hr-color);
  font-weight: 600;
}
.page-main .cat-filter-panel .cat-filter-search {
  grid-column: 1 / -1;
  width: 100%; max-width: 100%;
  font-size: inherit; line-height: 1.3;
  padding: .35rem .5rem;
  border: 1px solid var(--hr-color);
  border-radius: .375rem;
  background: var(--surface-1, transparent);
  color: inherit;
}
.page-main .cat-filter-panel .cat-categories {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr;
  row-gap: .35rem;
}
.page-main .cat-filter-panel label {
  display: flex; align-items: center; gap: .4rem;
  -webkit-user-select: none;
  padding: .18rem 0; cursor: pointer; user-select: none;
  min-width: 0; overflow-wrap: anywhere; white-space: normal;
}
.page-main .cat-filter-panel input[type="checkbox"] {
  width: .95rem; height: .95rem; flex: 0 0 auto; accent-color: currentColor;
}
@media (min-width: 1024px) {
  .page-main .cat-filter-panel {
    position: sticky; top: 1rem;
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    border: 1px solid #60a5fa;
  }
}

/* ====== Misc ====== */
.catalogue-hide { display: none !important; }         /* JS filter */
.page-main.catalogue-page .cat-card .cat-price,
.page-main.catalogue-page .cat-card .cat-price * { white-space: nowrap; } /* no wrap */

/* v2025-10-06 — fix: restore visible card borders with safe fallbacks */
.page-main.catalogue-page {
  /* canonical token for hr/borders inside cards */
  --card-border: var(--border-3, #334155);
}

/* Cards: explicit blue outline; HRs keep neutral slate via token */
.page-main.catalogue-page a.cat-card.is-link-card {
  border: 1px solid #60a5fa !important;
}

.page-main.catalogue-page a.cat-card.is-link-card .cat-actions {
  border-top: 1px solid var(--card-border, #334155) !important;
}

/* (Optional safety if any earlier pseudo rules exist) */
.page-main.catalogue-page a.cat-card.is-link-card::before,
.page-main.catalogue-page a.cat-card.is-link-card::after {
  border-color: var(--card-border, #334155);
  background-color: var(--card-border, #334155);
}

/* End: Blue Canoe — Catalogue (FINAL) */

/* === /public/css/tutorials.css === */
/* Tutorials page header row */
#tuts .tuts-head {
  display: flex;
  justify-content: space-between;
  align-items: center;       /* fixes the “label sits low” issue */
  gap: 1rem;
  flex-wrap: wrap;           /* keeps it tidy on narrow widths */
}

/* Compact, aligned form */
#tuts .sort-form {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
}

#tuts .sort-form label {
  margin: 0;                 /* prevent baseline wobble */
}
/* Tutorials cards: make footer stick to bottom, align content */
#tuts .tutorials-index .cardx {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#tuts .tutorials-index .cardx-body h3 { margin: 0 0 .25rem 0; }
#tuts .tutorials-index .cardx-body p  { margin: 0; }

#tuts .tutorials-index .cardx-spacer { flex: 1 1 auto; }

#tuts .tutorials-index .cardx-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .5rem;
}

/* Bookmark button: small, unobtrusive */
#tuts .tutorials-index .bookmark {
  border: 1px solid var(--border, #d1d5db);
  background: transparent;
  border-radius: 999px;
  padding: .2rem .6rem;
  font: inherit;
  cursor: pointer;
}

#tuts .tutorials-index .bookmark[aria-pressed="true"] {
  /* a subtle “on” state */
  background: rgba(0,0,0,.04);
}
/* Tutorials sort dropdown (pure CSS) */
.sort-dropdown .dd {
  position: relative;
  display: inline-block;
}

/* Button (the summary) */
.sort-dropdown summary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border: 1px solid var(--border, #2b2b33);
  border-radius: .5rem;
  background: var(--card-bg, #131318);
  color: inherit;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  min-width: 18rem;            /* looks like a select */
}
.sort-dropdown summary::-webkit-details-marker { display: none; }
.sort-dropdown .dd-label { opacity: .7; }
.sort-dropdown .dd-value { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-dropdown .dd-caret { margin-left: .25rem; flex: 0 0 auto; opacity: .7; }

/* Menu panel */
.sort-dropdown .dd-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + .25rem);
  margin: 0;
  padding: .25rem 0;
  list-style: none;
  background: var(--card-bg, #131318);
  border: 1px solid var(--border, #2b2b33);
  border-radius: .5rem;
  min-width: 18rem;
  max-height: 50vh;
  overflow: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  z-index: 100;
}
.sort-dropdown .dd[open] .dd-menu { display: block; }

/* Menu items */
.sort-dropdown .dd-menu a {
  display: block;
  padding: .5rem .75rem;
  text-decoration: none;
  color: inherit;
  opacity: .9;
}
.sort-dropdown .dd-menu a:hover,
.sort-dropdown .dd-menu a:focus { opacity: 1; background: rgba(255,255,255,.04); }
.sort-dropdown .dd-menu a.active { font-weight: 600; }

/* Focus rings (a11y) */
.sort-dropdown summary:focus-visible,
.sort-dropdown .dd-menu a:focus-visible {
  outline: 2px solid #6ea8fe;         /* adjust to your focus color */
  outline-offset: 2px;
}

/* Optional: reduce motion */
@media (prefers-reduced-motion: reduce) {
  .sort-dropdown * { transition: none !important; }
}
/* Dropdown container & button */
.sort-dropdown .dd { position: relative; display: inline-block; }
.sort-dropdown summary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem;
  border: 1px solid var(--border, #2b2b33);
  border-radius: .5rem;
  background: var(--card-bg, #131318);
  -webkit-user-select: none;
  color: inherit; cursor: pointer; user-select: none;
  min-width: 18rem;
}
.sort-dropdown summary::-webkit-details-marker { display: none; }
.sort-dropdown .dd-label { opacity: .7; }
.sort-dropdown .dd-value { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Overlay menu (not in-flow) */
.sort-dropdown .dd-menu {
  position: absolute; /* <-- key line to prevent page reflow */
  right: 0; top: calc(100% + .25rem);
  display: none;
  margin: 0; padding: .25rem 0; list-style: none;
  background: var(--card-bg, #131318);
  border: 1px solid var(--border, #2b2b33);
  border-radius: .5rem;
  min-width: 18rem; max-height: 50vh; overflow: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  z-index: 100;
}
.sort-dropdown .dd[open] .dd-menu { display: block; }

/* Items */
.sort-dropdown .dd-menu a {
  display: block; padding: .5rem .75rem; text-decoration: none;
  color: inherit; opacity: .9;
}
.sort-dropdown .dd-menu a:hover, .sort-dropdown .dd-menu a:focus {
  opacity: 1; background: rgba(255,255,255,.04);
}
.sort-dropdown .dd-menu a.active { font-weight: 600; }

/* Optional: prevent clipping around the control */
.tuts-head { overflow: visible; }

/* ---------- Tutorials: Sort dropdown (clear visual) ---------- */
:root {
  /* Fallbacks; keep your existing vars if defined elsewhere */
  --card-bg: #131318;
/*  --border:  #2b2b33; */
  --brand:   #6ea8fe;
  --dropdown-bg: #0e0e14;             /* darker than card for contrast */
  --dropdown-border: #3a3a45;         /* slightly brighter edge */
  --dropdown-hover: rgba(255,255,255,.06);
  --dropdown-shadow:
    0 14px 40px rgba(0,0,0,.55),
    0 2px 8px rgba(0,0,0,.35);
}

.tuts-head { 
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem; 
  overflow: visible;                 /* don't clip the overlay menu */
}

/* Container */
.sort-dropdown .dd { position: relative; display: inline-block; z-index: 10; }

/* Button (summary) — make it look like a control */
.sort-dropdown summary {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .55rem .8rem;
  min-width: 18rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.04)) , var(--card-bg);
  color: inherit;
  -webkit-user-select: none;
 cursor: pointer; user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.sort-dropdown summary::-webkit-details-marker { display: none; }
.sort-dropdown summary:hover { border-color: var(--dropdown-border); }
.sort-dropdown summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Label & current value */
.sort-dropdown .dd-label { opacity: .75; font-weight: 500; }
.sort-dropdown .dd-value { 
  flex: 1 1 auto; 
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: .95;
}

/* Caret + open state */
.sort-dropdown .dd-caret { width: 14px; height: 14px; opacity: .75; transition: transform .15s ease; }
.sort-dropdown .dd[open] .dd-caret { transform: rotate(180deg); }

/* Menu panel — overlay (no reflow) */
.sort-dropdown .dd-menu {
  position: absolute; right: 0; top: calc(100% + .35rem);
  display: none;
  margin: 0; padding: .35rem 0; list-style: none;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: .6rem;
  min-width: 22rem;
  max-height: 55vh; overflow: auto;
  box-shadow: var(--dropdown-shadow);
}
.sort-dropdown .dd[open] .dd-menu { display: block; }

/* Items */
.sort-dropdown .dd-menu li + li { border-top: 1px solid rgba(255,255,255,.06); }
.sort-dropdown .dd-menu a {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .85rem;
  text-decoration: none; color: inherit;
  opacity: .9; transition: background .12s ease, opacity .12s ease;
}
.sort-dropdown .dd-menu a:hover,
.sort-dropdown .dd-menu a:focus { 
  background: var(--dropdown-hover); opacity: 1; 
}
.sort-dropdown .dd-menu a.active {
  font-weight: 600; opacity: 1;
}
.sort-dropdown .dd-menu a.active::before {
  content: "✓"; opacity: .9; font-size: .9rem;
}

/* Optional: subtle separation from results below */
.sort-dropdown { margin-bottom: .5rem; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sort-dropdown * { transition: none !important; }
}
/* ---------- Tutorials: content body polish ---------- */
.doc-body,
.doc-body * {
  white-space: normal;
  overflow-wrap: anywhere;     /* wrap long URLs/words */
  word-break: normal;
}

/* Headings */
.doc-body h1, .doc-body h2, .doc-body h3,
.doc-body h4, .doc-body h5, .doc-body h6 {
  line-height: 1.25;
  margin: 1.2rem 0 .6rem;
}
.doc-body h1 { font-size: 1.6rem; }
.doc-body h2 { font-size: 1.35rem; }
.doc-body h3 { font-size: 1.2rem; }
.doc-body h4 { font-size: 1.05rem; }
.doc-body h5, .doc-body h6 { font-size: 1rem; opacity: .95; }

/* Paragraphs & spacing */
.doc-body p { margin: .6rem 0; }
.doc-body > *:first-child { margin-top: 0; }
.doc-body > *:last-child { margin-bottom: 0; }

/* Lists */
.doc-body ul, .doc-body ol { margin: .6rem 0 .6rem 1.25rem; }
.doc-body ul { list-style: disc; }
.doc-body ul ul { list-style: circle; }
.doc-body ol { list-style: decimal; }
.doc-body li { margin: .25rem 0; }
.doc-body li > p { margin: .25rem 0; }

/* Links */
.doc-body a { text-decoration: underline; text-underline-offset: 2px; }
.doc-body a:hover, .doc-body a:focus { opacity: 1; }

/* Code & pre */
:root {
  --code-bg: rgba(255,255,255,.04);
  --code-border: rgba(255,255,255,.08);
}
.doc-body code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: .35rem;
  padding: .05rem .35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95em;
}
.doc-body pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: .5rem;
  padding: .75rem;
  overflow: auto;               /* horizontal scroll if needed */
  tab-size: 2;
  line-height: 1.4;
  margin: .8rem 0;
}
.doc-body pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

/* Blockquotes */
.doc-body blockquote {
  margin: .8rem 0;
  padding: .6rem .9rem;
  border-left: 3px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.03);
  border-radius: .25rem;
}

/* Tables */
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: .8rem 0;
  display: block;               /* allow overflow */
  overflow-x: auto;
}
.doc-body th, .doc-body td {
  border: 1px solid rgba(255,255,255,.12);
  padding: .5rem .6rem;
  vertical-align: top;
}
.doc-body th { text-align: left; background: rgba(255,255,255,.04); }

/* Images & media */
.doc-body img, .doc-body video, .doc-body svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: .6rem 0;
}

/* Horizontal rule */
.doc-body hr {
  border: 0;
  border-top: 1px solid rgba(255,255,255,.12);
  margin: 1rem 0;
}

/* KBD (keyboard) */
.doc-body kbd {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-bottom-width: 2px;
  border-radius: .35rem;
  padding: .1rem .35rem;
  font-size: .9em;
}

/* Keep dropdown distinct from content below */
.sort-dropdown { margin-bottom: .75rem; }
/* ===== Tutorials page scoped styles (no bleed) ===== */
.tutorials-index .muted{color:var(--text-muted,#6b7280);font-size:.9rem}

/* Grid: equal height per row, responsive columns */
.tutorials-index .grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:1rem;
}

/* Card look */
.tutorials-index .cardx{
  border:1px solid var(--card-border);
  border-radius:.25rem;
  background:var(--card-bg);
  padding:1rem;
  height:100%;
  box-shadow:0 1px 2px rgba(0,0,0,.04); /* subtle lift */
}

/* Title & link */
.tutorials-index .cardx h3{
  margin:.2rem 0 .5rem 0;
  font-size:1rem; line-height:1.3;
}

/* Make the whole card a vertical flex column so the date anchors to bottom */
.tutorials-index .cardx a{
  text-decoration:none;
  display:flex;
  flex-direction:column;
  height:100%;
}

/* If there’s a summary, this spacer pushes the “Updated …” to bottom */
.tutorials-index .cardx .spacer{ flex:1 1 auto; }

/* Controls */
.tutorials-index .controls{
  display:flex; justify-content:flex-end; align-items:center;
  gap:.5rem; margin:1rem 0;
}
.tutorials-index .controls label{ font-size:.9rem }
.tutorials-index .controls select{
  padding:.375rem .5rem; border-radius:8px;
  border:1px solid var(--border,#d1d5db);
  background:var(--card-bg,#fff);
}

/* Dark mode */
@media (prefers-color-scheme: dark){
  .tutorials-index .muted{color:#9ca3af}
  .tutorials-index .cardx{background:#111827;border-color:var(--card-border)}
  .tutorials-index .controls select{background:#0b1220;border-color:#374151;color:#e5e7eb}
}
/* Tutorials — force proper grid + gaps in all modes (default + sorted) */
#tuts .tutorials-index > .grid.grid-3 {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 1rem !important; /* row + column gap */
}

/* Responsive columns */
@media (min-width: 640px) {
  #tuts .tutorials-index > .grid.grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  #tuts .tutorials-index > .grid.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Prevent margin-based spacing from fighting grid gap */
#tuts .tutorials-index article.cardx { margin: 0; }

/* A touch of space under the section heading when Featured shows */
#tuts .tutorials-index > h2 { margin: 0 0 .5rem; }
/* ===================================================================
   Tutorials (FINAL, scoped)
   - Forces grid + gaps on both grids (Featured + Rest) in Pinned view
   - Works identically in other sort modes (single grid)
   - Removes duplicate dropdown rules / margin fights
   =================================================================== */

/* Header row */
#tuts .tuts-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
  overflow: visible; /* dropdown menu won't clip */
}

/* Sort dropdown (single, tidy version) */
#tuts .sort-dropdown .dd { position: relative; display: inline-block; z-index: 10; }
#tuts .sort-dropdown summary {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .55rem .8rem; min-width: 18rem;
  border: 1px solid var(--border, #2b2b33);
  border-radius: .6rem;
  background: var(--card-bg, #131318);
  -webkit-user-select: none;
  color: inherit; cursor: pointer; user-select: none;
}
#tuts .sort-dropdown summary::-webkit-details-marker { display: none; }
#tuts .sort-dropdown .dd-label { opacity: .75; font-weight: 500; }
#tuts .sort-dropdown .dd-value { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tuts .sort-dropdown .dd-caret { width: 14px; height: 14px; opacity: .75; transition: transform .15s ease; }
#tuts .sort-dropdown .dd[open] .dd-caret { transform: rotate(180deg); }

#tuts .sort-dropdown .dd-menu {
  position: absolute; right: 0; top: calc(100% + .35rem);
  display: none; margin: 0; padding: .35rem 0; list-style: none;
  background: var(--card-bg, #131318);
  border: 1px solid var(--border, #2b2b33);
  border-radius: .6rem;
  min-width: 22rem; max-height: 55vh; overflow: auto;
  box-shadow: 0 14px 40px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.35);
}
#tuts .sort-dropdown .dd[open] .dd-menu { display: block; }
#tuts .sort-dropdown .dd-menu li + li { border-top: 1px solid rgba(255,255,255,.06); }
#tuts .sort-dropdown .dd-menu a {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .85rem; text-decoration: none; color: inherit; opacity: .9;
}
#tuts .sort-dropdown .dd-menu a:hover, 
#tuts .sort-dropdown .dd-menu a:focus { background: rgba(255,255,255,.06); opacity: 1; }
#tuts .sort-dropdown .dd-menu a.active { font-weight: 600; opacity: 1; }

/* Grid: FORCE gaps on all grids under Tutorials (out-specific & !important) */
body .page-main .wrap.card.content#tuts .tutorials-index > .grid.grid-3 {
  display: grid !important;
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  row-gap: 1rem !important;
  column-gap: 1rem !important;
}

/* Responsive columns */
@media (min-width: 640px) {
  body .page-main .wrap.card.content#tuts .tutorials-index > .grid.grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  body .page-main .wrap.card.content#tuts .tutorials-index > .grid.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Space between the two grids in Pinned view */
#tuts .tutorials-index > .grid.grid-3 + .grid.grid-3 { margin-top: 1rem; }

/* Cards: equal height & tidy footer */
#tuts .tutorials-index .cardx {
  display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--card-border, #334155);
  border-radius: .25rem; background: var(--card-bg, #111827);
  padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.04);
  margin: 0 !important; /* avoid margin vs grid-gap fights */
}
#tuts .tutorials-index .cardx-body h3 { margin: 0 0 .35rem; font-size: 1rem; line-height: 1.3; }
#tuts .tutorials-index .cardx-body p  { margin: 0; }
#tuts .tutorials-index .cardx-spacer { flex: 1 1 auto; }
#tuts .tutorials-index .cardx-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-top: .5rem;
}

/* Bookmark button */
#tuts .tutorials-index .bookmark {
  border: 1px solid var(--border, #374151);
  background: transparent; color: inherit;
  border-radius: 999px; padding: .2rem .6rem; font: inherit; cursor: pointer;
}
#tuts .tutorials-index .bookmark[aria-pressed="true"] { background: rgba(255,255,255,.06); }


/* === /public/css/showcase.css === */
/* === Showcase (2×3) — all classes prefixed with .showcase === */
.showcase { padding: 1.25rem; }
.showcase-title { margin: 0 0 .75rem; font-size: 1.25rem; font-weight: lighter; }

.showcase-grid { display: grid; gap: 1rem; }
.showcase-row { 
  display: grid; 
  grid-template-columns: repeat(3, minmax(0, 1fr)); 
  gap: 1rem; 
  align-items: stretch;
}

.showcase-tile.card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: .45rem;
  min-height: 220px;          /* prevents layout jump on swap */
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease;
}
.showcase-tile.card:hover { transform: translateY(-2px); }

.showcase-icon { 
  width: 38px; height: 38px; opacity: .9; 
  background-repeat: no-repeat; background-position: center; background-size: contain; 
}
.showcase-h3 { margin: .15rem 0 0; font-size: 1.05rem; font-weight: 600; }
.showcase-blurb { margin: .35rem 0 0; line-height: 1.35; opacity: .9; }

/* CTA bar */
.showcase-ctabar { 
  display: flex; gap: .75rem; justify-content: center; 
  margin-top: 1rem; 
}

/* Fade cycle (applied per tile on swap) */
.showcase-row .is-fade-out { opacity: 0; transform: translateY(4px); }
.showcase-row .is-fade-in  { opacity: 1; transform: translateY(0); }
.showcase-row .showcase-tile { 
  opacity: 1; transform: translateY(0); 
  transition: opacity 260ms ease, transform 260ms ease;
}

/* Grid responsiveness */
@media (max-width: 900px) {
  .showcase-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .showcase-row { grid-template-columns: 1fr; }
  .showcase-tile.card { min-height: 180px; }
}

/* Respect reduced motion: no transitions, everything static */
@media (prefers-reduced-motion: reduce) {
  .showcase-row .showcase-tile { transition: none; }
}
.showcase-tile.card{display:grid;grid-template-rows:auto 1fr;min-height:240px}
.showcase-head{display:flex;align-items:center;gap:.55rem;min-height:34px}
.showcase-icon{width:22px;height:22px;aspect-ratio:1/1;object-fit:contain;flex:0 0 22px;opacity:.92}
.showcase-h3{margin:0;font-size:1.05rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.showcase-blurb{margin:0;line-height:1.35;opacity:.9;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.showcase-row .showcase-tile{transition:opacity 320ms ease,transform 320ms ease}
/* --- Pixelated fade (CSS mask), scoped to showcase only --- */
/* 1) Default: keep your current smooth fade as a fallback (already present) */

/* 2) Enhanced: blocky/pixelated dissolve using CSS mask (Blink/WebKit) */
@supports (-webkit-mask-image: linear-gradient(#000, #000)) or (mask-image: linear-gradient(#000, #000)) {
  .showcase-row .is-fade-out {
    /* Checkerboard grid mask: two orthogonal gradients repeated */
    -webkit-mask-image:
      linear-gradient(90deg, #000 50%, transparent 0) 0 0 / var(--px, 8px) var(--px, 8px) repeat,
      linear-gradient(    #000 50%, transparent 0) 0 0 / var(--px, 8px) var(--px, 8px) repeat;
            mask-image:
      linear-gradient(90deg, #000 50%, transparent 0) 0 0 / var(--px, 8px) var(--px, 8px) repeat,
      linear-gradient(    #000 50%, transparent 0) 0 0 / var(--px, 8px) var(--px, 8px) repeat;

    /* Composite so the two masks combine as a grid */

    /* Spec syntax (FF 113+): multiple layers combine by default; leave as-is */

    /* Animate the “pixel size” upward while fading */
    animation: showcase-pix-fade var(--pix-dur, 360ms) steps(4, end) forwards;
  }

  /* Slightly slower “calm” variant for the in-phase fade */
  .showcase-row .is-fade-in {
    animation: showcase-pix-in var(--pix-dur-in, 360ms) steps(4, end) forwards;
  }

  @keyframes showcase-pix-fade {
    0%   { opacity: 1; --px: 8px;  transform: translateY(0); }
    100% { opacity: 0; --px: 28px; transform: translateY(4px); }
  }
  @keyframes showcase-pix-in {
    0%   { opacity: 0; --px: 28px; transform: translateY(4px); }
    100% { opacity: 1; --px: 8px;  transform: translateY(0); }
  }
}
/* Border + padding inside each tile (keeps equal height) */
.showcase-tile.card {
  /* use your site tokens if you have them */
  border: 1px solid var(--border-color, rgba(255,255,255,.10));
  border-radius: var(--radius-lg, 14px);
  padding: 14px 16px;                 /* internal space */
  background: linear-gradient(180deg, var(--card, #0f1217), var(--card-2, #0c0f14));
}

/* Subtle hover/focus lift + border accent */
.showcase-tile.card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong, rgba(255,255,255,.18));
}
.showcase-tile.card:focus-visible {
  outline: 2px solid var(--focus, #79b3ff);
  outline-offset: 2px;
}

/* Title row + content spacing */
.showcase-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 34px;
  margin-bottom: .35rem;              /* space before blurb */
}

.showcase-icon {
  width: 22px; height: 22px; aspect-ratio: 1 / 1;
  object-fit: contain; flex: 0 0 22px;
  opacity: .92;
}

/* Keep one-line title, tidy */
.showcase-h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* (If you want a hairline divider instead of pure spacing, swap this in)
.showcase-head { margin-bottom: .25rem; padding-bottom: .25rem; border-bottom: 1px solid rgba(255,255,255,.06); }
*/
/* Force out any legacy background set earlier */
.showcase .showcase-icon {
  background: none !important;
}
/* ------- Tile structure: add footer row, equal height stays tidy ------- */
.showcase-tile.card {
  display: grid;
  grid-template-rows: auto 1fr auto;   /* head | blurb | foot */
  gap: .55rem;
  min-height: 260px;                   /* a touch taller to fit price line */
  padding: 14px 16px;
  border: 1.5px solid #60a5fa;
  border-radius: var(--radius-lg, 8px);
  background: linear-gradient(180deg, var(--card, #0f1217), var(--card-2, #0c0f14));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  /* subtle inner outline at rest */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

/* Hover/focus lift + slightly stronger outline */
.showcase-tile.card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong, rgba(255,255,255,.18));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 6px 18px rgba(0,0,0,.2);
}
.showcase-tile.card:focus-visible {
  outline: 2px solid var(--focus, #79b3ff);
  outline-offset: 2px;
}

/* Head row: icon + title on one line */
.showcase-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 34px;
  margin-bottom: .25rem; /* breathing space before blurb */
}

/* Icon sizing — larger by default, with exceptions */
.showcase .showcase-icon {
  width: 26px; height: 26px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex: 0 0 26px;
  opacity: .92;
  background: none !important; /* kill any legacy bg to avoid “double” icons */
}

/* Exceptions that should NOT be oversized (match slug in src) */
.showcase .showcase-icon[src*="google"],
.showcase .showcase-icon[src*="m365"],
.showcase .showcase-icon[src*="microsoft-365"],
.showcase .showcase-icon[src*="wordpress"],
.showcase .showcase-icon[src*="wp-"] {
  width: 22px; height: 22px; flex-basis: 22px;
}

/* Title: one line for tidy grids */
.showcase-h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Blurb: clamp to 3 lines */
.showcase-blurb {
  margin: 0;
  line-height: 1.35;
  opacity: .9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer: price line */
.showcase-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .35rem;
  border-top: 1px solid rgba(255,255,255,.06);
  min-height: 28px;
}
.showcase-price {
  font-size: .9rem;
  color: var(--muted, #cfd6e6);
  letter-spacing: .1px;
}

/* Pixelated fade fix (keep your effect, removed composite warning) */
@supports (-webkit-mask-image: linear-gradient(#000, #000)) or (mask-image: linear-gradient(#000, #000)) {
  .showcase-row .is-fade-out {
    -webkit-mask-image:
      linear-gradient(90deg, #000 50%, transparent 0) 0 0 / var(--px, 8px) var(--px, 8px) repeat,
      linear-gradient(    #000 50%, transparent 0) 0 0 / var(--px, 8px) var(--px, 8px) repeat;
            mask-image:
      linear-gradient(90deg, #000 50%, transparent 0) 0 0 / var(--px, 8px) var(--px, 8px) repeat,
      linear-gradient(    #000 50%, transparent 0) 0 0 / var(--px, 8px) var(--px, 8px) repeat;
    animation: showcase-pix-fade var(--pix-dur, 360ms) steps(4, end) forwards;
  }
  .showcase-row .is-fade-in  { animation: showcase-pix-in var(--pix-dur-in, 360ms) steps(4, end) forwards; }
  @keyframes showcase-pix-fade { 0% {opacity:1;--px:8px;transform:translateY(0)} 100% {opacity:0;--px:28px;transform:translateY(4px)} }
  @keyframes showcase-pix-in   { 0% {opacity:0;--px:28px;transform:translateY(4px)} 100% {opacity:1;--px:8px;transform:translateY(0)} }
}
.hero.card { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero.card > *:not(.hero-bg) { position: relative; z-index: 1; }

/* === /public/css/home.css === */
/* home.css — styling for homepage grid and promo highlights */

.home-intro {
  margin-bottom: 2rem;
}

.home-grid-card {
  margin-top: 2rem;
}

.home-grid-wrap {
  padding: 1rem 0;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.home-grid-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  position: relative;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  opacity: 1;
  min-height: 280px;
}

.home-grid-tile:hover {
  transform: translateY(-4px);
}

.home-grid-tile.removing {
  opacity: 0;
  pointer-events: none;
}

.home-grid-tile.special {
  background: var(--bg-special, #f4faff);
  border-color: var(--accent-color);
}

.home-grid-icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
  filter: var(--icon-filter);
}

.home-grid-tile.special .home-grid-icon img {
  filter: none;
}

.home-grid-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.home-grid-price {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.home-grid-price-special {
  color: var(--accent-color);
  font-weight: bold;
}

.home-grid-price-old {
  text-decoration: line-through;
  margin-left: 0.5rem;
  opacity: 0.6;
}

.home-grid-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.25rem;
}

.home-grid-special-dates {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.home-grid-ribbon {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--accent-color);
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.home-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

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

body.dark .home-grid-tile.special {
  background: #10222e;
  border-color: var(--accent-color);
}

body.dark .home-grid-price-old,
body.dark .home-grid-desc,
body.dark .home-grid-special-dates {
  color: var(--text-muted-dark, #aaa);
}
/* Two-column newspaper intro (additive; no grid overrides) */
.intro-title { margin: 0 0 1rem; font-size: 1.5rem; line-height: 1.2; }

.intro-columns {
  column-count: 2;
  column-gap: 2.5rem;
}

.intro-col {
  break-inside: avoid;
  text-align: justify;
  /* Optional polish; safe to omit if any browser looks odd */
  text-align-last: justify;
}

.intro-col p { margin: 0 0 1rem; }

/* Collapse to single column on small screens (kept distinct from your grid MQ) */
@media (max-width: 800px) {
  .intro-columns { column-count: 1; }
}
/* Two-column newspaper intro (additive; no grid overrides) */
.intro-title { margin: 0 0 1rem; font-size: 1.5rem; line-height: 1.2; }

.intro-columns {
  column-count: 2;
  column-gap: 2.5rem;
}

.intro-col {
  break-inside: avoid;
  text-align: justify;
  /* Optional polish; safe to omit if any browser looks odd */
  text-align-last: left;
}

.intro-col p { margin: 0 0 1rem; }

/* Collapse to single column on small screens (kept distinct from your grid MQ) */
@media (max-width: 800px) {
  .intro-columns { column-count: 1; }
}

/* === /public/css/logo.css === */
/* === Blue Canoe header logo — final, conflict-free === */

/* link wrapper */
.site-logo .brand {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

/* core vars & defaults (set your mask source on --logo) */
.site-logo{
  --logo: url('/public/branding/blue-canoe-logo-mask-solid.svg'); /* or data: URI */
  --logo-color: #4fa3ff;
  --tile-duration: 600ms;
  --stagger: 60ms;
  --scale-duration: 240ms;
  --start-scale: 1.06;
  --end-scale: 1;
  display: inline-block;
}

/* size & staging area */
.site-logo .brand-logo{
  display: block;                 /* span must be block-ish to size */
  height: 40px;                   /* adjust 32–48px to taste */
  aspect-ratio: 130.65 / 117.06;  /* your SVG viewBox ratio */
  position: relative;
  transform-origin: center;
  transform: scale(var(--start-scale));
  animation: site-logo-snap var(--scale-duration) ease-out
             calc(var(--tile-duration) + (15 * var(--stagger))) forwards;
}

/* tile grid (on bottom) */
.site-logo .tiles{
  position: absolute; inset: 0; z-index: 0;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  grid-template-rows: repeat(4,1fr);
  animation: site-logo-tiles-fade 250ms ease-out
             calc(var(--tile-duration) + (15 * var(--stagger)) + var(--scale-duration)) forwards;
}

/* tiles: masked slices with staggered reveal */
.site-logo .tile{
  background-color: var(--logo-color);
  /* explicit mask props — more robust than shorthand */
  -webkit-mask-image: var(--logo);        mask-image: var(--logo);
  -webkit-mask-repeat: no-repeat;         mask-repeat: no-repeat;
  -webkit-mask-size: 401% 401%;           mask-size: 401% 401%;
  -webkit-mask-position: calc(var(--x)*33.333%) calc(var(--y)*33.333%);
          mask-position: calc(var(--x)*33.333%) calc(var(--y)*33.333%);

  opacity: 0;
  clip-path: inset(50% 50% 50% 50%);
  transform: scale(0.94);
  animation: site-logo-reveal var(--tile-duration) cubic-bezier(.17,.67,.27,1.15) both;
  animation-delay: calc(var(--stagger) * var(--i));
}

/* final full logo layer (on top): fade in and STAY */
.site-logo .complete-logo{
  position: absolute; inset: 0; z-index: 1;
  background-color: var(--logo-color);
  -webkit-mask-image: var(--logo);        mask-image: var(--logo);
  -webkit-mask-repeat: no-repeat;         mask-repeat: no-repeat;
  -webkit-mask-size: contain;             mask-size: contain;
  -webkit-mask-position: center;          mask-position: center;

  opacity: 0;
  animation-name: site-logo-fade;
  animation-duration: 300ms;
  animation-timing-function: ease-out;
  animation-delay: calc(var(--tile-duration) + (15 * var(--stagger)));
  animation-fill-mode: forwards;          /* ← keep opacity:1 after fade-in */
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .site-logo .tile{ animation: none; opacity: 0; }
  .site-logo .complete-logo{ animation: none; opacity: 1; }
  .site-logo .brand-logo{ animation: none; transform: none; }
}

/* keyframes */
@keyframes site-logo-reveal{
  0%   { opacity: 0; clip-path: inset(50% 50% 50% 50% round 10px); transform: scale(0.94); }
  60%  { opacity: 1; }
  100% { opacity: 1; clip-path: inset(0 0 0 0); transform: scale(1); }
}
@keyframes site-logo-snap  { from { transform: scale(var(--start-scale)); } to { transform: scale(var(--end-scale)); } }
@keyframes site-logo-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes site-logo-tiles-fade { to { opacity: 0; } }
/* === Enable breathe + add speed controls === */

/* 1) Timing knobs (tweak to taste) */
.site-logo{
  /* Build speed (tiles): increase to slow down the build */
  --tile-duration: 900ms;   /* was 600ms */
  --stagger: 90ms;          /* was 60ms */

  /* Snap/settle speed (brand-logo scale): increase to slow the snap */
  --scale-duration: 360ms;  /* was 240ms */

  /* Breathe loop (final logo, post-build) */
  --breathe-duration: 9s;   /* longer = slower breathing */
  --breathe-scale: 1.04;    /* how much it inflates */

  /* helper for breathe delay */
  --reveal-total: calc(var(--tile-duration) + (15 * var(--stagger)));
  --breathe-delay: calc(var(--reveal-total) + var(--scale-duration));
}

/* 2) Run breathe on the final layer after fade-in */
.site-logo .complete-logo{
  /* keep your existing fade-in… then breathe forever */
  animation:
    site-logo-fade 300ms ease-out calc(var(--tile-duration) + (15 * var(--stagger))) forwards,
    site-logo-breathe var(--breathe-duration) ease-in-out var(--breathe-delay) infinite;
  transform-origin: center; /* for smooth scaling */
}

/* 3) Breathe keyframes */
@keyframes site-logo-breathe{
  0%   { transform: scale(1); }
  50%  { transform: scale(var(--breathe-scale)); }
  100% { transform: scale(1); }
}

/* Respect reduced motion: stop the loop if the user prefers less motion */
@media (prefers-reduced-motion: reduce){
  .site-logo .complete-logo{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
/* ---- Force fade THEN breathe on the final layer ---- */
/* knobs: bump --breathe-scale and shorten duration so it's obvious first */
.site-logo{
  --breathe-duration: 4s;  /* temp: faster so you can see it */
  --breathe-scale: 1.08;   /* temp: bigger so it’s obvious */
  --reveal-total: calc(var(--tile-duration) + (15 * var(--stagger)));
}

.site-logo .complete-logo{
  transform-origin: center;
  /* make sure mask props are explicit (robust across engines) */
  -webkit-mask-image: var(--logo);        mask-image: var(--logo);
  -webkit-mask-repeat: no-repeat;         mask-repeat: no-repeat;
  -webkit-mask-size: contain;             mask-size: contain;
  -webkit-mask-position: center;          mask-position: center;

  /* START hidden (fade will bring it in) */
  opacity: 0;

  /* EXPLICIT MULTI-ANIMATION (lists): */
  animation-name:            site-logo-fade,      site-logo-breathe !important;
  animation-duration:        300ms,               var(--breathe-duration) !important;
  animation-timing-function: ease-out,            ease-in-out !important;
  animation-delay:           calc(var(--reveal-total)), calc(var(--reveal-total) + var(--scale-duration)) !important;
  animation-iteration-count: 1,                   infinite !important;
  animation-fill-mode:       forwards,            none !important; /* keep fade result; breathe loops */
}

/* Breathe keyframes (in case earlier ones got overridden) */
@keyframes site-logo-breathe{
  0%   { transform: scale(1); }
  50%  { transform: scale(var(--breathe-scale)); }
  100% { transform: scale(1); }
}

/* Shimmer overlay after build */
.site-logo .complete-logo::after{
  content:"";
  position:absolute; inset:0; pointer-events:none;
  background-image: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.18) 35%, transparent 50%);
  background-size: 200% 100%;
  mix-blend-mode: screen; /* subtle lightening */
  opacity: 0;             /* stays hidden until post-build */
  /* apply the SAME mask so the sweep is clipped to the logo */
  -webkit-mask-image: var(--logo);        mask-image: var(--logo);
  -webkit-mask-repeat: no-repeat;         mask-repeat: no-repeat;
  -webkit-mask-size: contain;             mask-size: contain;
  -webkit-mask-position: center;          mask-position: center;

  animation:
    logo-shimmer-enter 300ms ease-out calc(var(--reveal-total)) forwards,
    logo-shimmer-move  4.5s  linear   calc(var(--reveal-total) + 300ms) infinite;
}

@keyframes logo-shimmer-enter { to { opacity: .8; } }  /* peak brightness; blend keeps it tasteful */
@keyframes logo-shimmer-move  { to { background-position: 200% 0; } }

@media (prefers-reduced-motion: reduce){
  .site-logo .complete-logo::after{ display:none; }
}
/* CSP-safe tile variable mapping */
.tiles .tile:nth-child(1)  { --x:0; --y:0; --i:0;  }
.tiles .tile:nth-child(2)  { --x:1; --y:0; --i:1;  }
.tiles .tile:nth-child(3)  { --x:2; --y:0; --i:2;  }
.tiles .tile:nth-child(4)  { --x:3; --y:0; --i:3;  }
.tiles .tile:nth-child(5)  { --x:0; --y:1; --i:4;  }
.tiles .tile:nth-child(6)  { --x:1; --y:1; --i:5;  }
.tiles .tile:nth-child(7)  { --x:2; --y:1; --i:6;  }
.tiles .tile:nth-child(8)  { --x:3; --y:1; --i:7;  }
.tiles .tile:nth-child(9)  { --x:0; --y:2; --i:8;  }
.tiles .tile:nth-child(10) { --x:1; --y:2; --i:9;  }
.tiles .tile:nth-child(11) { --x:2; --y:2; --i:10; }
.tiles .tile:nth-child(12) { --x:3; --y:2; --i:11; }
.tiles .tile:nth-child(13) { --x:0; --y:3; --i:12; }
.tiles .tile:nth-child(14) { --x:1; --y:3; --i:13; }
.tiles .tile:nth-child(15) { --x:2; --y:3; --i:14; }
.tiles .tile:nth-child(16) { --x:3; --y:3; --i:15; }

