:root {
  --jf-radius: 18px;
  --jf-radius-sm: 12px;
  --jf-shadow: 0 18px 48px rgba(16, 36, 62, 0.10);
  --jf-shadow-soft: 0 8px 24px rgba(16, 36, 62, 0.07);
  --jf-font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
  --jf-base-size: 16px;
  --jf-article-size: 18px;
  --jf-single-h1: 44px;
  --jf-home-title: 36px;
  /* Ad slot reserved heights to prevent layout shift (CLS) */
  --jf-ad-leaderboard: 90px;
  --jf-ad-rectangle: 250px;
  --jf-ad-sidebar: 250px;
}

html {
  scroll-behavior: smooth;
}

/* Screen-reader only (accessible H1 / labels without visual weight) */
.jf-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  direction: rtl;
  font-family: var(--jf-font-family);
  font-size: var(--jf-base-size);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--wp--preset--color--jf-paper);
  color: var(--wp--preset--color--jf-ink);
}

img {
  max-width: 100%;
  height: auto;
}

.wp-site-blocks {
  overflow-x: clip;
}

.jf-container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}

.jf-card,
.jf-sidebar-card,
.jf-feature-card,
.jf-section-card,
.jf-tool-card,
.jf-post-shell,
.jf-page-shell,
.jf-faq-card {
  background: var(--wp--preset--color--jf-card);
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: var(--jf-radius);
  box-shadow: var(--jf-shadow-soft);
}

/* Header */
.jf-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--wp--preset--color--jf-card) 92%, transparent);
  border-bottom: 1px solid var(--wp--preset--color--jf-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.admin-bar .jf-site-header {
  top: 32px;
}

.jf-header-inner {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  min-height: 72px;
}

.jf-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.jf-logo-mark {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--wp--preset--color--jf-navy), #246bfe);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 25px rgba(36, 107, 254, 0.18);
}

.jf-logo-text {
  line-height: 1.1;
}

.jf-logo-text .wp-block-site-title,
.jf-logo-text .wp-block-site-title a {
  margin: 0;
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--wp--preset--color--jf-navy);
}

.jf-brand-note {
  margin: 5px 0 0;
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.jf-main-nav {
  justify-self: center;
}

.jf-main-nav a {
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 800;
}

.jf-main-nav .wp-block-navigation__container {
  gap: clamp(12px, 2vw, 22px);
}

.jf-header-utilities {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.jf-header-search {
  max-width: 320px;
}

.jf-header-search .wp-block-search__inside-wrapper {
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  min-height: 44px;
  box-shadow: 0 8px 20px rgba(16, 36, 62, 0.05);
}

.jf-header-search input {
  min-width: 155px;
  max-width: 210px;
  border: 0 !important;
  padding-inline: 14px !important;
  font-size: 0.92rem;
}

.jf-header-search button {
  border-radius: 999px !important;
  padding: 0.55rem 1rem !important;
  margin: 3px !important;
  font-size: 0.9rem;
  background: var(--wp--preset--color--jf-navy) !important;
}

.jf-header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(242, 184, 75, 0.18);
  color: var(--wp--preset--color--jf-navy);
  border: 1px solid rgba(242, 184, 75, 0.45);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.jf-header-cta:hover {
  background: var(--wp--preset--color--jf-gold);
  color: var(--wp--preset--color--jf-navy);
}

/* Magazine hero */
.jf-main {
  min-height: 50vh;
}

.jf-hero {
  padding-block: clamp(22px, 4vw, 46px);
}

.jf-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  gap: clamp(16px, 3vw, 26px);
  align-items: stretch;
}

.jf-feature-card {
  position: relative;
  padding: clamp(18px, 3vw, 28px);
  overflow: hidden;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.jf-feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 14%, rgba(242, 184, 75, .20), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(36, 107, 254, .13), transparent 36%);
  pointer-events: none;
}

.jf-feature-card > * {
  position: relative;
  z-index: 1;
}

.jf-feature-card .wp-block-post-featured-image {
  margin: 0 0 1.1rem;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 7.5;
  background: var(--wp--preset--color--jf-border);
}

.jf-feature-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jf-feature-card .wp-block-post-title {
  margin-block: 0.65rem 0.45rem;
  font-size: clamp(1.65rem, 3vw, var(--jf-home-title));
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.jf-feature-card .wp-block-post-title a,
.jf-card .wp-block-post-title a,
.jf-list-post a {
  text-decoration: none;
}

.jf-feature-card .wp-block-post-excerpt p {
  margin: 0;
  color: var(--wp--preset--color--jf-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.jf-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 0.35rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(242, 184, 75, 0.20);
  color: var(--wp--preset--color--jf-navy);
  border: 1px solid rgba(242, 184, 75, 0.35);
  font-size: 0.78rem;
  font-weight: 900;
}

.jf-side-stack {
  display: grid;
  gap: 14px;
}

.jf-mini-card {
  padding: 16px;
  border-radius: var(--jf-radius);
  background: #fff;
  border: 1px solid var(--wp--preset--color--jf-border);
}

.jf-mini-card p {
  margin: 0;
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.98rem;
  line-height: 1.8;
}

.jf-mini-card strong {
  display: block;
  color: var(--wp--preset--color--jf-navy);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.jf-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-block: 0 16px;
}

.jf-section-title h2,
.jf-section-title h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.jf-section-kicker {
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.94rem;
  margin: 0;
}

.jf-post-grid .wp-block-post-template,
.jf-post-grid.wp-block-query .wp-block-post-template,
.jf-category-grid .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.jf-card {
  padding: 14px;
  height: 100%;
}

.jf-card .wp-block-post-featured-image {
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 12px;
  aspect-ratio: 16 / 10;
  background: var(--wp--preset--color--jf-border);
}

.jf-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jf-card .wp-block-post-title {
  font-size: 1.08rem;
  line-height: 1.45;
  margin-block: 0.45rem;
}

.jf-card .wp-block-post-excerpt p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--wp--preset--color--jf-muted);
}

