/*
Theme Name: Evergreen Study
Theme URI: https://evergreenstudy.com/
Author: Evergreen Study
Description: Plain-English guides to spotting crypto scams and protecting keys and accounts, with printable checklists. Educational only.
Version: 1.0.1
Requires PHP: 7.4
Text Domain: evergreenstudy
*/

:root {
  --sand: #F3EFE6;
  --sand-2: #EAE3D4;
  --sand-line: #DDD4C2;
  --panel: #FFFFFF;
  --green: #2F6B4F;
  --green-2: #255940;
  --green-soft: #E4EEE8;
  --forest: #1E3A2F;
  --text: #2C3A36;
  --muted: #5A6763;
  --amber: #C9822B;
  --amber-soft: #F7EBDA;
  --brick: #A4473A;
  --brick-soft: #F4E3DF;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30,58,47,.06), 0 6px 20px rgba(30,58,47,.06);
  --cc-bg: #ffffff; --cc-fg: #2C3A36; --cc-btn-bg: #1E3A2F; --cc-btn-fg: #ffffff; --cc-focus: #2F6B4F;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--sand); color: var(--text); font: 17px/1.68 var(--font); overflow-x: hidden; overflow-wrap: break-word; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font); color: var(--forest); line-height: 1.22; font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: clamp(1.95rem, 4.4vw, 2.9rem); margin: .25em 0 .4em; }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.85rem); margin: 1.6em 0 .55em; }
h3 { font-size: 1.16rem; margin: 1.25em 0 .4em; }
p { margin: 0 0 1em; }
.shell { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--forest); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); font-size: .9rem; }

/* полоса-обещание и шапка */
.notice-bar { background: var(--forest); color: #EDE7DA; font-size: .84rem; text-align: center; padding: 7px 16px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.notice-shield svg { width: 16px; height: 16px; }
.site-header { background: rgba(243,239,230,.97); border-bottom: 1px solid var(--sand-line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); font-weight: 600; font-size: 1.18rem; }
.brand img, .brand-mark svg { width: 38px; height: 38px; border-radius: 10px; }
.nav { display: flex; gap: 6px; }
.nav a { color: var(--forest); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--green-soft); color: var(--green); }
.menu-toggle { display: none; background: var(--panel); border: 1px solid var(--sand-line); border-radius: 999px; padding: 8px 16px; font: 600 .95rem var(--font); color: var(--forest); cursor: pointer; }

