#top h1 .hero-school { font-size: 32px; }
#top h1 .hero-name { font-size: clamp(60px, 6.6vw, 96px); }
#top .hero-lead { margin-top: 42px; margin-bottom: 8px; }

@media (min-width: 1101px) {
  #about > .container { margin-left: max(48px, calc((100% - var(--content-width)) / 2)); margin-right: auto; }
}

.site-footer { background: #fff; padding: 0 24px 110px; min-height: 379px; text-align: center; }
.site-footer > .container { width: min(880px, 100%); padding-top: 32px; border-top: 1px solid #e2e7f5; }
.site-footer p { margin: 0; color: #586b89; font: 400 14px/24px Arial, sans-serif; }
.site-footer p:last-child { margin-top: 30px; line-height: 34px; }
.site-footer a { color: #405476; }
.site-footer p:first-child a { color: #586b89; text-decoration: none; }

@media (min-width: 1280px) {
  #programs .program-card .reading-paper { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0 32px; align-items: start; }
  #programs .program-card .reading-paper > .program-type { grid-column: 1 / -1; grid-row: 1; }
  #programs .program-card .reading-paper > h3 { grid-column: 1; grid-row: 2 / 5; font-size: 32px; line-height: 1.25; }
  #programs .program-card .reading-paper > .program-preview { grid-column: 2; grid-row: 2; }
  #programs #program-01 .reading-paper > .program-preview-list { grid-column: 2; grid-row: 3; }
  #programs .program-card .reading-paper > .program-disclosure { grid-column: 2; grid-row: 4; min-width: 0; }
}

@media (min-width: 641px) and (max-width: 1000px) {
  #top h1 .hero-name { font-size: clamp(50px, 6.6vw, 66px); }
  #top .hero-lead { margin-top: 36px; margin-bottom: 12px; }
}

@media (max-width: 640px) {
  #top h1 .hero-school { font-size: 26px; }
  #top h1 .hero-name { font-size: clamp(30px, 9.5vw, 38px); }
  #top .hero-lead { margin-top: 30px; margin-bottom: 42px; }
  .site-footer { min-height: 426px; padding-bottom: 96px; }
  .site-footer > .container { padding-top: 22px; }
  .site-footer p:last-child { margin-top: 22px; line-height: 44px; }
  .site-footer p:first-child a { display: block; }
}

#programs .program-grid { --training-title-beam: #cce5f7; }
#programs .program-grid-closed { --training-title-beam: #e8def4; }
#programs .reading-paper > .program-type {
  margin: -28px -32px 0;
  padding: 28px 32px 16px;
  background: var(--training-title-beam);
}
#programs .reading-paper > h3 {
  margin-inline: -32px;
  padding: 0 32px 22px;
  background: var(--training-title-beam);
  border-bottom: 2px solid var(--training-title-beam);
}
@media (min-width: 1280px) {
  #programs .program-card .reading-paper { position: relative; }
  #programs .program-card .reading-paper::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: calc((100% - 96px) / 2.1 + 32px);
    border-right: 1px solid var(--line);
    border-radius: 8px 0 0 8px;
    background: var(--training-title-beam);
    pointer-events: none;
  }
  #programs .program-card .reading-paper > * { position: relative; }
  #programs .program-card .reading-paper > .program-type {
    grid-column: 1;
    margin: 0 0 16px;
    padding: 0;
    background: none;
  }
  #programs .program-card .reading-paper > h3 {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }
}
@media (max-width: 640px) {
  #programs .reading-paper > .program-type {
    margin: -24px -20px 0;
    padding: 24px 20px 16px;
  }
  #programs .reading-paper > h3 { margin-inline: -20px; padding-inline: 20px; }
}

#programs .program-card :is(.button, .reading-return),
#programs .program-grid .program-disclosure > summary,
#programs .program-grid .program-disclosure[open] > summary {
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid #536c9b;
  border-radius: 8px;
  background: #536c9b;
  box-shadow: none;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
#programs .program-card :is(.button, .reading-return):hover,
#programs .program-grid .program-disclosure > summary:hover,
#programs .program-grid .program-disclosure[open] > summary:hover {
  border-color: #455d8b;
  background: #455d8b;
  color: #fff;
}
#programs .program-card :is(.button, .reading-return):focus-visible,
#programs .program-grid .program-disclosure > summary:focus-visible {
  outline: 3px solid #304e79;
  outline-offset: 3px;
}
#programs .program-grid .program-disclosure > summary::after {
  border-color: currentColor;
  color: inherit;
}

@media (max-width: 640px) {
  #programs .catalog-rail > nav { display: none; }
}

#programs .reading-paper > .daily-program-title span { display: inline; margin: 0; font: inherit; color: inherit; }

#contacts-title { text-align: center; }
#contacts .contact-grid { margin-inline: auto; }
#contacts .contact-card { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 100px; color: #405476; font: inherit; cursor: pointer; text-align: center; text-decoration: none; }
#contacts .contact-card strong { min-height: 0; height: auto; margin: 0; font-size: clamp(20px, 2vw, 28px); line-height: 1.25; text-decoration: none; overflow-wrap: normal; }
#contacts .contact-card:hover { border-color: #829cbd; }
#contacts a.contact-card strong { text-decoration: none; }
.community-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #cfdaf0; border-radius: 12px; background: #f8f8ff; color: #405476; box-shadow: 0 24px 80px #1a304c33; }
.community-dialog::backdrop { background: #24364e66; }
.community-dialog-inner { position: relative; padding: 52px 28px 28px; }
.community-dialog h2 { margin-bottom: 24px; font-size: 30px; line-height: 1.2; text-align: center; }
.community-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #405476; font: 28px/1 Arial, sans-serif; cursor: pointer; }
.community-close:hover { background: #cce5f7; }
.community-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.community-options .button { min-width: 0; padding-inline: 16px; border-radius: 8px; background: #536c9b; box-shadow: none; }
.community-options .button:hover { background: #405780; }
html:has(.community-dialog[open]) { overflow: hidden; }

@media (max-width: 640px) {
  #programs .reading-paper > h3 { font-size: 29px; line-height: 1.2; }
  #programs .reading-paper > .daily-program-title span { display: block; white-space: nowrap; }
  #contacts .contact-grid { grid-template-columns: 1fr; gap: 12px; }
  #contacts .contact-card { min-height: 76px; padding: 18px 20px; }
}
@media (max-width: 360px) {
  .community-dialog-inner { padding-inline: 20px; }
  .community-options { grid-template-columns: 1fr; }
}
