/* Legaliz.uy — all styles of the site in one file, used by the public pages
   and by the closed part (/in/, rendered by web/members/server.mjs).
   Black page, poster type, flat colour fields. No decorative images, no scroll animations.
   Both fonts live in /assets/fonts: Sofia Sans Extra Condensed (headings) and PT Root UI (text). */

@font-face {
  font-family: 'Sofia Sans Extra Condensed';
  src: url('/assets/fonts/sofia-sans-extra-condensed-cyrillic-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Sofia Sans Extra Condensed';
  src: url('/assets/fonts/sofia-sans-extra-condensed-latin-ext-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sofia Sans Extra Condensed';
  src: url('/assets/fonts/sofia-sans-extra-condensed-latin-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'PT Root UI';
  src: url('/assets/fonts/PT-Root-UI_Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'PT Root UI';
  src: url('/assets/fonts/PT-Root-UI_Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --lime: #a5f112;    /* the green of the logo */
  --orange: #ff5a1f;  /* pistils */
  --berry: #d0185c;
  --violet: #6a32d9;  /* calyx */
  --ash: #d2d2cc;
  --paper: #eceae4;   /* legal pages */
  --soft: #d6d6d0;    /* secondary text on black */
  --mute: #9a9a94;
  --rule: rgba(255, 255, 255, 0.18);

  --display: 'Sofia Sans Extra Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'PT Root UI', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 80rem;
  --space: clamp(2.5rem, 6vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

/* The orc hand: the site's cursor. cursor-orc.cur is the owner's file (the Warcraft II orc hand, hot spot 5,1 = the
   claw tip); cursor-orc.png is our own drawn hand (scripts/make-cursor.mjs, hot spot 9 1) kept as the alternative.
   Links and buttons get the same hand; text fields keep the text cursor; touch screens ignore all of this. */
html, body { cursor: url('/assets/images/cursor-orc.cur') 5 1, auto; }
a, button, summary, label, select, [role='button'], .btn, .tool { cursor: url('/assets/images/cursor-orc.cur') 5 1, pointer; }
input[type='text'], input[type='password'], input[type='number'], textarea { cursor: text; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 1.0625rem/1.55 var(--body);
  font-kerning: none; /* PT Root UI kerns the spaces around a dash down to nothing */
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.join :focus-visible, .age :focus-visible, .apply :focus-visible, .paper main :focus-visible { outline-color: var(--black); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* Poster type: every big heading */
.hero__title, .title, .subtitle, .page-head h1, .specimen__name, .join__title, .age__title, .apply__title, .doc h1, .gatebox h1, .gatebox h2 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.88;
  text-transform: uppercase;
  text-wrap: balance;
}
.title { font-size: clamp(2.75rem, 7vw, 5.5rem); }
.subtitle { font-size: 2.25rem; line-height: 1; margin-bottom: 0.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.5rem 1.25rem 0.4rem;
  border: 2px solid transparent;
  background: none;
  color: inherit;
  font: 800 1.375rem/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn--lime { background: var(--lime); color: var(--black); }
.btn--lime:hover { background: var(--white); }
.btn--ghost { border-color: currentColor; }
.btn--ghost:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.btn--black { background: var(--black); color: var(--white); }
.btn--black:hover { background: var(--white); color: var(--black); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--black);
  color: var(--white);
  border-bottom: 1px solid var(--rule);
}
.header__in { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); min-height: 4.25rem; }
.header__logo img { height: 2.75rem; width: auto; }
.header__nav { display: flex; gap: clamp(1.25rem, 3vw, 2.25rem); margin-right: auto; }
.header__nav a {
  padding: 0.5rem 0 0.4rem;
  font: 800 1.5rem/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.header__nav a:hover, .header__nav a[aria-current] { color: var(--lime); }
.header__join { min-height: 2.5rem; padding-inline: 1rem; font-size: 1.25rem; }

.langs { display: flex; gap: 0.75rem; font-size: 0.875rem; font-weight: 700; }
.langs a { color: var(--mute); text-decoration: none; }
.langs a:hover, .langs a[aria-current] { color: var(--white); }

.header__login, .header__me { font-size: 0.9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.header__login:hover { color: var(--lime); }
/* "you are signed in": a green dot and the nickname, on every page */
.header__me { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--lime); }
.header__me::before { content: ''; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--lime); }
.header__me:hover { color: var(--white); }
.header form { display: contents; }
/* inside the closed part the line under the header is green */
.inside .header { border-bottom-color: var(--lime); }

/* Closed tabs and the nickname (data-in) show only for a signed-in superuser;
   "Sign in" and "Join" (data-out) only for everyone else. The class is set from a cookie in Layout. */
[data-in] { display: none; }
.is-in [data-in] { display: revert; }
.is-in .header__me { display: inline-flex; }
.is-in [data-out] { display: none; }

@media (max-width: 44rem) {
  .header__in { flex-wrap: wrap; gap: 0 0.85rem; padding-top: 0.5rem; }
  .header__logo { margin-right: auto; }
  .header__logo img { height: 2.25rem; }
  .header__nav { order: 3; width: 100%; margin: 0; gap: 1.5rem; overflow-x: auto; }
  .header__nav a { padding-block: 0.7rem 0.6rem; }
}

/* ---------- Home: hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(76vh, 44rem);
  overflow: hidden;
}
.hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(1.1);
}
/* the owner's photo: the face sits in the upper right, so that corner stays in view at every width */
.hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 28%;
  filter: saturate(0.85) contrast(1.05);
}
/* the club's bird (brand book, transparent) sits in the upper left like a sticker on the poster */
.hero__bird {
  position: absolute;
  left: clamp(0.5rem, 3vw, 4rem);
  top: clamp(1rem, 4vw, 3rem);
  z-index: -1;
  width: clamp(8rem, 20vw, 20rem);
  transform: rotate(-6deg);
  filter: drop-shadow(0 0.75rem 1.5rem rgba(0, 0, 0, 0.7));
}
.hero__bird img { width: 100%; height: auto; }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.15) 35%, rgba(0, 0, 0, 0.94) 100%);
}
.hero__in { padding-block: clamp(2rem, 6vw, 3.5rem); }
/* sized so the longest line ("ОТКРЫТАЯ КУЛЬТУРА.") stays on one line at every width */
.hero__title { font-size: clamp(2.75rem, 11vw, 10rem); line-height: 0.84; text-wrap: nowrap; }
/* the Russian statement has short lines ("ПО-РУССКИ."), so it can be set much larger */
html[lang='ru'] .hero__title { font-size: clamp(4rem, 19vw, 13rem); }
.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
}
.hero__text { max-width: 34rem; font-size: 1.125rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 44rem) { .hero { min-height: 27rem; } }

/* ---------- Sections ---------- */
.band { padding-block: var(--space); }
.band--line { border-top: 1px solid var(--rule); }
.band__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.band__text { max-width: 38rem; margin: -0.5rem 0 1.5rem; color: var(--soft); }
.more { font: 800 1.375rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.more:hover { color: var(--lime); }

.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2.25rem); }
.page-head h1 { font-size: clamp(3.5rem, 11vw, 9rem); line-height: 0.86; }
.page-head p { max-width: 40rem; margin-top: 1rem; font-size: 1.25rem; line-height: 1.4; }
/* the club page: the bird beside the title */
.page-head--club { display: grid; grid-template-columns: minmax(0, 1fr) clamp(9rem, 20vw, 17rem); gap: 1.5rem 3rem; align-items: end; }
.page-head__mark { width: 100%; height: auto; aspect-ratio: 1; filter: drop-shadow(0 0.5rem 1.5rem rgba(0, 0, 0, 0.6)); }
@media (max-width: 44rem) { .page-head--club { grid-template-columns: minmax(0, 1fr) 7rem; align-items: start; } }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.page-body { padding-bottom: var(--space); }

/* ---------- Journal: one article ---------- */
.article { width: min(100% - 2 * var(--gutter), 44rem); margin-inline: auto; padding-block: clamp(2rem, 5vw, 3.5rem) var(--space); }
.article h1 { font: 800 clamp(3rem, 8vw, 5.5rem)/0.9 var(--display); text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.article__meta { margin-top: 1rem; color: var(--mute); font-size: 0.9375rem; }
.article__lead { margin-top: 1rem; font-size: 1.3125rem; line-height: 1.4; }
.article__body { margin-top: 2rem; font-size: 1.125rem; line-height: 1.6; }
.article__body h2 { margin: 2.5rem 0 0.75rem; font: 800 2.25rem/1 var(--display); text-transform: uppercase; }
.article__body p { margin: 0.9rem 0; }
.article__body ul, .article__body ol { margin: 0.9rem 0; padding-left: 1.4rem; }
.article__body ul { list-style: disc; }
.article__body ol { list-style: decimal; }
.article__body li { margin: 0.55rem 0; }
.article__body li::marker { color: var(--lime); font-weight: 700; }
.article__body a { color: var(--lime); }
.article__body blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--lime); color: var(--soft); }

