/* WP Feint theme v2.7: guide pages (inc/page-toc.php, meta "layout": "toc"). Layout = the article grid of site.css
   (.article-layout + .article-aside, smart sticky sidebar of site.js); this file adds the collapsible TOC chevron, the
   hero and aside slots and the marketing components (.wpm-kpis, .wpm-flow, .wpm-sim, .wpm-audience, .wpm-dos,
   .wpm-video, .wpm-shot, .wpm-checks). Documented in DESIGN.md "Guide pages". */

/* ------------------------------------------------------------------ Layout */
.toc-layout { padding-top: 34px; }
.toc-lead { padding-bottom: 0; }
.toc-lead .entry-content > .wp-block-group { max-width: none; }
.toc-layout .entry-content > * { max-width: none; }
.toc-layout .entry-content > .alignwide, .toc-layout .entry-content > .alignfull { max-width: none; margin-left: 0; margin-right: 0; }
.toc-page summary::after { content: ""; width: 18px; height: 18px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231765f4' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat; transition: transform .2s ease; }
.toc-page details[open] > summary::after { transform: rotate(180deg); }

/* Grid components: no flow-layout margins between their items (WordPress adds margin-block-start to group children). */
:is(.wpm-audience, .wpm-dos, .wpm-hero-actions, .wpm-sim) > * { margin-block: 0; }

/* Hero slot (sub-hero, under the lead) */
.sub-hero-extra { margin-top: 22px; }
.sub-hero-extra > :last-child { margin-bottom: 0; }
.wpm-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.wpm-hero-actions > * { margin: 0; }
.wpm-hero-actions .btn { min-height: 46px; }
.wpm-hero-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 16px 0 0; padding: 0; color: var(--muted); font-size: .9rem; }
.wpm-hero-trust li { display: flex; align-items: center; gap: 7px; }
.wpm-hero-trust li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* Aside slot: call to action box under the table of contents */
.aside-slot > :first-child { margin-top: 0; }
.aside-slot > :last-child { margin-bottom: 0; }
.aside-slot p { margin: 0 0 12px; }
.aside-slot p:first-child { color: #fff; font-weight: 800; font-size: 1rem; margin-bottom: 6px; }
.aside-slot .btn { background: #fff; color: var(--blue-dark); border-color: #fff; padding: 9px 14px; font-size: .82rem; }
.aside-slot .btn:hover { background: #edf4ff; border-color: #edf4ff; }
.aside-slot .wpm-aff-cta { margin: 0; }

/* ------------------------------------------------------------------ Key figures */
.wpm-kpis { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.wpm-kpis li { margin: 0; border: 1px solid var(--edge); border-radius: 14px; background: #fff; padding: 16px 16px 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 4px; }
.wpm-kpis li:first-child { background: linear-gradient(135deg, #0a4fd0, #1765f4); border-color: transparent; color: #fff; }
.wpm-kpis strong { font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.1; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.wpm-kpis li:first-child strong { color: #fff; }
.wpm-kpis span { font-size: .84rem; line-height: 1.35; color: var(--muted); }
.wpm-kpis li:first-child span { color: #e6efff; }

/* ------------------------------------------------------------------ How it works: diagram + steps */
.wpm-flow { margin: 1.4rem 0 1.6rem; }
.wpm-flow-svg { display: block; width: 100%; height: auto; border: 1px solid var(--edge); border-radius: 16px; background: linear-gradient(135deg, #f7faff, #fff); }
.wpm-flow-svg.is-narrow { display: none; max-width: 420px; margin-inline: auto; }
.wpm-flow figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; }
.wpm-flow-steps { list-style: none; counter-reset: step; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.wpm-flow-steps li { counter-increment: step; margin: 0; border: 1px solid var(--edge); border-radius: 14px; padding: 16px; background: #fff; font-size: .9rem; color: #3a4d6c; }
.wpm-flow-steps li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #eef4ff; color: var(--blue); font-weight: 800; margin-bottom: 10px; }
.wpm-flow-steps strong { display: block; color: var(--ink); font-size: .98rem; margin-bottom: 4px; }

/* ------------------------------------------------------------------ Earnings simulator */
.wpm-sim { border: 1px solid var(--edge); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); padding: 22px; margin: 1.4rem 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.wpm-sim > p { grid-column: 1 / -1; margin: 0; }
.wpm-sim-rows { display: grid; gap: 10px; }
.wpm-sim-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; background: var(--light); }
.wpm-sim-row label { font-weight: 720; color: var(--ink); font-size: .93rem; line-height: 1.3; }
.wpm-sim-row label small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; }
.wpm-sim-row input { width: 100%; min-height: 44px; border: 1px solid #c9d6ee; border-radius: 9px; padding: 8px 10px; font: inherit; font-weight: 700; text-align: center; background: #fff; color: var(--ink); }
.wpm-sim-row input:focus-visible { outline: 3px solid rgba(23, 101, 244, .35); outline-offset: 1px; border-color: var(--blue); }
.wpm-sim-out { border-radius: 16px; background: linear-gradient(150deg, #102449, #1d3a72); color: #fff; padding: 20px; display: grid; gap: 14px; }
.wpm-sim-out div { display: grid; gap: 2px; }
.wpm-sim-out span { font-size: .82rem; color: #c7d6f5; }
.wpm-sim-out output { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.wpm-sim-out .is-year output { color: #8fe3bf; }
.wpm-sim-out p { margin: 0; font-size: .8rem; color: #c7d6f5; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 12px; }
.wpm-sim-note { font-size: .84rem; color: var(--muted); }

/* ------------------------------------------------------------------ Audience cards */
.wpm-audience { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 1.2rem 0 1.6rem; }
.wpm-audience > div { border: 1px solid var(--edge); border-radius: 16px; background: #fff; padding: 18px 18px 6px; }
.wpm-audience > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.wpm-audience h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 .5rem; font-size: 1.05rem; }
.wpm-audience h3 svg { width: 34px; height: 34px; flex: none; padding: 7px; border-radius: 10px; background: #eef4ff; color: var(--blue); }
.wpm-audience p { font-size: .92rem; color: #3a4d6c; margin: 0 0 12px; }
.wpm-audience p.wpm-idea { font-size: .86rem; background: var(--light); border-radius: 10px; padding: 9px 12px; }

/* ------------------------------------------------------------------ Screenshot, video */
.wpm-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow); }
.wpm-shot figcaption, .wpm-video figcaption { font-size: .86rem; color: var(--muted); margin-top: 10px; }
.wpm-video { margin: 1.6rem 0; }
.wpm-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 16px; background: #102449; border: 1px solid var(--edge); }
.wpm-video details { margin-top: 10px; border: 1px solid var(--edge); border-radius: 10px; padding: 10px 16px; background: #fff; }
.wpm-video details > summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--blue-dark); }
.wpm-video details p { font-size: .9rem; color: #3a4d6c; margin: 10px 0 4px; }

/* ------------------------------------------------------------------ Lists: checks, allowed / forbidden */
.wpm-checks, .entry-content .wpm-checks { list-style: none; padding: 0; display: grid; gap: 8px; }
.wpm-checks li { position: relative; padding-left: 30px; margin: 0; }
.wpm-checks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 6px; background: #e2f6ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7a52' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 13px no-repeat; }
.wpm-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 1.2rem 0; }
.wpm-dos > div { border-radius: 16px; padding: 18px 18px 8px; border: 1px solid #cdeedd; background: #f3fbf7; }
.wpm-dos > div + div { border-color: #f6d3cf; background: #fdf5f4; }
.wpm-dos p { margin: 0 0 10px; font-weight: 800; color: var(--green-text); }
.wpm-dos > div + div p { color: #a5281b; }
.wpm-dos ul { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; font-size: .92rem; }
.wpm-dos li { position: relative; padding-left: 26px; margin: 0; color: #3a4d6c; }
.wpm-dos li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat; }
.wpm-dos > div + div li::before { background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 1100px) {
	.wpm-flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wpm-sim { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.toc-layout { padding-top: 22px; }
	.wpm-flow-svg.is-wide { display: none; }
	.wpm-flow-svg.is-narrow { display: block; }
	.wpm-flow-steps, .wpm-audience, .wpm-dos { grid-template-columns: 1fr; }
	.wpm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wpm-kpis li:first-child { grid-column: 1 / -1; }
	.wpm-sim { padding: 16px; }
	.wpm-hero-actions .btn { width: 100%; justify-content: center; }
	.wpm-hero-actions > * { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.toc-page summary::after { transition: none; }
}
