/* Keep the established page palette and section order; contain the supplied artwork. */
html { overflow-x: clip; }
body { min-width: 280px; }
main, .wrap, .hero-top > *, .cap-grid > *, .svc-grid > *, .tiles > *, .bento > *, .aiie-grid > * { min-width: 0; }
h1, h2, h3, .tile strong, .role strong { overflow-wrap: break-word; }
.actions, .chips { min-width: 0; }
.btn { white-space: normal; text-align: center; }
.hero-top h1 { font-size: clamp(3.25rem, 8.8vw, 7.25rem); }
.hero .lead { max-width: 58ch; }
.hero-state { min-width: 0; flex: 1; }
.hero-state p { margin-bottom: 0; }
.hero-foot .dots { flex-wrap: wrap; justify-content: center; gap: 2px; }
.stage { min-width: 0; }
.stage-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stage-list li { min-width: 0; overflow-wrap: anywhere; }
.slide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.slide > .main-scene { width: 100%; max-height: 340px; }
.slide-copy { min-width: 0; grid-column: 1; grid-row: 1; }
.slide h2 { font-size: clamp(2.35rem, 4.5vw, 4rem); }
.tile-art, .boot-art, .cap-art {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--panel-2);
  aspect-ratio: 20 / 13;
  isolation: isolate;
}
.tile-art > svg.scn, .boot-art > svg.scn, .cap-art > svg.scn {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  grid-column: auto;
  grid-row: auto;
  object-fit: contain;
}
.tile-art { margin-bottom: 6px; }
.bento .tile { justify-content: flex-start; }
.bento .tile > strong { margin-top: 4px; }
.svc-tile { justify-content: flex-start; }
.svc-tile .svc-more { margin-top: auto; padding-top: 16px; }
.boot-art { margin-bottom: 24px; aspect-ratio: 2 / 1; }
.boot { display: flex; flex-direction: column; align-items: stretch; }
.boot > .actions { margin-top: auto !important; padding-top: 20px; }
.boot > .plain-list { margin-bottom: 16px; }
.role > .tile-art { margin-bottom: 16px; }
.cap-visual { display: grid; gap: 16px; position: sticky; top: calc(var(--header) + 76px); }
.cap-grid .cap-visual .diagram { position: static; }
.cap-details, .course-details {
  border: 1px solid var(--line-ink);
  border-radius: 14px;
  background: var(--panel-2);
  overflow: hidden;
}
.cap-details { margin-top: 24px; }
.cap-details summary, .course-details summary {
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 600;
  color: var(--accent-text);
  min-height: 48px;
}
.cap-details summary:hover, .course-details summary:hover { background: rgba(119, 185, 0, .08); }
.cap-details[open] > summary, .course-details[open] > summary { border-bottom: 1px solid var(--line-ink); }
.detail-grid { padding: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.detail-group { min-width: 0; }
.detail-group h4 { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 1rem; line-height: 1.4; color: var(--text); margin: 0 0 10px; }
.detail-group ul { margin: 0; padding-left: 20px; color: var(--muted); }
.detail-group li + li { margin-top: 6px; }
.course-details { margin-top: 6px; }
.tile::before { pointer-events: none; }
.tile > .course-details { position: relative; }
.training .tiles > .tile { align-self: start; }
.training .tiles > .tile > strong { min-height: 2.2em; }
.cap-details summary, .course-details summary { scroll-margin-top: calc(var(--header) + 80px); }
.course-details .detail-grid { grid-template-columns: 1fr; padding: 18px; gap: 18px; font-size: .92rem; }
.tiles > .tile > .actions { margin-top: auto; padding-top: 16px; }
.aiie-card .well { aspect-ratio: 20 / 13; min-height: 0; width: 100%; overflow: hidden; }
.aiie-card .well > svg.scn { width: 100%; height: 100%; max-height: none; grid-column: auto; grid-row: auto; }
.aiie-card .well { transform-origin: center; }
.aiie-card:hover .well, .aiie-card[aria-expanded="true"] .well { transform: scale(1.015); }
.filter { flex-wrap: wrap; }
.filter button { white-space: normal; }
.contact-form, .auth-card { min-width: 0; }
.contact-form input, .contact-form textarea, .auth-card input { max-width: 100%; }
.cms-hero-image { display: block; width: min(100%, 720px); max-height: 360px; object-fit: cover; border-radius: 18px; margin-top: 28px; }
.cms-panel-image { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 14px; margin-block: 16px; }
.cms-image-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; margin-block: 18px; }
.cms-image-grid .cms-panel-image { height: 200px; margin: 0; }
.cms-contact-details { display: grid; gap: 18px; margin-top: 24px; }
.cms-contact-details h3, .cms-contact-details strong { font-family: var(--sans); font-size: 1rem; text-transform: none; line-height: 1.4; margin-bottom: 6px; }
.cms-address { white-space: pre-line; font-style: normal; color: var(--muted); overflow-wrap: anywhere; }
.cms-qr { width: 120px; height: 120px; object-fit: contain; margin-top: 12px; }
.cms-contact-details a { overflow-wrap: anywhere; }
.contact .cms-address { color: var(--night-muted); }
.contact .cms-contact-details h3 { color: var(--night-text); }
@media (max-width: 939px) {
  .hero { min-height: 0; padding-top: 104px; padding-bottom: 32px; }
  .hero-top h1 { font-size: clamp(3.15rem, 11vw, 6.7rem); }
  .hero-foot { align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
  .hero-foot .dots { justify-content: flex-start; }
  .hero-foot .scroll-cue { display: none; }
  .slide { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .slide > .main-scene { max-height: 270px; grid-column: 1; grid-row: 1; justify-self: center; }
  .slide-copy { grid-column: 1; grid-row: 2; }
  .slide h2 { font-size: clamp(2.35rem, 7.5vw, 3.6rem); }
  .cap-visual { position: static; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .tile-art { max-height: 290px; }
}
@media (max-width: 540px) {
  .stage-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stage-list li { font-size: 11px; padding: 10px; }
  .hero-foot { display: grid; grid-template-columns: minmax(0, 1fr); }
  .hero-top h1 { font-size: clamp(2.7rem, 10.8vw, 3.8rem); }
  .hero .actions { align-items: stretch; }
  .hero .actions .btn { flex: 1 1 140px; }
  .slide { padding: 18px; }
  .slide-copy p { font-size: 1rem; }
  .course-details summary { padding: 12px; }
  .boot-art { aspect-ratio: 20 / 13; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-art *, .boot-art *, .cap-art *, .aiie-card .well { transition: none !important; }
  details[open] { scroll-behavior: auto; }
}
