/* Marketplace -- one product, many clients. The structure and behaviour come
   from the first build; the type is Toolshed's (Archivo, IBM Plex
   Mono); the colours come from the instance theme (theme.js on the server):
   a ground -- warm light Bone by default, or Graphite -- plus one accent.
   Soft, rounded and warm on purpose: this is the page everybody in the
   company uses, not a console for IT. */
:root {
  --bg: #F4F2ED; --surface: #EFECE5; --card: #FFFDF9; --rule: #E2DCD1; --rule-strong: #C9C2B4;
  --text: #3C392F; --head: #16150F; --meta: #6B665A; --accent: #B4531D;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --hdr: 76px; --ftr: 36px;
  --r-lg: 18px; --r-md: 12px; --r-sm: 8px;
  --shadow: 0 1px 2px rgba(40, 32, 20, .05), 0 2px 10px rgba(40, 32, 20, .05);
  --shadow-hi: 0 16px 36px rgba(40, 32, 20, .14), 0 2px 8px rgba(40, 32, 20, .06);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }

/* ---------- graph paper + header glow ----------
   The Toolshed homepage's 28px grid, kept faint, BEHIND everything
   (z-index -1: tables, panels and buttons keep their solid surfaces). The
   accent (Branding) glows only in the header: a horizontal band that
   gathers toward the centre, where the search bar sits. Colours come only
   from the theme tokens, so every accent and both grounds follow. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--rule) 70%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--rule) 70%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.35) 100%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.35) 100%); }
/* The search pill picks up the glow it sits in. */
.searchpill { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent),
                          0 6px 28px color-mix(in srgb, var(--accent) 22%, transparent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.eyebrow { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--meta); }

/* ---------- header ---------- */
header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hdr);
  background:
    radial-gradient(ellipse 48% 170% at 50% 50%, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 75%),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 3%, transparent) 0%, color-mix(in srgb, var(--accent) 11%, transparent) 22%,
                    color-mix(in srgb, var(--accent) 15%, transparent) 50%, color-mix(in srgb, var(--accent) 11%, transparent) 78%, color-mix(in srgb, var(--accent) 3%, transparent) 100%),
    color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule); }
/* Three columns: brand | search | actions -- the search is centred on the
   whole page, not on the space left between brand and actions. */
.hd { height: 100%; display: grid; grid-template-columns: 1fr minmax(0, 680px) 1fr; align-items: center; gap: 18px; padding: 0 28px; }
.hd > .brand { justify-self: start; } .hd > .searchpill { grid-column: 2; width: 100%; } .hd > .actions { grid-column: 3; justify-self: end; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; flex-shrink: 0; text-decoration: none; }
.brand img { max-height: 36px; max-width: 150px; width: auto; display: block; }
.brand .name { font-weight: 700; font-size: 18px; color: var(--head); letter-spacing: -.015em; white-space: nowrap; }
.brand .title { padding-left: 14px; border-left: 1px solid var(--rule); font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--meta); }
.searchpill { flex: 1; max-width: 680px; margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 18px;
  background: var(--bg); border: 1px solid var(--rule); border-radius: 999px; transition: .15s; }
.searchpill:focus-within { background: var(--card); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.searchpill input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; color: var(--head); }
.searchpill input::placeholder { color: var(--meta); }
.searchpill .kbd { font: 11px var(--mono); color: var(--meta); padding: 3px 8px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); }
.actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
/* Company search: the header bar asks Company Knowledge. Its icon is a
   small app-style mark in the company's own accent colour. */
