/* claude-skills Pages site, in the markpitt.dev brand.
 *
 * Tokens only: every colour, size and radius is a custom property from tokens.css, a verbatim
 * copy of the brand's generated token sheet. The brand's design of this site uses this same
 * stylesheet; change both together.
 *
 * Every rule sits under .cs-site so the design sheet can draw the site beside other apps
 * without the two style sheets touching.
 *
 * The site serves at markpitt.dev/claude-skills, beneath the main site (markpitt.github.io), so
 * its frame copies the main site's measurements: the same header, nav, theme control, footer,
 * content width and section rhythm. Where this file uses a literal size it is one of the main
 * site's (Tailwind) values, named in a comment.
 */

/* The main site's hairline: ink at 10%, over whatever surface is behind it. */
.cs-site { --hairline: color-mix(in oklab, var(--ink) 10%, transparent); }

.cs-site {
  margin: 0;
  background: var(--surface-body);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-sans); /* the main site's body: Tailwind's 16px base */
  -webkit-font-smoothing: antialiased;
}
.cs-site *, .cs-site *::before, .cs-site *::after { box-sizing: border-box; }
.cs-site h1, .cs-site h2, .cs-site h3, .cs-site p, .cs-site ul, .cs-site ol, .cs-site pre, .cs-site figure { margin: 0; }

.cs-site a { color: var(--accent-text); text-underline-offset: 3px; }
.cs-site a:hover { text-decoration-thickness: 2px; }
.cs-site :focus-visible { outline: 2px solid var(--accent-mark); outline-offset: 2px; border-radius: var(--radius-sm); }

.cs-site .skip { position: fixed; left: var(--space-4); top: -100px; padding: var(--space-3) 20px; background: var(--surface-body); color: var(--accent-text); border: 2px solid var(--accent-text); font: var(--type-ui-label); text-decoration: none; border-radius: var(--radius-sm); z-index: 100; }
.cs-site .skip:focus { top: var(--space-4); }

/* Widths, as the main site: max-w-5xl (1024px). Its nav holds the gutter inside the 1024px, its
 * sections outside it, so the lockup sits 24px in from the content edge on both sites. */
.cs-site .wrap { max-width: calc(1024px + 2 * var(--space-6)); margin: 0 auto; padding: 0 var(--space-6); }
.cs-site .wrap-nav { max-width: 1024px; margin: 0 auto; padding: var(--space-4) var(--space-6); }

/* Header: the main site's nav, mark and wordmark on the left, its links and theme control on
 * the right. Translucent over a blur, 67px tall with its hairline. */
.cs-site .cs-top { position: sticky; top: 0; z-index: 50; background: color-mix(in oklab, var(--surface-body) 80%, transparent); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border-bottom: 1px solid var(--hairline); }
.cs-site .cs-top .wrap-nav { display: flex; align-items: center; justify-content: space-between; }
.cs-site .lockup { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); text-decoration: none; }
.cs-site .lockup svg { height: 20px; width: auto; display: block; }
.cs-site .nav-right { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-6); }
.cs-site .nav-menu { position: relative; }
.cs-site .nav-menu-links { display: none; gap: var(--space-1) var(--space-6); justify-content: flex-end; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; font: 400 14px/20px var(--font-sans); }
.cs-site .nav-menu-links a { color: var(--muted); text-decoration: none; transition: color 150ms; }
.cs-site .nav-menu-links a:hover, .cs-site .nav-menu-links a[aria-current] { color: var(--ink); }
.cs-site .nav-menu[open] .nav-menu-links { display: flex; position: absolute; top: calc(100% + var(--space-2)); right: 0; flex-direction: column; align-items: flex-end; gap: var(--space-2); padding: var(--space-4) 20px; background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--radius-md); box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--ink) 30%, transparent); }
.cs-site .nav-menu-toggle, .cs-site .theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius-full); background: none; color: var(--muted); cursor: pointer; list-style: none; transition: color 150ms; }
.cs-site .nav-menu-toggle:hover, .cs-site .theme-toggle:hover { color: var(--ink); }
.cs-site .nav-menu-toggle::marker, .cs-site .nav-menu-toggle::-webkit-details-marker { display: none; }
.cs-site .nav-menu-toggle svg { width: 20px; height: 20px; }
.cs-site .nav-menu-toggle .i-close, .cs-site .nav-menu[open] .nav-menu-toggle .i-open { display: none; }
.cs-site .nav-menu[open] .nav-menu-toggle .i-close { display: block; }
.cs-site .theme-toggle svg { width: 20px; height: 20px; display: none; }
.cs-site .theme-toggle[data-theme-state="system"] .i-system,
.cs-site .theme-toggle[data-theme-state="light"] .i-light,
.cs-site .theme-toggle[data-theme-state="dark"] .i-dark { display: block; }
/* The main site's collapse width, 647px (its global.css and hamburger-nav.spec.ts): the links show
 * in one row from here up, behind the menu button below it. Move the two together. */
