/* Shared by every page. Generated once from the rules that were
   copied, identically, into each page's inline <style>. Page-specific
   rules stay inline and load after this file, so they still win. */
/* Theme tokens. Light values are the site's original colours; dark values
   apply when <html data-theme="dark"> is set by partials/theme-init.html
   (saved choice, else the OS preference) or the header toggle in js/site.js. */
:root {
  --blue: #2563eb; --blue-hover: #1d4ed8; --bg: #f3f5f8; --card: #ffffff;
  --text: #111827; --text-2: #374151; --text-3: #4b5563; --muted: #6b7280; --muted-2: #9ca3af; --muted-3: #d1d5db;
  --surface: #f9fafb; --surface-2: #f3f4f6;
  --border: #e5e7eb; --border-soft: #f3f4f6; --border-strong: #d1d5db;
  --border-blue: #bfdbfe; --border-violet: #ddd6fe; --border-amber: #fdba74; --border-red: #fee2e2;
  --tint-blue: #eef4ff; --tint-blue-2: #e0e7ff; --tint-violet: #f5f3ff; --tint-violet-2: #ede9fe;
  --tint-amber: #fff7ed; --tint-amber-2: #ffedd5; --tint-green: #ecfdf5; --tint-green-2: #d1fae5; --tint-red: #fef2f2;
  --blue-text: #1e40af; --violet-text: #5b3aa8; --violet-accent: #8b3fd1; --amber-text: #9a5b13; --red-text: #b91c1c;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --blue: #3b82f6; --blue-hover: #2563eb; --bg: #212830; --card: #262c36;
  --text: #d1d7e0; --text-2: #bcc2cb; --text-3: #a6adb8; --muted: #9198a1; --muted-2: #7d8590; --muted-3: #6a727c;
  --surface: #2a313c; --surface-2: #2f3742;
  --border: #3d444d; --border-soft: #2f3640; --border-strong: #4a525c;
  --border-blue: #2b4a86; --border-violet: #43337a; --border-amber: #7a4a1c; --border-red: #5b2530;
  --tint-blue: rgba(59,130,246,.13); --tint-blue-2: rgba(59,130,246,.22); --tint-violet: rgba(139,92,246,.13); --tint-violet-2: rgba(139,92,246,.22);
  --tint-amber: rgba(245,158,11,.12); --tint-amber-2: rgba(245,158,11,.2); --tint-green: rgba(16,185,129,.12); --tint-green-2: rgba(16,185,129,.2); --tint-red: rgba(239,68,68,.12);
  --blue-text: #93c5fd; --violet-text: #b9a3f7; --violet-accent: #c084fc; --amber-text: #fdba74; --red-text: #fca5a5;
  color-scheme: dark;
}
html { background: var(--bg); }

