/* Shared floating navigation; the workspace continues behind the pill. */
html, body { width: 100%; height: 100%; overflow: hidden; }
.tabs {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 2200; display: flex; align-items: center; width: max-content;
    max-width: calc(100vw - 24px); height: auto; box-sizing: border-box;
    padding: 5px 8px; border: 1px solid rgb(230 230 230 / 75%);
    border-radius: 999px; background: rgb(255 255 255 / 72%);
    box-shadow: 0 4px 18px #0000000b, 0 1px 3px #00000005;
    overflow-x: auto; scrollbar-width: none;
}
/* Start uses its project actions; restore navigation on workspace pages. */
body[data-active-page="start"] .tabs { display: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab {
    position: relative; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    min-height: 38px; height: auto; margin: 0; padding: 0 17px; box-sizing: border-box;
    border: 0; border-radius: 999px; background: transparent;
    color: #999; font: 14px/1.3 'Roboto Mono', monospace; white-space: nowrap;
    cursor: pointer; transform: none; transition: color 140ms;
}
.tabs .tab + .tab::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 1px; height: 14px; background: rgb(70 70 70 / 28%); pointer-events: none;
}
.tabs .tab.active { color: #000; background: transparent; border: 0; }
.tabs .tab.tab-hover, .tabs .tab.tab-hover:not(.active), .tabs .tab:hover { transform: none; background: transparent !important; }
.tabs .tab.active:hover { color: #000; background: transparent !important; }
.page-nav-label { display: inline-block; transition: transform 140ms ease; }
.tabs .tab:hover .page-nav-label, .tabs .tab:focus-visible .page-nav-label { transform: scale(1.08); }
.tabs .tab:is(:focus, :focus-visible, :active) { outline: none; box-shadow: none; }
#depthDiagramContainer { position: fixed; inset: 0; width: 100%; height: 100%; box-sizing: border-box; border: 0; }
#depthDiagram { display: block; border: 0; }
#diagramTab { padding: 0; }
#depthTab, #tableTab, #matrixTab, #summaryTab, #guideTab {
    position: fixed; inset: 0; box-sizing: border-box; width: 100%; height: 100%; margin: 0;
}
#depthTab { padding: 0; }
/* Reading pages retain content breathing room inside their full-height surface. */
#tableTab, #matrixTab, #summaryTab, #guideTab { padding-top: 76px; }
@media (max-width: 640px) {
    .tabs { top: 12px; padding: 4px; max-width: calc(100vw - 16px); }
    .tabs .tab { font-size: 12px; padding: 0 10px; min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .tabs .tab, .page-nav-label { transition: none; } }

/* Keep page headings on one baseline, including dynamically rendered pages. */
#tableTab, #matrixTab, #summaryTab, #guideTab {
    padding: 76px 20px 20px !important;
}
#summaryTab > div:first-child { padding: 0 !important; }
#guideTab > .guide-content { padding-top: 0; }
#tableTab > h2,
#matrixTab > div:first-child > h2,
#summaryTab > div:first-child > .page-title,
#guideTab > .guide-content > h1:first-child {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    font-size: 22px !important;
    line-height: 1.4;
}

/* The Guide uses the same outline icons as the live Diagram toolbar. */
.guide-content .guide-tool-icon {
    display: block; width: 26px; height: 26px; background: none; border: 0;
    fill: none; stroke: #191919; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}
.guide-tool-table th[scope="row"] { text-align: left; white-space: nowrap; }
.guide-tool-table td:first-child { width: 34px; }
.guide-table-scroll { overflow-x: auto; }