@media (min-width: 647px) {
  .cs-site .nav-menu-toggle { display: none; }
  .cs-site .nav-menu-links { display: flex !important; position: static; }
  .cs-site .nav-menu::details-content { content-visibility: visible; }
}

/* Sub-bar: this site's own name and sections, under the shared header. Project names are mono on
 * the main site (its Work cards), so the name is too. */
.cs-site .cs-sub { border-bottom: 1px solid var(--hairline); }
.cs-site .cs-sub .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-6); flex-wrap: wrap; padding-top: var(--space-3); padding-bottom: var(--space-3); }
.cs-site .cs-sub .product { font: 600 14px/20px var(--font-mono); color: var(--ink); text-decoration: none; }
.cs-site .cs-sub nav { display: flex; align-items: center; gap: var(--space-2) var(--space-6); flex-wrap: wrap; font: 400 14px/20px var(--font-sans); }
.cs-site .cs-sub nav a { color: var(--muted); text-decoration: none; transition: color 150ms; }
.cs-site .cs-sub nav a:hover, .cs-site .cs-sub nav a[aria-current] { color: var(--ink); }

/* Type */
.cs-site h1 { font: var(--type-h1); letter-spacing: var(--type-h1-tracking); }
.cs-site h2 { font: var(--type-h2); }
.cs-site h3 { font: var(--type-h3); }
.cs-site code, .cs-site .mono { font-family: var(--font-mono); font-size: 0.92em; }
.cs-site .muted { color: var(--muted); }
.cs-site .small { font: var(--type-small); }
.cs-site .label { font: var(--type-ui-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cs-site .num { font-variant-numeric: tabular-nums; }

/* Home: intro */
.cs-site main { display: block; }
.cs-site .cs-intro { padding: var(--space-16) 0 var(--space-12); }
.cs-site .cs-intro h1 { margin-bottom: var(--space-4); }
.cs-site .cs-intro .cs-lede { font: var(--type-body); max-width: 65ch; }
.cs-site .cs-intro .cs-lede + .cs-lede { margin-top: var(--space-4); }
.cs-site .facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-top: var(--space-6); padding: 0; list-style: none; font: var(--type-small); color: var(--muted); }
.cs-site .facts strong { color: var(--ink); font-weight: 600; }

.cs-site .section { padding: var(--space-24) 0; border-top: 1px solid var(--hairline); }
.cs-site .section-head { margin-bottom: var(--space-8); }
.cs-site .section-head p { max-width: 65ch; margin-top: var(--space-4); color: var(--muted); }
/* Section headings are the main site's eyebrows: mono, 12px, uppercase, widest tracking, accent. */
.cs-site .section-head h2 { font: 400 12px/16px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }

/* Home: the seven groups */
.cs-site .groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-4); padding: 0; list-style: none; }
.cs-site .group-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.cs-site .group-card h3 a { color: var(--ink); text-decoration: none; }
.cs-site .group-card h3 a:hover { text-decoration: underline; }
.cs-site .group-card p { color: var(--muted); flex: 1; }
.cs-site .group-card .foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); padding-top: var(--space-3); border-top: 1px solid var(--hairline); font: var(--type-small); }
.cs-site .group-card .count { color: var(--ink); font-weight: 600; }
.cs-site .repo { font-family: var(--font-mono); font-size: 13px; }

