/* recipes.html and recipes-pl.html (tools/node/site-recipes.mjs, docs/site/recipes.md, S98): the recipe browser of
   Bucket & Code. The list is a table in the site's column; a recipe opens in a window with its facts and its files as
   tabs, coloured like the site's code blocks (the .cb rules of site.css, repeated here for the window's own pane). */
.rcp {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) var(--gut) 72px;
  font-family: var(--sans);
}
.rcp h1,
.rcp h2 {
  font-family: var(--cond);
  letter-spacing: -0.01em;
}
.rcp h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.05;
}
.rcp-lead {
  max-width: 72ch;
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
}
.rcp-from {
  margin: 0;
  font-size: 13.5px;
  color: var(--dim);
}
.rcp code {
  font-family: var(--mono);
  font-size: 0.92em;
}
.rcp-how {
  max-width: 82ch;
  margin: 34px 0 40px;
  padding: 18px 22px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--panel);
}
.rcp-how h2 {
  margin: 0 0 8px;
  font-size: 19px;
}
.rcp-how p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: #b9c4ca;
}
.rcp-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 18px;
  margin-bottom: 14px;
}
.rcp-find {
  display: grid;
  gap: 6px;
  flex: 1 1 280px;
  max-width: 460px;
  font: 600 12.5px/1 var(--cond);
  color: var(--dim);
}
.rcp-find input,
.rcp-cat select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--rule-hi);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: 15px/1.2 var(--sans);
}
.rcp-find input:focus-visible,
.rcp-cat select:focus-visible {
  outline: 2px solid var(--led);
  outline-offset: 1px;
}
.rcp .vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.rcp-count {
  margin-left: auto;
  font: 13px/1 var(--mono);
  color: var(--dim);
}
.rcp-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--panel);
}
.rcp-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rcp-list thead th {
  position: sticky;
  top: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule-hi);
  background: var(--panel);
  font: 600 12.5px/1.2 var(--cond);
  letter-spacing: 0.03em;
  color: var(--dim);
  text-align: left;
  white-space: nowrap;
}
.rcp-list td,
.rcp-list tbody th {
  padding: 10px 14px;
  border-top: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
  font-weight: 400;
}
.rcp-list tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}
.rcp-list tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}
.rcp-list tbody th a {
  font: 600 14px/1.3 var(--mono);
  color: var(--led);
  text-decoration: none;
}
.rcp-list tbody th a:focus-visible {
  outline: 2px solid var(--led);
  outline-offset: 2px;
}
.rcp-sum {
  display: block;
  max-width: 70ch;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--dim);
}
.rcp-v,
.rcp-at {
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}
.rcp-pk {
  min-width: 9rem;
  font-size: 13px;
}
.rcp-dep {
  color: var(--dim);
}
.rcp-empty {
  margin: 0;
  padding: 22px;
  color: var(--dim);
}

