/* ------------------------------------------------------------------ tokens */
:root {
  --ink:   #0F0F0F;
  --ink-2: #171717;
  --ink-3: #262626;
  --bone:  #EDEDED;
  --dim:   #8F8F8F;
  --accent: #F5A524;

  --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;

  --gut: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  min-height: 100dvh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
  transition: background .5s ease;
}

/* ------------------------------------------------------------------ washes */
/* One layer per site, stacked. Only the active one is visible; cross-fading
   whole layers is smooth in a way that animating gradient stops is not. */
.washes { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.wash {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .55s ease;
}
.wash.on { opacity: 1; }

/* The photograph, if there is one. */
.wimg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .6s ease, transform 8s ease-out;
}
.wash.haspic .wimg { opacity: .3; }
.wash.on.haspic .wimg { transform: scale(1); }

/* The colour over the top. Without a picture this is the whole thing and
   looks exactly as it did before; with one it keeps the tint readable and
   stops a busy photo fighting the cards. */
.wtint {
  position: absolute; inset: 0;
  background:
    radial-gradient(120vw 90vh at 15% -10%, var(--tint), transparent 55%),
    radial-gradient(90vw 80vh at 100% 110%, var(--deep), transparent 65%),
    linear-gradient(160deg, var(--deep), transparent 70%);
  opacity: .5;
}
.wash.haspic .wtint {
  opacity: .72;
  background:
    radial-gradient(120vw 90vh at 15% -10%, var(--tint), transparent 60%),
    linear-gradient(180deg, rgba(21, 21, 21, .55), rgba(21, 21, 21, .88));
}

/* A little tooth over the top so the gradients don't band on wide screens. */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ chrome */
.top, main { position: relative; z-index: 2; }

.top { z-index: 10 !important; padding: var(--gut) var(--gut) 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(22px, 4vw, 30px); letter-spacing: -.03em;
}
.mark .bulb {
  width: 11px; height: 11px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 16px currentColor;
  animation: flicker 5s infinite;
}
@keyframes flicker { 0%,88%,100% { opacity: 1 } 92% { opacity: .35 } 95% { opacity: .9 } }

/* ------------------------------------------------------------------- cards */
main {
  flex: 1 1 auto;
  display: flex; align-items: center;
  padding: var(--gut);
}

.cards {
  width: 100%;
  display: grid;
  /* four to a row; the fifth site onwards starts a new line */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}
@media (max-width: 1200px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 920px)  { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card {
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 3vw, 30px);
  min-height: clamp(190px, 26vh, 250px);
  text-decoration: none; color: inherit;

  background: rgba(30, 30, 30, .62);
  border: 1px solid var(--ink-3);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);

  transition: transform .28s cubic-bezier(.2,.7,.3,1),
              border-color .28s ease, background .28s ease, opacity .28s ease;
}

/* Art sits behind the words, bleeding off the corner, and comes up as the
   card is picked. Faint enough that the name stays the thing you read. */
.cart {
  position: absolute; right: -26px; top: -20px;
  width: 190px; height: 190px;
  color: var(--tint); opacity: .1;
  pointer-events: none;
  transition: opacity .32s ease, transform .38s cubic-bezier(.2,.7,.3,1);
}
.cart svg { width: 100%; height: 100%; display: block; }
.card.lit .cart { opacity: .3; transform: scale(1.07) rotate(-2deg); }
.card.dim .cart { opacity: .06; }

/* Everything else rides above it. */
.card > *:not(.cart) { position: relative; z-index: 1; }

.card .ico {
  width: 34px; height: 34px; color: var(--tint);
  transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.card .ico svg { width: 100%; height: 100%; display: block; }

.cname {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(20px, 2.6vw, 25px); letter-spacing: -.02em;
  margin-top: 2px;
}

.ctags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ctags span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--ink-3); border-radius: 999px; padding: 3px 9px;
  transition: color .28s ease, border-color .28s ease;
}

.cgo {
  margin-top: auto; padding-top: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--tint);
  display: inline-flex; align-items: center; gap: 8px;
}
.cgo span { transition: transform .28s cubic-bezier(.2,.7,.3,1); }

