/* ---------------------------------------------------------------------------
   369c Projects — design tokens as custom properties. This block is the
   source of truth for them; nothing else should hardcode a colour.

   The look follows 369c.io: a near-black ink ground with navy panels, pale
   paper text, slate for anything secondary, hairline rules, Space Grotesk
   headings over Inter, IBM Plex Mono for labels, and pill-shaped buttons in
   the brand blue that brighten to the signal blue on hover. The site's own
   values are kept where they meet contrast here; where they don't (small
   text, status colours, input edges on a dark ground) the token is the
   nearest shade that clears WCAG AA — 4.5:1 for text, 3:1 for UI edges — on
   --ground, --sunk and --down-fill alike.

   Tile colours are not here: they live in src/views/palette.ts and are stored
   per project, and their deep, low-chroma tones already sit well on ink.

   NOTE before deploying: this @import pulls fonts from Google. The spec calls
   for self-hosting all three families so the CSP can stay `default-src 'self'`.
--------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Native controls (select menus, checkboxes, scrollbars) render dark too. */
  color-scheme: dark;

  --ground: #04070f;      /* 369c.io --ink */
  --sunk: #0a101f;        /* 369c.io --panel */
  --ink: #e9edf7;         /* 369c.io --paper */
  --muted: #9aa7c0;
  /* Small text: field hints, table headers. 369c.io --slate, which clears AA
     on every ground below. */
  --faint: #7a89a6;
  --rule: rgba(142, 162, 200, 0.14);   /* 369c.io --line */
  /* Input and chip edges: the site's hairline is too faint to find a field by,
     so this is the lightest slate that reaches 3:1. */
  --border: #5a6781;
  /* A down tile drops its colour. On ink that alone reads like one more navy
     tile, so its edge carries a trace of the down signal. */
  --down-fill: #0d1528;
  --down-edge: rgba(255, 107, 97, 0.34);

  --brand: #003da8;       /* 369c.io --brand: primary buttons */
  --signal: #2e6bff;      /* 369c.io --signal: hover, focus, current */
  --signal-soft: rgba(46, 107, 255, 0.16);
  --signal-text: #6e9bff; /* --signal lifted to AA for text */

  --signal-down: #ff6b61;
  --signal-slow: #e5ac34;
  --signal-ok: #3cc585;
  --slow-ink: #e8b84a;
  --danger: #ff6b61;      /* danger as text */
  --danger-fill: #b42318; /* danger as a button, under white text */
  --danger-ink: #ffffff;

  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --tile-h: 164px;
  --gap: 12px;
  --gutter: 36px;
  --radius: 5px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

