/* Que's Corner — site styles
   Brand: EGQ TECHS mark + Que's Corner storefront
   Palette: hero teal + Warmlatte catalog
*/

:root {
  --qc-bg: #ededea;
  --qc-surface: #f5ebe0;
  --qc-text: #2c2c2c;
  --qc-muted: #6d4c41;
  --qc-accent: #6d4c41;
  --qc-border: #d6ccc2;
  --qc-footer: #d5bdaf;
  --qc-buy: #c62828;
  --qc-buy-text: #ffffff;
  --qc-hero: #154854;
  --qc-hero-text: #ffffff;
  --qc-hero-soft: #1a5a68;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 42rem;
  --max-wide: 56rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, #f5ebe0 0%, transparent 55%),
    var(--qc-bg);
  color: var(--qc-text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--qc-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #4e342e;
}

/* —— Top nav —— */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem 1.5rem;
  background: color-mix(in srgb, var(--qc-hero) 92%, #000);
  color: var(--qc-hero-text);
}

.site-nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: #fff !important;
  text-decoration: none !important;
}

.site-nav__brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
}

.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav__item--has-menu {
  position: relative;
}

.site-nav__dropdown {
  position: relative;
}

.site-nav__dropdown summary {
  list-style: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav__dropdown summary::-webkit-details-marker {
  display: none;
}

.site-nav__dropdown summary::after {
  content: " ▾";
  font-size: 0.75em;
  opacity: 0.85;
}

.site-nav__dropdown[open] summary,
.site-nav__dropdown summary:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.site-nav__submenu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 20;
  min-width: 12rem;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--qc-border);
  border-radius: 0.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.site-nav__submenu a {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--qc-text) !important;
  font-weight: 600;
  text-decoration: none !important;
}

.site-nav__submenu a:hover,
.site-nav__submenu a[aria-current="page"] {
  background: var(--qc-surface);
  color: var(--qc-accent) !important;
}

.site-nav__soon {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--qc-muted);
  font-size: 0.9rem;
  font-weight: 600;
  font-style: italic;
}

.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;
}

.page-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.page-hero__note {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

.formula-doctor__disclaimer {
  opacity: 1;
  max-width: 40rem;
}

/* —— Home hero —— */
.hero {
  background:
    linear-gradient(165deg, var(--qc-hero-soft) 0%, var(--qc-hero) 45%, #0f3a43 100%);
  color: var(--qc-hero-text);
  text-align: center;
  padding: clamp(1.6rem, 5vw, 2.85rem) 1.5rem clamp(1.85rem, 5.5vw, 3.15rem);
}

.hero__inner {
  max-width: 28rem;
  margin: 0 auto;
  animation: hero-in 0.9s ease-out both;
}

.hero__logo {
  width: clamp(6rem, 18vw, 8.25rem);
  height: auto;
  margin: 0 auto 0.85rem;
  border-radius: 0.35rem;
}

.hero__title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero__tagline {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  max-width: 22rem;
  margin-inline: auto;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Page shell —— */
main {
  flex: 1;
}

.page-hero {
  background: var(--qc-hero);
  color: var(--qc-hero-text);
  padding: 2.5rem 1.5rem 2.75rem;
}

.page-hero__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  animation: hero-in 0.75s ease-out both;
}

.page-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
}

.page-hero p {
  margin: 0;
  max-width: 36rem;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
}

.page-hero a:not(.btn) {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.page-hero a:not(.btn):hover {
  color: #c5eef5;
}

.section {
  padding: clamp(2.25rem, 5vw, 3.5rem) 1.5rem;
}

.section__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
}

.section--narrow .section__inner {
  max-width: var(--max);
}

.section h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--qc-text);
}

.section__lede {
  margin: 0 0 1.75rem;
  color: var(--qc-muted);
  font-size: 1.05rem;
}

/* —— Catalog teasers (Home) —— */
.catalog {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.teaser {
  padding: 1.75rem 0;
  border-top: 1px solid var(--qc-border);
  animation: rise-in 0.7s ease-out both;
}

.teaser:first-child {
  border-top: none;
  padding-top: 0;
}

.teaser:nth-child(2) {
  animation-delay: 0.12s;
}

.teaser:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.teaser h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
}

.teaser h2 a {
  color: inherit;
  text-decoration: none;
}

.teaser h2 a:hover {
  color: var(--qc-accent);
  text-decoration: underline;
}

.teaser p {
  margin: 0 0 0.85rem;
  max-width: 34rem;
  color: var(--qc-text);
}

.teaser--soon h2 {
  font-size: 1.35rem;
  color: var(--qc-muted);
}

.teaser--soon p {
  color: var(--qc-muted);
  margin-bottom: 0;
}

.link-more {
  font-weight: 600;
  font-size: 1rem;
}

/* —— Buttons —— */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.25rem;
  border-radius: 0.3rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--buy {
  background: var(--qc-buy);
  color: var(--qc-buy-text);
}

.btn--buy:hover {
  background: #a31f1f;
  color: #fff;
}

.btn--buy[aria-disabled="true"],
.btn--buy.is-disabled {
  background: #9a6b6b;
  pointer-events: none;
  transform: none;
  opacity: 0.85;
}

.btn--ghost {
  background: transparent;
  color: var(--qc-hero-text);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #fff;
}

.btn--ghost.is-disabled,
.btn--ghost[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
  cursor: not-allowed;
}

.section--signup .btn--ghost {
  color: var(--qc-teal-dark);
  border-color: var(--qc-border);
  background: #fff;
}

