/*
 Theme Name:   GeneratePress FX Ledger
 Theme URI:    https://fxtradingwebsites.com
 Description:  Dark child theme of GeneratePress for FX Trading Websites: independent broker directory and financial-market publication.
 Author:       FX Trading Websites
 Template:     generatepress
 Version:      1.1.0
 Text Domain:  generatepress-fx
*/

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@700&family=Figtree:wght@400;500;600&display=swap');

/* ===== 1. Design tokens (single source) ===== */
:root {
  --fx-bg: #090F1D;
  --fx-surface: #111B2D;
  --fx-card: #17253B;
  --fx-accent: #147DFF;
  --fx-accent-hover: #3B93FF;
  --fx-cyan: #46D4C5;
  --fx-ink: #F5F8FF;
  --fx-muted: #A5B6D0;
  --fx-line: #293A59;
  --fx-danger: #FF6B6B;
  --fx-radius-sm: 4px;
  --fx-radius-md: 8px;
  --fx-radius-lg: 12px;
  --fx-font-heading: 'Bricolage Grotesque', sans-serif;
  --fx-font-body: 'Figtree', sans-serif;
}

/* ===== 2. Base ===== */
body { background: var(--fx-bg); color: var(--fx-ink); font-family: var(--fx-font-body); line-height: 1.6; }
h1, h2, h3, h4, h5, h6, .entry-title { font-family: var(--fx-font-heading); font-weight: 700; line-height: 1.15; color: var(--fx-ink); }
a { color: var(--fx-cyan); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
.entry-meta, .entry-meta a, .widget-title, .cat-links, .tags-links { color: var(--fx-muted); }

/* ===== 3. Header and navigation (GeneratePress settings only; no Elements) ===== */
.site-header, .main-navigation, .main-navigation ul ul, .inside-header { background: var(--fx-bg); border-bottom: 1px solid var(--fx-line); }
.inside-header { padding: 16px 24px; }
.site-logo img, .custom-logo { max-height: 44px; width: auto; }
.main-navigation .main-nav ul li a, .site-title a, .site-description { color: var(--fx-ink); }
.main-navigation .main-nav ul li a:hover, .main-navigation .main-nav ul li.current-menu-item > a { color: var(--fx-cyan); background: transparent; }
.main-navigation ul ul { background: var(--fx-card); border: 1px solid var(--fx-line); }

/* ===== 4. Footer (one footer per page) ===== */
.site-footer, .footer-widgets, .site-info { background: var(--fx-surface); color: var(--fx-muted); border-top: 1px solid var(--fx-line); }
.site-info a, .site-footer a { color: var(--fx-ink); }
.copyright-bar { color: var(--fx-muted); }
.fx-footer-legal { margin-bottom: 12px; }
.fx-footer-legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; }
.fx-footer-legal a { color: var(--fx-muted); }

/* ===== 5. Containers, cards, forms, tables, buttons ===== */
.site-content, .separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .one-container .container, .sidebar .widget { background: transparent; color: var(--fx-ink); }
.separate-containers .inside-article, .sidebar .widget { border-top: 1px solid var(--fx-line); }

