/* navbar.css -- the thin top bar shared by the tutorials, the circular-flow visualizer
   (includes/flow_body.php) and the balance-sheet visualizer page (Plan F stage 6, 2026-10-17).

   Loaded AFTER flow.css on the flow pages, so these rules win there; the balance-sheet page
   loads it after common.css. Visual only: #navRegion keeps its 1.5em height because the stage
   regions below it are placed at a hard-coded top:8.5em (flow.css), and every id that JS binds
   to is unchanged. The page-number buttons and text-size controls are tutorial-only and stay
   in flow.css. */

#navRegion {
    height: 1.5em;
    margin-top: 0.2em;
    margin-bottom: 0.3em;
    padding: 0 6px;
    white-space: nowrap;
    font-family: var(--font-body);
    line-height: 1.5em;   /* every item fits inside the 1.5em bar, so nothing reaches the rule */
}
#navRegion > * { vertical-align: middle; }
/* The engraved double rule under the bar, as under the home page's header. */
hr.SeparatorLine {
    height: 2px;
    margin: 7px 0 0;   /* clear of the bar's buttons and extras boxes; the stage below is placed absolutely */
    border: 0;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--plate-rule, #CFC5B4);
    background: none;
}

#homeLink {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15em;
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-decoration: none;
    margin-left: 0;
    padding: 0 2px;
    border-radius: var(--radius-block);
}
#homeLink .tld { color: var(--ink-muted); font-weight: 600; }
#homeLink:hover { background-color: var(--btn-ghost-bg-hover); }

/* The star opens the menu of tutorials; the label beside it says so. */
#econvizMenu {
    width: 18px;
    height: 18px;
    margin: 0 0 0 8px;
    padding: 1px;
    border-radius: var(--radius-block);
    cursor: pointer;
}
.navMenuLabel {
    font: inherit;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-secondary);
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    padding: 2px 6px;
    margin: 0 12px 0 0;
    line-height: 1.3;
    cursor: pointer;
}
#econvizMenu:hover, .navMenuLabel:hover, .navMenuLabel[aria-expanded="true"] {
    background-color: var(--btn-ghost-bg-hover);
}
.navMenuLabel:hover { border-color: var(--btn-ghost-border); color: var(--ink); }
.navMenuLabel:focus-visible, #homeLink:focus-visible {
    outline: 2px solid var(--annotation-step);
    outline-offset: 2px;
}

/* The menu panel on pages without the tutorial tooltip system (balance-sheet visualizer;
   js/site_menu.js toggles it). The flow pages show the same links in #econvizMenuTip. */
.ev-menu-panel {
    position: absolute;
    top: 2.3em;
    left: 6px;
    z-index: 60;
    min-width: 320px;
    padding: 12px 16px 12px;
    background: var(--stage);
    border: var(--plate-border-width, 2px) solid var(--ink);
    border-radius: var(--radius-block);
    box-shadow: inset 0 0 0 3px var(--stage), inset 0 0 0 4px var(--plate-rule, #CFC5B4);
    font-size: 15px;
    line-height: 1.75;
    white-space: normal;
}
.ev-menu-panel[hidden] { display: none; }
.ev-menu-panel a { color: var(--annotation-link); }
.ev-menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* Tutorial glyphs in the menu (generated as <img>: no inline svg may precede the stage). */
#econvizMenuTip a.menuItem, .ev-menu-panel a.menuItem { display: inline-block; padding: 3px 0; }
.menuGlyph { width: 22px; height: 22px; vertical-align: -6px; margin-right: 8px; }

/* Under 1200px (and on the 980-wide phone layout) the bar has no room for the label beside
   the page numbers, extras boxes and text-size control: the star alone opens the menu. */
@media (max-width: 1199px) {
    .navMenuLabel { display: none; }
    #econvizMenu { margin-right: 14px; }
}
