/* Общие правила чтения и доступности */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Body, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: .2em;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(var(--width), calc(100% - 6rem));
  margin-inline: auto;
}

.spacer {
  flex: 1;
}

.skip {
  position: fixed;
  top: -12rem;
  left: 1rem;
  z-index: 20;
  padding: .7rem 1rem;
  background: white;
  color: black;
}
.skip:focus { top: 1rem; }

.mast {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
}

.headrow,
.account,
.direct,
.wordmark,
.hero-actions,
.foot-top {
  display: flex;
  align-items: center;
}

.headrow { min-height: 4.5rem; gap: 1.3rem; }
.wordmark { gap: .55rem; text-decoration: none; line-height: 1; }
.direct, .account { gap: 1.35rem; }
.account a, .direct a { text-decoration: none; font-weight: 700; }
.direct a:hover, .header-login:hover, .footer a:hover { text-decoration: underline; }
.header-join, .header-login { display: inline-flex; align-items: center; min-height: 42px; }
.header-join { padding: .45rem .95rem; }
.site-menu { position: relative; }
.site-menu summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  cursor: pointer;
  gap: .6rem;
  font-size: .9rem;
  font-weight: 720;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
.hamb { width: 21px; display: grid; gap: 5px; }
.hamb i { display: block; height: 2px; background: currentColor; }
.site-menu[open] .hamb i:first-child { transform: translateY(3.5px) rotate(45deg); }
.site-menu[open] .hamb i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.site-menu nav {
  position: absolute;
  top: calc(100% + .6rem);
  display: grid;
  min-width: max-content;
  max-width: calc(100vw - 1.5rem);
  padding: .65rem;
  z-index: 11;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 15px 32px rgb(0 0 0 / 15%);
}
.site-menu nav a { padding: .48rem .7rem; text-decoration: none; }
.site-menu nav a:is(:hover, :focus-visible) { text-decoration: underline; }
.intro p { margin: 0; }
.hero-actions { flex-wrap: wrap; gap: 1.3rem; margin-top: 1.55rem; }
.button, .text-action, .second-link, .inline-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-weight: 750; }
.button { text-decoration: none; padding: .8rem 1.3rem; line-height: 1.2; }
.button:hover, .header-join:hover { filter: brightness(1.09); }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; font-size: .86rem; }
.crumb a:hover { text-decoration: underline; }
.crumb a { text-decoration: none; }
.reading { padding-block: 3.2rem 5.5rem; }
.prose { min-width: 0; font-size: 1.07rem; line-height: 1.8; }
.prose p { margin: 0 0 1.15em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 1rem 0 1.45rem; padding-left: 1.55rem; }
.prose li { margin: .25rem 0; }
.prose li p { margin: 0; }
.prose a { color: var(--link); text-decoration-thickness: 1.4px; font-weight: 650; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose h2, .prose h3, .gallery h2, .gallery h3 { text-wrap: balance; }
.prose h2, .prose h3 { line-height: 1.18; scroll-margin-top: 6rem; }
.prose h2 { margin: 0 0 1rem; }
.prose h3 { margin: 1.7rem 0 .65rem; }
.chapter { margin-top: 2.8rem; }
.chapter:first-child { margin-top: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; text-align: left; font-size: .94rem; line-height: 1.55; }
.prose td, .prose th { padding: .8rem 1rem; vertical-align: top; min-width: 7rem; }
.prose tr + tr td { border-top: 1px solid var(--line); }
.prose th { font-weight: 720; }
.prose td p { margin: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details > :not(summary) { margin: 0 0 1rem; }
.faq summary, .contents summary { cursor: pointer; list-style: none; }
.faq summary { padding: .9rem 2rem .9rem 0; position: relative; font-weight: 720; }
.faq summary::after { content: '+'; position: absolute; right: .25rem; }
.faq details[open] summary::after { content: '−'; }
.contents a { display: block; text-decoration: none; }
.contents a:hover { text-decoration: underline; }
.footer { padding: 2.6rem 0; }
.foot-top { gap: 1rem; justify-content: space-between; padding-bottom: 1.5rem; }
.foot-top > span { font-size: .85rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; padding-top: 1.1rem; border-top: 1px solid currentColor; }
.footer nav a { text-decoration: none; font-size: .9rem; }
.missing main { max-width: 42rem; padding: 12vh 1.4rem; margin: auto; }
.missing h1 { font-family: Display, sans-serif; font-size: clamp(2.4rem,7vw,5rem); line-height: 1.1; }
@media (max-width: 850px) {
  .shell { width: calc(100% - 2.4rem); }
  .headrow { min-height: 3.8rem; gap: .8rem; }
  .reading { padding-block: 2rem 3.5rem; }
}
@media (max-width: 590px) {
  .shell { width: calc(100% - 2rem); }
  .headrow { gap: .65rem; }
  .account { gap: .5rem; }
  .header-join { padding-inline: .62rem; }
  .header-login, .header-join { font-size: .84rem; }
  .header-login { font-size: 0; }
  .header-login::before { content: 'Вход'; font-size: .86rem; }
  .header-join { font-size: 0; }
  .header-join::before { content: "Регистрация"; font-size: .84rem; }
  .menu-name, .direct { display: none; }
  .site-menu summary { padding-inline: 5px; }
  .prose { font-size: 1rem; line-height: 1.75; }
  .chapter { margin-top: 2.2rem; }
  .prose td, .prose th { padding: .6rem .65rem; min-width: 6.4rem; }
  .foot-top { align-items: flex-start; flex-direction: column; }
  .hero-actions { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
@media (max-width: 380px) {
  .mast .headrow { width: calc(100% - 1rem); gap: .35rem; }
  .mast .account { gap: .28rem; }
  .mast .wordmark { font-size: 1.28rem; gap: .25rem; }
  .mast .header-join { padding-inline: .5rem; }
  .mast .header-join::before, .mast .header-login::before { font-size: .79rem; }
  .mast .site-menu summary { padding-inline: 3px; }
  .mast .hamb { width: 18px; }
}
@media (max-width: 470px) {
  h1, .prose h2, .prose h3 {
    overflow-wrap: anywhere;
    hyphens: auto;
  }
}

@font-face {
  font-family: Body;
  src: url("rooms/print/body.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: Display;
  src: url("rooms/print/display.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}
:root {
  --paper: #faf8f1;
  --ink: #17372f;
  --line: #c9d1c3;
  --link: #12604b;
  --focus: #bd7800;
  --width: 78rem;
  --green: #0e3c30;
  --gold: #f4d28d;
}
.mast { background: #faf8f1; }
.headrow { min-height: 4.65rem; }
.site-menu { margin-right: .4rem; }
.site-menu nav { left: 0; }
.wordmark { font-family: Display, Georgia, serif; font-size: 2rem; font-weight: 580; letter-spacing: -.08em; }
.club { font-family: Georgia,serif; color: #94712d; font-size: 1.42rem; }
.mastline { height: 1.7rem; width: 1px; background: var(--line); }
.mastnote { color: #526357; font-size: .86rem; }
.header-join { border: 1px solid #244e41; border-radius: 100px; color: var(--green); }
.header-join:hover { color: white; background: var(--green); }
.cover { isolation: isolate; position: relative; overflow: hidden; color: #fffaf0; background: #101e17; }
.cover-photo { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 54%; }
.cover::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,rgba(4,22,17,.95),rgba(4,22,17,.74) 33%,rgba(4,22,17,.15) 70%,transparent); }
.cover-inner { padding-block: clamp(2.1rem,4.7vw,5.15rem); }
.eyebrow { display: inline-flex; border-top: 1px solid #d5bd85; padding-top: .5rem; color: #f9dfa6; text-transform: uppercase; font-weight: 700; font-size: .81rem; letter-spacing: .12em; }
.cover h1, .lesson h1 { font-family: Display,Georgia,serif; font-weight: 470; line-height: 1.06; letter-spacing: -.055em; text-wrap: balance; }
.cover h1 { font-size: clamp(3.35rem,6.6vw,6.7rem); margin: 1.15rem 0 1.1rem; max-width: 13ch; }
.cover .subtitle { display: block; font-size: clamp(1.3rem,2.1vw,2.2rem); margin-top: .45rem; line-height: 1.15; letter-spacing: -.02em; }
.cover .intro { max-width: min(45%,40rem); color: #f2f0e2; line-height: 1.62; }
.button { background: var(--gold); color: #17382c; border-radius: 30px; padding-inline: 1.55rem; }
.text-action { text-decoration-color: #9bab97; font-size: .93rem; }
.gallery { margin-block: 2.45rem 0; }
.gallery-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.gallery-top h2 { font: 480 clamp(1.85rem,3vw,2.9rem)/1.15 Display,Georgia,serif; letter-spacing: -.04em; margin: 0; }
.inline-action { color: var(--link); font-size: .95rem; text-decoration-color: #819a83; }
.gallery-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-block: 1.1rem .85rem; }
.gallery-tabs button { font-size: .9rem; padding: .35rem .85rem; min-height: 38px; border: 1px solid #adbaaa; color: var(--ink); background: transparent; border-radius: 2rem; }
.gallery-tabs button[aria-selected="true"] { border-color: var(--green); color: white; background: var(--green); }
.gallery-stage { background: #e7ecdf; border: 1px solid #c5d0bd; }
.gallery-panel { display: grid; grid-template-columns: minmax(0,.37fr) 1fr; align-items: center; }
.gallery-panel > div { padding: 1.15rem 1.75rem; }
.category-photo { width: 100%; height: clamp(145px,15vw,215px); object-fit: cover; }
.gallery-panel h3 { font: 490 clamp(1.35rem,2vw,2.2rem)/1.2 Display,Georgia,serif; margin: 0 0 .45rem; letter-spacing: -.035em; }
.gallery-panel p { margin: 0 0 .5rem; }
.gallery-more { font-size: .9rem; font-weight: 720; }
.lesson { background: #e6ecdf; border-bottom: 1px solid var(--line); }
.lesson-inner { padding-block: 2rem 2.7rem; }
.lesson h1 { font-size: clamp(2.45rem,4.8vw,4.7rem); max-width: 22ch; margin: 1.1rem 0; }
.lesson .intro { max-width: 51rem; }
.lesson .button, .missing .button { background: var(--green); color: white; }
.crumb { color: #425f52; }
.w-utility { border-bottom: 1px solid var(--line); }
.w-utility .shell { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .4rem; font-size: .94rem; }
.reading { width: min(51rem,calc(100% - 6rem)); }
.contents { padding: .85rem 0; border-top: 1px solid #607d67; border-bottom: 1px solid #b1c0ae; margin-bottom: 2.15rem; }
.contents summary { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.contents summary::after { content: '+'; font-size: 1.4rem; line-height: 1; }
.contents[open] summary::after { content: '−'; }
.contents nav { margin-top: .65rem; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1.25rem; font-size: .95rem; }
.prose h2, .prose h3 { font-family: Display,Georgia,serif; font-weight: 510; color: #184536; letter-spacing: -.032em; }
.prose h2 { font-size: clamp(1.85rem,3.2vw,3rem); }
.prose h3 { font-size: 1.5rem; }
.prose th { background: #dce5d5; border-bottom: 1px solid #94ac98; color: #183e31; }
.prose td:first-child { font-weight: 600; }
.prose tbody tr:nth-child(even) { background: #f0f3e9; }
.reviews h3 { font-size: 1.22rem; padding-left: .8rem; border-left: 3px solid #a49154; }
.footer { background: var(--green); color: #f1f1df; }
.footer .club { color: var(--gold); }
@media (max-width: 850px) {
  .mastnote, .mastline { display: none; }
  .cover .intro { max-width: min(69%,41rem); }
  .reading { width: min(51rem,calc(100% - 2.4rem)); }
}
@media (max-width: 590px) {
  .headrow { min-height: 3.65rem; gap: .55rem; }
  .site-menu { margin: 0; }
  .wordmark { font-size: 1.54rem; gap: .2rem; }
  .club { font-size: 1.1rem; }
  .cover-inner { padding-block: 1.75rem 2rem; }
  .cover h1 { font-size: clamp(2.85rem,11vw,4.5rem); margin-block: .9rem; }
  .cover .subtitle { max-width: 22ch; }
  .cover .intro { max-width: 95%; }
  .cover-photo { object-position: 68% 50%; }
  .cover::before { background: linear-gradient(100deg,rgba(3,25,17,.93),rgba(2,25,18,.75) 55%,rgba(2,24,16,.47)); }
  .gallery { margin-block-start: 1.65rem; }
  .gallery-tabs { gap: .35rem; }
  .gallery-tabs button { padding: .35rem .6rem; font-size: .79rem; }
  .gallery-panel { grid-template-columns: minmax(0,.48fr) 1fr; }
  .gallery-panel > div { padding: .8rem; }
  .category-photo { height: 100%; min-height: 134px; }
  .gallery-panel p { font-size: .9rem; line-height: 1.45; }
  .gallery-panel h3 { font-size: 1.22rem; }
  .gallery-more, .inline-action { font-size: .83rem; }
  .reading { width: calc(100% - 2rem); }
  .contents nav { grid-template-columns: 1fr; }
}
.cover-inner { position: relative; }
.cover-facts {
  display: flex;
  gap: 1.15rem;
  position: absolute;
  right: 0;
  bottom: 1.4rem;
  padding: .65rem 1rem;
  color: #fff7df;
  border: 1px solid #bdab788f;
  background: #10251ce6;
  border-radius: .2rem;
}
.cover-facts > div { display: flex; align-items: center; gap: .55rem; }
.cover-facts strong { font: 520 2.4rem/1 Display,Georgia,serif; color: var(--gold); }
.cover-facts span { font-size: .79rem; line-height: 1.2; }
@media (max-width: 760px) {
  .cover-facts { position: static; width: fit-content; margin-top: 1.2rem; }
}
