/* qnap-skill.html and its nine language versions (tools/node/site-skill-page.mjs, docs/site/skill.md): the QNAP
   guidelines skill. The page body is the bucketvs session's section (.qsk, its own scoped <style> in the page); this
   sheet hands it the site's palette and type through its own tokens, written under "main" because the section's style
   comes later in the page, and adds the language nav and what the translated pages need. site.css stays shared. */
main .qsk {
  --qsk-bg: transparent;
  --qsk-panel: var(--panel);
  --qsk-line: var(--rule);
  --qsk-fg: var(--ink);
  --qsk-muted: #9aa7ae;
  --qsk-accent: var(--led);
  --qsk-accent-ink: #1a1206;
  font-family: var(--sans);
}
/* the page's width is the site's column, as on every other page (the owner, 2026-09-28 08:20): the section's own
   1040 px cap goes, the site's gutters come in, and running text keeps a readable measure */
main .qsk {
  max-width: var(--page);
  margin: 0 auto;
  padding-inline: var(--gut);
}
main .qsk > * {
  max-width: none;
}
/* text runs as wide as what stands beside it (the owner, 2026-10-20): on a wide screen the section is a grid of three
   columns, the columns of the cards; the heading and lead take two of them and the download the third, the licence
   text the two right of its heading, the cards and the skill browser all three. Narrower, everything is one column. */
main .qsk .qsk-lead,
main .qsk .qsk-meta,
main .qsk .qsk-licence p {
  max-width: none;
}
@media (min-width: 980px) {
  main .qsk {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 14px;
    align-items: end;
  }
  main .qsk > header {
    grid-column: 1 / 3;
    padding-right: 24px;
  }
  main .qsk > .qsk-cta {
    grid-column: 3;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 24px 0 40px;
    padding: 18px 20px;
    background: var(--qsk-panel);
    border: 1px solid var(--qsk-line);
    border-radius: 18px;
  }
  main .qsk > .qsk-cta .qsk-sum {
    margin-top: 0;
  }
  main .qsk > .qsk-grid,
  main .qsk > .qsk-browse {
    grid-column: 1 / -1;
  }
  main .qsk > .qsk-licence {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 14px;
    align-items: baseline;
  }
  main .qsk > .qsk-licence p {
    grid-column: 2 / -1;
  }
}
main .qsk h2,
main .qsk h3 {
  font-family: var(--cond);
}
main .qsk code,
main .qsk pre,
main .qsk .qsk-eyebrow {
  font-family: var(--mono);
}
/* the download button keeps its label readable at rest, on hover and on focus wherever it sits */
main .qsk .qsk-btn,
main .qsk .qsk-btn:hover,
main .qsk .qsk-btn:focus-visible {
  color: var(--qsk-accent-ink);
}
main .qsk .qsk-sum {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--dim);
  overflow-wrap: anywhere;
}
main .qsk .qsk-sum code {
  font-size: 12px;
}

