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

:root {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-pale: #eff4ff;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: system-ui, sans-serif;
  --text: #111;
}

body {
  font-family: var(--font-serif);
  background: #fff;
  color: var(--text);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 4rem;
}

a { text-decoration: none; color: inherit; }

/* LOGO */
.nav-logo {
  position: relative;
  display: inline-grid;
  align-items: center;
  justify-items: start;
  flex-shrink: 0;
}
.logo-full,
.logo-short {
  grid-area: 1 / 1;
  transition: opacity 0.3s ease;
}
.logo-short {
  opacity: 0;
  pointer-events: none;
}
.nav-logo.collapsed .logo-full {
  opacity: 0;
  pointer-events: none;
}
.nav-logo.collapsed .logo-short {
  opacity: 1;
  pointer-events: auto;
}
.logo-line {
  display: inline-block;
  width: 1em;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 0.35em;
  position: relative;
  top: -0.08em;
}
.logo-full .logo-line {
  width: 2em;
}
.logo-short .logo-line {
  width: 1em;
}
.logo-line::before,
.logo-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}
.logo-line::before { left: -2px; }
.logo-line::after { right: -2px; }

/* NAV */
.topbar {
  font-family: var(--font-sans);
  font-size: 11px;
  text-align: center;
  padding: 6px 1rem;
  background: var(--accent-pale);
  color: #555;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem 1rem;
  border-bottom: 0.5px solid rgba(0,0,0,0.15);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 200;
}
.nav-logo {
  font-size: 16px;
  font-style: italic;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #555;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: #333;
}

/* NAV DROPDOWN (Семинары) */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dd-toggle {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #555;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}
.nav-dropdown:hover .nav-dd-toggle,
.nav-dropdown:focus-within .nav-dd-toggle,
.nav-dd-toggle.active { color: var(--accent); }
.nav-dd-caret {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: transform 0.2s ease;
}
.nav-dropdown:hover .nav-dd-caret,
.nav-dropdown:focus-within .nav-dd-caret,
.nav-dropdown.open .nav-dd-caret { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 232px;
  background: #fff;
  border: 0.5px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 250;
}
/* invisible bridge so the menu doesn't drop when crossing the gap */
.nav-dd-menu::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 0.6rem;
}
.nav-dropdown:hover .nav-dd-menu,
.nav-dropdown:focus-within .nav-dd-menu,
.nav-dropdown.open .nav-dd-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dd-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 7px;
  transition: background 0.15s;
}
.nav-dd-item:hover { background: #f5f6f8; }
.nav-dd-name {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #333;
  flex: 1;
  white-space: nowrap;
}
.nav-dd-tag {
  font-family: var(--font-sans);
  font-size: 10.5px;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* HERO */
.hero {
  position: relative;
  padding: 4rem 2rem 3rem;
  overflow: hidden;
}
.hero-paper {
  position: absolute;
  top: -2rem;
  right: -4rem;
  width: 340px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.hero-title {
  font-size: 36px;
  font-weight: normal;
  font-style: italic;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* BUTTONS */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 0.6rem 1.4rem;
  border: 1px solid #ccc;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  color: var(--text);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-sm { font-size: 12px; padding: 0.45rem 1rem; }

/* SECTION LABEL */
.sec-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 1.25rem;
}

/* ABOUT */
.about {
  padding: 2rem 2rem 3rem;
}
.about-text {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}

/* VALUES */
.values {
  padding: 0 2rem 3rem;
}
.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}
.value-card {
  padding: 1.5rem;
  border: 0.5px solid rgba(0,0,0,0.1);
  border-radius: 8px;
}
.value-title {
  font-size: 18px;
  font-style: italic;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: bold;
}
.value-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #555;
  line-height: 1.55;
}

/* TOPICS (С чем к нам приходят) */
.topics-section {
  padding: 2rem 2rem 3rem;
}
.topics-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.topic-tag {
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 0.6rem 1.25rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 999px;
  color: #333;
  transition: all 0.2s;
  cursor: default;
}
.topic-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* COURSES SECTION (main page) */
.courses-section {
  padding: 2rem 2rem 3rem;
}
/* Old card style kept for compat */
.course-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
}
.course-card:last-child { border-bottom: none; }

