diff --git a/steward/templates/base.html b/steward/templates/base.html index dbe5a82..4bd46e5 100644 --- a/steward/templates/base.html +++ b/steward/templates/base.html @@ -57,7 +57,7 @@ code { font-family: ui-monospace, monospace; font-size: 0.875em; background: var width: 220px; flex-shrink: 0; background: var(--bg-card); border-right: 1px solid var(--border-mid); display: flex; flex-direction: column; - position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 20; + position: sticky; top: 0; height: 100vh; z-index: 20; } .sidebar .brand { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; @@ -66,7 +66,8 @@ code { font-family: ui-monospace, monospace; font-size: 0.875em; background: var padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border); } .sidebar .brand svg { flex-shrink: 0; } -.side-nav { flex: 1; padding: 0.75rem 0; } +/* Only the nav list scrolls when long — the brand and user/logout stay pinned. */ +.side-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 0.75rem 0; } .nav-group { margin-bottom: 0.9rem; } .nav-group-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.09em; @@ -89,6 +90,12 @@ code { font-family: ui-monospace, monospace; font-size: 0.875em; background: var display: flex; align-items: center; gap: 0.4rem; } .side-user a:hover { color: var(--text); } +/* Keyboard focus: a clear inset ring on every interactive sidebar element. */ +.sidebar .brand:focus-visible, +.side-nav a:focus-visible, +.side-user a:focus-visible { + outline: 2px solid var(--accent); outline-offset: -2px; color: var(--text); +} .app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .topbar { display: none; } /* slim mobile bar; shown only under 900px */ .nav-scrim { display: none; } @@ -111,8 +118,10 @@ main { padding: 1.5rem 2rem; max-width: 1400px; margin: 0 auto; width: 100%; box } .sidebar-toggle { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; - cursor: pointer; line-height: 1; padding: 0.25rem; + cursor: pointer; line-height: 1; padding: 0.25rem; border-radius: 4px; } + .sidebar-toggle:hover { color: var(--text); } + .sidebar-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } .topbar .brand-sm { font-family: var(--font-serif); color: var(--gold); font-weight: 700; font-size: 1.05rem; text-decoration: none; @@ -122,6 +131,11 @@ main { padding: 1.5rem 2rem; max-width: 1400px; margin: 0 auto; width: 100%; box } } +@media (prefers-reduced-motion: reduce) { + .sidebar { transition: none; } + .side-nav a { transition: none; } +} + /* Alerts */ .alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; } .alert-error { background: var(--red-dim); border: 1px solid #6a1820; color: #ffb0b8; } @@ -266,7 +280,7 @@ body.dash-editing .widget-drawer { transform:translateY(0); } {% set _p = request.path %}