.section--signup .btn--ghost:hover {
  background: #e8f4f3;
  color: var(--qc-text);
  border-color: var(--qc-teal);
}

.btn--secondary {
  background: transparent;
  color: var(--qc-accent);
  border-color: var(--qc-accent);
}

.btn--secondary:hover {
  background: var(--qc-surface);
  color: var(--qc-accent);
}

/* —— Pricing offers —— */
.offers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.offers--single {
  grid-template-columns: minmax(0, 22rem);
}

.offer {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem 1.15rem 1.35rem;
  border: 1px solid var(--qc-border);
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--qc-surface) 70%, #fff);
}

.offer--selected {
  border-color: var(--qc-accent);
}

.offer--dimmed {
  opacity: 0.55;
}

.offer__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.offer__desc {
  margin: 0;
  flex: 1;
  font-size: 0.98rem;
  color: var(--qc-muted);
  line-height: 1.45;
}

.offer__price {
  margin: 0.35rem 0 0.15rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--qc-text);
  letter-spacing: -0.02em;
}

.offer__price--free {
  font-family: "Bebas Neue", var(--font-display);
  font-size: 2.65rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #1b5e20;
  line-height: 1;
}

.page-hero__free {
  font-family: "Bebas Neue", var(--font-display);
  font-size: 1.4em;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #b9f6ca;
}

.buy-heading__free {
  font-family: "Bebas Neue", var(--font-display);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #1b5e20;
}

.offers--duo {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
  .offers--duo {
    grid-template-columns: 1fr;
  }
}

.offer .btn {
  align-self: flex-start;
  margin-top: 0.35rem;
}

@media (max-width: 900px) {
  .offers {
    grid-template-columns: 1fr;
  }
}

/* —— Product content —— */
.prose {
  max-width: var(--max);
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose h2 {
  margin: 2rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 1.35rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.prose ol li {
  margin-bottom: 0.45rem;
}

.prose code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
  background: var(--qc-surface);
  border: 1px solid var(--qc-border);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  word-break: break-word;
}

.prose pre {
  position: relative;
  margin: 0 0 1.25rem;
  padding: 0.9rem 3.25rem 0.9rem 1rem;
  background: var(--qc-surface);
  border: 1px solid var(--qc-border);
  border-radius: 6px;
  overflow-x: auto;
}

.code-copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: var(--qc-bg);
  color: var(--qc-muted);
  border: 1px solid var(--qc-border);
  border-radius: 5px;
  cursor: pointer;
}

.code-copy-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.code-copy-btn:hover {
  color: var(--qc-text);
  border-color: var(--qc-accent);
}

.code-copy-btn--done {
  color: #2e7d32;
  border-color: #2e7d32;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.88em;
  white-space: pre;
  word-break: normal;
}

.note {
  margin: 1.25rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--qc-border);
  font-size: 0.95rem;
  color: var(--qc-muted);
}

/* —— Published SHA-256 hashes (read-only display) —— */
.integrity-panel {
  display: grid;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 2px solid var(--qc-accent);
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--qc-surface) 55%, #fff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.integrity-item {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--qc-border);
  border-radius: 0.3rem;
  background: #fff;
}

.integrity-item + .integrity-item {
  margin-top: 0;
}

.integrity-item__name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.integrity-item__file {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--qc-muted);
  word-break: break-word;
}

