/*
Theme Name: HabbyFX
Theme URI: https://habbyfx.com
Author: HabbyFX
Description: Block theme for a forex education and affiliate blog. Matches the HabbyFX design canvas: ticker strip, hero with calculator, category cards, guide cards, comparison table, newsletter band and a two-column article layout.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: habbyfx
*/

:root{--hfx-border:#DDE3EA;--hfx-display:var(--wp--preset--font-family--display);--hfx-mono:var(--wp--preset--font-family--mono)}
body{-webkit-font-smoothing:antialiased}
.hfx-sr,.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Ticker + header */
.hfx-ticker{background:#0E1A2B}
.hfx-ticker .tradingview-widget-container{max-width:1200px;margin:0 auto;padding:0 12px}
.tradingview-widget-copyright{font-size:11px;color:#B5C0CE;text-align:right;padding:0 12px 4px}
.tradingview-widget-copyright a{color:#B5C0CE}
.hfx-header{background:#fff;border-bottom:1px solid var(--hfx-border)}
.hfx-header-inner{max-width:1200px;margin:0 auto;padding:12px 24px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 36px}
.hfx-header-inner .wp-block-site-title{margin:0;font-family:var(--hfx-display);font-weight:800;font-size:22px;letter-spacing:-.02em}
.hfx-header-inner .wp-block-site-title a{color:#0E1A2B;text-decoration:none}
.hfx-header-inner .wp-block-navigation{font-weight:500}
.hfx-header-inner .wp-block-navigation a{color:#0E1A2B;text-decoration:none;padding:10px 0}
.hfx-header-inner .wp-block-buttons{margin-left:auto}

/* Type helpers */
.hfx-eyebrow{margin:0 0 16px;font-family:var(--hfx-mono);font-weight:500;font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:#0B7A55}
.hfx-h1{margin:0 0 20px;font-family:var(--hfx-display);font-weight:800;font-size:clamp(34px,5vw,52px);line-height:1.08;letter-spacing:-.02em}
.hfx-h2{margin:0 0 24px;font-family:var(--hfx-display);font-weight:700;font-size:30px;line-height:1.2;letter-spacing:-.01em}
.hfx-lead{margin:0 0 28px;font-size:19px;color:#4A5668;max-width:540px}
.hfx-small{margin:12px 0 0;font-size:14px;color:#4A5668}

/* Hero */
.hfx-hero{max-width:1200px;margin:0 auto;padding:64px 24px 56px;display:flex;flex-wrap:wrap;align-items:center;gap:48px}
.hfx-hero-main{flex:999 1 480px;min-width:0}
.hfx-hero-side{flex:1 1 360px;max-width:460px}
.hfx-checks{list-style:none;padding:0;margin:28px 0 0;display:flex;flex-wrap:wrap;gap:10px 24px;font-weight:500;font-size:15px}
.hfx-checks li{margin:0;padding-left:26px;position:relative}
.hfx-checks li::before{content:"";position:absolute;left:3px;top:.3em;width:6px;height:11px;border:solid #0B7A55;border-width:0 2.4px 2.4px 0;transform:rotate(45deg)}
.hfx-form{display:flex;flex-wrap:wrap;gap:12px;max-width:540px}
.hfx-form input{flex:1 1 220px;min-width:0;box-sizing:border-box;padding:14px 16px;border:1px solid #8A96A6;border-radius:10px;font:inherit;color:#0E1A2B;background:#fff}
.hfx-form button{flex:0 0 auto;padding:14px 22px;border:0;border-radius:10px;background:#0B7A55;color:#fff;font:inherit;font-weight:600;cursor:pointer}
.hfx-form button:hover{background:#08583D}

/* Position size calculator (shortcode) */
.hfx-calc{background:#fff;border:1px solid var(--hfx-border);border-radius:18px;padding:28px;box-shadow:0 14px 36px rgba(14,26,43,.08);box-sizing:border-box}
.hfx-calc-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.hfx-calc-head h3{margin:0;font-family:var(--hfx-display);font-weight:700;font-size:20px}
.hfx-pill{background:#E3F4EC;color:#0B7A55;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px}
.hfx-calc-fields{display:flex;flex-direction:column;gap:10px}
.hfx-calc-fields label{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 8px 8px 16px;background:#F4F6F8;border-radius:10px;color:#4A5668;font-size:15px}
.hfx-calc-fields input{width:110px;box-sizing:border-box;padding:8px 10px;border:1px solid #C5CDD8;border-radius:8px;font-family:var(--hfx-mono);font-weight:500;font-size:15px;text-align:right;background:#fff;color:#0E1A2B}
.hfx-calc-out{margin-top:16px;padding:18px 20px;background:#E3F4EC;border-radius:12px}
.hfx-calc-k{font-size:14px;font-weight:600;color:#0B5A3F}
.hfx-calc-v{font-family:var(--hfx-mono);font-weight:500;font-size:34px;line-height:1.2;color:#0E1A2B}
.hfx-calc-s{font-size:14px;color:#3C4A5C}
.hfx-calc-note{margin:14px 0 0;font-size:13px;color:#4A5668}

/* Sections, category cards */
.hfx-section{max-width:1200px;margin:0 auto;padding:8px 24px 64px}
.hfx-section-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 24px;margin-bottom:24px}
.hfx-section-head .hfx-h2{margin:0}
.hfx-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px}
.hfx-cat{position:relative;background:#fff;border:1px solid var(--hfx-border);border-radius:14px;padding:24px}
.hfx-cat:hover{border-color:#0B7A55}
.hfx-cat-icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;margin-bottom:16px}
.hfx-cat-icon.is-green{background:#E3F4EC}
.hfx-cat-icon.is-blue{background:#E4EBF7}
.hfx-cat-icon.is-amber{background:#FFF1D6}
.hfx-cat h3{margin:0 0 6px;font-family:var(--hfx-display);font-weight:700;font-size:19px}
.hfx-cat h3 a{color:#0E1A2B;text-decoration:none}
.hfx-cat h3 a::after{content:"";position:absolute;inset:0}
.hfx-cat p{margin:0;font-size:15px;color:#4A5668}

/* Post cards */
.hfx-posts{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;list-style:none;padding:0;margin:0}
.hfx-posts>li{margin:0}
.hfx-post-card{position:relative;background:#fff;border:1px solid var(--hfx-border);border-radius:14px;overflow:hidden;height:100%}
.hfx-post-card .wp-block-post-featured-image{margin:0;background:#E3F4EC;min-height:150px;aspect-ratio:16/9}
.hfx-post-card .wp-block-post-featured-image img{width:100%;height:100%;object-fit:cover;display:block}
.hfx-post-body{padding:22px}
.hfx-tag,.hfx-tag a{font-size:12px;font-weight:600;text-decoration:none;color:#0B5A3F}
.hfx-tag{display:inline-block;background:#E3F4EC;padding:4px 10px;border-radius:999px}
.hfx-post-card .wp-block-post-title{margin:12px 0 8px;font-family:var(--hfx-display);font-weight:700;font-size:20px;line-height:1.3}
.hfx-post-card .wp-block-post-title a{color:#0E1A2B;text-decoration:none}
.hfx-post-card .wp-block-post-title a::after{content:"";position:absolute;inset:0}
.hfx-post-card .wp-block-post-date{margin:0;font-size:14px;color:#4A5668}

/* Comparison table + newsletter band */
.hfx-compare{background:#fff;border-top:1px solid var(--hfx-border);border-bottom:1px solid var(--hfx-border)}
.hfx-compare-inner{max-width:1200px;margin:0 auto;padding:64px 24px}
.hfx-table{overflow-x:auto;border:1px solid var(--hfx-border);border-radius:14px;background:#fff;margin:0 0 16px}
.hfx-table table{width:100%;min-width:640px;border-collapse:collapse;text-align:left;font-size:15px}
.hfx-table th{background:#F4F6F8;padding:14px 18px;font-weight:600;text-align:left;border:0}
.hfx-table td{padding:16px 18px;color:#4A5668;border:0;border-top:1px solid var(--hfx-border)}
.hfx-table td:first-child{font-weight:600;color:#0E1A2B}
.hfx-band{background:#0E1A2B;color:#F4F6F8}
.hfx-band-inner{max-width:1200px;margin:0 auto;padding:64px 24px;display:flex;flex-wrap:wrap;align-items:center;gap:32px 64px}
.hfx-band-inner>div{flex:1 1 380px;min-width:0}
.hfx-band h2{margin:0 0 12px;font-family:var(--hfx-display);font-weight:700;font-size:32px;color:#F4F6F8}
.hfx-band p{margin:0;font-size:18px;color:#B5C0CE;max-width:480px}
.hfx-band .hfx-form{max-width:520px}
.hfx-band .hfx-form button{background:#3DDC97;color:#0E1A2B}
.hfx-band .hfx-form button:hover{background:#6FE8B4}

/* Footer */
.hfx-footer{background:#fff;border-top:1px solid var(--hfx-border)}
.hfx-footer-inner{max-width:1200px;margin:0 auto;padding:48px 24px 40px}
.hfx-footer-cols{display:flex;flex-wrap:wrap;gap:32px 64px}
.hfx-footer-cols>div{flex:0 1 160px}
.hfx-footer-cols>div:first-child{flex:1 1 260px}
.hfx-footer-brand{margin:0 0 10px;font-family:var(--hfx-display);font-weight:800;font-size:22px;letter-spacing:-.02em}
.hfx-footer-cols p{margin:0;font-size:15px;color:#4A5668;max-width:320px}
.hfx-footer h4{margin:0 0 6px;font-size:16px;font-weight:600}
.hfx-footer ul{list-style:none;padding:0;margin:0}
.hfx-footer li{margin:0}
.hfx-footer li a{display:inline-block;padding:6px 0;text-decoration:none;font-size:15px}
.hfx-risk{margin:36px 0 0;padding-top:24px;border-top:1px solid var(--hfx-border);font-size:13px;color:#4A5668;max-width:820px}

/* Page + article layout */
.hfx-page{max-width:1200px;margin:0 auto;padding:40px 24px 72px}
.hfx-narrow{max-width:760px}
.hfx-article-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:48px;align-items:start}
.hfx-article{max-width:760px;min-width:0}
.hfx-article .wp-block-post-title,.hfx-page .wp-block-post-title,.hfx-page .wp-block-query-title{margin:14px 0 16px;font-family:var(--hfx-display);font-weight:800;font-size:clamp(30px,4.2vw,44px);line-height:1.12;letter-spacing:-.02em}
.hfx-dek,.hfx-dek p{font-size:20px;line-height:1.55;color:#3C4A5C;margin:0 0 24px}
.hfx-byline{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;padding:16px 0;border-top:1px solid var(--hfx-border);border-bottom:1px solid var(--hfx-border);margin-bottom:24px;font-size:15px;color:#4A5668}
.hfx-byline>*{margin:0}
.hfx-byline .wp-block-post-author-name{font-weight:600;color:#0E1A2B}
.hfx-prose{font-size:18px;line-height:1.7;color:#1E2A3B}
.hfx-prose>*{margin:0 0 1.2em}
.hfx-prose h2{margin:1.8em 0 .6em;font-family:var(--hfx-display);font-weight:700;font-size:30px;line-height:1.2;letter-spacing:-.01em}
.hfx-prose h3{margin:1.5em 0 .5em;font-family:var(--hfx-display);font-weight:700;font-size:22px;line-height:1.3}
.hfx-prose ul,.hfx-prose ol{padding-left:1.4em}
.hfx-prose li{margin-bottom:.5em}
.hfx-prose img{max-width:100%;height:auto;border-radius:12px}

/* Article callouts (also usable from n8n / raw HTML) */
.hfx-disclosure{background:#FFF1D6;color:#4A3000;border-radius:12px;padding:16px 20px;margin:0 0 28px;font-size:15px}
.hfx-disclosure p{margin:0;font-size:15px}
.hfx-quick{background:#E3F4EC;border-radius:14px;padding:24px 26px;margin:0 0 40px;color:#14301F}
.hfx-quick h3{margin:0 0 12px;font-family:var(--hfx-display);font-weight:700;font-size:18px}
.hfx-quick ul{margin:0;padding-left:1.2em;font-size:17px}
.hfx-take{border:2px dashed #8A96A6;border-radius:14px;padding:20px 24px;margin:0 0 44px;background:#fff;color:#3C4A5C}
.hfx-take p{margin:0;font-size:17px}
.hfx-verdict{background:#0E1A2B;color:#F4F6F8;border-radius:16px;padding:28px 30px;margin:36px 0 44px}
.hfx-verdict .hfx-kicker{margin:0 0 8px;font-family:var(--hfx-mono);font-weight:500;font-size:13px;letter-spacing:.08em;color:#3DDC97}
.hfx-verdict h3{margin:0 0 10px;font-family:var(--hfx-display);font-weight:700;font-size:24px;line-height:1.3;color:#F4F6F8}
.hfx-verdict p{margin:0 0 20px;color:#B5C0CE;font-size:17px}
.hfx-verdict .wp-block-button__link{background:#3DDC97;color:#0E1A2B}
.hfx-prose .hfx-table,.hfx-prose .wp-block-table{margin:1.4em 0}
.wp-block-details{background:#fff;border:1px solid var(--hfx-border);border-radius:12px;padding:0 20px;margin:0 0 10px}
.wp-block-details summary{padding:16px 0;font-weight:600;font-size:17px;cursor:pointer}
.wp-block-details>*:not(summary){margin:0;padding-bottom:18px;color:#3C4A5C}
.hfx-riskbox{margin:0;padding:16px 20px;background:#fff;border:1px solid var(--hfx-border);border-radius:12px;font-size:14px;color:#4A5668}

/* Sidebar */
.hfx-sidebar{display:flex;flex-direction:column;gap:20px}
.hfx-card{background:#fff;border:1px solid var(--hfx-border);border-radius:14px;padding:22px}
.hfx-card h3{margin:0 0 12px;font-family:var(--hfx-display);font-weight:700;font-size:17px}
.hfx-card .wp-block-post-author{align-items:center}
.hfx-card-dark{background:#0E1A2B;color:#F4F6F8;border-radius:14px;padding:24px}
.hfx-card-dark h3{margin:0 0 8px;font-family:var(--hfx-display);font-weight:700;font-size:20px;line-height:1.3;color:#F4F6F8}
.hfx-card-dark p{margin:0 0 16px;font-size:15px;color:#B5C0CE}
.hfx-card-dark .hfx-form{flex-direction:column;max-width:none}
.hfx-card-dark .hfx-form input{flex:none;width:100%}
.hfx-card-dark .hfx-form button{background:#3DDC97;color:#0E1A2B}
.hfx-card-soft{position:relative;background:#E3F4EC;border-radius:14px;padding:22px}
.hfx-card-soft h3{margin:0 0 6px;font-family:var(--hfx-display);font-weight:700;font-size:17px}
.hfx-card-soft p{margin:0 0 10px;font-size:15px;color:#3C4A5C}
.hfx-card-soft a{font-weight:600;color:#0B5A3F;text-decoration:none}
.hfx-card-soft a::after{content:"";position:absolute;inset:0}

/* Pagination */
.wp-block-query-pagination{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:40px;font-weight:600}
.wp-block-query-pagination a{text-decoration:none}

@media (max-width:900px){.hfx-article-layout{grid-template-columns:minmax(0,1fr)}}
