/*
Theme Name: Learning Point Hub
Theme URI: https://learningpointhub.com/
Author: Learning Point Hub
Description: Short reference cards that explain one blockchain concept each, plus a glossary A–Z. Educational only.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: learningpointhub
*/

:root {
  --indigo: #3b4cca;
  --indigo-2: #2f3db0;
  --indigo-soft: #eef0fb;
  --ink: #1c2240;
  --ink-2: #2b3256;
  --amber: #f2a33a;
  --amber-soft: #fff4e3;
  --bg: #f5f6fb;
  --card: #ffffff;
  --line: #e1e4f0;
  --text: #22284a;
  --muted: #5a6283;
  --rose: #d1495b;
  --rose-soft: #fdecef;
  --teal: #2a9d8f;
  --teal-soft: #e3f4f1;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 16px;
  --shadow: 0 1px 2px rgba(28,34,64,.05), 0 6px 18px rgba(28,34,64,.06);
  --cc-bg: #ffffff; --cc-fg: #22284a; --cc-btn-bg: #3b4cca; --cc-btn-fg: #ffffff; --cc-focus: #f2a33a; --cc-border: #e1e4f0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.62 var(--sans); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--sans); color: var(--ink); line-height: 1.22; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.85rem); font-weight: 800; margin: .25em 0 .4em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 750; margin: 1.5em 0 .5em; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 1.1em 0 .35em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--indigo-soft); color: var(--ink); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; word-break: break-word; }

.shell { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 800px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); font-size: .9rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--indigo)); margin-right: 8px; vertical-align: .05em; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(255,255,255,.9); }

/* шапка */
.site-header { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand:hover { color: var(--indigo); }
.brand .mark { border-radius: 10px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .94rem; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { background: var(--indigo-soft); color: var(--indigo); }
.menu-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font: 600 .95rem var(--sans); color: var(--ink); cursor: pointer; }

/* кнопки */
.btn { display: inline-block; background: var(--indigo); color: #fff; border: 2px solid var(--indigo); padding: 11px 20px; border-radius: 12px; text-decoration: none; cursor: pointer; font: 700 1rem var(--sans); }
.btn:hover { background: var(--indigo-2); border-color: var(--indigo-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.3em 0 1em; }

/* hero: фон из «точек» */
.hero { padding: 48px 0 40px; background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(59,76,202,.13) 1.4px, transparent 1.6px);
  background-size: 22px 22px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--indigo); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin: 0; }
.eyebrow a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
.lead { font-size: 1.12rem; color: var(--ink-2); }
.hero-note { font-size: .9rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; padding: 10px 14px; }
.hero-art { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); }
.hero-art img { border-radius: 16px; width: 100%; }
.stats { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stats li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-size: .9rem; color: var(--muted); }
.stats strong { color: var(--ink); font-size: 1.05rem; margin-right: 3px; }

