/* Общие настройки чтения и движения. Подключать после тематических таблиц стилей. */
:root {
  --ok: #176b3f; --warn: #8a4f08;
  --radius-control: 12px; --radius-card: 18px; --radius-modal: 22px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --motion-fast: 140ms; --motion-normal: 220ms; --motion-panel: 320ms;
  --motion-ease: cubic-bezier(.22,.75,.24,1);
  --control-height: 48px; --content-width: 1280px;
}
html { scroll-padding-top: 100px; }
body { font-size: 1rem; }
:root[data-reading-size="large"] { font-size: 112.5%; }
:root[data-reading-size="larger"] { font-size: 125%; }
button, input, select, textarea { font: inherit; }
.btn, .inp, .auth .inp, .auth .btn, .chk, .auth .chk { font-size: 1rem; }
.btn { min-height: var(--control-height); border-radius: var(--radius-control); }
.inp, .authpage .auth .inp { border-radius: var(--radius-control); }
.card, .authpage .auth, .tblw { border-radius: var(--radius-card); }
.modal { border: 1px solid var(--line); border-radius: var(--radius-modal); }
.modal::backdrop { background: #0d172b99; }
.modal[open], .experience-dialog[open] { animation: tevolika-panel-in var(--motion-normal) var(--motion-ease); }
.modal::backdrop, .experience-dialog::backdrop { animation: tevolika-backdrop-in var(--motion-fast) ease-out; }
@keyframes tevolika-panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tevolika-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.modal .mhead h2 { font-size: 1.5rem; line-height: 1.3; }
.modal .mhead .small { font-size: .875rem; }
.modal .mclose { width: 44px; height: 44px; flex: none; align-self: flex-start; border-radius: var(--radius-control); }
.menu, .spop, .cal, .public-menu nav { border-radius: var(--radius-control); box-shadow: var(--shadow); }
.menu, .spop, .public-menu nav { max-height: min(70dvh, 480px); overflow-y: auto; overscroll-behavior: contain; }
.spop button, .menu a, .menu button { min-height: 44px; height: auto; font-size: .9375rem; }
.sbtn, .dbtn { min-height: var(--control-height); height: auto; }
.sbtn > span, .dbtn > span { min-width: 0; white-space: normal; text-align: start; overflow-wrap: break-word; }
.sbtn > .i, .dbtn > .i { flex: none; width: 20px; height: 20px; }
select.inp:not([hidden]) { appearance: none; padding-right: 44px; background-image: url('/static/tevolika-chevron.svg'); background-position: right 12px center; background-repeat: no-repeat; background-size: 20px; }
:root[data-theme="dark"] select.inp:not([hidden]) { background-image: url('/static/tevolika-chevron-dark.svg'); }
.i { stroke-width: 1.75; }
.inp { min-height: 46px; height: auto; padding-block: 10px; }
textarea.inp { min-height: 100px; }
.small, .field > span:first-child, .lbl, .field-hint, .auth .field-hint,
.sub2, .alert, .docnav3, .tocbox nav a, .sitefoot, .lrow a, .authlinks,
.cnav a, .cab .ap .linkbtn, .cab .ap p, .cab .ap .bot .btn, .site-signin { font-size: .9375rem; }
.doc p, .doc li, .faq details p, .about-points li, .modal p { font-size: 1rem; }
.doc { line-height: 1.8; }
.doc h1, .ctitle h1, .auth h1 { font-size: clamp(1.65rem, 3vw, 2.1rem); line-height: 1.24; }
.docwrap .doc h1, .authpage .auth h1 { font-size: clamp(1.65rem, 3vw, 2.1rem); line-height: 1.24; }
.doc h2 { font-size: 1.35rem; line-height: 1.4; }
.docwrap .doc h2 { font-size: 1.35rem; line-height: 1.4; }
.sec2 > div { min-width: 0; }
.sec2 :is(h2, h3) { font-size: 1.125rem; line-height: 1.4; margin: 0 0 8px; }
.sec2 .d { font-size: .9375rem; line-height: 1.6; margin: 0; }
.sec2 > div > p { line-height: 1.65; }
.sec2 > div > p + :is(.btn, .chk), .sec2 > div > .btn + p { margin-top: 14px; }
.sec2 > div > .chk + p { margin-top: 10px; }
.sec2 :is(.srow, .inner) { min-width: 0; }
.sec2 .srow { flex-wrap: wrap; gap: 12px; }
.sec2 .srow > span { min-width: 0; }
.sec2 .srow > span > span { font-size: .9375rem; line-height: 1.6; }
.authpage .auth .sub2 { font-size: 1rem; }
.authpage .auth .field > span:first-child { font-size: .9375rem; }
.authpage .auth { padding: 26px; }
.auth-intro h2 { font-size: clamp(1.75rem, 3vw, 2.125rem); }
.site-header .nav a, .site-header .acct { font-size: .9375rem; }
.doc p, .doc li { overflow-wrap: break-word; }
.doc :is(p, li) a { text-decoration: underline; text-underline-offset: .18em; }
.btn, .linkbtn, .mclose, .eye, .public-menu summary { min-height: 44px; }
.eye { width: 44px; height: 44px; top: 1px; right: 2px; }
.pw .inp { padding-right: 52px; }
.mclose { min-width: 44px; }
:is(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--brand); outline-offset: 3px;
}
.inp:focus-visible { outline-offset: -2px; }
:is(.chk, .seg2) input:focus-visible { outline: 3px solid var(--brand); }
button:disabled { cursor: not-allowed; }
.sitefoot .linkbtn { font-size: .875rem; font-weight: 500; }
.sitefoot nav { align-items: center; }
.sitefoot nav a { display: inline-flex; align-items: center; min-height: 44px; }