.jf-meta-row,
.jf-card .wp-block-post-date,
.jf-card .wp-block-post-terms,
.jf-feature-card .wp-block-post-date,
.jf-post-meta {
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.82rem;
}

/* Tools */
.jf-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.jf-tool-card {
  padding: 16px;
  min-height: 118px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.jf-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--jf-shadow);
}

.jf-tool-card a {
  text-decoration: none;
  color: inherit;
}

.jf-tool-card h3 {
  font-size: 1.16rem;
  margin-block: 0 0.4rem;
}

.jf-tool-card p:not(.jf-tool-icon) {
  margin: 0;
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.jf-tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(36, 107, 254, 0.10);
  color: #246bfe;
  font-weight: 900;
  margin: 0 0 12px;
}

/* Ads */
.jf-ad,
.jf-ad-placeholder,
.jf-ad-slot {
  border-radius: var(--jf-radius-sm);
  text-align: center;
  overflow: hidden;
}

.jf-ad {
  margin-block: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reserve space per ad type to prevent layout shift (CLS) */
.jf-ad-leaderboard,
.jf-ad-placeholder.jf-ad-leaderboard {
  min-height: var(--jf-ad-leaderboard);
}

.jf-ad-rectangle,
.jf-ad-placeholder.jf-ad-rectangle {
  min-height: var(--jf-ad-rectangle);
}

.jf-ad-sidebar,
.jf-ad-placeholder.jf-ad-sidebar {
  min-height: var(--jf-ad-sidebar);
}

.jf-ad-placeholder,
.jf-ad-slot {
  padding: 14px;
  color: var(--wp--preset--color--jf-muted);
  border: 1px dashed rgba(102, 112, 133, 0.35);
  border: 1px dashed color-mix(in srgb, var(--wp--preset--color--jf-muted) 35%, transparent);
  background:
    repeating-linear-gradient(135deg, rgba(16, 36, 62, .025), rgba(16, 36, 62, .025) 8px, transparent 8px, transparent 16px),
    #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Per-device ad suppression (set via body_class) */
.jf-ads-off-desktop .jf-ad,
.jf-ads-off-desktop .jf-ad-placeholder {
  display: none;
}

@media (max-width: 640px) {
  .jf-ads-off-mobile .jf-ad,
  .jf-ads-off-mobile .jf-ad-placeholder {
    display: none;
  }
}

/* Mobile-only anchor ad shown on small screens only */
.jf-ad-mobile-anchor-ad {
  display: none;
}

@media (max-width: 640px) {
  .jf-ad-mobile-anchor-ad {
    display: flex;
  }
}

.jf-ad-placeholder span {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.jf-ad-placeholder code,
.jf-ad-slot code {
  direction: ltr;
  display: inline-block;
  background: rgba(16, 36, 62, .06);
  border-radius: 999px;
  padding: .25rem .6rem;
  font-size: 0.85rem;
}

/* Content */
.jf-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
}

.jf-post-shell,
.jf-page-shell {
  padding: clamp(18px, 3vw, 34px);
}

.jf-post-shell > .wp-block-post-title,
.jf-page-shell > .wp-block-post-title {
  max-width: 920px;
  margin: 0 auto 0.8rem;
  text-align: center;
  font-size: clamp(1.55rem, 2.5vw, var(--jf-single-h1)) !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.jf-post-shell .wp-block-post-featured-image,
.jf-page-shell .wp-block-post-featured-image,
.jf-featured-image {
  border-radius: var(--jf-radius);
  overflow: hidden;
  margin: 1.25rem auto 1.5rem;
  max-width: 920px;
  background: var(--wp--preset--color--jf-border);
}

.jf-featured-image img {
  display: block;
  width: 100%;
  height: auto;
}

.jf-article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem 0;
  max-width: 920px;
  margin: 0.2rem auto 0.95rem;
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.jf-article-meta .jf-meta-item {
  display: inline-flex;
  align-items: center;
}

.jf-article-meta .jf-meta-item + .jf-meta-item::before {
  content: "•";
  margin-inline: 0.55rem;
  color: var(--wp--preset--color--jf-border);
}

.jf-article-meta a {
  color: inherit;
  text-decoration: none;
}

.jf-article-meta a:hover,
.jf-article-meta a:focus-visible {
  color: var(--wp--preset--color--jf-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jf-post-shell .wp-block-post-content,
.jf-page-shell .wp-block-post-content {
  max-width: 760px;
  margin-inline: auto;
  font-size: var(--jf-article-size);
  line-height: 1.95;
}

.jf-post-shell .wp-block-post-content p,
.jf-page-shell .wp-block-post-content p {
  font-size: var(--jf-article-size) !important;
  line-height: 1.9;
  margin-block: 0 1rem;
}

.jf-post-shell .wp-block-post-content ul,
.jf-post-shell .wp-block-post-content ol,
.jf-page-shell .wp-block-post-content ul,
.jf-page-shell .wp-block-post-content ol {
  margin-block: 0.8rem 1.35rem;
  padding-inline-start: 1.45rem;
}

.jf-post-shell .wp-block-post-content li,
.jf-page-shell .wp-block-post-content li {
  font-size: var(--jf-article-size) !important;
  line-height: 1.72;
  margin-block: 0.18rem;
}

.jf-post-shell .wp-block-post-content li::marker,
.jf-page-shell .wp-block-post-content li::marker {
  color: var(--wp--preset--color--jf-blue);
  font-weight: 800;
}

.jf-post-shell .wp-block-post-content h2,
.jf-page-shell .wp-block-post-content h2 {
  color: var(--jf-h2, var(--wp--preset--color--jf-navy));
  font-size: clamp(1.35rem, 2vw, 1.6rem) !important;
  line-height: 1.38;
  margin-top: 2.35rem;
  margin-bottom: 0.85rem;
  padding-inline-start: 0.75rem;
  border-inline-start: 4px solid var(--wp--preset--color--jf-gold);
}

.jf-post-shell .wp-block-post-content h3,
.jf-page-shell .wp-block-post-content h3 {
  color: var(--jf-h3, #3B70C5);
  font-size: clamp(1.12rem, 1.4vw, 1.28rem) !important;
  line-height: 1.5;
  font-weight: 800;
  margin-top: 1.5rem;
  margin-bottom: 0.55rem;
}

.jf-post-shell .wp-block-post-content :is(p, ul, ol, blockquote, figure, table) + h2,
.jf-page-shell .wp-block-post-content :is(p, ul, ol, blockquote, figure, table) + h2 {
  margin-top: 2.45rem;
}

.jf-post-shell .wp-block-post-content :is(p, ul, ol, blockquote, figure, table) + h3,
.jf-page-shell .wp-block-post-content :is(p, ul, ol, blockquote, figure, table) + h3 {
  margin-top: 1.55rem;
}

/* Compact checklists for editorial verification sections. */
.jf-post-shell .wp-block-post-content .jf-checklist,
.jf-page-shell .wp-block-post-content .jf-checklist {
  list-style: none;
  padding-inline-start: 0;
  margin-block: 0.85rem 1.4rem;
}

.jf-post-shell .wp-block-post-content .jf-checklist li,
.jf-page-shell .wp-block-post-content .jf-checklist li {
  position: relative;
  padding-inline-start: 1.85rem;
  margin-block: 0.38rem;
}

.jf-post-shell .wp-block-post-content .jf-checklist li::before,
.jf-page-shell .wp-block-post-content .jf-checklist li::before {
  content: "\2713";
  position: absolute;
  inset-inline-start: 0;
  top: 0.18em;
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(33, 138, 100, 0.11);
  color: #167A58;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

/* Inline technical examples and standalone file-name samples. */
.jf-post-shell .wp-block-post-content code,
.jf-page-shell .wp-block-post-content code {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  max-width: 100%;
  padding: 0.18rem 0.5rem;
  border: 1px solid #DCE3ED;
  border-radius: 6px;
  background: #F5F7FA;
  color: #17365D;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.jf-post-shell .wp-block-post-content pre,
.jf-page-shell .wp-block-post-content pre {
  direction: ltr;
  text-align: left;
  overflow-x: auto;
  padding: 0.9rem 1rem;
  border: 1px solid #DCE3ED;
  border-inline-start: 4px solid var(--wp--preset--color--jf-blue);
  border-radius: 8px;
  background: #F5F7FA;
  line-height: 1.65;
}

.jf-post-shell .wp-block-post-content pre code,
.jf-page-shell .wp-block-post-content pre code {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.jf-post-shell .wp-block-post-content p.jf-filename-example,
.jf-page-shell .wp-block-post-content p.jf-filename-example {
  direction: ltr;
  unicode-bidi: isolate;
  width: fit-content;
  max-width: 100%;
  margin: 0.65rem auto 1rem;
  padding: 0.58rem 0.82rem;
  border: 1px solid #DCE3ED;
  border-radius: 8px;
  background: #F5F7FA;
  color: #17365D;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em !important;
  line-height: 1.55;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 14px rgba(16, 36, 62, 0.05);
}

.jf-note-box {
  max-width: 760px;
  margin: 1.1rem auto;
  border: 1px solid rgba(33, 138, 100, .24);
  background: rgba(33, 138, 100, .08);
  color: var(--wp--preset--color--jf-ink);
  border-radius: var(--jf-radius-sm);
  padding: 14px 16px;
}

.jf-note-box p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.8;
}

/* Callout / admonition boxes ([joflows_tip] / _note / _warning / _info) */
.jf-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 1.4rem 0;
  padding: 14px 16px;
  border-radius: var(--jf-radius-sm);
  border-inline-start: 4px solid var(--jf-callout-accent, var(--wp--preset--color--jf-blue));
  background: var(--jf-callout-bg, rgba(36, 107, 254, .07));
  color: var(--wp--preset--color--jf-ink);
}

.jf-callout-icon {
  font-size: 1.2rem;
  line-height: 1.7;
  flex: none;
}

.jf-callout-body {
  margin: 0;
  line-height: 1.9;
}

.jf-callout-body > :first-child { margin-top: 0; }
.jf-callout-body > :last-child { margin-bottom: 0; }

.jf-callout-title {
  color: var(--jf-callout-accent, var(--wp--preset--color--jf-blue));
}

.jf-callout-tip {
  --jf-callout-accent: var(--wp--preset--color--jf-green);
  --jf-callout-bg: rgba(33, 138, 100, .08);
}

.jf-callout-note {
  --jf-callout-accent: #B9860B;
  --jf-callout-bg: rgba(242, 184, 75, .14);
}

.jf-callout-warning {
  --jf-callout-accent: #C0392B;
  --jf-callout-bg: rgba(192, 57, 43, .08);
}

.jf-callout-info {
  --jf-callout-accent: var(--wp--preset--color--jf-blue);
  --jf-callout-bg: rgba(36, 107, 254, .07);
}

/* "In short" summary box ([joflows_summary]) — strong featured-snippet bait */
.jf-summary {
  max-width: 760px;
  margin: 0 auto 1.5rem;
  padding: 16px 18px;
  border-radius: var(--jf-radius-sm);
  border-inline-start: 4px solid var(--wp--preset--color--jf-gold);
  background: rgba(242, 184, 75, .1);
  color: var(--wp--preset--color--jf-ink);
}

.jf-summary-title {
  display: block;
  font-weight: 800;
  color: var(--wp--preset--color--jf-navy);
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.jf-summary-list {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.jf-summary-list li {
  margin: 0.3rem 0;
  line-height: 1.7;
}

/* FAQ accordion ([joflows_faq]) — also feeds FAQPage schema via <details> */
.jf-faq {
  max-width: 760px;
  margin: 0.7rem auto;
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: var(--jf-radius-sm);
  background: var(--wp--preset--color--jf-card);
  overflow: hidden;
}

.jf-faq > summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--wp--preset--color--jf-navy);
  background: rgba(16, 36, 62, .045);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: background .15s ease, color .15s ease;
}

.jf-faq > summary::-webkit-details-marker { display: none; }

.jf-faq > summary::after {
  content: "+";
  font-size: 1.4em;
  line-height: 1;
  color: var(--wp--preset--color--jf-gold);
  flex: none;
}

.jf-faq[open] > summary {
  background: var(--wp--preset--color--jf-navy);
  color: #fff;
  border-bottom: 2px solid var(--wp--preset--color--jf-gold);
}

.jf-faq[open] > summary::after { content: "\2212"; color: #fff; }
.jf-faq > summary:hover { background: rgba(16, 36, 62, .08); }
.jf-faq[open] > summary:hover { background: var(--wp--preset--color--jf-navy); }

.jf-faq-a {
  padding: 20px 18px 18px;
  line-height: 1.95;
}

.jf-faq-a > :first-child { margin-top: 0; }
.jf-faq-a > :last-child { margin-bottom: 0; }

/* Clearer inline bold inside article/page body */
.jf-post-shell .wp-block-post-content strong,
.jf-post-shell .wp-block-post-content b,
.jf-page-shell .wp-block-post-content strong,
.jf-page-shell .wp-block-post-content b {
  font-weight: 800;
}

/* Content tables — auto-styled, header colour + striping from the panel */
.jf-main .wp-block-table {
  overflow-x: auto;
}

.jf-main table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: var(--jf-radius-sm);
  overflow: hidden;
  margin: 1.5rem 0;
}

.jf-main table th {
  padding: 0.85rem 1rem;
  text-align: right;
  font-weight: 700;
}

.jf-main table td {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--wp--preset--color--jf-border);
}

.jf-main table figcaption,
.jf-main .wp-block-table figcaption {
  text-align: center;
  font-size: 0.88rem;
  color: var(--wp--preset--color--jf-muted);
  margin-top: 0.5rem;
}

/* Prominent homepage search box */
.jf-home-search {
  background: var(--wp--preset--color--jf-paper);
  padding: 8px 0 4px;
}

.jf-home-search .jf-container {
  text-align: center;
}

.jf-home-search-title {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin: 0 0 14px;
}

.jf-home-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 640px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  box-shadow: var(--jf-shadow-soft);
}

.jf-home-search-input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent;
  font-size: 1.02rem;
  padding: 10px 6px !important;
  box-shadow: none !important;
  outline: none;
}

.jf-home-search-btn {
  flex: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: var(--wp--preset--color--jf-navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  min-height: 46px;
}

.jf-home-search-btn:hover {
  background: var(--wp--preset--color--jf-blue);
}

@media (max-width: 640px) {
  .jf-home-search-form {
    max-width: none;
  }
}

.jf-post-meta {
  justify-content: center;
}

.jf-post-shell > .wp-block-post-featured-image,
.jf-post-shell > .jf-featured-image,
.jf-page-shell > .jf-featured-image,
.jf-post-shell > .jf-ad,
.jf-post-shell > .jf-ad-placeholder,
.jf-post-shell > .jf-note-box,
.jf-post-shell > .wp-block-post-terms,
.jf-post-shell > .wp-block-query,
.jf-post-shell > h2,
.jf-post-shell > .wp-block-heading {
  max-width: 920px;
  margin-inline: auto;
}

/* Sidebar */
.jf-sidebar {
  position: sticky;
  top: 96px;
}

.jf-sidebar-card {
  padding: 15px;
  margin-bottom: 14px;
}

.jf-sidebar-card h3 {
  margin-top: 0;
  font-size: 1rem;
}

.jf-sidebar-card ul {
  padding-right: 1rem;
  margin-bottom: 0;
}

.jf-sidebar-card li + li {
  margin-top: 0.55rem;
}

.jf-sidebar-card a {
  font-size: 0.95rem;
  line-height: 1.7;
}

.jf-sidebar-card time,
.jf-sidebar-card .wp-block-latest-posts__post-date {
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.78rem;
}

/* Footer */
.jf-footer {
  margin-top: clamp(34px, 6vw, 70px);
  background: var(--wp--preset--color--jf-navy);
  color: #fff;
}

.jf-footer a {
  color: #fff;
  text-decoration: none;
}

.jf-footer a:hover {
  text-decoration: underline;
}

.jf-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
  padding-block: 36px;
}

.jf-footer small,
.jf-footer p,
.jf-footer li {
  color: rgba(255, 255, 255, .72);
  font-size: 0.95rem;
  line-height: 1.85;
}

.jf-footer h3,
.jf-footer h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-top: 0;
}

.jf-footer ul {
  padding-right: 1rem;
}

.jf-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-block: 14px;
  color: rgba(255, 255, 255, .70);
  font-size: 0.9rem;
}

.jf-footer-bottom p {
  margin: 0;
}

/* FAQ and pagination */
.jf-faq-card {
  padding: 18px;
}

.jf-faq-card details {
  border-bottom: 1px solid var(--wp--preset--color--jf-border);
  padding-block: 12px;
}

.jf-faq-card details:last-child {
  border-bottom: 0;
}

.jf-faq-card summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--wp--preset--color--jf-navy);
}

