/* ═══════════════════════════════════════════════════
   FXDetails Components v6.0.0
   ForexFactory-Inspired: News, Articles, Sidebar, etc
   ═══════════════════════════════════════════════════ */

/* ══════════════════════════════════════
   NEWS ITEM LIST
   ══════════════════════════════════════ */

.fxd-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fxd-news-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--fx-border);
    /* FF inner border is same light blue-gray */
    align-items: flex-start;
    transition: background var(--fx-transition);
}

.fxd-news-item:last-child {
    border-bottom: none;
}

.fxd-news-item:hover {
    background: var(--fx-bg-hover);
}

img.fxd-news-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 62px;
    object-fit: cover;
    border-radius: var(--fx-radius);
    border: 1px solid var(--fx-border);
    background: var(--fx-bg-panel-alt);
}

.fxd-news-content {
    flex: 1;
    min-width: 0;
}

.fxd-news-content h3 {
    font-size: var(--fx-font-base);
    font-weight: 700;
    margin: 0 0 3px;
    line-height: 1.4;
    font-family: var(--fx-font);
}

.fxd-news-content h3 a {
    color: #0e5094;
    /* Exact FF Blue Link */
    text-decoration: none;
}

.fxd-news-content h3 a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.fxd-news-meta {
    font-size: var(--fx-font-sm);
    color: #737373;
    margin-bottom: 3px;
}

.fxd-news-meta a {
    color: var(--fx-text-secondary);
}

.fxd-news-meta a:hover {
    color: var(--fx-accent);
}

.fxd-news-excerpt {
    font-size: var(--fx-font-sm);
    color: var(--fx-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.fxd-empty-msg {
    color: var(--fx-text-muted);
    padding: var(--fx-sp-4);
    font-size: var(--fx-font-xs);
}

/* ══════════════════════════════════════
   ARTICLE PANEL & TYPOGRAPHY
   ══════════════════════════════════════ */

.fxd-article-body {
    padding: 24px;
}

.fxd-article-header {
    margin-bottom: var(--fx-sp-5);
    padding-bottom: var(--fx-sp-4);
    border-bottom: 1px solid var(--fx-border);
}

.fxd-article-title {
    font-size: var(--fx-font-2xl);
    font-weight: 700;
    color: var(--fx-text-heading);
    font-family: var(--fx-font);
    line-height: 1.3;
    margin: 0 0 var(--fx-sp-2);
    letter-spacing: -0.3px;
}

.fxd-article-meta {
    font-size: var(--fx-font-xs);
    color: var(--fx-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: var(--fx-sp-3);
    align-items: center;
}

.fxd-meta-author {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    color: var(--fx-text-secondary);
}

.fxd-meta-author img {
    border-radius: 50%;
}

.fxd-meta-cats a {
    color: var(--fx-accent);
    font-weight: 500;
}

.fxd-meta-comments a {
    color: var(--fx-text-secondary);
}

.fxd-meta-comments a:hover {
    color: var(--fx-accent);
}

/* Featured image */
.fxd-article-featured {
    margin-bottom: var(--fx-sp-5);
}

.fxd-featured-img {
    width: 100%;
    height: auto;
    border-radius: var(--fx-radius);
    border: 1px solid var(--fx-border);
}

/* Article content typography */
.fxd-article-content {
    font-size: var(--fx-font-md);
    line-height: 1.7;
    color: var(--fx-text);
    font-family: var(--fx-font);
}

.fxd-article-content h2 {
    font-size: var(--fx-font-xl);
    font-weight: 700;
    margin: 1.8em 0 0.5em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--fx-border);
    color: var(--fx-text-heading);
}

.fxd-article-content h3 {
    font-size: var(--fx-font-lg);
    font-weight: 600;
    margin: 1.3em 0 0.4em;
    color: var(--fx-text-heading);
}

.fxd-article-content h4 {
    font-size: var(--fx-font-md);
    font-weight: 600;
    color: var(--fx-text-secondary);
    margin: 1em 0 0.3em;
}

.fxd-article-content p {
    margin: 0 0 1em;
}

.fxd-article-content blockquote {
    border-left: 3px solid var(--fx-accent);
    background: var(--fx-bg-panel-alt);
    padding: var(--fx-sp-3) var(--fx-sp-4);
    margin: 1.2em 0;
    border-radius: 0 var(--fx-radius) var(--fx-radius) 0;
    font-style: normal;
    color: var(--fx-text-secondary);
}

.fxd-article-content blockquote p:last-child {
    margin-bottom: 0;
}

.fxd-article-content ul,
.fxd-article-content ol {
    padding-left: 22px;
    margin-bottom: 1em;
}

.fxd-article-content li {
    margin-bottom: 4px;
}

.fxd-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--fx-radius);
    border: 1px solid var(--fx-border);
}

.fxd-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: var(--fx-font-sm);
}

.fxd-article-content table th,
.fxd-article-content table td {
    padding: 8px 12px;
    border: 1px solid var(--fx-border);
    text-align: left;
}

.fxd-article-content table th {
    background: var(--fx-bg-panel-alt);
    font-weight: 600;
    color: var(--fx-text-heading);
}

.fxd-article-content table tr:hover td {
    background: var(--fx-bg-hover);
}

.fxd-article-content pre,
.fxd-article-content code {
    background: var(--fx-primary-dark);
    color: #0f172a;
    border-radius: var(--fx-radius-sm);
    font-size: var(--fx-font-sm);
    border: 1px solid var(--fx-border);
}

.fxd-article-content pre {
    padding: var(--fx-sp-3) var(--fx-sp-4);
    overflow-x: auto;
    margin: 1.2em 0;
}

.fxd-article-content code {
    padding: 1px 5px;
    font-size: 0.9em;
}

.fxd-article-content pre code {
    padding: 0;
    background: none;
    border: none;
}

/* Tags */
.fxd-article-tags {
    padding: var(--fx-sp-3) 0;
    margin-top: var(--fx-sp-5);
    border-top: 1px solid var(--fx-border);
    font-size: var(--fx-font-xs);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.fxd-article-tags strong {
    color: var(--fx-text-secondary);
    margin-right: 3px;
}

.fxd-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--fx-bg-panel-alt);
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    color: var(--fx-text-secondary);
    text-decoration: none;
    font-size: var(--fx-font-xs);
    font-weight: 500;
    transition: all var(--fx-transition);
}

.fxd-tag:hover {
    background: var(--fx-accent-light);
    border-color: var(--fx-accent);
    color: var(--fx-accent);
}

/* Post navigation */
.fxd-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--fx-sp-3);
    padding: var(--fx-sp-4) 0;
    margin-top: var(--fx-sp-4);
    border-top: 1px solid var(--fx-border);
}

.fxd-post-nav-prev,
.fxd-post-nav-next {
    min-width: 0;
}

.fxd-post-nav-next {
    text-align: right;
}

.fxd-nav-label {
    display: block;
    font-size: var(--fx-font-xs);
    font-weight: 700;
    color: var(--fx-text-muted);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fxd-post-nav a {
    color: var(--fx-text);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--fx-font-sm);
    line-height: 1.4;
}

.fxd-post-nav a:hover {
    color: var(--fx-accent);
}

/* ══════════════════════════════════════
   COMMENTS
   ══════════════════════════════════════ */

.fxd-comments-body .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Single comment */
.fxd-comment {
    border-bottom: 1px solid var(--fx-border);
}