/* Header light/dark toggle (wired in js/site.js) */
.theme-toggle { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: auto; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
.theme-toggle + .btn { margin-left: 0; }
/* dark-mode refinements that tokens alone can't express */
:root[data-theme="dark"] .mega-sub a img { background: #fff; padding: 1px; }
:root[data-theme="dark"] img[src*="favicons"] { background: #fff; border-radius: 4px; }
:root[data-theme="dark"] .logo-mark { background: #e9eef8; }
:root[data-theme="dark"] .mega-menu-inner, :root[data-theme="dark"] .nav { box-shadow: 0 24px 60px rgba(0,0,0,.5); }
* {box-sizing: border-box; margin: 0; padding: 0; }
html, body {max-width: 100%; overflow-x: hidden; }
body {font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; padding-top: 64px; }
a {color: inherit; text-decoration: none; }
button {font-family: inherit; cursor: pointer; }
.topbar {position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 24px; background: var(--card); border-bottom: 1px solid var(--border); }
.logo {display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -0.03em; font-size: 18px; min-width: 168px; }
.logo-mark {width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.logo-mark svg {width: 20px; height: 20px; display: block; }
.menu-btn {display: none; background: none; border: 0; font-size: 20px; padding: 6px 8px; border-radius: 8px; color: var(--text-2); }
.menu-btn:hover {background: var(--surface-2); }
.nav {display: flex; gap: 22px; font-size: 14px; font-weight: 500; color: var(--text-2); flex: 1; }
.nav a:hover {color: var(--blue); }
.nav a.active {color: var(--blue); }
.nav a.ai-highlight {font-weight: 700; background: linear-gradient(90deg, #2563eb, #7c3aed, #ec4899, #2563eb); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: ai-gradient-shift 4s ease infinite; }
.nav a.ai-highlight:hover {-webkit-text-fill-color: transparent; color: transparent; }
@keyframes ai-gradient-shift {0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; }; }
.nav-item {position: relative; display: flex; align-items: center; }
.nav-caret {font-size: 10px; margin-left: 4px; color: var(--muted-2); }
.mega-menu {position: absolute; top: 100%; left: 0; padding-top: 16px; display: none; z-index: 60; width: min(1000px, 88vw); }
.nav-item.open .mega-menu {display: block; }
@media (hover: hover) {
  .nav-item:hover .mega-menu {display: block; }
}
.mega-menu-inner {background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 60px rgba(17,24,39,.14); padding: 24px; }
.mega-grid {display: grid; grid-template-columns: repeat(8, 1fr); gap: 18px; }
.mega-col-title {width: 100%; background: none; border: 0; font-family: inherit; cursor: default; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; white-space: nowrap; }
.mega-caret {display: none; font-size: 10px; color: var(--muted-2); transition: transform .15s ease; }
.mega-sub {display: flex; flex-direction: column; }
.mega-sub a {display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; color: var(--muted); }
.mega-sub a:hover {color: var(--blue); }
.mega-sub a img {width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.mega-foot {margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mega-foot p {font-size: 12.5px; color: var(--muted); }
.mega-foot .btn {padding: 10px 18px; font-size: 13px; white-space: nowrap; }
.btn {display: inline-block; border: 0; border-radius: 8px; font-weight: 600; font-size: 13px; padding: 9px 16px; background: var(--blue); color: #fff; }
.btn:hover {background: var(--blue-hover); }
.btn-sm {padding: 8px 14px; }
.btn-outline {background: var(--card); color: var(--text-2); border: 1px solid var(--border); }
.btn-outline:hover {background: var(--surface-2); }
.footer-main {max-width: 1180px; margin: 0 auto; padding: 40px 28px 28px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p {margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.55; max-width: 320px; }
.footer-col h4 {font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.footer-col a {display: block; font-size: 13px; color: var(--muted); padding: 5px 0; }
.footer-col a:hover {color: var(--blue); }
@media (max-width: 900px) {
  .menu-btn {display: inline-flex; align-items: center; justify-content: center; }
  .topbar {padding: 0 16px; justify-content: space-between; gap: 10px; }
  .topbar > .btn {white-space: nowrap; }
  .nav {position: fixed; top: 64px; left: 0; right: 0; max-height: calc(100vh - 64px); overflow-y: auto; background: var(--card); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; gap: 0; padding: 6px 16px 20px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .15s ease, transform .15s ease; box-shadow: 0 16px 32px rgba(17,24,39,.12); z-index: 55; }
  .nav.open {opacity: 1; transform: none; visibility: visible; }
  .nav > a {padding: 14px 4px; border-top: 1px solid var(--border-soft); }
  .nav-item {flex-direction: column; align-items: stretch; }
  .nav-item > a {padding: 14px 4px; border-top: 1px solid var(--border-soft); justify-content: space-between; }
  .mega-menu {position: static; width: 100%; padding-top: 0; }
  .mega-menu-inner {background: none; border: 0; box-shadow: none; border-radius: 0; padding: 4px 0 12px; }
  .mega-grid {grid-template-columns: 1fr; gap: 0; }
  .mega-col-title {cursor: pointer; padding: 12px 4px; border-top: 1px solid var(--border-soft); margin-bottom: 0; }
  .mega-caret {display: inline-block; }
  .mega-col.open .mega-caret {transform: rotate(180deg); }
  .mega-sub {display: none; padding: 2px 4px 10px 10px; }
  .mega-col.open .mega-sub {display: flex; }
  .mega-foot {flex-direction: column; align-items: stretch; text-align: left; }
  .mega-foot .btn {text-align: center; }
}

/* Image lightbox (js/lightbox.js) */
.tool-shot, .shot-viewport img { cursor: zoom-in; }
.img-lightbox {
position: fixed; inset: 0; z-index: 300;
background: rgba(15, 23, 42, .88);
display: flex; align-items: center; justify-content: center;
padding: 28px; cursor: zoom-out;
opacity: 0; visibility: hidden; transition: opacity .15s ease;
}
.img-lightbox.open { opacity: 1; visibility: visible; }
.img-lightbox img { max-width: 100%; max-height: 100%; box-shadow: 0 24px 64px rgba(0,0,0,.5); cursor: default; }
.img-lightbox-close {
position: absolute; top: 18px; right: 22px; width: 40px; height: 40px;
border-radius: 999px; border: 0; background: rgba(255,255,255,.12); color: #fff;
font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.img-lightbox-close:hover { background: rgba(255,255,255,.22); }

/* Price-change badge -- priceChangeBadge() in js/software-data.js and
   js/render-product.js, driven by a product's priceChange field. Up is red
   (worse for the buyer), down is green, a restructured lineup is amber. */
:root { --green-text: #047857; }
:root[data-theme="dark"] { --green-text: #6ee7b7; }
.price-change { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.35; }
.price-change .was { font-weight: 500; opacity: .85; }
.price-change.up { color: var(--red-text); background: var(--tint-red); border-color: var(--border-red); }
.price-change.down { color: var(--green-text); background: var(--tint-green); border-color: var(--tint-green-2); }
.price-change.changed { color: var(--amber-text); background: var(--tint-amber); border-color: var(--border-amber); }
.pricing-change { margin: 4px 0 2px; }