.integrity-hash {
  display: block;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px dashed color-mix(in srgb, var(--qc-accent) 45%, var(--qc-border));
  border-radius: 0.25rem;
  background: color-mix(in srgb, var(--qc-bg) 80%, #fff);
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  letter-spacing: 0.03em;
  color: var(--qc-text);
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
  cursor: text;
}

.integrity-note {
  margin: 1rem 0 0;
  font-size: 0.92rem;
  color: var(--qc-muted);
  line-height: 1.5;
}

.integrity-advisory {
  margin: 0 0 1rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--qc-border);
  border-left: 4px solid var(--qc-accent);
  border-radius: 0.3rem;
  background: color-mix(in srgb, var(--qc-surface) 40%, #fff);
  font-size: 0.98rem;
  line-height: 1.55;
}

.integrity-advisory p {
  margin: 0;
}

.integrity-advisory strong {
  font-weight: 700;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

/* —— Footer —— */
.site-footer {
  margin-top: auto;
  padding: 0.85rem 1.5rem;
  background: var(--qc-hero);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  text-align: left;
}

.site-footer p {
  margin: 0;
  letter-spacing: 0.02em;
}

.site-footer a {
  font-weight: 600;
  color: #fff;
}

.site-footer a:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* —— Home: compact layout; scroll when content exceeds viewport —— */
body.page-home {
  min-height: 100dvh;
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 1.05rem;
}

body.page-home .site-nav {
  flex-shrink: 0;
  padding: 0.55rem 1.25rem;
}

body.page-home main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

body.page-home .hero {
  flex-shrink: 0;
  padding: 1.1rem 1.25rem 1.25rem;
}

body.page-home .hero__logo {
  width: clamp(4.5rem, 12vw, 6rem);
  margin-bottom: 0.55rem;
}

body.page-home .hero__title {
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  margin-bottom: 0.3rem;
}

body.page-home .hero__tagline {
  font-size: clamp(0.9rem, 1.8vw, 1rem);
}

body.page-home .section--apps {
  padding: 0.85rem 1.25rem 1rem;
}

body.page-home .section--apps .section__lede {
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

body.page-home .section--apps h2#apps-heading {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

body.page-home .catalog {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.page-home .teaser {
  padding: 0.85rem 0;
}

body.page-home .teaser h2 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

body.page-home .teaser p {
  margin-bottom: 0.5rem;
  font-size: 0.98rem;
}

body.page-home .teaser--soon h2 {
  font-size: 1.05rem;
}

body.page-home .teaser--soon p {
  margin-bottom: 0;
}

body.page-home .section--signup {
  flex-shrink: 0;
  padding: 0.85rem 1.25rem 1.1rem;
  border-top: 1px solid var(--qc-border);
  background: var(--qc-surface);
}

body.page-home .section--signup h2#signup-heading {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

body.page-home .section--signup .section__lede {
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  max-width: 36rem;
}

body.page-home .section--signup .lead-form {
  margin: 0;
}

body.page-home .home-signup__tools {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--qc-muted);
}

body.page-home .site-footer {
  flex-shrink: 0;
  padding: 0.65rem 1.25rem;
}

#apps-heading,
#utilities-heading {
  scroll-margin-top: 4.5rem;
}

@media (max-width: 640px) {
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* —— Privacy —— */
.privacy h2 {
  margin-top: 1.75rem;
}

/* —— Screenshot carousel —— */
.carousel-section {
  padding-top: 0;
}

.carousel {
  position: relative;
  max-width: var(--max-wide);
  margin: 0 auto;
  outline: none;
}

.carousel__stage {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.carousel__viewport {
  overflow: hidden;
  border: 1px solid var(--qc-border);
  background: #1a1a1a;
  border-radius: 0.25rem;
  min-width: 0;
}

.carousel__track {
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 100%;
  margin: 0;
  min-width: 0;
}

.carousel__slide img,
.carousel__slide-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #121212;
  cursor: zoom-in;
}

.carousel__slide figcaption {
  margin: 0;
  padding: 0.65rem 0.9rem;
  background: var(--qc-surface);
  color: var(--qc-muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--qc-border);
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.carousel__btn {
  z-index: 2;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--qc-accent);
  background: var(--qc-surface);
  color: var(--qc-accent);
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 0.3rem;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.carousel__btn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.carousel__status {
  font-size: 0.9rem;
  color: var(--qc-muted);
  font-variant-numeric: tabular-nums;
}

.carousel__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.carousel__dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--qc-border);
  cursor: pointer;
}

.carousel__dot[aria-current="true"] {
  background: var(--qc-accent);
}

/* —— Carousel lightbox —— */
body.carousel-lightbox-open {
  overflow: hidden;
}

.carousel-lightbox[hidden] {
  display: none !important;
}

.carousel-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.carousel-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(20, 20, 20, 0.82);
  cursor: pointer;
}

.carousel-lightbox__panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
  background: #121212;
  border: 1px solid var(--qc-border);
  border-radius: 0.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.carousel-lightbox__img {
  max-width: 100%;
  max-height: calc(92vh - 4.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  background: #0a0a0a;
}

.carousel-lightbox__caption {
  margin: 0;
  text-align: center;
  color: #e8e0d8;
  font-size: 0.95rem;
}

.carousel-lightbox__close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.3rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-lightbox__close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.actions--center {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.lead-form {
  max-width: 28rem;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--qc-surface);
  border: 1px solid var(--qc-border);
  border-radius: 0.5rem;
}

.lead-form__row {
  display: grid;
  gap: 0.35rem;
}

.lead-form__row label {
  font-weight: 600;
  color: var(--qc-text);
}

.lead-form__row input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--qc-border);
  border-radius: 0.3rem;
  background: #fff;
  color: var(--qc-text);
}

.lead-form__row input:focus {
  outline: 2px solid var(--qc-accent);
  outline-offset: 1px;
}

.lead-form .btn {
  justify-self: start;
  cursor: pointer;
}

.lead-form__status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--qc-muted);
}

/* —— Media Catalog subscribe modal —— */
body.mc-modal-open {
  overflow: hidden;
}

.mc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.mc-modal[hidden] {
  display: none;
}

.mc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 20, 16, 0.62);
}

.mc-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.5rem 1.35rem 1.65rem;
  border-radius: 0.4rem;
  background: var(--qc-surface);
  border: 1px solid var(--qc-border);
  box-shadow: 0 18px 48px rgba(26, 20, 16, 0.28);
}

.mc-modal__dialog h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--qc-text);
}

.mc-modal__lede {
  margin: 0 0 1rem;
  color: var(--qc-muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.mc-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--qc-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.mc-modal__close:hover {
  background: color-mix(in srgb, var(--qc-border) 40%, transparent);
  color: var(--qc-text);
}

.mc-modal .lead-form {
  margin-top: 0.25rem;
}

.lead-form--embed {
  padding: 1.25rem 1.5rem 1.5rem;
}

.lead-form--embed .ml-embedded {
  width: 100%;
}

.lead-form--embed input[type="text"],
.lead-form--embed input[type="email"] {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--qc-border);
  border-radius: 0.3rem;
  background: #fff;
  color: var(--qc-text);
  width: 100%;
  box-sizing: border-box;
}

.lead-form--embed input[type="text"]:focus,
.lead-form--embed input[type="email"]:focus {
  outline: 2px solid var(--qc-accent);
  outline-offset: 1px;
}

.lead-form--embed button[type="submit"],
.lead-form--embed .ml-form-submit {
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 0.3rem;
  padding: 0.65rem 1.25rem;
  background: var(--qc-accent);
  color: #fff;
}

.lead-form--embed button[type="submit"]:hover,
.lead-form--embed .ml-form-submit:hover {
  filter: brightness(0.95);
}

.lead-form--embed label {
  font-weight: 600;
  color: var(--qc-text);
}

/* —— AdSense slot (below hero, all pages) —— */
.section--ad {
  padding-top: 0;
  padding-bottom: 0;
}

.ad-slot {
  display: flex;
  justify-content: center;
  min-height: 90px;
  margin: 0 auto;
  max-width: 728px;
}

.ad-slot ins.adsbygoogle {
  display: block;
  width: 100%;
}

.section__lede--tail {
  margin-top: 1.5rem;
  margin-bottom: 0;
  font-size: 1rem;
}

/* —— Online hash tool (hash-tool.html) —— */
.hash-tool {
  max-width: 44rem;
}

.hash-tool__panel {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--qc-border);
  border-radius: 0.65rem;
  box-shadow: 0 2px 12px rgba(44, 44, 44, 0.06);
}