.fxd-comment:last-child {
    border-bottom: none;
}

.fxd-comment-inner {
    display: flex;
    gap: 12px;
    padding: var(--fx-sp-3) var(--fx-sp-4);
}

.fxd-comment-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--fx-border);
}

.fxd-comment-body {
    flex: 1;
    min-width: 0;
}

.fxd-comment-meta {
    font-size: var(--fx-font-xs);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.fxd-comment-author a {
    color: var(--fx-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fx-font-sm);
}

.fxd-comment-author a:hover {
    text-decoration: underline;
}

.fxd-comment-date {
    color: var(--fx-text-muted);
    font-size: 11px;
}

.comment-reply-link {
    color: var(--fx-accent);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

.fxd-comment-text {
    font-size: var(--fx-font-sm);
    line-height: 1.6;
    color: var(--fx-text);
}

.fxd-comment-text p {
    margin: 0 0 6px;
}

.fxd-comment-text p:last-child {
    margin-bottom: 0;
}

.fxd-comment-awaiting {
    color: var(--fx-text-muted);
    font-size: var(--fx-font-xs);
    font-style: italic;
}

/* Nested/reply comments */
.fxd-comments-body .children {
    list-style: none;
    padding-left: 24px;
    margin: 0;
    border-left: 2px solid var(--fx-accent);
}

/* Comment navigation */
.fxd-comment-nav {
    display: flex;
    justify-content: space-between;
    padding: var(--fx-sp-2) var(--fx-sp-4);
    border-top: 1px solid var(--fx-border);
    font-size: var(--fx-font-xs);
}

.fxd-comment-nav a {
    color: var(--fx-accent);
    text-decoration: none;
}

.fxd-comment-nav a:hover {
    text-decoration: underline;
}

/* Comments closed */
.fxd-comments-closed {
    padding: var(--fx-sp-3) var(--fx-sp-4);
    color: var(--fx-text-muted);
    font-size: var(--fx-font-sm);
    text-align: center;
}

/* Comment form */
.fxd-comments-body .comment-respond {
    padding: var(--fx-sp-4);
    border-top: 1px solid var(--fx-border);
}

.fxd-comments-body .comment-respond .comment-reply-title {
    font-size: var(--fx-font-md);
    font-weight: 600;
    color: var(--fx-text-heading);
    margin: 0 0 var(--fx-sp-2);
    font-family: var(--fx-font);
}

.fxd-comments-body .comment-respond .logged-in-as {
    font-size: var(--fx-font-xs);
    color: var(--fx-text-muted);
    margin-bottom: var(--fx-sp-2);
}

.fxd-comments-body .comment-respond .logged-in-as a {
    color: var(--fx-accent);
    font-weight: 500;
}

.fxd-comments-body .comment-form-comment label {
    display: none;
}

.fxd-comments-body .comment-form-comment textarea,
.fxd-comments-body .comment-respond textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px 12px;
    font-size: var(--fx-font-sm);
    font-family: var(--fx-font);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    resize: vertical;
    box-sizing: border-box;
    transition: border-color var(--fx-transition);
    background: var(--fx-bg-input);
    color: var(--fx-text);
}

.fxd-comments-body .comment-respond textarea:focus {
    border-color: var(--fx-accent);
    outline: none;
}

.fxd-comments-body .comment-form-author,
.fxd-comments-body .comment-form-email,
.fxd-comments-body .comment-form-url {
    margin-bottom: var(--fx-sp-2);
}

.fxd-comments-body .comment-form-author label,
.fxd-comments-body .comment-form-email label,
.fxd-comments-body .comment-form-url label {
    display: block;
    font-size: var(--fx-font-xs);
    font-weight: 600;
    color: var(--fx-text-secondary);
    margin-bottom: 3px;
}

.fxd-comments-body .comment-form-author input,
.fxd-comments-body .comment-form-email input,
.fxd-comments-body .comment-form-url input {
    width: 100%;
    padding: 8px 12px;
    font-size: var(--fx-font-sm);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    box-sizing: border-box;
    font-family: var(--fx-font);
    transition: border-color var(--fx-transition);
    background: var(--fx-bg-input);
    color: var(--fx-text);
}

.fxd-comments-body .comment-form-author input:focus,
.fxd-comments-body .comment-form-email input:focus,
.fxd-comments-body .comment-form-url input:focus {
    border-color: var(--fx-accent);
    outline: none;
}

.fxd-comments-body .form-submit .submit {
    background: var(--fx-accent);
    color: #fff;
    border: none;
    padding: 8px 24px;
    font-size: var(--fx-font-sm);
    font-weight: 600;
    border-radius: var(--fx-radius);
    cursor: pointer;
    font-family: var(--fx-font);
    transition: all var(--fx-transition);
}

.fxd-comments-body .form-submit .submit:hover {
    background: var(--fx-accent-hover);
}

/* ══════════════════════════════════════
   SIDEBAR WIDGETS
   ══════════════════════════════════════ */

.fxd-widget-body {
    padding: var(--fx-sp-2) 12px;
}

/* Search — styled for dark theme */
.fxd-search-form {
    display: flex;
    gap: 6px;
    max-width: 100%;
    box-sizing: border-box;
}

.fxd-search-input {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    font-size: var(--fx-font-xs);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-sm);
    font-family: var(--fx-font);
    transition: border-color var(--fx-transition);
    background: var(--fx-bg-input);
    color: var(--fx-text);
}

.fxd-search-input:focus {
    border-color: var(--fx-accent);
    outline: none;
}

.fxd-search-input::placeholder {
    color: var(--fx-text-muted);
}

.fxd-search-btn {
    background: var(--fx-accent);
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: var(--fx-font-xs);
    font-weight: 600;
    border-radius: var(--fx-radius-sm);
    cursor: pointer;
    font-family: var(--fx-font);
    transition: all var(--fx-transition);
    flex-shrink: 0;
    white-space: nowrap;
}

.fxd-search-btn:hover {
    background: var(--fx-accent-hover);
}

/* WordPress default search widget — override for dark theme */
.fxd-right-sidebar .search-form,
.fxd-right-sidebar .wp-block-search,
.fxd-left-sidebar .search-form {
    display: flex;
    gap: 6px;
}

.fxd-right-sidebar .search-field,
.fxd-right-sidebar .wp-block-search__input,
.fxd-left-sidebar .search-field {
    flex: 1;
    padding: 6px 10px;
    font-size: var(--fx-font-xs);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-sm);
    font-family: var(--fx-font);
    background: var(--fx-bg-input);
    color: var(--fx-text);
}

.fxd-right-sidebar .search-submit,
.fxd-right-sidebar .wp-block-search__button,
.fxd-left-sidebar .search-submit {
    background: var(--fx-accent);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: var(--fx-radius-sm);
    cursor: pointer;
    font-family: var(--fx-font);
    font-weight: 600;
    font-size: var(--fx-font-xs);
}

/* Category list */
.fxd-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fxd-cat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--fx-border);
    font-size: var(--fx-font-xs);
}

.fxd-cat-list li:last-child {
    border-bottom: none;
}

.fxd-cat-list a {
    color: var(--fx-text);
    font-weight: 500;
}

.fxd-cat-list a:hover {
    color: var(--fx-accent);
}

