/* 55printing guideline template library UI
   Vars on :root so lightbox (outside .ff-tpl) still gets brand colors. */
:root {
  --tpl-brand: #558BCA;
  --tpl-brand-dark: #3a6da8;
  --tpl-brand-light: #e8f0fa;
  --tpl-dark: #1e293b;
  --tpl-text: #475569;
  --tpl-muted: #94a3b8;
  --tpl-bg: #f4f7fb;
  --tpl-border: #e6ebf2;
  --tpl-accent: #e11d48;
  --tpl-r: 14px;
  --tpl-shadow: 0 1px 3px rgba(30, 41, 59, 0.06), 0 1px 2px rgba(30, 41, 59, 0.04);
  --tpl-shadow-md: 0 8px 24px rgba(30, 41, 59, 0.1);
  --tpl-t: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ff-tpl {
  --tpl-brand: var(--brand, #558BCA);
  --tpl-brand-dark: var(--brand-dark, #3a6da8);
  --tpl-brand-light: var(--brand-light, #e8f0fa);
  --tpl-dark: var(--dark, #1e293b);
  --tpl-text: var(--text, #475569);
  --tpl-muted: var(--text-light, #94a3b8);
  --tpl-bg: var(--bg, #f4f7fb);
  --tpl-border: var(--border, #e6ebf2);
  --tpl-accent: var(--accent, #e11d48);
  max-width: 1280px;
  margin: 20px auto 56px;
  padding: 0 16px 8px;
  color: var(--tpl-dark);
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, sans-serif);
}

/* Inside the site Product Category layout: fill the main column, no double gutters */
.site-main-column > .ff-tpl,
.ff-tpl-shell-main .site-main-column .ff-tpl {
  max-width: none;
  margin: 0 0 24px;
  padding: 0;
}

.ff-tpl *,
.ff-tpl *::before,
.ff-tpl *::after {
  box-sizing: border-box;
}

/* Motion: fade-in sections */
@keyframes ffTplFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ff-tpl-anim {
  animation: ffTplFadeUp 0.55s var(--tpl-t) both;
}

.ff-tpl-anim--delay {
  animation-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  .ff-tpl-anim,
  .ff-tpl-card,
  .ff-tpl-cat,
  .ff-tpl-lightbox__dialog {
    animation: none !important;
    transition: none !important;
  }
}

/* Hero */
.ff-tpl-hero {
  margin-bottom: 22px;
}

.ff-tpl-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--tpl-muted);
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.ff-tpl-crumb a {
  color: var(--tpl-brand-dark);
  text-decoration: none;
  font-weight: 600;
}

.ff-tpl-crumb a:hover {
  text-decoration: underline;
}

.ff-tpl-crumb__sep {
  opacity: 0.5;
}

.ff-tpl-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--tpl-dark);
}

.ff-tpl-lead {
  margin: 0 0 16px;
  max-width: 46rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--tpl-text);
}

.ff-tpl-copy {
  margin: 0 0 18px;
  max-width: 48rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--tpl-text);
}

.ff-tpl-copy p {
  margin: 0 0 12px;
}

.ff-tpl-copy p:last-child {
  margin-bottom: 0;
}

.ff-tpl-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.ff-tpl-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e40af;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
}

.ff-tpl-pill i {
  color: var(--tpl-brand);
}

.ff-tpl-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ff-tpl-tip {
  margin-top: 4px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--tpl-text);
}

.ff-tpl-tip strong {
  color: var(--tpl-brand-dark);
}

/* Shared layout: category cards LEFT, page content RIGHT */
.ff-tpl-layout {
  display: grid;
  gap: 20px;
  margin-bottom: 8px;
  align-items: start;
}

.ff-tpl-layout__nav {
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--tpl-border);
  border-radius: var(--tpl-r);
  box-shadow: var(--tpl-shadow);
}

.ff-tpl-layout__main {
  min-width: 0;
}

.ff-tpl-layout__main .ff-tpl-lead,
.ff-tpl-layout__main .ff-tpl-copy {
  max-width: none;
}

.ff-tpl-nav-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ff-tpl-nav-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tpl-dark);
}

.ff-tpl-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tpl-muted);
}

.ff-tpl-nav-links a {
  color: var(--tpl-brand-dark);
  text-decoration: none;
}

