/* THE BUTTON FAMILY ON PROJECTS (restyle job J6).
   Projects' own stylesheet (projects.css) is GENERATED from public/_prototype-design.html
   and must not be edited by hand, so its buttons and pop-ups are restyled here, linked after
   chips.css (after projects.css). Every rule behind the same fence as family.css:
       :where(body:not(.role-tech):not(.role-driver)) .pj ...
   :where() weighs nothing, so each rule here has the strength of the projects.css rule it
   answers and wins by coming later. The values are family.css's (tokens in app.css).

   What changes:
     .btn-line                  outline (projects.css drew a 6px grey box); the calendar's
                                arrow tabs (.caltab) keep their own look
     .btn-line painted red      (inline style: Send, Attach, a pop-up's OK) the main red,
                                with the theme's own word colour (white on the dark-mode red
                                was 3.4:1)
     .btn-line.danger           the red edge (Leave/Delete a group)
     .nb-go, .ixbtn.go,
     .ml-add .tk-go             the main red (the last one small: it sits in a row)
     .ml-donebtn                "3 done · Show": a quiet show/hide, so the ghost, small
     .sheet-x, .nb-x, .rt-x,
     .mhead .x                  a ghost round close
     .overlay / .modal          the new pop-up surface: page dimmed, 16px corners, the box in
                                the middle, a 24px title
   The item sheet stays a sheet (his call, 21 Oct): only its buttons change. */

/* ── OUTLINE: every Projects .btn-line ── */
:where(body:not(.role-tech):not(.role-driver)) .pj .btn-line:where(:not(.caltab .btn-line)),
:where(body:not(.role-tech):not(.role-driver)) .pj.btn-line{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:0 20px;border-radius:999px;border:1.5px solid var(--bt-edge);
  background:transparent;color:var(--ink);font-family:'Inter',system-ui,sans-serif;font-size:15px;font-weight:600;line-height:1.2;
  white-space:nowrap;cursor:pointer}
:where(body:not(.role-tech):not(.role-driver)) .pj .btn-line:where(:not(.caltab .btn-line)):hover,
:where(body:not(.role-tech):not(.role-driver)) .pj.btn-line:hover{border-color:var(--bt-edge);color:var(--ink)}
/* a row's own button is the small size (the "needs" rows on My list) */
:where(body:not(.role-tech):not(.role-driver)) .pj .mlrow.needrow .btn-line{min-height:32px;padding:0 14px;font-size:14px}
/* the calendar's ‹ › Today tabs are not family buttons: today's look, and the 28px they were
   drawn at (family.css's 44px floor would stretch them) */
:where(body:not(.role-tech):not(.role-driver)) .pj .caltab .btn-line{min-height:28px}

/* ── MAIN RED ──
   The three .btn-line painted red by an inline style (Send, Attach, a pop-up's OK) keep their
   red from it; the word colour and the edge are put right here, so !important. */
:where(body:not(.role-tech):not(.role-driver)) .pj .btn-line[style*="background:var(--accent)"]{
  background:var(--accent)!important;color:var(--on-accent)!important;border-color:transparent!important}
/* (projects.css sets every .composer button to 13px 500 at a class more: Send keeps the family's words) */
:where(body:not(.role-tech):not(.role-driver)) .pj .composer .btn-line{font-size:15px;font-weight:600}
:where(body:not(.role-tech):not(.role-driver)) .pj .nb-go,
:where(body:not(.role-tech):not(.role-driver)) .pj .ixbtn.go,
:where(body:not(.role-tech):not(.role-driver)) .pj .ml-add .tk-go{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:0 20px;border-radius:999px;border:1.5px solid transparent;
  background:var(--accent);color:var(--on-accent);font-family:'Inter',system-ui,sans-serif;font-size:15px;font-weight:600;line-height:1.2;
  white-space:nowrap;cursor:pointer}