/* ---------- Strain cards ---------- */
.strains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.strain {
  display: flex;
  flex-direction: column;
  aspect-ratio: 4 / 5;
  padding: clamp(0.75rem, 1.4vw, 1.125rem);
  overflow: hidden;
  background: var(--card, var(--ash));
  color: var(--ink, var(--black));
  text-decoration: none;
}
.strain[hidden] { display: none; }
.strain__meta { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.9375rem; font-weight: 700; line-height: 1.2; }
.strain__img {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  padding: 0.5rem 10%;
  object-fit: contain;
  transition: transform 0.25s ease;
}
.strain:hover .strain__img { transform: scale(1.07) rotate(-3deg); }
.strain__name { font: 800 clamp(2rem, 3.6vw, 3.5rem)/0.86 var(--display); text-transform: uppercase; }

.c-gray { --card: var(--ash); }
.c-orange { --card: var(--orange); }
.c-green { --card: var(--lime); }
.c-bord { --card: var(--berry); --ink: var(--white); }
.c-purple { --card: var(--violet); --ink: var(--white); }
.c-blue { --card: #2f6bff; --ink: var(--white); }

.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.filter button {
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--white);
  background: none;
  color: var(--white);
  font: 700 1rem/1.2 var(--body);
  cursor: pointer;
}
.filter button[aria-pressed='true'] { background: var(--white); color: var(--black); }