.hash-tool__modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hash-tool__mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-height: 5.5rem;
  padding: 1rem 1.15rem;
  font-family: var(--font-body);
  text-align: left;
  border: 2px solid var(--qc-border);
  border-radius: 0.55rem;
  background: var(--qc-surface);
  color: var(--qc-text);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.hash-tool__mode:hover {
  border-color: var(--qc-accent);
}

.hash-tool__mode--active {
  background: #fff;
  border-color: var(--qc-accent);
  box-shadow: 0 4px 14px rgba(109, 76, 65, 0.14);
}

.hash-tool__mode-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--qc-text);
}

.hash-tool__mode--active .hash-tool__mode-title {
  color: var(--qc-accent);
}

.hash-tool__mode-desc {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--qc-muted);
}

.hash-tool__lede {
  margin: 0 0 1rem;
  color: var(--qc-muted);
  line-height: 1.5;
}

.hash-tool__dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 11rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 3px dashed #6d4c41;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f5ebe0 100%);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.hash-tool__dropzone:hover,
.hash-tool__dropzone:focus-visible {
  outline: none;
  border-color: var(--qc-accent);
  box-shadow: 0 4px 16px rgba(109, 76, 65, 0.15);
}

.hash-tool__dropzone--active {
  border-color: var(--qc-accent);
  background: #fff;
}

.hash-tool__dropzone--filled {
  border-style: solid;
  border-color: #1a6b3a;
}

.hash-tool__dropzone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  margin-bottom: 0.25rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--qc-surface) 80%, #fff);
  color: var(--qc-accent);
}

.hash-tool__dropzone-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--qc-text);
}

.hash-tool__dropzone-hint {
  margin: 0;
  max-width: 22rem;
  font-size: 1rem;
  color: var(--qc-muted);
}

.hash-tool__dropzone-file {
  margin: 0.35rem 0 0;
  padding: 0.35rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--qc-accent);
  background: color-mix(in srgb, var(--qc-surface) 70%, #fff);
  border-radius: 999px;
}

.hash-tool__file-input,
input[type="file"][hidden] {
  display: none !important;
}

.hash-tool__field {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.hash-tool__field-label {
  font-size: 1rem;
  font-weight: 700;
}

.hash-tool__text-input {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.95rem;
  padding: 0.75rem 0.85rem;
  border: 2px solid var(--qc-border);
  border-radius: 0.45rem;
  background: #fff;
  color: var(--qc-text);
}

.hash-tool__text-input:focus {
  outline: 2px solid var(--qc-accent);
  outline-offset: 1px;
  border-color: var(--qc-accent);
}

.hash-tool__status {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.hash-tool__status--busy {
  color: var(--qc-muted);
}

.hash-tool__status--ok {
  color: #1a6b3a;
}

.hash-tool__status--fail {
  color: #9b2c2c;
}

.hash-tool__result {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--qc-border);
  border-radius: 0.5rem;
  background: #fff;
}

.hash-tool__result-label {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--qc-muted);
}

.hash-tool__result-file {
  margin: 0 0 1rem;
  word-break: break-all;
}

.hash-tool__hash {
  display: block;
  margin: 0 0 1rem;
  padding: 0.75rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-all;
  background: var(--qc-surface);
  border-radius: 0.35rem;
}

.hash-tool__verdict {
  margin-top: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: 0.55rem;
  border: 2px solid var(--qc-border);
}

.hash-tool__verdict--match {
  background: #eef8f0;
  border-color: #1a6b3a;
}

.hash-tool__verdict--fail {
  background: #fdf0f0;
  border-color: #9b2c2c;
}

.hash-tool__verdict-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.hash-tool__verdict--match .hash-tool__verdict-title {
  color: #1a6b3a;
}

.hash-tool__verdict--fail .hash-tool__verdict-title {
  color: #9b2c2c;
}

.hash-tool__verdict-file {
  margin: 0.5rem 0 0;
  font-weight: 600;
  word-break: break-all;
}

.hash-tool__verdict-message {
  margin: 0.35rem 0 0;
  color: var(--qc-text);
}

.hash-tool__help {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .hash-tool__modes {
    grid-template-columns: 1fr;
  }
}

/* —— QR code generator (qr-code.html) —— */
.qr-code {
  max-width: 42rem;
}

.qr-code__panel {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--qc-border);
  border-radius: 0.65rem;
  box-shadow: 0 2px 12px rgba(44, 44, 44, 0.06);
}

.qr-code__field {
  display: block;
  margin-bottom: 1.25rem;
}

.qr-code__field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.qr-code__textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font: inherit;
  line-height: 1.45;
  border: 1px solid var(--qc-border);
  border-radius: 0.45rem;
  resize: vertical;
  min-height: 5.5rem;
}