/* The one under the pointer comes forward; the rest step back. */
.card.lit {
  transform: translateY(-6px);
  border-color: var(--tint);
  background: rgba(30, 30, 30, .78);
}
.card.lit .ico { transform: scale(1.08) rotate(-3deg); }
.card.lit .cgo span { transform: translateX(5px); }
.card.lit .ctags span { color: var(--tint); border-color: var(--tint); }
.card.dim { opacity: .42; }

.card:focus-visible { outline: 2px solid var(--tint); outline-offset: 4px; }

@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  main { align-items: flex-start; }
  body { padding-bottom: env(safe-area-inset-bottom); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================================================================ accounts */
.acct { position: relative; z-index: 5; min-height: 42px; min-width: 96px; display: flex; align-items: center; justify-content: flex-end; }

.abtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--ink-3); background: rgba(30, 30, 30, .7);
  color: var(--bone); font: 600 14px var(--body); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color .15s, background .15s;
}
.abtn:hover { border-color: #4a4060; background: rgba(44, 44, 44, .85); }
.abtn:disabled { opacity: .5; cursor: default; }
.abtn--primary { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.abtn--primary:hover { background: #fff; border-color: #fff; }
.abtn--ghost { background: transparent; }
.abtn--wide { width: 100%; height: 42px; }
.abtn--sm { height: 30px; padding: 0 10px; }
.abtn:focus-visible, .amenu__btn:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

/* Rounded-square avatars */
.av { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex-shrink: 0; display: inline-block; background: var(--ink-3); }
.av--blank { display: inline-grid; place-items: center; font: 700 13px var(--display); color: var(--bone); }
.av--xl { width: 96px; height: 96px; border-radius: 18px; font-size: 38px; }

.amenu { position: relative; }
.amenu__btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 12px 0 6px; border-radius: 12px;
  border: 1px solid var(--ink-3); background: rgba(30, 30, 30, .7);
  color: var(--bone); font: 600 14px var(--body); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.amenu__btn:hover { border-color: #4a4060; }
.amenu__name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: var(--dim); font-size: 11px; }
.amenu__pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  padding: 6px; border-radius: 12px; border: 1px solid var(--ink-3);
  background: rgba(25, 25, 25, .97); box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}
.amenu__who { padding: 8px 10px 10px; font-weight: 700; border-bottom: 1px solid var(--ink-3); margin-bottom: 4px; }
.amenu__who small { display: block; font: 400 12px var(--mono); color: var(--dim); margin-top: 2px; }
.amenu__pop button, .amenu__pop a, .rowmenu__pop button {
  display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px;
  background: none; border: 0; color: var(--bone); font: 500 14px var(--body); cursor: pointer;
}
.amenu__pop button:hover, .amenu__pop a:hover, .rowmenu__pop button:hover { background: var(--ink-3); }
.amenu__pop .sep { border-top: 1px solid var(--ink-3); border-radius: 0 0 8px 8px; margin-top: 4px; padding-top: 11px; }

/* Dialogs */
.dlg {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  padding: 26px; border-radius: 18px; border: 1px solid var(--ink-3);
  background: #1b1b1b; color: var(--bone); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  overflow-y: auto;
}
.dlg::backdrop { background: rgba(9, 9, 9, .72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg--md { width: min(560px, calc(100vw - 24px)); }
.dlg--lg { width: min(1080px, calc(100vw - 24px)); }
.dlg__x {
  position: sticky; top: 0; float: right; margin: -10px -10px 0 0;
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--ink-3);
  background: var(--ink-2); color: var(--bone); font-size: 20px; line-height: 1; cursor: pointer; z-index: 2;
}
.dlg__title { margin: 0 0 18px; font: 800 24px var(--display); letter-spacing: -.02em; }

.form { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1 1 200px; }
.fld { display: grid; gap: 6px; }
.fld > span, .psec h3 {
  font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 0;
}
.fld--inline { display: flex; align-items: center; gap: 8px; }
.dlg input:not([type=checkbox]):not([type=file]), .dlg select {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--ink-3); background: var(--ink); color: var(--bone);
  font: 400 14px var(--body); outline: none;
}
.dlg select { width: auto; height: 34px; padding: 0 8px; cursor: pointer; }
.dlg input:focus, .dlg select:focus { border-color: #F5A524; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); cursor: pointer; }
.chk input { accent-color: var(--bone); width: 16px; height: 16px; }
/* Permission boxes: same grey whether on, off or locked by the role */
.perm input {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; margin: 0; flex-shrink: 0;
  border: 1px solid #4a4360; border-radius: 4px; background: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.perm input:checked { background: var(--dim); border-color: var(--dim); }
.perm input:checked::after {
  content: ""; width: 4px; height: 8px; margin-top: -2px;
  border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.perm input:disabled { cursor: default; opacity: .55; }
.err { margin: 0; min-height: 1em; color: #ff8e7a; font-size: 13px; }
.err:empty { display: none; }
.hint { margin: 0; color: var(--dim); font-size: 13px; }
.hint code, .note code { font: 12px var(--mono); color: var(--bone); word-break: break-all; }
.note { padding: 12px 14px; border-radius: 10px; border: 1px solid #4a4060; background: rgba(106, 93, 134, .15); font-size: 14px; margin-bottom: 12px; }

.psec { padding: 18px 0; border-top: 1px solid var(--ink-3); display: grid; gap: 10px; }
.psec:first-of-type { border-top: 0; padding-top: 0; }
.psec--end { justify-items: start; }
.avedit { display: flex; gap: 18px; align-items: center; }
.avedit__btns { display: grid; gap: 8px; justify-items: start; }
.acclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.acclist li { display: flex; justify-content: space-between; font-size: 14px; }
.acclist b { font-weight: 600; }

/* Admin */
.tabs { display: flex; gap: 4px; margin: -4px 0 18px; border-bottom: 1px solid var(--ink-3); }
.tabs button {
  padding: 10px 14px; background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--dim); font: 600 14px var(--body); cursor: pointer; margin-bottom: -1px;
}
.tabs button.on { color: var(--bone); border-bottom-color: var(--bone); }
.admbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.admbar--end { margin: 14px 0 0; }
.newuser {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 14px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--ink-3); background: var(--ink);
}
.newuser input { flex: 1 1 160px; width: auto !important; }
.newuser .err { flex-basis: 100%; }
.tblwrap { overflow-x: auto; border: 1px solid var(--ink-3); border-radius: 12px; }
.utbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.utbl th {
  text-align: left; padding: 10px 12px; background: var(--ink);
  font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); white-space: nowrap;
}
.utbl td { padding: 10px 12px; border-top: 1px solid var(--ink-3); vertical-align: top; }
.utbl .who { min-width: 190px; }
.cellflex { display: flex; gap: 10px; align-items: center; }
.utbl .who b { display: block; }
.utbl .who small { font: 400 12px var(--mono); color: var(--dim); }
.utbl .last { white-space: nowrap; color: var(--dim); }
.utbl tr.is-disabled td { opacity: .5; }
.utbl .acc { min-width: 190px; }
.perms { display: grid; gap: 4px; margin-top: 8px; }
.perm { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--dim); }
.perm.is-off { opacity: .45; }
.itbl .notes { color: var(--dim); font-size: 13px; min-width: 240px; }
.dimtxt { color: var(--dim); }
.mono { font-family: var(--mono); font-size: 12px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 500 11px var(--mono); letter-spacing: .06em; border: 1px solid var(--ink-3); }
.pill--admin { color: #f3c969; border-color: rgba(243, 201, 105, .4); }
.pill--member { color: var(--bone); }
.pill--owner { color: #ff9f8a; border-color: rgba(255, 159, 138, .45); }
.pill--new { color: #7fd6b0; border-color: rgba(127, 214, 176, .45); }
.pill--panel { color: #9ec5ff; border-color: rgba(158, 197, 255, .45); }
.act { width: 1%; }
.rowmenu { position: relative; }
.rowmenu__pop {
  position: fixed; z-index: 1200; min-width: 200px;
  padding: 6px; border-radius: 10px; border: 1px solid var(--ink-3); background: #212121; box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
}
.rowmenu__pop .danger { color: #ff8e7a; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px);
  padding: 10px 16px; border-radius: 10px; background: var(--bone); color: var(--ink);
  font: 600 14px var(--body); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #ff8e7a; }

.card[hidden] { display: none; }

@media (max-width: 720px) {
  .amenu__name { display: none; }
  .dlg { padding: 20px; }
  .avedit { flex-direction: column; align-items: flex-start; }
}

/* Site access tab */
.accCard { border: 1px solid var(--ink-3); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--ink); }
.accCard__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.accCard__head b { display: block; }
.accCard__head small { font: 400 12px var(--mono); color: var(--dim); }
.accCard__owner { margin: 0; }
.accRow {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 0; border-top: 1px solid var(--ink-3);
}
.accRow__site { flex: 0 0 130px; font-weight: 600; }
.accRow .perms { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; }
.accsum { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.actbtns { display: flex; gap: 6px; }
.act { white-space: nowrap; }
@media (max-width: 720px) {
  .accRow__site { flex-basis: 100%; }
}

/* ---------------------------------------------------------------- profile */
.dlg--profile { padding: 0 0 22px; }
.dlg--profile .dlg__x { margin: 14px 14px 0 0; background: rgba(9, 9, 9, .6); }
.dlg--profile .psec { margin: 0 26px; }

.phead { margin-bottom: 20px; }
.phead__banner {
  height: 132px; border-radius: 18px 18px 0 0; position: relative;
  background: linear-gradient(120deg, #2c2c2c, #1e1e1e 60%, #272727);
  background-size: cover; background-position: center;
}
.phead__banner::after {
  content: ""; position: absolute; inset: 0; border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(21, 21, 21, .1), rgba(27, 27, 27, .9));
}
.phead__bannerBtns {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; display: flex; gap: 6px;
  opacity: 0; transition: opacity .15s;
}
.phead:hover .phead__bannerBtns, .phead__bannerBtns:focus-within { opacity: 1; }
.phead__bannerBtns .abtn { background: rgba(9, 9, 9, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.phead__row {
  display: flex; align-items: flex-end; gap: 16px;
  margin: -46px 26px 0; position: relative; z-index: 2;
}
.phead__av { position: relative; cursor: pointer; flex-shrink: 0; }
.phead__av .av { width: 92px; height: 92px; border-radius: 20px; border: 3px solid #1b1b1b; font-size: 34px; }
.phead__avEdit {
  position: absolute; inset: 3px; border-radius: 17px;
  display: grid; place-items: center; opacity: 0;
  background: rgba(9, 9, 9, .6); color: var(--bone); font: 600 12px var(--body);
  transition: opacity .15s;
}
.phead__av:hover .phead__avEdit { opacity: 1; }
.phead__who { flex: 1; min-width: 0; padding-bottom: 4px; }
.phead__name { margin: 0; font: 800 24px var(--display); letter-spacing: -.02em; }
.phead__handle { margin: 2px 0 0; font: 400 13px var(--mono); color: var(--dim); }

.psec__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.psec__head h3 {
  font: 700 15px var(--display); letter-spacing: .02em; text-transform: none;
  color: var(--bone); margin: 0;
}
.inlineform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inlineform input { flex: 1 1 170px; width: auto !important; }
.inlineform .err { flex-basis: 100%; }

@media (max-width: 720px) {
  .dlg--profile .psec { margin: 0 16px; }
  .phead__row { margin: -40px 16px 0; flex-wrap: wrap; }
  .phead__av .av { width: 76px; height: 76px; }
}

/* ======================================================= BOV Network look
   Same dark panels and type as every site. Each card and its background
   picture keep that site's own colour. */
.wash.haspic .wtint {
  opacity: .78;
  background:
    radial-gradient(120vw 90vh at 15% -10%, var(--tint), transparent 60%),
    linear-gradient(180deg, rgba(15, 15, 15, .55), rgba(15, 15, 15, .9));
}
.grain { display: none; }

.top { padding: 0 20px; height: 56px; border-bottom: 1px solid var(--ink-3); background: rgba(15, 15, 15, .7);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mark { gap: 0; font: 700 15px var(--mono); letter-spacing: .08em; color: var(--bone); }
.mark span { color: var(--accent); }

.card { background: rgba(23, 23, 23, .72); border-color: var(--ink-3); border-radius: 16px; }
.card.lit { background: rgba(23, 23, 23, .86); border-color: var(--tint); }
.cname { font-weight: 700; letter-spacing: -.01em; }

.abtn { border-radius: 10px; }
.abtn--primary { background: var(--accent); color: #1A1000; border-color: var(--accent); font-family: var(--display); font-weight: 700; }
.abtn--primary:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.08); }
.dlg input:focus, .dlg select:focus, .dlg textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 165, 36, .14); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* Site access: people on the left, one person's sites on the right */
.acc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; min-height: 420px; }
.acc__list { position: sticky; top: 0; display: grid; gap: 8px; padding: 8px; border: 1px solid var(--ink-3); border-radius: 14px; background: var(--ink); max-height: calc(100dvh - 220px); overflow-y: auto; }
.dlg .acc__find { height: 36px; }
.acc__people { display: grid; gap: 2px; }
.acc__person { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 5px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--bone); text-align: left; cursor: pointer; font: inherit; }
.acc__person .av { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 700 13px var(--display); }
.acc__person:hover { background: #FFFFFF08; }
.acc__person.on { background: #FFFFFF10; box-shadow: inset 0 0 0 1px #FFFFFF14; }
.acc__person.is-disabled { opacity: .5; }
.acc__pname { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.acc__pname b { font: 600 14px var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc__pname small { font: 400 11.5px var(--mono); color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc__dots { display: flex; gap: 4px; align-items: center; min-height: 10px; }
.acc__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t); }
.acc__dot.is-admin { box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--t); margin: 0 2px; }
.acc__own, .acc__none { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #ff9f8a; }
.acc__none { color: #5c5c5c; }

.acc__detail { min-width: 0; display: grid; gap: 14px; }
.acc__who { display: flex; align-items: center; gap: 12px; }
.acc__who .av { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 700 17px var(--display); }
.acc__who h3 { margin: 0; font: 700 19px var(--display); }
.acc__who small { font: 400 12px var(--mono); color: var(--dim); }
.acc__who .spacer { flex: 1; }
.acc__count { font: 500 11.5px var(--mono); color: var(--dim); padding: 4px 10px; border: 1px solid var(--ink-3); border-radius: 999px; }
.acc__ownerbox { display: grid; gap: 4px; padding: 18px; border: 1px solid rgba(255, 159, 138, .35); border-radius: 14px; background: rgba(255, 159, 138, .06); }
.acc__ownerbox b { color: #ff9f8a; font: 700 15px var(--display); }
.acc__ownerbox span { color: var(--dim); font-size: 14px; }

.acc__sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.acc__site { display: grid; gap: 12px; align-content: start; padding: 13px 14px; border: 1px solid var(--ink-3); border-left: 3px solid var(--t); border-radius: 12px; background: var(--ink); transition: border-color .15s, opacity .15s; }
.acc__site.is-none { border-left-color: var(--ink-3); background: transparent; }
.acc__site.is-none .acc__sitename { color: var(--dim); }
.acc__site.is-none .acc__sitename i { background: #3a3a3a; }
.acc__sitehead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.acc__sitename { display: flex; align-items: center; gap: 8px; font: 600 14.5px var(--display); }
.acc__sitename i { width: 9px; height: 9px; border-radius: 50%; background: var(--t); }
.acc__seg { display: inline-flex; padding: 2px; border: 1px solid var(--ink-3); border-radius: 9px; background: var(--ink-2); }
.acc__seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--dim); font: 600 12.5px var(--body); cursor: pointer; }
.acc__seg button:hover { color: var(--bone); }
.acc__seg button.on { background: #FFFFFF12; color: var(--bone); }
.acc__seg button.on[data-role=member], .acc__seg button.on[data-role=admin] { background: color-mix(in srgb, var(--t) 18%, transparent); color: var(--t); }
.acc__perms { display: flex; flex-wrap: wrap; gap: 6px; }
.acc__perm { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 8px; border: 1px solid var(--ink-3); border-radius: 999px; background: none; color: var(--dim); font: 500 12.5px var(--body); cursor: pointer; }
.acc__perm:hover { border-color: #3a3a3a; color: var(--bone); }
.acc__tick { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #4a4a4a; display: grid; place-items: center; }
.acc__perm.on { color: var(--bone); border-color: color-mix(in srgb, var(--t) 45%, transparent); background: color-mix(in srgb, var(--t) 8%, transparent); }
.acc__perm.on .acc__tick { border-color: var(--t); background: var(--t); }
.acc__perm.on .acc__tick::after { content: ""; width: 3px; height: 6px; margin-top: -1px; border: solid var(--ink); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }

@media (max-width: 720px) {
  .acc { grid-template-columns: 1fr; min-height: 0; }
  .acc__list { position: static; max-height: none; padding: 6px; }
  .acc__people { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .acc__people::-webkit-scrollbar { display: none; }
  .acc__person { width: auto; flex: 0 0 auto; grid-template-columns: auto auto; max-width: 190px; }
  .acc__sites { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .acc__count { display: none; }
  .acc__who { padding-right: 44px; }
  .acc__sitehead { flex-wrap: nowrap; }
  .acc__seg button { padding: 0 8px; }
}
@media (max-width: 380px) { .acc__sitehead { flex-wrap: wrap; } }
.acc__sitename { min-width: 0; white-space: nowrap; }
@media (max-width: 720px) {
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { white-space: nowrap; padding: 10px 11px; }
  .acc__sitename { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
  .acc__seg { flex-shrink: 0; }
}

/* Activity */
.act__bar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.dlg .act__bar input { flex: 1 1 220px; width: auto; height: 36px; }
.dlg .act__bar select { height: 36px; }
.actlog { display: grid; gap: 4px; width: 100%; }
.act__day { margin: 14px 0 6px; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.act__day:first-child { margin-top: 0; }
.act__grp { border: 1px solid var(--ink-3); border-radius: 12px; background: var(--ink); overflow: hidden; }
.act__row { display: grid; grid-template-columns: 46px minmax(120px, 170px) minmax(0, 1fr) auto 118px; align-items: center; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--ink-3); font-size: 14px; }
.act__row:first-child { border-top: 0; }
.act__row time { font: 500 12px var(--mono); color: var(--dim); }
.act__who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.act__who .av { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font: 700 10px var(--display); }
.act__who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act__what { min-width: 0; color: #cfcfcf; }
.act__what b { color: var(--bone); font-weight: 600; }
.act__n { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: #FFFFFF10; font: 600 11px var(--mono); color: var(--dim); }
.act__site { justify-self: start; padding: 2px 9px; border-radius: 999px; font: 600 11px var(--mono); letter-spacing: .04em; color: var(--t); background: color-mix(in srgb, var(--t) 13%, transparent); white-space: nowrap; }
.act__ip { font: 400 11.5px var(--mono); color: #5f5f5f; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act__row.is-quiet .act__what { color: var(--dim); }
.act__row.is-admin { box-shadow: inset 3px 0 0 #f3c969; }
.act__row.can-open { cursor: pointer; }
.act__row.can-open:hover { background: #FFFFFF05; }
.act__row.can-open .act__n::after { content: " ▾"; }
.act__row[aria-expanded=true] .act__n::after { content: " ▴"; }
.act__sub { grid-column: 3 / -1; list-style: none; margin: 2px 0 2px; padding: 8px 0 0; border-top: 1px dashed var(--ink-3); display: grid; gap: 5px; font-size: 13px; color: #cfcfcf; }
.act__sub[hidden] { display: none; }
.act__sub time { display: inline-block; width: 46px; }
.act__sub b { color: var(--bone); font-weight: 600; }
.act__more { display: flex; justify-content: center; margin-top: 14px; }
.act__more:empty { display: none; }
.act__empty { padding: 20px 0; text-align: center; }
@media (max-width: 720px) {
  .act__row { grid-template-columns: 40px minmax(0, 1fr) auto; row-gap: 3px; padding: 9px 12px; }
  .act__row time { grid-row: span 2; align-self: start; padding-top: 2px; }
  .act__who { grid-column: 2; }
  .act__site { grid-column: 3; grid-row: 1; }
  .act__what { grid-column: 2 / -1; font-size: 13.5px; }
  .act__ip { display: none; }
  .act__sub { grid-column: 2 / -1; }
}

/* admin: worker */
.wk { display: grid; gap: 14px; }
.wk__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.wk__sp { flex: 1; }
.wk__state { padding: 4px 12px; border-radius: 999px; border: 1px solid #3a3a3a; color: #9a9a9a; font: 600 12px 'JetBrains Mono', monospace; }
.wk__state.on { color: #57F287; border-color: #57F28766; background: #57F28714; }
.wk__state.on::before { content: "● "; }
.wk__mods { display: grid; gap: 6px; }
.wk__mod { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: #121212; border-left: 3px solid #ED4245; font-size: 13.5px; }
.wk__mod.ok { border-left-color: #57F287; }
.wk__mod span { color: #9a9a9a; }
.wk__h { margin: 6px 0 -4px; font: 600 11px 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: #8f8f8f; }
.wk__jobs { display: grid; gap: 6px; }
.wjob { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #262626; border-radius: 12px; background: #121212; cursor: pointer; }
.wjob input { width: 18px; height: 18px; accent-color: #EDEDED; flex: 0 0 auto; }
.wjob span { display: grid; }
.wjob small { color: #8f8f8f; font-size: 12.5px; }
.wk__live { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wk__live label { display: grid; gap: 5px; min-width: 0; }
.wk__live label span, .wk__code span { font: 600 11px 'IBM Plex Sans', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #8f8f8f; }
.wk__live input { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid #2e2e2e; background: #0f0f0f; color: #ededed; font: 13px 'JetBrains Mono', monospace; min-width: 0; outline: none; }
.wk__live input:focus { border-color: #8f8f8f; }
.wk__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; grid-column: 1 / -1; }
.wk__code { grid-column: 1 / -1; position: relative; display: grid; gap: 5px; }
.wk__code pre { margin: 0; padding: 12px 14px; border-radius: 10px; background: #0b0b0b; border: 1px solid #242424; color: #d6d6d6; font: 12px/1.55 'JetBrains Mono', monospace; overflow-x: auto; }
.wk__code .abtn { position: absolute; right: 8px; top: 26px; }
.wk__log { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.wk__log div { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: #121212; font-size: 13px; }
.wk__log span { flex: 1; min-width: 0; color: #9a9a9a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk__log small { color: #777; }
.wk__foot { justify-content: flex-end; }
@media (max-width: 640px) { .wk__live { grid-template-columns: 1fr; } .wk__live input { font-size: 16px; } }

.amenu__pop a { display: block; text-decoration: none; color: inherit; box-sizing: border-box; }

/* header: same as every other BOV site (56px bar, 42px account button, avatar + caret) */
.top { flex-shrink: 0; position: sticky !important; top: 0; }
.amenu__btn { gap: 7px; padding: 0 10px 0 6px; background: #171717; border-color: #2E2E2E; }
.amenu__btn:hover { border-color: var(--accent); }
.amenu__name { display: none; }

.amenu__btn {
  height: 42px !important; min-height: 42px !important; box-sizing: border-box !important; margin: 0 !important;
  display: inline-flex !important; align-items: center !important; gap: 7px !important; padding: 0 10px 0 6px !important;
  border-radius: 12px !important; border: 1px solid #2E2E2E !important; background: #171717 !important; color: #EDEDED !important;
  line-height: 1 !important; width: auto !important; max-width: none !important; flex-shrink: 0;
}
.amenu__btn:hover { border-color: var(--accent) !important; }
.amenu__btn .av {
  width: 30px !important; height: 30px !important; border-radius: 8px !important; object-fit: cover; flex-shrink: 0;
  display: inline-grid !important; place-items: center; background: #2E2E2E !important; color: #EDEDED !important;
  font: 700 13px 'Space Grotesk', system-ui, sans-serif !important; border: 0 !important;
}
.amenu__btn .caret { color: #8F8F8F !important; font-size: 11px !important; opacity: 1 !important; display: inline !important; }