::selection { background: var(--signal); color: #fff; }

a:focus-visible,
button:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/*
 * Always reserve the scrollbar's width. Without this, a page long enough to
 * scroll is 15px narrower than one that is not, and everything right-aligned
 * in the bar — the whole nav — jumps sideways as you move between them.
 */
html { scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

svg { display: block; }

/* --- shell ---------------------------------------------------------------- */

.app { min-height: 100vh; display: flex; flex-direction: column; }

/*
 * The bar across the top of every signed-in page. Its height is fixed rather
 * than content-driven, and its contents are the same on every page, so moving
 * between pages cannot move it or change its size. The page's own title sits
 * below it in .pagehead and is free to vary.
 *
 * The one thing that could still resize it is the nav wrapping onto a second
 * line on a narrow screen, so it does not wrap: it scrolls sideways inside the
 * bar instead, which keeps the height fixed at every width.
 */
.bar {
  flex: none;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.bar .wordmark { margin: 0; flex: none; text-decoration: none; }

.bar .chips {
  flex-wrap: nowrap;
  min-width: 0;
  /* Room above and below for focus rings, which overflow would otherwise clip. */
  padding: 4px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.bar .chips::-webkit-scrollbar { display: none; }

/*
 * Where you are. Colour only — never font-weight or border width, because
 * either would make the current item wider and push everything after it along,
 * which is exactly the movement this bar exists to prevent.
 */
.bar .chip[aria-current="page"] { background: var(--signal-soft); border-color: var(--signal); }
.bar .chip--on[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--ground); }
.bar .linkbtn[aria-current="page"] { color: var(--ink); text-decoration-thickness: 2px; }

/* A long email must not make the bar heavier than a short one. */
.bar .who {
  flex: none;
  max-width: 24ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pagehead { padding: 28px var(--gutter) 22px; }

/* The brand, in the bar and on the sign-in card. The weight split is the whole
   wordmark. */
.wordmark {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.wordmark span { color: var(--faint); font-weight: 400; }

.display {
  margin: 0;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.chip {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  /* Set explicitly, because `a.chip` below is more specific than `.chip--on`:
     letting the anchor inherit the body colour painted every active chip
     black-on-black. */
  color: var(--ink);
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--signal); }

.chip--on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.chip--on:hover { background: var(--signal); border-color: var(--signal); }
.chip--action { margin-left: 8px; }

.num { font-family: var(--mono); font-size: 11px; opacity: 0.6; }

/* --- the wall ------------------------------------------------------------- */

.wall {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: var(--tile-h);
  gap: var(--gap);
  padding: 0 var(--gutter) var(--gutter);
  align-content: start;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease;
}

.tile:hover { transform: translateY(-2px); }

.tile--down {
  background: var(--down-fill);
  color: var(--muted);
  border: 1.5px solid var(--down-edge);
}

.tile--local {
  border: 1.5px solid var(--border);
  color: var(--muted);
}

.tile--local .tname { color: var(--ink); }

.thead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/*
 * Where the project is hosted, on its own line above the URL.
 *
 * The country is its ISO code, not a flag emoji: Chrome on Windows does not
 * render regional-indicator pairs as flags — 🇬🇧 comes out as a small "GB" — so
 * a flag would look like a broken glyph on half the desks that matter. The
 * code is honest, legible everywhere, and the same width in every locale.
 */
.tloc {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  opacity: 0.82;
}

/* One line only: an operator name like "Amazon Data Services UK" is long, and
   this row must never push the URL off the tile. */
.tloc-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo {
  flex-shrink: 0;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(127, 127, 127, 0.28);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.tfoot { display: flex; flex-direction: column; gap: 5px; }

/*
 * The description lives in the gap the tile already had between its header and
 * its name block, so a card with one is exactly as tall as a card without.
 * Two lines then an ellipsis: the cap in the form is set to roughly this, so
 * clamping is a backstop for narrow breakpoints rather than the normal case.
 */
.tdesc {
  font-size: 12px;
  line-height: 1.38;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  opacity: 0.78;
}

.tname {
  font-family: var(--body);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.turl { font-family: var(--mono); font-size: 10.5px; opacity: 0.78; overflow-wrap: anywhere; }

/*
 * A board tile holds two sibling links — the face, which opens the project,
 * and the pencil, which opens the edit form — because an anchor cannot be
 * nested inside an anchor. So the tile itself is a plain wrapper and the face
 * takes over its padding and layout. Tiles rendered outside the board (the
 * delete confirmation, the form's live preview) stay a single element and use
 * the base .tile rules untouched.
 */
.tile--board { position: relative; padding: 0; }

.tile-face {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}
.tile-face:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -5px;
  border-radius: var(--radius);
}

/*
 * Quiet at rest so twenty-four of them don't read as twenty-four buttons, but
 * always present rather than hover-only: there is no hover on a tablet, and an
 * action nobody can find is not an action. Admins only — the route is gated
 * too, this just stops viewers seeing a control they cannot use.
 */
.tile-edit {
  position: absolute;
  right: 9px;
  bottom: 9px;
  /* 24x24 minimum hit area (WCAG 2.5.8) around a 15px glyph. Kept to the
     minimum rather than bigger: it sits inside a tile that is itself a link,
     so every pixel it gains is a pixel you can mis-tap on the way to opening
     the project. */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 26px;
  border-radius: var(--radius);
  color: inherit;
  opacity: 0.55;
  transition: opacity 120ms ease, background-color 120ms ease;
}
.tile-edit:hover,
.tile-edit:focus-visible {
  opacity: 1;
  /* Mid-grey reads as a wash on the deep tiles and on the pale down/local
     ones alike, which a white or black overlay would not. */
  background: rgba(127, 127, 127, 0.28);
}
.tile-edit:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }

/* Keep a long URL from running under the pencil. */
.tile--editable .turl { padding-right: 24px; }

.tile--down .eyebrow,
.tile--down .turl,
.tile--local .eyebrow,
.tile--local .turl { opacity: 1; color: var(--faint); }

.state { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot--down { background: var(--signal-down); }
.dot--slow { background: var(--signal-slow); }
.tile--down .state .eyebrow { color: var(--signal-down); }

/*
 * On a tile the dot is a bulb: its own colour, lit. Green, amber and red are
 * the same three the manage table uses, so a status means one colour
 * everywhere.
 *
 * Each carries a dark ring and a glow of its own colour. The ring is what
 * keeps a green bulb legible on the teal and forest tiles, where the fill
 * alone would sink into the background; the glow is what makes it read as lit
 * rather than printed.
 *
 * "Unchecked" stays hollow and unlit in the tile's own ink — nothing is known,
 * so nothing is claimed. Hollow vs solid keeps the states apart for anyone who
 * cannot separate the hues.
 */
.tile .dot--ok,
.tile .dot--slow,
.tile .dot--down { box-shadow: 0 0 0 1px rgba(4, 7, 15, 0.5), 0 0 7px 1px var(--glow); }
.tile .dot--ok { background: var(--signal-ok); --glow: rgba(60, 197, 133, 0.85); }
.tile .dot--slow { background: var(--signal-slow); --glow: rgba(229, 172, 52, 0.85); }
.tile .dot--down { background: var(--signal-down); --glow: rgba(255, 107, 97, 0.9); }
.dot--none { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; opacity: 0.7; }

/* --- narrower screens ----------------------------------------------------- */

@media (max-width: 1200px) { .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  :root { --gutter: 16px; }
  .wall { grid-template-columns: 1fr; }
  .display { font-size: 30px; }
}

/* --- sign-in -------------------------------------------------------------- */

.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

.signin-card { max-width: 460px; display: flex; flex-direction: column; gap: 18px; }

/* Space Grotesk sets wider than the serif it replaced; at 40px the sign-in
   headline broke onto a second line inside the 460px card. */
.signin-card .display { font-size: 36px; }
@media (max-width: 620px) { .signin-card .display { font-size: 30px; } }

.signin-lede { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

.signin-note {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--signal-down);
  background: var(--sunk);
  font-size: 13.5px;
  line-height: 1.45;
}

.signin-btn { align-self: flex-start; height: 44px; padding: 0 20px; font-size: 14px; text-decoration: none; }

.signin-foot { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--faint); }

/* --- header extras -------------------------------------------------------- */

.lede { margin: 8px 0 0; max-width: 62ch; font-size: 14px; line-height: 1.5; color: var(--muted); }

.who { font-size: 13px; color: var(--muted); padding: 0 4px; }

.faint { color: var(--faint); }

a.chip { text-decoration: none; }

.inline-form { display: inline; }

.linkbtn {
  border: 0;
  background: none;
  padding: 0 4px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkbtn:hover { color: var(--ink); text-decoration-color: var(--signal); }
.linkbtn.danger { color: var(--danger); }

/* --- panels, tables, forms ------------------------------------------------ */

.panel { padding: 0 var(--gutter) var(--gutter); display: flex; flex-direction: column; gap: 20px; }

.msg { margin: 0; padding: 12px 14px; font-size: 13.5px; border-left: 3px solid var(--border); background: var(--sunk); }
.msg--bad { border-left-color: var(--signal-down); }
.msg--ok { border-left-color: var(--signal-ok); }

.addform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.input {
  height: 34px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  min-width: 220px;
}
.input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
/* Browser autofill paints its own light fill; keep filled fields on the ground. */
.input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--sunk) inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
}
select.input { min-width: 170px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left;
  padding: 0 12px 8px 0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1.5px solid var(--border);
}
.tbl td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl .mono { font-family: var(--mono); font-size: 12px; }

.pip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--border); margin-right: 7px; }
.pip--ok { background: var(--signal-ok); }

.rowacts { display: flex; gap: 14px; }

/* Hosting, on the manage table: the code badge then the readable line. */
.where { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.where .geo { background: var(--sunk); color: var(--muted); }

@media (max-width: 620px) {
  .tbl thead { display: none; }
  .tbl td { display: block; padding: 4px 0; border: 0; }
  .tbl tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
}

/* --- form fields ---------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; }

.field-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
}

.field-hint { font-size: 12px; line-height: 1.45; color: var(--faint); }

.input--block { width: 100%; min-width: 0; height: 42px; border-radius: var(--radius); font-size: 15px; }

/* A textarea needs its own height and padding: `height` on .input--block is a
   fixed 42px, which would crop the second row. */
.input--area {
  height: auto;
  min-height: 62px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

.field-opt {
  margin-left: 6px;
  font-family: var(--body);
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.8;
}

.signin-card .rowacts { align-items: center; }

.narrowform { max-width: 460px; display: flex; flex-direction: column; gap: 18px; }

/* A credential shown once. Loud on purpose — it should be obvious that this
   is the only time it will ever appear. */
.secret {
  padding: 16px 18px;
  border: 1.5px solid var(--signal);
  border-radius: var(--radius);
  background: var(--sunk);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.secret-head {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.secret-value {
  margin: 0;
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: 0.04em;
  user-select: all;
  word-break: break-all;
}
.secret-foot { margin: 0; max-width: 60ch; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.pip--warn { background: var(--signal-slow); }

/* --- the link form -------------------------------------------------------- */

.linkform {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
}

.linkform-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.linkform-side { display: flex; flex-direction: column; gap: 8px; }
.linkform-foot { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }

.withbtn { display: flex; gap: 8px; align-items: center; }
.withbtn .input { flex: 1; }
.withbtn .chip { flex-shrink: 0; cursor: pointer; }

.display-input {
  font-family: var(--body);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* Radio inputs styled as swatches: no JS needed for selection, and the
   keyboard gets arrow-key navigation for free. */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }

.swatch { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch-chip { display: block; width: 34px; height: 34px; border-radius: var(--radius); }
.swatch input:checked + .swatch-chip { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--ink); }
.swatch input:focus-visible + .swatch-chip { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--signal); }
.swatch-dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.swatch-dot.is-used { background: var(--border); }

.pickrow { display: flex; gap: 8px; flex-wrap: wrap; }
.pick { cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.pick .chip { border-color: var(--border); color: var(--muted); }
.pick input:checked + .chip { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.pick input:focus-visible + .chip { outline: 2px solid var(--signal); outline-offset: 2px; }

.toggle-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  cursor: pointer;
}
.toggle-row input { margin-top: 3px; flex-shrink: 0; accent-color: var(--signal); }
.toggle-row > span { display: flex; flex-direction: column; gap: 3px; }
.toggle-row strong { font-size: 13.5px; font-weight: 500; }

#f-preview { height: var(--tile-h); }

/* --- manage table --------------------------------------------------------- */

.sw {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
}

.st { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.st--bad { color: var(--danger); }
.st--warn { color: var(--slow-ink); }
/*
 * The modifier has to be qualified by .st too. A bare `.dot--down` loses to
 * `.st .dot` on specificity, which painted every status dot in this table the
 * same grey — a red "Down" next to a grey dot.
 */
.st .dot { width: 8px; height: 8px; background: var(--border); }
.st .dot--ok { background: var(--signal-ok); }
.st .dot--down { background: var(--signal-down); }
.st .dot--slow { background: var(--signal-slow); }

.tbl a { color: var(--muted); text-decoration: none; }
.tbl a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; }

.chip--danger { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--danger-ink); font-weight: 500; }
.chip--danger:hover { background: #d0342a; border-color: #d0342a; }

.confirm-tile { width: 340px; max-width: 100%; height: var(--tile-h); }

@media (max-width: 900px) {
  .linkform { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* --- groups strip --------------------------------------------------------- */

.grouprow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.groupchip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 8px 0 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
}
.groupchip:focus-within { border-color: var(--signal); }
.groupchip-form { display: flex; align-items: center; gap: 6px; }
.groupchip-name {
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  width: 9ch;
  min-width: 4ch;
  padding: 0;
}
.groupchip-name:focus { outline: none; }
/* The Rename button only appears once you're actually in the field, so four
   groups don't mean four permanent buttons. Pure CSS — no JS involved. */
.groupchip-save { display: none; }
.groupchip:focus-within .groupchip-save { display: inline; }
.groupchip-tools { display: flex; align-items: center; gap: 2px; }
.groupchip-tools .linkbtn { text-decoration: none; padding: 0 3px; }

.groupadd { display: flex; gap: 6px; align-items: center; }
.groupadd .input { min-width: 150px; height: 34px; }

.linkbtn.is-off { color: var(--border); cursor: default; padding: 0 3px; }

/* --- drag to reorder ------------------------------------------------------ */

.grip-cell { width: 28px; }
.grip { display: inline-flex; color: var(--border); cursor: grab; touch-action: none; padding: 4px 0; }
.grip:active { cursor: grabbing; }
tbody.reorder tr:hover .grip { color: var(--faint); }

tbody.is-reordering { user-select: none; }
tbody.reorder tr.is-dragging {
  background: var(--sunk);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--signal-soft);
}
tbody.reorder tr.is-dragging td { border-bottom-color: transparent; }

@media (max-width: 900px) {
  .grip { display: none; }
  .grip-cell { width: 0; }
}

.st-note { color: var(--faint); font-size: 11.5px; }
.st { flex-wrap: wrap; }

/* --- nothing to show ------------------------------------------------------ */

.wall--empty {
  display: block;
  padding: 64px var(--gutter) var(--gutter);
}

.empty { max-width: 46ch; }

.empty-head {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.empty-body { margin: 10px 0 20px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.empty-body strong { font-weight: 500; color: var(--ink); }
.empty .rowacts { gap: 8px; }

@media (max-width: 620px) {
  .wall--empty { padding-top: 36px; }
}