/* Home: every skill, by group */
.cs-site .filter { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-6); }
.cs-site .filter label { font: var(--type-ui-label); }
.cs-site .filter input { width: min(360px, 100%); padding: var(--space-2) var(--space-3); font: var(--type-ui); color: var(--ink); background: var(--surface-body); border: 1px solid var(--border-control); border-radius: var(--radius-sm); }
.cs-site .filter input::placeholder { color: var(--muted); }
.cs-site .filter output { font: var(--type-small); color: var(--muted); }
.cs-site .catalogue-group { margin-bottom: var(--space-8); }
.cs-site .catalogue-group > header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding-bottom: var(--space-2); border-bottom: 1px solid var(--hairline); }
.cs-site .skill-list { padding: 0; list-style: none; }
.cs-site .skill-list li { display: grid; grid-template-columns: 260px 1fr 64px; gap: var(--space-4); align-items: baseline; padding: var(--space-3) 0; border-bottom: 1px solid var(--hairline); }
.cs-site .skill-list .name { font-family: var(--font-mono); font-size: 14px; overflow-wrap: anywhere; }
.cs-site .skill-list .desc { color: var(--muted); }
.cs-site .skill-list .ver { font: var(--type-small); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.cs-site .empty { padding: var(--space-6); text-align: center; color: var(--muted); background: var(--surface-card); border-radius: var(--radius-md); }

/* Code */
.cs-site pre { font: var(--type-code); background: var(--surface-pill); color: var(--ink); padding: var(--space-4); border-radius: var(--radius-md); overflow-x: auto; }
.cs-site pre code { font-size: inherit; }
.cs-site pre .c { color: var(--muted); }
.cs-site :not(pre) > code { background: var(--surface-pill); padding: 1px 6px; border-radius: var(--radius-sm); }

/* Buttons */
.cs-site .btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); font: var(--type-ui-label); border-radius: var(--radius-sm); text-decoration: none; border: 1px solid var(--border-control); color: var(--ink); background: none; }
.cs-site .btn.primary { background: var(--accent-text); border-color: var(--accent-text); color: var(--on-accent-text); }
.cs-site .btn:hover { text-decoration: underline; }
/* The main site's tech tags: mono 12px, muted, pill surface, small radius. */
.cs-site .chip { display: inline-flex; align-items: center; padding: 2px var(--space-2); border-radius: var(--radius-sm); background: var(--surface-pill); color: var(--muted); font: 400 12px/16px var(--font-mono); }

/* Skill page */
.cs-site .crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-8) 0 var(--space-4); margin: 0; list-style: none; font: var(--type-small); color: var(--muted); }
.cs-site .crumbs li + li::before { content: "/"; margin-right: var(--space-2); color: var(--border-control); }
.cs-site .crumbs a { color: var(--muted); }
.cs-site .skill-head h1 { font: 700 36px/1.15 var(--font-mono); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.cs-site .skill-head .cs-lede { font: var(--type-body); max-width: 65ch; margin-top: var(--space-4); }
.cs-site .skill-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-4); }
.cs-site .skill-head .actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.cs-site .skill-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-12); padding: var(--space-12) 0 var(--space-16); }
.cs-site .skill-body aside { display: flex; flex-direction: column; gap: var(--space-6); }
.cs-site .skill-body aside section { padding: var(--space-6); background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.cs-site .skill-body aside h2 { font: var(--type-ui-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--space-3); }
.cs-site .skill-body aside pre { font-size: 13px; padding: var(--space-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.cs-site .skill-body aside p { font: var(--type-small); color: var(--muted); margin-top: var(--space-3); }
.cs-site .siblings { padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-1); }
.cs-site .siblings a { font-family: var(--font-mono); font-size: 13px; }
.cs-site .siblings [aria-current] { color: var(--ink); text-decoration: none; }

/* Rendered SKILL.md: a reading view, held to about 65 characters a line. */
.cs-site .prose { font: var(--type-body); max-width: 70ch; }
.cs-site .prose > * + * { margin-top: var(--space-4); }
.cs-site .prose h1, .cs-site .prose h2 { font: var(--type-h2); margin-top: var(--space-12); }
.cs-site .prose h3 { font: var(--type-h3); margin-top: var(--space-8); }
.cs-site .prose h4 { font: 600 17px/1.4 var(--font-sans); margin-top: var(--space-6); }
.cs-site .prose > :first-child { margin-top: 0; }
.cs-site .prose ul, .cs-site .prose ol { padding-left: var(--space-6); }
.cs-site .prose li + li { margin-top: var(--space-1); }
.cs-site .prose blockquote { margin: var(--space-4) 0 0; padding-left: var(--space-4); border-left: 2px solid var(--border-control); color: var(--muted); }
.cs-site .prose pre { font-size: 14px; }
.cs-site .table-wrap { overflow-x: auto; }
.cs-site .prose table { border-collapse: collapse; width: 100%; font: var(--type-ui); }
.cs-site .prose th, .cs-site .prose td { text-align: left; vertical-align: top; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--hairline); }
.cs-site .prose th { font: var(--type-ui-label); color: var(--muted); }
.cs-site .doc-label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding-bottom: var(--space-3); margin-bottom: var(--space-6); border-bottom: 1px solid var(--hairline); }