.ff-tpl-nav-links a:hover {
  text-decoration: underline;
}

.ff-tpl-search--nav {
  margin-bottom: 10px;
}

.ff-tpl-nav-count {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--tpl-muted);
}

.ff-tpl-cats--nav {
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: min(70vh, 720px);
  overflow: auto;
  padding-right: 2px;
}

.ff-tpl-cats--nav .ff-tpl-cat {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 10px 12px;
}

.ff-tpl-cats--nav .ff-tpl-cat__icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-size: 1rem;
}

.ff-tpl-cat__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ff-tpl-cat__text strong {
  font-size: 0.92rem;
}

.ff-tpl-cat__text span {
  font-size: 0.78rem;
}

.ff-tpl-cat.is-active {
  border-color: var(--tpl-brand);
  background: linear-gradient(145deg, var(--tpl-brand-light), #fff);
  box-shadow: 0 0 0 1px rgba(85, 139, 202, 0.25);
}

.ff-tpl-empty--nav {
  padding: 18px 12px;
  margin-top: 8px;
}

@media (min-width: 900px) {
  .ff-tpl-layout {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 24px 28px;
  }

  .ff-tpl-layout__nav {
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .ff-tpl-cats--nav {
    max-height: none;
    overflow: visible;
  }
}

@media (min-width: 1100px) {
  .ff-tpl-layout {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  }
}

/* Sticky toolbar */
.ff-tpl-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--tpl-border);
  border-radius: 14px;
  box-shadow: var(--tpl-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ff-tpl-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}

.ff-tpl-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tpl-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.ff-tpl-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--tpl-border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--tpl-dark);
  background: #fff;
  outline: none;
  transition: border-color var(--tpl-t), box-shadow var(--tpl-t);
}

.ff-tpl-search input:focus {
  border-color: var(--tpl-brand);
  box-shadow: 0 0 0 3px rgba(85, 139, 202, 0.2);
}

.ff-tpl-toolbar__side {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ff-tpl-select {
  padding: 9px 12px;
  border: 1px solid var(--tpl-border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--tpl-dark);
}

.ff-tpl-count {
  font-size: 0.86rem;
  color: var(--tpl-muted);
  font-weight: 600;
  white-space: nowrap;
}

.ff-tpl-view-toggle {
  display: inline-flex;
  border: 1px solid var(--tpl-border);
  border-radius: 10px;
  overflow: hidden;
}

.ff-tpl-view-toggle button {
  border: 0;
  background: #fff;
  color: var(--tpl-muted);
  padding: 9px 11px;
  cursor: pointer;
  font-size: 0.9rem;
}

.ff-tpl-view-toggle button.is-active {
  background: var(--tpl-brand-light);
  color: var(--tpl-brand-dark);
}

/* Buttons (hex fallbacks: lightbox sits outside .ff-tpl) */
.ff-tpl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--tpl-t, 0.28s), box-shadow var(--tpl-t, 0.28s), background var(--tpl-t, 0.28s), color var(--tpl-t, 0.28s);
}

