/*
Theme Name: FinanceAIData
Theme URI: https://financeaidata.com
Author: Krishna Singh
Description: Personal blog theme for FinanceAIData. Expandable topic list with posts beneath each topic, plain reading layout, phone menu.
Version: 1.3.16
Requires at least: 6.0
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: financeaidata
*/

:root {
  --paper: #FFFFFF;
  --ink: #171717;
  --text: #343434;
  --quiet: #667085;
  --rule: #E6E8EB;
  --wash: #F7F8FA;
  --link: #0875E1;        /* clear, light blue; 4.52:1 contrast on white */
  --link-hover: #075EAD;  /* darker on hover, easier to distinguish */
  --link-line: rgba(8, 117, 225, 0.40);
  --green: #1D4B36;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--font); font-size: 13.5px; line-height: 1.6; letter-spacing: -0.003em;
  font-feature-settings: "cv11", "ss01", "ss03"; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, pre { margin: 0; }
img { max-width: 100%; height: auto; }

a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 2px; }
.quiet { color: var(--quiet); }

/* ---------- frame ---------- */
.shell { max-width: 960px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.layout {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px;
  padding-top: 52px; padding-bottom: 64px; align-items: start;
}
.site-main { max-width: 590px; min-width: 0; }

/* ---------- sidebar ---------- */
.side {
  position: sticky; top: 52px;
  max-height: calc(100vh - 76px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
  font-size: 12.5px; line-height: 1.5; color: var(--ink); padding-right: 8px;
}
.admin-bar .side { top: 84px; max-height: calc(100vh - 108px); }
.side a { color: var(--link); text-decoration: none; }
.side a:hover { color: var(--link-hover); text-decoration: underline; }

.site-head { margin-bottom: 8px; }
.brand { display: inline-block; font-size: 13.5px; font-weight: 650; letter-spacing: -0.01em; }
.side .brand, .side .brand:hover { color: var(--ink); text-decoration: none; }
.menu-toggle { display: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.side .site-nav .current-menu-item > a,
.side .site-nav .current_page_item > a,
.side .site-nav .current_page_parent > a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.side-search { margin-top: 12px; }
.search-form { display: flex; }
.search-form input[type="search"] {
  width: 100%; font: inherit; font-size: 13px; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  padding: 4px 0; background: transparent; -webkit-appearance: none; appearance: none;
}
.search-form input[type="search"]::placeholder { color: var(--quiet); }
.search-form input[type="search"]:focus { outline: none; border-bottom-color: var(--ink); }
.site-main .search-form { max-width: 360px; margin-top: 8px; }
.site-main .search-form input[type="search"] { font-size: 15px; }

/* topic tree */
.tree-head { margin-top: 24px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tree-label { font-size: 12px; color: var(--quiet); }
.tree-tools { display: flex; gap: 10px; font-size: 12px; }
.tree-tools button { font: inherit; color: var(--quiet); background: none; border: 0; padding: 0; cursor: pointer; }
.tree-tools button:hover { color: var(--ink); text-decoration: underline; }

.tree { margin-top: 8px; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree details { margin: 0; }
.tree summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 6px;
  padding: 2px 0; -webkit-tap-highlight-color: transparent; user-select: none;
}
.tree summary::-webkit-details-marker { display: none; }
.tree summary::before { content: "+"; flex: 0 0 10px; color: var(--quiet); font-family: var(--mono); font-size: 12px; }
.tree details[open] > summary::before { content: "-"; }
.tree summary:hover .label { text-decoration: underline; text-underline-offset: 3px; }
.tree .count { color: var(--quiet); font-size: 11.5px; margin-left: auto; padding-left: 8px; }
.tree .cat + .cat { margin-top: 6px; }
.tree .cat > summary { font-weight: 500; color: var(--ink); }
.tree .cat-body { margin: 2px 0 4px 4px; padding-left: 12px; border-left: 1px solid var(--rule); }
.tree .all { padding: 2px 0; }
.side .tree .all a { color: var(--link); }
.tree .cat-body a, .tree .label { overflow-wrap: anywhere; }
.tree .cat-body li { padding: 2px 0; }
.tree .tree-more { margin-top: 4px; font-size: 12px; }
.tree .tree-more a { font-weight: 500; }
.tree .none { color: var(--quiet); }
.tree .on > summary .label { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.side .tree .here, .side .tree .here:hover { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- page heads ---------- */
.kicker { font-size: 12.5px; color: var(--quiet); margin-bottom: 6px; }
.kicker a { color: var(--link); }
.page-head { margin-bottom: 24px; }
.page-title, .article-title, .statement {
  font-size: 19px; line-height: 1.3; font-weight: 640; color: var(--ink); letter-spacing: -0.022em;
}
.statement { font-size: 18px; line-height: 1.4; }
.statement .greeting { color: var(--quiet); font-weight: 500; font-size: 13.5px; letter-spacing: 0; margin-bottom: 4px; }
.statement .greeting { display: block; }
.page-title, .article-title, .statement, .entry-content h2, .entry-content h3 { text-wrap: balance; overflow-wrap: break-word; }
.page-desc, .article-summary, .entry-content p { text-wrap: pretty; }
.page-desc { margin-top: 10px; }
.page-desc p + p { margin-top: 0.8em; }

/* ---------- front page ---------- */
.intro p { margin-top: 0.75em; }
.intro-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.sec { margin-top: 44px; }
.sec.first { margin-top: 0; }
.sec-title { font-size: 11px; font-weight: 600; color: var(--quiet); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.sec-title a { color: var(--link); }
.sec > p + p { margin-top: 0.8em; }
.find-list dt { margin-top: 12px; }
.find-list dt:first-child { margin-top: 0; }
.find-list dd { color: var(--quiet); font-size: 13px; line-height: 1.6; margin-top: 2px; }
.start-list { list-style: none; padding: 0; }
.start-list li + li { margin-top: 12px; }
.start-list p { color: var(--quiet); font-size: 13px; line-height: 1.6; margin-top: 2px; }
.more-link { margin-top: 12px; font-size: 13px; }

/* ---------- article lists ---------- */
.index-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 5px 0; text-decoration: none; color: var(--text); }
.index-row:hover { color: var(--text); }
.index-date { font-size: 12px; color: var(--quiet); font-variant-numeric: tabular-nums; padding-top: 2px; }
.index-title .t { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.index-row:hover .index-title .t { color: var(--link-hover); text-decoration-color: currentColor; }
.new-mark { font-size: 11.5px; color: var(--green); margin-left: 6px; }
.empty-note { color: var(--quiet); padding: 4px 0; }

.post-list { list-style: none; padding: 0; }
.post-list li { padding: 3px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.status { font-size: 11.5px; color: var(--quiet); white-space: nowrap; padding-top: 3px; font-variant-numeric: tabular-nums; }

.pagination { margin-top: 20px; font-size: 13.5px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pagination .page-numbers.current { color: var(--ink); font-weight: 600; }

/* ---------- article ---------- */
.article-head { margin-bottom: 22px; }
.article-summary { margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.article-meta { margin-top: 12px; font-size: 12px; color: var(--quiet); }
.article-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 13.5px; }
.tag-row { font-size: 13px; color: var(--quiet); margin-bottom: 16px; }
.tag-row a { color: var(--link); }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pn .next { text-align: right; }
.pn small { display: block; color: var(--quiet); font-size: 12px; }
.related { margin-top: 44px; }

/* ---------- article content ---------- */
.entry-content { font-size: 13.5px; line-height: 1.65; }
.entry-content > * + * { margin-top: 0.9em; }
.entry-content h2 { font-size: 15.5px; line-height: 1.4; font-weight: 620; letter-spacing: -0.012em; color: var(--ink); margin-top: 1.5em; }
.entry-content h3 { font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--ink); margin-top: 1.3em; }
.entry-content h4 { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 1.2em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: 0.35em; }
.entry-content strong { font-weight: 600; color: var(--ink); }
.entry-content blockquote { border-left: 2px solid var(--rule); padding-left: 16px; color: var(--quiet); }
.entry-content code { font-family: var(--mono); font-size: 0.88em; background: var(--wash); padding: 1px 4px; border-radius: 2px; }
.entry-content pre { background: var(--wash); padding: 14px 16px; overflow-x: auto; line-height: 1.55; border-radius: 2px; }
.entry-content pre code { background: none; padding: 0; font-size: 12.5px; }
.entry-content img { display: block; }
.entry-content figcaption { font-size: 13px; color: var(--quiet); margin-top: 6px; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.entry-content .wp-block-table { overflow-x: auto; margin-left: 0; margin-right: 0; }
.entry-content th { font-weight: 600; color: var(--ink); text-align: left; padding: 6px 12px; background: var(--wash); border: 0; white-space: nowrap; }
.entry-content td { padding: 6px 12px; border: 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.entry-content .wp-block-table thead { border-bottom: 0; }
.entry-content hr { border: none; border-top: 1px solid var(--rule); margin: 2.2em 0; }
.alignwide, .alignfull { max-width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }

/* Callout: Group block, style "Callout". First paragraph in bold acts as the label. */
.callout, .is-style-callout { background: var(--wash); padding: 10px 14px; font-size: 13.5px; line-height: 1.6; }
.is-style-callout > * + * { margin-top: 0.3em; }
.is-style-callout > :first-child strong, .callout-label { display: block; font-weight: 600; color: var(--ink); }

/* Sources: Group block, style "Sources". Put a heading and a list inside. */
.is-style-sources { margin-top: 2.2em; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13.5px; }
.entry-content .is-style-sources h2, .entry-content .is-style-sources h3 { font-size: 12.5px; font-weight: 500; color: var(--quiet); margin: 0 0 6px; }
.is-style-sources ul { padding-left: 1.1em; }

/* ---------- footer ---------- */
.site-foot { padding: 0 0 40px; font-size: 12px; color: var(--quiet); }
.site-foot .shell:first-child { border-top: 1px solid var(--rule); padding-top: 18px; }
.site-foot a { color: var(--link); text-decoration: none; }
.site-foot a:hover { color: var(--link-hover); text-decoration: underline; }
.foot-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.foot-copyright { margin-right: 5px; white-space: nowrap; }
.foot-divider { align-self: center; height: 12px; border-left: 1px solid var(--rule); }
@media (max-width: 600px) { .foot-divider { display: none; } .foot-links { gap: 7px 14px; } }
.foot-legal { margin-top: 10px; font-size: 11.5px; line-height: 1.55; max-width: 700px; }

/* ---------- small laptop and tablet landscape ---------- */
@media (min-width: 861px) and (max-width: 1080px) {
  .layout { grid-template-columns: 200px minmax(0, 1fr); gap: 44px; padding-top: 56px; }
  .side { top: 56px; }
  .site-main { max-width: 590px; }
}

/* ---------- tablet and phone ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 20px; padding-top: 0; }
  .side {
    position: sticky; top: 0; z-index: 20; background: var(--paper);
    max-height: none; overflow: visible; font-size: 14px;
    margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px;
  }
  .admin-bar .side { top: 32px; max-height: none; }
  .site-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0; padding: 14px 0; border-bottom: 1px solid var(--rule);
  }
  .brand { font-size: 14px; }
  .menu-toggle {
    display: inline-block; font: inherit; font-size: 14px; color: var(--ink);
    background: none; border: 1px solid var(--rule); border-radius: 2px;
    padding: 7px 14px; min-height: 44px; cursor: pointer;
  }
  .side-panel {
    display: none; padding: 12px 0 20px; border-bottom: 1px solid var(--rule);
    max-height: calc(100vh - 65px); max-height: calc(100dvh - 65px);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  .side-panel.open { display: block; }
  body.menu-open { overflow: hidden; }
  .site-nav ul { gap: 4px 22px; }
  .site-nav a { display: inline-block; padding: 4px 0; }
  .side-search { margin-top: 14px; }
  .search-form input[type="search"] { font-size: 16px; padding: 8px 0; }
  .tree-head { margin-top: 24px; }
  .tree-tools { font-size: 13px; gap: 14px; }
  .tree summary { padding: 8px 0; }
  .tree .cat + .cat { margin-top: 0; border-top: 1px solid var(--rule); }
  .tree .all { padding: 7px 0; }
  .tree .cat-body li { padding: 7px 0; line-height: 1.4; }
  .tree .count { font-size: 12.5px; }
  .site-main { padding-top: 8px; }
  body { font-size: 14px; }
  .entry-content { font-size: 14px; }
}
@media (max-width: 782px) { .admin-bar .side { top: 46px; } }
@media (max-width: 600px) {
  .admin-bar .side { top: 0; }
  .shell { padding-left: 16px; padding-right: 16px; }
  .side { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .page-title, .article-title { font-size: 18px; }
  .statement { font-size: 17px; }
  .index-row { grid-template-columns: 1fr; gap: 0; padding: 6px 0; }
  .index-date { order: 2; }
  .post-list li { grid-template-columns: 1fr; gap: 0; }
  .pn { grid-template-columns: 1fr; }
  .pn .next { text-align: left; }
}

/* ---------- print: article only ---------- */
@media print {
  .side, .site-foot, .related, .article-foot, .screen-reader-text { display: none !important; }
  .layout { display: block; padding: 0; }
  .site-main { max-width: none; }
  a { color: var(--ink); text-decoration: none; }
}

/* ---------- accessibility ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.screen-reader-text:focus { position: static !important; width: auto; height: auto; clip: auto; display: inline-block; padding: 6px 10px; background: var(--ink); color: #fff; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