/* ── the page in every language: one quiet line above the section, the current language marked ── */
.qs-langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 14px;
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}
.qs-langs a,
.qs-langs span {
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.qs-langs a:hover,
.qs-langs a:focus-visible {
  color: var(--led);
}
.qs-langs [aria-current] {
  color: var(--ink);
  border-bottom-color: var(--led);
}
.qs-langs [lang='ja'] {
  font-family:
    'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', Meiryo, 'Noto Sans JP',
    'Noto Sans CJK JP', sans-serif;
}
.qs-langs [lang='zh-TW'] {
  font-family: 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', 'Noto Sans CJK TC', sans-serif;
}

/* ── Japanese and Traditional Chinese: the Plex faces have no CJK glyphs, so each page names its fallbacks (the
   Latin words keep Plex), and the wide letter-spacing of the uppercase labels goes, since CJK has no case ── */
:root:lang(ja) {
  --cjk:
    'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', Meiryo, 'Noto Sans JP',
    'Noto Sans CJK JP';
}
:root:lang(zh-TW) {
  --cjk: 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', 'Noto Sans CJK TC';
}
:root:lang(ja),
:root:lang(zh-TW) {
  --sans: 'IBM Plex Sans', var(--cjk), ui-sans-serif, system-ui, sans-serif;
  --cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', var(--cjk), ui-sans-serif, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, var(--cjk), monospace;
}
:lang(ja) :is(.chip, .qsk-eyebrow, footer .un),
:lang(zh-TW) :is(.chip, .qsk-eyebrow, footer .un) {
  letter-spacing: 0.04em;
}

/* ── code blocks on this page: the section's own style (later in the page) gives every pre a panel and a radius; the
   site's code frame (site.css .cb) wins it back here ── */
main .qsk .cb > pre {
  margin: 0;
  padding: 54px 20px 18px;
  background: #0b1014;
  border: 1px solid var(--rule);
  border-radius: calc(var(--tray) - var(--lip));
}
main .qsk .cb > pre code {
  font: inherit;
  color: inherit;
}

/* ── the skill browser (assets/qnap-skill.js, tools/site-skill-files.py): a tray around one plate, the file tree
   on the left and the reading pane on the right; a row of tabs above the pane on a phone ── */
main .qsk .qsk-browse {
  margin: 0 0 40px;
}
.skb {
  padding: var(--lip);
  border: 1px solid var(--rule);
  border-radius: var(--tray);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012) 42%, transparent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.045) inset,
    0 18px 44px -30px rgba(0, 0, 0, 0.9);
}
.skb-plain {
  margin: 0;
  padding: 16px 20px;
  list-style: none;
  columns: 2 16rem;
  column-gap: 28px;
  border: 1px solid var(--rule);
  border-radius: calc(var(--tray) - var(--lip));
  background: var(--panel);
  font: 13px/2 var(--mono);
}
.skb-plate {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  height: clamp(460px, 74vh, 820px);
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: calc(var(--tray) - var(--lip));
  background: #0b1014;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.skb-files {
  overflow: auto;
  padding: 10px 8px 14px;
  border-right: 1px solid var(--rule);
  background: var(--panel);
  scrollbar-width: thin;
  scrollbar-color: var(--rule-hi) transparent;
}
.skb-dir {
  padding: 8px 10px 4px;
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--dim);
}
.skb-dir.skb-sub {
  padding-left: 22px;
}
main .qsk .skb-tab {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 5px 10px 5px 22px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #b9c4ca;
  font: 13px/1.3 var(--mono);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
main .qsk .skb-tab.skb-in {
  padding-left: 34px;
}
main .qsk .skb-tab:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}
main .qsk .skb-tab[aria-selected='true'] {
  background: var(--led-soft);
  color: var(--led);
}
main .qsk .skb-tab:focus-visible {
  outline: 2px solid var(--led);
  outline-offset: -2px;
}
.skb-fn {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.skb-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.skb-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 10px 7px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}
.skb-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 12px/1.4 var(--mono);
  color: var(--dim);
}
.skb-mode {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border: 1px solid var(--rule-hi);
  border-radius: 999px;
}
main .qsk .skb-mode button {
  min-height: 26px;
  padding: 3px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--dim);
  font: 600 12.5px/1 var(--cond);
  cursor: pointer;
}
main .qsk .skb-mode button[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
}
main .qsk .skb-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;
}
main .qsk .skb-copy.done {
  background: var(--lime);
  border-color: var(--lime);
  color: #101507;
}
.skb-view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px clamp(18px, 2.4vw, 34px) 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-hi) transparent;
}
.skb-view:focus-visible {
  outline: 2px solid var(--led);
  outline-offset: -2px;
}
.skb-view.is-src {
  padding: 0;
}
main .qsk .skb-src {
  min-height: 100%;
  margin: 0;
  padding: 18px 22px 28px;
  border: 0;
  border-radius: 0;
  background: none;
  color: #cdd6db;
  font: 13px/1.65 var(--mono);
  white-space: pre;
  tab-size: 4;
}
main .qsk .skb-src code {
  font: inherit;
  color: inherit;
}
.skb-view.is-src .skb-src .hljs-section {
  color: var(--led);
}
.skb-view.is-src .skb-src .hljs-bullet {
  color: #e58fb0;
}
.skb-view.is-src .skb-src :is(.hljs-code, .hljs-string) {
  color: #9dcc8a;
}
.skb-view.is-src .skb-src :is(.hljs-link, .hljs-symbol) {
  color: #8ec3e3;
}
.skb-view.is-src .skb-src .hljs-strong {
  color: var(--ink);
  font-weight: 600;
}
.skb-view.is-src .skb-src .hljs-emphasis {
  font-style: italic;
}
.skb-note {
  color: var(--dim);
  font-size: 14px;
}

