/*
Theme Name: Open Learning Path
Theme URI: https://openlearningpath.com/
Author: Open Learning Path
Description: A free, step-by-step blockchain course for beginners. Educational only.
Version: 1.0.2
Requires PHP: 7.4
Text Domain: openlearningpath
*/

:root {
  --green: #007952;
  --green-2: #00663f;
  --soft: #61bd9a;
  --mint: #e6f2ee;
  --mint-2: #f3f9f6;
  --navy: #0c2340;
  --navy-2: #1e4269;
  --slate: #4b6887;
  --sky: #c7e4f1;
  --paper: #ffffff;
  --line: #d7e3dd;
  --text: #1b2a3a;
  --muted: #56677a;
  --red: #b3261e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --cc-bg: #ffffff; --cc-fg: #1b2a3a; --cc-btn-bg: #0c2340; --cc-btn-fg: #ffffff; --cc-focus: #007952;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 17px/1.65 var(--sans); overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin: .2em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.22rem; margin: 1.2em 0 .4em; }
p { margin: 0 0 1em; }

.shell { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); font-size: .92rem; }

/* шапка */
.topstrip { background: var(--navy); color: #dbe7f2; font-size: .82rem; text-align: center; padding: 6px 16px; }
.site-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; backdrop-filter: blur(6px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--green); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font: 600 .95rem var(--sans); color: var(--navy); cursor: pointer; }

/* кнопки */
.btn { display: inline-block; background: var(--green); color: #fff; border: 2px solid var(--green); padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; cursor: pointer; font: 700 1rem var(--sans); }
.btn:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* hero с акварельными углами */
.hero { position: relative; overflow: hidden; padding: 56px 0 28px;
  background:
    radial-gradient(420px 300px at -60px -40px, rgba(97,189,154,.35), transparent 70%),
    radial-gradient(360px 260px at 105% 0%, rgba(199,228,241,.75), transparent 70%),
    radial-gradient(520px 340px at 100% 110%, rgba(230,242,238,.95), transparent 70%),
    var(--paper); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--green); margin: 0; }