@media (max-width: 64rem) { .strains { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- One strain ---------- */
.specimen {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  padding-block: clamp(1.5rem, 4vw, 3rem) var(--space);
}
.specimen__photo { display: grid; place-items: center; aspect-ratio: 1; padding: 9%; background: var(--card, var(--ash)); }
.specimen__photo img { max-height: 100%; object-fit: contain; }
.back { font-size: 0.9375rem; font-weight: 700; }
.back:hover { color: var(--lime); }
.specimen__name { margin: 0.75rem 0 1.5rem; font-size: clamp(3.5rem, 9vw, 8rem); line-height: 0.84; }
.facts { border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--mute); }
.facts dd { font-weight: 700; }
.specimen__text { max-width: 36rem; margin-top: 1.5rem; }
.specimen__text p + p { margin-top: 1em; }
.specimen__note { margin-top: 1.5rem; color: var(--soft); }
.specimen__note a { color: var(--white); font-weight: 700; }

@media (max-width: 52rem) {
  .specimen { grid-template-columns: 1fr; }
  .specimen__photo { aspect-ratio: 4 / 3; padding: 6%; }
}

/* ---------- Videos ---------- */
.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 0.75rem; }
.video { text-decoration: none; }
.video img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #1a1a1a; }
.video span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 0.5rem;
  color: var(--soft);
  font-size: 0.9375rem;
  line-height: 1.35;
}
.video:hover span { color: var(--white); }

@media (max-width: 44rem) {
  .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .videos--row {
    display: flex;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
  }
  .videos--row .video { flex: 0 0 78%; scroll-snap-align: start; }
}

/* ---------- How to join ---------- */
.join { padding-block: var(--space); background: var(--lime); color: var(--black); }
.join__in {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.join__title { font-size: clamp(3rem, 8vw, 6.5rem); }
.join__text { max-width: 26rem; margin-top: 1rem; font-size: 1.125rem; }
.join__cta { margin-top: 1.5rem; }
.join__steps { counter-reset: step; border-top: 2px solid var(--black); }
.join__steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 1rem;
  align-items: baseline;
  padding: 0.8rem 0 0.7rem;
  border-bottom: 2px solid var(--black);
}
.join__steps li::before { content: counter(step); font: 800 2.5rem/0.9 var(--display); }
.join__steps strong { font: 800 2rem/1 var(--display); text-transform: uppercase; }
.join__steps span { grid-column: 2; margin-top: 0.25rem; font-size: 1rem; line-height: 1.45; }

@media (max-width: 52rem) { .join__in { grid-template-columns: 1fr; } }