.qr-code__textarea:focus {
  outline: 2px solid var(--qc-teal);
  outline-offset: 1px;
  border-color: var(--qc-teal);
}

.qr-code__colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.qr-code__color {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qr-code__color input[type="color"] {
  width: 3rem;
  height: 2.5rem;
  padding: 0.15rem;
  border: 1px solid var(--qc-border);
  border-radius: 0.35rem;
  cursor: pointer;
  background: #fff;
}

.qr-code__status {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.qr-code__status--fail {
  color: #9b2c2c;
  font-weight: 600;
}

.qr-code__status--hint {
  color: var(--qc-muted);
}

.qr-code__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  background: var(--qc-surface);
  border: 1px dashed var(--qc-border);
  border-radius: 0.5rem;
}

.qr-code__preview--ready {
  background: #fff;
  border-style: solid;
}

.qr-code__empty {
  margin: 0;
  color: var(--qc-muted);
  text-align: center;
}

.qr-code__canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.qr-code__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .qr-code__colors {
    grid-template-columns: 1fr;
  }

  .qr-code__actions .btn {
    flex: 1 1 100%;
  }
}

/* —— Password generator (password-generator.html) —— */
.password-gen {
  max-width: 42rem;
}

.password-gen__panel {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--qc-border);
  border-radius: 0.65rem;
  box-shadow: 0 2px 12px rgba(44, 44, 44, 0.06);
}

.password-gen__panel-body {
  margin-top: 1.25rem;
}

.password-gen__field {
  margin-bottom: 1.25rem;
}

.password-gen__field--words {
  position: relative;
}

.password-gen__hover-tip {
  display: none;
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--qc-text);
  background: #fff;
  border: 1px solid var(--qc-teal);
  border-radius: 0.35rem;
  box-shadow: 0 2px 10px rgba(44, 44, 44, 0.1);
}

.password-gen__field--words:hover .password-gen__hover-tip,
.password-gen__field--words:focus-within .password-gen__hover-tip {
  display: block;
}

.password-gen__field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.password-gen__field input[type="range"] {
  width: 100%;
  margin-bottom: 0.5rem;
}

.password-gen__number {
  width: 5rem;
  padding: 0.4rem 0.5rem;
  font: inherit;
  border: 1px solid var(--qc-border);
  border-radius: 0.35rem;
}

.password-gen__charset,
.password-gen__separator {
  margin: 0 0 1.25rem;
  padding: 0;
  border: none;
}

.password-gen__charset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
}

.password-gen__check,
.password-gen__radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.password-gen__check--full {
  grid-column: 1 / -1;
}

.password-gen__hint {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--qc-muted);
}

.password-gen__main {
  margin-bottom: 1.25rem;
  padding-top: 0.25rem;
}

.password-gen__output--main {
  grid-column: auto;
  grid-row: auto;
  width: 100%;
}

.password-gen__strength--main {
  margin-top: 0.65rem;
}

.password-gen__batch {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--qc-border);
}

.password-gen__batch-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.password-gen__copy-batch {
  margin-top: 1rem;
}

.password-gen__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.password-gen__results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.password-gen__row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.password-gen__output {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.95rem;
  border: 1px solid var(--qc-border);
  border-radius: 0.35rem;
  background: var(--qc-surface);
}

.password-gen__strength {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.password-gen__strength-bar {
  flex: 1;
  height: 0.35rem;
  background: var(--qc-border);
  border-radius: 999px;
  overflow: hidden;
}

.password-gen__strength-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--qc-muted);
  transition: width 0.2s ease;
}

.password-gen__strength--weak .password-gen__strength-fill {
  background: #c53030;
}

.password-gen__strength--fair .password-gen__strength-fill {
  background: #d69e2e;
}

.password-gen__strength--good .password-gen__strength-fill {
  background: #2b6cb0;
}

.password-gen__strength--strong .password-gen__strength-fill {
  background: #276749;
}

.password-gen__strength-label {
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 3.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--qc-muted);
}

.password-gen__copy-row {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.password-gen__help {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .password-gen__charset {
    grid-template-columns: 1fr;
  }

  .password-gen__actions .btn {
    flex: 1 1 100%;
  }

  .password-gen__row {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .password-gen__copy-row {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .carousel__stage {
    grid-template-columns: 2.5rem 1fr 2.5rem;
    gap: 0.35rem;
  }

  .carousel__btn {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.25rem;
    font-size: 1.2rem;
  }

  .carousel__slide img,
  .carousel__slide-img {
    aspect-ratio: 16 / 10;
  }

  .carousel-lightbox {
    padding: 0.75rem;
  }
}

/* —— Online PDF editor (coming soon) —— */
.utility-soon {
  max-width: 42rem;
}

.utility-soon__panel {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--qc-border);
  border-radius: 0.65rem;
  box-shadow: 0 2px 12px rgba(44, 44, 44, 0.06);
}

.utility-soon__badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--qc-muted);
  background: var(--qc-surface);
  border: 1px solid var(--qc-border);
  border-radius: 999px;
}

.utility-soon__panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.utility-soon__lede {
  margin: 0 0 1rem;
  color: var(--qc-text);
}

.utility-soon__list {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--qc-text);
}

.utility-soon__list li {
  margin-bottom: 0.35rem;
}

.utility-soon__note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--qc-muted);
}

/* —— Online PDF tool (online-pdf-editor.html) —— */
.pdf-tool__file-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pdf-tool__file-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--qc-surface);
  border: 1px solid var(--qc-border);
  border-radius: 0.45rem;
}