/* the window of one recipe */
.rcp-dlg {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 1px solid var(--rule-hi);
  border-radius: 16px;
  background: var(--rack);
  color: var(--ink);
  font-family: var(--sans);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.rcp-dlg::backdrop {
  background: rgba(6, 9, 11, 0.72);
}
.rcp-dlg[open] {
  display: flex;
  flex-direction: column;
}
.rcp-dh {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 20px 22px 0;
}
.rcp-dh h2 {
  margin: 0;
  font: 600 24px/1.2 var(--mono);
  color: var(--led);
  overflow-wrap: anywhere;
}
.rcp-dv {
  font: 14px/1 var(--mono);
  color: var(--dim);
}
.rcp-x {
  margin-left: auto;
  min-height: 32px;
  padding: 4px 14px;
  border: 1px solid var(--rule-hi);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: 600 13px/1 var(--cond);
  cursor: pointer;
}
.rcp-x:hover {
  background: rgba(255, 255, 255, 0.06);
}
.rcp-ds {
  margin: 8px 22px 0;
  font-size: 15px;
  line-height: 1.5;
  color: #b9c4ca;
}
.rcp-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 18px;
  margin: 16px 22px;
  font-size: 14px;
  line-height: 1.45;
}
.rcp-facts dt {
  color: var(--dim);
}
.rcp-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.rcp-facts a {
  color: var(--ink);
  text-decoration-color: var(--rule-hi);
  text-underline-offset: 3px;
}
.rcp-facts a:hover {
  color: var(--led);
}
.rcp-sha {
  font-size: 12px;
  color: var(--dim);
}
@media (min-width: 900px) {
  .rcp-facts {
    grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
  }
}
.rcp-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  margin: 0 12px 12px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: #0b1014;
}
.rcp-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}
.rcp-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.rcp-tab {
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #b9c4ca;
  font: 13px/1 var(--mono);
  white-space: nowrap;
  cursor: pointer;
}
.rcp-tab:hover {
  background: rgba(255, 255, 255, 0.045);
}
.rcp-tab[aria-selected='true'] {
  background: var(--led-soft);
  color: var(--led);
}
.rcp-tab:focus-visible,
.rcp-view:focus-visible {
  outline: 2px solid var(--led);
  outline-offset: -2px;
}
.rcp-raw {
  flex: none;
  font: 12.5px/1 var(--cond);
  color: var(--dim);
}
.rcp-copy {
  flex: none;
  min-height: 28px;
  padding: 3px 14px;
  border: 1px solid rgba(255, 176, 32, 0.42);
  border-radius: 999px;
  background: var(--led-soft);
  color: var(--led);
  font: 600 12.5px/1 var(--cond);
  cursor: pointer;
}
.rcp-copy.done {
  background: var(--lime);
  border-color: var(--lime);
  color: #101507;
}
.rcp-view {
  min-height: 260px;
  max-height: 62vh;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-hi) transparent;
}
.rcp-note {
  margin: 0;
  padding: 14px 18px 0;
  font-size: 13.5px;
  color: var(--dim);
}
.rcp-src {
  margin: 0;
  padding: 16px 20px 24px;
  background: none;
  color: #cdd6db;
  font: 13px/1.65 var(--mono);
  white-space: pre;
  tab-size: 4;
}
.rcp-src code {
  font: inherit;
  color: inherit;
}
.rcp-src .hljs-comment,
.rcp-src .hljs-quote {
  color: var(--dim);
}
.rcp-src .hljs-keyword,
.rcp-src .hljs-selector-tag,
.rcp-src .hljs-section,
.rcp-src .hljs-meta,
.rcp-src .hljs-doctag {
  color: var(--led);
}
.rcp-src .hljs-built_in,
.rcp-src .hljs-title,
.rcp-src .hljs-name {
  color: #f5cc7a;
}
.rcp-src .hljs-string,
.rcp-src .hljs-regexp,
.rcp-src .hljs-template-tag {
  color: #9dcc8a;
}
.rcp-src .hljs-attr,
.rcp-src .hljs-attribute,
.rcp-src .hljs-property,
.rcp-src .hljs-variable,
.rcp-src .hljs-template-variable,
.rcp-src .hljs-subst {
  color: #8ec3e3;
}
.rcp-src .hljs-number,
.rcp-src .hljs-literal,
.rcp-src .hljs-symbol {
  color: #e58fb0;
}
@media (max-width: 640px) {
  .rcp-list thead th:nth-child(3),
  .rcp-list td:nth-child(3),
  .rcp-list thead th:nth-child(5),
  .rcp-list td:nth-child(5) {
    display: none;
  }
  .rcp-dlg {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  .rcp-view {
    max-height: none;
  }
  /* the tabs get a row of their own: beside Open as plain text and Copy, build.sh (the file shown first) was
     scrolled out of the strip */
  .rcp-bar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .rcp-tabs {
    flex-basis: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rcp-list tbody tr {
    transition: none;
  }
}