/* Syntax highlighting, from the brand's code mapping (personal-brand products.md, "Code and
 * editors"): keywords in accent-text, strings in success, numbers in warning, comments in muted. */
.cs-site .tk-k { color: var(--accent-text); }
.cs-site .tk-s { color: var(--success); }
.cs-site .tk-n { color: var(--warning); }
.cs-site .tk-c { color: var(--muted); font-style: italic; }

/* A skill's files: the tree in the side column, and a page per file. */
.cs-site .files, .cs-site .files ul { padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-1); }
.cs-site .files li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.cs-site .files li.dir { display: block; margin-top: var(--space-2); }
.cs-site .files ul { margin-top: var(--space-1); padding-left: var(--space-3); border-left: 1px solid var(--hairline); }
.cs-site .files a, .cs-site .files .dir-name { font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.cs-site .files .dir-name { color: var(--muted); }
.cs-site .files [aria-current] { color: var(--ink); font-weight: 700; text-decoration: none; }
.cs-site .files .size { font: var(--type-small); color: var(--muted); white-space: nowrap; }
.cs-site .file-head .file-of { margin-bottom: var(--space-2); }
.cs-site .file-head .file-of a { color: var(--muted); }
.cs-site .file-head h1 { font-size: 28px; }
.cs-site .code-view { display: grid; grid-template-columns: auto minmax(0, 1fr); background: var(--surface-pill); border-radius: var(--radius-md); }
.cs-site .code-view pre { font: var(--type-code); font-size: 14px; background: none; border-radius: 0; white-space: pre; }
.cs-site .code-view .gutter { color: var(--muted); text-align: right; user-select: none; padding-right: var(--space-3); border-right: 1px solid var(--hairline); }
.cs-site .code-view .code { overflow-x: auto; }
.cs-site .code-view .code:focus-visible { outline-offset: -2px; }

/* Footer */
.cs-site .foot-bar { border-top: 1px solid var(--hairline); padding: var(--space-8) 0; font: 400 12px/16px var(--font-mono); color: var(--muted); }
.cs-site .foot-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.cs-site .foot-bar a { color: var(--muted); text-decoration: none; }
.cs-site .foot-bar a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 760px) {
  .cs-site .cs-intro { padding: var(--space-12) 0 var(--space-8); }
  .cs-site h1 { font-size: 32px; }
  .cs-site .skill-head h1 { font-size: 26px; }
  .cs-site .file-head h1 { font-size: 22px; }
  .cs-site .code-view pre { font-size: 13px; }
  .cs-site .skill-list li { grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3); }
  .cs-site .skill-list .desc { grid-column: 1 / -1; grid-row: 2; }
  .cs-site .skill-body { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
}