.fxd-cat-count {
    background: var(--fx-bg-panel-alt);
    color: var(--fx-text-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 2px;
    min-width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Recent posts */
.fxd-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fxd-recent-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--fx-border);
}

.fxd-recent-list li:last-child {
    border-bottom: none;
}

.fxd-recent-list a {
    color: var(--fx-text);
    text-decoration: none;
    font-size: var(--fx-font-sm);
    font-weight: 500;
    display: block;
    line-height: 1.4;
}

.fxd-recent-list a:hover {
    color: var(--fx-accent);
}

.fxd-recent-date {
    font-size: 10px;
    color: var(--fx-text-muted);
}

/* Language switcher sidebar */
.fxd-lang-list,
.fxd-widget-body>ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fxd-lang-list li,
.fxd-widget-body .lang-item {
    padding: 6px 0;
    border-bottom: 1px solid var(--fx-border);
    font-size: var(--fx-font-xs);
}

.fxd-lang-list li:last-child,
.fxd-widget-body .lang-item:last-child {
    border-bottom: none;
}

.fxd-lang-list a,
.fxd-widget-body .lang-item a {
    color: var(--fx-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.fxd-lang-list a:hover,
.fxd-widget-body .lang-item a:hover {
    color: var(--fx-accent);
}

.fxd-lang-list img,
.fxd-widget-body .lang-item img {
    width: 18px;
    height: auto;
    border-radius: 1px;
}

.fxd-lang-list .current-lang a,
.fxd-widget-body .current-lang a {
    color: var(--fx-accent);
    font-weight: 600;
}

/* ══════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════ */

.fxd-pagination {
    padding: var(--fx-sp-2) var(--fx-sp-3);
    background: var(--fx-bg-panel-alt);
    border-top: 1px solid var(--fx-border);
    text-align: center;
}

.fxd-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.fxd-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    font-size: var(--fx-font-xs);
    font-weight: 500;
    color: var(--fx-text-secondary);
    background: var(--fx-bg-panel);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-sm);
    text-decoration: none;
    transition: all var(--fx-transition);
}

.fxd-pagination .page-numbers:hover {
    border-color: var(--fx-accent);
    color: var(--fx-accent);
    background: var(--fx-accent-light);
}

.fxd-pagination .page-numbers.current {
    background: var(--fx-accent);
    color: #fff;
    border-color: var(--fx-accent);
}

/* Subcategories */
.fxd-subcats {
    padding: 10px var(--fx-sp-3);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fxd-subcat-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: var(--fx-font-xs);
    font-weight: 500;
    color: var(--fx-text-secondary);
    background: var(--fx-bg-panel-alt);
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    text-decoration: none;
    transition: all var(--fx-transition);
}

.fxd-subcat-link:hover {
    background: var(--fx-accent-light);
    border-color: var(--fx-accent);
    color: var(--fx-accent);
}

.fxd-subcat-count {
    color: var(--fx-text-muted);
    font-size: 10px;
    margin-left: 4px;
}

/* ── Left sidebar nav ── */
.fxd-left-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fxd-left-nav li {
    border-bottom: 1px solid var(--fx-border);
}

.fxd-left-nav li:last-child {
    border-bottom: none;
}

.fxd-left-nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    font-size: var(--fx-font-sm);
    color: var(--fx-text);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--fx-transition);
    border-left: 2px solid transparent;
}

.fxd-left-nav a:hover,
.fxd-left-nav li.active a {
    color: var(--fx-accent);
    background: var(--fx-accent-light);
    border-left-color: var(--fx-accent);
}

.fxd-left-nav .fxd-nav-count {
    font-size: 10px;
    font-weight: 700;
    /* Pill uses the dark navy panel-alt gradient, so the count must be light */
    color: #fff;
    background: var(--fx-bg-panel-alt);
    padding: 1px 6px;
    border-radius: 9px;
}

/* Quick links in left sidebar */
.fxd-quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fxd-quick-links li {
    border-bottom: 1px solid var(--fx-border);
}

.fxd-quick-links li:last-child {
    border-bottom: none;
}

.fxd-quick-links a {
    display: block;
    padding: 6px 10px;
    font-size: var(--fx-font-sm);
    color: var(--fx-text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--fx-transition);
}

.fxd-quick-links a:hover {
    color: var(--fx-accent);
}

/* Broker CTA widget */
.fxd-broker-cta {
    padding: var(--fx-sp-3);
    text-align: center;
}

.fxd-broker-cta-name {
    font-size: var(--fx-font-md);
    font-weight: 700;
    color: var(--fx-text-heading);
    margin-bottom: 3px;
}

.fxd-broker-cta-rating {
    color: var(--fx-impact-orange);
    font-size: var(--fx-font-sm);
    margin-bottom: var(--fx-sp-2);
}

/* ── Mini Rates Widget (sidebar) — native, fits the FF sidebar ── */
.fxd-mini-rates {
    padding: 0;
    overflow: hidden;
}

.fxd-rates-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fxd-rate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--fx-border-light);
    font-size: var(--fx-font-sm);
}
.fxd-rate-row:last-child {
    border-bottom: 0;
}
.fxd-rate-row:hover {
    background: var(--fx-bg-hover);
}
.fxd-rate-pair {
    font-weight: 600;
    color: var(--fx-text);
}
.fxd-rate-val {
    font-weight: 700;
    color: var(--fx-text-heading);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}
.fxd-rates-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: var(--fx-font-xs);
    color: var(--fx-text-muted);
    background: var(--fx-bg-panel);
    border-top: 1px solid var(--fx-border-light);
}
.fxd-rate-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fx-accent);
    box-shadow: 0 0 0 2px rgba(125, 187, 66, 0.25);
}
@media (prefers-reduced-motion: no-preference) {
    .fxd-rate-flash {
        animation: fxdRateFlash 0.6s ease;
    }
}
@keyframes fxdRateFlash {
    0% { background: rgba(125, 187, 66, 0.28); }
    100% { background: transparent; }
}

/* ══════════════════════════════════════
   RESPONSIVE (Component-specific)
   ══════════════════════════════════════ */

@media (max-width: 768px) {
    .fxd-article-title {
        font-size: var(--fx-font-xl);
    }

    .fxd-article-body {
        padding: var(--fx-sp-4);
    }

    .fxd-post-nav {
        grid-template-columns: 1fr;
    }

    .fxd-post-nav-next {
        text-align: left;
    }

    .fxd-thumb-placeholder.fxd-news-thumb,
    img.fxd-news-thumb {
        width: 72px;
        height: 50px;
    }
}

@media (max-width: 600px) {

    /* Keep a compact thumbnail on phones — hiding it turned every browse list
       (home panels, archive, related, recommended) into a text-only wall of
       links, killing image-led scanning on the most-used screen size. */
    .fxd-thumb-placeholder.fxd-news-thumb,
    img.fxd-news-thumb {
        width: 64px;
        height: 48px;
    }

    .fxd-news-thumb-link {
        display: block;
    }

    .fxd-news-item {
        padding: var(--fx-sp-2);
    }

    .fxd-article-title {
        font-size: var(--fx-font-lg);
    }

    .fxd-article-body {
        padding: var(--fx-sp-3);
    }

    /* Long-form reading: 15px on mobile, not the old 13px shrink (desktop keeps
       its 14px dense look via the base rule). */
    .fxd-article-content {
        font-size: var(--fx-font-body-m);
    }

    .fxd-featured-placeholder {
        height: 140px;
    }

    .fxd-comment-inner {
        padding: var(--fx-sp-2) var(--fx-sp-3);
    }

    .fxd-comments-body .children {
        padding-left: 16px;
    }

    .fxd-comments-body .comment-respond {
        padding: var(--fx-sp-3);
    }
}

