/*
Theme Name: UNL
Description: Довідник про національну лотерею України (pravoslavie.org.ua). Тільки світла тема, темні токени в запасі. Налаштування, SEO, /go/ — у mu-plugins/unl-core.
Version: 1.0.0
Text Domain: unl
*/
/* tokens first, one colour = action (blue), yellow = brand (logo, ball) only */
:root {
  --bg: #f3f5fa;
  --bg-alt: #e9eef7;
  --card: #fff;
  --line: #dfe5f0;
  --text: #14203a;
  --muted: #5b6781;
  --accent: #1d6fe8;
  --accent-h: #1559c4;
  --accent-soft: #e6effd;
  --brand: #ffc21a;
  --ok: #12a150;
  --shadow: 0 1px 2px rgba(20, 32, 58, .06), 0 6px 20px rgba(20, 32, 58, .06);
  --r: 16px;
  --red: #e5484d; --pink: #d6407a; --teal: #10a08f; --yellow: #f2b100; --blue: #3b82f6;
  --f-head: 'Nunito', system-ui, sans-serif;
  --f-text: 'Golos Text', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] { /* reserve: not switched on (owner 2026-11-09: light only) */
  --bg: #0c1322;
  --bg-alt: #101a2e;
  --card: #152036;
  --line: #25324f;
  --text: #e8edf7;
  --muted: #9ba8c3;
  --accent: #4d93ff;
  --accent-h: #73aaff;
  --accent-soft: #17294b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--f-text); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-h); }
h1, h2, h3, .t-h3 { font-family: var(--f-head); line-height: 1.2; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
h3, .t-h3 { font-size: 18px; font-weight: 800; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 860px; }
.placeholder { background: #fff3c4; color: #6b4c00; padding: 0 4px; border-radius: 4px; }


/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1.5px solid transparent; font: 700 16px/1 var(--f-head); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-h); color: #fff; box-shadow: 0 6px 18px rgba(29, 111, 232, .3); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--block { width: 100%; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; color: var(--text); transition: border-color .15s, color .15s; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }

/* legal line */
.legal { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--muted); margin-top: 16px; }
.age { flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 22px; padding: 0 5px; border: 1.5px solid currentColor; border-radius: 6px; font: 800 11px/1 var(--f-head); color: var(--muted); }

/* header */
.header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo__mark { padding: 0; border: 0; background: none; cursor: pointer; }
.logo__mark svg { width: 40px; height: 40px; }
.logo__name { display: flex; flex-direction: column; text-decoration: none; color: var(--text); line-height: 1; }
.logo__name:hover { color: var(--text); }
.logo__word { font: 900 22px/1 var(--f-head); letter-spacing: -.01em; }
.logo__word b { color: var(--accent); font-weight: 900; }
.logo__sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; transition: background-color .15s, color .15s; }
.nav a:hover, .nav a.is-active { background: var(--accent-soft); color: var(--accent); }
.header__act { display: flex; gap: 10px; align-items: center; }
.burger { display: none; }
.mnav { display: none; }
@media (max-width: 1080px) {
  .nav { display: none; }
  .header__act { margin-left: auto; }
  .burger { display: inline-grid; }
  .mnav.is-open { display: flex; flex-direction: column; padding: 8px 20px 16px; border-top: 1px solid var(--line); background: var(--card); }
  .mnav a { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; }
}
@media (max-width: 420px) {
  .header__in { gap: 10px; }
  .logo__sub { display: none; }
  .logo__mark svg { width: 34px; height: 34px; }
  .logo__word { font-size: 19px; }
  .header__act .btn--sm { padding: 0 12px; font-size: 14px; }
}

/* page flow: SEO text and FAQ sit right after the hero in HTML, but show at the bottom */
main.page-flow { display: flex; flex-direction: column; }
main.page-flow > * { order: 1; }
main.page-flow > .section--late { order: 10; }