.ksearch { height: 48px; padding-left: 7px; }
.ksearch .kicon { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px;
  background: var(--accent); color: #fff; }
.ksearch .kicon svg { width: 19px; height: 19px; }
.ksearch input { font-size: 14.5px; }
/* Filter: narrows the tiles below (the old header search). */
.fsearch { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--card); color: var(--meta); }
.fsearch:focus-within { border-color: var(--accent); }
.fsearch svg { width: 15px; height: 15px; flex-shrink: 0; }
.fsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13.5px; color: var(--head); }
.iconbtn { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text); border: 1px solid var(--rule); background: var(--card); transition: .15s; text-decoration: none; }
.iconbtn:hover { border-color: var(--rule-strong); color: var(--head); background: var(--bg); }
.iconbtn svg { width: 18px; height: 18px; }
.nbadge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font: 600 10px/18px var(--sans); text-align: center; }
.me { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 4px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); }
.me .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--head); color: var(--card); font: 600 11px var(--sans); }
.me b { font-weight: 500; font-size: 13px; color: var(--head); white-space: nowrap; }
/* Name over the signed-in email, so it is always clear which account this is. */
.me .who { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.me .who small { font: 11px var(--mono); color: var(--meta); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.me a { font-size: 12px; color: var(--meta); text-decoration: none; margin-left: 4px; }
.me a:hover { color: var(--head); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; padding-top: var(--hdr); }
/* The filter rail is plain paper: solid ground, no graph paper behind it,
   and a hairline where the grid starts. */
aside { background: var(--bg); border-right: 1px solid var(--rule); min-height: calc(100vh - var(--hdr) - var(--ftr));
  position: sticky; top: var(--hdr); align-self: start; max-height: calc(100vh - var(--hdr) - var(--ftr)); overflow-y: auto;
  padding: 22px 18px 28px 24px; scrollbar-width: thin; }
/* Rail controls: the arrow collapses / expands, the pin keeps it open in the
   layout. Unpinned, it opens over the tiles and closes on a click outside. */
.railhead { display: flex; justify-content: flex-end; gap: 4px; margin: -12px -8px 6px 0; }
.railbtn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--meta); }
.railbtn:hover { background: var(--surface); color: var(--head); }
.railbtn svg { width: 16px; height: 16px; transition: transform .15s; }
.railbtn[aria-pressed="true"] { color: var(--accent); }
.shell { transition: grid-template-columns .15s; }
.shell.rail-mini { grid-template-columns: 44px 1fr; }
/* The tiles stay in the wide column even while the open strip floats (position: fixed) over them. */
.shell.rail-mini > main { grid-column: 2; }
.shell.rail-mini aside { padding: 18px 6px; overflow: visible; }
.shell.rail-mini.rail-shut aside > .fsec, .shell.rail-mini.rail-shut #railPin { display: none; }
.shell.rail-mini.rail-shut #railToggle svg { transform: rotate(180deg); }
.shell.rail-mini.rail-shut .railhead { margin: 0; justify-content: center; }
.shell.rail-mini:not(.rail-shut) aside { position: fixed; left: 0; top: var(--hdr); width: 232px; z-index: 45; padding: 22px 18px 28px 24px;
  overflow-y: auto; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.fsec { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }
.fsec:last-child { border: 0; }
.fsec h4 { margin: 0 0 10px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 5px 8px; margin: 0 -8px; border-radius: var(--r-sm);
  font-size: 13.5px; cursor: pointer; user-select: none; color: var(--text); transition: .12s; }
.opt:hover { background: var(--surface); color: var(--head); }
.opt .box { width: 16px; height: 16px; border: 1.5px solid var(--rule-strong); border-radius: 5px; flex-shrink: 0; display: grid; place-items: center; transition: .12s; background: var(--card); }
.opt.on { color: var(--head); font-weight: 500; }
.opt.on .box { background: var(--head); border-color: var(--head); }
.opt.on .box::after { content: ""; width: 7px; height: 4px; border: 2px solid var(--card); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.opt.shelf { font-weight: 500; }
.opt.shelf.on .box { background: var(--accent); border-color: var(--accent); }
.opt .sw { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.opt .n { margin-left: auto; font: 11px var(--mono); color: var(--meta); }

main { min-width: 0; padding: 0 28px calc(64px + var(--ftr)); }
.bar { position: sticky; top: var(--hdr); z-index: 30; padding: 22px 0 14px;
  /* See-through, so the glow runs behind it; fades out at the bottom edge
     instead of ending in a hard line. */
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 72%, transparent) 70%, transparent); }
.bar .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--head); }
.bar .count { font: 12px var(--mono); color: var(--meta); }
.bar .sp { flex: 1; }
.sel { height: 36px; padding: 0 14px; background: var(--card); border: 1px solid var(--rule); border-radius: 999px; font-size: 13px; color: var(--head); }
.fbtn { display: none; height: 36px; padding: 0 14px; background: var(--card); border: 1px solid var(--rule); border-radius: 999px; font-size: 13px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pills:empty { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); font-size: 12.5px; color: var(--head); }
.pill .x { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--meta); cursor: pointer; font-size: 10px; }
.pill .x:hover { background: var(--surface); color: var(--head); }
.clearall { font-size: 12.5px; color: var(--meta); text-decoration: underline; text-underline-offset: 3px; }
.clearall:hover { color: var(--accent); }

