  :root{
    --gap: 40px;                   /* equal margin from all sides */
    --border-width: 2px;
    --border-color: #A9B3A7;
    --radius: 20px;
    --outer-bg: #f0f0f0;

    --card-border: #d2cfc0;
    --card-radius: 12px;
    --card-pad: 14px;
    --card-gap: 20px;
    --text: #0D0D0C;
    --accent: #B0B090;
	--float-gap: 0.8rem;  /* tweak to taste gap between side of image and wraping text..*/
  }

  html, body {
    height: 100%;
    margin: 0;

    /* Background pattern */
    background: url("pattern.png") repeat;
    /* optional: scale the pattern */
    background-size: 30px 15px;

    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  }
  
  /* Fixed inset frame */
  .page {
    position: fixed;
    top:    calc(var(--gap) + env(safe-area-inset-top));
    right:  calc(var(--gap) + env(safe-area-inset-right));
    bottom: calc(var(--gap) + env(safe-area-inset-bottom));
    left:   calc(var(--gap) + env(safe-area-inset-left));
    background: #fff;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: auto;                /* scroll inside if content too tall */
    padding: 2rem;

    /* Typography base */
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
  }

  h1 { margin: 0 0 0.5em; color: var(--accent); font-size: 2em; }
  h2 { margin: 1.25em 0 0.5em; color: var(--accent); font-size: 1.5em; }
  h3 { margin: 1em 0 0.4em; color: var(--accent); font-size: 1.2em; }

  /* Vertical stacking of rows */
  .stack {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
  }

  /* Columns row */
  .columns {
    display: flex;
    gap: var(--card-gap);
    align-items: stretch;   /* equal heights */
    flex-wrap: wrap;        /* allow wrap on small screens */
  }

  .col {
    flex: 1;                /* equal width columns */
    min-width: 280px;       /* prevent overly narrow columns */
    display: flex;          /* let the card stretch full height */
  }

  /* Framed text boxes (default = flex for easy vertical layout) */
  .card {
    flex: 1;
    padding: var(--card-pad);
    background: linear-gradient(#f9f9f9, #eeeeee);
    border-radius: var(--card-radius);
    border: 2px solid var(--card-border);
    box-shadow:
      0 0 6px rgba(255, 255, 255, 0.5),
      inset 0 0 6px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
  }

  /* Opt-in: enable text-wrapping images inside a card */
  .card-float {
    display: block; /* floats work inside block formatting context */
  }
  .card-float::after {
    content: "";
    display: block;
    clear: both;   /* contain floated image height */
  }

  /* Base: images inside cards are responsive */
  .card img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.5em 0;
  }

/* Make the sticky top bar a horizontal flex row */
.card.top-bar {
  display: flex;
  flex-direction: row;      /* <— switch from column to row */
  align-items: center;      /* vertically center stuff */
  justify-content: space-between;
  gap: 12px;
}

/* Logo sizing that ignores the generic .card img rules */
.card.top-bar img.logo {
  height: 30px;             /* fixed height */
  width: auto;              /* keep aspect ratio */
  flex: 0 0 auto;           /* don't stretch/shrink */
  align-self: center;       /* guard against stretch */
  max-width: none;          /* ignore any 100% caps */
  display: inline-block;    /* avoid block quirks */
}


/* A card that lays out as a 2-column row */
.card.file-row {
  display: grid;                           /* override the flex in .card */
  grid-template-columns: 260px 1fr;        /* left: thumb+link, right: description */
  gap: var(--card-gap);
  align-items: start;                      /* align tops nicely */
}

/* Left column: image + filename/link block */
.file-row .file-meta {
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
}

/* Right column: description text */
.file-row .file-desc {
  display: block;                           /* inherits card typography */
}

/* Thumbnail sizing that won’t fight your .card img rules */
.file-thumb {
  width: 50%;
  max-width: 240px;                         /* keeps it neat inside the 260px column */
  border-radius: 8px;
  display: block;
}

/* Make the whole left column clickable if you want */
.file-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;   /* matches your link vibe */
}

/* Stack on phones */
@media (max-width: 700px) {
  .card.file-row {
    grid-template-columns: 1fr;             /* stack */
  }
  .file-thumb {
    max-width: 100%;
  }
}

/* Special case: image-only file links with no underline */
a.clean-file-link,
a.clean-file-link:link,
a.clean-file-link:visited {
  border-bottom: none !important;   /* kill the dotted underline */
  text-decoration: none !important; /* just in case */
  display: inline-block;            /* keeps it neat */
}

