/* AgentSkills — anthropicskills.com
   Warm paper / ink / electric orange marketplace identity.
   Plain CSS, no frameworks. Mobile-first, responsive, accessible. */

:root {
  --paper: #f7f2e8;
  --paper-deep: #efe7d6;
  --card: #fffdf7;
  --ink: #191410;
  --ink-soft: #4a4238;
  --ink-faint: #8a7f6f;
  --accent: #ff4d00;
  --accent-deep: #d13e00;
  --accent-soft: #ffe3d3;
  --violet: #6d28d9;
  --teal: #0e7c6b;
  --blue: #1d5fd1;
  --gold: #b8860b;
  --rose: #d11d5f;
  --green: #2e7d32;
  --line: #e2d8c2;
  --radius: 14px;
  --shadow: 0 2px 0 rgba(25, 20, 16, .9);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  background-image:
    radial-gradient(rgba(25, 20, 16, .035) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1.25rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* layout */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 1.25rem; }
main { display: block; }
section.block { padding: 3.5rem 0; }
section.block-tight { padding: 2rem 0; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 242, 232, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem 1.25rem; max-width: 1140px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
  font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em;
}
.brand-mark {
  width: 38px; height: 38px; flex: 0 0 38px;
  background: var(--accent); border: 2px solid var(--ink); border-radius: 10px;
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow);
  transform: rotate(-6deg);
}
.brand em { font-style: normal; color: var(--accent); }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.main-nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .5rem .8rem; border-radius: 8px; border: 2px solid transparent;
}
.main-nav a:hover { background: var(--accent-soft); border-color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.nav-cta {
  background: var(--accent) !important; color: #fff !important;
  border: 2px solid var(--ink) !important; box-shadow: var(--shadow);
  margin-left: .4rem;
}
.nav-cta:hover { background: var(--accent-deep) !important; transform: translateY(-1px); }

.nav-toggle {
  display: none; margin-left: auto;
  background: var(--card); border: 2px solid var(--ink); border-radius: 8px;
  padding: .5rem .7rem; font-weight: 800; cursor: pointer; box-shadow: var(--shadow);
}

/* hero */
.hero {
  border-bottom: 2px solid var(--ink);
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(255, 77, 0, .16), transparent 70%),
    radial-gradient(500px 260px at 8% 90%, rgba(109, 40, 217, .10), transparent 70%);
  padding: 4.5rem 0 4rem;
  position: relative; overflow: hidden;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.02; letter-spacing: -.035em; font-weight: 900;
  margin: 0 0 1.25rem; max-width: 16ch;
}
.hero h1 .accent-word {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--accent); letter-spacing: -.01em;
}
.hero p.lede {
  font-size: 1.2rem; color: var(--ink-soft); max-width: 56ch; margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer;
  padding: .85rem 1.6rem; border-radius: 12px;
  border: 2px solid var(--ink); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 0 4px 0 rgba(25,20,16,.9); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* ticker */
.ticker {
  border-bottom: 2px solid var(--ink); background: var(--ink); color: var(--paper);
  overflow: hidden; white-space: nowrap; padding: .65rem 0;
  font-weight: 700; font-size: .92rem; letter-spacing: .02em;
}
.ticker-track { display: inline-block; animation: ticker 32s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker .sep { color: var(--accent); margin: 0 1.2rem; }

/* section titles */
.eyebrow {
  font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-deep); margin: 0 0 .6rem;
}
h2.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.03em; font-weight: 900;
  margin: 0 0 .8rem; line-height: 1.1;
}
.section-sub { color: var(--ink-soft); max-width: 62ch; margin: 0 0 2rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.link-more { font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.link-more:hover { color: var(--accent-deep); }

/* skill cards */
.card-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.skill-card {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 1.4rem; display: flex; flex-direction: column; gap: .7rem;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .14s ease, box-shadow .14s ease; position: relative;
}
.skill-card:hover { transform: translate(-2px, -3px); box-shadow: 0 5px 0 rgba(25,20,16,.9); }
.skill-card .card-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.cat-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  border: 2px solid var(--ink); border-radius: 999px; padding: .2rem .7rem; background: #fff;
}
.cat-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.card-version {
  font-family: var(--font-mono); font-size: .75rem; color: var(--ink-faint);
  background: var(--paper-deep); border-radius: 6px; padding: .15rem .5rem;
}
.skill-card h3 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; font-weight: 800; }
.skill-card h3 .cmd { font-family: var(--font-mono); font-size: 1rem; color: var(--accent-deep); }
.skill-card p.desc { margin: 0; color: var(--ink-soft); font-size: .95rem; flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: .6rem; border-top: 2px dashed var(--line); padding-top: .8rem; }
.stars { color: #e09b00; letter-spacing: .1em; font-size: .95rem; }
.stars small { color: var(--ink-faint); letter-spacing: 0; }
.author { font-size: .82rem; color: var(--ink-faint); font-weight: 600; }
.badge-featured {
  position: absolute; top: -12px; right: 14px;
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 900;
  letter-spacing: .1em; text-transform: uppercase;
  border: 2px solid var(--ink); border-radius: 999px; padding: .25rem .8rem;
  box-shadow: 2px 2px 0 rgba(25,20,16,.9); transform: rotate(3deg);
}

/* category tiles */
.cat-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.cat-tile {
  display: block; text-decoration: none; color: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 1.5rem 1.3rem; box-shadow: var(--shadow);
  transition: transform .14s ease; position: relative; overflow: hidden;
}
.cat-tile:hover { transform: translate(-2px, -3px) rotate(-.5deg); }
.cat-tile h3 { margin: .8rem 0 .3rem; font-size: 1.25rem; letter-spacing: -.02em; }
.cat-tile p { margin: 0; font-size: .9rem; opacity: .92; }
.cat-tile .count { font-family: var(--font-mono); font-size: .8rem; opacity: .85; }
.cat-icon { font-size: 1.9rem; line-height: 1; }
.cat-tile .go { position: absolute; right: 1.1rem; bottom: 1.1rem; font-weight: 900; }

/* how it works */
.steps { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
.step {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 1.6rem 1.4rem; box-shadow: var(--shadow); position: relative;
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-size: 2.6rem; font-weight: 900; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 2px var(--accent);
  display: block; margin-bottom: .5rem;
}
.step h3 { margin: 0 0 .5rem; font-size: 1.2rem; letter-spacing: -.01em; }
.step p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.step code { background: var(--ink); color: #ffd9c4; padding: .15rem .5rem; border-radius: 6px; font-size: .85em; }

/* stats strip */
.stats {
  background: var(--ink); color: var(--paper);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; padding: 2.6rem 1.25rem; text-align: center; }
.stat-num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; letter-spacing: -.03em; color: var(--accent); }
.stat-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: #cfc4ae; font-weight: 700; }

/* CTA band */
.cta-band {
  border: 2px solid var(--ink); border-radius: 20px; background: var(--accent);
  color: #fff; padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: 6px 6px 0 rgba(25,20,16,.9);
  position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(400px 200px at 90% 20%, rgba(255,255,255,.25), transparent 60%);
}
.cta-band h2 { margin: 0 0 .8rem; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.03em; line-height: 1.05; }
.cta-band p { margin: 0 0 1.6rem; max-width: 52ch; font-size: 1.05rem; }
.cta-band .btn { border-color: #fff; box-shadow: 0 2px 0 #fff; }

/* browse controls */
.controls {
  display: grid; gap: .9rem; margin-bottom: 1.8rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .controls { grid-template-columns: 1fr 220px 220px; }
}
.field label { display: block; font-weight: 800; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .4rem; }
.field input[type="search"], .field select, .field input[type="text"],
.field input[type="url"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--card); border: 2px solid var(--ink); border-radius: 10px;
  padding: .75rem .9rem; box-shadow: inset 2px 2px 0 rgba(25,20,16,.06);
}
.results-meta { font-size: .9rem; color: var(--ink-faint); margin: 0 0 1.2rem; font-weight: 600; }
.empty-state {
  border: 2px dashed var(--ink-faint); border-radius: var(--radius);
  padding: 3rem 1.5rem; text-align: center; color: var(--ink-soft);
  background: var(--card);
}

/* skill detail */
.detail-hero { padding: 3rem 0 2rem; border-bottom: 2px solid var(--ink); }
.detail-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.03em; margin: .8rem 0 .6rem; line-height: 1.05; }
.detail-hero h1 .cmd { font-family: var(--font-mono); font-size: .55em; color: var(--accent-deep); }
.detail-sub { color: var(--ink-soft); font-size: 1.1rem; max-width: 62ch; margin: 0 0 1.4rem; }
.detail-facts { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.6rem; }
.fact {
  border: 2px solid var(--ink); border-radius: 10px; background: var(--card);
  padding: .5rem .9rem; font-size: .9rem; box-shadow: var(--shadow);
}
.fact b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); }
.fact .val { font-weight: 800; }
.install-box {
  background: var(--ink); color: #f3e9d6; border-radius: var(--radius);
  padding: 1.2rem 1.4rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  border: 2px solid var(--ink); margin-bottom: 2.5rem;
}
.install-box code { font-family: var(--font-mono); font-size: 1rem; flex: 1; min-width: 200px; word-break: break-all; }
.install-box code .dim { color: #8a7f6f; }
.copy-btn {
  background: var(--accent); color: #fff; border: 2px solid #fff; border-radius: 8px;
  font-weight: 800; padding: .55rem 1.1rem; cursor: pointer; font-size: .9rem;
}
.copy-btn:hover { background: var(--accent-deep); }
.detail-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1.6fr 1fr; } }
.detail-grid h2 { font-size: 1.4rem; letter-spacing: -.02em; margin: 2rem 0 .8rem; }
.detail-grid h2:first-child { margin-top: 0; }
.detail-grid ul.spec-list { list-style: none; padding: 0; margin: 0; }
.detail-grid ul.spec-list li {
  border: 2px solid var(--ink); border-radius: 10px; background: var(--card);
  padding: .9rem 1.1rem; margin-bottom: .7rem; box-shadow: var(--shadow);
}
.detail-grid ul.spec-list li b { font-family: var(--font-mono); font-size: .9rem; color: var(--accent-deep); }
.perm-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.perm-tag {
  font-family: var(--font-mono); font-size: .8rem; background: var(--accent-soft);
  border: 2px solid var(--ink); border-radius: 999px; padding: .25rem .8rem; font-weight: 700;
}
pre.code {
  background: var(--ink); color: #f3e9d6; border-radius: var(--radius);
  padding: 1.3rem; overflow-x: auto; font-size: .85rem; line-height: 1.55;
  border: 2px solid var(--ink); font-family: var(--font-mono);
}
pre.code .c { color: #8a7f6f; } pre.code .k { color: #ffb37a; } pre.code .s { color: #a8e0a2; }
.rating-box {
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--card);
  padding: 1.4rem; box-shadow: var(--shadow); position: sticky; top: 96px;
}
.rating-box .big { font-size: 2.6rem; font-weight: 900; letter-spacing: -.03em; }
.review { border-top: 2px dashed var(--line); padding: .9rem 0; }
.review:first-of-type { border-top: none; }
.review p { margin: .3rem 0; font-size: .93rem; color: var(--ink-soft); }
.review .who { font-size: .82rem; font-weight: 700; color: var(--ink-faint); }

