/* Helfinch Editorial Design System v2 — the only owner of editorial presentation. */
:root {
  --hf-ed-bg: #1c1c1c;
  --hf-ed-surface: #242424;
  --hf-ed-surface-raised: #2b2b2b;
  --hf-ed-text: #f4f3ef;
  --hf-ed-muted: #bdbbb4;
  --hf-ed-line: #44433f;
  --hf-ed-accent: #f6c900;
  --hf-ed-accent-hover: #ffdb38;
  --hf-ed-ink: #171717;
  --hf-ed-light: #f8f7f2;
  --hf-ed-light-alt: #eceae2;
  --hf-ed-danger: #ffdc7a;
  --hf-ed-radius: 10px;
  --hf-ed-reading: 820px;
  --hf-ed-wide: 1040px;
}

.helfinch-editorial-page .cs-entry__title,
.helfinch-editorial-page .entry-title {
  max-width: 900px;
  font-size: clamp(2.15rem, 5vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.helfinch-editorial {
  box-sizing: border-box;
  width: min(100%, var(--hf-ed-reading));
  max-width: var(--hf-ed-reading);
  margin: clamp(1.25rem, 4vw, 3rem) auto;
  padding: 0 clamp(0.25rem, 2.5vw, 1.5rem) clamp(2.75rem, 6vw, 5rem);
  background: transparent;
  color: var(--hf-ed-text);
  font-family: inherit;
  font-size: clamp(1rem, 0.35vw + 0.94rem, 1.125rem);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

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

.helfinch-editorial :where(p, li, dd, dt, summary, figcaption, caption) {
  color: var(--hf-ed-text) !important;
}

.helfinch-editorial p {
  margin: 0 0 1.25em;
}

.helfinch-editorial :where(ul, ol) {
  margin: 0 0 1.5rem;
  padding-inline-start: 1.35rem;
}

.helfinch-editorial li + li {
  margin-top: 0.48rem;
}

.helfinch-editorial h2 {
  margin: clamp(2.75rem, 7vw, 4.75rem) 0 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--hf-ed-line);
  color: var(--hf-ed-text) !important;
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.helfinch-editorial h3 {
  margin: 2.2rem 0 0.7rem;
  color: var(--hf-ed-text) !important;
  font-size: clamp(1.22rem, 2vw, 1.48rem);
  line-height: 1.28;
}

.helfinch-editorial :where(a) {
  color: var(--hf-ed-accent) !important;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.19em;
}

.helfinch-editorial :where(a:hover, a:focus-visible) {
  color: var(--hf-ed-accent-hover) !important;
  text-decoration-thickness: 2px;
}

.helfinch-editorial a:focus-visible,
.helfinch-editorial summary:focus-visible,
.helfinch-editorial-archive a:focus-visible {
  outline: 3px solid var(--hf-ed-accent);
  outline-offset: 4px;
}

.hf-review-meta,
.helfinch-editorial .hf-review-meta {
  margin-bottom: 1.4rem;
  color: var(--hf-ed-muted) !important;
  font-size: 0.88rem;
  line-height: 1.45;
}

.hf-eyebrow,
.helfinch-editorial .hf-eyebrow {
  margin: 0 0 0.55rem;
  color: var(--hf-ed-accent) !important;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hf-quick-answer {
  margin: 1.65rem 0 2rem;
  padding: 1.15rem 1.25rem 1.25rem;
  border-left: 5px solid var(--hf-ed-accent);
  border-radius: 0 var(--hf-ed-radius) var(--hf-ed-radius) 0;
  background: #fff5c2;
  color: var(--hf-ed-ink) !important;
  line-height: 1.55;
}

.helfinch-editorial .hf-quick-answer,
.helfinch-editorial .hf-quick-answer :where(p, li, strong, span, a) {
  color: var(--hf-ed-ink) !important;
}

.helfinch-editorial .hf-quick-answer a {
  color: #554500 !important;
}

.hf-quick-answer__label {
  display: block;
  margin-bottom: 0.42rem;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hf-callout {
  margin: 2rem 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--hf-ed-line);
  border-radius: var(--hf-ed-radius);
  background: var(--hf-ed-surface);
}

.hf-callout--example {
  border-color: #7e6b12;
  box-shadow: inset 4px 0 0 var(--hf-ed-accent);
}

.hf-callout--technical,
.hf-callout--info {
  background: var(--hf-ed-surface-raised);
}

.hf-callout h2,
.hf-callout h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.hf-table-wrap {
  width: min(calc(100vw - 2rem), var(--hf-ed-wide));
  max-width: none;
  margin: 1.7rem 50%;
  transform: translateX(-50%);
  overflow-x: auto;
  border: 1px solid #5b5a55;
  border-radius: var(--hf-ed-radius);
  background: var(--hf-ed-light);
  box-shadow: 0 12px 30px rgb(0 0 0 / 18%);
  scrollbar-color: var(--hf-ed-accent) #343434;
}

.hf-table-wrap::after {
  content: "Scroll horizontally to view the full table";
  display: none;
  padding: 0.55rem 0.8rem;
  background: #302f2c;
  color: var(--hf-ed-muted);
  font-size: 0.76rem;
}

.helfinch-editorial table {
  width: 100%;
  min-width: 650px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: var(--hf-ed-light);
  color: var(--hf-ed-ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.helfinch-editorial :where(th, td) {
  min-width: 130px;
  padding: 0.9rem 1rem;
  border: 0;
  border-right: 1px solid #d2d0c8;
  border-bottom: 1px solid #d2d0c8;
  color: var(--hf-ed-ink) !important;
  text-align: left;
  vertical-align: top;
}

.helfinch-editorial th {
  background: #222;
  color: #fff !important;
  font-weight: 800;
}

.helfinch-editorial tbody tr:nth-child(even) td {
  background: var(--hf-ed-light-alt);
}

.helfinch-editorial tbody tr:nth-child(odd) td {
  background: var(--hf-ed-light);
}

.helfinch-editorial :where(th, td):last-child {
  border-right: 0;
}

.helfinch-editorial :where(th, td) a {
  color: #554500 !important;
}

.hf-faq {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--hf-ed-line);
}

.hf-faq details {
  border-top: 1px solid var(--hf-ed-line);
}

.hf-faq summary {
  min-height: 48px;
  padding: 0.9rem 2rem 0.9rem 0;
  color: var(--hf-ed-text) !important;
  font-weight: 750;
  cursor: pointer;
}

.hf-faq details p {
  padding: 0 0 1rem 1rem;
  color: var(--hf-ed-muted) !important;
}

.hf-related-guides,
.hf-sources,
.hf-product-links {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hf-ed-line);
}

.hf-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hf-product-card {
  padding: 1.1rem;
  border: 1px solid var(--hf-ed-line);
  border-radius: var(--hf-ed-radius);
  background: var(--hf-ed-surface);
}

.hf-cta-panel {
  margin: 2.5rem 0;
  padding: 1.35rem;
  border-radius: var(--hf-ed-radius);
  background: var(--hf-ed-accent);
  color: var(--hf-ed-ink) !important;
}

.hf-cta-panel :where(p, li, strong, h2, h3) {
  color: var(--hf-ed-ink) !important;
}

.hf-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid var(--hf-ed-accent);
  border-radius: 5px;
  background: var(--hf-ed-accent);
  color: var(--hf-ed-ink) !important;
  font-weight: 800;
  text-decoration: none !important;
}

.hf-button--secondary {
  background: transparent;
  color: var(--hf-ed-accent) !important;
}

.hf-author-card {
  margin-top: 0;
  padding-top: 1.45rem;
  padding-bottom: 1.6rem;
  border-top: 1px solid var(--hf-ed-line);
  border-bottom: 1px solid var(--hf-ed-line);
}

.hf-author-card__name,
.helfinch-editorial .hf-author-card__name {
  margin: 0 0 0.55rem;
  padding: 0;
  border: 0;
  font-size: 1.25rem;
}

.hf-author-card p:last-child {
  margin-bottom: 0;
  color: var(--hf-ed-muted) !important;
  font-size: 0.94rem;
}

.helfinch-editorial--extension {
  clear: both;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  padding-top: clamp(2rem, 5vw, 4rem);
  border-top: 2px solid var(--hf-ed-accent);
}

/* Compatibility bridge for the retained polished page-builder sections on
   the three substantially updated editorial pages. Their surfaces are light,
   while the global theme otherwise forces page copy to white. */
.helfinch-editorial-page .entry-content > section {
  color: var(--hf-ed-ink) !important;
}

.helfinch-editorial-page .entry-content > section :where(p, li, h2, h3, h4, h5, h6) {
  color: var(--hf-ed-ink) !important;
}

.helfinch-editorial-page .entry-content > section a[style*="display: block"][style*="background:"] {
  color: var(--hf-ed-ink) !important;
}

.helfinch-editorial-page .comment-respond .required {
  color: var(--hf-ed-accent) !important;
}

.helfinch-editorial-archive {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 7rem);
  color: var(--hf-ed-text);
}

.helfinch-editorial-archive *,
.helfinch-editorial-archive *::before,
.helfinch-editorial-archive *::after {
  box-sizing: border-box;
}

.hf-archive-breadcrumb {
  margin-bottom: 2.5rem;
  color: var(--hf-ed-muted);
  font-size: 0.86rem;
}

.hf-archive-breadcrumb a,
.helfinch-editorial-archive a {
  color: inherit;
}

.hf-archive-breadcrumb a {
  color: var(--hf-ed-text);
  text-underline-offset: 0.2em;
}

.hf-archive-header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--hf-ed-line);
}