.jf-pagination {
  margin-top: 24px;
}

.wp-block-query-pagination {
  justify-content: center;
  gap: 10px;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  border: 1px solid var(--wp--preset--color--jf-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
}

/* General page content fixes */
.jf-main .wp-block-post-content > .wp-block-group.alignfull,
.jf-main .wp-block-post-content > .wp-block-cover.alignfull {
  max-width: none;
}

.jf-main p {
  text-wrap: pretty;
}

@media (max-width: 1100px) {
  .jf-header-inner {
    grid-template-columns: auto 1fr;
  }

  .jf-header-utilities {
    grid-column: 1 / -1;
    justify-content: stretch;
    padding-bottom: 12px;
  }

  .jf-main-nav {
    justify-self: end;
  }

  .jf-header-search {
    flex: 1;
    max-width: none;
  }
}

@media (max-width: 980px) {
  .jf-hero-grid,
  .jf-content-layout,
  .jf-footer-grid {
    grid-template-columns: 1fr;
  }

  .jf-post-grid .wp-block-post-template,
  .jf-post-grid.wp-block-query .wp-block-post-template,
  .jf-category-grid .wp-block-post-template,
  .jf-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jf-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .admin-bar .jf-site-header {
    top: 0;
  }

  .jf-header-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 12px;
  }

  .jf-brand-row,
  .jf-main-nav,
  .jf-header-utilities,
  .jf-main-nav .wp-block-navigation__container {
    width: 100%;
  }

  .jf-main-nav {
    justify-self: stretch;
  }

  .jf-main-nav .wp-block-navigation__container {
    justify-content: flex-start;
  }

  /* Mobile: search collapses behind a toggle instead of vanishing */
  .jf-header-search {
    display: none;
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .jf-search-open .jf-header-search {
    display: block;
  }

  .jf-post-grid .wp-block-post-template,
  .jf-post-grid.wp-block-query .wp-block-post-template,
  .jf-category-grid .wp-block-post-template,
  .jf-tools-grid {
    grid-template-columns: 1fr;
  }

  .jf-feature-card {
    min-height: unset;
  }

  .jf-post-shell,
  .jf-page-shell {
    padding: 16px;
  }
}

/* Search toggle button — only rendered/visible on mobile */
.jf-search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--wp--preset--color--jf-border);
  background: #fff;
  color: var(--wp--preset--color--jf-navy);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 640px) {
  .jf-search-toggle {
    display: inline-flex;
  }
}