.lead { font-size: 1.15rem; color: #2c3e52; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0 1em; }
.hero-note { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--soft); padding-left: 12px; }
.hero-art img { border-radius: 22px; box-shadow: 0 20px 50px rgba(12,35,64,.12); }
.facts { list-style: none; padding: 0; margin: 34px 0 6px; display: flex; flex-wrap: wrap; gap: 10px 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.facts li { color: var(--muted); }
.facts strong { font-family: var(--serif); font-size: 1.5rem; color: var(--navy); margin-right: 4px; }
.asof { font-size: .8rem; color: var(--muted); }

/* секции */
.section { padding: 34px 0 30px; }
.section-tint { background: var(--mint-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { margin-top: .4em; }
.section-lead { color: var(--muted); max-width: 720px; }
.stages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }
.stages li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 12px; position: relative; }
.stage-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--mint); border: 2px solid var(--green); font-family: var(--serif); font-weight: 700; color: var(--navy); }
.stages h3 { margin-top: .6em; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.module-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; border-top: 4px solid var(--green); }
.module-card h3 { margin-top: .2em; }
.module-card h3 a { color: var(--navy); text-decoration: none; }
.module-card h3 a:hover { color: var(--green); }
.module-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.module-num { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--green); font-weight: 700; margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.tile svg { width: 44px; height: 44px; }
.tile h3 { font-size: 1.08rem; }
.tile p { color: var(--muted); font-size: .95rem; margin: 0; }
.callout { display: flex; gap: 24px; align-items: center; justify-content: space-between; background: var(--navy); color: #e8f0f7; border-radius: 20px; padding: 28px 30px; margin: 30px 0; }
.callout h2 { color: #fff; margin: 0 0 .3em; }
.callout p { margin: 0; }
.callout .btn { white-space: normal; flex-shrink: 0; max-width: 360px; text-align: center; }
.two-col { display: grid; grid-template-columns: 1.3fr .7fr; gap: 34px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-top: 0; }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 32px; position: relative; margin-bottom: .7em; }
.checks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10l3 3 7-7' stroke='white' stroke-width='2.5' fill='none'/%3E%3C/svg%3E") center/16px no-repeat; }
.flags { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.flag { border-left: 4px solid var(--red); background: #fff7f6; border-radius: 0 12px 12px 0; padding: 14px 16px; }
.flag h3 { font-size: 1.02rem; margin: 0 0 .3em; color: #6d1912; }
.flag p { margin: 0; font-size: .93rem; color: #4a2a27; }
.terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 18px; }
.terms div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.terms dt { font-family: var(--serif); font-weight: 700; color: var(--navy); }
.terms dd { margin: .3em 0 0; color: var(--muted); font-size: .93rem; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 14px 0; list-style-position: outside; }
.faq details[open] summary { color: var(--green); }
.faq details p { margin: 0 0 14px; }

/* внутренние страницы */
.page-hero { padding: 26px 0 8px;
  background: radial-gradient(380px 240px at 100% 0%, rgba(199,228,241,.6), transparent 70%), radial-gradient(320px 220px at 0% 100%, rgba(230,242,238,.9), transparent 70%); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.crumbs ol { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .86rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: #9aa7b8; }
.crumbs a { color: var(--slate); }
.meta { color: var(--muted); font-size: .92rem; }
.prose { max-width: 760px; padding-bottom: 20px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: .45em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .94rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.prose th { background: var(--mint); color: var(--navy); }
.kv th { width: 34%; }
.note { background: var(--mint); border-left: 4px solid var(--green); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.goals { background: var(--mint-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px 6px; margin-bottom: 18px; }
.goals-title { font-weight: 700; color: var(--navy); margin-bottom: .4em; }
.diagram { margin: 18px 0 24px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.diagram svg { width: 100%; height: auto; }
.diagram figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; }
.takeaways { background: var(--navy); color: #e8f0f7; border-radius: var(--radius); padding: 6px 22px 10px; margin: 26px 0; }
.takeaways h2 { color: #fff; margin-top: .7em; }
.sources li { font-size: .95rem; }
.lesson-disclaimer { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.done-row { margin-top: 20px; }
.btn.is-done { background: var(--green); color: #fff; border-color: var(--green); }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 18px 0 30px; }
.pager a { font-weight: 600; text-decoration: none; }

/* курс */
.path { list-style: none; padding: 0; margin: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 30px; border-left: 3px dashed var(--soft); }
.path-module { position: relative; padding: 0 0 22px; }
.path-head { display: flex; gap: 18px; align-items: flex-start; }
.path-dot { flex-shrink: 0; position: relative; z-index: 1; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; background: #fff; border: 3px solid var(--green); font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--navy); }
.path-head h2 { margin: .1em 0 .3em; font-size: 1.45rem; }
.path-head h2 a { color: var(--navy); text-decoration: none; }
.path-head h2 a:hover { color: var(--green); }
.lesson-list { list-style: none; padding: 0; margin: 4px 0 0 63px; }
.lesson-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; background: #fff; }
.lesson-list li.done, .lesson-cards li.done { border-color: var(--soft); background: var(--mint-2); }
.lesson-list li.done a::after, .lesson-cards li.done h3 a::after { content: " ✓"; color: var(--green); }
.lnum { font-family: var(--serif); font-weight: 700; color: var(--green); margin-right: 4px; }
.lesson-cards { list-style: none; padding: 0; }
.lesson-cards li { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 6px; margin-bottom: 14px; }
.progress-line { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; display: inline-block; }

/* глоссарий */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.az a { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 700; color: var(--navy); background: #fff; }
.letter { border-bottom: 2px solid var(--mint); padding-bottom: 4px; }
.glossary div { padding: 10px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.glossary dt { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1.08rem; }
.glossary dd { margin: .2em 0 0; }

/* квиз */
.quiz .q { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 14px; }
.quiz legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.quiz label { display: block; padding: 6px 4px; cursor: pointer; }
.quiz .q.ok { border-color: var(--green); background: var(--mint-2); }
.quiz .q.bad { border-color: #e2a29c; background: #fff7f6; }
.quiz .explain { font-size: .93rem; color: var(--muted); margin: 6px 0 0; }
.quiz-result { font-weight: 700; color: var(--navy); font-size: 1.1rem; }
.quiz-actions .btn { margin: 0 8px 8px 0; }

/* подвал */
.site-footer { background: var(--navy); color: #c9d6e3; margin-top: 30px; padding: 30px 0 18px; font-size: .93rem; }
.site-footer a { color: #e8f0f7; }
.footer-disclaimer { border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; background: rgba(255,255,255,.04); }
.footer-disclaimer p { margin: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer-title { font-family: var(--serif); color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: .5em; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copyright { border-top: 1px solid rgba(255,255,255,.14); margin-top: 22px; padding-top: 14px; font-size: .84rem; color: #9fb3c8; }

@media (max-width: 960px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; }
  .module-grid, .terms { grid-template-columns: repeat(2, 1fr); }
  .tiles, .flags { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 6px 16px 12px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: block; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .stages, .module-grid, .tiles, .flags, .terms, .footer-grid { grid-template-columns: 1fr; }
  .callout { flex-direction: column; align-items: flex-start; padding: 22px; }
  .lesson-list { margin-left: 0; }
  .path::before { display: none; }
  .hero { padding-top: 34px; }
  .facts { gap: 8px 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