/* ══════════════════════════════════════
   404 PAGE
   ══════════════════════════════════════ */

.fxd-404-content {
    text-align: center;
    padding: var(--fx-sp-6) var(--fx-sp-4);
}

.fxd-404-content h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--fx-accent);
    margin: 0 0 var(--fx-sp-2);
    line-height: 1;
}

.fxd-404-content p {
    color: var(--fx-text-muted);
    margin-bottom: var(--fx-sp-4);
    font-size: var(--fx-font-base);
}

.fxd-404-search {
    max-width: 400px;
    margin: 0 auto;
}

.fxd-404-section-title {
    padding: var(--fx-sp-2) var(--fx-sp-3);
    margin: 0;
    border-top: 1px solid var(--fx-border);
    font-size: var(--fx-font-sm);
    color: var(--fx-text-muted);
    font-weight: 600;
}
/* ── Reading Time ── */
.fxd-meta-readtime {
    color: var(--fx-text-muted);
    font-size: .8rem;
}
.fxd-meta-readtime::before { content: "·"; margin-right: .4em; }

/* ── Social Share Bar ── */
.fxd-share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 0;
    border-top: 1px solid var(--fx-border);
    border-bottom: 1px solid var(--fx-border);
    margin: 20px 0;
}
.fxd-share-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--fx-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-right: 4px;
}
.fxd-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity .2s;
}
.fxd-share-btn:hover { opacity: .85; }
.fxd-share-fb  { background: #1877f2; color: #fff; }
.fxd-share-tg  { background: #2aabee; color: #fff; }
.fxd-share-x   { background: #000; color: #fff; }
.fxd-share-copy { background: var(--fx-border); color: var(--fx-text); }

/* ── No Results (Search) ── */
.fxd-no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--fx-text-muted);
}
.fxd-no-results-icon {
    display: block;
    margin: 0 auto 16px;
    opacity: .4;
}
.fxd-no-results h3 {
    font-size: 1.2rem;
    color: var(--fx-text);
    margin-bottom: 8px;
}
.fxd-no-results p { margin-bottom: 20px; font-size: .9rem; }
.fxd-no-results .search-form { max-width: 400px; margin: 0 auto; }

/* ══════════════════════════════════════
   COMMENTS v2 — redesigned list & form
   ══════════════════════════════════════ */

.fxd-comments-count {
    padding: var(--fx-sp-3) var(--fx-sp-4) 0;
    font-size: var(--fx-font-sm);
    color: var(--fx-text-muted);
}

.fxd-comments-count strong {
    color: var(--fx-text-heading);
    font-size: var(--fx-font-md);
}

.fxd-comment-avatar img {
    width: 44px;
    height: 44px;
}

.fxd-comment-badge {
    background: var(--fx-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 1px 7px;
    border-radius: 10px;
}

.fxd-comment-actions {
    margin-top: 6px;
}

.fxd-comment-actions .comment-reply-link {
    display: inline-block;
    padding: 2px 10px;
    border: 1px solid var(--fx-border);
    border-radius: 12px;
    transition: all var(--fx-transition);
}

.fxd-comment-actions .comment-reply-link:hover {
    background: var(--fx-accent);
    border-color: var(--fx-accent);
    color: #fff;
    text-decoration: none;
}

/* Form: name + email side by side on desktop */
.fxd-comment-form {
    display: block;
}

.fxd-comment-form .fxd-comment-col {
    /* -12px absorbs the inter-inline-block whitespace so both columns
       always fit on one row */
    width: calc(50% - 12px);
    display: inline-block;
    vertical-align: top;
}

.fxd-comment-form .comment-form-author {
    margin-right: 12px;
}

.fxd-comment-form .comment-form-comment label {
    display: block;
    font-size: var(--fx-font-xs);
    font-weight: 600;
    color: var(--fx-text-secondary);
    margin-bottom: 3px;
}

.fxd-reply-title {
    font-size: var(--fx-font-md);
    font-weight: 600;
    color: var(--fx-text-heading);
    margin: 0 0 var(--fx-sp-2);
}

.fxd-reply-title small {
    font-size: var(--fx-font-xs);
    margin-left: 8px;
}

.fxd-logged-in-as {
    font-size: var(--fx-font-xs);
    color: var(--fx-text-muted);
    margin: 0 0 var(--fx-sp-2);
}

.fxd-logged-in-as a {
    color: var(--fx-accent);
}

.fxd-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--fx-font-xs);
    color: var(--fx-text-muted);
    margin: var(--fx-sp-2) 0;
}

.fxd-cookies-consent input {
    margin-top: 2px;
    flex-shrink: 0;
}

.fxd-comment-submit {
    min-width: 160px;
}

.comment-respond .fxd-captcha-wrap {
    margin: var(--fx-sp-2) 0;
}

@media (max-width: 600px) {
    .fxd-comment-form .fxd-comment-col {
        width: 100%;
        display: block;
        margin-right: 0;
    }
}

/* ══════════════════════════════════════
   MOBILE HARDENING (audit 2026-07)
   ══════════════════════════════════════ */

/* Tables: .fx-panel has overflow:hidden, so wide tables were CLIPPED on
   phones (broker fees, VPN plans, compare tables, editorial tables).
   display:block + overflow-x turns each into its own scroll area. */
@media (max-width: 768px) {
    .fx-table,
    .fxd-compare-table,
    .fxd-article-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Pin the compare table's first (criteria) column so the row labels stay
       visible while you scroll across the brokers being compared. */
    .fxd-compare-table th:first-child,
    .fxd-compare-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        /* Opaque !important so the scrolled columns don't show through the
           pinned label column (cell striping otherwise wins). */
        background: var(--fx-bg-panel) !important;
        box-shadow: 1px 0 0 var(--fx-border);
    }
    .fxd-compare-table thead th:first-child {
        background: var(--fx-bg-panel-alt) !important;
        color: #fff !important;
    }

    /* comfortable touch targets */
    .fxd-share-btn {
        padding: 9px 14px;
    }

    .fxd-pagination .page-numbers {
        min-width: 38px;
        height: 38px;
    }

    .fx-btn--sm {
        padding: 8px 12px;
    }
}

@media (max-width: 600px) {
    .fxd-404-content h1 {
        font-size: 2.5rem;
    }

    /* Mobile is for READING: hide the TradingView price tape (the
       breaking-news marquee stays) — saves ~50px of moving chrome. */
    .fxd-ticker-wrap {
        display: none;
    }

    /* TradingView embeds shipped desktop-fixed heights (400-600px inline
       styles / iframe attrs) — a 600px calendar swallows a whole phone
       screen and traps scrolling. !important beats the inline styles. */
    .fxd-chart-panel .tradingview-widget-container,
    .fx-panel-body > .tradingview-widget-container[style*="height:420px"] {
        height: 340px !important;
    }

    .fxd-heatmap-panel .tradingview-widget-container {
        min-height: 300px !important;
        max-height: 300px !important;
        overflow: hidden;
    }

    .fxd-heatmap-panel .tradingview-widget-container__widget {
        height: 300px !important;
    }

    .fxd-heatmap-panel iframe {
        height: 300px !important;
    }

    .fxd-calendar-container iframe {
        height: 460px !important;
    }

    .fxd-rates-container iframe {
        height: 360px !important;
    }

    .fxd-overview-container iframe {
        height: 420px !important;
    }
}