/* кнопки */
.btn { display: inline-block; background: var(--green); color: #fff; border: 2px solid var(--green); padding: 11px 22px; border-radius: 12px; text-decoration: none; cursor: pointer; font: 600 1rem/1.3 var(--font); text-align: center; }
.btn:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.btn-ghost { background: var(--panel); color: var(--forest); border-color: var(--forest); }
.btn-ghost:hover { background: var(--forest); color: #fff; border-color: var(--forest); }
.btn-warm { background: var(--forest); border-color: var(--forest); }

/* hero */
.hero { padding: 48px 0 34px; background: linear-gradient(180deg, var(--sand) 0%, var(--sand-2) 100%); border-bottom: 1px solid var(--sand-line); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .07em; font-size: .78rem; font-weight: 700; color: var(--green); margin: 0; }
.lead { font-size: 1.12rem; color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.3em 0 1em; }
.hero-note { font-size: .9rem; color: var(--muted); background: var(--panel); border-radius: var(--radius-sm); padding: 10px 14px; border-left: 4px solid var(--amber); }
.hero-art img { border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-art svg { max-width: 420px; margin: 0 auto; }

/* секции главной */
.section { padding: 40px 0 34px; }
.section-panel { background: var(--panel); border-top: 1px solid var(--sand-line); border-bottom: 1px solid var(--sand-line); }
.section h2 { margin-top: .2em; }
.section-lead { color: var(--muted); max-width: 720px; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rule { background: var(--panel); border-radius: var(--radius); padding: 22px 22px 14px; box-shadow: var(--shadow); position: relative; }
.rule-icon svg { width: 48px; height: 48px; }
.rule-num { position: absolute; top: 18px; right: 20px; font-size: 2rem; font-weight: 700; color: var(--sand-line); }
.rule h3 { margin-top: .6em; }
.rule p { color: var(--muted); font-size: .96rem; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-card { background: var(--sand); border-radius: var(--radius); padding: 18px 20px 6px; border: 1px solid var(--sand-line); }
.section-panel .guide-card { background: var(--sand); }
.guide-group .guide-card { background: var(--panel); }
.guide-card h3 { margin-top: .3em; font-size: 1.08rem; }
.guide-card h3 a { color: var(--forest); text-decoration: none; }
.guide-card h3 a:hover { color: var(--green); text-decoration: underline; }
.guide-card p { font-size: .94rem; color: var(--muted); }
.card-tag { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--green); margin: 0; }
.card-icon svg { width: 40px; height: 40px; }
.selftest { background: var(--forest); color: #EDE7DA; border-radius: var(--radius); padding: 28px 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 34px; align-items: start; }
.selftest h2 { color: #fff; }
.self-list { margin: 0; padding-left: 22px; }
.self-list li { margin-bottom: .55em; }
.self-list li::marker { color: var(--amber); font-weight: 700; }
.selftest-cta { grid-column: 1 / -1; margin: 6px 0 0; }
.selftest .btn { background: var(--sand); color: var(--forest); border-color: var(--sand); }
.selftest .btn:hover { background: #fff; border-color: #fff; color: var(--forest); }
.list-strip { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.list-strip a { display: flex; align-items: center; gap: 10px; background: var(--sand); border: 1px solid var(--sand-line); border-radius: var(--radius-sm); padding: 12px 14px; text-decoration: none; color: var(--forest); font-weight: 600; font-size: .95rem; height: 100%; }
.list-strip a:hover { border-color: var(--green); background: var(--green-soft); }
.strip-icon svg { width: 34px; height: 34px; flex-shrink: 0; }
.happened { background: var(--panel); border-radius: var(--radius); padding: 26px 28px 10px; border-left: 6px solid var(--brick); box-shadow: var(--shadow); }
.happened h2 { color: var(--brick); }
.happened ol { padding-left: 22px; }
.contact-strip { display: flex; gap: 18px; align-items: flex-start; background: var(--green-soft); border-radius: var(--radius); padding: 22px 24px 8px; }
.contact-strip .strip-icon svg { width: 46px; height: 46px; }
.contact-strip h2 { margin-top: 0; }
.faq details { background: var(--sand); border: 1px solid var(--sand-line); border-radius: var(--radius-sm); padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--forest); padding: 14px 0; }
.faq details[open] summary { color: var(--green); }
.faq details p { margin: 0 0 14px; }

/* внутренние страницы */
.page-hero { padding: 26px 0 10px; border-bottom: 1px solid var(--sand-line); margin-bottom: 22px; background: var(--sand-2); }
.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: var(--muted); }
.crumbs a { color: var(--green); }
.meta { color: var(--muted); font-size: .92rem; }
.prose { padding-bottom: 20px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: .45em; }
.prose table, .guide table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .94rem; background: var(--panel); display: block; overflow-x: auto; border-radius: var(--radius-sm); }
.prose th, .prose td { border: 1px solid var(--sand-line); padding: 9px 11px; text-align: left; vertical-align: top; }
.prose th { background: var(--green-soft); color: var(--forest); }
.prose table.flag-table th { background: var(--brick-soft); color: #6E2A20; }
.prose table.flag-table td:first-child { font-weight: 600; border-left: 4px solid var(--brick); }
.prose table.dodont th:first-child { background: var(--green-soft); }
.prose table.dodont th:last-child { background: var(--brick-soft); color: #6E2A20; }
.kv th { width: 34%; }
.note { background: var(--green-soft); border-left: 4px solid var(--green); padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 0 0 1em; }
.note p:last-child { margin-bottom: 0; }
.note-alert { background: var(--brick-soft); border-left-color: var(--brick); }
.in-short { background: var(--panel); border-radius: var(--radius); padding: 16px 20px 6px; margin-bottom: 20px; box-shadow: var(--shadow); border-top: 4px solid var(--green); }
.box-title { font-weight: 700; color: var(--forest); margin-bottom: .4em; display: flex; align-items: center; gap: 8px; }
.box-icon svg { width: 30px; height: 30px; flex-shrink: 0; }
.happened-box { background: var(--brick-soft); border-radius: var(--radius); padding: 4px 22px 8px; margin: 26px 0; border-left: 6px solid var(--brick); }
.happened-box h2 { color: #6E2A20; margin-top: .7em; }
.checklist-link { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px dashed var(--green); border-radius: var(--radius); padding: 16px 18px 4px; margin: 24px 0; }
.checklist-link .box-title { margin-bottom: .2em; }
.sources li { font-size: .95rem; }
.guide-disclaimer { font-size: .87rem; color: var(--muted); border-top: 1px solid var(--sand-line); padding-top: 12px; }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--sand-line); padding: 18px 0 30px; }
.pager a { font-weight: 600; text-decoration: none; }
.guide-group { margin-bottom: 26px; }
.guide-group h2 { margin-top: .6em; }

/* чек-листы */
.list-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }
.list-card { background: var(--panel); border-radius: var(--radius); padding: 18px 20px 6px; box-shadow: var(--shadow); }
.list-card h3 { margin-top: .4em; }
.list-card h3 a { color: var(--forest); text-decoration: none; }
.list-card h3 a:hover { color: var(--green); text-decoration: underline; }
.checklist-sheet { background: var(--panel); border-radius: var(--radius); padding: 24px 28px 12px; box-shadow: var(--shadow); }
.print-head { display: none; }
.sheet-head { display: flex; gap: 16px; align-items: flex-start; }
.sheet-icon svg { width: 56px; height: 56px; flex-shrink: 0; }
.sheet-head h1 { margin-top: 0; }
.print-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.check-items { list-style: none; counter-reset: ck; padding: 0; margin: 18px 0; }
.check-items li { counter-increment: ck; position: relative; padding: 10px 0 10px 76px; border-bottom: 1px solid var(--sand-line); min-height: 44px; }
.check-items li::before { content: counter(ck) "."; position: absolute; left: 0; top: 10px; width: 30px; text-align: right; font-weight: 700; color: var(--green); }
.check-items li::after { content: ""; position: absolute; left: 42px; top: 12px; width: 22px; height: 22px; border: 2px solid var(--forest); border-radius: 5px; background: #fff; }
.sheet-foot { font-weight: 600; color: var(--forest); }
.sheet-small { font-size: .84rem; color: var(--muted); }

/* квиз */
.quiz .q { background: var(--panel); border: 1px solid var(--sand-line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 14px; }
.quiz legend { font-weight: 600; color: var(--forest); padding: 0 6px; }
.qnum { color: var(--green); font-weight: 700; }
.q-options { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.q-options label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--sand-line); border-radius: 999px; cursor: pointer; background: var(--sand); }
.quiz .q.ok { border-color: var(--green); background: var(--green-soft); }
.quiz .q.bad { border-color: var(--brick); background: var(--brick-soft); }
.quiz .explain { font-size: .94rem; color: var(--text); margin: 10px 0 0; }
.quiz-result { font-weight: 600; color: var(--forest); font-size: 1.08rem; }
.quiz-actions .btn { margin: 0 8px 8px 0; }

/* подвал */
.site-footer { background: var(--forest); color: #D5DDD8; margin-top: 36px; padding: 32px 0 18px; font-size: .93rem; }
.site-footer a { color: #F3EFE6; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; margin-bottom: 20px; }
.footer-brand { color: #fff; font-weight: 600; font-size: 1.15rem; margin-bottom: .4em; }
.footer-title { color: #fff; font-weight: 600; margin-bottom: .4em; }
.footer-explore { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; align-content: start; }
.footer-explore .footer-title { grid-column: 1 / -1; }
.footer-explore a, .footer-legal a { text-decoration: none; }
.footer-explore a:hover, .footer-legal a:hover { text-decoration: underline; }
.footer-disclaimer { border: 1px solid rgba(243,239,230,.22); border-radius: var(--radius-sm); padding: 14px 18px; background: rgba(255,255,255,.04); margin-bottom: 18px; }
.footer-disclaimer p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(243,239,230,.16); }
.copyright { margin: 14px 0 0; font-size: .84rem; color: #AFC0B7; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .list-strip { grid-template-columns: repeat(2, 1fr); }
  .selftest { grid-template-columns: 1fr; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--sand); border-bottom: 1px solid var(--sand-line); flex-direction: column; gap: 0; padding: 6px 16px 12px; }
  .nav.open { display: flex; }
  .nav a { padding: 11px 4px; border-bottom: 1px solid var(--sand-line); border-radius: 0; }
  .menu-toggle { display: block; }
  .header-inner { position: relative; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .rules, .guide-grid, .list-strip, .list-grid, .footer-top { grid-template-columns: 1fr; }
  .hero { padding-top: 30px; }
  .selftest { padding: 22px 20px; }
  .happened { padding: 20px 18px 6px; }
  .checklist-sheet { padding: 18px 16px 8px; }
  .check-items li { padding-left: 70px; }
  .contact-strip { flex-direction: column; gap: 6px; }
  .sheet-head { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* печать: только лист, сверху — название сайта, адрес страницы и дата */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 12.5pt; }
  .notice-bar, .site-header, .site-footer, .skip, .no-print, .crumbs, .pager, .checklist-link, #cc-box { display: none !important; }
  main { padding: 0; }
  .shell { max-width: none; padding: 0; }
  .checklist-sheet { box-shadow: none; border: 0; padding: 0; }
  .print-head { display: block; font-size: 10pt; border-bottom: 1px solid #000; padding-bottom: 6px; margin-bottom: 14px; }
  .sheet-icon svg { width: 40px; height: 40px; }
  h1 { font-size: 20pt; color: #000; }
  .check-items li { border-bottom: 1px solid #999; page-break-inside: avoid; }
  .check-items li::after { border-color: #000; }
  a { color: #000; text-decoration: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
