@font-face {
  font-family: 'Long Shot';
  src: url('./fonts/long-shot.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Golos Text';
  src: url('./fonts/golos-text.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #3F2D23;
  --ink: #EAF3FB;
  --ice: #a7e0f6;
  --warm: #f0ad72;
  --panel: #32241d;
  --raised: #4a352a;
  --slot-rim: #211813;
  --slot-light: #705444;
  --slot-dark: #241912;
  --divider: #624839;
  --slot: 3px solid var(--slot-rim);
  --slot-inset: inset 2px 2px 0 var(--slot-light), inset -2px -2px 0 var(--slot-dark);
  --display: 'Long Shot', sans-serif;
  --text: 'Golos Text', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--ink);
  font: 1.0625rem/1.58 var(--text);
}
main { flex: 1; }
a { color: var(--ice); text-underline-offset: .22em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ice); outline-offset: 4px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; }
h1 { font-size: clamp(3.35rem, 6.4vw, 5.85rem); }
h2 { font-size: clamp(2.4rem, 4vw, 3.4rem); }
h3 { font-size: 1.9rem; }
.text-heading { font-family: var(--text); font-weight: 720; line-height: 1.1; }
h1.text-heading { font-size: clamp(2.6rem, 5.8vw, 4.65rem); }
html[lang="ru"] :is(h1:not(#hero-title), h2, h3, .masthead nav a, .download-button) { font-family: var(--text); font-weight: 700; }
html[lang="ru"] :is(.index-page, .changelog-page, .article-page) h1 { font-size: clamp(2.2rem, 5.8vw, 4.65rem); overflow-wrap: anywhere; }
html[lang="ru"] :is(.tile-copy h2, .infobox > h2) { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
strong { font-weight: 720; }
code { color: var(--ice); font-size: .88em; overflow-wrap: anywhere; }
[id] { scroll-margin-top: 1.4rem; }
.shell { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: absolute; z-index: 3; inset: .6rem auto auto .6rem; padding: .5rem 1rem; background: var(--panel); }

.masthead { background: #2f211b; border-bottom: 3px solid var(--slot-rim); }
.masthead-inner { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--ink); font: 1.9rem/1 var(--display); text-decoration: none; white-space: nowrap; }
.brand-mark {
  width: 27px;
  height: 27px;
  background: var(--ice);
  clip-path: polygon(44% 0, 56% 0, 56% 20%, 67% 20%, 67% 31%, 56% 31%, 56% 44%, 69% 44%, 69% 33%, 80% 33%, 80% 44%, 100% 44%, 100% 56%, 80% 56%, 80% 67%, 69% 67%, 69% 56%, 56% 56%, 56% 69%, 67% 69%, 67% 80%, 56% 80%, 56% 100%, 44% 100%, 44% 80%, 33% 80%, 33% 69%, 44% 69%, 44% 56%, 31% 56%, 31% 67%, 20% 67%, 20% 56%, 0 56%, 0 44%, 20% 44%, 20% 33%, 31% 33%, 31% 44%, 44% 44%, 44% 31%, 33% 31%, 33% 20%, 44% 20%);
}
.masthead nav { display: flex; align-items: stretch; align-self: stretch; gap: 1.5rem; }
.masthead-controls { display: flex; align-self: stretch; align-items: stretch; gap: 1.2rem; }
.language-switch { display: flex; align-items: center; gap: .35rem; }
.language-switch a { display: grid; place-items: center; min-width: 29px; min-height: 29px; border: 2px solid transparent; }
.language-switch svg { display: block; width: 21px; height: auto; }
.language-switch a:hover, .language-switch a[aria-current] { border-color: var(--ice); }
html[lang="ru"] .masthead nav a { font-size: 1rem; }
html[lang="ru"] .download-button { font-size: clamp(.9rem, 3.9vw, 1.15rem); }
.masthead nav a {
  display: grid;
  place-items: center;
  padding: .25rem .25rem 0;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font: 1.65rem/1 var(--display);
  text-decoration: none;
}
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--ice); border-bottom-color: var(--ice); }

.hero-frame {
  isolation: isolate;
  width: min(1280px, calc(100% - 48px));
  min-height: clamp(370px, 40vw, 554px);
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
.hero-image, .hero-title { grid-area: 1 / 1; }
.hero-image {
  justify-self: end;
  margin-inline-end: 19%;
  width: clamp(245px, 31vw, 392px);
  height: auto;
  object-fit: contain;
  image-rendering: auto;
}
.hero-title { z-index: 1; margin-top: 2rem; padding-inline: max(24px, calc((100% - 1120px) / 2)); }
.hero-title h1 { width: fit-content; font-size: clamp(4.4rem, 9.7vw, 8.6rem); text-shadow: 0 4px 0 #211813, 0 7px 20px #211813b8; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 344px); align-items: start; gap: clamp(32px, 6vw, 88px); padding-block: 58px 45px; }
.about-lede { font-size: 1.125rem; max-width: 62ch; margin-top: .65rem; }
.about-copy h3 { margin-top: 1.4rem; }
.language-list {
  margin: .62rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1rem;
  row-gap: .12rem;
  max-width: 570px;
  font-size: 1rem;
}
.language-list li { padding: .1rem 0; }
.download { padding: 32px 0 49px; text-align: center; border-top: 3px solid var(--divider); }
.download h2 { font-size: clamp(2rem, 3.6vw, 2.85rem); font-variant-numeric: tabular-nums; margin-bottom: 1.15rem; }
.download-options { display: grid; grid-template-columns: repeat(2, minmax(0, 248px)); justify-content: center; gap: 1rem; }
.download-option { display: grid; align-content: start; gap: .5rem; }
.download-option small { font-size: .9rem; line-height: 1.42; }
.download-button {
  display: grid;
  place-items: center;
  min-height: 62px;
  padding: .5rem .3rem;
  border: 3px solid #291b14;
  background: #76472c;
  box-shadow: inset 0 3px 0 #ce8960, inset 3px 0 0 #ae6d49, inset 0 -5px 0 #4c2b1d, inset -3px 0 0 #583522;
  color: var(--ink);
  text-decoration: none;
  font: 1.85rem/1 var(--display);
  text-shadow: 0 2px 0 #382219;
}
.download-button:hover, .download-button:focus-visible { color: var(--ink); border-color: var(--ice); }
.download-button:active { transform: translateY(2px); box-shadow: inset 0 3px 0 #ab6948, inset 0 -2px 0 #4c2b1d; }
.changelog-link { display: inline-block; margin-top: 1.15rem; }

.footer { background: #2f211b; border-top: 3px solid var(--slot-rim); }
.footer-inner { min-height: 75px; display: flex; justify-content: space-between; align-items: center; gap: .55rem 1rem; font-size: .92rem; }
.footer-brand { font-weight: 650; }

.index-page, .changelog-page { padding-block: clamp(40px, 5.5vw, 72px); }
.index-page h1, .changelog-page h1 { margin-bottom: .65rem; }
.page-lede { font-size: clamp(1.09rem, 1.45vw, 1.23rem); max-width: 62ch; }
.wiki-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.9rem; }
.wiki-tile {
  text-decoration: none;
  color: var(--ink);
  display: grid;
  grid-template-rows: auto 1fr;
  border: var(--slot);
  background: var(--panel);
  box-shadow: var(--slot-inset);
  padding: 2px;
}
.wiki-tile:hover, .wiki-tile:focus-visible { border-color: var(--ice); }
.tile-art, .infobox-art {
  background: repeating-conic-gradient(#4c372c 0 25%, #513b2f 25% 50%) 0 0 / 28px 28px;
  border-bottom: 3px solid var(--slot-rim);
}
.tile-art { display: flex; align-items: center; justify-content: center; min-height: 148px; padding: 10px 12px; }
.tile-art img { width: min(108px, 25%); height: auto; image-rendering: pixelated; filter: drop-shadow(0 6px 0 #23181160); }
.tile-art img:not(.hut-render, .block-icon):only-child { width: min(127px, 46%); }
.tile-art img + img { margin-left: -.3rem; }
.tile-art img.block-icon { width: min(64px, 25%); }
.tile-art img.block-icon:only-child { width: min(128px, 46%); }
.tile-art img.hut-render { width: auto; height: auto; max-height: 126px; object-fit: contain; image-rendering: auto; filter: none; }
.tile-copy { padding: .9rem 1.1rem 1rem; }
.tile-copy h2 { font-size: clamp(1.65rem, 2.5vw, 2.2rem); margin-bottom: .36rem; }
.tile-copy h2.text-heading { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.tile-copy p { font-size: .98rem; line-height: 1.43; }

.article-page { padding-block: 28px 65px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 15px; font-size: .94rem; }
.breadcrumb > [aria-hidden] { color: var(--warm); }
.article-page h1 { margin-bottom: 21px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(284px, 335px); gap: clamp(38px, 6vw, 80px); align-items: start; }
.article-layout .infobox { grid-area: 1 / 2; }
.wiki-article { grid-area: 1 / 1; min-width: 0; }
.infobox, .contents {
  background: var(--panel);
  border: var(--slot);
  box-shadow: var(--slot-inset);
  padding: 2px;
  min-width: 0;
}
.infobox > h2 {
  text-align: center;
  padding: .76rem .64rem .7rem;
  background: var(--raised);
  border-bottom: 3px solid var(--slot-rim);
  color: var(--ink);
  font-size: 1.95rem;
}
.infobox > h2.text-heading { font-size: 1.55rem; }
.infobox-art { display: flex; align-items: center; justify-content: center; padding: .7rem .55rem; text-align: center; }
.infobox-art figure { min-width: 0; }
.infobox-art img { width: min(100%, 205px); height: auto; margin: auto; image-rendering: pixelated; filter: drop-shadow(0 6px 0 #23181170); }
.infobox-art.hut-art figure { width: 100%; }
.infobox-art img.hut-render { width: min(100%, 208px); object-fit: contain; filter: none; image-rendering: auto; }
.infobox-art img.block-icon { width: min(100%, 256px); }
.infobox-art figcaption { font-size: .92rem; min-height: 2.3em; display: grid; place-items: center; line-height: 1.2; }
.infobox-art[data-carousel]:not([data-rotating]) figure { flex: 1; }
.infobox-art[data-carousel]:not([data-rotating]) figcaption { font-size: .78rem; }
.infobox-art[data-carousel]:not([data-rotating]) .block-icon { width: min(100%, 64px); }
.infobox-art[data-rotating] { display: grid; grid-template-columns: minmax(0, 1fr); }
.infobox-art[data-rotating] figure { grid-area: 1 / 1; }
.infobox-art[data-rotating] figure:not([data-current]) { visibility: hidden; }

.fact-table, .data-table { width: 100%; border-collapse: collapse; text-align: left; }
.fact-table th, .fact-table td { vertical-align: top; padding: .58rem .73rem; border-bottom: 2px solid #4d392d; font-size: .94rem; line-height: 1.37; }
.fact-table th { width: 40%; font-weight: 660; }
.fact-table td { background: #ffffff04; }
.fact-table tr:last-child > * { border-bottom: 0; }
.fact-variant { display: block; font-weight: 400; }
.fact-group .fact-variant { margin-top: .13rem; }
.fact-continuation th { padding-left: 1rem; }

.contents { margin-top: 1.48rem; width: min(100%, 352px); }
.contents summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem .8rem; list-style: none; background: var(--raised); font-weight: 690; }
.contents summary::-webkit-details-marker { display: none; }
.contents[open] summary { border-bottom: 2px solid var(--slot-rim); }
.contents-toggle { color: var(--ice); font-weight: 500; font-size: .9rem; }
.contents-toggle::after { content: attr(data-show); }
.contents[open] .contents-toggle::after { content: attr(data-hide); }
.contents ol { list-style: none; counter-reset: section; margin: 0; padding: .52rem .8rem .63rem; }
.contents ol ol { padding: .07rem 0 .11rem .7rem; }
.contents li { counter-increment: section; padding-block: .07rem; }
.contents li::before { content: counters(section, '.') '.'; color: var(--warm); font-variant-numeric: tabular-nums; margin-right: .55rem; }
.article-section { margin-top: 2.3rem; }
.article-section + .article-section { padding-top: 1.6rem; border-top: 2px solid var(--divider); }
.article-section h3 { margin-top: 1.2rem; }
.article-section p { margin-top: .62rem; }
.gallery { margin-top: .8rem; }
.gallery figure { border: var(--slot); background: var(--panel); }
.gallery img { width: 100%; height: auto; object-fit: contain; image-rendering: auto; }
.gallery figcaption { padding: .5rem .75rem; font-size: .94rem; }
.data-table { margin-top: .8rem; border: 3px solid var(--slot-rim); background: var(--panel); font-size: .95rem; }
.data-table th, .data-table td { padding: .56rem .7rem; border-bottom: 2px solid #4d392d; vertical-align: top; }
.data-table thead th { background: var(--raised); }
.data-table tbody th { font-weight: 660; }
.history-table th:first-child { width: 9.5rem; }
.history-table tbody tr:first-child th { white-space: nowrap; }
.history-table span { display: block; }
.history-table th span { color: var(--ice); font-size: .88rem; font-weight: 500; }
.recipe-table th:last-child { width: 46%; }
.recipe-table tbody > * > * { vertical-align: middle; }
.recipe-ingredient { display: grid; grid-template-columns: max-content 32px minmax(0, 1fr); align-items: center; gap: .25rem; }
.recipe-ingredient img { width: 32px; height: auto; image-rendering: pixelated; }
.recipe-image { width: 100%; height: auto; }
.recipe-pending { display: grid; place-items: center; min-height: 54px; padding: .3rem; border: 2px dashed #9b765b; color: var(--ink); text-align: center; font-size: .88rem; line-height: 1.3; }
.yield { display: inline-block; color: var(--warm); white-space: nowrap; }

.release-group { margin-top: 1.3rem; }
.release-group > h2 { padding-bottom: .75rem; font-size: clamp(1.8rem, 3.1vw, 2.55rem); }
.release {
  display: grid;
  grid-template-columns: minmax(200px, .75fr) 2fr;
  gap: 1.6rem;
  border: var(--slot);
  background: var(--panel);
  box-shadow: var(--slot-inset);
  padding: 1.16rem 1.35rem 1.24rem;
}
.release + .release { margin-top: .65rem; }
.release:first-of-type { border-left-color: var(--warm); }
.release h3 { font-size: clamp(1.34rem, 2.3vw, 1.61rem); font-variant-numeric: tabular-nums; }
.release-heading p { color: var(--warm); font-size: .91rem; margin-top: .35rem; }
.release ul { margin: 0; padding-left: 1.05em; }
.release li + li { margin-top: .35rem; }
.release li::marker { color: var(--ice); }

@media (max-width: 920px) {
  .shell { width: calc(100% - 64px); }
  .article-layout { gap: 30px; }
  .wiki-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .shell { width: calc(100% - 40px); }
  .masthead-inner { flex-direction: column; gap: .28rem; padding-top: 12px; }
  .brand { font-size: 1.78rem; gap: .58rem; }
  .brand-mark { width: 23px; height: 23px; }
  .masthead nav { align-self: center; justify-content: center; gap: clamp(.52rem, 3.5vw, 1.25rem); min-height: 45px; }
  .masthead nav a { font-size: 1.52rem; padding-inline: .14rem; }
  .masthead-controls { flex-wrap: wrap; justify-content: center; gap: .25rem .4rem; }
  .masthead-controls nav { gap: clamp(.35rem, 2.8vw, .75rem); }
  html[lang="ru"] .masthead-controls nav { gap: .35rem; }
  html[lang="ru"] .masthead nav a { font-size: .92rem; }
  .hero-frame { width: calc(100% - 24px); min-height: 0; margin-top: 14px; }
  .hero-image { width: clamp(176px, 64%, 310px); margin-inline-end: 9%; }
  .hero-title { align-self: end; margin: 0 0 22%; padding-inline: 8px; }
  .hero-title h1 { font-size: clamp(2.6rem, 13vw, 5.2rem); text-shadow: 0 3px 0 #211813, 0 6px 15px #211813b8; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 36px 30px; }
  .about-lede { font-size: 1.0625rem; }
  .language-list { column-gap: .7rem; }
  .download { padding-block: 27px 37px; }
  .download-options { gap: .6rem; }
  .download-button { min-height: 56px; padding-inline: .25rem; font-size: clamp(1.5rem, 5.5vw, 1.8rem); }
  .footer-inner { min-height: 68px; flex-wrap: wrap; padding-block: .7rem; font-size: .88rem; }
  .article-page { padding-block: 21px 45px; }
  .breadcrumb { margin-bottom: 11px; }
  .article-page h1 { margin-bottom: 16px; }
  .article-layout { display: flex; flex-direction: column; align-items: stretch; gap: 1.35rem; }
  .infobox-art img { width: min(100%, 145px); }
  .infobox-art img.hut-render { width: min(100%, 176px); }
  .infobox-art img.block-icon { width: min(100%, 128px); }
  .infobox-art figcaption { min-height: 1.9em; }
  .article-section { margin-top: 1.65rem; }
  .article-section + .article-section { padding-top: 1.2rem; }
  .data-table th, .data-table td { padding-inline: .46rem; }
  .history-table th:first-child { width: 7rem; }
  .release { grid-template-columns: minmax(0, 1fr); gap: .75rem; padding: 1rem .88rem; }
}

@media (max-width: 430px) {
  .wiki-grid { grid-template-columns: minmax(0, 1fr); }
  .tile-art { min-height: 126px; }
  .tile-art img:not(.hut-render, .block-icon):only-child { width: min(109px, 46%); }
  .tile-art img.hut-render { max-height: 106px; }
}