/* hero */
.hero { padding: 48px 0 56px; background:
  radial-gradient(600px 300px at 85% 10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
  radial-gradient(500px 300px at 0% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.hero__in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 18px; }
.chip svg { width: 18px; height: 18px; color: var(--ok); }
.hero__lead { font-size: 18px; color: var(--muted); margin-top: 16px; max-width: 600px; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hero__facts li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.hero__facts b { display: block; font: 900 22px/1.1 var(--f-head); }
.hero__facts span { font-size: 13.5px; color: var(--muted); }

/* generator */
.gen { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 24px; }
.gen__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gen__hint { font-size: 13px; color: var(--muted); }
.gen__tabs { display: flex; gap: 6px; margin-top: 16px; padding: 4px; background: var(--bg); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.gen__tabs button { flex: 1 0 auto; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); transition: background-color .15s, color .15s; }
.gen__tabs button:hover { color: var(--text); }
.gen__tabs button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.gen__balls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; min-height: 52px; }
.gen__formula { font-size: 14px; color: var(--muted); margin-top: 12px; }
.gen__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.gen__btns .btn { flex: 1 1 200px; }
.gen__note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* balls */
.ball { --c: var(--accent); flex: none; width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 50%; font: 900 18px/1 var(--f-head); color: #14203a;
  background: radial-gradient(circle at 50% 50%, #fff 0 52%, transparent 53%), radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 45%, #fff), var(--c) 70%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.ball--red { --c: var(--red); } .ball--pink { --c: var(--pink); } .ball--teal { --c: var(--teal); } .ball--yellow { --c: var(--yellow); } .ball--blue { --c: var(--blue); }
.ball--bonus { --c: var(--brand); outline: 2px dashed var(--yellow); outline-offset: 3px; }
.gen .ball { width: 52px; height: 52px; font-size: 19px; }
.ball.is-rolling { animation: roll .55s ease-out; }
@keyframes roll { from { transform: rotate(-200deg); } to { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .ball.is-rolling { animation: none; } }

/* sections */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 720px; margin: 0 auto 32px; text-align: center; }
.section__head p { color: var(--muted); margin-top: 10px; }
.section__head--left { text-align: left; margin: 0; }

/* lottery cards */
.lots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1180px) { .lots { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.lot { position: relative; display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--c, var(--accent)); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s; }
.lot:hover { box-shadow: 0 10px 28px rgba(20, 32, 58, .12); }
.lot--red { --c: var(--red); } .lot--pink { --c: var(--pink); } .lot--teal { --c: var(--teal); } .lot--yellow { --c: var(--yellow); } .lot--blue { --c: var(--blue); }
.lot__head { display: flex; gap: 12px; align-items: center; }
.lot__formula { font-size: 14px; color: var(--muted); margin-top: 2px; }
.lot__note { font-size: 14.5px; }
.lot__facts { margin: 0; display: grid; gap: 8px; margin-top: auto; }
.lot__facts div { padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.lot__facts dt { color: var(--muted); font-size: 12.5px; }
.lot__facts dd { margin: 0; font-weight: 700; font-size: 15px; white-space: nowrap; }
.btn--block { white-space: normal; text-align: center; line-height: 1.2; }

/* types */
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.type { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.type__ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.type__ico svg { width: 24px; height: 24px; }
.type p { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.step__n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font: 900 17px/1 var(--f-head); margin-bottom: 14px; }
.step p { color: var(--muted); font-size: 15px; margin-top: 8px; }
.cta-row { display: flex; flex-direction: column; align-items: center; margin-top: 28px; }
.cta-row .legal { max-width: 620px; }

/* calculator */
.calc__in { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.calc { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.calc__label { font-weight: 600; font-size: 14px; color: var(--muted); }
.calc__input { display: block; width: 100%; margin-top: 8px; height: 56px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font: 800 24px/1 var(--f-head); }
.calc__input:focus { outline: none; border-color: var(--accent); }
.calc__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.calc__chips button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 14px; transition: border-color .15s, color .15s; }
.calc__chips button:hover { border-color: var(--accent); color: var(--accent); }
.calc__out { margin: 18px 0 0; display: grid; gap: 10px; }
.calc__out div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.calc__out dt { color: var(--muted); }
.calc__out dd { margin: 0; font-weight: 700; }
.calc__net { padding-top: 12px; border-top: 1px solid var(--line); }
.calc__net dt { color: var(--text) !important; font-weight: 700; }
.calc__net dd { font: 900 24px/1 var(--f-head); color: var(--ok); }
.calc__where { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 14.5px; }

/* licence */
.stats { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stats li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.stats b { display: block; font: 900 26px/1.1 var(--f-head); }
.stats span { color: var(--muted); font-size: 14px; }
.lic { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.lic__list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.lic__list dt { font-size: 13px; color: var(--muted); }
.lic__list dd { margin: 2px 0 0; font-weight: 600; }
.lic__note { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }

/* long read */
.seo { background: var(--card); border-top: 1px solid var(--line); }
.seo__in { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
.seo__toc { position: sticky; top: 92px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.seo__toc ol { margin: 10px 0 0; padding-left: 20px; font-size: 14px; display: grid; gap: 8px; }
.seo__toc a { color: var(--text); text-decoration: none; }
.seo__toc a:hover { color: var(--accent); }
.prose { max-width: 760px; font-size: 17px; }
.prose h2 { margin: 40px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 28px 0 10px; }
.prose p { margin: 0 0 14px; }
.prose .lead { font-size: 18px; color: var(--muted); }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent); }
.tbl { overflow-x: auto; margin: 6px 0 20px; border: 1px solid var(--line); border-radius: 14px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.tbl th, .tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--bg); font-weight: 700; font-size: 14px; }
.tbl tr:last-child td { border-bottom: 0; }

/* faq */
.faq h2 { text-align: center; margin-bottom: 28px; }
.faq__list { display: grid; gap: 10px; }
.faq__item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s; }
.faq__item:hover, .faq__item[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq__item summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: ''; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.faq__item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq__item .t-h3 { font-size: 17px; }
.faq__item p { padding: 0 18px 18px; color: var(--muted); }
.faq { background: var(--card); padding-top: 0; }

/* inner pages */
.page-inner { padding: 32px 0 64px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; margin: 10px 0 28px; }
.page-inner .prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; max-width: none; }

/* footer */
.footer { background: #0e1729; color: #c7d0e2; padding: 48px 0 110px; }
.footer .logo__name, .footer .logo__name:hover { color: #fff; }
.footer .logo__sub { color: #93a0bb; }
.footer .logo__word b { color: #7fb0ff; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer__about { margin-top: 16px; font-size: 14px; max-width: 460px; }
.footer .t-h3 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.footer a { color: #c7d0e2; }
.footer a:hover { color: #fff; }
.footer__bottom { display: flex; gap: 12px; align-items: flex-start; margin-top: 32px; padding-top: 20px; border-top: 1px solid #24314f; font-size: 13px; }
.footer .age { color: #c7d0e2; }

/* bottom bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(20, 32, 58, .12); }
.bar[hidden] { display: none; }
.bar__in { display: flex; align-items: center; gap: 14px; min-height: 68px; padding-top: 8px; padding-bottom: 8px; }
.bar__ball { width: 40px; height: 40px; font-size: 15px; }
.bar__txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.bar__txt b { font-family: var(--f-head); font-size: 15.5px; }
.bar__txt small { color: var(--muted); font-size: 12px; }
.bar__go { margin-left: auto; }
.bar__x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: color .15s, background-color .15s; }
.bar__x:hover { color: var(--text); background: var(--bg); }


/* 21+ gate */
.age-gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(8, 14, 28, .72); backdrop-filter: blur(4px); }
.age-gate__box { width: 100%; max-width: 420px; background: var(--card); border-radius: 22px; padding: 30px 26px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.age-gate__box > svg { width: 64px; height: 64px; margin: 0 auto 14px; }
.age-gate__q { font: 900 24px/1.2 var(--f-head); }
.age-gate__t { color: var(--muted); font-size: 14.5px; margin-top: 10px; }
.age-gate__btns { display: flex; gap: 10px; margin-top: 22px; }
.age-gate__btns .btn { flex: 1; }
.age-gate__no { margin-top: 18px; font-weight: 600; color: var(--red); }

/* responsive */
@media (max-width: 1024px) {
  .hero__in, .calc__in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .seo__in { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .seo__toc { position: static; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 32px 0 40px; }
  .hero__lead { font-size: 16.5px; }
  .hero__btns .btn { flex: 1 1 100%; }
  .section { padding: 48px 0; }
  .steps, .lic__list, .footer__top { grid-template-columns: 1fr; }
  .stats b { font-size: 21px; }
  .stats li { padding: 16px; }
  .gen, .calc { padding: 18px; }
  .gen__tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .hero__facts { gap: 8px; }
  .hero__facts li { padding: 10px; }
  .hero__facts b { font-size: 18px; }
  .hero__facts span { font-size: 12.5px; display: block; line-height: 1.35; }
  .gen .ball { width: 44px; height: 44px; font-size: 17px; }
  .gen__balls { gap: 8px; }
  .prose { font-size: 16px; }
  .page-inner .prose { padding: 20px 18px; }
  .bar__txt small { display: none; }
  .bar__txt b { font-size: 14px; }
  .bar__ball { display: none; }
}
@media (max-width: 360px) {
  .stats { grid-template-columns: 1fr; }
  .gen .ball { width: 40px; height: 40px; font-size: 16px; }
}