.button, button, input[type=submit], .wp-block-button__link, .fx-btn {
  background: var(--fx-accent); color: #fff; border: 0; border-radius: var(--fx-radius-md);
  font-family: var(--fx-font-body); font-weight: 600; box-shadow: none; display: inline-block; padding: 12px 20px; text-decoration: none;
}
.button:hover, button:hover, input[type=submit]:hover, .wp-block-button__link:hover, .fx-btn:hover { background: var(--fx-accent-hover); color: #fff; text-decoration: none; }
.is-style-outline .wp-block-button__link, .fx-btn-outline { background: transparent; color: var(--fx-ink); border: 1px solid var(--fx-line); }

input[type=text], input[type=email], input[type=url], input[type=search], textarea, select { background: var(--fx-surface); color: var(--fx-ink); border: 1px solid var(--fx-line); border-radius: var(--fx-radius-sm); }
input::placeholder, textarea::placeholder { color: var(--fx-muted); }
input:focus, textarea:focus, select:focus { border-color: var(--fx-accent); outline: 0; }

table { border-collapse: collapse; width: 100%; }
th { font-family: var(--fx-font-body); font-weight: 600; text-align: left; color: var(--fx-muted); background: var(--fx-surface); border-bottom: 1px solid var(--fx-line); padding: 12px 16px; }
td { border-bottom: 1px solid var(--fx-line); padding: 12px 16px; }
.fx-num { font-variant-numeric: tabular-nums; text-align: right; }
.fx-table-wrap { overflow-x: auto; }

.fx-muted { color: var(--fx-muted); }
.fx-positive { color: var(--fx-cyan); }
.fx-negative { color: var(--fx-danger); }
.fx-disclaimer { font-size: .8125rem; color: var(--fx-muted); border-top: 1px solid var(--fx-line); padding-top: 16px; }

/* ===== 6. Child-theme page templates (page-fx-*.php) ===== */
.fx-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.fx-narrow { max-width: 720px; }
.fx-section { padding: 56px 0; border-bottom: 1px solid var(--fx-line); }
.fx-section.fx-surface, .fx-surface { background: var(--fx-surface); border-top: 1px solid var(--fx-line); border-bottom: 1px solid var(--fx-line); }
.fx-section.fx-disclaimer-wrap { border-bottom: 0; }
.fx-hero { padding-top: 72px; }
.fx-hero h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); max-width: 18ch; }
.fx-hero p { max-width: 60ch; color: var(--fx-muted); }
.fx-lead { color: var(--fx-muted); font-size: 1.125rem; max-width: 56ch; }
.fx-hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.fx-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.fx-card { background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius-md); padding: 20px; }
.fx-card-title { font-size: 1.125rem; margin-top: 0; }
.fx-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fx-list { list-style: none; padding: 0; margin: 0; }
.fx-list li { border-bottom: 1px solid var(--fx-line); padding: 12px 0; }
.fx-prose p { max-width: 65ch; }
@media (max-width: 768px) {
  .fx-hero-grid, .fx-two-col { grid-template-columns: 1fr; gap: 24px; }
  .fx-section { padding: 40px 0; }
  .fx-hero h1 { max-width: none; }
}

/* ===== 7. Homepage v2 (scoped to .fx2 and the homepage) ===== */
.fx2 { --fx2-bg: var(--fx-bg); --fx2-surface: var(--fx-surface); --fx2-card: var(--fx-card); --fx2-blue: var(--fx-accent); --fx2-cyan: var(--fx-cyan); --fx2-text: var(--fx-ink); --fx2-muted: var(--fx-muted); --fx2-border: var(--fx-line); display: block; width: 100%; background: var(--fx2-bg); color: var(--fx2-text); font-family: var(--fx-font-body); font-size: 1rem; line-height: 1.6; box-sizing: border-box; }
.fx2 *, .fx2 *::before, .fx2 *::after { box-sizing: border-box; }
.fx2 .fx2-inner { width: 100%; min-width: 0; max-width: 1280px; margin: 0 auto; padding: 0 32px; position: relative; }
.fx2 .fx2-section { padding: 24px 0; border-top: 1px solid var(--fx2-border); }
.fx2 .fx2-alt { background: var(--fx2-surface); }
.fx2 h1, .fx2 h2, .fx2 h3 { font-family: var(--fx-font-heading); font-weight: 700; color: var(--fx2-text); line-height: 1.12; margin: 0 0 16px; }
.fx2 h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: 12px; }
.fx2 h3 { font-size: 1.2rem; }
.fx2 p { margin: 0 0 12px; }
.fx2 a { color: var(--fx2-cyan); }
.fx2 a:hover { color: var(--fx2-text); }
.fx2 .fx2-muted { color: var(--fx2-muted); }
.fx2 .fx2-lead { color: var(--fx2-muted); font-size: 1.125rem; max-width: 58ch; margin: 0 0 20px; }

/* Homepage spacing reset: WordPress block-flow margins were stacking on the explicit section spacing. */
body.page-id-38983 .entry-content > .wp-block-group { margin-top: 0; margin-bottom: 0; }
.fx2 .wp-block-group__inner-container { display: flex; flex-direction: column; gap: 0; }
.fx2 .wp-block-group__inner-container > * { margin-block-start: 0; }