/* Breadcrumbs */
.jf-breadcrumbs {
  font-size: 0.85rem;
  color: var(--wp--preset--color--jf-muted);
}

.jf-breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.jf-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.jf-breadcrumbs li:not(:last-child)::after {
  content: "‹";
  color: var(--wp--preset--color--jf-border);
}

.jf-breadcrumbs a {
  color: var(--wp--preset--color--jf-muted);
  text-decoration: none;
}

.jf-breadcrumbs a:hover {
  color: var(--wp--preset--color--jf-blue);
}

.jf-breadcrumbs [aria-current="page"] {
  color: var(--wp--preset--color--jf-navy);
  font-weight: 700;
}

/* Updated date */
.jf-updated {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--wp--preset--color--jf-green);
  font-weight: 700;
}

/* Share buttons */
.jf-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 760px;
  margin: 1.4rem auto 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--wp--preset--color--jf-border);
}

.jf-share-label {
  font-weight: 800;
  color: var(--wp--preset--color--jf-navy);
  font-size: 0.9rem;
}

.jf-share-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(16, 36, 62, 0.05);
  color: var(--wp--preset--color--jf-navy);
  border: 1px solid var(--wp--preset--color--jf-border);
}

.jf-share-btn:hover {
  background: var(--wp--preset--color--jf-navy);
  color: #fff;
}

