/* Layout stability. Loaded last on every page: anything that takes space in
   the header, sidebar or workspace chrome has a fixed box before scripts run,
   so first paint, language switches and page changes never move it. */

/* Header: a three-column grid keeps the main nav centred however wide the
   brand or the actions cluster gets (signed in, translate page CTA hidden). */
.site-header .nav-shell{display:grid;grid-template-columns:1fr auto 1fr;align-items:center}
.site-header .nav-shell>.brand{grid-column:1;justify-self:start}
.site-header #main-nav{grid-column:2;margin:0}
.site-header .nav-actions{grid-column:3;justify-self:end;margin-left:0}
/* Same three top links on every page (workspace pages, 课堂 among them, reach their tools from
   the sidebar, marketing pages from the CTA), so the centred nav never moves
   between pages. From 761px, where the menu button ends: six links ran past a tablet held
   upright (761–819px). The mobile menu still lists all six. */
@media(min-width:761px){.site-header #main-nav>a:is([href="/translate"],[href="/classroom"],[href="/text"],[href="/records"]){display:none}}

/* Sidebar: every row is one fixed-height line in both languages; long labels
   truncate instead of wrapping (title attributes carry the full text). */
.brand44 .app-sidebar .side-links :is(a,.workspace-mode,.prompter-heading){height:44px;min-height:44px;padding-block:0;white-space:nowrap;display:flex;align-items:center}
.brand44 .app-sidebar .side-links :is(a,.workspace-mode,.prompter-heading)>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.brand44 .app-sidebar .prompter-links{gap:2px}
/* The prompter group is a static heading now, never a disclosure toggle. */
.brand44 .app-sidebar .prompter-heading{gap:12px;padding-inline:14px;border-radius:10px;color:var(--muted);font-size:13px;font-weight:600;cursor:default;user-select:none}
.brand44 .app-sidebar .prompter-heading .icon{width:18px;height:18px;opacity:.8}
.studio-page:is([data-mode=prompt],[data-mode=interview]) .app-sidebar .prompter-heading{color:var(--accent)}

/* English: emate-theme-v5.js adds .i18n-pending before first paint and
   ui-language.js removes it once labels are translated, so English never
   flashes Chinese. Sidebar rows have fixed boxes, so only their text hides;
   the nav, actions and page content change width when translated, so they
   stay invisible (but laid out) until they reach their final size. */
.i18n-pending .app-sidebar,.i18n-pending .app-sidebar *{color:transparent!important}
.i18n-pending :is(#main-nav,.nav-actions,main){visibility:hidden}

/* Placeholders: the same size as the control they stand in for. */
.skeleton:is(.skeleton-field,.skeleton-pill){display:inline-block;flex:none;min-height:0;border-radius:999px}
.skeleton.skeleton-field{width:155px;height:34px;border-radius:10px}
.skeleton.skeleton-pill{width:48px;height:30px}
/* Translate page: the course row exists in the HTML, so the workspace below
   never drops when courses-v14.js fills it. */
[data-course-slot]{min-height:54px;box-sizing:border-box}

/* English labels are longer: between the mobile breakpoint and ~900px the
   six nav links plus actions overflowed the viewport. Tighten them instead. */
@media(min-width:761px) and (max-width:900px){
 html[lang=en] #main-nav>a{padding-inline:4px;font-size:11.5px}
}