/* Hero: text left, decorative chart right (CSS only, not live data) */
.fx2 .fx2-hero { padding: 48px 0 24px; background: radial-gradient(900px 420px at 85% 0%, rgba(20,125,255,.18), transparent 60%), #090F1D; }
.fx2 .fx2-hero .fx2-inner::after { content: ''; position: absolute; top: 0; right: 32px; bottom: 0; width: 46%; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='640' height='420' viewBox='0 0 640 420' fill='none'><g stroke='%23293A59' stroke-opacity='.5'><path d='M0 60H640M0 140H640M0 220H640M0 300H640M0 380H640'/></g><path d='M0 300 L70 250 L130 275 L200 190 L265 215 L330 140 L395 170 L460 96 L525 128 L590 70 L640 88' stroke='%2346D4C5' stroke-opacity='.7' stroke-width='2.5'/><path d='M0 340 L80 320 L150 335 L230 280 L300 300 L380 240 L450 262 L520 205 L600 230 L640 210' stroke='%23147DFF' stroke-opacity='.6' stroke-width='2'/></svg>") center / contain no-repeat; pointer-events: none; opacity: .9; }
.fx2 .fx2-hero .fx2-inner > .wp-block-group__inner-container { position: relative; z-index: 1; max-width: 620px; }
.fx2 .fx2-hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); max-width: 14ch; }
.fx2 .fx2-eyebrow { color: var(--fx2-cyan); font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }

/* Buttons: primary and secondary */
.fx2 .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.fx2 .wp-block-button { margin: 0; }
.fx2 .wp-block-button__link, .fx2 .fx2-btn { display: inline-flex; align-items: center; justify-content: center; background: var(--fx2-blue); color: #fff; border: 1px solid var(--fx2-blue); border-radius: 10px; padding: 14px 24px; font-family: var(--fx-font-body); font-size: 1rem; font-weight: 600; line-height: 1.2; text-decoration: none; transition: background-color .2s, border-color .2s; }
.fx2 .wp-block-button__link:hover, .fx2 .fx2-btn:hover { background: var(--fx-accent-hover); border-color: var(--fx-accent-hover); color: #fff; text-decoration: none; }
.fx2 .fx2-btn-ghost .wp-block-button__link { background: transparent; color: var(--fx2-text); border: 1px solid var(--fx2-border); }
.fx2 .fx2-btn-ghost .wp-block-button__link:hover { background: rgba(70,212,197,.08); border-color: var(--fx2-cyan); color: var(--fx2-text); }

/* Card grids: CSS Grid, equal columns */
.fx2 .wp-block-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; width: 100%; margin: 0; }
.fx2 .wp-block-columns.fx2-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fx2 .wp-block-columns.fx2-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fx2 .wp-block-columns > .wp-block-column { min-width: 0; width: auto; flex: none; margin: 0; display: flex; flex-direction: column; }

.fx2 h2 + p { margin: 0 0 20px; }
.fx2 h2 + .wp-block-columns { margin-top: 4px; }
.fx2 .fx2-section:has(.tnp) h2 + p { margin-bottom: 16px; }

/* Broker and article cards */
.fx2 .fx2-card { flex: 1; display: flex; flex-direction: column; background: var(--fx2-card); border: 1px solid var(--fx2-border); border-radius: 12px; overflow: hidden; transition: border-color .2s, transform .2s; }
.fx2 .fx2-card:hover { border-color: var(--fx2-blue); transform: translateY(-2px); }
.fx2 .fx2-card > .wp-block-group__inner-container { display: flex; flex-direction: column; flex: 1; gap: 10px; width: 100%; padding: 0 0 16px; }
.fx2 .fx2-card > .wp-block-group__inner-container > :not(.wp-block-image) { padding-left: 18px; padding-right: 18px; }
.fx2 .fx2-card .wp-block-image { margin: 0; }
.fx2 .fx2-card .wp-block-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0; }
.fx2 .fx2-card h3 { font-size: 1.2rem; line-height: 1.3; margin: 8px 0 0; }
.fx2 .fx2-card h3 a { color: var(--fx2-text); text-decoration: none; }
.fx2 .fx2-card h3 a:hover { color: var(--fx2-cyan); }
.fx2 .fx2-card .wp-block-button { margin-top: auto; padding-top: 4px; }
.fx2 .fx2-card .wp-block-button__link { padding: 12px 20px; font-size: .9375rem; }

/* Category cards */
.fx2 .fx2-cat { flex: 1; background: var(--fx2-card); border: 1px solid var(--fx2-border); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }

/* Research cards with small line icons */
.fx2 .fx2-pillar { flex: 1; background: var(--fx2-card); border: 1px solid var(--fx2-border); border-top: 2px solid var(--fx2-cyan); border-radius: 12px; padding: 24px; }
.fx2 .fx2-pillar::before { content: ''; display: block; width: 40px; height: 40px; margin-bottom: 12px; background: no-repeat center / contain; }
.fx2 .wp-block-columns > .wp-block-column:nth-child(1) > .fx2-pillar::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%2346D4C5' stroke-width='2'><rect x='6' y='8' width='10' height='24' rx='2'/><rect x='24' y='14' width='10' height='18' rx='2'/></svg>"); }
.fx2 .wp-block-columns > .wp-block-column:nth-child(2) > .fx2-pillar::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%2346D4C5' stroke-width='2'><circle cx='17' cy='17' r='9'/><path d='M24 24 L33 33'/></svg>"); }
.fx2 .wp-block-columns > .wp-block-column:nth-child(3) > .fx2-pillar::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%2346D4C5' stroke-width='2'><path d='M4 26 L12 16 L18 22 L26 10 L36 18'/></svg>"); }
.fx2 .fx2-disclaimer { margin-top: 12px; font-size: .8125rem; color: var(--fx2-muted); border-top: 1px solid var(--fx2-border); padding-top: 12px; }

