/* =========================================================================
   STEP-BY-STEP TUTORIALS (instant-payment-gateway/<platform>/, crypto-payment-gateway-no-kyc-instant-payouts/<platform>/)
   Builds on style.css tokens.
   ========================================================================= */
.tut-hero .pg-container { max-width: var(--maxw); }
.tut-hero { text-align: center; }
.tut-hero h1 { max-width: 900px; margin: 0 auto; }
.tut-lead { max-width: 760px; margin: 16px auto 0; font-size: 1.12rem; color: var(--text-soft); }
.tut-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.tut-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: .86rem; font-weight: 600; color: var(--text); }
.tut-hero .pg-hero-actions { margin-top: 26px; justify-content: center; }
.tut-hero .pg-btn svg { width: 18px; height: 18px; flex: none; }
.tut-updated { margin: 14px 0 0; font-size: .82rem; color: var(--muted); }

.tut-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
@media (min-width: 1080px) { .tut-layout { grid-template-columns: 240px minmax(0, 1fr); } }

/* table of contents */
.tut-toc { font-size: .9rem; }
.tut-toc details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); padding: 4px 16px; }
.tut-toc summary { cursor: pointer; font-weight: 800; color: var(--text); padding: 10px 0; list-style: none; }
.tut-toc summary::-webkit-details-marker { display: none; }
.tut-toc summary::after { content: "+"; float: right; color: var(--muted); font-weight: 700; }
.tut-toc details[open] summary::after { content: "\2212"; }
.tut-toc ol { list-style: none; margin: 0 0 12px; padding: 0; counter-reset: toc; }
.tut-toc li { margin: 0; }
.tut-toc a { display: block; padding: 6px 10px; border-left: 2px solid transparent; color: var(--text-soft); font-weight: 600; line-height: 1.35; border-radius: 0 8px 8px 0; }
.tut-toc a:hover { color: var(--primary); background: #fff; }
.tut-toc a.is-active { color: var(--primary); border-left-color: var(--primary); background: #fff; }
@media (min-width: 1080px) {
  .tut-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; }
  .tut-toc details { background: transparent; border: 0; padding: 0; }
  .tut-toc summary { pointer-events: none; padding-top: 0; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .tut-toc summary::after, .tut-toc details[open] summary::after { content: none; }
}

/* article */
.tut-article { max-width: 820px; min-width: 0; }
.tut-article > section { scroll-margin-top: 96px; }
.tut-article h2 { margin: 2.4em 0 .6em; scroll-margin-top: 96px; }
.tut-article > section:first-child h2, .tut-article > .tut-glance:first-child { margin-top: 0; }
.tut-article h3 { margin: 1.6em 0 .5em; }
.tut-article ul, .tut-article ol { color: var(--text-soft); padding-left: 1.3em; margin: 0 0 1.1em; }
.tut-article li { margin-bottom: .45em; }
.tut-article code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--bg-softer); color: var(--text); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.tut-article kbd { font-family: inherit; font-size: .85em; font-weight: 700; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.tut-path { font-weight: 700; color: var(--text); }

/* at a glance */
.tut-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 8px; }
.tut-glance div { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.tut-glance b { display: block; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.tut-glance span { color: var(--text); font-weight: 700; line-height: 1.35; display: block; }

/* callouts */
.tut-note { position: relative; border-radius: var(--radius); padding: 16px 18px 16px 54px; margin: 18px 0 22px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-soft); }
.tut-note > :last-child { margin-bottom: 0; }
.tut-note::before { position: absolute; left: 18px; top: 15px; font-size: 1.15rem; line-height: 1.3; }
.tut-note p { color: inherit; }
.tut-note strong { color: var(--text); }
.tut-tip { background: #effcf8; border-color: #c4efe2; }
.tut-tip::before { content: "\1F4A1"; }
.tut-warn { background: #fff8eb; border-color: #f6dfb2; }
.tut-warn::before { content: "\26A0\FE0F"; }
.tut-info::before { content: "\2139\FE0F"; }
.tut-ok { background: #effcf8; border-color: #c4efe2; }
.tut-ok::before { content: "\2705"; }

/* the "only gateway" banner (crypto) and the crypto pointer (card) */
.tut-banner { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; border-radius: var(--radius-lg); padding: 20px 22px; margin: 26px 0 8px; color: #fff; background: radial-gradient(600px 200px at 100% 0%, rgba(0,212,177,.35), transparent 60%), linear-gradient(135deg, #0a2540 0%, #2b2a6b 55%, #635bff 100%); box-shadow: var(--shadow); }
.tut-banner p { margin: 0; color: rgba(255,255,255,.88); }
.tut-banner strong { color: #fff; }
.tut-banner .tut-banner-title { font-size: 1.12rem; font-weight: 800; color: #fff; margin-bottom: 4px; line-height: 1.35; }
.tut-banner-coins { display: flex; }
.tut-banner-coins img { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid #fff; margin-left: -10px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.tut-banner-coins img:first-child { margin-left: 0; }
@media (max-width: 560px) { .tut-banner { grid-template-columns: 1fr; } }
.tut-pointer { display: flex; gap: 14px; align-items: center; border: 1px dashed #c9c6ff; background: var(--primary-soft); border-radius: var(--radius); padding: 14px 18px; margin: 22px 0 6px; color: var(--text-soft); }
.tut-pointer p { margin: 0; color: inherit; }
.tut-pointer .tut-pointer-ico { font-size: 1.4rem; }

/* steps */
.tut-steps { counter-reset: step; }
.tut-step { position: relative; padding-left: 62px; margin: 0 0 8px; }
.tut-step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 2.35em; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--primary); box-shadow: 0 6px 18px rgba(99,91,255,.35); }
.tut-step::after { content: ""; position: absolute; left: 20px; top: calc(2.35em + 50px); bottom: -10px; width: 2px; background: linear-gradient(var(--border-strong), transparent); }
.tut-step:last-child::after { display: none; }
.tut-step > h2 { margin-top: 2em; }
@media (max-width: 640px) {
  .tut-step { padding-left: 0; }
  .tut-step::before { position: static; display: inline-grid; width: 34px; height: 34px; margin: 1.6em 0 -0.4em; font-size: .95rem; }
  .tut-step::after { display: none; }
  .tut-step > h2 { margin-top: .6em; }
}

/* screenshots */
.tut-shot { margin: 18px 0 26px; }
.tut-shot a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #fff; transition: box-shadow .15s, transform .15s; cursor: zoom-in; }
.tut-shot a:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.tut-shot img { display: block; width: 100%; height: auto; border-radius: 0; }
.tut-shot.narrow a { max-width: 560px; }
.tut-shot.small a { max-width: 360px; }
.tut-shot figcaption { margin-top: 10px; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.tut-figure-label { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 2px 8px; margin-right: 6px; }

/* code blocks */
.tut-code { position: relative; margin: 14px 0 22px; }
.tut-code pre { margin: 0; background: #0b1b30; color: #e6edf6; border-radius: 12px; padding: 18px 20px; overflow-x: auto; font-size: .86rem; line-height: 1.7; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tut-code pre { padding-top: 46px; }
.tut-code pre code { background: none; color: inherit; padding: 0; border-radius: 0; font-size: inherit; overflow-wrap: normal; }
.tut-code pre .c { color: #8aa0bb; }
.tut-copy { position: absolute; top: 10px; right: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: 600 .78rem/1 var(--font); padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.tut-copy:hover { background: rgba(255,255,255,.18); }

/* tables */
.tut-table-wrap { overflow-x: auto; margin: 14px 0 24px; border: 1px solid var(--border); border-radius: var(--radius); }
.tut-table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 540px; }
.tut-table th, .tut-table td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
.tut-table th { background: var(--bg-soft); color: var(--text); font-weight: 800; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.tut-table tr:last-child td { border-bottom: 0; }
.tut-table td:first-child { font-weight: 700; color: var(--text); width: 38%; }
.tut-table td.wrap { white-space: normal; }
.tut-badge { display: inline-block; font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--bg-softer); color: var(--text); white-space: nowrap; }
.tut-badge.req { background: #ffecec; color: #b42318; }
.tut-badge.rec { background: #e6faf6; color: #0f7a66; }

/* requirement checklist */
.tut-checklist { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.tut-checklist li { position: relative; padding: 12px 14px 12px 44px; background: #fff; border: 1px solid var(--border); border-radius: 12px; margin: 0 !important; }
.tut-checklist li::before { content: "\2713"; position: absolute; left: 14px; top: 11px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .8rem; display: grid; place-items: center; }

/* file tree (WHMCS upload diagram) */
.tut-tree { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin: 18px 0 24px; }
.tut-tree-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.tut-tree-box b { display: block; font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tut-tree-box pre { margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; font: .82rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); white-space: pre; overflow-x: auto; }
.tut-tree-box pre em { font-style: normal; color: var(--primary); font-weight: 700; }
.tut-tree-box pre i { font-style: normal; color: var(--muted); }
.tut-tree-arrow { font-size: 1.6rem; color: var(--primary); font-weight: 800; }
@media (max-width: 760px) { .tut-tree { grid-template-columns: 1fr; } .tut-tree-arrow { transform: rotate(90deg); justify-self: center; } }

/* settings panel illustration (used where a live screenshot is not available) */
.tut-mock { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 16px 0 24px; box-shadow: var(--shadow-sm); background: #fff; }
.tut-mock-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #1a3a5c; color: #fff; padding: 11px 16px; font-weight: 700; font-size: .92rem; }
.tut-mock-head span { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(255,255,255,.16); padding: 3px 8px; border-radius: 6px; }
.tut-mock-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--border); align-items: start; font-size: .9rem; }
.tut-mock-row:first-of-type { border-top: 0; }
.tut-mock-row > b { color: var(--text); padding-top: 6px; }
.tut-mock-field { border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 10px; color: var(--text); background: #fff; min-height: 34px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; overflow-wrap: anywhere; }
.tut-mock-field.empty { color: var(--muted); font-family: var(--font); font-style: italic; }
.tut-mock-row small { display: block; margin-top: 5px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.tut-mock-row.hl .tut-mock-field { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99,91,255,.15); }
.tut-mock-cap { margin: -12px 0 22px; font-size: .88rem; color: var(--muted); }
@media (max-width: 640px) { .tut-mock-row { grid-template-columns: 1fr; gap: 4px; } .tut-mock-row > b { padding-top: 0; } }

/* FAQ */
.tut-faq details { border: 1px solid var(--border); border-radius: 12px; background: #fff; margin: 0 0 10px; }
.tut-faq summary { cursor: pointer; padding: 15px 48px 15px 18px; font-weight: 700; color: var(--text); list-style: none; position: relative; }
.tut-faq summary::-webkit-details-marker { display: none; }
.tut-faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 1.3rem; color: var(--primary); font-weight: 600; }
.tut-faq details[open] summary::after { content: "\2212"; }
.tut-faq details > div { padding: 0 18px 14px; }
.tut-faq details > div > :last-child { margin-bottom: 0; }

/* related cards */
.tut-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 0; }
.tut-cards a { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .15s, border-color .15s; }
.tut-cards a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #dfe3ff; }
.tut-cards b { display: block; font-size: 1rem; margin-bottom: 4px; }
.tut-cards span { display: block; font-size: .88rem; color: var(--text-soft); line-height: 1.45; }

/* platform switcher */
.tut-platforms { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.tut-platforms a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-weight: 700; font-size: .88rem; color: var(--text); }
.tut-platforms a:hover { border-color: var(--primary); color: var(--primary); }
.tut-platforms a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* help footer */
.tut-help { margin: 44px 0 0; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.tut-help p { margin: 0; color: var(--text); font-weight: 700; }
.tut-help span { display: block; font-weight: 500; color: var(--text-soft); font-size: .93rem; }

/* main-page entry points to the tutorials */
.tut-entry { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0 6px; }
.tut-entry a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; font-weight: 700; font-size: .9rem; color: var(--text); text-align: center; }
.tut-entry a:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); }
.tut-entry small { font-weight: 600; color: var(--muted); font-size: .76rem; }
.tut-guide-link { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 14px; padding: 10px 16px; border-radius: 10px; background: var(--primary-soft); color: var(--primary) !important; font-weight: 700; border: 1px solid #dcd9ff; }
.tut-guide-link:hover { background: #e3e0ff; }
