:root {
  /* Dark teal base (darker take on app “petrol” brand; edges near-black) */
  --bg: #040a0c;
  --bg-elevated: #0c181c;
  --text: #e8edf4;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --border: rgba(148, 163, 184, 0.18);
  --radius: 14px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --max: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  /* Vertical teal gradient (like StockPilo / app shell): darker edges, soft glow in the middle */
  background:
    radial-gradient(ellipse 95% 65% at 50% 44%, rgba(0, 55, 62, 0.28), transparent 58%),
    linear-gradient(
      180deg,
      #000405 0%,
      #030c0f 16%,
      #071a1f 50%,
      #030c0f 84%,
      #000405 100%
    );
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

#main {
  flex: 1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 6px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(3, 14, 17, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-img {
  display: block;
  height: clamp(28px, 5vw, 40px);
  width: auto;
  max-width: min(220px, 55vw);
  object-fit: contain;
}

.logo-mark {
  color: var(--accent);
  font-size: 1.125rem;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  font-size: 0.9375rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Phones: Privacy & Legal stay in the footer — keep the top bar shorter */
@media (max-width: 767px) {
  .site-header .nav a[href="/privacy-policy/"],
  .site-header .nav a[href="/legal-notice/"] {
    display: none;
  }
}

.hero {
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hero-inner {
  text-align: center;
  max-width: 46rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.services {
  padding: 0 0 clamp(3rem, 8vw, 5rem);
}

.section-title {
  text-align: center;
  margin: 0 0 2.5rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.service-grid {
  display: grid;
  gap: 1.25rem;
}

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

.ios-productivity {
  margin-top: 2.5rem;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.ios-productivity-inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .ios-productivity-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2rem;
  }
}

.ios-productivity-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.ios-productivity-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.ios-productivity-lede {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Framed text link: same as QR-K “app privacy” footer (border, elevated bg, shadow) */
p.framed-cta {
  width: fit-content;
  max-width: 100%;
  margin: 0.75rem 0 0;
  padding: 0.65rem 1.15rem;
  font-size: 0.9375rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

p.framed-cta a {
  color: var(--accent);
  text-decoration: none;
}

p.framed-cta a:hover {
  text-decoration: underline;
}

body.page-about .about-page-additions {
  padding: 2.5rem 0 3rem;
}

body.page-about .about-page-additions .tool-examples {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

body.page-about .about-page-additions .ios-productivity {
  margin-top: 2.5rem;
}

body.page-about .about-page-additions .ios-productivity-copy {
  text-align: center;
}

body.page-about .about-page-additions .ios-productivity-lede {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

body.page-about .about-page-additions .ios-productivity-copy p.framed-cta {
  margin: 0.75rem auto 0;
}

body.page-about .about-custom-tools-strip {
  margin: 2rem 0 2.5rem;
  text-align: center;
}

body.page-about .about-custom-tools-img {
  width: min(100%, 720px);
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

/* Support / Contact: two-column split outside .imported-inner; framed cards */
body.page-support .support-contact-outer {
  margin-top: 1.5rem;
  padding-bottom: 0.25rem;
}

body.page-support .support-contact-split {
  margin: 0;
}

body.page-support .support-contact-split-inner {
  display: grid !important;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

@media (min-width: 640px) {
  body.page-support .support-contact-split-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 1.5rem;
  }
}

body.page-support .support-contact-card {
  padding: 1.35rem 1.25rem;
  border: 1px solid rgba(232, 237, 244, 0.2);
  border-radius: var(--radius);
  background: rgba(17, 24, 32, 0.98);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.12),
    0 12px 36px rgba(0, 0, 0, 0.4);
  min-height: 0;
}

body.page-support .support-contact-card--whatsapp {
  text-align: center;
}

body.page-support .support-whatsapp-heading {
  margin: 0 0 0.65rem;
  font-size: clamp(1.1rem, 2.1vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

body.page-support .support-whatsapp-line {
  margin: 0 0 1rem;
}

body.page-support .support-whatsapp-line a {
  color: var(--accent);
  text-decoration: none;
}

body.page-support .support-whatsapp-line a:hover {
  text-decoration: underline;
}

body.page-support .support-whatsapp-qr img {
  display: block;
  width: 100%;
  max-width: 110px;
  height: auto;
  margin-inline: auto;
  border-radius: 10px;
}

body.page-support .contact-page-intro {
  text-align: left;
  max-width: none;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

body.page-support .contact-page-intro a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

body.page-support .contact-page-connect {
  text-align: left;
}

body.page-support .contact-page-connect-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.1rem, 2.1vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

body.page-support .contact-page-connect-icons {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Icons use fill="currentColor" on paths; anchor color drives visibility on dark bg */
body.page-support .contact-page-connect-icons a.social-media-link-item-medium {
  color: #ffffff;
}

body.page-support .contact-page-connect-icons svg {
  display: block;
}

body.page-support .contact-page-connect-icons svg path {
  fill: currentColor !important;
}

body.page-support .contact-page-connect-icons a.social-media-link-item-medium:hover,
body.page-support .contact-page-connect-icons a.social-media-link-item-medium:focus-visible {
  color: rgba(255, 255, 255, 0.88);
}

/* High-specificity fallbacks: two columns + frames + white icons (survives missing/cached CSS edge cases) */
#main .support-contact-outer .support-contact-split-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 1.25rem !important;
  width: 100% !important;
}

@media (min-width: 600px) {
  #main .support-contact-outer .support-contact-split-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 1.5rem !important;
  }
}

#main .support-contact-outer .support-contact-card {
  padding: 1.35rem 1.25rem !important;
  border: 1px solid rgba(232, 237, 244, 0.22) !important;
  border-radius: var(--radius) !important;
  background: rgba(17, 24, 32, 0.98) !important;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.14),
    0 12px 36px rgba(0, 0, 0, 0.45) !important;
}

#main .support-contact-outer .contact-page-connect-icons a.social-media-link-item-medium {
  color: #ffffff !important;
}

#main .support-contact-outer .contact-page-connect-icons svg path {
  fill: #ffffff !important;
}

#main .support-contact-outer .contact-page-connect-icons a.social-media-link-item-medium:hover,
#main .support-contact-outer .contact-page-connect-icons a.social-media-link-item-medium:focus-visible {
  color: rgba(255, 255, 255, 0.88) !important;
}

.tool-examples {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.tool-examples-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
}

.tool-examples-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .tool-examples-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.tool-example-card {
  margin: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.tool-example-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.tool-example-card figcaption.tool-example-caption {
  padding: 1rem 1.25rem 1.25rem;
  text-align: left;
}

.tool-example-heading {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.35;
}

.tool-example-caption p {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--muted);
}

.tool-example-caption p:last-child {
  margin-bottom: 0;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.625rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.card .card-visual {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.card h3 {
  margin: 0 0 0.875rem;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  margin-top: auto;
}

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

.footer-brand {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Subpages: same visual language as the home page (https://bowwebsite.pages.dev/) */
body.page-secondary {
  /* Inherits body gradient + DM Sans from global rules */
  color: var(--text);
}

#main.imported-root {
  width: 100%;
  overflow-x: clip;
}

.imported-root {
  padding: clamp(2rem, 6vw, 3.5rem) 0 clamp(3rem, 8vw, 4.5rem);
}

.imported-inner .section-inner:empty {
  display: none !important;
}

.imported-inner .grid-column-root:empty {
  display: none !important;
}

.imported-inner .section,
.imported-inner [data-zone-type="content"] {
  margin-bottom: 2.5rem;
}

.imported-inner .section:last-child {
  margin-bottom: 0;
}

/* Flatten WP grid/flex shells so content reads in one column */
.imported-inner [class*="grid-row"],
.imported-inner [class*="grid-column"] {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.imported-inner h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.imported-inner h2 {
  margin: 2rem 0 0.75rem;
  font-size: clamp(1.35rem, 2.8vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.imported-inner h2:first-child {
  margin-top: 0;
}

.imported-inner h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.imported-inner p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.imported-inner p:last-child {
  margin-bottom: 0;
}

.imported-inner a {
  color: var(--accent);
  text-decoration: none;
}

.imported-inner a:hover {
  text-decoration: underline;
}

.imported-inner strong {
  color: var(--text);
  font-weight: 600;
}

.imported-inner img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  vertical-align: middle;
}

.imported-inner .image-wrapper,
.imported-inner .image-container {
  max-width: 100%;
}

.imported-inner .text-root,
.imported-inner .module-container-root,
.imported-inner .heading-root {
  max-width: 65ch;
}

.imported-inner a.button-primary-button,
.imported-inner a.button-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--bg) !important;
  background: var(--accent) !important;
  border-radius: 9999px;
  text-decoration: none !important;
  border: none;
}

.imported-inner a.button-primary-button:hover,
.imported-inner a.button-button:hover {
  filter: brightness(1.08);
  text-decoration: none !important;
}

.imported-inner input[type="text"],
.imported-inner input[type="email"],
.imported-inner input[type="tel"],
.imported-inner textarea,
.imported-inner select {
  width: 100%;
  max-width: 32rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.imported-inner textarea {
  min-height: 8rem;
  resize: vertical;
}

.imported-inner label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.imported-inner .form-display-none {
  display: none !important;
}

/* QR-K app privacy policy (qr-k/privacy/) */
body.page-qr-k-privacy .qr-k-privacy-doc {
  max-width: 48rem;
  margin-inline: auto;
  padding-bottom: 1rem;
}

body.page-qr-k-privacy .qr-k-privacy-meta {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0 0 1.5rem;
}

body.page-qr-k-privacy .qr-k-privacy-doc ul {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
  color: var(--muted);
  line-height: 1.65;
}

body.page-qr-k-privacy .qr-k-privacy-doc li {
  margin-bottom: 0.5rem;
}

body.page-qr-k-privacy .qr-k-privacy-doc li:last-child {
  margin-bottom: 0;
}

/* QR-K marketing page (qr-k/index.html) */
body.page-qr-k .qr-k-page {
  max-width: min(56rem, 100% - 2rem);
  margin-inline: auto;
  padding-bottom: 1rem;
}

body.page-qr-k .qr-k-page-hero {
  margin-bottom: 2.5rem;
}

body.page-qr-k .qr-k-page-hero > h1 {
  margin: 0 0 1.75rem;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  text-align: center;
}

/* Narrow viewports only: Scan + Generate — title → image → body copy (DOM is copy then image) */
@media (max-width: 699px) {
  body.page-qr-k .qr-k-page-section:has(> h2#qr-k-section-scan) {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  body.page-qr-k .qr-k-page-section:has(> h2#qr-k-section-scan) .qr-k-page-section-scan-row {
    display: contents;
  }

  body.page-qr-k .qr-k-page-section-scan-visual {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  body.page-qr-k .qr-k-page-section-scan-copy {
    order: 2;
  }

  body.page-qr-k .qr-k-page-section:has(> h2#qr-k-section-generate) {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  body.page-qr-k .qr-k-page-section:has(> h2#qr-k-section-generate) .qr-k-page-section-generate-row {
    display: contents;
  }

  body.page-qr-k .qr-k-page-section-generate-visual {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  body.page-qr-k .qr-k-page-section-generate-copy {
    order: 2;
  }
}

body.page-qr-k .qr-k-page-hero-row {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: start;
}

/* Below 768px many tablets are still wide enough for three columns (e.g. iPad mini ~744px portrait). */
@media (min-width: 700px) {
  body.page-qr-k .qr-k-page-hero-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    /* Row height = tallest column; stretch all cells to that height */
    align-items: stretch;
  }

  /* Side columns fill the row; cards share height evenly within each column */
  body.page-qr-k .qr-k-page-hero-row > .qr-k-page-hero-col:not(.qr-k-page-hero-col--visual) {
    min-height: 0;
    align-self: stretch;
  }

  body.page-qr-k
    .qr-k-page-hero-row
    > .qr-k-page-hero-col:not(.qr-k-page-hero-col--visual)
    .qr-k-page-card {
    flex: 1 1 auto;
  }
}

body.page-qr-k .qr-k-page-hero-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

body.page-qr-k .qr-k-page-hero-col--visual {
  justify-content: center;
}

body.page-qr-k .qr-k-page-hero-col--visual .qr-k-page-hero-figure {
  margin: 0 auto;
  width: 100%;
  max-width: min(100%, 22rem);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: transparent;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

body.page-qr-k .qr-k-page-hero-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

@media (min-width: 700px) {
  /*
   * Hero centre column: do not stretch the figure to the row height. Stretching + object-fit: contain
   * letterboxed the screenshot inside the border (empty bands above/below), which showed strongly on
   * phone landscape and narrow tablets. The figure height follows the image; the column is centred in the row.
   */
  body.page-qr-k .qr-k-page-hero-col--visual {
    align-self: center;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  body.page-qr-k .qr-k-page-hero-col--visual .qr-k-page-hero-figure {
    flex: 0 0 auto;
    min-height: 0;
    display: block;
    line-height: 0;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  body.page-qr-k .qr-k-page-hero-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    vertical-align: top;
  }
}

/* After base hero figure/img rules so these win on phones: border hugs qrk_main bitmap */
@media (max-width: 699px) {
  /* Title → qrk_main → then both card columns (DOM is left | image | right) */
  body.page-qr-k .qr-k-page-hero {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  body.page-qr-k .qr-k-page-hero > h1 {
    margin-bottom: 0;
  }

  body.page-qr-k .qr-k-page-hero-row {
    display: contents;
  }

  body.page-qr-k .qr-k-page-hero-row > .qr-k-page-hero-col--visual {
    order: 1;
    justify-content: flex-start;
    align-items: center;
  }

  body.page-qr-k .qr-k-page-hero-row > .qr-k-page-hero-col:first-child {
    order: 2;
  }

  body.page-qr-k .qr-k-page-hero-row > .qr-k-page-hero-col:last-child {
    order: 3;
  }

  body.page-qr-k .qr-k-page-hero-col--visual .qr-k-page-hero-figure {
    display: block;
    line-height: 0;
    width: fit-content;
    max-width: min(100%, 22rem);
    margin: 0 auto;
    margin-block: 0;
    align-self: center;
  }

  /* Win over .imported-inner img (border-radius, vertical-align) — flush to top of frame */
  body.page-qr-k .imported-inner .qr-k-page-hero-figure .qr-k-page-hero-img,
  body.page-qr-k .qr-k-page-hero-figure .qr-k-page-hero-img {
    display: block;
    width: auto;
    max-width: min(100%, 22rem);
    height: auto;
    vertical-align: top;
    border-radius: 0;
    object-fit: contain;
    object-position: top center;
    max-height: none;
  }
}

body.page-qr-k .qr-k-page-card {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

body.page-qr-k .qr-k-page-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
}

body.page-qr-k .qr-k-page-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

body.page-qr-k .qr-k-page-card li {
  margin-bottom: 0.35rem;
}

body.page-qr-k .qr-k-page-section {
  margin-bottom: 2.25rem;
}

body.page-qr-k .qr-k-page-section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

body.page-qr-k .qr-k-page-section p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

body.page-qr-k .qr-k-page-section p:last-of-type {
  margin-bottom: 0;
}

/* Scan / Access / Generate: text 2/3, image 1/3 right (stacked on small screens) */
body.page-qr-k .qr-k-page-section-scan-row,
body.page-qr-k .qr-k-page-section-access-row,
body.page-qr-k .qr-k-page-section-generate-row {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: start;
}

/* Copy columns: same framing as figures/cards; section headings (h2) stay outside this box */
body.page-qr-k .qr-k-page-section-scan-copy,
body.page-qr-k .qr-k-page-section-access-copy,
body.page-qr-k .qr-k-page-section-favorites-copy {
  min-width: 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

body.page-qr-k .qr-k-page-section-scan-visual,
body.page-qr-k .qr-k-page-section-access-visual,
body.page-qr-k .qr-k-page-section-generate-visual {
  min-width: 0;
}

body.page-qr-k .qr-k-page-section-scan-figure,
body.page-qr-k .qr-k-page-section-access-figure,
body.page-qr-k .qr-k-page-section-generate-figure {
  margin: 0 auto;
  width: 100%;
  max-width: min(100%, 22rem);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: transparent;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

body.page-qr-k .qr-k-page-section-scan-img,
body.page-qr-k .qr-k-page-section-access-img,
body.page-qr-k .qr-k-page-section-generate-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

@media (min-width: 700px) {
  body.page-qr-k .qr-k-page-section-scan-row,
  body.page-qr-k .qr-k-page-section-access-row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
  }

  /* Same image column width as Favorites (1fr | 1fr); only this section differs from Scan / Access */
  body.page-qr-k .qr-k-page-section-generate-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
  }

  body.page-qr-k .qr-k-page-section-scan-visual,
  body.page-qr-k .qr-k-page-section-access-visual,
  body.page-qr-k .qr-k-page-section-generate-visual {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  body.page-qr-k .qr-k-page-section-scan-figure,
  body.page-qr-k .qr-k-page-section-access-figure,
  body.page-qr-k .qr-k-page-section-generate-figure {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }

  body.page-qr-k .qr-k-page-section-scan-img,
  body.page-qr-k .qr-k-page-section-access-img,
  body.page-qr-k .qr-k-page-section-generate-img {
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
  }

  body.page-qr-k .qr-k-page-section-generate-copy {
    align-self: stretch;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  body.page-qr-k .qr-k-page-section-generate-copy .qr-k-page-section-generate-text-card {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* After base scan img rules: phone crop frame + true centre (base height:auto was winning) */
@media (max-width: 699px) {
  body.page-qr-k .qr-k-page-section-scan-visual .qr-k-page-section-scan-figure {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: min(100%, 22rem);
    width: 100%;
    height: auto;
  }

  body.page-qr-k .qr-k-page-section-scan-figure .qr-k-page-section-scan-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center center;
  }

  /* Access: qrk_controls — half the previous max layout width on phones */
  body.page-qr-k .qr-k-page-section-access-visual .qr-k-page-section-access-figure {
    width: min(50%, 11rem);
    max-width: none;
  }

  /* Generate: same 16:9 phone strip as Scan */
  body.page-qr-k .qr-k-page-section-generate-visual .qr-k-page-section-generate-figure {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: min(100%, 22rem);
    width: 100%;
    height: auto;
    margin-inline: auto;
  }

  body.page-qr-k .qr-k-page-section-generate-figure .qr-k-page-section-generate-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center center;
  }
}

/* Your Favorites: image | text, half and half (image above text when stacked) */
body.page-qr-k .qr-k-page-section-favorites-row {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: start;
}

body.page-qr-k .qr-k-page-section-favorites-visual {
  min-width: 0;
  display: flex;
  justify-content: center;
}

body.page-qr-k .qr-k-page-section-favorites-figure {
  margin: 0 auto;
  width: 100%;
  max-width: min(100%, 22rem);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: transparent;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-qr-k .qr-k-page-section-favorites-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center;
  vertical-align: middle;
}

@media (min-width: 700px) {
  body.page-qr-k .qr-k-page-section-favorites-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
  }

  body.page-qr-k .qr-k-page-section-favorites-visual {
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    justify-content: center;
  }

  /* Favorites: same stretch pattern as Scan / Generate — image frame matches text column height on iPad+ */
  body.page-qr-k .qr-k-page-section-favorites-figure {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0;
    line-height: 0;
  }

  body.page-qr-k .qr-k-page-section-favorites-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
  }

  body.page-qr-k .qr-k-page-section-favorites-copy {
    align-self: stretch;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
}

/* Phones: Favorites image — same 16:9 horizontal strip as Scan / Generate (after base favorites rules) */
@media (max-width: 699px) {
  body.page-qr-k .qr-k-page-section-favorites-visual .qr-k-page-section-favorites-figure {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: min(100%, 22rem);
    width: 100%;
    height: auto;
    margin-inline: auto;
  }

  body.page-qr-k .qr-k-page-section-favorites-figure .qr-k-page-section-favorites-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center center;
  }
}

/* Generate & Share: copy + image; desktop uses 1fr|1fr like Favorites for matched image width */
body.page-qr-k .qr-k-page-section-generate-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

body.page-qr-k .qr-k-page-section-generate-text-card.qr-k-page-card {
  background: transparent;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

/* QR-K page: full-size image lightbox (<dialog> in qr-k/index.html) */
body.page-qr-k .qr-k-lightbox-trigger {
  cursor: zoom-in;
}

/* Letterboxed area is still the <figure>; match cursor so clicks feel consistent */
body.page-qr-k figure:has(> img.qr-k-lightbox-trigger) {
  cursor: zoom-in;
}

body.page-qr-k .qr-k-lightbox-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Do not set display on closed <dialog> — it overrides the UA hidden state. */
body.page-qr-k dialog.qr-k-lightbox {
  border: none;
  background: transparent;
  color: var(--text);
}

body.page-qr-k dialog.qr-k-lightbox[open] {
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100dvh;
  margin: 0;
  padding: 0.75rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-qr-k dialog.qr-k-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}

body.page-qr-k .qr-k-lightbox-panel {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
}

body.page-qr-k .qr-k-lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(3, 14, 17, 0.92);
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-qr-k .qr-k-lightbox-close:hover {
  color: var(--accent);
}

body.page-qr-k .qr-k-lightbox-img {
  display: block;
  max-width: min(96vw, 120rem);
  max-height: min(90vh, 90dvh);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

body.page-qr-k p.framed-cta.qr-k-page-footer-note {
  margin: 2rem auto 0;
}

/* Productivity Tools: page title — center the *module* wrapper (65ch .module-container-root was left-aligned) */
body.page-productivity-tools
  .imported-inner
  .grid-column-large-12
  > .module-container-root:has(.heading-root h2) {
  margin-inline: auto;
  max-width: min(65ch, 100%);
  width: 100%;
}

body.page-productivity-tools
  .imported-inner
  .grid-column-large-12
  > .module-container-root:has(.heading-root h2)
  .heading-root {
  margin-inline: 0;
  max-width: 100%;
  text-align: center;
}

body.page-productivity-tools .imported-inner .heading-root h2 {
  text-align: center;
  width: 100%;
}

/* Productivity Tools: QR-K, ShipWrk, StockPilo — one row, three card boxes on large screens */
body.page-productivity-tools .imported-root .imported-inner .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3)) {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  body.page-productivity-tools .imported-root .imported-inner .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem clamp(1rem, 4vw, 1.75rem) 1.75rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  width: 100% !important;
  max-width: none !important;
}

/* Fill card width so title/description align to the same inset */
body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .heading-root,
body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .text-root,
body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .module-container-root {
  max-width: 100% !important;
  width: 100%;
  box-sizing: border-box;
}

body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .heading-root
  h3 {
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Subtitle: first paragraph in each tool’s text block */
body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .text-root
  > div
  > p:first-of-type {
  text-align: center;
  color: var(--text);
}

/* Body copy: extra horizontal inset inside each tool card */
body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .text-root
  > div
  > p:not(:first-of-type) {
  text-align: left;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .text-root {
  text-align: left;
  padding: 0.25rem clamp(0.75rem, 3vw, 1.35rem) 0;
}

body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .module-container-root:has(.framed-cta),
body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .module-container-root.product-tool-actions {
  text-align: center;
  margin-top: 0.5rem;
}

body.page-productivity-tools .product-tool-actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.75rem;
}

body.page-productivity-tools .product-tool-actions-row > .framed-cta,
body.page-productivity-tools .product-tool-actions-row > .app-store-cta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.page-productivity-tools a.app-store-cta {
  width: fit-content;
  max-width: 100%;
  padding: 0.45rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}

body.page-productivity-tools a.app-store-cta:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

body.page-productivity-tools a.app-store-cta img {
  display: block;
  height: 1.85rem;
  width: auto;
}

body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  p.framed-cta {
  margin: 0.5rem auto 0;
}

body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .product-tool-actions-row
  p.framed-cta {
  margin: 0;
}

body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  .image-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

body.page-productivity-tools
  .imported-root
  .imported-inner
  .grid-row-has-columns:has(> .grid-column-large-4:nth-child(3))
  > .grid-column-root
  img {
  max-width: 200px;
  margin-inline: auto;
  display: block;
}