/* секции */
.section { padding: 40px 0; }
.section-tint { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { margin-top: 0; }
.section-lead { color: var(--muted); max-width: 720px; }
.jump-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.chips a:hover { border-color: var(--indigo); background: var(--indigo-soft); color: var(--indigo); }
.chips-small { margin-top: 14px; }
.chips-small a { background: #fff; font-size: .86rem; }

.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.col-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 20px 16px; box-shadow: var(--shadow); border-top: 4px solid var(--dot); }
.col-card h3 { margin-top: 0; }
.col-card h3 a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
.col-card h3 a:hover { color: var(--indigo); }
.col-count { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .5em; display: flex; align-items: center; }
.col-terms { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.col-terms a { display: inline-block; font-size: .86rem; padding: 3px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.col-terms a:hover { color: var(--indigo); border-color: var(--indigo); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ctile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ctile-col { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .4em; display: flex; align-items: center; }
.ctile-title { margin: 0 0 .4em; font-size: 1.1rem; }
.ctile-title a { color: var(--ink); text-decoration: none; }
.ctile-title a:hover { color: var(--indigo); text-decoration: underline; }
.ctile-def { color: var(--muted); font-size: .93rem; flex: 1; }
.ctile-meta { font-size: .8rem; color: var(--muted); margin: 0; font-weight: 600; }

.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: none; }
.tile { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.tile svg { width: 44px; height: 44px; }
.tile-num { position: absolute; top: 14px; right: 16px; font-weight: 800; color: var(--amber); font-size: 1.3rem; }
.tile h3 { font-size: 1.04rem; }
.tile p { color: var(--muted); font-size: .93rem; margin: 0; }
.pair-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.pair-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.pair-card h3 { margin-top: 0; }
.pair-card h3 a { color: var(--ink); text-decoration: none; }
.pair-card h3 a:hover { color: var(--indigo); }
.pair-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 0; }
.faq details[open] summary { color: var(--indigo); }
.faq details p { margin: 0 0 14px; }
.contact-strip { background: var(--ink); color: #dfe3f5; border-radius: 20px; padding: 26px 28px; }
.contact-strip h2 { color: #fff; margin: 0 0 .35em; }
.contact-strip p { margin: 0; }
.contact-strip a { color: #fff; }

/* внутренние страницы */
.page-hero { padding: 26px 0 22px; background: #fff; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.crumbs ol { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .86rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #b8bed6; }
.crumbs a { color: var(--muted); }
.meta { color: var(--muted); font-size: .9rem; margin: 0; }
.prose { 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: .93rem; display: block; overflow-x: auto; background: #fff; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.prose th { background: var(--indigo-soft); color: var(--ink); }
.kv th { width: 34%; }
.note { background: var(--amber-soft); border: 1px solid #f6d29b; border-left: 4px solid var(--amber); padding: 12px 16px; border-radius: 10px; }

/* карточка понятия */
.concept > section { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 22px 8px; margin: 0 0 16px; }
.concept > section h2 { font-size: 1.25rem; margin: .9em 0 .5em; }
.defbox { background: var(--indigo); color: #fff; border-radius: var(--r); padding: 18px 22px; margin: 0 0 18px; position: relative; }
.defbox::before { content: ""; position: absolute; top: 18px; right: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); }
.defbox-label { text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; font-weight: 800; color: #ffd9a3; margin: 0 0 .3em; }
.defbox-text { font-size: 1.14rem; line-height: 1.5; margin: 0; font-weight: 500; }
.diagram { margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.diagram svg { width: 100%; height: auto; }
.diagram figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; }
.concept .example { background: var(--amber-soft); border-color: #f6d29b; }
.myth-wrong { background: var(--rose-soft); border-radius: 10px; padding: 10px 14px; }
.myth-right { background: var(--teal-soft); border-radius: 10px; padding: 10px 14px; }
.related { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.related li { margin: 0; }
.related a { display: flex; align-items: center; height: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; background: var(--bg); }
.related a:hover { border-color: var(--indigo); color: var(--indigo); }
.sources li { font-size: .93rem; overflow-wrap: anywhere; }
.card-disclaimer { font-size: .86rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.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: 700; text-decoration: none; }

/* подборки */
.card-list { list-style: none; padding: 0; }
.card-list li { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 20px 8px; margin-bottom: 12px; }
.card-list h3 a { color: var(--ink); text-decoration: none; }
.card-list h3 a:hover { color: var(--indigo); text-decoration: underline; }
.concepts-group { margin-bottom: 30px; }
.concepts-group h2 { display: flex; align-items: center; margin-top: .6em; }
.col-list { display: grid; gap: 18px; padding-bottom: 20px; }
.col-row { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--dot); border-radius: var(--r); padding: 18px 22px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.col-row h2 { margin: 0 0 .4em; }
.col-row h2 a { color: var(--ink); text-decoration: none; }
.col-row h2 a:hover { color: var(--indigo); }
.col-row p { color: var(--muted); }

/* глоссарий */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.az a { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 700; color: var(--ink); background: var(--bg); }
.az a:hover { border-color: var(--indigo); color: var(--indigo); }
.gfilter[hidden] { display: none; }
.gfilter { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gfilter label { font-weight: 700; color: var(--ink); }
.gfilter input { font: 1rem var(--sans); padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; width: 280px; max-width: 100%; }
.gfilter-count { font-size: .88rem; color: var(--muted); }
.letter { display: inline-grid; place-items: center; width: 44px; height: 44px; background: var(--ink); color: #fff; border-radius: 12px; font-size: 1.2rem; margin: 1em 0 .4em; }
.glossary { margin: 0; }
.glossary .gl-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; scroll-margin-top: 90px; }
.glossary .gl-item:target { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.glossary dt { font-weight: 800; color: var(--ink); }
.glossary dd { margin: .2em 0 0; }
.gl-card { display: inline-flex; align-items: center; font-size: .86rem; font-weight: 700; text-decoration: none; white-space: nowrap; }

/* часто путают */
.pair { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 6px 22px 10px; margin-bottom: 18px; scroll-margin-top: 90px; }
.pair h2 { font-size: 1.35rem; margin: .8em 0 .6em; }
.pair-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.pair-side { border-radius: 14px; padding: 4px 16px 6px; }
.pair-side h3 { margin-top: .7em; }
.pair-left { background: var(--indigo-soft); }
.pair-right { background: var(--amber-soft); }
.pair-vs { align-self: center; font-weight: 800; color: var(--muted); text-transform: uppercase; font-size: .85rem; }
.pair-short { margin: 14px 0 6px; }

/* подвал */
.site-footer { background: var(--ink); color: #c4c9e2; margin-top: 30px; padding: 30px 0 18px; font-size: .93rem; }
.site-footer a { color: #fff; }
.footer-disclaimer { border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 14px 18px; margin: 0 0 26px; background: rgba(255,255,255,.04); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
.brand-footer { color: #fff; margin-bottom: .6em; }
.brand-footer:hover { color: #fff; }
.footer-cols { display: flex; flex-direction: column; gap: 6px; }
.footer-cols a { text-decoration: none; display: inline-flex; align-items: center; }
.footer-cols a:hover { text-decoration: underline; }
.footer-cols .dot { box-shadow: none; }
.footer-title { color: #fff; font-weight: 800; margin-bottom: .3em; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid rgba(255,255,255,.14); margin-top: 24px; padding-top: 16px; }
.footer-legal a { text-decoration: none; font-weight: 600; }
.footer-legal a:hover { text-decoration: underline; }
.copyright { margin: 14px 0 0; font-size: .84rem; color: #9aa1c4; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 480px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .pair-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .col-row { grid-template-columns: 1fr; }
  .nav { display: none; position: absolute; left: -16px; right: -16px; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 6px 16px 12px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 11px 6px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: block; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .tiles, .footer-top, .related { grid-template-columns: 1fr; }
  .col-grid, .card-grid { grid-template-columns: 1fr; }
  .pair-cols { grid-template-columns: 1fr; }
  .pair-vs { justify-self: center; }
  .hero { padding-top: 30px; }
  .jump-box, .contact-strip { padding: 20px 18px; }
  .concept > section, .pair { padding-left: 16px; padding-right: 16px; }
  .defbox { padding: 16px 18px; }
  .btn { width: 100%; text-align: center; }
  .actions .btn { width: auto; flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
