/*
Theme Name: FST Blog
Theme URI: https://freestatisticaltools.com/blog/
Author: Bibin Xavier
Author URI: https://www.linkedin.com/in/bibinxavier/
Description: The FreeStatisticalTools.com blog theme. Matches the look of the tools site and includes built-in SEO (meta descriptions, canonical URLs, Open Graph, Article/FAQ/Breadcrumb schema), a table of contents, automatic links from test names to the free tools, tool-card shortcodes and block patterns, "Cite this article" boxes, Google Analytics 4 and AdSense.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
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: fst-blog
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready, block-patterns, wide-blocks, accessibility-ready
*/

/* Layout: PLS-QCA Studio system — white ground, one ink, cobalt-to-violet accent, hairline grids; tool pages are a two-pane workbench over APA three-line result tables. */
:root {
  --bg: #ffffff; --surface: #ffffff; --sunken: #f4f5f8; --ink: #0f1a33; --ink-2: #384152; --muted: #687083;
  --line: #e6e8ee; --line-2: #d3d7e0;
  --accent: #2563eb; --accent-2: #7a4cf0; --accent-ink: #ffffff; --accent-soft: #eef3fe; --accent-line: #c9d8fb;
  --grad: linear-gradient(90deg, #2f6df6 0%, #5a5cf3 55%, #7b4cf0 100%);
  --good: #1d7649; --good-soft: #e8f3ec; --warn: #8f5e06; --warn-soft: #faf2e0; --bad: #b2353a; --bad-soft: #fbeceb;
  --logo-tile: #eef2fd; --logo-ink: #0f1a33; --logo-grad: linear-gradient(90deg, #1479f0 0%, #3a6cf4 50%, #6a3df0 100%);
  --c1: #2563eb; --c2: #7a4cf0; --c3: #0e9384; --c4: #d9711c; --c5: #c03a76; --c6: #5b6b8c;
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 10px; --r-lg: 14px;
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0d1017; --surface: #151924; --sunken: #1b2030; --ink: #eceef4; --ink-2: #c6cad4; --muted: #979db0;
  --line: #262b3a; --line-2: #343a4c;
  --accent: #7ea4ff; --accent-2: #a68bff; --accent-ink: #0b0e18; --accent-soft: #1a2142; --accent-line: #334179;
  --good: #6fcf9b; --good-soft: #12261b; --warn: #e5b75e; --warn-soft: #2b2312; --bad: #f08b8b; --bad-soft: #321819;
  --logo-tile: #1a2142; --logo-ink: #eceef4; --logo-grad: linear-gradient(90deg, #4d9bff 0%, #7a8cff 50%, #a083ff 100%);
  --c1: #7ea4ff; --c2: #a68bff; --c3: #4fd1bf; --c4: #f2a25c; --c5: #f07fb0; --c6: #a4b0c8;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0d1017; --surface: #151924; --sunken: #1b2030; --ink: #eceef4; --ink-2: #c6cad4; --muted: #979db0;
  --line: #262b3a; --line-2: #343a4c;
  --accent: #7ea4ff; --accent-2: #a68bff; --accent-ink: #0b0e18; --accent-soft: #1a2142; --accent-line: #334179;
  --good: #6fcf9b; --good-soft: #12261b; --warn: #e5b75e; --warn-soft: #2b2312; --bad: #f08b8b; --bad-soft: #321819;
  --logo-tile: #1a2142; --logo-ink: #eceef4; --logo-grad: linear-gradient(90deg, #4d9bff 0%, #7a8cff 50%, #a083ff 100%);
  --c1: #7ea4ff; --c2: #a68bff; --c3: #4fd1bf; --c4: #f2a25c; --c5: #f07fb0; --c6: #a4b0c8;
  color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--f-sans); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
code, kbd, .mono { font-family: var(--f-mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }
.eyebrow { font: 500 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 14px/1 var(--f-sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 10px 15px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--ink-2); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.accent:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--sunken); }
.btn.lg { padding: 13px 20px; font-size: 15px; border-radius: 10px; }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 8px; }
.btn.xs { padding: 5px 9px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 9px; cursor: pointer; }
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-btn .sun { display: none; } :root:not([data-theme="light"]) .icon-btn .moon { display: block; } }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 17px; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark .logo-tile { fill: var(--logo-tile); }
.wordmark { font-family: "Lexend", var(--f-sans); font-weight: 600; letter-spacing: -0.025em; font-size: 18px; color: var(--logo-ink); }
.wm-grad { background: var(--logo-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 420px) { .wordmark { font-size: 15px; } .brand-mark { width: 30px; height: 30px; } .brand { gap: 8px; } }
.brand .word-2 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }

/* header / footer */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 64px; position: relative; }
.site-nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; padding: 8px 11px; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--sunken); }
.site-nav a .ext { font-size: 11px; color: var(--muted); margin-left: 3px; }
.head-tools { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none !important; }
@media (max-width: 900px) {
  .site-nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; margin: 0; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; }
  .menu-btn { display: inline-grid !important; }
  .head-tools { margin-left: auto; }
}
@media (max-width: 520px) { .head-tools .btn { display: none; } }
.site-foot { border-top: 1px solid var(--line); padding-block: 48px 36px; margin-top: 40px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot-grid h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; letter-spacing: 0; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); }
.foot-grid > div:first-child p { color: var(--muted); margin-top: 12px; max-width: 40ch; }
.foot-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: 13px; }
.foot-base a { color: var(--ink-2); }
.creator { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.creator a { color: var(--ink); font-weight: 600; text-decoration: none; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ===================== FST Blog: blog-specific styles ===================== */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.site-nav a.is-blog { color: var(--ink); background: var(--sunken); }
.site-nav .menu, .site-nav ul { list-style: none; margin: 0; padding: 0; display: contents; }
.site-nav li { display: contents; }
.site-nav .current-menu-item > a, .site-nav .current_page_parent > a { color: var(--ink); background: var(--sunken); }

/* breadcrumbs */
.crumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; padding: 0; list-style: none; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs [aria-current] { color: var(--ink-2); }

/* blog hero / archive head */
.blog-hero { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 40px); }
.blog-hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.04; letter-spacing: -0.035em; margin-top: 18px; max-width: 18ch; }
.blog-hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.blog-hero .lede { margin-top: 16px; }
.blog-hero .eyebrow { display: inline-flex; gap: 8px; align-items: center; margin-top: 16px; }
.blog-hero .eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); display: inline-block; }
.hero-search { margin-top: 26px; display: flex; gap: 8px; max-width: 520px; }
.search-field { flex: 1; min-width: 0; font: 15px var(--f-sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 14px; }
.search-field:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none; }
.chip:hover, .chip.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.chip span { color: var(--muted); font-size: 12px; }

/* post grid & cards */
.posts-section { padding-block: 8px 56px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s; min-width: 0; }
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card-media { display: block; aspect-ratio: 1200 / 630; background: var(--sunken); overflow: hidden; border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 20px; background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 55%), radial-gradient(120% 120% at 0% 100%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--sunken); }
.ph .eyebrow { color: var(--accent); }
.ph b { font-size: 19px; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ph svg { width: 54px; height: 32px; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-cat { font: 500 11.5px/1 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.card h2, .card h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; }
.card h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { color: var(--accent); }
.card p { color: var(--ink-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px 14px; flex-wrap: wrap; }

.feature-post { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); margin-bottom: 26px; }
.feature-post .card-media { aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid var(--line); }
.feature-post .card-body { padding: clamp(22px, 3vw, 36px); justify-content: center; gap: 14px; }
.feature-post h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.12; letter-spacing: -.03em; }
.feature-post h2 a { color: var(--ink); text-decoration: none; }
.feature-post p { color: var(--ink-2); font-size: 16px; }
@media (max-width: 820px) { .feature-post { grid-template-columns: minmax(0, 1fr); } .feature-post .card-media { aspect-ratio: 1200/630; border-right: 0; border-bottom: 1px solid var(--line); } }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 18px; }
.section-title h2 { font-size: 22px; letter-spacing: -.02em; }
.section-title a { font-size: 14px; text-decoration: none; }

/* pagination */
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers { min-width: 38px; height: 38px; padding: 0 12px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14px; background: var(--surface); }
.pagination .page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination a.page-numbers:hover { border-color: var(--line-2); color: var(--ink); }

