/* The page tabs (ui/page-tabs.js), measured off the student dashboard's (.cc-topbar and .cc-tabs in its globals.css;
   oliver, 2026-10-04: "add in the tabs feature as well we have in the main dashboard for ease"). On a computer they
   float on the frame ABOVE the page, in a slim 42px strip with no rule under it, and the page is the rounded panel
   under them. Every tab is the same 200px, like a browser's: a long name ends in "…", and a crowded row shrinks them
   all together. The open tab is made of the page's own stuff (white with a hairline and a soft lift; in dark one step
   lighter than the page), the others are bare until pointed at, with a faint short line between two of them. The × sits
   after the name on the open tab, and on another while you point at it. + opens the ⌘K search for a page to open in a
   new tab. Phones (under 768px) keep the page name in the top bar instead. */
body.balanced-blue.minimal-calm .topbar{--tab-ink:#18181b;--tab-ink-2:#5b5b65;--tab-ink-3:#8c8c96;--tab-hover:#ededf0;--tab-active:#fff;--tab-active-line:#ececef;--tab-active-shadow:0 1px 2px rgb(17 17 26 / .06);--tab-x-hover:#ededf0;--tab-sep:#e2e2e6}
body.balanced-blue.minimal-calm.theme-dark .topbar{--tab-ink:#ededf1;--tab-ink-2:#9ea3b0;--tab-ink-3:#686d79;--tab-hover:#13151b;--tab-active:#191c23;--tab-active-line:#262a33;--tab-active-shadow:none;--tab-x-hover:#30353f;--tab-sep:#262a33}

/* the row clips a crowded end; 4px above and below so the open tab's lift and the × ring aren't cut */
body.balanced-blue.minimal-calm .hq-tabs{display:flex;align-items:center;gap:4px;min-width:0;margin-block:-4px;padding-block:4px;overflow:hidden}
body.balanced-blue.minimal-calm .hq-tab{position:relative;display:flex;align-items:center;flex:0 1 200px;width:200px;min-width:64px;height:32px;border:1px solid transparent;border-radius:9px;color:var(--tab-ink-2)}
body.balanced-blue.minimal-calm .hq-tab:hover{background:var(--tab-hover);color:var(--tab-ink)}
/* the faint line in the gap between two tabs, gone beside the open tab and the one under the pointer */
body.balanced-blue.minimal-calm .hq-tab+.hq-tab::before{content:"";position:absolute;top:50%;left:-4px;width:1px;height:14px;transform:translateY(-50%);background:var(--tab-sep);pointer-events:none}
body.balanced-blue.minimal-calm :is(.hq-tab[data-active],.hq-tab[data-active]+.hq-tab,.hq-tab:hover,.hq-tab:hover+.hq-tab)::before{opacity:0}
body.balanced-blue.minimal-calm .hq-tab[data-active]{border-color:var(--tab-active-line);background:var(--tab-active);box-shadow:var(--tab-active-shadow);color:var(--tab-ink)}
body.balanced-blue.minimal-calm .hq-tab-link{display:flex;align-items:center;flex:1;gap:7px;min-width:0;height:100%;padding:0 10px 0 11px;border-radius:inherit;color:inherit;font-size:13px;font-weight:500;line-height:20px;letter-spacing:normal;text-decoration:none}
body.balanced-blue.minimal-calm .hq-tab-link:focus-visible{outline:2px solid var(--ring);outline-offset:-2px}
/* display:block: the old top bar makes every span in it a flex row, which can't end in "…" */
body.balanced-blue.minimal-calm .hq-tab-title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* the page's sidebar tile: a page in a folder on its colour, a top-level page as its plain icon */
body.balanced-blue.minimal-calm .hq-tab .nav-tile{--tint:var(--tint-slate);display:grid;place-items:center;flex:none;width:18px;height:18px;border-radius:5px;color:var(--tint);background:color-mix(in srgb,var(--tint) 16%,transparent)}
body.balanced-blue.minimal-calm .hq-tab .nav-tile>.icon{width:11px;height:11px;stroke-width:2.2;color:inherit}
body.balanced-blue.minimal-calm.theme-dark .hq-tab .nav-tile{color:color-mix(in srgb,var(--tint),#fff 38%)}
body.balanced-blue.minimal-calm .hq-tab-icon{display:grid;place-items:center;flex:none;width:16px;height:16px;color:var(--tab-ink-3)}
body.balanced-blue.minimal-calm .hq-tab[data-active] .hq-tab-icon{color:var(--tab-ink-2)}
body.balanced-blue.minimal-calm .hq-tab-icon>.icon{width:16px;height:16px;stroke-width:1.8}
/* the × takes no room on a closed tab until it's pointed at (or has the keyboard), then the tab makes room after the
   name; never over the name, where a click meant to open the tab would close it */
body.balanced-blue.minimal-calm .hq-tab-close{display:grid;place-items:center;flex:none;width:0;height:16px;min-height:0;margin:0;padding:0;overflow:hidden;border:0;border-radius:4px;background:transparent;box-shadow:none;color:var(--tab-ink-3);opacity:0;cursor:pointer}
body.balanced-blue.minimal-calm :is(.hq-tab[data-active] .hq-tab-close,.hq-tab-close:focus-visible){width:16px;margin:0 8px 0 4px;opacity:1}
body.balanced-blue.minimal-calm .hq-tab-close:focus-visible{outline:2px solid var(--ring);outline-offset:1px}
/* hover is a mouse thing: a touch screen keeps it stuck on whatever was tapped last, so there a closed tab has no × */
@media(hover:hover){body.balanced-blue.minimal-calm .hq-tab:hover .hq-tab-close{width:16px;margin:0 8px 0 4px;opacity:1}}
@media(hover:none){body.balanced-blue.minimal-calm .hq-tab:not([data-active]) .hq-tab-close{display:none}}
body.balanced-blue.minimal-calm .hq-tab-close:hover{background:var(--tab-x-hover);color:var(--tab-ink)}
body.balanced-blue.minimal-calm .hq-tab-close>.icon{width:10px;height:10px;stroke-width:2.4}
body.balanced-blue.minimal-calm .hq-tab-new{display:grid;place-items:center;flex:none;width:26px;height:26px;min-height:0;margin-left:6px;padding:0;border:0;border-radius:7px;background:transparent;box-shadow:none;color:var(--tab-ink-3);cursor:pointer}
body.balanced-blue.minimal-calm .hq-tab-new:hover{background:var(--tab-hover);color:var(--tab-ink)}
body.balanced-blue.minimal-calm .hq-tab-new:focus-visible{outline:2px solid var(--ring);outline-offset:-2px}
body.balanced-blue.minimal-calm .hq-tab-new>.icon{width:14px;height:14px;stroke-width:2}

@media(max-width:767px){body.balanced-blue.minimal-calm .hq-tabs{display:none}}
@media(min-width:768px){
  /* the tabs say which page this is, so the top bar's page name goes (the dashboard dropped its trail the same day) */
  body.balanced-blue.minimal-calm #crumb{display:none}
  /* no gap over the page any more: the strip is the gap. the page column is see-through, the strip sits on the frame
     and the page panel (its colour, hairline, corners and lift) is the page itself, under the strip */
  body.balanced-blue.minimal-calm .frame{padding-top:0}
  body.balanced-blue.minimal-calm .workspace,
  body.balanced-blue.minimal-calm.theme-dark .workspace{overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}
  body.balanced-blue.minimal-calm .topbar{flex:0 0 42px;height:42px;padding-inline:0;background:transparent}
  body.balanced-blue.minimal-calm .minimal-page-context{flex:1;min-width:0;gap:8px}
  body.balanced-blue.minimal-calm #main{border:1px solid var(--line);border-radius:var(--r-frame);box-shadow:var(--shadow-panel)}
  /* the title sits 32px into the panel, the student dashboard's page top (oliver, 2026-10-06: "title is too high" at
     24px; the dashboard went 20px to 32px on the same note) */
  body.balanced-blue.minimal-calm #main{padding-top:32px}
  /* the sidebar button (there once the sidebar is folded) starts on the panel's edge, then a short line, then the tabs */
  body.balanced-blue.minimal-calm .topbar #mobile-menu+#crumb+.hq-tabs{position:relative;padding-left:13px}
  body.balanced-blue.minimal-calm .topbar #mobile-menu+#crumb+.hq-tabs::before{content:"";position:absolute;top:50%;left:0;width:1px;height:16px;transform:translateY(-50%);background:var(--line)}
}
@media(min-width:851px){
  body.balanced-blue.minimal-calm:not(.minimal-nav-collapsed) .topbar #mobile-menu+#crumb+.hq-tabs{padding-left:0}
  body.balanced-blue.minimal-calm:not(.minimal-nav-collapsed) .topbar #mobile-menu+#crumb+.hq-tabs::before{display:none}
  /* the sidebar's top row moves up so its middle is the strip's middle (5px + half of 32 = 21, half of 42), and the
     search box's top edge is the page panel's top edge (5 + 32 + 5 = 42), as on the dashboard */
  body.balanced-blue.minimal-calm #sidebar .nav-head{margin-top:-3px;margin-bottom:5px}
}