/* ══════════════════════════════════════
   ECONOMIC CALENDAR (self-hosted, owner-curated)
   Shared by the homepage widget + the full calendar page.
   ══════════════════════════════════════ */

/* Impact dots (own classes so the homepage doesn't need tools.css) */
.fxd-ec-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--fx-impact-gray);
}
.fxd-ec-high { background: var(--fx-impact-red); }
.fxd-ec-medium { background: var(--fx-impact-orange); }
.fxd-ec-low { background: var(--fx-impact-yellow); }
.fxd-ec-holiday { background: var(--fx-impact-gray); }

.fxd-ec-star { color: var(--fx-impact-orange); }

.fxd-ec-empty {
    padding: 14px;
    margin: 0;
    color: var(--fx-text-muted);
    font-size: var(--fx-font-sm);
}

/* ── Homepage compact widget ── */
.fxd-ec-body {
    padding: 0;
}

.fxd-ec-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fxd-ec-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--fx-border);
    font-size: var(--fx-font-sm);
    line-height: 1.3;
}
.fxd-ec-row:last-child {
    border-bottom: none;
}
.fxd-ec-row.is-pinned {
    background: rgba(230, 138, 0, 0.06);
}

.fxd-ec-time {
    flex-shrink: 0;
    width: 74px;
    color: var(--fx-text-muted);
    font-variant-numeric: tabular-nums;
}

.fxd-ec-cur {
    flex-shrink: 0;
    width: 34px;
    font-weight: 700;
    color: var(--fx-text);
}

.fxd-ec-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--fx-text);
}

.fxd-ec-fc {
    flex-shrink: 0;
    color: var(--fx-text-muted);
    font-variant-numeric: tabular-nums;
}

/* ── Full calendar page ── */
.fxd-ec-full {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fxd-ec-dayhead {
    margin: 0 0 6px;
    padding: 6px 10px;
    font-size: var(--fx-font-sm);
    font-weight: 700;
    color: #fff;
    background: var(--fx-bg-panel-alt);
    border-radius: var(--fx-radius-sm);
}

.fxd-ec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fx-font-sm);
}

.fxd-ec-table td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--fx-border);
    vertical-align: top;
}

.fxd-ec-trow.is-pinned {
    background: rgba(230, 138, 0, 0.06);
}

.fxd-ec-c-time {
    width: 56px;
    color: var(--fx-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.fxd-ec-c-cur {
    width: 46px;
    font-weight: 700;
}
.fxd-ec-c-imp {
    width: 24px;
    text-align: center;
}
.fxd-ec-c-title {
    color: var(--fx-text);
    font-weight: 700;   /* bold event title (desktop; mobile bolds it too) */
}
.fxd-ec-c-val {
    width: 72px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--fx-text-muted);
}

.fxd-ec-note {
    display: block;
    margin-top: 2px;
    font-style: italic;
    color: var(--fx-impact-orange);
    font-size: var(--fx-font-xs);
}

/* ── Full-page toolbar / filters ── */
.fxd-ec-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 12px;
    border-bottom: 1px solid var(--fx-border);
}

.fxd-ec-tabs {
    display: inline-flex;
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    overflow: hidden;
}
.fxd-ec-tab {
    padding: 6px 12px;
    font-size: var(--fx-font-sm);
    font-weight: 600;
    color: var(--fx-text-muted);
    background: var(--fx-bg-panel);
    border: none;
    border-right: 1px solid var(--fx-border);
    cursor: pointer;
    transition: background var(--fx-transition), color var(--fx-transition);
}
.fxd-ec-tab:last-child { border-right: none; }
.fxd-ec-tab:hover { background: var(--fx-bg-hover); }
.fxd-ec-tab.is-active {
    background: var(--fx-accent);
    color: #fff;
}

/* Day strip — horizontal quick-jump to any day that has events */
.fxd-ec-daystrip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 12px;
    border-bottom: 1px solid var(--fx-border);
    scrollbar-width: thin;
}
.fxd-ec-daybtn {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
    padding: 5px 8px;
    line-height: 1.1;
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    background: var(--fx-bg-panel);
    color: var(--fx-text-muted);
    cursor: pointer;
    transition: all var(--fx-transition);
}
.fxd-ec-daybtn:hover { background: var(--fx-bg-hover); }
.fxd-ec-daybtn-dow { font-size: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.fxd-ec-daybtn-num { font-size: 15px; font-weight: 700; color: var(--fx-text); }
.fxd-ec-daybtn.is-today { border-color: var(--fx-accent); }
.fxd-ec-daybtn.is-today .fxd-ec-daybtn-num { color: var(--fx-accent); }
.fxd-ec-daybtn.is-sel { background: var(--fx-accent); border-color: var(--fx-accent); }
.fxd-ec-daybtn.is-sel .fxd-ec-daybtn-dow,
.fxd-ec-daybtn.is-sel .fxd-ec-daybtn-num { color: #fff; }

/* Time-grouping: a repeated clock time is hidden (desktop table only; on mobile
   each event is its own card and needs its time). */
@media (min-width: 601px) {
    .fxd-ec-trow.is-tdup .fxd-ec-c-time { visibility: hidden; }
}

.fxd-ec-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
}
.fxd-ec-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: var(--fx-font-xs);
    font-weight: 600;
    color: var(--fx-text-muted);
    background: var(--fx-bg-panel);
    border: 1px solid var(--fx-border);
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--fx-transition);
}
.fxd-ec-chip:hover { background: var(--fx-bg-hover); }
.fxd-ec-chip.is-active {
    color: var(--fx-text);
    border-color: var(--fx-accent);
    background: var(--fx-accent-light);
}
.fxd-ec-chip:not(.is-active) .fxd-ec-dot { opacity: 0.35; }

.fxd-ec-search {
    flex: 1;
    min-width: 130px;
    max-width: 240px;
    padding: 5px 10px;
    font-size: var(--fx-font-sm);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    background: var(--fx-bg-panel);
    color: var(--fx-text);
}

.fxd-ec-daterange {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fx-font-xs);
    color: var(--fx-text-muted);
}
.fxd-ec-daterange label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.fxd-ec-daterange input[type="date"] {
    padding: 4px 6px;
    font-size: var(--fx-font-xs);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    background: var(--fx-bg-panel);
    color: var(--fx-text);
}
.fxd-ec-date-clear {
    width: 22px;
    height: 22px;
    line-height: 1;
    font-size: 15px;
    color: var(--fx-text-muted);
    background: var(--fx-bg-panel);
    border: 1px solid var(--fx-border);
    border-radius: 50%;
    cursor: pointer;
}
.fxd-ec-date-clear:hover {
    color: var(--fx-impact-red);
    border-color: var(--fx-impact-red);
}