/* tools strip */
.tools-strip { border-top: 1px solid var(--line); padding-block: 48px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tool-link { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; background: var(--surface); color: var(--ink); min-width: 0; }
.tool-link:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.tool-link b { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.tool-link span { color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== single article ===== */
.article-head { padding-block: clamp(28px, 4vw, 48px) 24px; }
.article-head .wrap { max-width: 1180px; }
.article-head h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.06; letter-spacing: -0.035em; margin-top: 18px; max-width: 22ch; }
.article-head .dek { font-size: clamp(17px, 1.6vw, 19.5px); color: var(--ink-2); margin-top: 16px; max-width: 64ch; line-height: 1.55; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 22px; font-size: 13.5px; color: var(--muted); }
.meta-row .who { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; text-decoration: none; }
.meta-row .who img, .avatar-ph { width: 32px; height: 32px; border-radius: 50%; }
.avatar-ph { display: inline-grid; place-items: center; background: var(--grad); color: #fff; font-size: 13px; font-weight: 600; }
.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.meta-row .cat-pill { font: 500 11.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; padding: 6px 10px; text-decoration: none; }
.hero-img { margin: 8px 0 0; }
.hero-img img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); display: block; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; padding-block: 28px 24px; }
@media (max-width: 1060px) { .article-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } .article-aside { display: none; } }
.article-main { min-width: 0; max-width: 740px; }
.article-aside { position: sticky; top: 84px; display: grid; gap: 18px; max-height: calc(100vh - 100px); overflow: auto; padding-bottom: 8px; }

/* prose */
.prose { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -0.025em; color: var(--ink); margin-top: 2em; scroll-margin-top: 84px; }
.prose h3 { font-size: 20.5px; line-height: 1.3; color: var(--ink); margin-top: 1.7em; scroll-margin-top: 84px; letter-spacing: -.015em; }
.prose h4 { font-size: 17px; color: var(--ink); margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin-left: 0; margin-right: 0; border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; color: var(--ink); font-size: 18px; }
.prose code { background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .86em; color: var(--ink); }
.prose pre { background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow: auto; font: 14px/1.6 var(--f-mono); color: var(--ink); }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose img { height: auto; border-radius: 12px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .prose .wp-element-caption { font-size: 13.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.2em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose .wp-block-table, .prose .table-wrap { overflow-x: auto; margin-left: 0; margin-right: 0; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { color: var(--ink); font-weight: 600; border-bottom: 1.5px solid var(--ink); background: transparent; }
.prose .wp-block-table thead { border-bottom: 0; }
.prose .wp-block-table td, .prose .wp-block-table th { border-left: 0; border-right: 0; border-top: 0; }
.prose .lead { font-size: 19px; color: var(--ink); }
.prose .alignwide { margin-inline: 0; }

/* table of contents */
.toc { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 16px 18px; font-size: 14px; }
.toc-title { font: 500 11.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc ol ol { padding-left: 14px; margin-top: 2px; }
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 5px 10px; border-radius: 7px; line-height: 1.4; border-left: 2px solid transparent; }
.toc a:hover { background: var(--sunken); color: var(--ink); }
.toc a.active { color: var(--accent); background: var(--accent-soft); border-left-color: var(--accent); }
details.toc-inline { border: 1px solid var(--line); border-radius: 14px; background: var(--sunken); padding: 0; font-size: 15px; }
details.toc-inline summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.toc-inline summary::-webkit-details-marker { display: none; }
details.toc-inline summary::after { content: "+"; font: 500 18px var(--f-mono); color: var(--muted); }
details.toc-inline[open] summary::after { content: "–"; }
details.toc-inline ol { margin: 0; padding: 0 18px 16px 36px; }
details.toc-inline ol ol { padding: 4px 0 0 18px; }
details.toc-inline a { text-decoration: none; color: var(--ink-2); }
details.toc-inline a:hover { color: var(--accent); }
@media (min-width: 1061px) { details.toc-inline { display: none; } }

/* aside cards */
.aside-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 18px; }
.aside-card.try { background: radial-gradient(140% 120% at 100% 0%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 60%), var(--surface); border-color: var(--accent-line); }
.aside-card h3 { font-size: 16px; margin: 8px 0 6px; letter-spacing: -.01em; }
.aside-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.aside-card .btn { margin-top: 14px; width: 100%; }
.aside-card ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.aside-card li a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; display: block; padding: 5px 0; }
.aside-card li a:hover { color: var(--accent); }

/* shortcodes: tool card */
.fst-tool { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 14px; padding: 16px 18px; margin-block: 1.6em; text-decoration: none; }
.prose .fst-tool { color: var(--ink); text-decoration: none; }
.fst-tool .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--accent-line); color: var(--accent); }
.fst-tool .ico svg { width: 22px; height: 22px; }
.fst-tool .t-eyebrow { font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.fst-tool .t-name { display: block; font-weight: 600; font-size: 16.5px; color: var(--ink); margin-top: 6px; line-height: 1.3; letter-spacing: -.01em; }
.fst-tool .t-desc { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.5; margin-top: 4px; }
.fst-tool .btn { text-decoration: none; }
.prose .fst-tool .btn.accent { color: var(--accent-ink); text-decoration: none; }
@media (max-width: 620px) { .fst-tool { grid-template-columns: auto minmax(0, 1fr); } .fst-tool .btn { grid-column: 1 / -1; } }

.fst-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-block: 1.4em; }
.prose .fst-tools .tool-link { text-decoration: none; color: var(--ink); }
.prose .fst-tools .tool-link span { color: var(--muted); }

