/* Header, links and controls */
.brand .brand-mark { width: 47px; height: 47px; flex: none; border-radius: 50%; }
.navlinks { gap: clamp(12px, 1.45vw, 23px); }
.navlinks a { position: relative; padding-block: 10px; white-space: nowrap; }
.navlinks a::after {
  content: ""; position: absolute; left: 1px; right: 1px; bottom: 4px; height: 2px;
  background: var(--clay); border-radius: 4px; transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.navlinks :is(a:hover, a:focus-visible, [aria-current])::after { transform: scaleX(1); }
.navlinks [aria-current], .navmobile [aria-current] { color: var(--clay); }
.navmobile { border-radius: 0 0 20px 20px; }
.navmobile a { padding: 11px 14px; border-radius: 11px; }
.navmobile a:hover, .navmobile [aria-current] { background: #f4eddb; }
.mobilemenu[open] summary { background: var(--soft); }
.btn { position: relative; min-height: 46px; transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.btn.primary { box-shadow: 0 3px 0 #0e3027; }
.btn.light { box-shadow: 0 2px 0 #d9dfce; }
.btn.primary:hover { box-shadow: 0 5px 0 #10372c; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn .icon, .back .icon, .ageband .arr, .districts a > .icon { transition: transform .2s ease; }
.btn:is(:hover,:focus-visible) .icon,.back:is(:hover,:focus-visible) .icon,
a:is(:hover,:focus-visible) .back .icon,.districts a:hover > .icon { transform: translateX(3px); }
.back { text-decoration: underline; text-underline-offset: .29em; text-decoration-color: #91a591; text-decoration-thickness: 1px; }
.foot a, .prose a:not(.btn), .breadcrumb a { text-decoration-thickness: 1px; text-underline-offset: .24em; }
.foot a:hover { color: #ffe3a4; }
.ageband a { position: relative; }
.ageband a:hover .arr { transform: translateX(4px); }
.ageband a:hover b { color: var(--clay); }
.workcard, .guidecard, .age-card, .program-card { transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease; }
.workcard:is(:hover,:focus-visible), .guidecard:is(:hover,:focus-visible),
.age-card:is(:hover,:focus-visible), .program-card:is(:hover,:focus-visible) {
  transform: translateY(-3px); border-color: #a9b99c; box-shadow: 0 12px 26px #153f3511;
}
.age-card { display: flex; flex-direction: column; text-decoration: none; border-top: 4px solid var(--tone, #d38752); }
.age-card:nth-child(2) { --tone: #94aa75; } .age-card:nth-child(3) { --tone: #e6b44c; }
.age-card .back { padding-top: 18px; margin-top: auto; }
.program-card { color: inherit; text-decoration: none; }
.program-card .back { margin-top: 5px; }

/* Illustrated program pages */
.story-start { background: var(--story-paper,#f7efdb); border-bottom: 1px solid #dddcc9; }
.story-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(180px,.6fr); align-items: center; gap: clamp(28px,6vw,90px); padding-block: 32px 45px; }
.story-start h1 { max-width: 17ch; font-size: clamp(43px,5.5vw,78px); line-height: 1.02; margin: 0 0 18px; }
.story-start h1 em, .visit-card h2 em { display: block; font: italic 1.04em/.98 Georgia,serif; color: var(--clay); letter-spacing: -.055em; }
.story-start .deck { max-width: 58ch; margin: 0; }
.story-start .klabel { margin-bottom: 12px; }
.story-art { justify-self: end; width: min(100%,265px); height: clamp(190px,21vw,295px); margin: 0 12px 0 0; overflow: hidden; border: 6px solid #fffaf0; border-radius: 50% 50% 42% 42% / 40% 40% 20% 20%; box-shadow: 0 4px 0 #d5c8a8,0 10px 22px #56442512; transform: rotate(2deg); }
.story-art img { width: 100%; height: 100%; object-fit: cover; }
.story-start.doga { --story-paper: #edf2df; }
.story-start.sanat { --story-paper: #fbeddf; }
.story-content { align-items: start; }
.story-content .prose h2 { letter-spacing: -.035em; }
.story-content .prose section + section { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 26px; }
.story-content .prose section p { margin-bottom: 0; }
.story-side { padding: clamp(21px,3vw,31px); border: 1px solid #d0dcc4; background: #edf3e6; border-radius: 23px 23px 23px 6px; }
.story-side h2 { font-size: 27px; }
.story-side .btn { margin-top: 4px; }
.related-reads { display: grid; margin-top: 22px; }
.related-reads a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; font-weight: 650; text-decoration: none; border-top: 1px solid var(--line); }
.related-reads a:hover { color: var(--clay); }
.visit { padding-block: clamp(40px,5vw,78px); }
.visit-card { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); align-items: stretch; background: #f6efdd; border: 1px solid #dfd6bd; border-radius: 26px; overflow: hidden; }
.visit-copy { padding: clamp(26px,4vw,58px); align-self: center; }
.visit-copy address { font-style: normal; margin: 14px 0 20px; }
.visit-card iframe { width: 100%; min-height: 320px; height: 100%; display: block; border: 0; background: #e3e8d8; }
.about-intro .story-art { width: min(100%,350px); }
.about-intro .story-art img { object-position: 52% 45%; }
.about-links { display: flex; flex-wrap: wrap; gap: 13px 20px; align-items: center; }

/* The first-visit mark is decorative and never captures input. */
.welcome { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html.show-welcome .welcome {
    display: flex; position: fixed; z-index: 30; inset: 0; align-items: center; justify-content: center; flex-direction: column;
    gap: 13px; pointer-events: none; background: radial-gradient(ellipse at center,#fffcf3 35%,#f6eddb 100%);
    animation: welcome-away .33s .78s ease-in both;
  }
  .welcome img { width: clamp(78px,12vw,104px); height: auto; border-radius: 50%; animation: bloom .62s cubic-bezier(.2,.8,.22,1) both; }
  .welcome strong { font: 800 clamp(23px,3vw,34px)/1.1 var(--head); color: var(--ink); letter-spacing: -.045em; }
  .welcome small { color: var(--leaf); font-weight: 700; font-size: 10px; letter-spacing: .23em; }
  .welcome strong,.welcome small { animation: title-in .5s .11s both; }
  @keyframes bloom { from { opacity: .05; transform: scale(.73) rotate(-23deg); } to { opacity: 1; transform: none; } }
  @keyframes title-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes welcome-away { 0% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: document-out .17s ease-out both; }
  ::view-transition-new(root) { animation: document-in .27s cubic-bezier(.2,.75,.3,1) both; }
  @keyframes document-out { to { opacity: 0; } }
  @keyframes document-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
  html.enter-page main { animation: document-in .3s ease-out both; }
  .mobilemenu[open] .navmobile { animation: title-in .18s ease-out both; }
  .just-revealed { animation: section-rise .38s ease-out both; }
  @keyframes section-rise { from { opacity: .68; transform: translateY(9px); } to { opacity: 1; transform: none; } }
}
@media (max-width:1000px) {
  .navlinks { display: none; } .mobilemenu { display: block; } .bar>.btn { margin-left: auto; }
}
@media (max-width:730px) {
  .brand .brand-mark { width: 39px; height: 39px; }
  .story-grid { grid-template-columns: minmax(0,1fr) 100px; gap: 14px; padding-block: 23px 28px; }
  .story-grid > div:first-child { display: contents; }
  .story-grid .klabel { grid-column: 1/-1; margin: 0; }
  .story-grid h1 { grid-row: 2; margin: 0; font-size: clamp(36px,7.5vw,53px); }
  .story-grid .story-art { grid-column: 2; grid-row: 2; width: 92px; height: 110px; border-width: 3px; margin-right: 3px; }
  .story-grid .deck { grid-column: 1/-1; grid-row: 3; }
  .visit-card { grid-template-columns: 1fr; }
  .visit-card iframe { height: 280px; min-height: 0; }
  .visit-card h2 em { display: inline; }
}
@media (max-width:370px) {
  .bar { gap: 7px; } .brand { gap: 5px; } .brand strong { font-size: 17px; }
  .brand .brand-mark { width: 31px; height: 31px; } .bar>.btn { padding-inline: 8px; }
  .story-grid { grid-template-columns: minmax(0,1fr) 75px; } .story-grid .story-art { width: 70px; height: 90px; }
}
@media print {
  .welcome, .visit-card iframe { display: none !important; }
  .visit-card { display: block; }
}
