.skip-link { position: fixed; top: 8px; left: 12px; transform: translateY(-180%); padding: .8rem 1rem; background: var(--white); border: 2px solid var(--blue); border-radius: 10px; z-index: 10; font-size: 1rem; min-height: 44px; }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--paper); position: relative; z-index: 3; }
.header-inner { width: min(1180px, calc(100% - 80px)); margin-inline: auto; min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1rem; }
.notebook-name { text-decoration: none; font-size: 1.55rem; line-height: 1.1; display: inline-flex; flex-direction: column; justify-content: center; min-height: 60px; color: var(--blue-deep); }
.notebook-name span { font-family: Arial, Helvetica, sans-serif; font-size: max(16px, .9rem); line-height: 1.5; margin-top: .2rem; color: var(--ink); }
.notebook-menu { position: relative; font-size: 1rem; }
.notebook-menu > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 52px; padding: .65rem 1rem .65rem 1.25rem; background: var(--mustard); color: var(--ink); border-radius: 100px; list-style: none; font-size: 1rem; }
.notebook-menu > summary::-webkit-details-marker { display: none; }
.menu-mark { font-size: 1.5rem; line-height: 1; }
.notebook-menu[open] .menu-mark { transform: rotate(45deg); }
.menu-pages { position: absolute; top: calc(100% + 12px); right: 0; width: 360px; max-width: calc(100vw - 40px); background: var(--white); border: 3px solid var(--blue); border-radius: 22px; padding: .5rem; box-shadow: 0 8px 0 #dfedf0; }
.menu-pages a { display: flex; flex-direction: column; padding: .8rem; min-height: 72px; text-decoration: none; border-radius: 12px; }
.menu-pages a + a { margin-top: .2rem; }
.menu-pages a:hover, .menu-pages a[aria-current] { background: var(--sky); }
.menu-pages a strong { font-size: 1.05rem; }
.menu-pages a span { font-size: max(16px, .9rem); color: var(--ink); line-height: 1.5; }
.site-footer { margin-top: 3rem; background: var(--sky); border-top: 8px solid var(--mustard); }
.footer-inner { width: min(1180px, calc(100% - 80px)); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: start; gap: 2rem; padding-block: 2.5rem; }
.footer-inner p { max-width: 52ch; font-size: 1rem; }
.footer-inner nav { display: flex; flex-direction: column; align-items: flex-start; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 48px; min-width: 44px; padding-block: .5rem; font-size: 1rem; }
.back-to-top { gap: .5rem; }

@media (max-width: 800px) {
  .header-inner { width: calc(100% - 40px); }
  .footer-inner { width: calc(100% - 40px); grid-template-columns: 1fr 1fr; }
  .footer-inner p { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .header-inner { min-height: 104px; gap: .5rem; }
  .notebook-name { font-size: 1.25rem; }
  .notebook-name span { font-size: 1rem; }
  .notebook-menu > summary { max-width: 160px; gap: .7rem; padding: .6rem .85rem; font-size: 1rem; line-height: 1.3; }
  .menu-pages a span { font-size: 1rem; }
  .footer-inner { display: flex; flex-direction: column; gap: 1rem; padding-block: 2rem; }
}
