/** * Layout styles * This file contains the layout styles for the application * Layout has 5 main parts: * - Header (header) * - Left menu (nav) * - Main content (main) * - Right sidebar (aside) * - Footer (footer) **/ /* Layout Container */ .layout { max-width: 100%; width: 1200px; min-width: 0; /* flex child of body: allow shrink so children don’t force page width */ margin: 0 auto; display: flex; flex-grow: 1; } nav { width: 21vw; min-width: 150px; max-width: 280px; flex-shrink: 0; padding: 1em; overflow-y: auto; /* Ensure the menu is scrollable if content is too long */ } nav ul { list-style-type: none; padding: 0; } nav li { margin: 0.5em 0; } nav a { color: var(--color-primary); text-decoration: none; } nav a:hover { color: var(--color-text-mid); text-decoration: none; } header { position: fixed; /* Use inset instead of 100vw: 100vw includes the vertical scrollbar and causes horizontal overflow on many viewports. */ left: 0; right: 0; top: 0; width: auto; box-sizing: border-box; } /* Desktop: breathing room under the browser chrome. Mobile gets inset via .header__logo padding in the max-width block below. */ @media (min-width: 1025px) { header { padding-top: max(0.65rem, env(safe-area-inset-top, 0px)); } } /* Hamburger button */ .hamburger { cursor: pointer; display: none; /* Hidden on desktop */ font-size: 26px; } .header__logo { display: flex; width: 100%; justify-content: center; } #progress-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; transform-origin: left center; background: var(--color-primary); transition: width 0.4s ease; z-index: 1000; overflow: hidden; pointer-events: none; } /* * In-flight navigation: a full-width track with a short segment that sweeps left → right * (do not keyframe the track width: 20% / 55% / 28% read as a half-screen rubber band). */ #progress-bar.pb-indeterminate { transition: none; /* Tinted track: solid fill comes from ::before while loading */ background: color-mix(in srgb, var(--color-primary) 20%, transparent); animation: none; } #progress-bar.pb-indeterminate::before { content: ""; position: absolute; top: 0; left: 0; width: 35%; height: 100%; background: var(--color-primary); border-radius: 0 2px 2px 0; animation: pb-sweep 1.15s cubic-bezier(0.4, 0, 0.2, 1) infinite; } @keyframes pb-sweep { 0% { transform: translateX(-100%); } 100% { /* Move one segment width past the right edge of the 100% track */ transform: translateX(calc(100% / 0.35 + 100%)); } } /* Mobile Styles */ @media (max-width: 1024px) { .header__logo { box-sizing: border-box; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.4rem max(0.65rem, env(safe-area-inset-left)) 0.4rem max(0.65rem, env(safe-area-inset-right)); } .header__brand { flex: 1; min-width: 0; display: block; text-align: left; } .header__categories { display: none; flex-direction: column; padding-top: 10px; } .header__categories.active { display: flex; } .hamburger { display: block; align-self: center; } .header__categories ul { flex-direction: column; gap: 10px; } } /* Main content */ main { margin-top: 140px; flex-grow: 1; min-width: 0; /* flex item: allow shrinking below wide images / intrinsic min-content */ padding: 1em; word-break: break-word; } .user-menu { position: fixed; top: 150px; width: calc(21vw - 10px); min-width: 150px; max-width: 270px; } @media (min-width: 1025px) { /* Match extra header padding-top so content and menu clear the fixed bar */ main { margin-top: 152px; } .user-menu { top: 162px; } } .user-nav { padding: 10px; margin: 10px 0; } /* Right sidebar */ aside { width: 190px; min-width: 150px; flex-shrink: 0; flex-grow: 0; padding: 1em; } table { width: 100%; margin: 20px 0; } pre, code { text-wrap: wrap; padding: 3px; background-color: var(--color-bg-light); font-size: 1rem; } hr { margin: 20px 0; } dt { margin-top: 10px; } /* Responsive adjustments */ @media (max-width: 1024px) { /* Only the main column nav, not