.fxd-ec-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: var(--fx-font-xs);
    color: var(--fx-text-muted);
    background: var(--fx-bg-panel-alt);
    color: #cdd8e6;
}
.fxd-ec-count { font-weight: 700; color: #fff; }

.fxd-ec-tablewrap { overflow-x: auto; }

/* Single main table (thead + day separators) */
.fxd-ec-main {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fx-font-sm);
}
.fxd-ec-main thead th {
    padding: 7px 8px;
    text-align: left;
    font-size: var(--fx-font-xs);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--fx-text-muted);
    border-bottom: 2px solid var(--fx-border);
    background: var(--fx-bg-panel);
    position: sticky;
    top: 0;
    z-index: 1;
}
.fxd-ec-main thead .fxd-ec-c-val { text-align: right; }

.fxd-ec-dayrow td {
    padding: 6px 10px;
    font-weight: 700;
    font-size: var(--fx-font-sm);
    color: #fff;
    background: var(--fx-bg-panel-alt);
}
.fxd-ec-dayrow.is-today td {
    background: var(--fx-accent);
}

.fxd-ec-trow.is-today {
    background: rgba(14, 165, 233, 0.05);
}

/* Actual vs forecast direction */
.fxd-ec-arrow {
    margin-left: 3px;
    font-size: 9px;
    vertical-align: middle;
}
.fxd-ec-actual.is-up { color: #1a8a4a; }
.fxd-ec-actual.is-up .fxd-ec-arrow { color: #1a8a4a; }
.fxd-ec-actual.is-down { color: var(--fx-impact-red); }
.fxd-ec-actual.is-down .fxd-ec-arrow { color: var(--fx-impact-red); }

.fxd-ec-noresults {
    padding: 20px 12px;
    margin: 0;
    text-align: center;
    color: var(--fx-text-muted);
}

@media (max-width: 600px) {
    .fxd-ec-search { max-width: none; }
    /* NOTE: the phone calendar card layout (Actual/Forecast/Previous all
       visible) lives at the END of the calendar CSS so it overrides the later
       beat/miss ::before dot and the is-expandable td padding. */
}

/* ══════════════════════════════════════
   TRUST / E-E-A-T (last-updated, methodology, disclosure)
   ══════════════════════════════════════ */
.fxd-trust-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 8px 0 2px;
    font-size: var(--fx-font-xs);
    color: var(--fx-text-muted);
}
.fxd-updated {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.fxd-methodology-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--fx-accent);
    text-decoration: none;
    font-weight: 600;
}
.fxd-methodology-link:hover { text-decoration: underline; }

.fxd-meta-date .fxd-updated { color: inherit; }

.fxd-affiliate-disclosure {
    margin: 10px auto 0;
    max-width: 620px;
    font-size: var(--fx-font-xs);
    line-height: 1.5;
    color: var(--fx-text-muted);
}
.fxd-affiliate-disclosure a { color: var(--fx-accent); }

/* Methodology page */
.fxd-methodology { line-height: 1.65; }
.fxd-methodology-lead {
    font-size: var(--fx-font-md);
    color: var(--fx-text);
    border-left: 3px solid var(--fx-accent);
    padding-left: 12px;
    margin-bottom: 18px;
}
.fxd-methodology h2 {
    font-size: var(--fx-font-md);
    margin: 20px 0 8px;
}
.fxd-methodology-criteria {
    margin: 8px 0 0;
    padding-left: 18px;
}
.fxd-methodology-criteria li { margin-bottom: 8px; }

/* ══════════════════════════════════════
   AUTHOR BIO BOX (E-E-A-T)
   ══════════════════════════════════════ */
.fxd-author-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 22px 0 0;
    padding: 16px;
    background: var(--fx-bg-panel-alt);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
}
.fxd-author-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: block;
}
.fxd-author-detail { flex: 1; min-width: 0; color: #d7e2f0; }
.fxd-author-name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}
.fxd-author-name a {
    font-size: var(--fx-font-md);
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}
.fxd-author-name a:hover { text-decoration: underline; }
.fxd-author-title {
    font-size: var(--fx-font-xs);
    color: #9fb3c8;
    font-weight: 600;
}
.fxd-author-bio {
    margin: 6px 0 0;
    font-size: var(--fx-font-sm);
    line-height: 1.6;
    color: #c4d2e0;
}
.fxd-author-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.fxd-author-social a {
    font-size: var(--fx-font-xs);
    font-weight: 600;
    color: #7fc4ff;
    text-decoration: none;
}
.fxd-author-social a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .fxd-author-box { flex-direction: column; }
}

/* ══════════════════════════════════════
   CALENDAR DEPTH — surprise, indicator pages, FAQ
   ══════════════════════════════════════ */
/* Direction-aware surprise (beat = good for the currency, miss = bad) */
.fxd-ec-actual.is-beat { color: #1a8a4a; }
.fxd-ec-actual.is-beat .fxd-ec-arrow { color: #1a8a4a; }
.fxd-ec-actual.is-miss { color: var(--fx-impact-red); }
.fxd-ec-actual.is-miss .fxd-ec-arrow { color: var(--fx-impact-red); }
.fxd-ec-actual.is-inline { color: var(--fx-text-muted); }
.fxd-ec-evlink { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--fx-border); }
.fxd-ec-evlink:hover { color: var(--fx-accent); border-bottom-color: var(--fx-accent); }

/* Indicator explainer page */
.fxd-indicator { line-height: 1.65; }
.fxd-indicator-h1 { margin: 0 0 8px; font-size: 22px; }
.fxd-indicator-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.fxd-badge {
    display: inline-block;
    padding: 3px 9px;
    font-size: var(--fx-font-xs);
    font-weight: 700;
    border-radius: 999px;
    background: var(--fx-accent-light);
    color: var(--fx-accent);
}
.fxd-badge--pair { background: var(--fx-bg-hover); color: var(--fx-text-muted); border: 1px solid var(--fx-border); }
.fxd-indicator h2 { font-size: var(--fx-font-md); margin: 20px 0 6px; }
.fxd-indicator p { margin: 0 0 10px; }
.fxd-indicator-next { font-weight: 600; }
.fxd-indicator-back { margin-top: 20px; }
.fxd-indicator-back a { color: var(--fx-accent); }

/* FAQ accordion (also used for AEO FAQ blocks) */
.fxd-faq { margin: 4px 0 0; }
.fxd-faq-item {
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    margin-bottom: 8px;
    background: var(--fx-bg-panel);
}
.fxd-faq-item > summary {
    cursor: pointer;
    padding: 10px 14px;
    font-weight: 600;
    font-size: var(--fx-font-sm);
    list-style: none;
}
.fxd-faq-item > summary::-webkit-details-marker { display: none; }
.fxd-faq-item > summary::after { content: '+'; float: right; color: var(--fx-text-muted); }
.fxd-faq-item[open] > summary::after { content: '\2212'; }
.fxd-faq-item > p { margin: 0; padding: 0 14px 12px; font-size: var(--fx-font-sm); color: var(--fx-text-muted); line-height: 1.6; }

/* Answer-first intro (AEO) above hub FAQ */
.fxd-faq-intro {
    font-size: var(--fx-font-md);
    line-height: 1.6;
    color: var(--fx-text);
    border-left: 3px solid var(--fx-accent);
    padding-left: 12px;
    margin: 0 0 16px;
}

/* ── Calendar inline detail (ForexFactory-style expand) ── */
.fxd-ec-toggle {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--fx-text);
    text-align: left;
    cursor: pointer;
}
.fxd-ec-toggle:hover { color: var(--fx-accent); }
.fxd-ec-caret {
    display: inline-block;
    margin-right: 5px;
    color: var(--fx-text-muted);
    transition: transform var(--fx-transition);
}
.fxd-ec-toggle.is-open .fxd-ec-caret { transform: rotate(90deg); color: var(--fx-accent); }
.fxd-ec-detail > td {
    background: rgba(14, 165, 233, 0.05);
    border-bottom: 1px solid var(--fx-border);
    padding: 12px 14px;
}
.fxd-ec-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 20px;
    font-size: var(--fx-font-sm);
    line-height: 1.5;
}
.fxd-ec-dl {
    display: block;
    font-size: var(--fx-font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--fx-text-muted);
    margin-bottom: 2px;
}
.fxd-ec-detail-more {
    display: inline-block;
    margin-top: 10px;
    font-size: var(--fx-font-sm);
    font-weight: 600;
    color: var(--fx-accent);
}