.banner { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 16px; padding: 13px 16px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--head); font-size: 14px; }
.banner .x { margin-left: auto; color: var(--meta); }

/* ---------- tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; padding-top: 6px; }
.card { position: relative; aspect-ratio: 1 / 1; display: flex; flex-direction: column; overflow: hidden; cursor: pointer;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow);
  transition: transform .18s cubic-bezier(.2, .7, .3, 1), box-shadow .18s, border-color .18s; }
/* Hover: a defined glow in the tile's own colour, all the way round. */
.card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--c) 75%, var(--rule));
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent),
              0 0 22px 3px color-mix(in srgb, var(--c) 38%, transparent),
              0 16px 34px color-mix(in srgb, var(--c) 24%, transparent); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The "Request a tool" square: always first, dashed, no fill -- present,
   never loud. */
.card.ask { background: transparent; box-shadow: none; border: 1.5px dashed var(--rule-strong); opacity: .72;
  align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 16px; color: var(--meta); }
.card.ask:hover { transform: none; opacity: 1; border-color: var(--accent); color: var(--head);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.card.ask .plus { font: 300 34px/1 var(--sans); color: var(--meta); }
.card.ask:hover .plus { color: var(--accent); }
.card.ask b { font-size: 14px; font-weight: 600; color: var(--head); }
.card.ask .s { font-size: 12px; }
.sheet:has(.askform) { width: min(640px, 100%); }
.askform { padding: 26px 28px 22px; }
.askhead { display: flex; align-items: center; justify-content: space-between; }
.askhead h2 { margin: 0; font-size: 22px; color: var(--head); }
.askhead .x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--meta); border: 1px solid var(--rule); }
.askhead .x:hover { color: var(--head); border-color: var(--rule-strong); }
.askform .hint { color: var(--meta); font-size: 13.5px; }
.askform textarea { width: 100%; min-height: 150px; resize: vertical; padding: 12px 14px; border: 1px solid var(--rule-strong);
  border-radius: var(--r-md); background: var(--bg); color: var(--head); font: 14px/1.5 var(--sans); }