/* Newsletter panel (existing shortcode; styled, not replaced) */
.fx2 .fx2-section:has(.tnp) .fx2-inner { background: var(--fx2-card); border: 1px solid var(--fx2-border); border-radius: 16px; padding: 28px 32px; }
.fx2 .tnp-subscription { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; max-width: 560px; margin: 16px 0 0; }
.fx2 .fx2-section:has(.tnp) .fx2-inner p:last-child { margin-top: 10px; }
.fx2 .tnp-field { flex: 1 1 280px; margin: 0; }
.fx2 .tnp-field label { display: block; font-size: .875rem; color: var(--fx2-muted); margin-bottom: 6px; }
.fx2 .tnp-subscription input[type=email] { width: 100%; background: var(--fx2-bg); color: var(--fx2-text); border: 1px solid var(--fx2-border); border-radius: 10px; padding: 14px 16px; font-size: 1rem; }
.fx2 .tnp-subscription input[type=email]:focus { border-color: var(--fx2-blue); outline: 0; }
.fx2 .tnp-submit input, .fx2 .tnp-submit button { background: var(--fx2-blue); color: #fff; border: 0; border-radius: 10px; padding: 14px 24px; font-family: var(--fx-font-body); font-size: 1rem; font-weight: 600; cursor: pointer; }
.fx2 .tnp-submit input:hover, .fx2 .tnp-submit button:hover { background: var(--fx-accent-hover); }

@media (max-width: 1199px) and (min-width: 769px) {
  .fx2 .wp-block-columns.fx2-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx2 .fx2-hero { padding: 36px 0 32px; }
}
@media (max-width: 768px) {
  .fx2 .wp-block-columns, .fx2 .wp-block-columns.fx2-grid-3, .fx2 .wp-block-columns.fx2-grid-2 { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .fx2 .fx2-inner { padding: 0 20px; }
  .fx2 .fx2-section { padding: 16px 0; }
  .fx2 .fx2-hero { padding: 28px 0 16px; }
  .fx2 .fx2-hero .fx2-inner::after { display: none; }
  .fx2 .fx2-section:has(.tnp) .fx2-inner { padding: 24px 20px; }
}

/* Footer: financial layout, homepage only (GeneratePress footer; content unchanged) */
body.page-id-38983 .site-footer , body.single-post .site-footer , body.archive .site-footer { background: #0B1426; border-top: 2px solid var(--fx-accent); color: var(--fx-muted); }
body.page-id-38983 .site-footer .site-info , body.single-post .site-footer .site-info , body.archive .site-footer .site-info { background: transparent; padding: 48px 0 0; }
body.page-id-38983 .site-footer .inside-site-info , body.single-post .site-footer .inside-site-info , body.archive .site-footer .inside-site-info { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 40px; align-items: start; max-width: 1280px; padding: 0 32px 40px; }
body.page-id-38983 .fx-footer-intro , body.single-post .fx-footer-intro , body.archive .fx-footer-intro { display: contents; }
body.page-id-38983 .fx-footer-intro::before , body.single-post .fx-footer-intro::before , body.archive .fx-footer-intro::before { grid-column: 1; grid-row: 1; }
body.page-id-38983 .fx-footer-description , body.single-post .fx-footer-description , body.archive .fx-footer-description { grid-column: 1; grid-row: 3; }\nbody.page-id-38983 .fx-footer-intro::after { content: ''; display: block; grid-column: 1; grid-row: 2; width: 200px; height: 56px; margin: 0 0 16px; background: url("https://fxtradingwebsites.com/wp-content/uploads/2022/05/Forex-Trading-Websites-Logo-2.png") left center / contain no-repeat; }
body.page-id-38983 .fx-footer-legal , body.single-post .fx-footer-legal , body.archive .fx-footer-legal { grid-column: 2; grid-row: 1 / span 3; }
body.page-id-38983 .copyright-bar , body.single-post .copyright-bar , body.archive .copyright-bar { grid-column: 3; grid-row: 1; }
body.page-id-38983 .fx-footer-risk , body.single-post .fx-footer-risk , body.archive .fx-footer-risk { grid-column: 3; grid-row: 2; align-self: start; }
body.page-id-38983 .fx-footer-intro , body.single-post .fx-footer-intro , body.archive .fx-footer-intro { text-align: left; max-width: none; margin: 0; }
body.page-id-38983 .fx-footer-intro::before , body.single-post .fx-footer-intro::before , body.archive .fx-footer-intro::before { content: 'FX Trading Websites'; display: block; font-family: var(--fx-font-heading); font-weight: 700; font-size: 1.25rem; color: var(--fx-ink); margin-bottom: 12px; }
body.page-id-38983 .fx-footer-description , body.single-post .fx-footer-description , body.archive .fx-footer-description { font-size: .9375rem; color: var(--fx-muted); margin: 0 0 16px; }
body.page-id-38983 .fx-footer-risk , body.single-post .fx-footer-risk , body.archive .fx-footer-risk { font-size: .8125rem; color: var(--fx-muted); margin: 0; padding: 14px 16px; border: 1px solid var(--fx-line); border-left: 3px solid var(--fx-danger); border-radius: 8px; background: var(--fx-surface); }
body.page-id-38983 .fx-footer-legal::before , body.single-post .fx-footer-legal::before , body.archive .fx-footer-legal::before { content: 'Legal and editorial'; display: block; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fx-cyan); margin-bottom: 16px; }
body.page-id-38983 .fx-footer-legal ul , body.single-post .fx-footer-legal ul , body.archive .fx-footer-legal ul { display: flex; flex-direction: column; gap: 10px; justify-content: flex-start; padding: 0; margin: 0; list-style: none; }
body.page-id-38983 .fx-footer-legal a , body.single-post .fx-footer-legal a , body.archive .fx-footer-legal a { color: var(--fx-ink); font-size: .9375rem; text-decoration: none; }
body.page-id-38983 .fx-footer-legal a:hover , body.single-post .fx-footer-legal a:hover , body.archive .fx-footer-legal a:hover { color: var(--fx-cyan); }
body.page-id-38983 .copyright-bar , body.single-post .copyright-bar , body.archive .copyright-bar { text-align: left; font-size: .875rem; color: var(--fx-muted); }
body.page-id-38983 .copyright-bar::before , body.single-post .copyright-bar::before , body.archive .copyright-bar::before { content: 'Compliance'; display: block; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fx-cyan); margin-bottom: 16px; }
body.page-id-38983 .copyright-bar .copyright , body.single-post .copyright-bar .copyright , body.archive .copyright-bar .copyright { display: block; color: var(--fx-ink); margin-bottom: 8px; }
@media (max-width: 768px) {
  body.page-id-38983 .site-footer .inside-site-info , body.single-post .site-footer .inside-site-info , body.archive .site-footer .inside-site-info { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 0 20px 32px; }
  body.page-id-38983 .fx-footer-description , body.single-post .fx-footer-description , body.archive .fx-footer-description { order: 1; }
  body.page-id-38983 .fx-footer-legal , body.single-post .fx-footer-legal , body.archive .fx-footer-legal { order: 2; }
  body.page-id-38983 .copyright-bar , body.single-post .copyright-bar , body.archive .copyright-bar { order: 3; }
  body.page-id-38983 .fx-footer-risk , body.single-post .fx-footer-risk , body.archive .fx-footer-risk { order: 4; }
  body.page-id-38983 .site-footer .site-info , body.single-post .site-footer .site-info , body.archive .site-footer .site-info { padding-top: 36px; }
}

/* ===== 8. Editorial article, archive and related-content templates ===== */
body.single-post, body.archive, body.blog { background: var(--fx-bg); color: var(--fx-ink); }
body.single-post .site, body.archive .site { background: var(--fx-bg); }
body.single-post #right-sidebar, body.single-post .sidebar, body.archive #right-sidebar, body.archive .sidebar { display: none !important; }
body.single-post #primary, body.archive #primary { width: 100%; float: none; }
body.single-post .grid-container, body.archive .grid-container { max-width: 1200px; }

body.single-post .entry-title { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; color: var(--fx-ink); }
body.single-post .entry-meta, body.single-post .entry-meta a { color: var(--fx-muted); }
body.single-post .entry-content > p, body.single-post .entry-content > ul, body.single-post .entry-content > ol, body.single-post .entry-content > h2, body.single-post .entry-content > h3, body.single-post .entry-content > h4, body.single-post .entry-content > blockquote { max-width: 820px; }
body.single-post .entry-content h2, body.single-post .entry-content h3 { color: var(--fx-ink); line-height: 1.25; }
body.single-post .entry-content a { color: var(--fx-cyan); }
body.single-post .entry-content blockquote { border-left: 3px solid var(--fx-accent); padding-left: 16px; color: var(--fx-muted); }
body.single-post .entry-content img, body.single-post .entry-content figure, body.single-post .entry-content iframe, body.single-post .entry-content .wp-block-embed { max-width: 100%; height: auto; }
body.single-post .entry-content .wp-block-table { overflow-x: auto; }
body.single-post .entry-content table { width: 100%; border-collapse: collapse; }
body.single-post .entry-content th, body.single-post .entry-content td { border: 1px solid var(--fx-line); padding: 10px 12px; text-align: left; vertical-align: top; }
body.single-post .entry-content th { background: var(--fx-card); color: var(--fx-ink); }

/* MORE FROM FX TRADING WEBSITES (markup added by functions.php) */
body.single-post .fx3-related { max-width: 1200px; margin: 48px auto 0; padding-top: 32px; border-top: 1px solid var(--fx-line); }
body.single-post .fx3-related-title { font-family: var(--fx-font-heading); font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fx-cyan); margin: 0 0 20px; }
body.single-post .fx3-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
body.single-post .fx3-card { background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: var(--fx-radius-md); overflow: hidden; display: flex; flex-direction: column; }
body.single-post .fx3-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
body.single-post .fx3-card-title { font-size: 1.05rem; line-height: 1.3; margin: 14px 16px 6px; }
body.single-post .fx3-card-title a { color: var(--fx-ink); text-decoration: none; }
body.single-post .fx3-card-title a:hover { color: var(--fx-cyan); }
body.single-post .fx3-card-excerpt { margin: 0 16px 18px; color: var(--fx-muted); font-size: .95rem; }

