/* Test version of the new structure (/v2/). Loaded after site.css and only
   adds blocks the current site does not have; everything else is site.css. */

/* Strip above the header: this is a draft, the live site is elsewhere. */
.v2-bar { background: var(--blue); color: #fff; font-size: 14px; font-weight: 500; text-align: center; padding: 8px var(--gutter); }
.v2-bar a { color: #fff; font-weight: 700; }

/* Six sections fit next to the logo down to a narrower width than eight. */
@media (max-width: 1400px) and (min-width: 1121px) {
  .v2 .nav { display: flex; }
  .v2 .menu { display: none; }
}
.menu-panel .menu-sub { color: #9ca3af; font-weight: 500; }

/* Unknown facts the client has to supply before launch. */
mark.todo { background: #fff3b0; color: #6b5200; padding: 0 4px; border-radius: 3px; font-weight: 600; }
.quote-band mark.todo, .hero mark.todo { color: #3d2f00; }

/* ---------- home: three ways in ---------- */

/* Same language as the rest of the site: black-and-white photo like the page
   banners, uppercase heading, and the concrete situations as plain links. */
.doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(28px, 3.5vw, 48px);
  margin-top: 48px;
}
/* Subgrid keeps photos, headings, texts and link lists on shared rows even
   when one heading wraps to two lines. */
.door { display: grid; grid-row: span 5; grid-template-rows: subgrid; align-content: start; }
.door ul { align-self: start; }
.door-img { display: block; overflow: hidden; margin-bottom: 24px; background: var(--black); }
.door-img img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 10%;
  filter: grayscale(1);
  transition: filter .35s, transform .5s ease;
}
.door:hover .door-img img { filter: none; transform: scale(1.02); }
.door .label { color: var(--blue); }
.door h3 {
  margin: 6px 0 14px;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}
.door h3 a { text-decoration: none; }
.door h3 a:hover { color: var(--blue); }
.door > p { font-size: 16px; color: var(--text); }
.door ul { list-style: none; margin-top: 20px; border-top: 2px solid #000; }
.door li { border-bottom: 1px solid var(--rule); }
.door li a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.door li a::after { content: "→"; color: var(--muted); transition: transform .15s, color .15s; }
.door li a:hover { color: var(--blue); }
.door li a:hover::after { color: var(--blue); transform: translateX(3px); }
@media (max-width: 960px) {
  .doors { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .door + .door { margin-top: 56px; }
  .door-img img { aspect-ratio: 16 / 10; object-position: 50% 15%; }
}

/* ---------- learning catalog ---------- */

.catalog { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 1080px; margin: 48px auto 0; }
.catalog > li { display: flex; flex-direction: column; background: #fff; padding: 32px; }
.section:not(.paper) .catalog > li { background: var(--paper); }
.catalog .label { color: var(--blue); margin-bottom: 8px; }
.catalog h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 12px; }
.catalog p { font-size: 16px; color: var(--text); }
.catalog dl { margin: 20px 0 0; font-size: 15px; }
.catalog dl div { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); }
.catalog dt { font-weight: 700; color: #000; }
.catalog dd { margin: 0; color: var(--text); }
.catalog .btns { margin-top: auto; padding-top: 24px; }
.catalog .btn-line { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.catalog .btn-line:hover { background: rgba(6, 147, 227, .08); }
@media (max-width: 860px) { .catalog { grid-template-columns: 1fr; } }

/* ---------- cases ---------- */

.case dl { margin: 24px 0 0; }
.case dl div { display: grid; grid-template-columns: 10em minmax(0, 1fr); gap: 4px 24px; padding: 16px 0; border-top: 1px solid var(--rule); font-size: 17px; }
.case dt { font-weight: 700; color: #000; }
.case dd { margin: 0; color: var(--text); }
@media (max-width: 600px) { .case dl div { grid-template-columns: 1fr; } }

/* ---------- about: collapsible details ---------- */

.more { max-width: 860px; margin: 40px auto 0; text-align: left; }
.more > details { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.more summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  font-weight: 600;
  font-size: 19px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; color: var(--blue); font-size: 26px; line-height: 1; font-weight: 400; }
.more details[open] summary::after { content: "−"; }
.more .results, .more .timeline { margin-top: 8px; margin-bottom: 32px; }

/* Home: the trainings block and the quote after it read as one white area,
   so two full section paddings (about 200px) looked like an empty hole. */
.upcoming.paper { padding-bottom: clamp(40px, 5vw, 64px); }
.upcoming.paper + .section { padding-top: clamp(32px, 4vw, 56px); }
/* .section.tight zeroes the top padding and outranks .upcoming from site.css,
   which left the heading glued to the block above. */
.section.upcoming { padding-top: clamp(48px, 6vw, 72px); }

/* ---------- footer: developer credit (same as on micbiotech.ru) ---------- */

.copyright:has(+ .credit) { padding-bottom: 12px; }
.credit {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 9px;
  padding: 14px var(--gutter) 28px;
  border-top: 1px solid #1f1f1f;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12.5px; letter-spacing: .02em; color: rgba(255, 255, 255, .5);
}
.credit-prompt { color: var(--blue); }
.credit a {
  color: rgba(255, 255, 255, .72);
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .28); text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}
.credit a:hover { color: var(--blue); text-decoration-color: var(--blue); }
.credit-caret { width: 7px; height: 14px; background: var(--blue); animation: credit-blink 1.15s steps(1) infinite; }
@keyframes credit-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .credit-caret { animation: none; } }

/* ---------- home: photos in the upcoming cards ---------- */

/* The photo spans the whole card above the date and text. The cards share
   rows (subgrid), so a card without a photo keeps that row empty and every
   date, heading and button stays on one line with its neighbours. */
.upcoming-list:has(.has-img) .event { grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
.upcoming-list .event > .event-img { grid-column: 1 / -1; grid-row: 1; max-width: none; margin-bottom: 22px; object-position: 50% 15%; }
.upcoming-list .event > .event-date, .upcoming-list .event > div { grid-row: 2; }
.upcoming-list .event > div { display: flex; flex-direction: column; }
.upcoming-list .event > div > .btn { margin-top: auto; align-self: flex-start; }
.upcoming-list .event > div > p:last-of-type { margin-bottom: 14px; }
@media (max-width: 900px) {
  .upcoming-list:has(.has-img) .event { grid-row: auto; grid-template-rows: auto auto; }
  .upcoming-list .event:not(.has-img) > .event-date, .upcoming-list .event:not(.has-img) > div { grid-row: 1; }
}