.askform textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.askshare { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 13.5px; color: var(--head); cursor: pointer; }
.askshare .s, .askfoot .s { color: var(--meta); font-size: 12px; }
.askfoot { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.askfoot .sp { flex: 1; }
.askfoot .btn { height: 40px; padding: 0 18px; }
.art { position: relative; height: 58%; overflow: hidden; background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.art svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .35s cubic-bezier(.2, .7, .3, 1); }
.card:hover .art svg { transform: scale(1.07); }
.body { flex: 1; padding: 11px 14px 12px; display: flex; flex-direction: column; justify-content: center; }
.body h3 { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.28; color: var(--head); letter-spacing: -.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.body .fn { margin-top: 4px; font-size: 11.5px; color: var(--meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.featstar { width: 12px; height: 12px; color: var(--accent); vertical-align: -1px; margin-left: 3px; }
.heart { position: absolute; right: 9px; top: 9px; z-index: 4; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: var(--meta); background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--rule); transition: .15s; }
.heart svg { width: 15px; height: 15px; }
.heart:hover { color: var(--head); transform: scale(1.08); }
.heart.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.heart.on svg { fill: currentColor; }
.lockmark { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 26px; height: 26px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--text); background: var(--card); border: 1px solid var(--rule); }
.lockmark svg { width: 14px; height: 14px; }
.lockmark.ok { color: var(--meta); border-style: dashed; }
.badge { position: absolute; left: 9px; top: 9px; z-index: 4; height: 22px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  font: 600 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; background: var(--card); color: var(--head); border: 1px solid var(--rule); }
.badge svg { width: 11px; height: 11px; }
.badge.maint { background: #C8791F; color: #fff; border-color: #C8791F; }
.badge.dep { background: var(--meta); color: #fff; border-color: var(--meta); }
.badge.sample { background: var(--surface); color: var(--meta); border-style: dashed; border-color: var(--rule-strong); }
.card.dim .art svg { opacity: .35; filter: grayscale(.7); }
.card.dim .body { opacity: .75; }

.msg { padding: 70px 10px; text-align: center; color: var(--meta); font-size: 14px; }
.msg b { display: block; color: var(--head); font-size: 16px; margin-bottom: 4px; }

/* ---------- detail sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(28, 24, 18, .45); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.modal { position: fixed; inset: 0; z-index: 61; display: grid; place-items: center; padding: 28px; pointer-events: none; }
.modal.on { pointer-events: auto; }
.sheet { width: min(960px, 100%); max-height: min(88vh, 880px); overflow: hidden auto; background: var(--card); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(28, 24, 18, .3); transform: translateY(14px) scale(.985); opacity: 0; transition: .24s cubic-bezier(.2, .7, .3, 1); }
.modal.on .sheet { transform: none; opacity: 1; }
.mhero { position: relative; height: 164px; overflow: hidden; display: flex; align-items: flex-end; padding: 22px 32px;
  background: color-mix(in srgb, var(--c) 14%, var(--card)); }
.mhero > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mhero > svg * { vector-effect: non-scaling-stroke; stroke-width: 1.4; }
.mh-in { position: relative; z-index: 2; }
.mh-in h2 { margin: 6px 0 4px; font-size: 30px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; color: var(--head); }
.mh-in .meta { font-size: 13px; color: var(--text); }
.mclose { position: absolute; right: 18px; top: 18px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--rule); color: var(--head); font-size: 14px; box-shadow: var(--shadow); }
.mclose:hover { background: var(--bg); }
.notice { display: flex; gap: 10px; padding: 13px 32px; font-size: 14px; line-height: 1.5; color: #7A4410; background: #FBF1E2; border-bottom: 1px solid #EFD9B8; }
.notice.dep { color: var(--text); background: var(--surface); border-color: var(--rule); }
.mbody { display: grid; grid-template-columns: 1fr 286px; gap: 32px; padding: 26px 32px 34px; }
.mb { min-width: 0; }
.mb h4 { margin: 26px 0 10px; }
.mb h4:first-child { margin-top: 0; }
.mb p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text); max-width: 38em; }
.guide { font-size: 14.5px; line-height: 1.65; color: var(--text); }
.guide h5 { margin: 16px 0 6px; font-size: 15px; font-weight: 600; color: var(--head); }
.guide p { margin: 0 0 10px; }
.guide ul, .guide ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 4px; }
.guide code { font: 13px var(--mono); background: var(--surface); padding: 1px 5px; border-radius: 5px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #111; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vext { display: inline-block; margin-top: 8px; font-size: 12.5px; color: var(--meta); }
.whatsnew { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.whatsnew li { font-size: 14px; color: var(--text); }
.whatsnew b { font: 12px var(--mono); color: var(--meta); margin-right: 10px; font-weight: 400; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag { height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--text); transition: .15s; }
.tag:hover { background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--accent); }
.side { border-left: 1px solid var(--rule); padding-left: 28px; display: flex; flex-direction: column; gap: 10px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--rule-strong); font-weight: 600; font-size: 14px; color: var(--head); background: var(--card); text-decoration: none; transition: .15s; }
.btn:hover { border-color: var(--head); }
.btn svg { width: 16px; height: 16px; }
.btn.go { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.go:hover { filter: brightness(1.07); }
.btn.off, .btn:disabled { cursor: default; color: var(--meta); border-color: var(--rule); background: var(--surface); filter: none; }
.kv { margin: 12px 0 0; display: grid; gap: 12px; }
.kv div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: 13.5px; }
.kv dt { color: var(--meta); }
.kv dd { margin: 0; color: var(--head); word-break: break-word; }
.kv dd .s { display: block; font-size: 12px; color: var(--meta); margin-top: 2px; }
.note { margin-top: 6px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); font-size: 13px; line-height: 1.5; color: var(--text); }

/* ---------- notifications ---------- */
.mailbox { position: fixed; top: calc(var(--hdr) + 8px); right: 24px; z-index: 70; width: min(380px, calc(100vw - 32px)); max-height: min(480px, 70vh);
  display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow-hi); }
.mbx-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.mbx-head b { font-weight: 600; color: var(--head); }
.mbx-head .sp { flex: 1; }
.mbx-all { font-size: 12.5px; color: var(--accent); }
#mbxList { overflow-y: auto; }
.mbx-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.mbx-item:last-child { border-bottom: 0; }
.mbx-item.unread { background: color-mix(in srgb, var(--accent) 6%, var(--card)); cursor: pointer; }
.mbx-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.mbx-item.unread .dot { background: var(--accent); }
.mbx-item b { display: block; color: var(--head); font-weight: 600; font-size: 13.5px; }
.mbx-item p { margin: 2px 0; font-size: 13px; }
.mbx-item .when { font-size: 11.5px; color: var(--meta); }
.mbx-empty { padding: 34px 20px; text-align: center; font-size: 13px; color: var(--meta); }

/* Frozen to the bottom of the window, always visible: who looks after it
   and which release it runs. */
footer { position: fixed; inset: auto 0 0 0; z-index: 40; height: var(--ftr); display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: var(--card); border-top: 1px solid var(--rule);
  font: 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--meta); }
footer .sp { flex: 1; }
footer #footRev { text-transform: none; letter-spacing: .02em; }

/* ---------- small screens ---------- */
@media (max-width: 900px) { .mbody { grid-template-columns: 1fr; } .side { border-left: 0; padding-left: 0; } }
@media (max-width: 820px) {
  :root { --hdr: 118px; }
  .hd { display: flex; flex-wrap: wrap; align-content: center; gap: 10px 12px; padding: 12px 16px; }
  .brand .title, .searchpill .kbd, .me .who, .me a { display: none; }
  .actions { margin-left: auto; }
  .searchpill { order: 3; flex-basis: 100%; max-width: none; height: 42px; }
  .shell { grid-template-columns: 1fr; }
  aside { display: none; position: static; max-height: none; min-height: 0; border-right: 0; padding: 8px 16px 0; }
  .shell.showf aside { display: block; }
  .railhead { display: none; }
  .shell.rail-mini { grid-template-columns: 1fr; }
  .shell.rail-mini > main { grid-column: auto; }
  .shell.rail-mini aside { position: static; width: auto; box-shadow: none; }
  .shell.rail-mini.rail-shut aside > .fsec { display: block; }
  .fbtn { display: inline-flex; align-items: center; }
  main { padding: 0 14px calc(48px + var(--ftr)); }
  footer { padding: 0 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .modal { padding: 10px; }
  .mhero, .mbody, .notice { padding-left: 20px; padding-right: 20px; }
}

/* "by <provider>" on tiles of tools a provider hosts and maintains. */
.card .prov { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.card .prov svg { width: 12px; height: 12px; }

/* ---------- AI guidelines (js/guidelines.js) ----------
   The shield in the header and the one-page acknowledgment window. */
.gdot { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--card); }
.sheet:has(.gdlg) { width: min(780px, 100%); }
.gdlg { display: flex; flex-direction: column; }
.ghead { display: flex; align-items: center; gap: 14px; padding: 20px 26px; border-bottom: 1px solid var(--rule); }
.ghead img { max-height: 40px; max-width: 120px; width: auto; display: block; }
.gmark { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.ghead .gt { flex: 1; min-width: 0; }
.ghead h2 { margin: 0; font-size: 20px; color: var(--head); letter-spacing: -.01em; }
.ghead .x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--meta); border: 1px solid var(--rule); flex-shrink: 0; }
.ghead .x:hover { color: var(--head); border-color: var(--rule-strong); }
.gbody { padding: 16px 26px 8px; }
.gchanged { padding: 12px 16px; margin-bottom: 14px; border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--rule)); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.gchanged b { color: var(--head); font-size: 13.5px; }
.gchanged p { margin: 4px 0 0; font-size: 13.5px; white-space: pre-line; }
.gintro { margin: 0 0 6px; font-size: 14px; }
.grules { margin: 0; padding: 0; list-style: none; counter-reset: g; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); column-gap: 26px; }
.grules li { counter-increment: g; display: grid; align-content: start; grid-template-columns: 24px 1fr; column-gap: 10px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.45; }
.grules li::before { content: counter(g); grid-row: span 2; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.grules b { color: var(--head); font-size: 13.5px; }
.gfoot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule); }
.gfoot p { margin: 0 0 4px; font-size: 11.5px; line-height: 1.5; color: var(--meta); }
.glink { color: var(--accent); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.gvers .glink { font-size: 11.5px; margin-right: 4px; }
.gact { padding: 14px 26px 18px; border-top: 1px solid var(--rule); background: var(--surface); position: sticky; bottom: 0; }
.gstate { margin: 0 0 12px; font-size: 13.5px; color: var(--head); }
.gstate.ok { margin: 0; color: var(--meta); }
.grow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.grow .sp { flex: 1; }
.grow .btn { height: 44px; padding: 0 18px; }
@media (max-width: 640px) { .ghead, .gbody, .gact { padding-left: 16px; padding-right: 16px; } .grules { grid-template-columns: 1fr; } }