/* CTA banner */
.fst-cta { position: relative; border-radius: 18px; padding: clamp(22px, 3vw, 32px); margin-block: 2em; background: var(--ink); color: var(--bg); overflow: hidden; }
.fst-cta::after { content: ""; position: absolute; right: 0; top: 0; width: 8px; height: 100%; background: var(--grad); }
.fst-cta .eyebrow { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.prose .fst-cta h3, .fst-cta h3 { color: var(--bg); font-size: 22px; margin: 10px 0 8px; }
.fst-cta p { color: color-mix(in srgb, var(--bg) 80%, transparent); font-size: 15.5px; max-width: 56ch; margin: 0; }
.fst-cta .btn { margin-top: 18px; background: var(--bg); color: var(--ink); border-color: var(--bg); }
.prose .fst-cta a.btn { color: var(--ink); text-decoration: none; }

/* callouts */
.fst-note { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); border-radius: 10px; padding: 14px 16px 14px 16px; font-size: 15.5px; line-height: 1.65; }
.fst-note > b:first-child { display: block; font: 500 11.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.fst-note.tip { border-left-color: var(--good); } .fst-note.tip > b:first-child { color: var(--good); }
.fst-note.warning { border-left-color: var(--warn); background: var(--warn-soft); } .fst-note.warning > b:first-child { color: var(--warn); }
.fst-note.key { border-left-color: var(--accent-2); background: var(--accent-soft); } .fst-note.key > b:first-child { color: var(--accent-2); }
.fst-note p + p, .fst-note ul { margin-top: .6em; }
.fst-note ul { margin-bottom: 0; }

/* APA report example */
.fst-report { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fst-report > b { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--sunken); font: 500 11.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.fst-report > b button { font: 500 12px var(--f-sans); letter-spacing: 0; text-transform: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 7px; padding: 4px 9px; cursor: pointer; }
.fst-report > div { padding: 14px 16px; font-size: 16px; color: var(--ink); font-family: "Times New Roman", Times, serif; line-height: 1.7; }

/* FAQ */
.fst-faq { display: grid; gap: 10px; margin-block: 1.2em; }
.fst-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fst-faq summary { cursor: pointer; padding: 15px 18px; font-weight: 600; color: var(--ink); font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center; line-height: 1.4; }
.fst-faq summary::-webkit-details-marker { display: none; }
.fst-faq summary::after { content: "+"; font: 500 20px var(--f-mono); color: var(--muted); flex: none; }
.fst-faq details[open] summary::after { content: "–"; }
.fst-faq .a { padding: 0 18px 16px; font-size: 16px; color: var(--ink-2); }
.fst-faq .a > * + * { margin-top: .7em; }

/* key takeaways */
.fst-takeaways { border-radius: 14px; border: 1px solid var(--line); padding: 18px 20px; background: var(--sunken); }
.fst-takeaways > b { display: block; font: 500 11.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.fst-takeaways ul { margin: 0; padding-left: 1.2em; }

/* end of article */
.tools-used { margin-top: 44px; }
.tools-used h2 { font-size: 20px; margin-bottom: 14px; }
.cite-box { margin-top: 36px; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--surface); }
.cite-box h2 { font-size: 18px; }
.cite-box p.muted { font-size: 14px; margin-top: 6px; }
.cite-box .cite-row { margin-top: 12px; display: grid; gap: 8px; }
.cite-box pre { margin: 0; background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: 13px/1.55 var(--f-mono); white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.cite-box .cite-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.author-box { margin-top: 28px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; border-top: 1px solid var(--line); padding-top: 28px; }
.author-box img, .author-box .avatar-ph { width: 64px; height: 64px; border-radius: 50%; font-size: 22px; }
.author-box h2 { font-size: 17px; }
.author-box p { color: var(--ink-2); font-size: 14.5px; margin-top: 6px; }
.author-box a.li { font-size: 13.5px; font-weight: 600; text-decoration: none; display: inline-block; margin-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.post-nav a { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.35; }
.post-nav a span { display: block; font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.post-nav a:hover { border-color: var(--line-2); }
.post-nav .next { text-align: right; grid-column: 2; }
.related-posts { border-top: 1px solid var(--line); padding-block: 48px 8px; margin-top: 32px; }
.updated-note { font-size: 13px; color: var(--muted); margin-top: 28px; }

/* ads */
.ad-slot { margin-block: 2em; min-height: 0; text-align: center; }
.ad-slot .ad-label { display: block; font: 500 10.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* comments */
.comments { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 32px; }
.comments h2 { font-size: 20px; margin-bottom: 18px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.comment-list .children { list-style: none; padding-left: 22px; margin-top: 14px; display: grid; gap: 14px; }
.comment-body { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); font-size: 15px; }
.comment-meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.comment-meta img { border-radius: 50%; }
.comment-author .fn { color: var(--ink); font-weight: 600; font-style: normal; }
.comment-meta a { color: var(--muted); text-decoration: none; }
.comment-content { margin-top: 8px; color: var(--ink-2); }
.reply a { font-size: 13px; text-decoration: none; }
.comment-respond { margin-top: 24px; }
.comment-form { display: grid; gap: 12px; }
.comment-form label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 4px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; font: 15px var(--f-sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.comment-form textarea:focus, .comment-form input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.comment-form .submit { font: 500 14px var(--f-sans); background: var(--ink); color: var(--bg); border: 1px solid var(--ink); border-radius: 9px; padding: 10px 16px; cursor: pointer; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.comment-form-cookies-consent label { font-weight: 400; }

/* page / 404 / empty */
.page-body { padding-block: 8px 48px; }
.page-body .prose { max-width: 760px; }
.empty { border: 1px dashed var(--line-2); border-radius: 14px; padding: 36px; text-align: center; color: var(--muted); }
.notfound { padding-block: 72px; text-align: center; }
.notfound h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -.035em; }
.notfound p { color: var(--ink-2); margin-top: 14px; }
.notfound .hero-search { margin-inline: auto; }

/* WordPress core alignment helpers */
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.sticky .card { border-color: var(--accent-line); }
.bypostauthor > .comment-body { border-color: var(--accent-line); }
.gallery-caption { font-size: 13px; }
.wp-block-button__link { background: var(--ink); color: var(--bg); border-radius: 9px; padding: 10px 16px; text-decoration: none; font-weight: 500; font-size: 15px; }
.prose .wp-block-button__link { color: var(--bg); text-decoration: none; }
@media print { .site-head, .site-foot, .article-aside, .ad-slot, .comments, .related-posts, .post-nav { display: none !important; } .article-layout { display: block; } }

/* 1.1.0: software citation (DOI) under the article citation */
.cite-box .cite-sub{font-size:15px;margin:18px 0 8px;letter-spacing:-.01em}
.fst-report small{display:block;margin-top:6px;color:var(--muted,#687083);font-size:12.5px}
