/* Shared navigation, isolated from calculator / tracker / map typography. */
.shared-section-menu { --nav-bg:#121a2b; --nav-line:#3a4558; --nav-text:#edf2fb; --nav-muted:#a5b3c8; --nav-gold:#e0b66c; --nav-hover:#222d40; position:relative; flex:0 0 auto; min-width:0; font:12px/1.4 var(--site-font,Arial,sans-serif); text-align:left; }
[data-theme="light"] .shared-section-menu { --nav-bg:#fff; --nav-line:#bec8d7; --nav-text:#182638; --nav-muted:#53647b; --nav-gold:#805512; --nav-hover:#eef2f8; }
.shared-section-menu[hidden] { display:none!important; }
.shared-section-menu *, .shared-section-menu *::before, .shared-section-menu *::after { box-sizing:border-box; }
.shared-section-menu > .sections-trigger { display:flex; align-items:center; gap:8px; list-style:none; padding:7px 10px; min-height:34px; border:1px solid var(--nav-line); border-radius:7px; background:var(--nav-bg); color:var(--nav-text); font:600 12px/1.4 var(--site-font,Arial,sans-serif); white-space:nowrap; cursor:pointer; user-select:none; }
.shared-section-menu > summary::-webkit-details-marker { display:none; }
.shared-section-menu > summary:hover, .shared-section-menu[open] > summary { border-color:var(--nav-gold); }
.shared-section-menu > summary > span:first-child { color:var(--nav-gold); font-size:16px; line-height:1; }
.shared-section-menu .menu-caret { color:var(--nav-muted); font-size:13px; line-height:1; }
.shared-section-menu[open] .menu-caret { transform:rotate(180deg); }
.shared-section-menu .sections-panel { position:absolute; z-index:80; top:calc(100% + 8px); left:0; right:auto; display:block; width:345px; max-width:calc(100vw - 48px); max-height:70vh; padding:8px; margin:0; border:1px solid var(--nav-line); border-radius:10px; background:var(--nav-bg); color:var(--nav-text); box-shadow:0 14px 35px #0005; overflow-y:auto; overscroll-behavior:contain; text-align:left; }
.shared-section-menu .sections-caption { margin:0; padding:5px 9px 9px; color:var(--nav-muted); font-size:10px; font-weight:600; letter-spacing:.8px; text-transform:uppercase; }
.shared-section-menu .section-link, .shared-section-menu .section-link:visited { display:flex; align-items:center; justify-content:flex-start; gap:10px; width:100%; min-height:55px; margin:0; padding:10px 9px; border:1px solid transparent; border-radius:7px; color:var(--nav-text); background:transparent; text-decoration:none; white-space:normal; }
.shared-section-menu .section-link:hover { background:var(--nav-hover); border-color:var(--nav-line); color:var(--nav-text); }
.shared-section-menu .section-link[aria-current="page"] { background:var(--nav-hover); border-color:var(--nav-gold); }
.shared-section-menu .section-icon { display:flex; align-items:center; justify-content:center; flex:0 0 28px; width:28px; height:30px; color:var(--nav-gold); font-size:22px; }
.shared-section-menu .section-link strong { display:block; font-size:12px; line-height:1.4; font-weight:600; }
.shared-section-menu .section-link small { display:block; margin-top:3px; color:var(--nav-muted); font-size:10px; line-height:1.4; }
.shared-section-menu .section-current { margin-left:auto; color:var(--nav-gold); font-size:9px; }
.shared-section-menu summary:focus-visible, .shared-section-menu a:focus-visible { outline:2px solid var(--nav-gold); outline-offset:2px; }
.shared-nav-topbar { position:relative; z-index:50; overflow:visible; justify-content:flex-start; }
.shared-nav-topbar > #account { margin-left:auto; min-width:0; overflow:hidden; text-overflow:ellipsis; }
@media(max-width:650px) {
  .shared-nav-topbar { flex-wrap:wrap; gap:8px; }
  .shared-nav-topbar > .brand { flex:0 1 auto; max-width:calc(100% - 120px); overflow:hidden; text-overflow:ellipsis; font-size:12px; }
  .shared-nav-topbar > .shared-section-menu { margin-left:auto; }
  .shared-nav-topbar > #account { font-size:11px; }
}

/* Searchable directory. Keep native disclosure and link keyboard behaviour. */
.shared-section-menu .sections-panel { padding:10px; scrollbar-width:thin; scrollbar-color:var(--nav-line) transparent; }
.shared-section-menu [hidden] { display:none!important; }
.shared-section-menu .sections-search-wrap { position:sticky; top:-10px; z-index:1; padding:4px 4px 12px; background:inherit; border-bottom:1px solid var(--nav-line); }
.shared-section-menu .sections-search-label { display:block; color:var(--nav-muted); font:600 11px/1.4 var(--site-font,Arial,sans-serif); }
.shared-section-menu .sections-search { display:block; width:100%; min-width:0; height:42px; margin:6px 0 0; padding:10px 12px; border:1px solid var(--nav-line); border-radius:8px; background:var(--nav-bg); color:var(--nav-text); font:400 14px/1.4 var(--site-font,Arial,sans-serif); appearance:auto; }
.shared-section-menu .sections-search::placeholder { color:var(--nav-muted); opacity:.85; }
/* Item results of the menu search (Ctrl+K). */
.sections-items { padding:8px 4px 4px; }
.sections-item-list { display:grid; gap:2px; }
.sections-item { display:flex; align-items:center; gap:8px; }
.sections-item-card { flex:1; min-width:0; display:flex; align-items:center; gap:10px; min-height:40px; padding:4px 8px; border-radius:8px; color:var(--nav-text); text-decoration:none; font:500 13px/1.3 var(--site-font,Arial,sans-serif); }
.sections-item-card span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sections-item-card img { width:28px; height:28px; flex:none; border-radius:6px; }
.sections-item-card:hover { background:var(--nav-hover,rgba(255,255,255,.06)); }
.sections-item-action { flex:none; display:inline-flex; align-items:center; height:30px; padding:0 10px; border:1px solid var(--nav-line); border-radius:7px; color:var(--nav-gold); text-decoration:none; font:600 12px/1 var(--site-font,Arial,sans-serif); }
.sections-item-action:hover { border-color:var(--nav-gold); }
.shared-section-menu .sections-search:focus-visible { outline:2px solid var(--nav-gold); outline-offset:2px; }
.shared-section-menu .sections-group { margin:12px 0 0; padding:0; border:0; background:transparent; }
.shared-section-menu .sections-caption { padding:0 9px 6px; font-size:10px; letter-spacing:.65px; }
.shared-section-menu .sections-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px 8px; }
.shared-section-menu.sections-compact .sections-grid { grid-template-columns:1fr; }
.shared-section-menu .section-link { min-height:56px; padding:8px; gap:10px; transition:background 120ms,border-color 120ms; }
.shared-section-menu .section-link>span:nth-child(2) { min-width:0; flex:1; }
.shared-section-menu .section-link strong { font-size:12px; line-height:1.4; }
.shared-section-menu .section-link small { font-size:11px; line-height:1.4; margin-top:3px; }
.shared-section-menu .section-icon { flex-basis:32px; width:32px; height:32px; border-radius:8px; background:color-mix(in srgb,var(--nav-gold) 8%,transparent); }
.shared-section-menu .section-icon svg { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.shared-section-menu .section-current { font-size:0; width:5px; height:5px; border-radius:50%; background:var(--nav-gold); flex:none; }
.shared-section-menu .sections-empty { padding:24px 14px; text-align:center; color:var(--nav-text); }
.shared-section-menu .sections-empty strong { font-size:14px; }
.shared-section-menu .sections-empty p { margin:8px 0 14px; color:var(--nav-muted); font-size:12px; line-height:1.6; }
html body .shared-section-menu .sections-empty button { height:auto; min-height:44px; padding:10px 14px; border:1px solid var(--nav-line); border-radius:8px; background:var(--nav-hover); color:var(--nav-text); font:600 12px var(--site-font,Arial,sans-serif); cursor:pointer; }
.shared-section-menu .sections-empty button:focus-visible { outline:2px solid var(--nav-gold); outline-offset:2px; }
.shared-section-menu .sections-search-status { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(max-width:700px) {
 .shared-section-menu .sections-grid { grid-template-columns:1fr; }
 .shared-section-menu .section-link { min-height:56px; }
}
@media(prefers-reduced-motion:reduce) { .shared-section-menu .section-link { transition:none; } }