a.clean-file-link:hover {
  border-bottom: none !important;   /* no underline on hover either */
  text-decoration: none !important;
  transform: scale(1.02);           /* tiny hover zoom for feedback */
  transition: transform 0.15s ease;
}





  /* Size presets (pick one), or set a custom max via --img-max */
  .img-sm { --img-max: 220px; }
  .img-md { --img-max: 320px; }
  .img-lg { --img-max: 480px; }
	/* Default responsive cap: smaller on phones, comfy on desktop */
	.img-cap       { --img-max: clamp(160px, 40vw, 420px); }

	/* For hero/banner images */
	.img-hero-cap  { --img-max: clamp(220px, 80vw, 900px); }

	/* For tiny thumb-style images */
	.img-tiny-cap  { --img-max: clamp(120px, 30vw, 240px); }

	/* For tiny thumb-style images */
	.img-tiny2-cap  { --img-max: clamp(80px, 30vw, 150px); }
	
  /* Respect a custom max width if provided; fall back to natural/100% */
  .img-sized {
    width: min(100%, var(--img-max, 100%));
    max-width: var(--img-max, 100%);
  }

  .card img.float-left  { margin: 0.2em var(--float-gap) 0.6em 0; }
  .card img.float-right { margin: 0.2em 0 0.6em var(--float-gap); }

  /* Float helpers: text wraps around image */
  .float-left  { float: left;  margin: 0.2em 1em 0.6em 0; }
  .float-right { float: right; margin: 0.2em 0 0.6em 1em; }

  /* On small screens, kill floats so images stack nicely */
  @media (max-width: 700px) {
    .float-left,
    .float-right {
      float: none;
      margin: 0.5em 0;
    }
  }

  /* Optional: make figures behave like block cards */
  figure.card { margin: 0; }
  
	/* Smooth scroll inside the framed container */
	.page { scroll-behavior: smooth; }

	/* Optional: highlight the target briefly when reached */
	:target { 
	  animation: highlight 1.2s ease-out;
	}
	@keyframes highlight {
	  from { background: rgba(255, 246, 150, 0.9); }
	  to   { background: transparent; }
	}

	/* Cute inline link styling */
	.jump { text-decoration: none; border-bottom: 1px dotted currentColor; }
	.jump:hover { border-bottom-style: solid; }

	.anchor {
	  display: block;
	  height: 0;              /* invisible */
	  visibility: hidden;     /* just to be sure */
	  position: relative;
	  top: -8px;              /* tweak: land a smidge above the heading */
	}

/* Button-like link */
a.btn,
a.btn:link,
a.btn:visited {
  display: inline-flex;            /* centers text nicely */
  align-items: center;
  justify-content: center;

  font-size: 16px;
  font-family: Arial, sans-serif;  /* or your site font */
  line-height: 1;
  padding: 10px 20px;
  margin-top: 15px;

  background-color: #A9B3A7;
  color: #0D0D0C;                  /* ensure visited stays same */
  border: 2px solid #ccc;
  border-radius: 6px;

  text-decoration: none;           /* kill underline */
  cursor: pointer;

  transition: background-color .15s ease, transform .03s ease;
}

a.btn:hover   { background-color: #B0B090; }


a.btn--active {
  background-color: #B0B090;
  border-color: #A9B3A7;
}

/* Accessibility focus ring */
a.btn:focus-visible {
  outline: 2px solid #4C7EFF;
  outline-offset: 2px;
}

/* Active/current page button — higher specificity */
a.btn.btn--active,
a.btn.btn--active:link,
a.btn.btn--active:visited {
  background-color: #B0B090;
  border-color: #A9B3A7;
}

/* Optional: keep hover consistent for the active one */
a.btn.btn--active:hover {
  background-color: #B0B090;
}


/* All links inside the framed page, except the .btn buttons */
.page a:not(.btn),
.page a:not(.btn):link,
.page a:not(.btn):visited {
  color: var(--border-color);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;   /* subtle underline */
}

.page a:not(.btn):hover {
  color: var(--accent);
  border-bottom-style: solid;               /* solid on hover */
}

.page a:not(.btn):active {
  color: var(--text);
}

/* Keyboard focus ring for accessibility */
.page a:not(.btn):focus-visible {
  outline: 2px solid #4C7EFF;
  outline-offset: 2px;
}

/* Non-sticky variant of the top-bar card */
.card.nonstick {
  background: #fff;
  border: 2px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-pad);
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.5),
    inset 0 0 6px rgba(0, 0, 0, 0.2);
  margin-bottom: var(--card-gap);
}


/* Sticky top "card" bar that stays visible while .page scrolls */
.top-bar {
  position: sticky;
  top: 0;                 /* sticks to the top inside .page */
  z-index: 5;             /* above other content */
  background: #fff;       /* ensure it doesn’t show pattern behind */
  border: 2px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-pad);
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.5),
    inset 0 0 6px rgba(0, 0, 0, 0.2);
  margin-bottom: var(--card-gap);
}

/* Optional: when scrolled, give it a subtle elevated shadow */
.top-bar.is-stuck {
  box-shadow:
    0 2px 10px rgba(0,0,0,0.08),
    inset 0 0 6px rgba(0,0,0,0.12);
}

/* Layout for the buttons inside the bar */
.top-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ===== Downloads list (scoped under .dl) ===== */
.card.dl { padding: var(--card-pad); }

.dl-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: var(--card-gap);
}

/* Logos row */
.dl-logos {
  display: flex;
  gap: 10px;
  align-items: center;
}
.dl-brand {
  height: 48px;           /* consistent, clean size */
  width: auto;
  border-radius: 6px;
}

