html {
  scroll-behavior: smooth;
}

.pkp_brand_footer {
  display: none !important;
}

/* Lightbox background */
.lightbox-target {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s;
  z-index: 9999;
  text-align: center;
}

/* Show lightbox when targeted */
.lightbox-target:target {
  opacity: 1;
  visibility: visible;
}

/* Lightbox image */
.lightbox-target img {
  margin: auto;
  max-height: 90%;
  max-width: 90%;
  display: block;
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  box-shadow: 0 0 12px #000;
  border-radius: 6px;
}

/* Close button */
.lightbox-target:target::after {
  content: "?";
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

/* Apple-style sidebar menu */
.sidebar-apple-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.sidebar-apple-menu ul li {
  margin-bottom: 10px;
}

.sidebar-apple-menu ul li a {
  color: #444;
  text-decoration: none;
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
  transition: color 0.3s ease;
}

/* Classy hover effect with underline */
.sidebar-apple-menu ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: #888;
  transition: width 0.3s ease;
}

.sidebar-apple-menu ul li a:hover {
  color: #000;
}

.sidebar-apple-menu ul li a:hover::after {
  width: 100%;
}

/* ===== Wrapper (Apple style) ===== */
.tsrj-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #333;
  font-size: 16px;
  line-height: 1.7;
  max-width: 960px;
  margin: 0 auto 20px;
  padding: 0 12px;
}

/* Headings */
.tsrj-wrapper h1,
.tsrj-wrapper h2,
.tsrj-wrapper h3,
.tsrj-wrapper h4 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 30px;
  margin-bottom: 10px;
  color: #007aff; /* Apple blue */
}

.tsrj-wrapper h1 { font-size: 28px; }
.tsrj-wrapper h2 { font-size: 24px; }
.tsrj-wrapper h3 { font-size: 20px; }
.tsrj-wrapper h4 { font-size: 18px; }

/* Paragraphs */
.tsrj-wrapper p { margin-bottom: 16px; }

/* Lists */
.tsrj-wrapper ul,
.tsrj-wrapper ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.tsrj-wrapper ul li,
.tsrj-wrapper ol li { margin-bottom: 8px; }

/* Links */
.tsrj-wrapper a {
  color: #007aff;
  text-decoration: none;
  border-bottom: 1px solid #cce6ff;
  transition: border-color 0.2s;
}
.tsrj-wrapper a:hover { border-bottom-color: #007aff; }

/* Blockquotes */
.tsrj-wrapper blockquote {
  border-left: 4px solid #ccc;
  padding-left: 15px;
  color: #666;
  font-style: italic;
  margin: 20px 0;
}

/* Images */
.tsrj-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Subheadings (inline emphasis) */
.tsrj-subheading {
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 10px;
  color: #222;
  font-size: 17px;
}

/* ===== ACCORDION — canonical rules (compact, Apple-style) ===== */

/* Container */
.tsrj-accordion {
  max-width: 960px;
  margin: 8px auto 24px;     /* small top margin under Overview */
  padding: 0 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Each item controls its own spacing (no extra vertical gaps) */
.tsrj-acc-item {
  margin: 0 !important;
  padding: 0 !important;
}

/* Minimal space ONLY between items */
.tsrj-acc-item + .tsrj-acc-item {
  margin-top: 6px !important;
}

/* Clickable heading (blue) */
.tsrj-acc-header {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  margin: 0 !important;                 /* kills stray margins */
  font-size: 18px;
  font-weight: 600;
  color: #007aff;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  cursor: pointer;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Arrow */
.tsrj-acc-header::after {
  content: '▾';
  font-size: 16px;
  color: #666;
  transition: transform .25s ease, color .25s ease;
  margin-left: 12px;
}

.tsrj-acc-header:hover {
  background: #f9f9f9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.tsrj-acc-header[aria-expanded="true"] {
  background: #f2f8ff;
  border-color: #cfe3ff;
}

.tsrj-acc-header[aria-expanded="true"]::after {
  transform: rotate(180deg);
  color: #007aff;
}

/* Panel — fully compact when closed (no white gap) */
.tsrj-acc-content {
  /* animation model */
  overflow: hidden;
  max-height: 0;                        /* closed */
  opacity: 0;
  transition: max-height 280ms ease, opacity 200ms ease;

  /* visual */
  padding: 0 20px;                      /* no vertical padding while closed */
  margin: 0 !important;                 /* kills stray margins */
  border: 1px solid #e5e5e5;
  border-top: none;                     /* seamless with header */
  border-radius: 0 0 10px 10px;
  background: #fff;
  line-height: 1.65;
  color: #333;
}

/* when opened by JS */
.tsrj-acc-content.is-open {
  opacity: 1;
  padding: 16px 20px;                   /* vertical padding appears only when open */
  max-height: 1200px;                   /* large enough for most panels */
}

/* inner spacing */
.tsrj-acc-content p { margin: 0 0 12px; }
.tsrj-acc-content ul,
.tsrj-acc-content ol { margin: 6px 0 12px; padding-left: 20px; }
.tsrj-acc-content li { margin-bottom: 5px; }

/* responsive tweak */
@media (max-width: 600px) {
  .tsrj-acc-header { font-size: 17px; padding: 12px 16px; }
  .tsrj-acc-content.is-open { padding: 14px 16px; }
}

/* ===== Back to Top — Apple-style pill ===== */
.tsrj-backtotop {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border: 1px solid #e5e5e5;
  border-radius: 22px;
  background: #fff;
  color: #007aff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none; /* avoid focusing when hidden */
}

.tsrj-backtotop:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  border-color: #cfe3ff;
}

.tsrj-backtotop:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.25), 0 6px 18px rgba(0,0,0,0.08);
}

/* Visible state toggled by JS */
.tsrj-backtotop.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .tsrj-backtotop { transition: none; }
  html { scroll-behavior: auto; }
}


/* Lead line */
.tsrj-lead {
  font-size: 17px;
  margin: 8px 0 18px;
  color: #333;
}

/* CTA row */
.tsrj-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 24px;
}

/* Apple-style buttons */
.tsrj-btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  line-height: 1;
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
  border: 1px solid transparent;
  min-width: 132px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

/* Primary (blue) */
.tsrj-btn--primary {
  background: #007aff;
  color: #ffffff !important;    /* Force white text */
  border-color: #007aff;
  box-shadow: 0 6px 18px rgba(0,122,255,0.22);
  text-decoration: none;        /* Prevent underline */
}
.tsrj-btn--primary:hover {
  background: #0a6fe8;
  color: #ffffff !important;    /* Keep white text on hover */
  border-color: #0a6fe8;
  box-shadow: 0 8px 22px rgba(0,122,255,0.28);
}



/* Secondary (neutral outline) */
.tsrj-btn--secondary {
  background: #fff;
  color: #0a0a0a;
  border-color: #e5e5e5;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.tsrj-btn--secondary:hover {
  border-color: #cfe3ff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* Focus ring */
.tsrj-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,122,255,.25), 0 6px 18px rgba(0,0,0,.08);
}

/* Optional steps block */
.tsrj-submission-steps h3 {
  font-size: 20px;
  margin-top: 12px;
}
.tsrj-submission-steps ol {
  margin: 8px 0 0 20px;
}
.tsrj-submission-steps li {
  margin-bottom: 6px;
}

/* Responsive */
@media (max-width: 560px) {
  .tsrj-cta-row { gap: 10px; }
  .tsrj-btn { flex: 1 1 100%; min-width: 0; }
}