.pdf-tool__file-name {
  grid-column: 1;
  font-weight: 600;
  word-break: break-word;
}

.pdf-tool__file-meta {
  grid-column: 1;
  font-size: 0.9rem;
  color: var(--qc-muted);
}

.pdf-tool__file-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  gap: 0.35rem;
}

.pdf-tool__icon-btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  border: 1px solid var(--qc-border);
  border-radius: 0.35rem;
  background: #fff;
  color: var(--qc-text);
  cursor: pointer;
}

.pdf-tool__icon-btn:hover:not(:disabled) {
  border-color: var(--qc-accent);
  color: var(--qc-accent);
}

.pdf-tool__icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pdf-tool__actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pdf-tool__actions--split {
  flex-direction: column;
  align-items: stretch;
}

@media (min-width: 36rem) {
  .pdf-tool__actions--split {
    flex-direction: row;
    align-items: center;
  }
}

.pdf-tool__info {
  margin: 1rem 0 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  background: #f5ebe0;
  border-radius: 0.4rem;
  color: var(--qc-text);
}

/* —— Online PDF app shell (v2 ribbon) —— */
.pdf-app__shell {
  border: 1px solid #b8c4d1;
  border-radius: 0.35rem;
  overflow: hidden;
  background: #f7f9fc;
  box-shadow: 0 2px 12px rgba(26, 35, 50, 0.12);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.pdf-app__menubar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  padding: 0.35rem 0.75rem;
  background: #dfe7ef;
  border-bottom: 1px solid #b8c4d1;
  color: #1a2332;
  font-size: 0.88rem;
}

.pdf-app__menubar-item {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.pdf-app__menubar-item:hover {
  text-decoration: underline;
}

.pdf-app__ribbon {
  background: #dfe7ef;
  border-bottom: 1px solid #b8c4d1;
}

.pdf-app__ribbon-tabs {
  display: flex;
  gap: 0.15rem;
  padding: 0.35rem 0.5rem 0;
  border-bottom: 1px solid var(--qc-border);
}

.pdf-app__ribbon-tab {
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  padding: 0.4rem 0.85rem;
  border-radius: 0.35rem 0.35rem 0 0;
  color: var(--qc-muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.pdf-app__ribbon-tab:hover {
  color: var(--qc-text);
  background: rgba(255, 255, 255, 0.55);
}

.pdf-app__ribbon-tab--active {
  color: #1a2332;
  background: #f0f4f8;
  border-color: #b8c4d1;
  margin-bottom: -1px;
  padding-bottom: calc(0.4rem + 1px);
  font-weight: 600;
}

.pdf-app__ribbon-body {
  min-height: 4.75rem;
  padding: 0.45rem 0.55rem 0.55rem;
  background: #f0f4f8;
}

.pdf-app__ribbon-panel {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.pdf-app__ribbon-panel[hidden] {
  display: none !important;
}

.pdf-app__ribbon-panel--active {
  display: flex;
}

.pdf-app__ribbon-group {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 0.65rem 0 0;
  border-right: 1px solid var(--qc-border);
}

.pdf-app__ribbon-group:last-child {
  border-right: none;
}

.pdf-app__ribbon-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: stretch;
  min-height: 3.35rem;
}

.pdf-app__ribbon-tools--style {
  align-items: center;
}

.pdf-app__ribbon-label {
  margin-top: 0.25rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--qc-muted);
}

.pdf-app__ribbon-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 3.25rem;
  border: 1px solid #b8c4d1;
  background: #f7f9fc;
  padding: 0.35rem 0.45rem 0.3rem;
  border-radius: 0.3rem;
  font-size: 0.72rem;
  color: #1a2332;
  cursor: pointer;
}

.pdf-app__ribbon-btn:hover:not(:disabled):not(.pdf-app__ribbon-btn--locked) {
  border-color: #2f5f8a;
  background: #fff;
}

.pdf-app__ribbon-btn--active {
  border-color: #2f5f8a;
  background: #e4eef6;
  font-weight: 600;
}

.pdf-app__ribbon-btn--locked {
  opacity: 0.42;
  cursor: pointer;
  pointer-events: auto;
}

.pdf-app__ribbon-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.pdf-app__color {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.72rem;
  color: var(--qc-muted);
}

.pdf-app__color input[type="color"] {
  width: 2.25rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--qc-border);
  border-radius: 0.25rem;
  cursor: pointer;
}

.pdf-app__free-note {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  color: var(--qc-muted);
  background: #f5ebe0;
  border-bottom: 1px solid var(--qc-border);
}

.pdf-app__free-note a {
  color: var(--qc-teal-dark);
  font-weight: 600;
}

.pdf-app__context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  color: var(--qc-muted);
  background: #f5ebe0;
  border-bottom: 1px solid var(--qc-border);
}

.pdf-app__context-bar[hidden] {
  display: none !important;
}

.pdf-app__context-text {
  margin: 0;
  flex: 1 1 12rem;
  line-height: 1.45;
  color: var(--qc-text);
}

.pdf-app__context-cta {
  flex-shrink: 0;
}

.pdf-app__context-cta[hidden] {
  display: none !important;
}

.pdf-app .btn--ghost {
  color: var(--qc-teal-dark);
  border-color: var(--qc-border);
  background: #fff;
}

.pdf-app .btn--ghost:hover:not(:disabled) {
  background: #e8f4f3;
  color: var(--qc-text);
  border-color: var(--qc-teal);
}

.pdf-app .btn--ghost:disabled {
  color: var(--qc-muted);
  background: #f0f0f0;
  border-color: var(--qc-border);
  opacity: 1;
}