/* docs */
.docs-layout { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 940px) { .docs-layout { grid-template-columns: 230px 1fr; } }
.docs-toc {
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--card);
  padding: 1.2rem; box-shadow: var(--shadow); align-self: start; position: sticky; top: 96px;
}
.docs-toc h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .8rem; }
.docs-toc ol { margin: 0; padding-left: 1.2rem; font-size: .92rem; }
.docs-toc li { margin-bottom: .45rem; }
.docs-toc a { color: var(--ink); font-weight: 600; text-decoration: none; }
.docs-toc a:hover { color: var(--accent-deep); text-decoration: underline; }
.docs-body h2 { font-size: 1.6rem; letter-spacing: -.02em; margin: 2.4rem 0 .8rem; padding-top: 1rem; border-top: 2px dashed var(--line); }
.docs-body h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.docs-body h3 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
.docs-body p, .docs-body li { color: var(--ink-soft); }
.docs-body table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.6rem; font-size: .92rem; }
.docs-body th, .docs-body td { border: 2px solid var(--ink); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.docs-body th { background: var(--ink); color: var(--paper); }
.docs-body td { background: var(--card); }
.docs-body td code, .docs-body p code, .docs-body li code {
  font-family: var(--font-mono); font-size: .85em; background: var(--paper-deep);
  border: 1px solid var(--line); border-radius: 5px; padding: .1rem .4rem; color: var(--accent-deep);
}
.annot { background: var(--accent-soft); border-left: 5px solid var(--accent); padding: 1rem 1.2rem; border-radius: 0 10px 10px 0; margin: 1.2rem 0; font-size: .95rem; }
.annot b { color: var(--accent-deep); }

/* forms */
.form-card {
  background: var(--card); border: 2px solid var(--ink); border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: 6px 6px 0 rgba(25,20,16,.9);
  max-width: 720px; margin: 0 auto;
}
.form-card .field { margin-bottom: 1.2rem; }
.form-card textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: .82rem; color: var(--ink-faint); margin-top: .3rem; }
.field .error { display: none; font-size: .85rem; color: #b3202c; font-weight: 700; margin-top: .3rem; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #b3202c; background: #fff5f4; }
.field.invalid .error { display: block; }
.checkbox-row { display: flex; gap: .7rem; align-items: flex-start; }
.checkbox-row input { width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--accent); flex: 0 0 auto; }
.success-panel {
  display: none; text-align: center; padding: 3rem 1.5rem;
  border: 2px dashed var(--ink); border-radius: var(--radius); background: #f2f9ef;
}
.success-panel.show { display: block; }
.success-panel .big-emoji { font-size: 3.5rem; }
.success-panel h2 { margin: .6rem 0; }