/* Archive: three-column card grid; WordPress pagination kept */
body.archive #main , body.blog #main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
body.archive #main > .page-header, body.blog #main > .page-header, body.archive #main > .paging-navigation, body.archive #main > nav { grid-column: 1 / -1; }
body.archive .page-header, body.blog .page-header, body.archive .page-header h1 { color: var(--fx-ink); }
body.archive #main > article , body.blog #main > article { margin: 0; background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: var(--fx-radius-md); overflow: hidden; }
body.archive #main > article .inside-article , body.blog #main > article .inside-article { padding: 0; }
body.archive #main > article .post-image img , body.blog #main > article .post-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
body.archive #main > article .entry-header , body.blog #main > article .entry-header { padding: 16px 18px 0; }
body.archive #main > article .entry-title , body.blog #main > article .entry-title { font-size: 1.1rem; line-height: 1.3; margin: 0 0 8px; }
body.archive #main > article .entry-title a , body.blog #main > article .entry-title a { color: var(--fx-ink); text-decoration: none; }
body.archive #main > article .entry-summary, body.blog #main > article .entry-summary, body.archive #main > article .entry-content { padding: 0 18px; color: var(--fx-muted); }
body.archive #main > article .read-more, body.blog #main > article .read-more, body.archive #main > article .more-link { display: inline-block; margin: 12px 18px 18px; color: var(--fx-accent); font-weight: 600; }
body.archive #main > article .entry-meta, body.blog #main > article .entry-meta, body.archive #main > article .cat-links { padding: 0 18px; color: var(--fx-muted); font-size: .85rem; }
body.archive .paging-navigation a, body.blog .paging-navigation a, body.archive .paging-navigation .page-numbers { color: var(--fx-ink); }

