/* The page-wide rules every design page carries in its <helmet> style:
   square corners in the void-os theme, the link colours and no body margin. */
[data-theme="void-os"] * { border-radius: 0; }
a { color: #3D2BFF; }
a:hover { color: #2318C8; }
body { margin: 0; }

/* "hidden" always hides, even an element whose own style says display:flex. */
[hidden] { display: none !important; }

/* Chips hold a real checkbox (for the form) that is not seen: the chip is. */
.grid-chip { position: relative; cursor: pointer; }
.grid-chip .chip-box { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

/* The design makes tabs and tiles <button>s; here they are links (so Back
   and bookmarks work), which must not pick up the link colour. */
a.tab, a.tile { color: #0A0A0A; text-decoration: none; }
a.tab.is-on, a.tile.is-on { color: #FFFFFF; }
a.tab:hover, a.tile:hover { color: #0A0A0A; }
a.tab.is-on:hover, a.tile.is-on:hover { color: #FFFFFF; }

/* The pick chips of Library - Services / Triggers (their inline button styles). */
.pick { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 11px; border: 2px solid #0A0A0A; font-family: var(--font-mono); font-weight: 700; font-size: 0.66rem; cursor: pointer; background: #FFFFFF; color: #0A0A0A; position: relative; }
.pick.is-on { background: #0A0A0A; color: #FFFFFF; box-shadow: inset 0 -4px 0 #3D2BFF; }
.pick .chip-box { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.row-hover:hover { box-shadow: inset 5px 0 0 #3D2BFF; }

/* Businesses: a row opens its strip on hover or keyboard focus (the design opens it on hover). */
.biz-strip { display: none !important; }
.biz-row:hover .biz-strip, .biz-row:focus-within .biz-strip { display: grid !important; }
.biz-row:hover { box-shadow: inset 4px 0 0 #3D2BFF; }

/* Phone: on the sign-in page the form comes first and the story under it
   (mobile-r5; above 900 px the two sit side by side as designed). */
@media (max-width: 900px) {
  [data-theme="void-os"]:has(> aside + main) > main { order: -1; flex-basis: 100% !important; }
  [data-theme="void-os"]:has(> aside + main) > aside { flex-basis: 100% !important; }
}

/* R6-057: the one line a page shows when everything it could do is off for this person. */
.gate-line { flex: 1 1 100%; width: 100%; box-sizing: border-box; margin: 8px 0 0; padding: 10px 14px; border: 2px solid #0A0A0A; box-shadow: inset 5px 0 0 #3D2BFF; background: #FFFFFF; color: #0A0A0A; font-size: 0.92rem; line-height: 1.45; }
[data-gate-off] { cursor: not-allowed; }

/* R6-058: the cue under a table that scrolls sideways, and the card pattern for one that need not. */
.scroll-cue { margin: 6px 0 2px; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; color: #3D2BFF; }
.scroll-cue[hidden] { display: none !important; }
[data-more="1"] { box-shadow: inset -14px 0 12px -12px rgba(10, 10, 10, 0.45); }

/* A row that keeps its columns on a desktop becomes a card on a phone: put .stack on the
   row's wrapper and .stack-row on each row, with the row's action last. */
@media (max-width: 600px) {
  .shell-main .stack { min-width: 0 !important; overflow-x: visible !important; }
  .shell-main .stack .stack-head { display: none !important; }
  .shell-main .stack .stack-row { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 6px !important; grid-template-columns: none !important; }
  .shell-main .stack .stack-row > * { text-align: left !important; justify-self: stretch !important; border-left: none !important; padding-left: 0 !important; }
  .shell-main .stack .stack-row :is(button, .btn-save, a.btn-save) { width: 100%; }
}
