/* The frame around every screen. Tokens only (kit/tokens.css). */

.gg-skip { position: absolute; left: var(--s-2); top: var(--s-2); z-index: 200; padding: var(--s-2) var(--s-3); border-radius: var(--radius); background: var(--text); color: var(--bg); font-weight: var(--w-strong); transform: translateY(-200%); }
.gg-skip:focus { transform: none; }
.gg-noscript { padding: var(--s-6); }

.gg-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.gg-main-col { display: flex; flex-direction: column; min-width: 0; }

/* ---------- the menu ---------- */
.gg-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-inline-end: 1px solid var(--line); z-index: 30; }
.gg-side-logo { display: flex; align-items: center; height: var(--topbar-h); padding: 0 var(--s-5); flex: none; text-decoration: none; border-radius: var(--radius); }
.gg-side-logo:focus-visible { outline-offset: -4px; }
.gg-nav { flex: 1 1 auto; overflow-y: auto; padding: var(--s-2) var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: var(--s-4); }
.gg-nav-title { padding: 0 var(--s-2) var(--s-1); font-size: var(--dense-1); font-weight: var(--w-strong); color: var(--text-2); letter-spacing: 0.04em; text-transform: uppercase; }
.gg-nav-list { display: flex; flex-direction: column; gap: 2px; }
.gg-nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-3) 0 var(--s-2);
  border-radius: var(--radius); border-inline-start: 3px solid transparent; color: var(--text); text-decoration: none; font-size: var(--dense-2); font-weight: var(--w-normal);
}
.gg-nav-link:hover { background: var(--surface-2); }
.gg-nav-link[aria-current="page"] { background: var(--accent-soft); border-inline-start-color: var(--accent); font-weight: var(--w-strong); }
.gg-nav-link:focus-visible { outline-offset: -2px; }
.gg-nav-keys { font-family: var(--font-mono); font-size: var(--dense-1); color: var(--text-2); visibility: hidden; }
.gg-side:hover .gg-nav-keys, .gg-side:focus-within .gg-nav-keys { visibility: visible; }
.gg-nav-none { padding: var(--s-2); color: var(--text-2); font-size: var(--dense-2); }
.gg-side-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-top: 1px solid var(--line); font-size: var(--dense-2); }
.gg-scrim { position: fixed; inset: 0; z-index: 29; background: var(--overlay); }

/* ---------- the bar across the top ---------- */
.gg-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-3); height: var(--topbar-h); padding: 0 var(--s-6); background: var(--bg); border-bottom: 1px solid var(--line); font-size: var(--dense-2); }
.gg-top gg-search { flex: 1 1 auto; max-width: 560px; }
.gg-top-tools { display: flex; align-items: center; gap: var(--s-1); margin-inline-start: auto; flex: none; }
.gg-top-menu, .gg-top-logo { display: none; }
/* "Report a problem" and "Request a feature" sit side by side. Where the bar is too narrow for both
   in words (a small laptop; sooner for an owner, whose bar also holds "View as"), they are the flag
   and the light bulb alone, so the search box keeps its room. Hidden from the eye only: each keeps
   its spoken name, and pointing at it shows its name. */
@media (max-width: 1279px) {
  .gg-top-ask .gg-btn-words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 1439px) {
  .gg-top-tools:has(.gg-top-viewas) .gg-top-ask .gg-btn-words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.gg-top-logo { text-decoration: none; border-radius: var(--radius); }
.gg-top-person .gg-btn-words { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; }
/* "View as" (owners). While another account type's view is on, the button is the one filled thing in the bar, so it cannot be missed. */
.gg-top-viewas .gg-btn-words { white-space: nowrap; }
/* The frame keeps its own compact size whatever the screen inside it uses. */
.gg-top, .gg-side { --text-s: var(--dense-1); --text-m: var(--dense-2); --text-l: var(--dense-3); --control-h: 36px; --pad-x: var(--s-3); --gap: var(--s-3); --target: 24px; }

.gg-banner { display: flex; align-items: center; justify-content: center; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-2) var(--s-6); background: var(--accent); color: var(--on-accent); font-weight: var(--w-strong); font-size: var(--dense-2); }

