/* Library, requests and admin pages (site.html), on top of app.css and account.css */
.site-main { max-width: 1100px; margin: 26px auto 70px; padding: 0 16px; display: flex; flex-direction: column; gap: 18px; }
.site .loading { color: var(--muted); }
.site h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: .2px; }
.site .lead { color: #c9ced4; font-size: 15px; max-width: 720px; margin: 0; }
.site .note { color: var(--muted); font-size: 13px; }
.site .narrow { max-width: 680px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.site-main a { color: var(--accent); }
.site-main a.btn, .site-main a.icard, .site-main a.req-main, .site-main .seg a { color: var(--text); }
.site-main a.btn.primary, .site-main .seg a.active { color: #08131f; }
.crumbs { margin: 0; font-size: 13.5px; }
.crumbs a { text-decoration: none; }

/* inputs beyond account.css */
.site input[type=url], .site input[type=search], .site input[type=number], .site textarea, .site select {
  background: #14161a; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; color: var(--text);
  font: 14px "Segoe UI", system-ui, sans-serif; min-width: 0;
}
.site textarea { resize: vertical; line-height: 1.45; }
.site .field input, .site .field select { font-family: "Segoe UI", system-ui, sans-serif; }
.site .field textarea.mono, .site .mono { font-family: var(--mono); font-size: 13px; }
.site fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.site legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.site fieldset small, .site .field small { color: var(--muted); font-size: 12px; }
.site .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* page heading with actions */
.page-head { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .search { flex: 1 1 260px; width: auto; margin: 0; }
.none { color: var(--muted); padding: 30px 0; text-align: center; }

/* status labels */
.st { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 2px 7px;
  border-radius: 4px; white-space: nowrap; vertical-align: 1px; background: #2b3138; color: var(--muted); }
.st-available { background: rgba(63, 207, 142, .16); color: var(--ok); }
.st-in_progress { background: rgba(79, 156, 245, .18); color: #8fc0ff; }
.st-planned { background: rgba(240, 179, 74, .16); color: var(--warn); }
.st-declined { background: rgba(240, 104, 92, .15); color: #ff9a90; }
.st-duplicate { background: transparent; border: 1px dashed var(--line); }
.st-hidden { background: transparent; border: 1px dashed #6b7480; color: #b4bcc6; }
.pill.mine { color: var(--accent); border-color: var(--accent); margin: 0; }
.cat { color: var(--muted); font-size: 13px; }
.row.tight { gap: 8px; margin: 6px 0 12px; }

/* library shelves and cards */
.shelves { display: flex; flex-direction: column; gap: 26px; }
.shelf h2 { font-size: 17px; margin: 0 0 2px; display: flex; align-items: center; gap: 10px; }
.shelf h2 .n { font-size: 12px; color: var(--muted); font-weight: 400; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; }
.shelf .note { margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.icard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.icard:hover, .icard:focus-visible { border-color: #5c6875; transform: translateY(-1px); }
.icard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.thumb { aspect-ratio: 16 / 10; background: #121417; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .glyph { width: 74%; height: auto; }
.icard-body { padding: 10px 13px 13px; display: flex; flex-direction: column; gap: 2px; }
.icard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icard-top small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icard b { font-size: 17px; letter-spacing: .2px; }
.icard .cat { font-size: 12.5px; }
.icard p { margin: 6px 0 0; font-size: 13px; color: #c3c9d0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* drawing of an instrument */
.glyph .g-body { fill: #2a2f35; stroke: #47505a; stroke-width: 1.5; }
.glyph .g-screen { fill: #0e1a16; stroke: #2f3a36; }
.glyph .g-trace { fill: none; stroke: var(--ok); stroke-width: 2; }
.glyph .g-digits { fill: var(--ok); font: 600 15px var(--mono); }
.glyph .g-knob { fill: #3d444c; stroke: #59636e; }
.glyph .g-key { fill: #3a4148; }
.glyph .g-red { fill: #c0453b; }
.glyph .g-black { fill: #15181b; stroke: #59636e; }

/* one instrument */
.entry { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.entry-info .vendor { color: var(--muted); font-size: 13.5px; }
.entry-info h1 { font-size: 30px; margin: 0; }
.entry-info .lead { margin: 0 0 16px; }
.entry-info .status { margin: 4px 0 0; }
.gallery { display: flex; flex-direction: column; gap: 8px; }
.gallery .shot { padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #121417; cursor: zoom-in; display: block; }
.gallery .shot img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; }
.gallery.blank { border: 1px solid var(--line); border-radius: 10px; background: #121417; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.gallery.blank .glyph { width: 62%; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs button { padding: 0; width: 72px; height: 54px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; background: #121417; }
.thumbs button.on { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .82); }
dialog.lightbox img { display: block; max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 6px; }
dialog.lightbox .lb-x { position: fixed; top: 14px; right: 18px; font-size: 22px; line-height: 1; padding: 4px 11px; }
.block { border-top: 1px solid var(--line); padding-top: 16px; }
.block .gallery { max-width: 640px; }
.block h2 { font-size: 16px; margin: 0 0 10px; }
.rich { max-width: 760px; }
.rich p { margin: 0 0 10px; }
.rich ul { margin: 0 0 10px; padding-left: 22px; }
.rich li { margin: 2px 0; }
.rich h3 { font-size: 14.5px; margin: 14px 0 6px; }
.rich code { background: #101214; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
table.specs { border-collapse: collapse; font-size: 13.5px; min-width: min(520px, 100%); }
table.specs th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 18px 6px 0; vertical-align: top; white-space: nowrap; }
table.specs td { padding: 6px 0; }
table.specs tr + tr { border-top: 1px solid var(--line); }
.links-list { margin: 0; padding-left: 20px; }
.links-list li { margin: 4px 0; }
.links-list small { color: var(--muted); margin-left: 8px; }

/* requests */
.reqs { display: flex; flex-direction: column; gap: 8px; }
.req { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 10px 10px; }
.req.mine { border-left: 3px solid var(--accent); }
.req-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); text-decoration: none; }
.req-main:hover b { color: var(--accent); }
.req-main b { font-size: 15.5px; }
.req-main small { color: var(--muted); font-size: 12.5px; }
.req-side { display: flex; align-items: center; gap: 8px; }
button.vote { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 50px; padding: 4px 8px; line-height: 1.1; }
button.vote .tri { font-size: 11px; color: var(--muted); }
button.vote b { font-size: 15px; }
button.vote.on { border-color: var(--accent); background: rgba(79, 156, 245, .14); }
button.vote.on .tri { color: var(--accent); }
button.vote:disabled { cursor: default; opacity: .75; }
.dupes ul button.vote { flex-direction: row; gap: 5px; min-width: 0; padding: 1px 8px; vertical-align: middle; }
.req-head { display: flex; gap: 16px; align-items: flex-start; }
.req-head button.vote { min-width: 60px; padding: 8px; }
.req-head h1 { margin: 0; }
.req-head .vendor { color: var(--muted); font-size: 13.5px; }
.flash { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: var(--surface); }
.flash.ok { border-color: var(--ok); background: rgba(63, 207, 142, .07); }
.flash.warn { border-color: var(--warn); background: rgba(240, 179, 74, .07); }
.site-main a.stat.warn { border-color: var(--warn); }
.site-main a.stat.warn b { color: var(--warn); }
blockquote.answer { margin: 0; border-left: 3px solid var(--accent); padding: 6px 0 2px 14px; }
ol.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
ol.history li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
ol.history time { color: var(--muted); min-width: 92px; }
.dupes-box { border: 1px solid var(--warn); border-radius: 8px; padding: 10px 14px; background: rgba(240, 179, 74, .06); font-size: 13.5px; }
.dupes-box ul { margin: 6px 0; padding-left: 20px; }
.dupes-box li { margin: 4px 0; }
.dupes-box small { color: var(--muted); }

/* photo picker */
.photos { display: flex; gap: 10px; flex-wrap: wrap; padding: 2px; border-radius: 8px; }
.photos.drop { outline: 2px dashed var(--accent); outline-offset: 3px; }
.ph { position: relative; width: 112px; height: 84px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: #121417; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph button { position: absolute; top: 4px; padding: 0; width: 24px; height: 24px; line-height: 1; border-radius: 50%; background: rgba(15, 17, 20, .82); font-size: 16px; }
.ph .ph-x { right: 4px; }
.ph .ph-l { left: 4px; font-size: 18px; }
.ph .ph-cover { position: absolute; left: 4px; bottom: 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; background: rgba(15, 17, 20, .82); padding: 1px 6px; border-radius: 4px; }
button.ph.add { position: static; width: 112px; height: 84px; border: 1px dashed #56606b; border-radius: 7px; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12.5px; }
button.ph.add span { font-size: 22px; line-height: 1; }
button.ph.add:hover { color: var(--text); border-color: var(--accent); }
.picker .status { margin: 6px 0 0; }

/* admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; }
.seg a { display: inline-block; padding: 5px 14px; text-decoration: none; }
.seg a.active { background: var(--accent); font-weight: 600; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; min-width: 120px; }
.site-main a.stat { color: var(--text); text-decoration: none; }
.site-main a.stat:hover { border-color: #5c6875; }
.site .card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 18px 0 8px; }
.site .card .vendor { color: var(--muted); font-size: 13.5px; }
.site .card h1 { margin: 0; }
.stat b { display: block; font-size: 20px; }
.stat small { color: var(--muted); font-size: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #1a1d21; }
table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #22262b; }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl a { text-decoration: none; }
table.tbl small { color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
.cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols > div { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cols.one { grid-template-columns: minmax(0, 1fr); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 13.5px; margin: 0 0 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.editor .help { color: var(--muted); font-size: 12px; }
.check.big { font-size: 14px; }

/* toast */
.site #toast { position: fixed; bottom: 22px; }
.site #toast.ok { background: #16301f; border-color: var(--ok); color: #c9f5dc; }

@media (max-width: 860px) {
  .entry, .cols { grid-template-columns: 1fr; }
  .site .tagline { display: none; }
}
@media (max-width: 560px) {
  .site .two { grid-template-columns: 1fr; }
  .site h1 { font-size: 21px; }
  .entry-info h1 { font-size: 25px; }
  .req { flex-wrap: wrap; }
  .req-side { width: 100%; justify-content: flex-end; }
  .site-main { margin-top: 18px; }
}

/* Admin > Site: the legal texts' editors */
.site .row .grow { flex: 1; }
.site .stack textarea { width: 100%; font: inherit; line-height: 1.45; }

/* chat with Claude, for Premium members (assistant.js) */
.chat-page .site-main { max-width: 1320px; margin: 12px auto 8px; gap: 0; }
.chat-page .site-foot { display: none; }
.chat-app { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; height: calc(100vh - 92px); min-height: 460px; }
.chat-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.chat-new { width: 100%; }
.chat-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.chat-list .note { margin: 8px 4px; }
.chat-link { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 7px 30px 7px 10px; border-radius: 8px;
  text-decoration: none; border: 1px solid transparent; }
.site-main a.chat-link { color: var(--text); }
.chat-link:hover { background: var(--surface); }
.chat-link.here { background: var(--surface); border-color: var(--line); }
.chat-link-title { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-link small { color: var(--muted); font-size: 11.5px; }
.chat-running { position: absolute; right: 12px; bottom: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: chat-pulse 1.2s infinite; }
.chat-del { position: absolute; right: 4px; top: 5px; padding: 0 7px; font-size: 16px; line-height: 22px; border: 0; background: transparent;
  color: var(--muted); opacity: 0; }
.chat-link:hover .chat-del, .chat-del:focus-visible { opacity: 1; }
.chat-del:hover { color: var(--bad); }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; }
.chat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); }
.site .chat-head h1 { font-size: 15.5px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-usage { color: var(--muted); font-size: 12px; white-space: nowrap; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 20px 10px; display: flex; flex-direction: column; gap: 12px; }
.chat-turn { display: contents; }
.msg { display: flex; flex-direction: column; max-width: 860px; min-width: 0; }
.msg-user { align-self: flex-end; align-items: flex-end; max-width: min(78%, 700px); }
.msg-user .bubble { background: color-mix(in srgb, var(--accent) 15%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line)); border-radius: 14px 14px 4px 14px; padding: 8px 13px;
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.msg-claude .who { font-size: 12px; color: var(--muted); margin: 0 0 3px; font-weight: 600; }
.msg-claude .bubble { line-height: 1.55; overflow-wrap: anywhere; }
.md p { margin: 0 0 8px; }
.md > :last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 22px; }
.md li { margin: 2px 0; }
.md h3, .md h4, .md h5, .md h6 { margin: 12px 0 6px; font-size: 14.5px; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--code-bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 0 4px; }
.md blockquote { margin: 0 0 8px; padding: 2px 12px; border-left: 3px solid var(--line-2); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.md-table { overflow-x: auto; margin: 0 0 8px; }
.md table { border-collapse: collapse; font-size: 13px; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); font-weight: 600; }
.code { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 0 0 8px; background: var(--code-bg); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 3px 5px 3px 10px; border-bottom: 1px solid var(--line); }
.code-head small { color: var(--muted); font-size: 11.5px; }
.code-copy { font-size: 12px; padding: 2px 10px; }
.code pre { margin: 0; padding: 10px 12px; overflow: auto; font: 12.5px/1.5 var(--mono); max-height: 420px; }
.md .code pre code { background: none; border: 0; padding: 0; font-size: inherit; }
details.tool { max-width: 860px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 13px; }
details.tool summary { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; list-style: none; min-width: 0; }
details.tool summary::-webkit-details-marker { display: none; }
details.tool[open] summary { border-bottom: 1px solid var(--line); }
.tool-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.tool-done .tool-dot { background: var(--ok); }
.tool-error .tool-dot { background: var(--bad); }
.tool-running .tool-dot, .tool-writing .tool-dot { background: var(--accent); animation: chat-pulse 1.2s infinite; }
.tool-waiting .tool-dot { background: var(--warn); }
.tool-title { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-sum { color: var(--muted); margin-left: auto; padding-left: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 55%; flex: none; }
.tool-error .tool-sum { color: var(--danger-text); }
.tool-part { padding: 2px 10px 8px; }
.tool-part small { color: var(--muted); display: block; margin: 6px 0 3px; }
.tool-part pre { margin: 0; max-height: 240px; overflow: auto; background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 9px; font: 12px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-ask { border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); border-radius: 10px;
  padding: 10px 14px; max-width: 860px; }
.chat-ask p { margin: 4px 0 10px; line-height: 1.5; }
.chat-ask-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chat-note-line { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.chat-note-line.err { color: var(--danger-text); }
.chat-note-line.warn { color: var(--warn); }
.chat-typing { display: flex; gap: 5px; padding: 6px 2px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: chat-pulse 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chat-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.chat-compose { border-top: 1px solid var(--line); padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 8px; }
.site .chat-input { width: 100%; resize: none; min-height: 60px; max-height: 240px; box-sizing: border-box; }
.chat-actions { display: flex; align-items: center; gap: 8px; }
.chat-hint { color: var(--faint); font-size: 12px; margin-right: auto; }
.chat-long { margin: 0; font-size: 13px; color: var(--warn); }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.chat-fine { margin: 0; padding: 0 14px 9px; font-size: 11.5px; color: var(--faint); }
.site-main .chat-fine a { color: var(--muted); }
.chat-welcome { margin: auto; max-width: 660px; text-align: center; padding: 16px 8px; }
.site .chat-welcome h2 { margin: 0 0 8px; font-size: 20px; }
.chat-welcome p { color: var(--muted); line-height: 1.55; margin: 0; }
.chat-ideas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.chat-ideas button { text-align: left; white-space: normal; line-height: 1.4; padding: 10px 12px; font-size: 13px; }
.member-actions .row { flex-wrap: wrap; }
.site input.claude-key { flex: 1 1 260px; min-width: 0; background: var(--field); border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; color: var(--text); font-family: var(--mono); }
.site b.warn, .site p.warn { color: var(--warn); }
.site h3.sub { font-size: 14px; margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }

/* fixture requests (Admin > Bench > a fixture): the board seen from the top */
.board-svg { display: block; width: 100%; max-width: 700px; height: auto; background: var(--code-bg); border: 1px solid var(--line);
  border-radius: 8px; }
.b-board { fill: #1d5236; stroke: #2f8a57; stroke-width: 1.5; }
.b-tp.bottom { fill: #d9b44a; }
.b-tp.top { fill: none; stroke: #d9b44a; stroke-width: 1.6; }
.b-tp.probed { stroke: #63b3ff; stroke-width: 2.2; }
.b-hole { fill: var(--bg); stroke: #9aa3ad; stroke-width: 1.2; }
.b-conn { fill: #9aa3ad; }
.b-keepout { fill: rgba(240, 104, 92, .16); stroke: #f0685c; stroke-dasharray: 4 3; }
.b-push { fill: var(--warn); }
.b-label { fill: #f2f4f6; font: 10px var(--mono); paint-order: stroke; stroke: rgba(0, 0, 0, .55); stroke-width: 2.5px; }
.warn-list { margin: 8px 0 0; padding-left: 20px; color: var(--warn); font-size: 13px; }
.site .pre { white-space: pre-wrap; }
.member-actions input[type=date] { background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; color: var(--text); }
@media (max-width: 800px) {
  .chat-app { grid-template-columns: 1fr; height: auto; }
  .chat-side { max-height: 170px; }
  .chat-main { height: calc(100vh - 120px); min-height: 420px; }
  .chat-ideas { grid-template-columns: 1fr; }
  .msg-user { max-width: 92%; }
  .chat-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .chat-running, .tool-dot, .chat-typing span { animation: none; } }

/* the probe designer (Admin > Bench): the board's layout files, the probes placed on its pads */
.designer .ds-drop { margin: 10px 0 0; padding: 18px; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted);
  text-align: center; cursor: pointer; }
.designer .ds-drop b { color: var(--text); }
.designer .ds-drop.over, .designer .ds-drop:hover { border-color: var(--accent); background: rgba(79, 156, 245, .07); }
.designer .ds-summary .row { margin-top: 10px; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.designer .ds-summary .bad, .designer .err { color: var(--bad); }
.designer .ds-summary .warn, .designer .warn { color: var(--warn); }
.designer .ds-tools { gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.designer .ds-check { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; }
.designer .ds-work { display: grid; grid-template-columns: 150px minmax(0, 1fr) 240px; gap: 12px; align-items: start; }
@media (max-width: 900px) { .designer .ds-work { grid-template-columns: minmax(0, 1fr); } }
.designer .ds-palette { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.designer .ds-palette small { color: var(--muted); line-height: 1.4; }
.designer .ds-chip { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--code-bg); cursor: grab; user-select: none; }
.designer .ds-chip:active { cursor: grabbing; }
.designer .ds-dot { width: 12px; height: 12px; border-radius: 50%; background: #63b3ff; box-shadow: 0 0 0 3px rgba(99, 179, 255, .25); }
.designer .ds-dot.fam-pogo_100mil { width: 14px; height: 14px; }
.designer .ds-dot.fam-pogo_50mil { width: 8px; height: 8px; }
.designer .ds-dot.fam-kelvin { background: #b388ff; box-shadow: 0 0 0 3px rgba(179, 136, 255, .25); }
.designer .ds-dot.tool { background: none; border: 2px solid #f0685c; border-radius: 50%; box-shadow: none; }
.designer .ds-stage { min-width: 0; }
.designer .ds-svg { display: block; width: 100%; height: min(64vh, 620px); background: #10161b; border: 1px solid var(--line);
  border-radius: 8px; touch-action: none; cursor: crosshair; }
.ds-board { fill: #1d5236; stroke: #46b07a; stroke-width: 1.2px; vector-effect: non-scaling-stroke; }
.ds-empty { fill: var(--muted); font-size: 4px; }
.ds-pad { stroke: none; }
.ds-pad.top { fill: #c9a94a; opacity: .55; }
.ds-pad.bottom { fill: #e7c35a; }
.ds-pad.both { fill: #c8ccd1; }
.ds-pad.k-via { fill: #9aa3ad; }
.ds-pad.k-test { fill: #ffd76a; }
.ds-pad.masked { opacity: .28; }
.ds-hole { fill: #10161b; stroke: #9aa3ad; stroke-width: 0.8px; vector-effect: non-scaling-stroke; pointer-events: none; }
.ds-hole.np { stroke: #f0685c; }
.ds-tool circle { fill: none; stroke: #f0685c; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.ds-tool path { stroke: #f0685c; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.ds-pin { cursor: grab; }
.ds-pin .ds-reach { fill: rgba(99, 179, 255, .12); stroke: rgba(99, 179, 255, .55); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.ds-pin .ds-head { fill: #63b3ff; stroke: #0b1a2a; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.ds-pin.unprobed .ds-head { fill: none; stroke: #63b3ff; stroke-width: 2px; }
.ds-pin.unprobed .ds-reach { display: none; }
.ds-pin.warn .ds-reach { stroke: var(--warn); fill: rgba(240, 179, 74, .14); }
.ds-pin.err .ds-reach { stroke: var(--bad); fill: rgba(240, 104, 92, .22); }
.ds-pin.sel .ds-head { fill: #fff; }
.ds-pin.sel .ds-reach { stroke: #fff; stroke-width: 2px; }
.ds-pin.other { opacity: .45; }
.ds-label { fill: #f2f4f6; font-family: var(--mono); paint-order: stroke; stroke: rgba(0, 0, 0, .7); stroke-width: 2px;
  vector-effect: non-scaling-stroke; pointer-events: none; }
.ds-snap { fill: none; stroke: #fff; stroke-width: 2px; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.designer .ds-insp { font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.designer .ds-insp .kv { margin: 0; }
.designer .ds-insp .warn-list li.err { color: var(--bad); }
.designer tr.sel td { background: rgba(79, 156, 245, .12); }
.designer tbody tr { cursor: pointer; }
.designer .ds-plate { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.designer .ds-plate.stale .ds-plate-one { opacity: .45; }
.designer .ds-plate-one h3 { margin: 0 0 6px; font-size: 15px; }
.designer .ds-plate-img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #10161b;
  border: 1px solid var(--line); border-radius: 8px; }
.designer .ds-pinout tbody tr { cursor: default; }
.designer .ds-pinout tr.warn td { color: var(--warn); }

/* the guide (/guide, guide.js) */
.guide .card { scroll-margin-top: 16px; }
.guide .card p { line-height: 1.55; }
.guide .card ol, .guide .card ul { margin: 6px 0 12px; padding-left: 22px; }
.guide .card li { margin: 5px 0; line-height: 1.5; }
.guide .card .code { margin: 4px 0 12px; }
.guide .card code { font-family: var(--mono); font-size: 12.5px; }

/* Admin > Members: account states */
.pill.warn { color: #e8a33d; border-color: #e8a33d; }
.pill.bad { color: #e5677d; border-color: #e5677d; }
.member-actions .row.tight { flex-wrap: wrap; }

/* Request a fixture (/fixtures/new, fixture-request.js) */
.fixture-req .drop-zone { margin: 10px 0 0; padding: 22px 18px; border: 2px dashed var(--line); border-radius: 10px;
  color: var(--muted); text-align: center; cursor: pointer; line-height: 1.5; }
.fixture-req .drop-zone b { color: var(--text); }
.fixture-req .drop-zone.over, .fixture-req .drop-zone:hover, .fixture-req .drop-zone:focus-visible { border-color: var(--accent);
  background: rgba(79, 156, 245, .07); outline: none; }
.fixture-req .board-svg { margin: 12px 0 4px; }
.fixture-req .kinds { display: grid; gap: 8px; margin: 0 0 12px; }
.fixture-req .kind { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; }
.fixture-req .kind:has(input:checked) { border-color: var(--accent); }
.fixture-req .kind span { display: flex; flex-direction: column; gap: 2px; }
.fixture-req .kind small { color: var(--muted); }
.fixture-req .warn-note { color: #e8a33d; font-size: 13px; }
.fixture-req .problems li, .fixture-req .warn-list li { margin: 4px 0; font-size: 13px; }
.fixture-req .problems { color: #e5677d; }
.fixture-req .warn-list { color: #e8a33d; }
.fixture-req details { margin: 8px 0 0; }
.fixture-req textarea { width: 100%; box-sizing: border-box; }

/* the Contact page and conversations (contact.js), Admin > Support */
.contact .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact textarea, .card textarea.reply { width: 100%; box-sizing: border-box; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.thread .msg { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.thread .msg.staff { border-color: var(--accent); }
.thread .msg.note { border-style: dashed; background: rgba(232, 163, 61, .06); }
.thread .msg .who { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.thread .msg .who b { color: var(--text); }
.thread .msg .body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.support-list tr.unread td:first-child a { font-weight: 700; }

/* engineering services (services.js): the catalog, a service and its order form, a customer's order */
.svc-page { display: flex; flex-direction: column; gap: 22px; }
.svc-page textarea, .svc-page input[type=text], .svc-page select { width: 100%; box-sizing: border-box; }
.svc-page input[type=date] { background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px;
  color: var(--text); font: 14px "Segoe UI", system-ui, sans-serif; color-scheme: dark; }
:root[data-appearance=light] .svc-page input[type=date] { color-scheme: light; }
.svc-page .row.wrap { align-items: flex-start; gap: 12px; }
.svc-page .row.wrap > .field { flex: 1 1 210px; min-width: 0; }
.svc-page .check { margin: 6px 0; align-items: flex-start; line-height: 1.4; }
.svc-page .check input { margin-top: 2px; }
.flash.err { border-color: var(--bad); background: rgba(240, 104, 92, .07); }

.svc-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; align-items: center;
  padding: 30px 34px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 13%, var(--surface)) 0%, var(--surface) 62%); }
.site .svc-hero h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
.svc-hero .svc-tag { font-size: 16px; line-height: 1.5; margin: 0 0 18px; max-width: 560px; color: var(--text); opacity: .88; }
.svc-hero .checks { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.svc-hero .checks li { position: relative; padding-left: 30px; font-size: 14.5px; line-height: 1.45; }
.svc-hero .checks li::before { content: "\2713"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ok); background: rgba(63, 207, 142, .16); }
.svc-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.svc-hero .actions .btn { padding: 9px 18px; font-size: 14.5px; }
.svc-hero .art svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .35)); }
.art .a-board { fill: #123522; stroke: #2f8a57; stroke-width: 2; }
.art .a-silk { fill: none; stroke: rgba(242, 244, 246, .18); stroke-width: 1; stroke-dasharray: 2 4; }
.art .a-hole { fill: var(--bg); stroke: #c9a23a; stroke-width: 2.5; }
.art .a-trace { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art .a-t1 { stroke: #c9a23a; }
.art .a-t2 { stroke: #48b97c; }
.art .a-t3 { stroke: #d6b65a; opacity: .8; }
.art .a-via { fill: #0d2618; stroke: #d9b44a; stroke-width: 2; }
.art .a-chip { fill: #16191d; stroke: #5c6875; stroke-width: 1.5; }
.art .a-dot { fill: #5c6875; }
.art .a-pad { fill: #d9b44a; }
.art .a-part { fill: #2b3036; stroke: #d9b44a; stroke-width: 1.5; }

.svc-groups { display: flex; flex-direction: column; gap: 26px; scroll-margin-top: 90px; }
.svc-group h2 { font-size: 17px; margin: 0 0 10px; }
.svc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.svc-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); text-decoration: none; transition: border-color .15s, transform .15s; }
.site-main a.svc-card { color: var(--text); }
.svc-card:hover, .svc-card:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.svc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.svc-card b { font-size: 15.5px; }
.svc-card span { color: var(--muted); font-size: 13.5px; line-height: 1.45; flex: 1; }
.svc-card small { color: var(--accent); font-size: 12.5px; margin-top: 4px; }

ol.svc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.svc-steps li { display: flex; gap: 12px; align-items: flex-start; }
.svc-steps .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  font-size: 13.5px; color: var(--on-accent); background: var(--accent); }
.svc-steps b { display: block; margin: 3px 0 4px; }
.svc-steps p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

.svc-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.svc-cols.two { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.svc-cols > div { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
ul.svc-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.svc-list li::marker { color: var(--accent); }
#order > .card { max-width: 820px; }
#order, #how { scroll-margin-top: 90px; }
.svc-page .card textarea { min-height: 120px; }

.svc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.site .svc-head h1 { margin: 0; }
.svc-st { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 3px 8px;
  border-radius: 4px; white-space: nowrap; background: #2b3138; color: var(--muted); }
.svc-st.st-requested, .svc-st.st-in_review { background: rgba(240, 179, 74, .16); color: var(--warn); }
.svc-st.st-quoted { background: rgba(79, 156, 245, .18); color: #8fc0ff; }
.svc-st.st-accepted, .svc-st.st-in_progress { background: rgba(157, 124, 240, .18); color: #c3b0ff; }
.svc-st.st-delivered { background: rgba(63, 207, 142, .16); color: var(--ok); }
.svc-st.st-declined { background: rgba(240, 104, 92, .15); color: #ff9a90; }
.svc-price { font-size: 26px; font-weight: 700; margin: 0 0 10px; }
.svc-price small { font-size: 13.5px; font-weight: 400; color: var(--muted); }
ul.svc-files { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.svc-files small { color: var(--muted); }
.svc-page .history .svc-st { font-size: 10px; padding: 1px 6px; }

@media (max-width: 900px) {
  .svc-hero { grid-template-columns: 1fr; padding: 22px 20px; }
  .svc-hero .art { max-width: 420px; }
  ol.svc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-cols, .svc-cols.two { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .site .svc-hero h1 { font-size: 24px; }
  ol.svc-steps { grid-template-columns: 1fr; }
}
.svc-page .thread { margin: 0 0 12px; }
.svc-page .rich.pre + .kv { margin-top: 12px; }
.svc-page .rich.pre + .note, .svc-page .rich.pre + .row { margin-top: 12px; }
.thread + textarea.reply { margin-top: 12px; }
