/* ============================================================================
   THE FRAME, CORRECTED — the owner's list of 18 Nov 2026 (D-0471; R-686 … R-689, R-727). NEW PACE ONLY: every rule starts with
   html[data-new-pace]. Script: public/js/99zp-frame-more.js. Guard: test/frame-more-smoke.mjs.
     · the name at the foot of the menu opens a small floating menu (a float is opaque: --card-solid, one deep shadow, no edge);
     · the search sits in the top-right corner beside the light / dark switch, and the page's title starts at the top-left —
       one row less above every page;
     · the handwritten logo is larger and sits in the middle of the menu, its last stroke never cut;
     · the past-due chip wears the new look; the time is written in the logo's pen beside the light / dark switch (99zu).
   ============================================================================ */

/* ── the name is a menu ── */
html[data-new-pace] body.ui-kit .me-card{position:relative}
html[data-new-pace] body.ui-kit #sidebar .sb-footer{overflow:visible}   /* the menu opens above the name: the foot must not clip it */
html[data-new-pace] .me-menu{position:absolute;left:0;bottom:calc(100% + var(--np-space-2));min-width:236px;z-index:90;padding:var(--np-space-1_5);
  background:var(--card-solid);border:0;border-radius:var(--np-round-xl);box-shadow:var(--fx-float)}
@media (min-width:861px){ html[data-new-pace] body.ui-kit #sidebar:not(.pinned) .me-menu{left:calc(100% + var(--np-space-2));bottom:0} }   /* folded = a desktop rail only; a phone drawer is always open (R-910) */
html[data-new-pace] .me-menu-who{padding:var(--np-space-2_5) var(--np-space-3) var(--np-space-3);margin-bottom:var(--np-space-1_5);border-bottom:1px solid var(--border)}
html[data-new-pace] .me-menu-name{font:700 var(--np-text-lg)/1.25 var(--font);color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-new-pace] .me-menu-role{margin-top:var(--np-space-0_5);font:400 var(--np-text-sm)/1.3 var(--font);color:var(--text2)}
html[data-new-pace] .me-menu-row{display:flex;align-items:center;gap:var(--np-space-3);width:100%;min-height:var(--np-h-control-sm);padding:0 var(--np-space-3);
  border:0;border-radius:var(--np-round-md);background:transparent;color:var(--text);font:500 var(--np-text-md)/1.2 var(--font);text-align:left;cursor:pointer}
html[data-new-pace] .me-menu-ic{flex:none;width:18px;height:18px;color:var(--text2)}
html[data-new-pace] .me-menu-ic svg{width:18px;height:18px;display:block}
@media (hover:hover) and (pointer:fine){ html[data-new-pace] button.me-menu-row:hover{background:var(--hover)} }
html[data-new-pace] button.me-menu-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
html[data-new-pace] .me-menu-row.is-soon{color:var(--text3);cursor:default}
html[data-new-pace] .me-menu-row.is-soon .me-menu-ic{color:var(--text3)}
html[data-new-pace] .me-menu-soon{margin-left:auto;padding:var(--np-space-0_5) var(--np-space-2);border-radius:var(--np-round-pill);background:var(--hover);
  font:600 var(--np-text-min)/1.4 var(--font);color:var(--text2)}
html[data-new-pace] .me-menu-sep{height:1px;margin:var(--np-space-1_5) var(--np-space-3);background:var(--border)}
html[data-new-pace] .me-menu-row.is-danger{color:var(--fx-red);font-weight:600}
html[data-new-pace] .me-menu-row.is-danger .me-menu-ic{color:var(--fx-red)}

/* ── the top of every page: title at the left, search in the right corner ── */
@media (min-width:861px){
  html[data-new-pace] #topbar,html[data-new-pace] body.ui-kit #topbar{grid-template-columns:minmax(0,1fr) auto minmax(220px,420px) auto;
    grid-template-areas:"head chips search right" "head act act act";row-gap:var(--np-space-2)}
  html[data-new-pace] body.ui-kit .tb-head{align-self:start;padding-top:var(--np-space-1)}
  html[data-new-pace] .tb-search{justify-self:end}
  html[data-new-pace] .tb-chips{grid-area:chips;align-self:center}
}