/* New full course card */
.course-card-full {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.75rem;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 12px;
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, #f7f9ff 0%, #fff 55%);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.05);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}
a.course-card-link {
  color: inherit;
  cursor: pointer;
}
a.course-card-link:hover {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
  background: #fff;
}
a.course-card-link:hover .course-title {
  color: var(--accent);
}
a.course-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* Active (enrollment open) card — subtle highlight */
.course-card-full.card-active {
  border-color: rgba(37, 99, 235, 0.38);
  background: linear-gradient(180deg, #eef4ff 0%, #fff 60%);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.1);
}
.course-card-body {
  flex: 1;
}
.course-card-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}
.course-meta-col {
  display: flex;
  gap: 0.5rem;
}
.course-title {
  font-size: 22px;
  font-style: italic;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.course-title a { transition: color 0.2s; }
.course-title a:hover { color: var(--accent); }
.course-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.course-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  color: #999;
}
.course-status {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}
.course-card-photo {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 100px;
}
.teacher-photo-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(37, 99, 235, 0.35);
}
.teacher-info {
  text-align: center;
}
.course-teacher {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.teacher-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.teacher-name {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.teacher-role {
  font-family: var(--font-sans);
  font-size: 12px;
  color: #888;
}

.status-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
}
.status-open {
  background: #e6f4ea;
  color: #2d7a3a;
}
.status-closed {
  background: var(--accent-pale);
  color: var(--accent-dark);
}

.meta-tag {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--accent-dark);
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: var(--accent-pale);
  border-radius: 20px;
}