:where(body:not(.role-tech):not(.role-driver)) .pj .ml-add .tk-go{min-height:32px;padding:0 14px;font-size:14px}
:where(body:not(.role-tech):not(.role-driver)) .pj .nb-go:hover,
:where(body:not(.role-tech):not(.role-driver)) .pj .ixbtn.go:hover,
:where(body:not(.role-tech):not(.role-driver)) .pj .ml-add .tk-go:hover{background:var(--accent);color:var(--on-accent);border-color:transparent}

/* ── RED EDGE: delete ── */
:where(body:not(.role-tech):not(.role-driver)) .pj .btn-line.danger,
:where(body:not(.role-tech):not(.role-driver)) .pj .btn-line.danger:hover{background:transparent;color:var(--bt-del-ink);border-color:var(--accent)}

/* ── QUIET: show / hide the finished ones ── */
:where(body:not(.role-tech):not(.role-driver)) .pj .ml-donebtn{
  display:inline-flex;align-items:center;min-height:32px;padding:0 14px;margin:0 0 6px -14px;border:0;border-radius:999px;
  background:transparent;color:var(--ink-soft);font-size:14px;font-weight:600}
:where(body:not(.role-tech):not(.role-driver)) .pj .ml-donebtn:hover{background:transparent;color:var(--ink-soft)}

/* ── GHOST ROUND CLOSE ── */
:where(body:not(.role-tech):not(.role-driver)) .pj .sheet-x,
:where(body:not(.role-tech):not(.role-driver)) .pj .nb-x,
:where(body:not(.role-tech):not(.role-driver)) .pj .rt-x,
:where(body:not(.role-tech):not(.role-driver)) .pj .mhead .x{
  display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;
  width:32px;height:32px;min-width:32px;padding:0;border:0;border-radius:50%;opacity:1;
  background:transparent;color:var(--ink-soft);font-size:15px;line-height:1;cursor:pointer}
/* the sheet's close floats over the sheet's top corner: it keeps the sheet's white behind it */
:where(body:not(.role-tech):not(.role-driver)) .pj .sheet > .sheet-x{background:var(--surface)}
:where(body:not(.role-tech):not(.role-driver)) .pj .sheet-x svg{width:17px;height:17px}
:where(body:not(.role-tech):not(.role-driver)) :is(.pj .sheet-x,.pj .nb-x,.pj .rt-x,.pj .mhead .x):hover{background:transparent;color:var(--ink-soft)}
:where(body:not(.role-tech):not(.role-driver)) .pj .sheet > .sheet-x:hover{background:var(--surface)}

/* hover for a mouse only (a tap on a phone keeps the resting colours), then pressed */
@media (hover:hover) and (pointer:fine){
  :where(body:not(.role-tech):not(.role-driver)) .pj .btn-line:where(:not(.caltab .btn-line)):not(.danger):not([style*="background:var(--accent)"]):hover{background:var(--bt-line-h);border-color:var(--ink)}
  :where(body:not(.role-tech):not(.role-driver)) .pj .btn-line[style*="background:var(--accent)"]:hover{background:var(--bt-main-h)!important}
  :where(body:not(.role-tech):not(.role-driver)) :is(.pj .nb-go,.pj .ixbtn.go,.pj .ml-add .tk-go):hover{background:var(--bt-main-h)}
  :where(body:not(.role-tech):not(.role-driver)) .pj .btn-line.danger:hover{background:var(--bt-del-wash)}
  :where(body:not(.role-tech):not(.role-driver)) .pj .ml-donebtn:hover{background:var(--bt-neu);color:var(--ink)}
  :where(body:not(.role-tech):not(.role-driver)) :is(.pj .sheet-x,.pj .nb-x,.pj .rt-x,.pj .mhead .x):hover,
  :where(body:not(.role-tech):not(.role-driver)) .pj .sheet > .sheet-x:hover{background:var(--bt-neu);color:var(--ink)}
}
:where(body:not(.role-tech):not(.role-driver)) .pj .btn-line:where(:not(.caltab .btn-line)):not(.danger):not([style*="background:var(--accent)"]):active{background:var(--bt-line-p);border-color:var(--ink)}
:where(body:not(.role-tech):not(.role-driver)) .pj .btn-line[style*="background:var(--accent)"]:active{background:var(--bt-main-p)!important}
:where(body:not(.role-tech):not(.role-driver)) :is(.pj .nb-go,.pj .ixbtn.go,.pj .ml-add .tk-go):active{background:var(--bt-main-p)}
:where(body:not(.role-tech):not(.role-driver)) .pj .btn-line.danger:active{background:var(--bt-del-wash-p)}
:where(body:not(.role-tech):not(.role-driver)) .pj .ml-donebtn:active,
:where(body:not(.role-tech):not(.role-driver)) :is(.pj .sheet-x,.pj .nb-x,.pj .rt-x,.pj .mhead .x):active{background:var(--bt-neu-p)}

