/* Chartria lessons, tools, glossary, indicators: interface styles (loaded by chartria-tools.php on the relevant pages only). */
.ct-form { margin: 1rem 0; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem 1.1rem; }
.ct-field { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: #1F2A44; font-weight: 600; }
.ct-field input, .ct-field select { font: inherit; font-weight: 400; padding: .55rem .65rem; border: 1px solid #7A86A8; border-radius: 10px; background: #fff; color: #0B1224; min-height: 44px; }
.ct-field input:focus, .ct-field select:focus { outline: 2px solid #6D4AFF; outline-offset: 1px; }
.ct-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .65rem 1.1rem; min-height: 44px; border-radius: 12px; border: 0; background: #4F32E6; color: #fff; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; }
.ct-btn:hover { background: #3f27c4; }
.ct-btn:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; }
.chartria-table-wrap[tabindex]:focus-visible, .ct-out [role=region][tabindex]:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; }
.ct-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ct-ghost { background: #fff; color: #4F32E6; border: 1px solid #C4B5FD; }
.ct-ghost:hover { background: #F3F0FF; }
.ct-small { min-height: 38px; padding: .4rem .85rem; font-size: .92rem; }
.ct-done { background: #166534; }
.ct-done:hover { background: #14532d; }
.ct-out { margin-top: 1.25rem; }
.ct-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; }
.ct-card { background: #fff; border: 1px solid #D8DDF0; border-radius: 14px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.ct-card small { color: #55627F; font-weight: 600; }
.ct-card b { font-size: 1.45rem; color: #0B1224; line-height: 1.2; }
.ct-card em { color: #55627F; font-style: normal; font-size: .86rem; }
.ct-big { background: linear-gradient(135deg, #EDE9FE, #E0F7FB); border-color: #C4B5FD; }
.ct-big b { font-size: 1.9rem; }
.ct-steps { margin: 1rem 0; padding-left: 1.2rem; color: #1F2A44; }
.ct-warn { background: #FEF3C7; border: 1px solid #FCD34D; color: #78350F; padding: .7rem .9rem; border-radius: 10px; }
.ct-rr { background: #ECFDF5; border: 1px solid #A7F3D0; color: #064E3B; padding: .7rem .9rem; border-radius: 10px; margin: .8rem 0; }
.ct-note { color: #55627F; font-size: .88rem; }
.ct-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: .5rem 0 1rem; }
.ct-table th, .ct-table td { border: 1px solid #D8DDF0; padding: .45rem .6rem; text-align: left; }
.ct-table th { background: #ECEEF8; }
.ct-tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.ct-tool-card { background: #fff; border: 1px solid #D8DDF0; border-radius: 16px; padding: 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.ct-tool-card h3, .ct-post-card h2 { margin: 0; font-size: 1.2rem; }
.ct-tool-card h3 a, .ct-post-card h2 a { color: #0B1224; text-decoration: none; }
.ct-tool-card p { margin: 0; color: #3b4766; }
.ct-tool-card .ct-btn { align-self: flex-start; margin-top: auto; }
/* chart quiz */
.cq-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; color: #55627F; font-size: .9rem; }
.cq-q { font-weight: 650; margin: .6rem 0; color: #0B1224; }
.cq-canvas { width: 100%; background: #fff; border: 1px solid #D8DDF0; border-radius: 12px; display: block; }
.cq-opts { display: flex; flex-wrap: wrap; gap: .6rem; margin: .9rem 0; }
.cq-opt.cq-right { background: #166534; }
.cq-opt.cq-wrong { background: #B91C1C; }
.cq-fb { background: #F7F8FC; border-left: 4px solid #6D4AFF; padding: .7rem .9rem; border-radius: 6px; color: #1F2A44; }
.cq-fb:empty { display: none; }
.cq-next .ct-btn { margin-top: .7rem; display: flex; }
.cq-q:focus { outline: 2px solid #6D4AFF; outline-offset: 3px; }
.cq-legend { font-size: .85rem; color: #55627F; margin: .5rem 0 0; }
.cq-key { display: inline-block; width: .8rem; height: .8rem; vertical-align: -1px; border: 2px solid #1b9e77; box-sizing: border-box; }
.cq-key-up { background: #fff; }
.cq-key-down { background: #d95f02; border-color: #d95f02; margin-left: .6rem; }
.cq-data { margin: .6rem 0 0; font-size: .85rem; }
.cq-data summary { cursor: pointer; color: #3b4766; }
.cq-data > table { display: block; max-height: 18rem; overflow: auto; border-collapse: collapse; }
.cq-table caption { text-align: left; color: #55627F; padding: .4rem 0; }
.cq-table th, .cq-table td { border-bottom: 1px solid #D8DDF0; padding: .2rem .5rem; text-align: right; }
.cq-table th[scope=row], .cq-table thead th { text-align: left; }
.cq-done { text-align: center; padding: 1.5rem 0; }
/* lesson interface */
.cl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 1.5rem; }
.cl-hint { color: #55627F; font-size: .85rem; }
.cl-quiz { margin: 1rem 0; }
.cl-quiz-intro { color: #55627F; font-size: .92rem; }
.cl-card { background: #fff; border: 1px solid #D8DDF0; border-radius: 12px; margin: .55rem 0; padding: .1rem 1rem; }
.cl-card summary { cursor: pointer; font-weight: 650; padding: .75rem 0; color: #0B1224; list-style-position: outside; }
.cl-card summary strong { color: #4F32E6; }
.cl-card[open] { border-color: #A78BFA; }
.cl-card.cl-got { border-left: 5px solid #16A34A; }
.cl-card.cl-miss { border-left: 5px solid #D97706; }
.cl-ans { padding: 0 0 .8rem; }
.cl-ans p { margin: .2rem 0 .7rem; }
.cl-tally { color: #166534; font-weight: 650; }
.cl-feedback { margin: 2rem auto 0; max-width: 860px; background: #fff; border: 1px solid #D8DDF0; border-radius: 14px; padding: 1rem 1.4rem; }
.cl-feedback h2 { font-size: 1.1rem; margin: 0 0 .6rem; border: 0; padding: 0; }
.cl-form label { display: block; font-weight: 600; margin: .8rem 0 .4rem; }
.cl-form textarea { width: 100%; border: 1px solid #7A86A8; border-radius: 10px; padding: .6rem; font: inherit; }
.cl-completed::before { content: "\2713\00a0"; color: #16A34A; font-weight: 800; }
.cl-bar { height: 10px; border-radius: 6px; background: #1b2744; overflow: hidden; margin: .4rem 0 1rem; }
.cl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6D4AFF, #22D3EE); }
#chartria-progress { background: rgba(16, 26, 51, .85); border: 1px solid #22305A; border-radius: 14px; padding: .8rem 1.2rem; margin: 1rem 0 1.5rem; max-width: 860px; }
#chartria-progress p { margin: .3rem 0; }
/* learning path */
.chartria-path-stage { margin: 1.4rem 0; }
.chartria-path-stage h3 { margin: 0 0 .2rem; }
.chartria-path-stage p { color: #9AA8CC; margin: 0 0 .5rem; }
.chartria-path-stage ol { margin: 0; padding-left: 1.4rem; }
.chartria-path-stage li { margin: .2rem 0; }
/* related lessons */
.chartria-related { max-width: 860px; margin: 1.5rem auto; padding: 1rem 1.4rem; background: #F1F3FB; border-radius: 14px; border: 1px solid #D8DDF0; }
.chartria-related h2 { margin: 0 0 .4rem; font-size: 1.1rem; border: 0; padding: 0; }
.chartria-related ul { margin: .2rem 0 .8rem; padding-left: 1.2rem; }
/* glossary */
.cg-search { width: 100%; max-width: 480px; padding: .65rem .8rem; border: 1px solid #7A86A8; border-radius: 10px; font: inherit; margin: .5rem 0; }
.cg-letter { margin: 1.6rem 0 .4rem; border-bottom: 2px solid #C4B5FD; color: #4F32E6; }
.cg-term { margin: .55rem 0; }
.cg-term b { color: #0B1224; }
.cg-term small a { margin-left: .4rem; }
/* indicator pages */
.ci-facts { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.ci-facts th, .ci-facts td { border: 1px solid #D8DDF0; padding: .5rem .7rem; text-align: left; vertical-align: top; }
.ci-facts th { width: 28%; background: #ECEEF8; }
@media print {
  header.chartria-header, .chartria-footer, .cl-tools, .cl-feedback, .chartria-lesson-nav, .chartria-track-outline, .chartria-ad-slot, .chartria-breadcrumbs, #wpadminbar, .cl-mark, .cl-quiz-intro { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .chartria-article { box-shadow: none !important; border-radius: 0 !important; padding: 0 !important; background: #fff !important; }
  .cl-card { border: 1px solid #999; break-inside: avoid; }
  .cl-orig { display: none !important; }
  a { color: #000 !important; text-decoration: underline; }
  img { max-width: 100% !important; break-inside: avoid; }
}
@media (max-width: 640px) { .chartria-sep { display: none; } .chartria-lesson-meta-row { gap: .35rem .9rem; } .ct-big b { font-size: 1.6rem; } .cq-opts { flex-direction: column; } .cq-opt { width: 100%; } }

/* Theme link colour was overriding the button text (purple on purple). */
a.ct-btn, a.ct-btn:link, a.ct-btn:visited, .ct-tool-card a.ct-btn { color: #fff !important; text-decoration: none !important; }
a.ct-btn:hover, a.ct-btn:focus-visible { color: #fff !important; }

/* markets tools */
.ct-seg { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.ct-segbtn { min-height: 44px; padding: .5rem .95rem; border-radius: 999px; border: 1px solid #D8DDF0; background: #fff; color: #0B1224; font: inherit; font-weight: 600; cursor: pointer; }
.ct-segbtn.is-on { background: #4F32E6; border-color: #4F32E6; color: #fff; }
.ct-segbtn:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; }
.cs-list { list-style: none; margin: 1rem 0 1.5rem; padding: 0; display: grid; gap: .45rem; }
.cs-row { display: grid; grid-template-columns: 1.6rem 3.2rem 1fr 5.2rem; align-items: center; gap: .6rem; }
.cs-rank { color: #5b6685; font-size: .85rem; text-align: right; }
.cs-ccy { font-size: 1rem; }
.cs-bar { position: relative; height: 1.15rem; background: #EEF0FA; border-radius: 6px; overflow: hidden; }
.cs-bar::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #8f9ac0; }
.cs-fill { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.cs-fill.up { background: #0f9d6a; }
.cs-fill.down { background: #d6455d; }
.cs-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.ct-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vr-table td, .vr-table th { white-space: nowrap; }
.vr-meter { display: inline-block; width: 64px; height: .6rem; background: #EEF0FA; border-radius: 4px; vertical-align: middle; overflow: hidden; }
.vr-meter i { display: block; height: 100%; background: #4F32E6; }
.vr-pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 650; }
.vr-pill.quiet { background: #E3F4EC; color: #0a6b49; }
.vr-pill.typical { background: #EEF0FA; color: #36406b; }
.vr-pill.busy { background: #FDE6EA; color: #a3263c; }
@media (max-width: 480px) { .cs-row { grid-template-columns: 1.2rem 2.8rem 1fr 4.4rem; gap: .4rem; } }

/* blog cards */
.ct-post-card img { width: 100%; height: auto; border-radius: 10px; display: block; margin: 0 0 .4rem; }
.ct-post-card small { color: #5b6685; }

/* blog posts: charts and figures must fit the column */
.wp-block-post-content figure, .wp-block-post-content .wp-block-image { margin: 1.4rem 0; max-width: 100%; }
.wp-block-post-content img { max-width: 100%; height: auto; }
.wp-block-post-content figcaption { font-size: .85rem; color: #5b6685; margin-top: .4rem; text-align: center; }
.wp-block-post-content .chartria-table-wrap { overflow-x: auto; }
.wp-block-post-content table { width: 100%; }

.ct-protocol caption { text-align: left; font-weight: 700; padding-bottom: .4rem; }
.ct-protocol th[scope="row"] { width: 28%; text-align: left; vertical-align: top; }

/* Reviews section */
.cr-factbox { border: 1px solid #C9D1EE; border-left: 4px solid #6D4AFF; background: #F6F7FD; border-radius: 12px; padding: 1rem 1.1rem; margin: 1.2rem 0; max-width: 860px; }
.cr-factbox .ct-table { margin: .5rem 0; }
.cr-fb-type { margin: 0 0 .3rem; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: #55627F; font-weight: 700; }
.cr-fb-verdict { margin: 0 0 .5rem; font-weight: 600; }
.cr-fb-meta { margin: .4rem 0; font-size: .88rem; color: #3A4666; }
.cr-disc { background: #FFF8E5; border: 1px solid #F1D88A; border-radius: 10px; padding: .7rem .9rem; font-size: .92rem; max-width: 860px; }
.cr-btn-wrap { margin: .6rem 0; }
.cr-btn { text-decoration: none; }
.cr-ad { font-size: .78rem; color: #55627F; margin-left: .4rem; }
.cr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; margin: 1rem 0; }
.cr-card { display: flex; flex-direction: column; gap: .35rem; border: 1px solid #D8DDF0; border-radius: 12px; padding: .9rem 1rem; background: #fff; text-decoration: none; color: inherit; }
.cr-card:hover { border-color: #6D4AFF; }
.cr-card b { color: #1A2140; }
.cr-card span { color: #3A4666; font-size: .92rem; line-height: 1.5; }
.cr-card em { color: #6B7694; font-size: .8rem; font-style: normal; }
/* blog pagination */
.ct-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; margin: 1.6rem 0 .5rem; }
.ct-pager-num { min-width: 2.4rem; min-height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #2a3560; border-radius: 10px; color: inherit; text-decoration: none; padding: 0 .6rem; }
a.ct-pager-num:hover, a.ct-pager-num:focus-visible { border-color: #6366f1; }
.ct-pager-num[aria-current] { background: #4f46e5; border-color: #4f46e5; color: #fff; font-weight: 700; }
.ct-btn-off { opacity: .45; cursor: not-allowed; }
.ct-btn { box-sizing: border-box; }
/* post contents and related posts */
.ct-toc { border: 1px solid #D8DDF0; background: #F4F5FC; border-radius: 12px; padding: .2rem 1rem .6rem; margin: 1.4rem 0; max-width: 860px; }
.ct-toc summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: .6rem; }
.ct-toc-time { font-weight: 400; font-size: .85rem; color: #5b6685; }
.ct-toc ol { margin: .2rem 0 0; padding-left: 1.3rem; }
.ct-toc li { margin: .15rem 0; }
.ct-toc a { color: inherit; text-decoration: none; }
.ct-toc a:hover, .ct-toc a:focus-visible { text-decoration: underline; }
.ct-related { margin: 2.4rem 0 1rem; padding-top: 1.2rem; border-top: 1px solid #D8DDF0; }
.ct-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ct-related-card { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; color: inherit; border: 1px solid #D8DDF0; border-radius: 12px; padding: .6rem; background: #fff; }
.ct-related-card:hover, .ct-related-card:focus-visible { border-color: #6366f1; }
.ct-related-card img { width: 100%; height: auto; border-radius: 8px; display: block; }
.ct-related-title { font-weight: 700; line-height: 1.3; }
.ct-related-date { font-size: .85rem; color: #5b6685; }
@media (max-width: 720px) { .ct-related-grid { grid-template-columns: 1fr; } }
/* wide post tables scroll sideways on phones instead of squeezing every column */
@media (max-width: 720px) { .wp-block-post-content .chartria-table-wrap { -webkit-overflow-scrolling: touch; } .wp-block-post-content .chartria-table-wrap .ct-table:has(th:nth-child(3)) { min-width: 34rem; } .wp-block-post-content .chartria-table-wrap .ct-table:has(th:nth-child(5)) { min-width: 44rem; } }
.ct-search { margin: 1.2rem 0 1.6rem; max-width: 640px; }
.ct-search label { display: block; font-weight: 600; margin-bottom: .4rem; }
.ct-search div { display: flex; gap: .5rem; }
.ct-search input[type=search] { flex: 1; min-width: 0; min-height: 44px; box-sizing: border-box; border: 1px solid #7A86A8; border-radius: 10px; padding: 0 .8rem; font: inherit; }
.ct-search input[type=search]:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; }
.ct-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.2rem; }
.ct-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .9rem; border: 1px solid #b9c0dc; border-radius: 999px; text-decoration: none; color: inherit; font-size: .92rem; }
.ct-chip:hover, .ct-chip:focus-visible { border-color: #4f46e5; }
.ct-chip[aria-current] { background: #4f46e5; border-color: #4f46e5; color: #fff; font-weight: 600; }
/* tool panels use h2 so the heading order under the page title is correct; keep their old, smaller look */
.ct-tool h2, .ct-form h2 { font-size: 1.15rem !important; line-height: 1.35 !important; margin: 1.1rem 0 .5rem !important; letter-spacing: 0 !important; text-align: left !important; }
.ct-tool-card h2 { margin: 0 !important; font-size: 1.2rem !important; line-height: 1.3 !important; text-align: left !important; letter-spacing: 0 !important; }
.ct-tool-card h2 a { color: #0B1224; text-decoration: none; }
.ct-post-card h2 { margin: 0 !important; font-size: 1.2rem !important; line-height: 1.3 !important; text-align: left !important; letter-spacing: 0 !important; }
.ct-out { overflow-x: auto; max-width: 100%; }
/* stray line breaks added by the editor would become empty grid cells */
.cr-cards > br, .cr-cards > p:empty { display: none; }
.cr-cards > p { display: contents; }
.ct-note, .ct-tool p { overflow-wrap: anywhere; }

.ct-neg { color: #BE123C; }
.ct-hours { margin: .5rem 0 1rem; }
.ct-hr { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr 4rem; align-items: center; gap: .5rem; font-size: .85rem; padding: 1px 0; }
.ct-hr i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #6D4AFF, #22D3EE); min-width: 2px; }
.ct-hr b { text-align: right; font-variant-numeric: tabular-nums; }
.ct-hr small { color: #5a6485; }
@media (max-width: 600px) { .ct-hr { grid-template-columns: 1fr 3.5rem; } .ct-hr i { grid-column: 1 / -1; grid-row: 2; } .ct-hr span { grid-column: 1; } .ct-hr b { grid-column: 2; grid-row: 1; } }
.ct-chart { width: 100%; height: auto; display: block; background: #fff; border: 1px solid #D8DDF0; border-radius: 12px; }
.ct-out details { margin: 1rem 0; }
.ct-out summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }
.ct-candles .ct-cd { cursor: pointer; }
.ct-candles .ct-cd:hover rect:first-child { fill: rgba(109,74,255,.08); }
.ct-candles .ct-cd:focus-visible { outline: none; }
.ct-candles .ct-cd:focus-visible rect:first-child { fill: rgba(34,211,238,.2); }
.ct-choices { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0; }
.ct-feedback { padding: .8rem 1rem; border-radius: 12px; margin: .8rem 0; border: 1px solid; }
.ct-yes { background: #ECFDF3; border-color: #86EFAC; color: #14532D; }
.ct-no { background: #FFF1F2; border-color: #FDA4AF; color: #881337; }
.ct-matrix th, .ct-matrix td { text-align: center; padding: .3rem .35rem; font-size: .82rem; font-variant-numeric: tabular-nums; }
.ct-matrix tbody th { text-align: left; white-space: nowrap; }
.ct-matrix td { cursor: pointer; }
.ct-matrix td.ct-diag { background: #ECEEF8; color: #55627F; cursor: default; }
.ct-privacy { background: #F3F0FF; border: 1px solid #C4B5FD; border-radius: 12px; padding: .7rem 1rem; margin: 1rem 0; color: #1F2A44; }
.ct-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