/* Title/subtitle */
.dl-title h2 {
  margin: 0 0 4px 0;
  text-align: center;     /* matches old layout */
  color: var(--accent);
}
.dl-title .dl-sub {
  margin: 0;
  text-align: center;
  font-style: italic;
  color: #9fb9c8;
  font-size: 14px;
}

/* List rows */
.dl-list {
  display: grid;
  gap: 12px;
}
.dl-row {
  display: grid;
  grid-template-columns: 44px 1fr;   /* icon + text */
  gap: 12px;
  align-items: start;
  padding: 10px 8px;
  border-radius: 8px;
}

/* Clickable download icon (no underline) */
.dl-thumb {
  display: inline-block;
  text-decoration: none;
  border-bottom: none;
  line-height: 0;                 /* tight around the image */
  transition: transform .12s ease;
}
.dl-thumb img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 6px;
}
.dl-thumb:hover { transform: scale(1.05); }

/* Description block */
.dl-desc h3 {
  margin: 2px 0 4px 0;
  font-size: 1rem;
  color: var(--text);
}
.dl-desc p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

/* Stack nicely on small screens */
@media (max-width: 700px) {
  .dl-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .dl-logos { justify-content: center; }
}

/* ===== Top bar base ===== */
:root{
  --tb-h: 64px;              /* desktop height */
  --tb-h-m: 48px;            /* mobile height */
  --gap: 10px;
  --btn-h: 40px;
  --btn-h-m: 32px;
  --btn-px: 14px;
  --btn-px-m: 10px;
  --radius: 12px;
}

.topbar{
  position: sticky; top: 0; z-index: 9999;
  background: linear-gradient(180deg, #2f2f2f, #232323);
  color: #fff;
  padding-top: max(env(safe-area-inset-top), 0px);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.topbar__inner{
  height: var(--tb-h);
  display:flex; align-items:center; gap: var(--gap);
  padding: 0 clamp(10px, 3vw, 24px);
}
.brand{
  color:#fff; text-decoration:none; font-weight:700; letter-spacing:.5px;
  font-size: clamp(16px, 2.2vw, 20px);
}

/* ===== Nav + buttons ===== */
.nav{
  margin-left:auto;
  display:flex; align-items:center; gap: var(--gap);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  height: var(--btn-h);
  padding: 0 var(--btn-px);
  border-radius: var(--radius);
  border: 1px solid #3a3a3a;
  background: #3b3b3b;
  color: #f3f3f3; text-decoration:none;
  font-size: 14px; line-height: 1; white-space: nowrap;
  transition: transform .1s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ background:#4a4a4a; border-color:#565656; transform: translateY(-1px); }
.btn:active{ transform:none; }
.btn--primary{ background:#4c694c; border-color:#577257; }
.btn--primary:hover{ background:#597a59; }

/* Cart badge (smaller on mobile) */
.cart{ position: relative; padding-right: calc(var(--btn-px) + 18px); }
.badge{
  position:absolute; top:-6px; right:-6px;
  min-width: 20px; height: 20px;
  display:inline-flex; align-items:center; justify-content:center;
  padding:0 6px; border-radius: 999px;
  background: #B0B090; color:#1b1b1b; font-weight:700; font-size: 12px;
  border:1px solid #A9B3A7;
}

/* ===== Hamburger (hidden on desktop) ===== */
.nav-toggle{
  display:none;
  width:36px; height:36px;
  border-radius:10px; border:1px solid #3a3a3a;
  background:#343434; color:#fff;
  align-items:center; justify-content:center;
}
.nav-toggle__bar{
  width:18px; height:2px; background:#fff; position:relative; display:block;
}
.nav-toggle__bar::before, .nav-toggle__bar::after{
  content:""; position:absolute; left:0; width:18px; height:2px; background:#fff;
}
.nav-toggle__bar::before{ top:-6px; }
.nav-toggle__bar::after{ top:6px; }

.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;
}

/* ===== Mobile behavior ===== */
@media (max-width: 768px){
  :root{
    --tb-h: var(--tb-h-m);
    --btn-h: var(--btn-h-m);
    --btn-px: var(--btn-px-m);
    --radius: 10px;
  }

  /* Make everything smaller */
  .topbar__inner{ gap: 6px; }
  .btn{ font-size: 13px; }

  /* Show hamburger, hide nav by default */
  .nav-toggle{ display:inline-flex; margin-left:auto; }
  .nav{
    position: fixed; inset: calc(var(--tb-h) + env(safe-area-inset-top)) 0 auto 0;
    display: grid; gap: 8px;
    padding: 10px clamp(10px, 4vw, 16px);
    background: #1f1f1f; border-bottom: 1px solid #303030;
    transform: translateY(-110%); transition: transform .2s ease;
  }
  .topbar.nav-open .nav{ transform: translateY(0); }
  /* Make buttons a third-ish size by font + padding reduction */
  .btn{ height: 32px; padding: 0 10px; }
  .badge{ min-width: 18px; height: 18px; font-size: 11px; top:-5px; right:-5px; }
  /* Optionally hide non-critical items on tiny screens */
  @media (max-width: 420px){
    .btn[href*="about"]{ display:none; }  /* example: hide About on very small phones */
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .btn, .nav{ transition: none; }
}