/* colour fades, the family's press, and the family's keyboard ring */
:where(body:not(.role-tech):not(.role-driver)) :is(.pj .btn-line:where(:not(.caltab .btn-line)),.pj .nb-go,.pj .ixbtn.go,.pj .ml-add .tk-go,.pj .ml-donebtn,.pj .sheet-x,.pj .nb-x,.pj .rt-x,.pj .mhead .x){
  transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .16s cubic-bezier(.23,1,.32,1)}
:where(body:not(.role-tech):not(.role-driver)) :is(.pj .btn-line:where(:not(.caltab .btn-line)),.pj .nb-go,.pj .ixbtn.go,.pj .ml-add .tk-go,.pj .ml-donebtn,.pj .sheet-x,.pj .nb-x,.pj .rt-x,.pj .mhead .x):focus-visible{
  outline:none;box-shadow:0 0 0 2px var(--surface),0 0 0 4.5px var(--ink)}
@media (prefers-reduced-motion:reduce){
  :where(body:not(.role-tech):not(.role-driver)) :is(.pj .btn-line,.pj .nb-go,.pj .ixbtn.go,.pj .ml-add .tk-go,.pj .ml-donebtn,.pj .sheet-x,.pj .nb-x,.pj .rt-x,.pj .mhead .x){transition:none}
}

/* ═══ THE POP-UP (modal() and the new-item notebook) ═══════════════════════════
   The page dimmed (no blur), one white box with 16px corners. margin:auto puts it in the
   middle and, when it is taller than the window, lets it start at the top and scroll
   (align-items:center would cut its top off). */
:where(body:not(.role-tech):not(.role-driver)) .pj .overlay,
:where(body:not(.role-tech):not(.role-driver)) .pj.overlay{background:var(--bt-veil);-webkit-backdrop-filter:none;backdrop-filter:none;padding:24px 18px}
:where(body:not(.role-tech):not(.role-driver)) .pj .overlay > .modal{margin:auto;border-radius:16px;border:0;box-shadow:var(--bt-pop-shadow);background:var(--surface)}
:where(body:not(.role-tech):not(.role-driver)) .pj .overlay > .modal:not(.nb){padding:24px}
/* the title: 24px (modal() writes 15px into its style, hence !important), the close top right */
:where(body:not(.role-tech):not(.role-driver)) .pj .modal .mhead{align-items:flex-start;gap:16px;border-bottom:0;padding-bottom:6px}
:where(body:not(.role-tech):not(.role-driver)) .pj .modal .mhead h2{font-size:24px!important;font-weight:600!important;line-height:1.2;letter-spacing:-.01em;margin:0;overflow-wrap:anywhere}
:where(body:not(.role-tech):not(.role-driver)) .pj .modal .mhead .x{margin:-4px -8px 0 0}
:where(body:not(.role-tech):not(.role-driver)) .pj .modal .mfoot{align-items:center}
/* the notebook's own head is its kind tabs: the close sits in the row */
:where(body:not(.role-tech):not(.role-driver)) .pj .nb-tabs{padding-right:12px}
:where(body:not(.role-tech):not(.role-driver)) .pj .nb-foot{padding:14px 18px}