.pdf-app__viewer-toolbar {
  color: var(--qc-text);
}

.pdf-app__tab-banner {
  margin: 0;
  padding: 0.75rem 0.85rem;
  font-size: 0.92rem;
  color: var(--qc-text);
  background: #e8f4f3;
  border-bottom: 1px solid var(--qc-border);
}

.pdf-app__tab-banner a {
  color: var(--qc-teal-dark);
  font-weight: 600;
}

.pdf-app__ribbon-note {
  margin: 0;
  flex: 1 1 12rem;
  padding: 0.35rem 0 0.35rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--qc-muted);
  border-top: none;
  border-left: 1px solid var(--qc-border);
  align-self: center;
}

.pdf-app__ribbon-note a {
  color: var(--qc-teal-dark);
  font-weight: 600;
}

.pdf-app__workspace {
  padding: 1.25rem;
}

.pdf-app__work[hidden] {
  display: none !important;
}

.pdf-app__viewer {
  margin-top: 1rem;
}

.pdf-app__viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.pdf-app__angle-label {
  font-weight: 600;
  color: var(--qc-teal-dark);
  min-width: 2.5rem;
  text-align: center;
}

.btn--sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.pdf-app__canvas-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 280px;
  margin: 0 auto;
  border: 1px solid var(--qc-border);
  border-radius: 0.35rem;
  overflow: auto;
  background: #ddd;
  padding: 0.5rem;
}

.pdf-app__canvas-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.pdf-app__canvas-wrap #pdf-rotate-canvas,
.pdf-app__canvas-wrap #pdf-annotate-canvas {
  background: #fff;
  box-shadow: 0 1px 6px rgba(26, 46, 53, 0.12);
}

.pdf-app__canvas-stack {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}

.pdf-app__canvas-stack canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

#pdf-annotate-overlay {
  position: absolute;
  left: 0;
  top: 0;
  cursor: crosshair;
  background: transparent;
  box-shadow: none;
}

.pdf-app__sign-preview {
  margin-top: 1rem;
  padding: 1.25rem;
  background: #f5ebe0;
  border-radius: 0.45rem;
  color: var(--qc-muted);
}

/* —— Page Merge (online PDF v3) —— */
.pdf-pmerge__drops {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

@media (min-width: 40rem) {
  .pdf-pmerge__drops {
    grid-template-columns: 1fr 1fr;
  }
}

.pdf-pmerge__drop-label {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--qc-text);
}

.hash-tool__dropzone--compact {
  padding: 1rem 0.85rem;
  min-height: 0;
}

.hash-tool__dropzone--compact .hash-tool__dropzone-title {
  font-size: 0.95rem;
}

.hash-tool__dropzone--compact .hash-tool__dropzone-hint {
  font-size: 0.82rem;
}

.pdf-pmerge {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
  min-height: 22rem;
}

@media (min-width: 52rem) {
  .pdf-pmerge {
    flex-direction: row;
    align-items: stretch;
  }
}

.pdf-pmerge__rail {
  flex: 0 0 auto;
  width: 100%;
  max-height: 16rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--qc-border);
  border-radius: 0.45rem;
  background: #f7faf9;
  overflow: hidden;
}

@media (min-width: 52rem) {
  .pdf-pmerge__rail {
    width: 140px;
    max-height: none;
  }

  .pdf-pmerge__rail--source {
    width: 140px;
  }
}

.pdf-pmerge__rail-title {
  margin: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--qc-muted);
  border-bottom: 1px solid var(--qc-border);
  background: #e8f0ef;
}

.pdf-pmerge__thumbs {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.45rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-content: flex-start;
}

@media (min-width: 52rem) {
  .pdf-pmerge__thumbs {
    flex-direction: column;
    flex-wrap: nowrap;
  }
}

.pdf-pmerge__empty {
  margin: 0.5rem 0.25rem;
  font-size: 0.8rem;
  color: var(--qc-muted);
  line-height: 1.35;
}

.pdf-pmerge__thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 6.5rem;
  padding: 0.35rem;
  border: 1px solid var(--qc-border);
  border-radius: 0.35rem;
  background: #fff;
  color: var(--qc-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
}

@media (min-width: 52rem) {
  .pdf-pmerge__thumb {
    width: 100%;
  }
}

.pdf-pmerge__thumb:hover {
  border-color: var(--qc-teal);
}

.pdf-pmerge__thumb--selected {
  border-color: var(--qc-teal);
  background: #e8f5f3;
  box-shadow: 0 0 0 1px var(--qc-teal);
}

.pdf-pmerge__thumb--draggable {
  cursor: grab;
}

.pdf-pmerge__thumb--dragging {
  opacity: 0.55;
}

.pdf-pmerge__thumb--drop-before {
  box-shadow: inset 0 3px 0 0 var(--qc-teal);
}

.pdf-pmerge__thumb-canvas-wrap {
  display: block;
  width: 100%;
  background: #ddd;
  border-radius: 0.2rem;
  overflow: hidden;
  line-height: 0;
}

.pdf-pmerge__thumb-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.pdf-pmerge__thumb-label {
  font-weight: 600;
  color: var(--qc-teal-dark);
}