/* footer */
.site-footer { background: var(--ink); color: #e8dfcc; border-top: 2px solid var(--ink); margin-top: 4rem; }
.footer-grid {
  display: grid; gap: 2rem; padding: 3rem 1.25rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); max-width: 1140px; margin: 0 auto;
}
.site-footer h3 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: #cfc4ae; text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-brand p { font-size: .92rem; color: #a89c83; max-width: 30ch; }
.footer-bottom {
  border-top: 1px solid #3a332a; padding: 1.2rem 1.25rem;
  max-width: 1140px; margin: 0 auto; display: flex; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: #a89c83;
}

/* misc */
.prose p, .prose li { color: var(--ink-soft); }
.page-head { padding: 3rem 0 1.5rem; border-bottom: 2px solid var(--ink); }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.03em; margin: 0 0 .6rem; line-height: 1.05; }
.page-head p { color: var(--ink-soft); max-width: 64ch; margin: 0; font-size: 1.08rem; }
.related-grid { margin-top: 3rem; }
.note-strip {
  background: var(--card); border: 2px dashed var(--ink-faint); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; font-size: .92rem; color: var(--ink-soft); margin: 1.5rem 0;
}

/* responsive nav */
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 2px solid var(--ink);
    flex-direction: column; align-items: stretch; padding: .8rem 1.25rem 1.2rem; gap: .3rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .75rem .9rem; }
  .header-inner { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .hero-kicker .dot { animation: none; }
  * { transition: none !important; }
}
