/* Deeps — the panels (/panel/), on site.css's tokens and components. Signed out: one card across the page, the form
   beside Deeps' own side. Signed in: one frame on every page, the menu beside the page (a row of tabs on narrow
   screens). Nothing needs a script. */

/* ---- signing in: the form, and Deeps' side beside it ---- */
.auth{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-height:560px;margin-block:var(--s4) var(--s7);
  background:var(--card);border-radius:var(--r);overflow:hidden}
.auth-form{display:flex;flex-direction:column;justify-content:center;padding:var(--s7) var(--s6)}
.auth-form > *{width:100%;max-width:400px;margin-inline:auto}
.auth-side{display:flex;flex-direction:column;justify-content:center;gap:var(--s5);padding:var(--s7) var(--s6);color:#fff;
  background:var(--a1)}
/* the logo on its own white tile: its two blues stay clear on the brand's blue */
.mark{display:grid;place-items:center;width:80px;height:80px;border-radius:var(--r);background:#fff}
.mark img{width:56px;height:56px;display:block}
.auth-side h2{font-size:var(--fs-xl);font-weight:900;line-height:1.5}
.auth-side ul{list-style:none;display:flex;flex-direction:column;gap:var(--s4)}
.auth-side li{display:flex;gap:var(--s3);align-items:flex-start;line-height:1.7}
.auth-side li svg{width:24px;height:24px;flex:none;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.title{font-size:var(--fs-xl);font-weight:900;line-height:1.5;margin-bottom:var(--s2)}
.sub{color:var(--muted);font-size:var(--fs-sm);margin-bottom:var(--s5)}
.links{display:flex;justify-content:center;gap:var(--s4);flex-wrap:wrap;margin-top:var(--s4);font-size:var(--fs-sm)}
.links a{color:var(--accent);text-decoration:none;font-weight:700}
.links a:hover{text-decoration:underline}
.foot{margin-top:var(--s5);padding-top:var(--s4);border-top:1px solid var(--line);color:var(--muted);font-size:var(--fs-sm);
  text-align:center}
.foot a{color:var(--accent);font-weight:700}

/* ---- signed in: the menu beside the page ---- */
.frame{display:grid;grid-template-columns:240px minmax(0,1fr);gap:var(--s6);align-items:start;margin-block:var(--s4) var(--s7)}
.menu{position:sticky;top:var(--s4);display:flex;flex-direction:column;gap:var(--s1);padding:var(--s2);background:var(--card);
  border-radius:var(--r)}
.menu .group{padding:var(--s3) var(--s3) var(--s1);color:var(--muted);font-size:var(--fs-xs);font-weight:700}
.menu a{display:flex;align-items:center;gap:var(--s3);min-height:var(--h);padding:0 var(--s3);border-radius:var(--r-sm);
  text-decoration:none;font-weight:700;color:var(--muted)}
.menu a svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.menu a:hover{background:var(--raised);color:var(--text)}
.menu a[aria-current=page]{background:var(--accent-bg);color:var(--text)}
.page{min-width:0;display:flex;flex-direction:column;gap:var(--s4)}
.page .flash{margin:0}

/* a page's head: its title (and the way back above it), its main action at the far end */
.head{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);flex-wrap:wrap;min-height:var(--h)}
.head h1{font-size:var(--fs-xl);font-weight:900;line-height:1.4;display:flex;align-items:center;gap:var(--s3);flex-wrap:wrap}
.back{display:inline-flex;align-items:center;gap:var(--s1);color:var(--accent);font-size:var(--fs-sm);font-weight:700;
  text-decoration:none;align-self:flex-start}
.back:hover{text-decoration:underline}
.back svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.actions{display:flex;flex-wrap:wrap;gap:var(--s2);align-items:center}
.actions form,.item-actions form{margin:0}
.lead-text{color:var(--muted);font-size:var(--fs-sm)}
.card .lead-text{margin-bottom:var(--s4)}
.stack{display:flex;flex-direction:column;gap:var(--s4)}
.part{margin-top:var(--s5);padding-top:var(--s5);border-top:1px solid var(--line)}  /* a part of a card, below a line */

/* rows inside a card, a line between them: what each one is, its action at the far end */
.lines{list-style:none;margin-bottom:var(--s4)}
.lines > li{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);padding-block:var(--s3);
  border-bottom:1px solid var(--line)}
.lines > li:first-child{padding-top:0}
.lines > li:last-child{border-bottom:0;padding-bottom:0}

/* numbers at a glance: 4 in a row, 2 + 2, or one column */
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--s4)}
.stat{display:flex;flex-direction:column;gap:var(--s2);text-decoration:none;transition:background-color .15s}
.stat:hover{background:var(--raised)}
.stat .label{color:var(--muted);font-size:var(--fs-sm)}
.stat .value{font-size:var(--fs-2xl);font-weight:900;line-height:1.2}

/* two blocks side by side, equal in height */
.split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s4);align-items:stretch}

/* the player's picture beside what their account is */
.profile{display:flex;gap:var(--s5);align-items:center}
.profile .facts{flex:1;min-width:0}

/* ---- a table of rows: a header, then one link per row (a whole row opens its page) ---- */
.rows{list-style:none;background:var(--card);border-radius:var(--r);
  overflow:hidden}
.rows-head,.row{display:grid;grid-template-columns:var(--cols);gap:var(--s4);align-items:center;padding:0 var(--s5)}
.rows-head{min-height:var(--h);color:var(--muted);font-size:var(--fs-xs);font-weight:700;background:var(--inset);
  border-bottom:1px solid var(--line)}