.pdf-pmerge__drop-end {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem;
  border: 1px dashed var(--qc-border);
  border-radius: 0.35rem;
  font-size: 0.72rem;
  color: var(--qc-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-pmerge__drop-end--active {
  border-color: var(--qc-teal);
  background: #e8f5f3;
  color: var(--qc-teal-dark);
}

.pdf-pmerge__preview {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pdf-app__canvas-wrap #pdf-pmerge-canvas {
  background: #fff;
  box-shadow: 0 1px 6px rgba(26, 46, 53, 0.12);
}

@media (max-width: 36rem) {
  .pdf-app__ribbon-btn {
    min-width: 2.75rem;
    font-size: 0.65rem;
  }

  .pdf-app__ribbon-icon {
    font-size: 1rem;
  }
}

/* —— Excel Formula Doctor (formula-doctor.html) —— */
.formula-doctor {
  max-width: 42rem;
  margin: 0 auto;
}
.formula-doctor__panel {
  background: var(--qc-surface, #fff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.55rem;
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.formula-doctor__field {
  display: block;
  margin-bottom: 1rem;
}
.formula-doctor__context-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  margin-bottom: 0.15rem;
  align-items: flex-end;
}
.formula-doctor__context-row .formula-doctor__field {
  margin-bottom: 1rem;
  flex: 1 1 11rem;
  min-width: 0;
}
.formula-doctor__field--error {
  flex: 1.4 1 14rem;
}
.formula-doctor__field--cell {
  flex: 0.8 1 8rem;
  max-width: 14rem;
}
.formula-doctor__field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.formula-doctor__textarea,
.formula-doctor__text-input,
.formula-doctor__select {
  width: 100%;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 0.4rem;
  background: #fff;
  color: inherit;
  box-sizing: border-box;
}
.formula-doctor__select {
  font-family: "Source Sans 3", system-ui, sans-serif;
  cursor: pointer;
  appearance: auto;
}
.formula-doctor__textarea:focus,
.formula-doctor__text-input:focus,
.formula-doctor__select:focus {
  outline: 2px solid var(--qc-teal, #0d7377);
  outline-offset: 1px;
}
.formula-doctor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.25rem 0 0.75rem;
}
.formula-doctor__status {
  margin: 0.5rem 0 0;
  font-weight: 600;
}
.formula-doctor__status--ok {
  color: #1b6b3a;
}
.formula-doctor__status--warn {
  color: #8a5a00;
}
.formula-doctor__status--fail {
  color: #a12020;
}
.formula-doctor__explain {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(13, 115, 119, 0.06);
  border-radius: 0.4rem;
}
.formula-doctor__explain p {
  margin: 0.35rem 0;
}
.formula-doctor__results {
  margin-top: 1.15rem;
  display: grid;
  gap: 0.85rem;
}
.formula-doctor__finding {
  padding: 0.9rem 1rem;
  border-radius: 0.45rem;
  border-left: 4px solid #888;
  background: #faf8f5;
}
.formula-doctor__finding--error {
  border-left-color: #a12020;
  background: #fbf1f1;
}
.formula-doctor__finding--warn {
  border-left-color: #c48900;
  background: #fbf6eb;
}
.formula-doctor__finding--info {
  border-left-color: #0d7377;
}
.formula-doctor__finding-meta {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: var(--qc-muted, #5c5c5c);
}
.formula-doctor__id {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.formula-doctor__finding h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}
.formula-doctor__finding p {
  margin: 0.35rem 0;
}
.formula-doctor__book {
  font-size: 0.9rem;
}
.formula-doctor__empty {
  color: var(--qc-muted, #5c5c5c);
}


/* Formula Doctor — book-style breakdown */
.formula-doctor__breakdown {
  margin-top: 1.15rem;
  padding: 1rem 1.1rem 1.15rem;
  background: rgba(13, 115, 119, 0.06);
  border-radius: 0.45rem;
  border: 1px solid rgba(13, 115, 119, 0.15);
}
.formula-doctor__breakdown-title,
.formula-doctor__findings-title {
  margin: 0 0 0.55rem;
  font-size: 1.1rem;
}
.formula-doctor__findings-title {
  margin-top: 0.25rem;
}
.formula-doctor__breakdown-lede {
  margin: 0 0 0.4rem;
  color: var(--qc-muted, #5c5c5c);
}
.formula-doctor__map {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre;
  background: #fff;
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.formula-doctor__read {
  margin: 0 0 0.65rem;
}
.formula-doctor__parts {
  margin: 0;
  padding-left: 1.2rem;
}
.formula-doctor__parts li {
  margin: 0.25rem 0;
}
.formula-doctor__breakdown-note {
  margin: 0.5rem 0 0;
  color: var(--qc-muted, #5c5c5c);
}
.formula-doctor__finding h4 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.formula-doctor__condition-detail {
  margin: 0.85rem 0 0.5rem;
  padding: 0.75rem 0.85rem;
  background: #fff;
  border-radius: 0.35rem;
  border: 1px dashed rgba(13, 115, 119, 0.35);
}
.formula-doctor__condition-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}
.formula-doctor__map--nested {
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
}
.formula-doctor__example-wrap { margin: 0.5rem 0; }
.formula-doctor__example-btn,
.formula-doctor__copy-example {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid rgba(13, 115, 119, 0.45);
  background: #fff;
  color: var(--qc-teal, #0d7377);
  border-radius: 0.35rem;
  padding: 0.35rem 0.7rem;
}
.formula-doctor__example-btn:hover,
.formula-doctor__copy-example:hover {
  background: rgba(13, 115, 119, 0.08);
}
.formula-doctor__example-out {
  display: block;
  margin-top: 0.55rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.formula-doctor__example-code {
  display: block;
  margin: 0.35rem 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.formula-doctor__example-note {
  display: block;
  margin: 0.25rem 0 0.45rem;
  font-size: 0.9rem;
  color: var(--qc-muted, #5c5c5c);
}