/* Related posts */
.jf-related {
  max-width: 920px;
  margin: 2.2rem auto 0;
}

.jf-related > h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin-bottom: 1rem;
}

.jf-related .jf-card-thumb {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  aspect-ratio: 16 / 10;
  background: var(--wp--preset--color--jf-border);
}

.jf-related .jf-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jf-related .jf-card-term {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--wp--preset--color--jf-blue);
  text-decoration: none;
}

.jf-related .wp-block-post-title {
  font-size: 1.05rem;
  line-height: 1.45;
  margin-block: 0.4rem;
}

.jf-related .wp-block-post-title a {
  text-decoration: none;
}

.jf-related .wp-block-post-date {
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.8rem;
}

/* ===================================================================
   Homepage systems (news / magazine / blog)
   =================================================================== */
.jf-home {
  padding-block: clamp(18px, 3vw, 32px);
}

/* Shared headline list (text-only, no images) */
.jf-headline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jf-headline {
  padding-block: 11px;
  border-bottom: 1px solid var(--wp--preset--color--jf-border);
}

.jf-headline:last-child {
  border-bottom: 0;
}

.jf-hl-link {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--wp--preset--color--jf-ink);
  text-decoration: none;
}

.jf-hl-link:hover {
  color: var(--wp--preset--color--jf-blue);
}