.ff-tpl-btn--primary {
  background: #3a6da8;
  background: linear-gradient(135deg, var(--tpl-brand, #558BCA) 0%, var(--tpl-brand-dark, #3a6da8) 100%);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(85, 139, 202, 0.28);
}

.ff-tpl-btn--primary:hover,
.ff-tpl-btn--primary:focus-visible {
  transform: translateY(-1px);
  color: #fff !important;
  background: #2f5d90;
  background: linear-gradient(135deg, var(--tpl-brand-dark, #3a6da8) 0%, #2f5d90 100%);
  outline: none;
}

.ff-tpl-btn--primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(85, 139, 202, 0.45), 0 8px 20px rgba(85, 139, 202, 0.28);
}

.ff-tpl-btn--ghost {
  background: #fff;
  border-color: var(--tpl-border, #e6ebf2);
  color: var(--tpl-dark, #1e293b);
}

.ff-tpl-btn--ghost:hover,
.ff-tpl-btn--ghost:focus-visible {
  border-color: var(--tpl-brand, #558BCA);
  color: var(--tpl-brand-dark, #3a6da8);
  outline: none;
}

.ff-tpl-btn--link {
  background: transparent;
  color: var(--tpl-brand-dark);
  padding: 8px 4px;
  box-shadow: none;
}

/* Category grid (hub) */
.ff-tpl-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ff-tpl-cat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px 16px;
  background: #fff;
  border: 1px solid var(--tpl-border);
  border-radius: var(--tpl-r);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--tpl-shadow);
  transition: transform var(--tpl-t), box-shadow var(--tpl-t), border-color var(--tpl-t);
  min-height: 132px;
}

.ff-tpl-cat:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: var(--tpl-shadow-md);
  color: inherit;
  text-decoration: none;
}

.ff-tpl-cat.is-hidden {
  display: none;
}

.ff-tpl-cats > li:has(.ff-tpl-cat.is-hidden) {
  display: none;
}

.ff-tpl-cat__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--tpl-brand-light), #fff);
  color: var(--tpl-brand-dark);
  font-size: 1.15rem;
  border: 1px solid rgba(85, 139, 202, 0.18);
}

.ff-tpl-cat strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.3;
}

.ff-tpl-cat span {
  font-size: 0.88rem;
  color: var(--tpl-muted);
}

/* File cards */
.ff-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.ff-tpl-grid.is-list {
  grid-template-columns: 1fr;
}

.ff-tpl-grid.is-list .ff-tpl-card--file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.ff-tpl-grid.is-list .ff-tpl-card__preview {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  text-align: left;
  padding: 10px;
}

.ff-tpl-grid.is-list .ff-tpl-card__media {
  width: 120px;
  height: 90px;
  min-height: 90px;
  max-height: 96px;
  padding: 6px;
  border-radius: 10px;
  flex-shrink: 0;
}

.ff-tpl-grid.is-list .ff-tpl-card__dl {
  align-self: center;
  margin: 0 12px 0 0;
  border-radius: 10px;
}

.ff-tpl-card--file {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--tpl-border);
  border-radius: var(--tpl-r);
  overflow: hidden;
  box-shadow: var(--tpl-shadow);
  transition: transform var(--tpl-t), box-shadow var(--tpl-t), border-color var(--tpl-t);
}

.ff-tpl-card--file:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: var(--tpl-shadow-md);
}

.ff-tpl-card--file.is-hidden {
  display: none;
}

.ff-tpl-card__preview {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.ff-tpl-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 148px;
  min-height: 148px;
  max-height: 168px;
  box-sizing: border-box;
  padding: 10px;
  background: linear-gradient(145deg, #eef2f7, #e2e8f0);
  overflow: hidden;
}

.ff-tpl-card__media img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 0.35s var(--tpl-t);
}

.ff-tpl-card__media .ff-tpl-card__ph {
  position: absolute;
  inset: 0;
}

.ff-tpl-card--file:hover .ff-tpl-card__media img {
  transform: scale(1.03);
}

.ff-tpl-card__ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--tpl-brand-dark);
  background: linear-gradient(145deg, var(--tpl-brand-light), #fff);
}

.ff-tpl-card__ph i {
  font-size: 1.6rem;
  opacity: 0.9;
}

.ff-tpl-card__ph-ext {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tpl-muted);
}

.ff-tpl-card__zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.78rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--tpl-t), transform var(--tpl-t);
}

.ff-tpl-card--file:hover .ff-tpl-card__zoom,
.ff-tpl-card__preview:focus-visible .ff-tpl-card__zoom {
  opacity: 1;
  transform: translateY(0);
}

.ff-tpl-card__body {
  display: block;
  padding: 12px 12px 4px;
}

.ff-tpl-card__title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--tpl-dark);
}

.ff-tpl-card__meta {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--tpl-muted);
}

.ff-tpl-card__dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 10px 12px 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--tpl-brand-light);
  color: var(--tpl-brand-dark);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(85, 139, 202, 0.22);
  transition: background var(--tpl-t), color var(--tpl-t);
}

.ff-tpl-card__dl:hover {
  background: var(--tpl-brand);
  color: #fff;
  text-decoration: none;
}

/* Subfolder cards */
.ff-tpl-subs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.ff-tpl-sub {
  display: block;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--tpl-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--tpl-shadow);
  transition: transform var(--tpl-t), box-shadow var(--tpl-t), border-color var(--tpl-t);
}

.ff-tpl-sub:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: var(--tpl-shadow-md);
  color: inherit;
  text-decoration: none;
}