/* Calendar relative countdown */
.fxd-ec-soon {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--fx-accent);
    margin-top: 1px;
}
.fxd-ec-soon.is-live { color: var(--fx-impact-red); }
@media (prefers-reduced-motion: no-preference) {
    .fxd-ec-soon.is-live { animation: fxdBlink 1.2s ease-in-out infinite; }
}
@keyframes fxdBlink { 50% { opacity: .35; } }

/* Calendar detail: inline history (lazy-loaded, FF-style) */
.fxd-ec-hist { margin-bottom: 12px; }
.fxd-ec-histtable {
    width: 100%;
    max-width: 460px;
    border-collapse: collapse;
    font-size: var(--fx-font-xs);
}
.fxd-ec-histtable th,
.fxd-ec-histtable td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--fx-border);
    text-align: right;
    white-space: nowrap;
}
.fxd-ec-histtable th:first-child,
.fxd-ec-histtable td:first-child { text-align: left; }
.fxd-ec-histtable thead th {
    color: var(--fx-text-muted);
    text-transform: uppercase;
    font-size: 10px;
}
.fxd-ec-histtable td.is-beat { color: #1a8a4a; }
.fxd-ec-histtable td.is-miss { color: var(--fx-impact-red); }
.fxd-ec-nextrel { margin: 8px 0 0; font-size: var(--fx-font-xs); font-weight: 600; color: var(--fx-text-muted); }

/* Calendar history sparkline */
.fxd-ec-spark { width: 100%; max-width: 300px; height: 40px; display: block; margin-bottom: 8px; }
.fxd-ec-spark path { stroke: var(--fx-accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.fxd-ec-spark circle { fill: var(--fx-accent); }

/* ── Calendar polish v10.14 ── */
/* Row rhythm + hover (only the event rows, not day headers or detail) */
.fxd-ec-trow.is-expandable { cursor: pointer; }
.fxd-ec-trow:hover > td { background: var(--fx-bg-hover); }
.fxd-ec-trow.is-today:hover > td { background: rgba(14,165,233,0.10); }
/* Past events (time already elapsed) are dimmed, not hidden — JS toggles
   .is-past 15min after the event time. Restored to full opacity on hover. */
.fxd-ec-trow.is-past { opacity: 0.5; transition: opacity var(--fx-transition); }
.fxd-ec-trow.is-past:hover { opacity: 1; }
/* Expired events also read as italic — extra "this already happened" cue. */
.fxd-ec-trow.is-past .fxd-ec-c-title { font-style: italic; }

/* Clickable-event marker: dotted-underline title + mini bar-chart glyph */
.fxd-ec-toggle { display: inline-flex; align-items: center; gap: 5px; }
.fxd-ec-tlabel { border-bottom: 1px dotted var(--fx-text-muted); transition: border-color var(--fx-transition); }
.fxd-ec-toggle:hover .fxd-ec-tlabel { border-bottom-color: var(--fx-accent); }
.fxd-ec-hasdata { width: 11px; height: 11px; flex-shrink: 0; opacity: .5; transition: opacity var(--fx-transition); }
.fxd-ec-hasdata rect { fill: var(--fx-accent); }
.fxd-ec-toggle:hover .fxd-ec-hasdata,
.fxd-ec-toggle.is-open .fxd-ec-hasdata { opacity: 1; }

/* Impact dot: crisper with a faint ring */
.fxd-ec-dot { box-shadow: 0 0 0 2px var(--fx-bg-panel), 0 0 0 3px rgba(0,0,0,.06); }

/* Day header row: stronger section rhythm. Navy background, so text must be
   light — #666 (text-secondary) on navy was near-invisible ("tối om"). */
.fxd-ec-dayrow td {
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: var(--fx-font-xs);
    font-weight: 700;
    color: #ffffff;
    background: var(--fx-bg-panel-alt);
    border-top: 2px solid var(--fx-border);
}
.fxd-ec-dayrow.is-today td {
    color: #ffffff;
    box-shadow: inset 3px 0 0 var(--fx-accent);
}

/* Actual beat/miss: subtle pill so the surprise reads at a glance */
.fxd-ec-actual.is-beat strong { color: #1a8a4a; }
.fxd-ec-actual.is-miss strong { color: var(--fx-impact-red); }
.fxd-ec-actual.is-beat, .fxd-ec-actual.is-miss { position: relative; }
.fxd-ec-actual.is-beat::before, .fxd-ec-actual.is-miss::before {
    content: ""; position: absolute; right: 4px; top: 50%; width: 4px; height: 4px;
    border-radius: 50%; transform: translateY(-50%); opacity: .6;
}
.fxd-ec-actual.is-beat::before { background: #1a8a4a; }
.fxd-ec-actual.is-miss::before { background: var(--fx-impact-red); }

/* ── Mobile touch targets + input sizing (v10.28) ──
   Every interactive chip/tab raised to the 44px comfortable touch size, and
   every form input set to 16px so iOS Safari never auto-zooms (jumping the
   viewport) on focus — including the highest-intent surfaces (auth, support
   lead form, compare selects, newsletter, calculators, site search). */
@media (max-width: 768px) {
    .fxd-ec-tab { min-height: 44px; padding-inline: 14px; }
    .fxd-ec-chip { min-height: 44px; padding-inline: 12px; align-items: center; }
    .fxd-session-chip { min-height: 44px; align-items: center; }
    .fxd-tool-tab { min-height: 44px; }
    /* The whole event row is now a tap target (JS), so give it breathing room. */
    .fxd-ec-trow.is-expandable > td { padding-top: 12px; padding-bottom: 12px; }
    .fxd-ec-toggle { padding: 6px 2px; }
    .fxd-session-item { min-height: 44px; }
    /* Hamburger was 25px tall — bump to a comfortable thumb target. */
    .menu-toggle { min-height: 44px; display: inline-flex; align-items: center; }

    /* 16px on every mobile input — prevents iOS focus-zoom everywhere. */
    input[type="text"], input[type="email"], input[type="search"],
    input[type="tel"], input[type="number"], input[type="url"],
    input[type="password"], select, textarea,
    .fxd-input, .fxd-search-field, .fxd-search-input {
        font-size: 16px !important;
    }
}

/* ── Phone calendar: Actual / Forecast / Previous ALL visible (v10.30) ──
   The wide events table can't fit 7 columns on a phone, so the old rule hid
   Forecast + Previous — the two figures upcoming events actually have — and
   kept an empty Actual column. Instead, turn each event into a compact
   2-line card: line 1 = time · cur · impact · event; line 2 = the three
   labelled figures (A / F / P). Placed last so it overrides the beat/miss
   ::before dot and the is-expandable td padding defined earlier. */
@media (max-width: 600px) {
    /* CRITICAL: the flex/block rules below would otherwise override the
       [hidden] attribute JS uses to filter rows + collapse detail popups,
       showing every event and every expanded detail. Keep [hidden] winning. */
    .fxd-ec-main [hidden] { display: none !important; }

    .fxd-ec-tablewrap { overflow-x: visible; }
    .fxd-ec-main thead { display: none; }
    .fxd-ec-main,
    .fxd-ec-main tbody { display: block; width: 100%; }

    .fxd-ec-dayrow { display: block; }
    .fxd-ec-dayrow td { display: block; }

    /* Card: line 1 = time · cur · impact, line 2 = bold event title, line 3 =
       the figures. Flex (title flex-basis:100% forces its own line) so long
       values wrap and empty figures collapse away — nothing shares a column,
       so a narrow phone never makes the time collide with the currency. */
    .fxd-ec-trow {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 8px;
        row-gap: 7px;
        padding: 9px 10px;
        border-bottom: 1px solid var(--fx-border);
    }
    .fxd-ec-trow > td,
    .fxd-ec-trow.is-expandable > td {
        display: inline-flex;
        align-items: center;
        padding: 0;
        border: none;
        width: auto;
    }
    .fxd-ec-trow .fxd-ec-c-time {
        order: 1;
        gap: 5px;                 /* separate the "in 3h" countdown from the clock */
        color: var(--fx-text-muted);
        font-weight: 600;
    }
    .fxd-ec-trow .fxd-ec-c-cur  { order: 2; }
    .fxd-ec-trow .fxd-ec-c-imp  { order: 3; }
    .fxd-ec-trow .fxd-ec-c-title {
        order: 4;
        flex: 1 1 100%;           /* title on its own line — big, bold, readable */
        min-width: 0;
        white-space: normal;
        font-weight: 700;
        font-size: var(--fx-font-sm);
        line-height: 1.3;
    }

    /* Line 3: Actual / Forecast / Previous — content-width pills that wrap for
       long values; empty figures hidden entirely (server marks .is-empty).
       Selector is `> td.fxd-ec-c-val` (0,2,2) so the pill's border/background
       BEATS the `.fxd-ec-trow.is-expandable > td { border:none }` reset (0,2,1)
       — otherwise pills on expandable rows lost their frame and the figures
       floated frameless. Pills size to their character count (content width)
       with even padding, so text never touches the frame. */
    .fxd-ec-trow > td.fxd-ec-c-val {
        order: 5;
        flex: 0 0 auto;
        gap: 4px;
        margin: 0;
        padding: 3px 9px;
        text-align: left;
        background: var(--fx-bg-hover);
        border: 1px solid var(--fx-border);
        border-radius: 6px;
        font-size: var(--fx-font-xs);
        line-height: 1.35;
        color: var(--fx-text);
    }
    .fxd-ec-trow .fxd-ec-c-val.is-empty { display: none; }
    /* Forecast + Previous read as primary text; Actual keeps its beat/miss
       colour (set on .fxd-ec-actual strong, untouched here). */
    .fxd-ec-trow .fxd-ec-c-val:nth-child(6),
    .fxd-ec-trow .fxd-ec-c-val:nth-child(7) { color: var(--fx-text); }

    /* Labels. The Actual pseudo also resets the beat/miss absolute dot so the
       "A" label renders normally on released figures. */
    .fxd-ec-trow .fxd-ec-c-val:nth-child(6)::before { content: "F"; font-weight: 700; color: var(--fx-text-muted); margin-right: 1px; }
    .fxd-ec-trow .fxd-ec-c-val:nth-child(7)::before { content: "P"; font-weight: 700; color: var(--fx-text-muted); margin-right: 1px; }
    .fxd-ec-trow .fxd-ec-c-val.fxd-ec-actual::before,
    .fxd-ec-trow .fxd-ec-c-val:nth-child(5)::before {
        content: "A";
        position: static;
        width: auto;
        height: auto;
        background: none;
        font-weight: 700;
        color: var(--fx-text-muted);
        margin-right: 1px;
    }

    /* Hover shouldn't repaint individual cells in the card layout. */
    .fxd-ec-trow:hover > td { background: transparent; }

    /* Expandable detail row spans full width under its card. */
    .fxd-ec-detail { display: block; }
    .fxd-ec-detail > td { display: block; padding: 12px 14px; }
    .fxd-ec-detail-grid { grid-template-columns: 1fr; }
}

/* ── Economic calendar: Filters disclosure (v10.30) ──
   Desktop: the <details> is transparent (display:contents) so impact/currency/
   search/date lay out inline in the toolbar exactly as before. Mobile: a real
   disclosure — the range tabs stay visible and the dense filter cluster (which
   ate 280-360px) collapses behind a 'Filters' summary. */
.fxd-ec-filters { display: contents; }
.fxd-ec-filters-sum { display: none; }
@media (max-width: 768px) {
    .fxd-ec-filters { display: block; width: 100%; }
    .fxd-ec-filters-sum {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 44px;
        padding: 0 14px;
        list-style: none;
        cursor: pointer;
        user-select: none;
        font-size: 12px;
        font-weight: 700;
        color: var(--fx-text);
        background: var(--fx-bg-panel);
        border: 1px solid var(--fx-border);
        border-radius: var(--fx-radius);
    }
    .fxd-ec-filters-sum::-webkit-details-marker { display: none; }
    .fxd-ec-filters-sum::after { content: "▾"; font-size: 10px; margin-left: 2px; }
    .fxd-ec-filters[open] .fxd-ec-filters-sum::after { content: "▴"; }
    /* The chips set an explicit display that beats the UA closed-<details>
       hiding, so collapse them explicitly. */
    .fxd-ec-filters:not([open]) > *:not(summary) {
        display: none !important;
    }
}

/* World Market Clock: the 8px curved dial labels are unreadable on a phone;
   dim them so the dial reads as ambient decoration and lean on the readable
   market list below it. */
@media (max-width: 600px) {
    .fxd-dial-label { opacity: 0.4; }
}

/* ── Web Push opt-in bar (desktop only) ── */
#fxd-push-bar {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 380px;
    padding: 12px 14px;
    background: linear-gradient(140deg, #2f527d 0%, #1e3a5f 60%, #16304f 100%);
    color: #eef3fb;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    font-family: var(--fx-font);
    font-size: 13px;
    line-height: 1.4;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
#fxd-push-bar.is-in { transform: none; opacity: 1; }
#fxd-push-bar .fxd-push-ico { font-size: 18px; flex-shrink: 0; }
#fxd-push-bar .fxd-push-txt { flex: 1; }
#fxd-push-bar .fxd-push-yes {
    flex-shrink: 0;
    padding: 7px 14px;
    border: none;
    border-radius: 7px;
    background: var(--fx-accent);
    color: #fff;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
}
#fxd-push-bar .fxd-push-yes:hover { background: var(--fx-accent-hover); }
#fxd-push-bar .fxd-push-yes:disabled { opacity: 0.6; cursor: default; }
#fxd-push-bar .fxd-push-no {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
}
#fxd-push-bar .fxd-push-no:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
@media (max-width: 960px) { #fxd-push-bar { display: none !important; } }