.jf-hl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.78rem;
}

.jf-hl-term {
  color: var(--wp--preset--color--jf-blue);
  font-weight: 800;
}

.jf-more {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--wp--preset--color--jf-blue);
  text-decoration: none;
  white-space: nowrap;
}

/* --- News layout --- */
.jf-news-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
  gap: clamp(16px, 2.5vw, 26px);
  align-items: stretch;
  margin-bottom: clamp(22px, 4vw, 38px);
}

.jf-lead-main {
  padding: clamp(16px, 2.5vw, 24px);
}

.jf-lead-thumb {
  display: block;
  border-radius: var(--jf-radius);
  overflow: hidden;
  aspect-ratio: 16 / 8;
  margin-bottom: 1rem;
  background: var(--wp--preset--color--jf-border);
}

.jf-lead-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jf-lead-title {
  margin: 0.5rem 0;
  font-size: clamp(1.6rem, 3vw, var(--jf-home-title));
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.jf-lead-title a {
  text-decoration: none;
  color: var(--wp--preset--color--jf-navy);
}

.jf-lead-excerpt {
  margin: 0;
  color: var(--wp--preset--color--jf-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.jf-lead-side {
  padding: clamp(14px, 2vw, 20px);
  background: var(--wp--preset--color--jf-card);
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: var(--jf-radius);
}

.jf-side-head {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--wp--preset--color--jf-gold);
}

.jf-news-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}

.jf-news-section {
  background: var(--wp--preset--color--jf-card);
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: var(--jf-radius);
  padding: clamp(14px, 2vw, 20px);
}

.jf-news-section .jf-section-title {
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--wp--preset--color--jf-navy);
}

.jf-news-section .jf-section-title h2 {
  font-size: 1.2rem;
}

.jf-news-section .jf-section-title h2 a {
  text-decoration: none;
  color: var(--wp--preset--color--jf-navy);
}

/* --- Magazine layout --- */
.jf-mag-hero {
  margin-bottom: clamp(22px, 4vw, 38px);
}

.jf-mag-feature {
  padding: clamp(16px, 2.5vw, 26px);
}

.jf-mag-feature .jf-card-thumb {
  display: block;
  border-radius: var(--jf-radius);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  margin-bottom: 1rem;
  background: var(--wp--preset--color--jf-border);
}

.jf-mag-feature .jf-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jf-home .jf-card-excerpt {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--wp--preset--color--jf-muted);
}

/* --- Blog layout --- */
.jf-home-blog {
  max-width: 820px;
}

.jf-blog-list {
  display: grid;
  gap: 22px;
}

.jf-blog-item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  background: var(--wp--preset--color--jf-card);
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: var(--jf-radius);
  padding: 14px;
}

.jf-blog-thumb {
  display: block;
  border-radius: var(--jf-radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--wp--preset--color--jf-border);
}

.jf-blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jf-blog-title {
  margin: 0.3rem 0;
  font-size: 1.3rem;
  line-height: 1.35;
}

.jf-blog-title a {
  text-decoration: none;
  color: var(--wp--preset--color--jf-navy);
}