.ff-tpl-sub strong {
  display: block;
  margin-bottom: 4px;
}

.ff-tpl-sub span {
  color: var(--tpl-muted);
  font-size: 0.88rem;
}

/* Gallery sections */
.ff-tpl-section {
  margin-bottom: 36px;
  scroll-margin-top: 88px;
}

.ff-tpl-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--tpl-brand);
}

.ff-tpl-section__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tpl-dark);
}

.ff-tpl-section__head a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tpl-brand-dark);
  text-decoration: none;
}

.ff-tpl-section__head a:hover {
  text-decoration: underline;
}

.ff-tpl-section.is-hidden {
  display: none;
}

.ff-tpl-section__sub {
  margin: 18px 0 10px;
  font-size: 1rem;
  color: var(--tpl-text);
}

.ff-tpl-section__sub a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tpl-brand-dark);
  text-decoration: none;
}

.ff-tpl-section__sub a:hover {
  text-decoration: underline;
}

/* Empty / note */
.ff-tpl-empty {
  text-align: center;
  padding: 36px 18px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: var(--tpl-text);
}

.ff-tpl-empty i {
  font-size: 1.6rem;
  color: var(--tpl-brand);
  margin-bottom: 10px;
}

.ff-tpl-empty[hidden] {
  display: none !important;
}

.ff-tpl-note {
  margin-top: 24px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--tpl-border);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--tpl-text);
  box-shadow: var(--tpl-shadow);
}

.ff-tpl-note a {
  color: var(--tpl-brand-dark);
  font-weight: 700;
}

/* Lightbox */
.ff-tpl-lightbox[hidden] {
  display: none !important;
}

.ff-tpl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ff-tpl-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(3px);
}

.ff-tpl-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.9fr);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  animation: ffTplFadeUp 0.28s ease both;
}

.ff-tpl-lightbox__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--tpl-dark);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.ff-tpl-lightbox__media {
  position: relative;
  min-height: 200px;
  max-height: 70vh;
  overflow: hidden;
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.ff-tpl-lightbox__media img {
  max-width: 100%;
  max-height: min(70vh, 560px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  box-shadow: var(--tpl-shadow);
  background: #fff;
}

.ff-tpl-lightbox__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--tpl-brand-dark);
  text-align: center;
  padding: 24px;
  font-size: 0.92rem;
}

.ff-tpl-lightbox__placeholder i {
  font-size: 2rem;
}

.ff-tpl-lightbox__placeholder[hidden] {
  display: none !important;
}

.ff-tpl-lightbox__meta {
  padding: 28px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ff-tpl-lightbox__meta h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
  padding-right: 28px;
}

.ff-tpl-lightbox__sub {
  margin: 0;
  color: var(--tpl-muted);
  font-size: 0.9rem;
}

.ff-tpl-lightbox__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* Bulletproof CTA: never inherit white-on-white from theme/parent */
.ff-tpl-lightbox__actions .ff-tpl-btn--primary,
#ffTplLightboxDl.ff-tpl-btn--primary {
  background: #3a6da8 !important;
  background-image: linear-gradient(135deg, #558BCA 0%, #3a6da8 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  min-height: 44px;
  padding: 12px 18px;
}

.ff-tpl-lightbox__actions .ff-tpl-btn--primary:hover,
.ff-tpl-lightbox__actions .ff-tpl-btn--primary:focus-visible,
#ffTplLightboxDl.ff-tpl-btn--primary:hover,
#ffTplLightboxDl.ff-tpl-btn--primary:focus-visible {
  background: #2f5d90 !important;
  background-image: linear-gradient(135deg, #3a6da8 0%, #2f5d90 100%) !important;
  color: #fff !important;
}

.ff-tpl-lightbox__dl-icon {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  fill: currentColor;
}

.ff-tpl-lightbox__hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--tpl-muted, #94a3b8);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .ff-tpl-toolbar {
    top: 0;
    padding: 10px;
  }

  .ff-tpl-lightbox__dialog {
    grid-template-columns: 1fr;
    max-height: 94vh;
  }

  .ff-tpl-lightbox__media {
    min-height: 200px;
  }

  .ff-tpl-lightbox__media img {
    max-height: 42vh;
  }

  .ff-tpl-grid.is-list .ff-tpl-card__preview {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}