/* ---------- Club page ---------- */
.club {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 6vw, 5rem);
  padding-bottom: var(--space);
}
.prose { max-width: 36rem; font-size: 1.125rem; }
.prose p + p { margin-top: 1em; }
.club__rules { display: grid; gap: 2.5rem; }
.list li { padding: 0.7rem 0; border-top: 1px solid var(--rule); }
.list li:last-child { border-bottom: 1px solid var(--rule); }
.source { margin-top: 0.75rem; color: var(--mute); font-size: 0.875rem; }

.faq { padding-block: var(--space); }
.faq__list { margin-top: 1.25rem; border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font: 800 2rem/0.7 var(--display); }
.faq details[open] summary::after { content: '–'; }
.faq summary:hover { color: var(--lime); }
.faq details p { max-width: 44rem; padding-bottom: 1.25rem; color: var(--soft); }

@media (max-width: 52rem) { .club { grid-template-columns: 1fr; } }

/* ---------- Legal pages: black on paper ---------- */
body.paper { background: var(--paper); color: var(--black); }
.doc { width: min(100% - 2 * var(--gutter), 44rem); margin-inline: auto; padding-block: clamp(2rem, 5vw, 3.5rem) var(--space); }
.doc__tabs { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin-bottom: 2rem; font-size: 0.9375rem; font-weight: 700; }
.doc__tabs a[aria-current] { padding-inline: 0.4rem; background: var(--black); color: var(--paper); text-decoration: none; }
.doc h1 { font-size: clamp(3rem, 9vw, 6rem); }
.doc__meta { margin-top: 1rem; color: #55554f; font-size: 0.9375rem; }
.doc__body { margin-top: 2rem; }
.doc__body h2 { margin: 2rem 0 0.5rem; font-size: 1.25rem; line-height: 1.3; }
.doc__body p { margin: 0.75rem 0; }
.doc__body ul { margin: 0.75rem 0; padding-left: 1.25rem; list-style: disc; }
.doc__body li { margin: 0.35rem 0; }
.doc__body code { padding: 0 0.25em; background: rgba(0, 0, 0, 0.08); font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
.doc__box { margin-top: 2.5rem; padding: 1.25rem; border: 2px solid var(--black); }
.doc__box h2 { margin-bottom: 0.5rem; font-size: 1.125rem; }
.doc__box dl div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.25rem 0; }
.doc__box dt { color: #55554f; }

/* ---------- Footer ---------- */
.footer { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; background: var(--black); color: var(--white); border-top: 1px solid var(--rule); }
.footer__top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.7fr); gap: 2rem; }
.footer__logo img { height: 3.5rem; width: auto; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.footer__col a { text-decoration: none; }
.footer__col a:hover { color: var(--lime); }
.footer__note { max-width: 46rem; margin-top: 2rem; color: var(--mute); font-size: 0.875rem; }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--mute);
  font-size: 0.875rem;
}

@media (max-width: 52rem) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__logo { grid-column: 1 / -1; }
}

/* ---------- Closed part: sign-in and profile ---------- */
.gatebox { padding-block: clamp(2rem, 5vw, 3.5rem) var(--space); }
.gatebox > * { max-width: 30rem; }
.gatebox h1 { font-size: clamp(3.5rem, 11vw, 7rem); overflow-wrap: anywhere; }
.gatebox h2 { margin-top: 3rem; font-size: 2.25rem; line-height: 1; }
.gatebox p { margin-top: 0.75rem; }
.gatebox .facts { margin-top: 1rem; }
.gatebox__note { color: var(--mute); font-size: 0.875rem; }
.fields { display: grid; gap: 1rem; margin-top: 1.5rem; }
.fields label > span { display: block; margin-bottom: 0.3rem; font-size: 0.9375rem; font-weight: 700; }
.fields input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--white);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
}
.fields .btn { justify-self: start; }
.fields .fields__msg { margin: 0; font-weight: 700; }
.notice { padding: 0.8rem 1rem; border-left: 4px solid var(--lime); background: rgba(165, 241, 18, 0.12); }