.jf-blog-excerpt {
  margin: 0 0 0.5rem;
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.jf-blog-meta {
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .jf-news-lead {
    grid-template-columns: 1fr;
  }

  .jf-news-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .jf-blog-item {
    grid-template-columns: 1fr;
  }

  .jf-blog-thumb {
    aspect-ratio: 16 / 9;
  }
}

/* ===================================================================
   Header navigation, article TOC and accessibility refinements — v1.6
   =================================================================== */
.jf-site-header {
  background: rgba(255, 255, 255, 0.94);
  background: color-mix(in srgb, var(--wp--preset--color--jf-card) 92%, transparent);
}

.jf-header-inner {
  position: relative;
}

.jf-logo-mark .wp-block-shortcode,
.jf-logo-mark .wp-block-shortcode > span,
.jf-logo-mark > span {
  display: contents;
}

.jf-main-nav {
  position: relative;
  justify-self: center;
  min-width: 0;
}

.jf-menu-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(10px, 1.7vw, 22px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.jf-menu-item,
.jf-menu-list > .menu-item {
  position: relative;
  margin: 0;
}

.jf-menu-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.25rem 0.15rem;
  color: var(--wp--preset--color--jf-ink);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 800;
  white-space: nowrap;
}

.jf-menu-list > li > a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: var(--wp--preset--color--jf-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
}

.jf-menu-list > li > a:hover::after,
.jf-menu-list > li > a:focus-visible::after,
.jf-menu-list > li.is-current > a::after,
.jf-menu-list > li.current-menu-item > a::after,
.jf-menu-list > li.current-menu-ancestor > a::after {
  transform: scaleX(1);
}

.jf-menu-list > li.is-current > a,
.jf-menu-list > li.current-menu-item > a,
.jf-menu-list > li.current-menu-ancestor > a {
  color: var(--wp--preset--color--jf-navy);
}

.jf-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: 12px;
  background: #fff;
  color: var(--wp--preset--color--jf-navy);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.jf-menu-toggle-icon {
  display: grid;
  gap: 4px;
  width: 18px;
}

.jf-menu-toggle-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.jf-menu-open .jf-menu-toggle-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.jf-menu-open .jf-menu-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.jf-menu-open .jf-menu-toggle-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Native WordPress menu dropdowns. */
.jf-menu-list .sub-menu {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  z-index: 65;
  display: none;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--jf-shadow-soft);
}

.jf-menu-list li:hover > .sub-menu,
.jf-menu-list li:focus-within > .sub-menu {
  display: block;
}

.jf-menu-list .sub-menu a {
  display: flex;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 9px;
}

.jf-menu-list .sub-menu a:hover,
.jf-menu-list .sub-menu a:focus-visible {
  background: rgba(16, 36, 62, 0.06);
}

.jf-header-ad-wrap:empty,
.jf-header-ad-wrap:not(:has(.jf-ad, .jf-ad-placeholder)) {
  display: none;
}

.jf-header-ad-wrap .jf-ad,
.jf-header-ad-wrap .jf-ad-placeholder {
  margin-block: 14px 0;
}

.home .jf-search-toggle {
  display: none !important;
}

/* Article byline: semantic separator without a stray paragraph node. */
.jf-post-byline {
  align-items: center;
  justify-content: center;
  gap: 0;
}

.jf-post-byline > * {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.jf-post-byline > * + *::before {
  content: "•";
  margin-inline: 9px;
  color: var(--wp--preset--color--jf-border);
}

/* Automatic table of contents. */
.jf-toc {
  max-width: 760px;
  margin: 1.4rem auto 1.7rem;
  border: 1px solid var(--wp--preset--color--jf-border);
  border-radius: var(--jf-radius-sm);
  background: rgba(16, 36, 62, 0.035);
  overflow: hidden;
}

.jf-toc summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 3rem 0.9rem 1rem;
  color: var(--wp--preset--color--jf-navy);
  font-size: 1rem;
  font-weight: 900;
}

.jf-toc-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.5rem;
  padding-inline: 0.45rem;
  border-radius: 999px;
  background: rgba(16, 36, 62, 0.09);
  color: var(--wp--preset--color--jf-muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.jf-toc summary::-webkit-details-marker {
  display: none;
}

.jf-toc summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
}

.jf-toc details[open] summary::after {
  content: "−";
}

.jf-toc ol {
  margin: 0;
  padding: 0.2rem 2.2rem 1rem 1rem;
  border-top: 1px solid var(--wp--preset--color--jf-border);
}

.jf-toc li {
  margin-top: 0.55rem;
  line-height: 1.65;
}

.jf-toc-level-3 {
  margin-inline-start: 1.1rem;
  font-size: 0.94em;
}