.row{min-height:60px;text-decoration:none;border-bottom:1px solid var(--line)}
.rows li:last-child .row{border-bottom:0}
a.row:hover{background:var(--raised)}
.row > span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row .strong{font-weight:700}
.row .lbl{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.users{--cols:minmax(0,1.1fr) minmax(0,1.7fr) 128px minmax(0,.9fr) minmax(0,.9fr)}
.users .c-email,.users .c-joined,.users .c-seen{color:var(--muted);font-size:var(--fs-sm)}

/* pages of a long table */
.pager{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);flex-wrap:wrap}
.pager .count{color:var(--muted);font-size:var(--fs-sm)}
.pages{display:flex;align-items:center;gap:var(--s1);flex-wrap:wrap}
.pages a,.pages span{display:inline-grid;place-items:center;min-width:var(--h);min-height:var(--h);padding:0 var(--s2);
  border-radius:var(--r-sm);font-weight:700;text-decoration:none}
.pages a:hover{background:var(--raised)}
.pages [aria-current]{background:var(--accent-bg)}
.pages .gap{color:var(--muted);min-width:var(--s5)}

/* finding in a table: one field and its button on one line */
.searchbar{display:flex;gap:var(--s3);align-items:flex-end}
.searchbar .field{flex:1;margin:0}

/* ---- a list of cards: what each one is, its actions at the far end ---- */
.items{list-style:none;display:flex;flex-direction:column;gap:var(--s3)}
.item{display:flex;gap:var(--s4);align-items:center;justify-content:space-between;padding:var(--s4) var(--s5)}
.item-main{min-width:0;display:flex;flex-direction:column;gap:var(--s1)}
.item-title{font-size:var(--fs-md);font-weight:700;display:flex;align-items:center;gap:var(--s2);flex-wrap:wrap}
.item-actions{display:flex;flex-wrap:wrap;gap:var(--s2);justify-content:flex-end;align-items:center}
.detail{color:var(--muted);font-size:var(--fs-xs);word-break:break-all;direction:ltr;text-align:left}  /* any Persian in it joined */
.dot{width:10px;height:10px;border-radius:50%;flex:none;background:var(--muted)}
.dot.on{background:var(--ok)}
.empty{color:var(--muted);padding:var(--s6) var(--s5);text-align:center;background:var(--card);border-radius:var(--r)}

/* the rarer actions, folded away until asked for */
.more{position:relative}
.more summary{list-style:none}
.more summary::-webkit-details-marker{display:none}
.more[open] summary{background:var(--raised)}
.pop{position:absolute;inset-inline-end:0;top:calc(100% + var(--s1));z-index:10;min-width:220px;display:flex;flex-direction:column;
  padding:var(--s2);background:var(--popup);border-radius:var(--r)}
.pop a,.pop button{display:flex;align-items:center;width:100%;min-height:var(--h);padding:0 var(--s3);border:0;border-radius:var(--r-sm);
  background:none;color:inherit;font:inherit;font-weight:700;text-align:start;text-decoration:none;white-space:nowrap;cursor:pointer}
.pop form{margin:0}
.pop a:hover,.pop button:hover{background:var(--hover)}
.pop a.danger{color:var(--danger)}

/* facts: a label and its value on each line */
dl.facts{display:flex;flex-direction:column}
dl.facts div{display:flex;justify-content:space-between;align-items:center;gap:var(--s4);min-height:48px;
  border-bottom:1px solid var(--line)}
dl.facts div:last-child{border-bottom:0}
dl.facts dt{color:var(--muted);font-size:var(--fs-sm)}
dl.facts dd{font-weight:700;text-align:end;min-width:0;overflow-wrap:anywhere}

/* the authenticator's key, to type into its app */
.key{font-family:Consolas,"Courier New",monospace;font-size:var(--fs-lg);letter-spacing:1px;text-align:center;padding:var(--s4);
  margin-bottom:var(--s4);border-radius:var(--r-sm);background:var(--field);overflow-wrap:anywhere}

/* asking first: what happens, a red "yes" and a way back */
.confirm p{font-size:var(--fs-lg);margin-bottom:var(--s5)}

@media (max-width:900px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:820px){
  .frame{grid-template-columns:minmax(0,1fr);gap:var(--s4)}
  .menu{position:static;flex-direction:row;overflow-x:auto;scrollbar-width:none}  /* the page never gets wider */
  .menu .group{display:none}
  .menu a{flex:none;white-space:nowrap}
  .auth{grid-template-columns:minmax(0,1fr);min-height:0}
  .auth-side{display:none}
  .split{grid-template-columns:minmax(0,1fr)}
  .item{flex-direction:column;align-items:stretch}
  .item-actions{justify-content:flex-start}
  .pop{inset-inline-end:auto;inset-inline-start:0}
}
@media (max-width:640px){
  .lines > li{flex-direction:column;align-items:flex-start;gap:var(--s3)}  /* a row's action under its words, as a card's */
  .auth-form{padding:var(--s6) var(--s5)}
  .rows-head{display:none}
  .row{grid-template-columns:minmax(0,1fr) auto;gap:var(--s1) var(--s3);padding:var(--s3) var(--s4)}
  .row .lbl{position:static;width:auto;height:auto;clip-path:none}
  .users .c-name{grid-column:1;grid-row:1}
  .users .c-state{grid-column:2;grid-row:1}
  .users .c-email,.users .c-joined,.users .c-seen{grid-column:1 / -1;color:var(--muted);font-size:var(--fs-sm)}
  .searchbar{flex-direction:column;align-items:stretch}
  .profile{flex-direction:column;align-items:stretch}
  .profile .face{align-self:center}
}
@media (max-width:560px){.stats{grid-template-columns:minmax(0,1fr)}}
