/* What every part shares: the reset, type, buttons, chips, status words, the switch and the form controls. Colours and sizes come from tokens.css. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 13px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accm); outline-offset: 1px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -48px; z-index: 100; padding: 8px 12px; background: var(--pn); border: 1px solid var(--ln); border-radius: 6px; }
.skip-link:focus { top: 8px; }

.mono { font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.grow { flex: 1 1 auto; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.note { color: var(--dim); font-size: 12px; }
.two { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.two b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.two small { color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border: 1px solid var(--ln2); border-radius: 6px; background: var(--pn2); color: var(--tx);
  cursor: pointer; font-weight: 500; white-space: nowrap;
}
.btn:hover { background: var(--hov); border-color: var(--dim); }
.btn-primary { background: var(--acc); border-color: var(--acc); color: var(--on-acc); font-weight: 600; }
.btn-primary:hover { background: var(--acc); border-color: var(--acc); filter: brightness(1.08); }
.btn-small { height: 26px; padding: 0 9px; font-size: 12px; }
.btn-danger { color: var(--bd); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.icon-btn {
  width: 28px; height: 28px; display: inline-grid; place-items: center; flex: none; padding: 0;
  border: 1px solid transparent; border-radius: 6px; background: none; color: var(--dim); cursor: pointer;
}
.icon-btn:hover { background: var(--hov); color: var(--tx); }

.count { font: 600 11px var(--mono); color: var(--dim); border: 1px solid var(--ln2); border-radius: 10px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px;
  border: 1px solid var(--ln2); border-radius: 4px; font-size: 11px; font-weight: 600; color: var(--dim); white-space: nowrap;
}
.tile {
  min-width: 20px; height: 20px; padding: 0 3px; flex: none; display: inline-grid; place-items: center;
  border-radius: 5px; background: var(--pn2); border: 1px solid var(--ln2); font: 700 10px var(--mono); color: var(--acct);
}
/* The same tile once an icon is known: the picture fills it, at the box the letters had, so a row does not move. */
.tile.tile-picture, .dm-tile.tile-picture { width: 20px; min-width: 20px; padding: 0; overflow: hidden; }
.tile.map-tile.tile-picture { width: 16px; min-width: 16px; }
.tile-picture img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* The Icon group of a Block's panel: the picture at a size to be judged, and the words beside it. */
.icon-group { display: grid; gap: 8px; justify-items: start; }
.icon-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.icon-row .note { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tile.icon-big.tile-picture { width: 40px; min-width: 40px; height: 40px; border-radius: 8px; }

/* A role chip: what kind of Block a row is. The File chip is yellow, apart from the amber accent. */
.role { display: inline-block; border: 1px solid var(--ln2); border-radius: 3px; padding: 0 6px; font: 600 11.5px/18px var(--font); white-space: nowrap; }
.role-site { color: var(--site); border-color: var(--site); }
.role-file { color: var(--file); border-color: var(--file); background: var(--filebg); }
.role-integration { color: var(--int); border-color: var(--int); }

/* A status word: a shape and a colour, so that colour alone never carries it. */
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.status i { width: 8px; height: 8px; background: currentColor; flex: none; }
.status-ok { color: var(--ok); }
.status-ok i { border-radius: 50%; }
.status-warning { color: var(--wn); }
.status-warning i { transform: rotate(45deg); }
.status-bad { color: var(--bd); }
.status-bad i { border-radius: 1px; }
.status-none { color: var(--no); }
.status-none i { border-radius: 1px; }
.status-unknown { color: var(--dim); }
.status-unknown i { border-radius: 50%; background: none; border: 1.5px solid currentColor; }

/* A control that reaches a Web2 service wears the browser's own mark; the word beside it says what it is when the browser draws none. */
.web2 { display: inline-flex; align-items: center; gap: 6px; }
.web2-word { font: 700 10px/1 var(--font); color: var(--on-acc); background: var(--web2); border-radius: 999px; padding: 3px 6px; }

.switch { position: relative; width: 36px; height: 20px; flex: none; padding: 0; border: 1px solid var(--ctl); border-radius: 10px; background: var(--pn2); cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--dim); }
.switch[aria-checked="true"] { background: var(--accbg); border-color: var(--accln); }
.switch[aria-checked="true"]::after { left: 18px; background: var(--accm); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--dim); }
.input { height: 30px; min-width: 0; width: 100%; padding: 0 10px; border: 1px solid var(--ctl); border-radius: 6px; background: var(--inp); color: var(--tx); }
.input:focus-visible { outline: 2px solid var(--accm); outline-offset: 1px; }

.noscript { padding: 16px; }