.hf-archive-header h1 {
  margin: 0;
  color: var(--hf-ed-text);
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hf-archive-header__intro,
.hf-archive-header__intro p {
  margin: 0;
  color: var(--hf-ed-muted) !important;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.6;
}

.hf-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.hf-archive-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-top: 2px solid #4b4a46;
  background: transparent;
  transition: border-color 160ms ease, transform 160ms ease;
}

.hf-archive-card:hover,
.hf-archive-card:focus-within {
  border-color: var(--hf-ed-accent);
  transform: translateY(-3px);
}

.hf-archive-card__image {
  display: block;
  aspect-ratio: 16 / 10;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 7px;
  background: #292929;
}

.hf-archive-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hf-archive-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.15rem 0 0.25rem;
}

.hf-archive-card__cluster {
  margin-bottom: 0.7rem;
  color: var(--hf-ed-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hf-archive-card h2 {
  margin: 0 0 0.7rem;
  color: var(--hf-ed-text);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.hf-archive-card h2 a {
  color: inherit;
  text-decoration: none;
}

.hf-archive-card__excerpt {
  margin: 0 0 1.2rem;
  color: var(--hf-ed-muted);
  line-height: 1.58;
}

.hf-archive-card__meta {
  margin-top: auto;
  color: #aaa8a1;
  font-size: 0.78rem;
  line-height: 1.4;
}

.hf-archive-card__meta a {
  color: var(--hf-ed-text);
}

.hf-archive-pagination {
  margin-top: 4rem;
}

.hf-archive-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hf-archive-pagination .page-numbers {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hf-ed-line);
  border-radius: 5px;
  color: var(--hf-ed-text);
}

.hf-archive-pagination .current {
  border-color: var(--hf-ed-accent);
  background: var(--hf-ed-accent);
  color: var(--hf-ed-ink);
}

.helfinch-editorial-blog-page .elementor-widget-loop-grid a:focus-visible,
.helfinch-editorial-blog-page .elementor a:focus-visible {
  outline: 3px solid var(--hf-ed-accent);
  outline-offset: 4px;
}

@media (max-width: 1024px) {
  .hf-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .helfinch-editorial {
    width: 100%;
    padding-inline: 0.35rem;
  }

  .hf-table-wrap {
    width: 100%;
    max-width: 100%;
    border-radius: 7px;
  }

  .hf-spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hf-spec-grid > * {
    min-width: 0;
    max-width: 100%;
  }

  /* Responsive fallback for legacy editorial tables authored before the
     permanent hf-table-wrap component was introduced. */
  .helfinch-blog-article > section > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hf-table-wrap::after {
    display: block;
  }

  .helfinch-editorial table {
    min-width: 620px;
  }

  .hf-product-grid,
  .hf-archive-grid,
  .hf-archive-header {
    grid-template-columns: 1fr;
  }

  .hf-archive-header {
    gap: 1.4rem;
  }

  .helfinch-editorial-archive {
    padding-top: 1rem;
  }
}

@media (max-width: 430px) {
  .helfinch-editorial-page .cs-entry__title,
  .helfinch-editorial-page .entry-title {
    font-size: clamp(2rem, 11vw, 2.8rem);
    line-height: 1.05;
  }

  .helfinch-editorial {
    font-size: 1rem;
    line-height: 1.67;
  }

  .helfinch-editorial h2 {
    margin-top: 2.75rem;
  }

  .hf-quick-answer,
  .hf-callout,
  .hf-cta-panel {
    padding: 1rem;
  }

  .helfinch-editorial :where(th, td) {
    min-width: 145px;
    padding: 0.78rem 0.82rem;
  }

  .hf-archive-header h1 {
    font-size: clamp(2.45rem, 15vw, 3.6rem);
  }

  .hf-archive-card h2 {
    font-size: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hf-archive-card {
    transition: none;
  }
}