/* ===== 9. Front page: single footer (footer block is in the homepage content) ===== */
/* Enabled only after functions.php is live and the homepage footer shows the dynamic copyright shortcode. */

@media (max-width: 1024px) {
  body.single-post .fx3-related-grid, body.archive #main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body.single-post .fx3-related-grid, body.archive #main { grid-template-columns: 1fr; }
  body.single-post .entry-title { font-size: 1.75rem; }
  .fx-footer-legal ul { gap: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===== 11. Responsive (consolidated: tablet 769-1199px, mobile up to 768px, small phones up to 360px) ===== */
@media (max-width: 1199px) {
  .fx2 .fx2-inner { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 768px) {
  .grid-container, .site-content, #page, .site-content .content-area, .site-main, .inside-article { width: 100%; max-width: 100%; min-width: 0; float: none; margin-left: 0; margin-right: 0; }
  .inside-header { padding: 12px 16px; }
  .site-logo img, .custom-logo { max-height: 40px; }
  .fx2 .fx2-inner { padding-left: 16px; padding-right: 16px; min-width: 0; }
  .fx2 .fx2-hero { padding: 28px 0 16px; }
  .fx2 .fx2-hero h1 { font-size: clamp(1.75rem, 8vw, 2.25rem); max-width: none; overflow-wrap: anywhere; }
  .fx2 .fx2-lead { font-size: 1rem; }
  .fx2 .wp-block-buttons { flex-direction: column; align-items: stretch; }
  .fx2 .wp-block-button, .fx2 .wp-block-button__link, .fx2 .fx2-btn { width: 100%; min-height: 44px; justify-content: center; }
  .fx2 .wp-block-columns, .fx2 .wp-block-columns.fx2-grid-3, .fx2 .wp-block-columns.fx2-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .fx2 .wp-block-columns > .wp-block-column { min-width: 0; width: 100%; }
  .fx2 .fx2-card, .fx2 .fx2-pillar, .fx2 .fx2-cat { min-width: 0; }
  .fx2 .fx2-card h3, .fx2 .fx2-card a { overflow-wrap: anywhere; }
  .fx2 .fx2-card .wp-block-button__link { min-height: 44px; }
  .fx2 .fx2-section { padding-top: 16px; padding-bottom: 16px; }
  .fx2 h2 { font-size: clamp(1.5rem, 6.5vw, 1.875rem); }
  .fx2 .fx2-section:has(.tnp) .fx2-inner { padding: 24px 16px; }
  .fx2 .tnp-subscription { max-width: 100%; }
  .fx2 .tnp-field { flex: 1 1 100%; }
  .fx2 .tnp-submit input, .fx2 .tnp-submit button { width: 100%; min-height: 44px; }
  .fx2 .tnp-subscription input[type=email] { min-height: 44px; }
  body.single-post .entry-title { font-size: 1.875rem; line-height: 1.2; }
  body.single-post .entry-content { font-size: 1rem; line-height: 1.7; }
  body.single-post .entry-content h2 { font-size: 1.5rem; }
  body.single-post .entry-content h3 { font-size: 1.25rem; }
  body.single-post .entry-content img, body.single-post .entry-content video, body.single-post .entry-content iframe { max-width: 100%; height: auto; }
  body.single-post .entry-content .wp-block-table, body.single-post .entry-content table, .fx-table-wrap { display: block; max-width: 100%; overflow-x: auto; }
  body.single-post .entry-content .wp-block-embed, body.single-post .entry-content .wp-block-embed__wrapper { max-width: 100%; }
  body.single-post .fx3-related-grid, body.archive #main, body.blog #main { grid-template-columns: minmax(0, 1fr); }
  body.single-post .fx3-related { padding-left: 16px; padding-right: 16px; }
  .fx-section, .fx-wrap { padding-left: 16px; padding-right: 16px; }
  body.page-id-38983 .site-footer .inside-site-info { padding: 0 16px 32px; }
  body.page-id-38983 .fx-footer-legal ul { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  body.page-id-38983 .fx-footer-risk { overflow-wrap: anywhere; }
}
@media (max-width: 360px) {
  .fx2 .fx2-hero h1 { font-size: 1.625rem; }
  .fx2 .fx2-inner { padding-left: 12px; padding-right: 12px; }
}