.jf-toc a {
  color: var(--wp--preset--color--jf-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.jf-toc a:hover,
.jf-toc a:focus-visible {
  color: var(--wp--preset--color--jf-blue);
}

.jf-post-shell .wp-block-post-content :is(h2, h3),
.jf-page-shell .wp-block-post-content :is(h2, h3) {
  scroll-margin-top: 110px;
}

/* Visible keyboard focus across navigation and controls. */
.jf-site-header a:focus-visible,
.jf-site-header button:focus-visible,
.jf-toc a:focus-visible,
.jf-toc summary:focus-visible {
  outline: 3px solid rgba(36, 107, 254, 0.32);
  outline-offset: 3px;
}

/* Fallback for browsers without color-mix(). */
.jf-ad-placeholder,
.jf-ad-slot {
  border-color: rgba(102, 112, 133, 0.35);
}

@media (max-width: 900px) {
  .jf-header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    min-height: 66px;
    padding-block: 9px;
  }

  .jf-brand-row {
    min-width: 0;
    width: auto;
  }

  .jf-logo-text {
    min-width: 0;
  }

  .jf-main-nav {
    position: static;
    justify-self: end;
    width: auto;
  }

  .jf-menu-toggle {
    display: inline-flex;
  }

  .jf-menu-list {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    z-index: 70;
    display: none;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--wp--preset--color--jf-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--jf-shadow);
  }

  .jf-menu-open .jf-menu-list {
    display: flex;
  }

  .jf-menu-list > li,
  .jf-menu-list > .menu-item {
    width: 100%;
  }

  .jf-menu-list a {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
  }

  .jf-menu-list > li > a::after {
    display: none;
  }

  .jf-menu-list > li.is-current > a,
  .jf-menu-list > li.current-menu-item > a,
  .jf-menu-list > li.current-menu-ancestor > a,
  .jf-menu-list a:hover,
  .jf-menu-list a:focus-visible {
    background: rgba(16, 36, 62, 0.06);
  }

  .jf-menu-list .sub-menu {
    position: static;
    display: block;
    min-width: 0;
    margin-inline-start: 0.8rem;
    padding: 0 8px 6px 0;
    border: 0;
    box-shadow: none;
  }

  .jf-header-utilities {
    position: static;
    grid-column: auto;
    justify-content: flex-end;
    width: auto;
    padding-bottom: 0;
  }

  .jf-search-toggle {
    display: inline-flex;
  }

  .jf-header-search {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    z-index: 71;
    display: none;
    max-width: none;
    padding: 10px;
    border: 1px solid var(--wp--preset--color--jf-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--jf-shadow);
  }

  .jf-search-open .jf-header-search {
    display: block;
  }

  .jf-header-search .wp-block-search__inside-wrapper,
  .jf-header-search input {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .jf-header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding-block: 8px;
  }

  .jf-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .jf-brand-note {
    display: none;
  }

  .jf-logo-text .wp-block-site-title,
  .jf-logo-text .wp-block-site-title a {
    font-size: 1.02rem;
  }

  .jf-menu-toggle-label {
    display: none;
  }

  .jf-menu-toggle {
    width: 42px;
    padding: 0 11px;
  }

  .jf-header-cta {
    display: none;
  }

  .jf-toc ol {
    padding-inline: 2rem 0.8rem;
  }
}

@media (max-width: 640px) {
  .jf-article-meta {
    justify-content: flex-start;
    font-size: 0.82rem;
  }

  .jf-article-meta .jf-meta-item + .jf-meta-item::before {
    margin-inline: 0.4rem;
  }

  .jf-post-shell .wp-block-post-content h2,
  .jf-page-shell .wp-block-post-content h2 {
    padding-inline-start: 0.6rem;
    border-inline-start-width: 3px;
  }

  .jf-toc {
    margin-block: 1.1rem 1.4rem;
  }
}

/* Long-form reading helpers. */
.jf-reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100000;
  height: 3px;
  pointer-events: none;
  background: transparent;
}

.jf-reading-progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--wp--preset--color--jf-blue), var(--wp--preset--color--jf-gold));
  transform: scaleX(0);
  transform-origin: right center;
  will-change: transform;
}

.jf-back-to-top {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  z-index: 9990;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(16, 36, 62, 0.14);
  border-radius: 50%;
  background: var(--wp--preset--color--jf-navy);
  color: #fff;
  box-shadow: 0 10px 28px rgba(16, 36, 62, 0.22);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, background 180ms ease;
}

.jf-back-to-top::before {
  content: "\2191";
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.jf-back-to-top:hover,
.jf-back-to-top:focus-visible {
  background: var(--wp--preset--color--jf-blue);
}

.jf-back-to-top:focus-visible {
  outline: 3px solid rgba(36, 107, 254, 0.3);
  outline-offset: 3px;
}

.jf-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .jf-back-to-top {
    inset-inline-end: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .jf-menu-list > li > a::after,
  .jf-menu-toggle-icon span,
  .jf-back-to-top {
    transition: none;
  }
}

/* 1.8.4: Lighthouse accessibility and mobile interaction fixes. */
.jf-toc-count {
  background: #EAECF0;
  color: #344054;
}

.jf-post-shell > .taxonomy-post_tag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.jf-post-shell > .taxonomy-post_tag a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid #DCE3ED;
  border-radius: 999px;
  background: #F7F9FC;
  color: var(--wp--preset--color--jf-navy);
  text-decoration: none;
  line-height: 1.35;
}

.jf-post-shell > .taxonomy-post_tag a:hover,
.jf-post-shell > .taxonomy-post_tag a:focus-visible {
  border-color: var(--wp--preset--color--jf-blue);
  background: rgba(36, 107, 254, 0.07);
  color: var(--wp--preset--color--jf-blue);
}

@media (max-width: 640px) {
  .jf-post-shell > .taxonomy-post_tag a {
    min-height: 38px;
    padding: 7px 11px;
  }
}