/* ── the logo: larger, in the middle, the last stroke whole ── */
html[data-new-pace] body.ui-kit #sidebar.pinned .sb-brand:has(.rail-script){justify-content:center;padding:var(--np-space-5) var(--np-space-3) var(--np-space-3)}
html[data-new-pace] body.ui-kit .rail-word.rail-script .pace-script{width:168px;height:55px}

/* ── the past-due chip ── */
html[data-new-pace] .tb-chips{display:flex;gap:var(--np-space-2);margin:0}
html[data-new-pace] body.ui-kit .tb-chip.is-late{display:inline-flex;align-items:center;min-height:32px;padding:0 var(--np-space-3);border:1px solid color-mix(in srgb,var(--fx-red) 35%,transparent);
  border-radius:var(--np-round-pill);background:color-mix(in srgb,var(--fx-red) 10%,transparent);color:var(--fx-red);box-shadow:none;
  font:600 var(--np-text-sm)/1 var(--font);letter-spacing:0;text-transform:lowercase;text-shadow:none;cursor:pointer}

/* ── the time: written in the logo's pen (99zu), at the left of the light / dark switch ── */
html[data-new-pace] .np-now{display:inline-flex;align-items:center;height:36px;color:var(--fx-main);font:600 var(--np-text-lg)/1 var(--font);white-space:nowrap}
html[data-new-pace] .np-now .pace-digits{display:block;height:26px;width:auto;overflow:visible}
html[data-new-pace] .np-now .pace-digits path{fill:none;stroke:currentColor;stroke-width:2.6px;stroke-linecap:round;stroke-linejoin:round}
html[data-new-pace] .np-now .pace-digits path.is-small{stroke-width:2.1px}
@media (max-width:860px){ html[data-new-pace] .np-now{display:none} }   /* a phone carries its own clock at the top of the screen; the row is for the search */

/* ── the folded menu: the logo, + New, every icon and the initials on ONE centre line (owner, 18 Nov 2026, D-0478-2: "they are not
   aligned properly, they are off the line") — measured before: the icons sat 5px and the logo 4px right of the line the + and the
   initials share, because the open menu's left padding stayed on when it folded ── */
@media (min-width:861px){ html[data-new-pace] body.ui-kit #sidebar:not(.pinned) .sb-brand{padding-left:var(--np-space-3_5);padding-right:0} }   /* folded = a desktop rail only; a phone drawer is always open (R-910) */
@media (min-width:861px){ html[data-new-pace] body.ui-kit #sidebar:not(.pinned) .sb-nav .nav-item{padding-left:0} }   /* folded = a desktop rail only; a phone drawer is always open (R-910) */
@media (min-width:861px){ html[data-new-pace] body.ui-kit #sidebar:not(.pinned) .sb-nav .nav-item .nav-icon{flex:0 0 100%;justify-content:center} }   /* folded = a desktop rail only; a phone drawer is always open (R-910) */
/* The folded menu: a count on an item (Inbox's unread) is a small readable number on the icon's corner, not today's 7px dot with the
   new look's text squeezed into it (the owner, 20 Nov 2026: "when minimized the number on the email is not visible properly"). */
@media (min-width:861px){ html[data-new-pace] body.ui-kit #sidebar:not(.pinned) .nav-badge{position:absolute;top:1px;right:0;left:auto;box-sizing:border-box;min-width:18px;height:18px;padding:0 var(--np-space-1);
  border-radius:var(--np-round-pill);border:2px solid var(--card-solid);background:var(--fx-main);color:var(--fx-on-main);font:700 var(--np-text-min)/14px var(--font);text-align:center;overflow:visible} }   /* folded = a desktop rail only; a phone drawer is always open (R-910) */