/* JOIN */
.join {
  text-align: center;
  padding: 3rem 2rem;
}
.join-title {
  font-size: 22px;
  font-style: italic;
  font-weight: normal;
  margin-bottom: 0.5rem;
}
.join-sub {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #555;
  margin-bottom: 1.5rem;
}
.join-contacts {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* COURSE PAGE */
.course-page {
  padding: 2rem 1.5rem;
}
.course-hero {
  margin-bottom: 1.75rem;
}
.course-hero-title {
  font-size: 28px;
  font-weight: normal;
  font-style: italic;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.course-hero-desc {
  font-family: var(--font-sans);
  font-size: 15px;
  color: #555;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.course-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* COURSE AUTHOR */
.course-author {
  margin-bottom: 1.75rem;
}
.author-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: 0.5px solid rgba(0,0,0,0.12);
  border-radius: 10px;
}
.author-photo {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-pale);
}
.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-info {
  flex: 1;
}
.author-name {
  font-size: 20px;
  font-style: italic;
  margin-bottom: 0.3rem;
}
.author-role {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #888;
  margin-bottom: 1rem;
  white-space: pre-wrap;
}

.author-role::after {
  content: "";
  display: block;
}
.author-bio {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
  color: #555;
  margin-bottom: 1rem;
}
.author-bio p {
  margin-bottom: 0.5rem;
}
.author-bio p:last-child {
  margin-bottom: 0;
}
.author-social {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.social-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 999px;
  color: #555;
  transition: all 0.2s;
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* AUTHOR PHOTO LIGHTBOX */
.author-photo-trigger {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 2rem;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0.5rem;
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover {
  opacity: 1;
}

/* COURSE ABOUT */
.course-about {
  margin-bottom: 1.75rem;
}
.course-about-text {
  font-size: 14px;
  line-height: 1.75;
}
.course-about-text p {
  margin-bottom: 1rem;
}
.course-about-text p:last-child {
  margin-bottom: 0;
}

/* FEATURES */
.course-features {
  margin-bottom: 1.75rem;
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.feature-item {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #2a2a2a;
  padding: 0.8rem 1rem 0.8rem 2.3rem;
  border: 0.5px solid transparent;
  border-radius: 10px;
  line-height: 1.5;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-item::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.07);
}
/* Rotating colour palette for feature cards */
.features-grid .feature-item:nth-child(6n+1) { background: #eff4ff; }
.features-grid .feature-item:nth-child(6n+1)::before { background: #2563eb; }
.features-grid .feature-item:nth-child(6n+2) { background: #e6f5f3; }
.features-grid .feature-item:nth-child(6n+2)::before { background: #0d9488; }
.features-grid .feature-item:nth-child(6n+3) { background: #fdf3e7; }
.features-grid .feature-item:nth-child(6n+3)::before { background: #d97706; }
.features-grid .feature-item:nth-child(6n+4) { background: #fdeef5; }
.features-grid .feature-item:nth-child(6n+4)::before { background: #db2777; }
.features-grid .feature-item:nth-child(6n+5) { background: #f3edfd; }
.features-grid .feature-item:nth-child(6n+5)::before { background: #7c3aed; }
.features-grid .feature-item:nth-child(6n+6) { background: #e7f6ef; }
.features-grid .feature-item:nth-child(6n+6)::before { background: #059669; }

/* MODULES / PROGRAM */
.course-program {
  margin-bottom: 1.75rem;
}
.modules-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.module-item {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}
.module-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-pale);
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
}
.module-title {
  font-size: 16px;
  font-style: italic;
  margin-bottom: 0.3rem;
}
.module-week {
  color: var(--accent);
}
.module-text {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #555;
  line-height: 1.55;
}
/* Inline book reference (used where book is embedded in text) — neutral, no colour */
.module-book {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
}
.module-body {
  flex: 1;
  min-width: 0;
}
/* Two columns under the title: intro (left) + the work to read (right) */
.module-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: center;
  margin-top: 0.5rem;
}
/* keep title tight to its intro text */
.module-intro .module-title { margin-bottom: 0.4rem; }
/* Work card — a torn, crumpled-paper note (no geometric frame) */
.module-work {
  position: relative;
  cursor: help;
  outline: none;
}
.work-paper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 270px;
  min-height: 168px;
  margin: 0 auto;
  padding: 1.8rem 1.9rem;
}
/* faint, untilted paper wash behind the text — like the hero paper */
.work-paper::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: 0;
  background: url('/img/paper-note-1.png') center / 100% 100% no-repeat;
  opacity: 0.92;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.05));
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.modules-list .module-item:nth-child(even) .work-paper::before {
  background-image: url('/img/paper-note-2.png');
}
.module-work:hover .work-paper::before,
.module-work:focus-within .work-paper::before,
.module-work:focus .work-paper::before {
  opacity: 1;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.07));
}
.work-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  width: 100%;
}
.work-portrait {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.work-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.work-portrait-mono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
}
.work-info { min-width: 0; }
.work-book {
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  font-weight: normal;
  color: #2a2a2a;
  line-height: 1.3;
}
.work-author {
  font-family: var(--font-sans);
  font-size: 12px;
  color: #888;
  margin-top: 0.15rem;
}
/* Quote — revealed on hover/focus of the work card */
.work-quote {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 9px);
  z-index: 5;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: #fff;
  background: #20242e;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}
.work-quote::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 26px;
  border: 6px solid transparent;
  border-top-color: #20242e;
}
.module-work:hover .work-quote,
.module-work:focus-within .work-quote,
.module-work:focus .work-quote {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Rotating colour palette: number badge + author monogram share a hue per week */
.modules-list .module-item:nth-child(6n+1) .module-num,
.modules-list .module-item:nth-child(6n+1) .work-portrait-mono { background: #e8e8e8; color: #3f3f3f; }
.modules-list .module-item:nth-child(6n+2) .module-num,
.modules-list .module-item:nth-child(6n+2) .work-portrait-mono { background: #e6f5f3; color: #0d9488; }
.modules-list .module-item:nth-child(6n+3) .module-num,
.modules-list .module-item:nth-child(6n+3) .work-portrait-mono { background: #fdf3e7; color: #d97706; }
.modules-list .module-item:nth-child(6n+4) .module-num,
.modules-list .module-item:nth-child(6n+4) .work-portrait-mono { background: #fdeef5; color: #db2777; }
.modules-list .module-item:nth-child(6n+5) .module-num,
.modules-list .module-item:nth-child(6n+5) .work-portrait-mono { background: #f3edfd; color: #7c3aed; }
.modules-list .module-item:nth-child(6n+6) .module-num,
.modules-list .module-item:nth-child(6n+6) .work-portrait-mono { background: #e7f6ef; color: #059669; }

/* VIDEOS */
.course-videos {
  margin-bottom: 1.75rem;
}
.videos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}
.video-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f0f4fa 0%, #e8ecf4 100%);
  border: 0.5px dashed rgba(37, 99, 235, 0.2);
  border-radius: 8px;
}
.video-placeholder-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-placeholder-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--accent);
  opacity: 0.5;
}
.video-placeholder-text {
  font-family: var(--font-sans);
  font-size: 11px;
  color: #aaa;
  letter-spacing: 0.05em;
}
.video-title {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #555;
}

/* REQUIRES */
.course-requires {
  margin-bottom: 1.75rem;
}
.requires-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.requires-list li {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #333;
  line-height: 1.55;
  padding-left: 1.25rem;
  position: relative;
}
.requires-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* CTA */
.course-cta {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 0.5px solid rgba(0,0,0,0.08);
}
.cta-text {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #555;
  margin-bottom: 1rem;
}
.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* VOTE & SUBSCRIBE */
.vote-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.vote-count {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-pale);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  min-width: 2.5rem;
  text-align: center;
}
.vote-btn-done {
  background: #f0f0f0;
  border-color: #ddd;
  color: #999;
  cursor: default;
}
.vote-btn-done:hover {
  background: #f0f0f0;
  border-color: #ddd;
  color: #999;
}
.vote-plus {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: none;
  opacity: 0;
}
.vote-plus.animate {
  display: inline;
  animation: plusAppearFade 2.5s ease forwards;
}
@keyframes plusAppearFade {
  0% { opacity: 0; transform: translateY(4px); }
  15% { opacity: 1; transform: translateY(-4px); }
  60% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(0); }
}
.vote-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.vote-form .subscribe-input {
  width: 100%;
}
.vote-form .vote-submit-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.vote-done {
  text-align: center;
}
.vote-done .vote-row span:last-child {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #888;
}
.cta-text-accent {
  color: var(--accent);
}
.subscribe-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}
.subscribe-input:focus {
  border-color: var(--accent);
}
.subscribe-offer {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 12px;
  color: #888;
  text-align: left;
  cursor: pointer;
}
.subscribe-offer input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent);
}
.subscribe-done .cta-text {
  color: var(--accent);
}

/* SUBSCRIBE MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 1.5rem;
}
.modal.active { opacity: 1; visibility: visible; }
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 2rem 1.75rem 1.75rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}
.modal.active .modal-card { transform: none; }
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: #b0b0b0;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-family: var(--font-sans);
  transition: color 0.2s;
}
.modal-close:hover { color: #333; }
.modal-title {
  font-size: 22px;
  font-style: italic;
  font-weight: normal;
  line-height: 1.2;
  margin-bottom: 0.45rem;
}
.modal-sub {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #666;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.subscribe-form .btn-primary { width: 100%; }
.subscribe-status {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  min-height: 1.2em;
}
.subscribe-status.ok { color: #2d7a3a; }
.subscribe-status.err { color: #c44; }

/* FOOTER */
.footer {
  border-top: 0.5px solid rgba(0,0,0,0.1);
  padding: 2.5rem 2rem 1.5rem;
  margin-top: 2rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.footer-logo {
  font-size: 14px;
  font-style: italic;
  color: #666;
}
.footer-logo .logo-line { width: 2em; }
.footer-copy {
  font-family: var(--font-sans);
  font-size: 12px;
  color: #999;
  margin-top: 0.25rem;
}
.footer-projects {
  display: flex;
  gap: 2.5rem;
}
.footer-project a {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--accent);
}
.footer-project-desc {
  font-family: var(--font-sans);
  font-size: 11px;
  color: #999;
  margin-top: 0.15rem;
}
.footer-bottom {
  border-top: 0.5px solid rgba(0,0,0,0.06);
  padding-top: 1.25rem;
}
.footer-contacts a {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #555;
  margin-right: 1.25rem;
}
.footer-contacts a:hover { color: var(--accent); }

/* SINGLE PAGE */
.page-single {
  padding: 3rem 2rem;
}
.page-single h1 {
  font-size: 28px;
  font-weight: normal;
  font-style: italic;
  margin-bottom: 1.5rem;
}
.page-content {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}
.page-content a {
  color: var(--accent);
  text-decoration: underline;
}

/* LIST PAGE */
.list-page {
  padding: 3rem 2rem;
}
.list-item {
  margin-bottom: 1.5rem;
}
.list-item a {
  font-size: 18px;
  font-style: italic;
}
.list-item a:hover { color: var(--accent); }
.list-item p {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #555;
  margin-top: 0.3rem;
}

/* ===== RESPONSIVE: TABLET (<=768px) ===== */
@media (max-width: 768px) {
  body { padding: 0 0 2rem; }

  .burger { display: flex; flex-shrink: 0; z-index: 2; }
  .nav.is-scrolled {
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem 2rem;
    border-bottom: 0.5px solid rgba(0,0,0,0.15);
    gap: 1rem;
    z-index: 100;
  }
  /* keep sticky + logo collapse like desktop; sticky is the containing block for the burger panel */
  .nav.open .nav-links { display: flex; }
  /* Seminars dropdown: inline + always visible inside the burger menu */
  .nav-dropdown { display: block; }
  .nav-dd-toggle { justify-content: flex-start; cursor: default; }
  .nav-dd-caret { display: none; }
  .nav-dd-item { justify-content: flex-start; }
  .nav-dd-name { flex: 0 1 auto; }
  .nav-dd-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    border: none;
    box-shadow: none;
    padding: 0.5rem 0 0 0.85rem;
    margin-top: 0.4rem;
    gap: 0.35rem;
  }
  .nav-dd-menu::before { display: none; }
  /* override the desktop open/hover transform (higher specificity) so the
     static menu isn't shifted off-screen on mobile */
  .nav-dropdown:hover .nav-dd-menu,
  .nav-dropdown:focus-within .nav-dd-menu,
  .nav-dropdown.open .nav-dd-menu { transform: none; }

  .hero { padding: 2.5rem 1.5rem 2rem; }
  .hero-title { font-size: 28px; }
  .hero-sub br { display: none; }
  .hero-paper { width: 200px; top: -1rem; right: -2rem; }

  .about { padding: 2rem 1.5rem; }
  .values { padding: 0 1.5rem 2rem; }
  .values-grid { grid-template-columns: 1fr; }

  .topics-section { padding: 2rem 1.5rem; }

  .courses-section { padding: 2rem 1.5rem; }
  .course-card-full {
    flex-direction: column;
    gap: 1rem;
  }
  .course-card-side {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .course-card {
    flex-direction: column;
    gap: 1rem;
  }
  .course-status {
    align-items: flex-start;
    flex-direction: row;
  }

  .join { padding: 2rem 1.5rem; }
  .join-contacts { flex-direction: column; align-items: center; }

  .course-page { padding: 2rem 1.5rem; }
  .course-hero-title { font-size: 26px; }
  .course-hero-meta { gap: 0.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .videos-grid { grid-template-columns: 1fr; }
  .module-cols { grid-template-columns: 1fr; gap: 0.85rem; }
  .module-item-work { gap: 0; }
  .module-work { cursor: default; }
  /* No reliable hover on touch — show the quote inline */
  .work-quote {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    margin-top: 0.7rem;
    color: #444;
    background: #f1f1f3;
    box-shadow: none;
  }
  .work-quote::before { display: none; }
  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .author-photo {
    width: 120px;
    height: 120px;
  }
  .author-social {
    justify-content: center;
  }
  .lightbox {
    padding: 1rem;
  }
  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 2rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-top { flex-direction: column; gap: 1.5rem; }
  .footer-projects { gap: 1.5rem; }
}

/* ===== RESPONSIVE: SMALL (<=480px) ===== */
@media (max-width: 480px) {
  .hero-title { font-size: 24px; }
  .course-hero-title { font-size: 22px; }
}

/* ===== RESPONSIVE: LARGE SCREENS (>=1600px) ===== */
/* Token-gated pages — system notice, not editorial */
html.needs-access,
html.needs-access body {
  background: #eef1f6;
  min-height: 100vh;
}
html.needs-access body {
  max-width: none;
  margin: 0;
  padding: 0;
}
html.needs-access body > *:not(.access-gate) { display: none !important; }
html.access-ok .access-gate { display: none !important; }
.access-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #eef1f6;
}
.access-gate-card {
  text-align: left;
  max-width: 26rem;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1.4rem 1.5rem 1.35rem;
  box-shadow: 0 10px 32px rgba(17, 24, 39, 0.06);
}
.access-gate-kicker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.access-gate-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-pale);
  flex-shrink: 0;
}
.access-gate-title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.access-gate-text {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #555;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}
.access-gate-hint {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #5b6575;
  background: var(--accent-pale);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 1.15rem;
  line-height: 1.4;
}
.access-gate-hint code {
  font-family: inherit;
  color: var(--accent);
  font-weight: 600;
}

@media (min-width: 1600px) {
  body { max-width: 1000px; }
  .hero-title { font-size: 42px; }
  .hero-sub { font-size: 16px; }
  .about-text { font-size: 18px; }
  .course-title { font-size: 24px; }
  .course-desc { font-size: 15px; }
  .course-hero-title { font-size: 38px; }
  .course-hero-desc { font-size: 17px; }
  .course-about-text { font-size: 17px; }
  .module-title { font-size: 18px; }
  .module-text { font-size: 15px; }
  .module-book { font-size: 15px; }
  .work-book { font-size: 19px; }
  .work-quote { font-size: 14px; }
  .feature-item { font-size: 16px; }
  .value-title { font-size: 20px; }
  .value-desc { font-size: 15px; }
  .topic-tag { font-size: 16px; }
}