#gg-main { flex: 1 1 auto; min-width: 0; }
#gg-main:focus { outline: none; }
.gg-screen { min-width: 0; }

/* ---------- the menu steps aside: on a simple (one-job) screen, and on a narrow window ---------- */
.gg-shell[data-nav-over] { grid-template-columns: minmax(0, 1fr); }
.gg-shell[data-nav-over] .gg-side { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform var(--fast) var(--ease); box-shadow: var(--shadow); visibility: hidden; }
.gg-shell[data-nav-over][data-nav-open] .gg-side { transform: none; visibility: visible; }
.gg-shell[data-nav-over] .gg-top-menu, .gg-shell[data-nav-over] .gg-top-logo { display: inline-flex; }
@media (max-width: 960px) {
  .gg-shell { grid-template-columns: minmax(0, 1fr); }
  .gg-side { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform var(--fast) var(--ease); box-shadow: var(--shadow); visibility: hidden; }
  .gg-shell[data-nav-open] .gg-side { transform: none; visibility: visible; }
  .gg-top-menu { display: inline-flex; }
  .gg-top { padding: 0 var(--s-3); }
  .gg-top-person .gg-btn-words, .gg-top-tools > gg-button .gg-btn-words { display: none; }
  /* a narrow screen: just the eye until a view is on; then its name stays. Hidden from the eye only, so the button keeps its spoken name. */
  .gg-top-viewas:not([data-on]) .gg-btn-words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .gg-page { padding-inline: var(--s-4); }
}
/* A phone: between the menu button and the tools the search box is only wide enough for its
   picture. While it is in use it takes the whole bar, so what is typed and what is found can be read. */
@media (max-width: 640px) {
  /* "View as" on a phone is the eye alone; filled yellow while another view is on (its name is ticked in the list). */
  .gg-top-viewas .gg-btn-words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* An owner's bar holds one more button than anyone else's: the little arrows and the gaps make room for it. */
  .gg-top-tools:has(.gg-top-viewas) { gap: 0; }
  .gg-top-tools:has(.gg-top-viewas) gg-menu .gg-btn-words ~ .gg-icon { display: none; }
  .gg-top gg-search { min-width: var(--control-h); }
  .gg-top gg-search .gg-search-key { display: none; }
  /* An owner's bar leaves the search box room for its picture and no more: until it is in use the box is that narrow, so it does not run under the button beside it. */
  .gg-top:has(.gg-top-viewas) gg-search:not(:focus-within) .gg-search-input { padding-inline: var(--s-8) 0; }
  .gg-top gg-search:focus-within { position: absolute; inset-inline: var(--s-2); top: 50%; transform: translateY(-50%); z-index: 21; max-width: none; }
}

/* ---------- a page for a customer (screen.bare): nothing of the staff frame is drawn ---------- */
.gg-shell[data-bare] { grid-template-columns: minmax(0, 1fr); }
.gg-shell[data-bare] .gg-side, .gg-shell[data-bare] .gg-top, .gg-shell[data-bare] .gg-scrim, .gg-shell[data-bare] .gg-banner { display: none; }

/* ---------- the list of keyboard shortcuts ---------- */
.gg-keys-group + .gg-keys-group { margin-top: var(--s-2); }
.gg-keys-list { margin-top: var(--s-2); }
.gg-keys-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.gg-keys-row:last-child { border-bottom: 0; }

/* ---------- before the dashboard has started: the same frame, in grey, so nothing jumps ---------- */
.gg-shell[data-booting] .gg-nav { gap: var(--s-3); padding-top: var(--s-4); }
.gg-boot-bar { display: block; height: var(--s-3); border-radius: var(--radius); background: var(--line); }
.gg-boot-w1 { width: 40%; } .gg-boot-w2 { width: 60%; } .gg-boot-w3 { width: 80%; }
.gg-shell[data-booting] .gg-top .gg-boot-bar { width: 320px; height: var(--s-8); }
.gg-shell[data-booting] .gg-side-logo .gg-boot-bar { width: 140px; height: var(--s-6); }