/* the rendered Markdown: the site's type, the section's muted text, the code blocks flat on the plate */
main .qsk .skb-view :is(h1, h2, h3, h4) {
  max-width: none;
  margin: 1.6em 0 0.55em;
  font-family: var(--cond);
  color: var(--ink);
  letter-spacing: -0.01em;
}
main .qsk .skb-view h1 {
  margin-top: 0.2em;
  font-size: 1.65rem;
}
main .qsk .skb-view h2 {
  padding-top: 0.9em;
  border-top: 1px solid var(--rule);
  font-size: 1.25rem;
}
main .qsk .skb-view h3 {
  font-size: 1.05rem;
}
main .qsk .skb-view :is(p, li, dd) {
  color: #b9c4ca;
  font-size: 15px;
  line-height: 1.65;
}
main .qsk .skb-view :is(ul, ol) {
  margin: 0 0 14px;
  padding-left: 1.3em;
}
main .qsk .skb-view li {
  margin: 0 0 6px;
}
main .qsk .skb-view li::marker {
  color: var(--dim);
}
main .qsk .skb-view a {
  color: var(--ink);
  text-decoration-color: rgba(255, 176, 32, 0.6);
  text-underline-offset: 3px;
}
main .qsk .skb-view a:hover {
  color: var(--led);
}
main .qsk .skb-view strong {
  color: var(--ink);
}
main .qsk .skb-view .cb {
  margin: 14px 0 18px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
main .qsk .skb-view .cb::before {
  left: 1px;
  right: 1px;
  top: 40px;
}
main .qsk .skb-view .cb-lang {
  top: 13px;
  left: 21px;
}
main .qsk .skb-view .cb > button {
  top: 7px;
  right: 8px;
}
.skb-tbl {
  max-width: 100%;
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.skb-tbl table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.5;
}
.skb-tbl :is(th, td) {
  min-width: 7.2em;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
  color: #b9c4ca;
}
.skb-tbl th {
  background: var(--panel);
  color: var(--ink);
  font-family: var(--cond);
  font-weight: 600;
}
.skb-tbl tr:last-child td {
  border-bottom: 0;
}
.skb-tbl td + td,
.skb-tbl th + th {
  border-left: 1px solid var(--rule);
}
.skb-front {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 18px;
  margin: 0 0 22px;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--panel);
  font-size: 13.5px;
}
.skb-front dt {
  font: 600 12px/1.65 var(--mono);
  color: var(--dim);
}
main .qsk .skb-front dd {
  margin: 0;
  font-size: 13.5px;
}

@media (max-width: 760px) {
  .skb-plate {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    height: min(78vh, 720px);
  }
  .skb-files {
    display: flex;
    gap: 4px;
    padding: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    white-space: nowrap;
  }
  .skb-dir {
    display: none;
  }
  main .qsk .skb-tab,
  main .qsk .skb-tab.skb-in {
    flex: none;
    width: auto;
    padding: 5px 12px;
  }
  .skb-bar {
    padding-left: 12px;
  }
  .skb-path {
    display: none;
  }
  .skb-mode {
    margin-right: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  main .qsk .skb-tab {
    transition: none;
  }
}