/* ---------- Closed part: the "you are inside" page ---------- */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.door { display: block; padding: 1.25rem; border: 2px solid var(--white); text-decoration: none; }
.door strong { display: block; font: 800 clamp(2.5rem, 5vw, 4rem)/0.9 var(--display); text-transform: uppercase; }
.door span { display: block; margin-top: 0.75rem; color: var(--soft); }
.door:hover { border-color: var(--lime); background: var(--lime); color: var(--black); }
.door:hover span { color: var(--black); }
.doors__note { margin-top: 1.5rem; color: var(--mute); font-size: 0.9375rem; }
.doors__note a { color: var(--soft); }
@media (max-width: 52rem) { .doors { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Closed part: chat. Looks like what it is, an IRC window ---------- */
.chat {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  grid-template-columns: minmax(0, 1fr); /* without this the one column grows to its widest row and the page scrolls sideways on a phone */
  height: calc(100dvh - 4.3rem);
  padding-block: 1rem;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9375rem;
  font-kerning: auto;
}
.chat { position: relative; }
.chat__bar { display: flex; gap: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--rule); }
.chat__bar strong { color: var(--lime); }
.chat__topic { flex: 1; min-width: 0; overflow: hidden; color: var(--soft); text-overflow: ellipsis; white-space: nowrap; }
.chat__status { color: var(--mute); white-space: nowrap; }
/* conversations: the channel and one tab per person (private messages); the number is the unread count */
.chat__tabs { display: flex; gap: 0.3rem; padding: 0.5rem 0 0; overflow-x: auto; scrollbar-width: none; }
.chat__tab { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.25rem 0.6rem; border: 2px solid var(--rule); background: none; color: var(--soft); font: inherit; white-space: nowrap; cursor: pointer; }
.chat__tab:hover { border-color: var(--soft); }
.chat__tab.is-on { border-color: var(--lime); color: var(--white); }
.chat__tab-n { min-width: 1.5em; padding: 0 0.35em; border-radius: 1em; background: var(--lime); color: var(--black); font-size: 0.8em; font-weight: 700; text-align: center; }
.chat__tab-x { margin-left: 0.1rem; color: var(--mute); }
.chat__tab-x:hover { color: var(--orange); }
.chat__line.chat__line--new { margin-top: 0.4rem; padding-top: 0.2rem; border-top: 1px dashed var(--lime); color: var(--lime); text-align: center; }
.chat__main { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; min-height: 0; }
/* Each line flows like in a plain IRC client: time, nickname, text, one after the other, no columns
   (the owner did not want the hole that a nickname column leaves before a short nick, 2026-11-11). */
.chat__log { overflow-y: auto; padding: 0.75rem 0.75rem 0.75rem 0; }
.chat__line { display: block; line-height: 1.55; overflow-wrap: anywhere; }
.chat__line time { margin-right: 0.5rem; color: var(--mute); }
/* a nickname is a button: a click addresses the person, for moderators it opens the actions */
.chat__who { padding: 0; border: 0; background: none; color: var(--lime); font: inherit; font-weight: 700; cursor: pointer; }
.chat__who.is-self { color: var(--white); }
.chat__who:hover { text-decoration: underline; }
.chat__line .chat__who { margin-right: 0.5rem; }
.chat__line--msg .chat__who::after { content: ':'; color: var(--mute); font-weight: 400; }
.chat__line--sys { color: var(--mute); }
.chat__line--me span { font-style: italic; }
.chat__del { padding: 0 0.4rem; border: 0; background: none; color: var(--mute); font: inherit; cursor: pointer; opacity: 0; }
.chat__line:hover .chat__del, .chat__del:focus-visible, .chat__del.is-armed { opacity: 1; }
.chat__del:hover, .chat__del.is-armed { color: var(--orange); }
.chat__names { overflow-y: auto; padding: 0.75rem 0 0.75rem 0.75rem; border-left: 1px solid var(--rule); line-height: 1.55; }
.chat__names .chat__who { color: var(--soft); font-weight: 400; }
.chat__names .chat__who.is-self { color: var(--white); font-weight: 700; }
.chat__form { position: relative; display: flex; align-items: center; gap: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
.chat__emoji { width: 2.5rem; height: 2.5rem; border: 2px solid var(--rule); background: none; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.chat__emoji:hover, .chat__emoji[aria-expanded='true'] { border-color: var(--lime); }
.chat__picker {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.25rem);
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(10, 2.4rem);
  gap: 0.1rem;
  padding: 0.5rem;
  border: 2px solid var(--lime);
  background: var(--black);
}
.chat__picker[hidden] { display: none; }
.chat__picker button { height: 2.4rem; border: 0; background: none; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.chat__picker button:hover, .chat__picker button:focus-visible { background: rgba(255, 255, 255, 0.14); }
.chat__menu { position: absolute; z-index: 6; display: grid; min-width: 14rem; border: 2px solid var(--lime); background: var(--black); }
.chat__menu[hidden] { display: none; }
.chat__menu button { padding: 0.5rem 0.75rem; border: 0; background: none; color: var(--white); font: inherit; text-align: left; cursor: pointer; }
.chat__menu button:hover, .chat__menu button:focus-visible { background: var(--lime); color: var(--black); outline: 0; }
.chat__prompt { color: var(--lime); font-weight: 700; white-space: nowrap; }
.chat__form input { flex: 1; min-width: 0; padding: 0.6rem 0.25rem; border: 0; background: transparent; color: var(--white); font: inherit; }
.chat__form input:focus-visible { outline: 0; box-shadow: inset 0 -2px 0 var(--lime); }
.chat__form .btn { min-height: 2.5rem; font-size: 1.25rem; }
.chat__rules { margin-top: 0.6rem; color: var(--mute); font-family: var(--body); font-size: 0.8125rem; font-kerning: none; }

@media (max-width: 44rem) {
  .chat { height: calc(100dvh - 6.4rem); }
  .chat__main { grid-template-columns: minmax(0, 1fr); }
  .chat__names { display: none; }
  .chat__prompt { display: none; }
  .chat__picker { grid-template-columns: repeat(7, 2.4rem); }
  .chat__del { opacity: 1; }
}

/* ---------- Lists of articles (home, journal, article page) ---------- */
.crumbs { margin: 0 0 0.75rem; color: var(--mute); font-size: 0.9375rem; }
.page-head .crumbs { max-width: none; margin-top: 0; font-size: 0.9375rem; }
.rows { border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 0.5rem 2rem; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.row__main { text-decoration: none; }
.row__main strong { display: block; font: 800 1.9rem/1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.row__main:hover strong { color: var(--lime); }
.row__main span { color: var(--soft); }
.row__meta { color: var(--mute); font-size: 0.875rem; line-height: 1.45; text-align: right; overflow-wrap: anywhere; }
.row__meta a { color: var(--soft); }
@media (max-width: 700px) {
  .row { grid-template-columns: 1fr; gap: 0.25rem; }
  .row__meta { text-align: left; }
}

/* ---------- Questions page ---------- */
.page-head__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.q__meta { margin: 0.75rem 0 0; color: var(--mute); font-size: 0.875rem; }
.q__meta .ok { color: var(--lime); }
.q__meta .todo { color: var(--orange); }
.q__body p + p { margin-top: 0.7em; }
.q__body a { color: var(--lime); }

/* ---------- About page ---------- */
.prose h2 { margin: 2.25rem 0 0.75rem; font-size: 2.25rem; line-height: 1; scroll-margin-top: 5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { margin: 1em 0 0; padding-left: 1.25em; }
.prose li + li { margin-top: 0.35em; }
.prose a { color: var(--lime); }
.prose blockquote { margin: 1em 0 0; padding-left: 0.9rem; border-left: 3px solid var(--rule); color: var(--soft); }
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); gap: 2rem 4rem; padding-bottom: var(--space); }
.about__aside { position: sticky; top: 5rem; align-self: start; }
.about__aside h2 { font-size: 1.75rem; line-height: 1; margin-bottom: 0.5rem; }
.about__aside ul { list-style: none; margin: 0; padding: 0; }
.about__aside li { padding: 0.45rem 0; border-top: 1px solid var(--rule); }
.about__aside a { color: var(--soft); text-decoration: none; }
.about__aside a:hover { color: var(--lime); }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } .about__aside { position: static; } }

/* small controls of the moderation page */
.tool {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--rule);
  background: none;
  color: var(--soft);
  font: 400 0.875rem/1.4 var(--body);
  text-decoration: none;
  cursor: pointer;
}
.tool:hover { border-color: var(--lime); color: var(--lime); }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.inline input, .inline select, .tools select {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-size: 0.9375rem;
}
.inline input[type='text'] { flex: 1 1 12rem; min-width: 0; }
.inline input[type='number'] { width: 4.5rem; }
.notice--bad { border-left-color: var(--orange); background: rgba(255, 90, 31, 0.14); }

/* ---------- Closed part: applications («Заявки») ---------- */
.req-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.req-filter a[aria-current] { border-color: var(--lime); color: var(--lime); }
.reqs { display: grid; gap: 1rem; }
.req { padding: 1rem 1.25rem; border: 1px solid var(--rule); border-left: 4px solid var(--mute); }
.req--new { border-left-color: var(--lime); }
.req--talk { border-left-color: var(--orange); }
.req--yes { border-left-color: var(--violet); }
.req__head { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: baseline; }
.req__head strong { font-size: 1.125rem; }
.req__topic { color: var(--soft); font-size: 0.875rem; }
.req__status { padding: 0.05rem 0.55rem; border: 1px solid var(--rule); border-radius: 1rem; color: var(--soft); font-size: 0.8125rem; }
.req--new .req__status { border-color: var(--lime); color: var(--lime); }
.req__time { margin-left: auto; color: var(--mute); font-size: 0.875rem; }
.req__line { margin-top: 0.5rem; }
.req__line span { color: var(--mute); }
.req__line--mute { color: var(--mute); }
.req__msg { margin-top: 0.5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.req__meta { margin-top: 0.5rem; color: var(--mute); font-size: 0.8125rem; }
.tool--danger:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- Closed part: moderation page ---------- */
.panel { display: grid; gap: 3rem; }
.panel__note { margin-top: 0.75rem; color: var(--mute); font-size: 0.875rem; max-width: 52rem; }
.scroll { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.grid th, .grid td { padding: 0.55rem 0.9rem 0.55rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.grid thead th { color: var(--mute); font-weight: 400; }
.grid tbody th { white-space: nowrap; }
.grid .is-off th, .grid .is-off td { color: var(--mute); }
.grid .tools { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.grid .tools form { display: flex; gap: 0.3rem; }

@media (max-width: 52rem) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row__meta { text-align: left; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .post__who strong, .post__who time, .post__edited { display: inline; margin-right: 0.5rem; }
  .post__tools { grid-column: 1; }
}

/* ---------- Application form (opened by every join button) ---------- */
.apply {
  width: min(100% - 2rem, 30rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  overflow: auto;
  background: var(--lime);
  color: var(--black);
}
.apply::backdrop { background: rgba(0, 0, 0, 0.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.apply__box { position: relative; padding: clamp(1.5rem, 5vw, 2.5rem); }
.apply__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: none;
  color: inherit;
  font: 800 2.5rem/1 var(--display);
  cursor: pointer;
}
.apply__title { padding-right: 2.5rem; font-size: clamp(2.5rem, 9vw, 4rem); line-height: 1; }
.apply__form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.apply__form[hidden] { display: none; }
.apply__form label > span { display: block; margin-bottom: 0.3rem; font-size: 0.9375rem; font-weight: 700; }
.apply__form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--black);
  border-radius: 0;
  background: var(--lime);
  color: var(--black);
  font: inherit;
}
.apply__form input[type='text'], .apply__form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--black);
  border-radius: 0;
  background: transparent;
  color: var(--black);
  font: inherit;
}
.apply__form textarea { min-height: 5rem; resize: vertical; }
.apply__form ::placeholder { color: rgba(0, 0, 0, 0.5); }
.apply__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.apply__hint { font-size: 0.875rem; line-height: 1.4; }
.apply__form .apply__check { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; }
.apply__form .apply__check span { margin: 0; font-size: 0.875rem; font-weight: 400; line-height: 1.4; }
.apply__check input { width: 1.25rem; height: 1.25rem; margin: 0.1rem 0 0; accent-color: var(--black); }
.apply__msg { font-size: 0.9375rem; font-weight: 700; }
.apply__msg:empty { display: none; }
.apply__done p { margin: 1.25rem 0 1.5rem; font-size: 1.125rem; }

/* ---------- "Find us": every address with its QR code ---------- */
.finds { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; }
.find { display: grid; gap: 0.5rem; padding: 1.25rem; border: 1px solid var(--rule); }
.find--soon { color: var(--mute); }
.find__qr { width: 10rem; height: 10rem; padding: 0.4rem; background: var(--white); }
.find__title { font: 800 1.5rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.find__url { overflow-wrap: anywhere; }
a.find__url { color: var(--lime); }
.find__note { color: var(--mute); font-size: 0.875rem; }
.find__warn { margin-top: 2rem; }

/* ---------- Club values (the four icons of the brand book) ---------- */
.values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 2rem; margin-block: var(--space); padding-block: 2rem; border-block: 1px solid var(--rule); }
.value { display: grid; justify-items: center; gap: 0.6rem; text-align: center; }
.value__icon { width: clamp(3.5rem, 6vw, 4.5rem); height: auto; color: #c9a227; /* the gold of the brand book */ }
.value__name { font: 800 1.5rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.value__text { max-width: 18rem; color: var(--soft); font-size: 0.9375rem; line-height: 1.4; }
@media (max-width: 52rem) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Jahrvis: the helper in the corner ---------- */
.jarvis__btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1.1rem 0.4rem 0.9rem;
  border: 2px solid var(--black);
  border-radius: 2rem;
  background: var(--lime);
  color: var(--black);
  font: 800 1.25rem/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.5);
}
.jarvis__btn:hover { background: var(--white); }
.jarvis__btn svg { flex: none; }
.age-ask .jarvis__btn, .jarvis-open .jarvis__btn { display: none; }
.jarvis {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 45;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  width: min(100% - 2rem, 24rem);
  height: min(32rem, 100dvh - 2rem);
  border: 2px solid var(--lime);
  background: var(--black);
  color: var(--white);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.6);
}
.jarvis[hidden] { display: none; }
.jarvis__head { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.5rem 0.5rem 1rem; border-bottom: 1px solid var(--rule); }
.jarvis__head strong { font: 800 1.5rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--lime); white-space: nowrap; }
.jarvis__face { flex: none; color: var(--lime); }
.jarvis__mode { flex: 1; color: var(--mute); font-size: 0.75rem; line-height: 1.2; }
.jarvis__close { width: 2.5rem; height: 2.5rem; border: 0; background: none; color: inherit; font: 800 2rem/1 var(--display); cursor: pointer; }
.jarvis__log { display: grid; gap: 0.5rem; align-content: start; padding: 0.75rem 1rem; overflow-y: auto; font-size: 0.9375rem; line-height: 1.4; }
.jarvis__msg { max-width: 92%; padding: 0.5rem 0.75rem; border-radius: 0.75rem; overflow-wrap: anywhere; }
.jarvis__msg--bot { justify-self: start; background: #1c1c1a; border-bottom-left-radius: 0.2rem; }
.jarvis__msg--me { justify-self: end; background: var(--lime); color: var(--black); border-bottom-right-radius: 0.2rem; }
.jarvis__msg--wait { color: var(--mute); }
.jarvis__msg--err { color: var(--orange); }
.jarvis__msg a { color: var(--lime); }
.jarvis__msg--me a { color: inherit; }
.jarvis__link { display: block; margin-top: 0.4rem; font-weight: 700; }
.jarvis__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.5rem; }
.jarvis__chips[hidden] { display: none; }
.jarvis__chip { padding: 0.3rem 0.6rem; border: 1px solid var(--rule); border-radius: 1rem; background: none; color: var(--soft); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer; }
.jarvis__chip:hover { border-color: var(--lime); color: var(--lime); }
.jarvis__form { display: grid; grid-template-columns: minmax(0, 1fr) 3rem; border-top: 1px solid var(--rule); }
.jarvis__form input { min-width: 0; padding: 0.7rem 1rem; border: 0; background: none; color: var(--white); font: inherit; }
.jarvis__form input:focus-visible { outline: 0; box-shadow: inset 0 -2px 0 var(--lime); }
.jarvis__send { border: 0; background: var(--lime); color: var(--black); font: 800 1.5rem/1 var(--display); cursor: pointer; }
.jarvis__send:disabled { background: var(--mute); cursor: wait; }
.jarvis__note { padding: 0.35rem 1rem 0; color: var(--mute); font-size: 0.6875rem; line-height: 1.35; }
.jarvis__note:last-child { padding-bottom: 0.6rem; }
.jarvis__note a { color: var(--soft); }
@media (max-width: 40rem) {
  .jarvis { right: 0; bottom: 0; width: 100%; height: min(34rem, 100dvh); border-width: 2px 0 0; }
}

/* ---------- Age question ---------- */
.age {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.age-ask .age { display: grid; }
.age-ask body { overflow: hidden; }
.age__box { width: min(100%, 30rem); padding: clamp(1.5rem, 5vw, 2.5rem); background: var(--lime); color: var(--black); }
.age__title { font-size: clamp(2.75rem, 10vw, 4.5rem); line-height: 1; }
.age__box p { margin: 1rem 0 1.5rem; font-size: 0.9375rem; }
.age__actions { display: grid; grid-template-columns: 1fr 2fr; gap: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .strain__img { transition: none; }
  .strain:hover .strain__img { transform: none; }
}