.experience-dialog {
  width: min(520px, calc(100% - 28px)); max-height: calc(100dvh - 28px);
  padding: 28px; border: 1px solid var(--line); border-radius: 20px;
  color: var(--text); background: var(--surface); box-shadow: var(--shadow-lg); overflow: auto;
}
.experience-dialog::backdrop { background: #0d172b99; }
.experience-dialog h2 { font-size: 1.5rem; line-height: 1.3; }
.experience-dialog > p { color: var(--soft); font-size: .9375rem; margin-top: 12px; }
.experience-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.experience-close { min-width: 44px; padding: 8px; }
.experience-dialog fieldset { min-width: 0; padding: 0; margin: 24px 0 0; border: 0; }
.experience-dialog legend { font-size: 1rem; font-weight: 650; color: var(--ink); margin-bottom: 10px; padding: 0; }
.experience-options { display: flex; flex-wrap: wrap; gap: 8px; }
.experience-option { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .9375rem; cursor: pointer; }
.experience-option input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--brand); }
.experience-option:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.experience-option:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 3px; }
.experience-option input:focus-visible { outline: none; }
.experience-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 24px; }
.experience-status { min-height: 1.5em; font-size: .875rem; color: var(--soft); margin-top: 16px; }
body:has(.experience-dialog[open]) { overflow: hidden; }
:root[data-motion="reduced"] { scroll-behavior: auto !important; }
:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
:root[data-motion="reduced"] ::view-transition-old(root),
:root[data-motion="reduced"] ::view-transition-new(root) { animation: none !important; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="reduced"]) { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) *,
  :root:not([data-motion="full"]) *::before,
  :root:not([data-motion="full"]) *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 740px) {
  html { scroll-padding-top: 150px; }
  .site-header .wrap { height: auto; min-height: 68px; padding-block: 8px; }
  .sitefoot-inner { flex-wrap: wrap; }
  .sitefoot nav { justify-content: flex-start; gap: 4px 18px; }
  .experience-dialog { padding: 22px; }
  .experience-options { gap: 10px; }
  .modal { max-height: calc(100dvh - 24px); padding: 22px; }
  .landing-image-dialog { padding: 0; }
  .authpage .auth { padding: 22px; }
}
@media (max-width: 560px) {
  .sec2 .two { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sec2 { grid-template-columns: minmax(0, 1fr); }
  .mfoot { flex-wrap: wrap; }
}
@media (forced-colors: active) {
  :is(a, button, input, textarea, select, summary):focus-visible,
  .experience-option:has(input:focus-visible) { outline-color: Highlight; }
  .experience-option:has(input:checked) { border: 2px solid Highlight; }
  .landing-plan input:checked ~ .landing-plan-mark { color: Highlight; border-color: Highlight; }
}
@media print {
  [data-experience-open], .experience-dialog { display: none !important; }
}
