:root {
  color-scheme: light;
  --canvas: #f6f8fa;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #59636e;
  --border: #d1d9e0;
  --link: #0969da;
  --green: #1a7f37;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.25; }
svg { display: block; flex-shrink: 0; }
:focus-visible { outline: 2px solid #0969da; outline-offset: 3px; }
.wrap { width: min(1320px, calc(100% - 64px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.topbar { background: #252b33; color: #fff; }
.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.brand:hover, .nav a:hover { color: #fff; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #7d8996;
  border-radius: 8px;
  color: #b7eb8f;
}
.brand-mark svg { width: 20px; height: 20px; }
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
  min-width: 130px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #6b7785;
  border-radius: 6px;
  color: #c4cbd3;
}
.nav-search-button { padding: 0; border: 0; background: none; color: inherit; }
.nav-search svg { width: 16px; height: 16px; }
.nav-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}
.nav-search:focus-within { outline: 2px solid #80b4f8; outline-offset: 2px; }
.nav-search input::placeholder { color: #c4cbd3; }
.nav-links, .nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-links { flex-wrap: wrap; }
.nav-links a, .nav-signin, .nav-button { color: #f0f3f6; font-weight: 600; white-space: nowrap; }
.nav-actions { margin-left: auto; gap: 14px; }
.nav-actions form { margin: 0; }
.nav-button { padding: 0; border: 0; background: none; }
.nav-signup {
  padding: 5px 10px;
  border: 1px solid #8c959f;
  border-radius: 6px;
  color: #fff;
  white-space: nowrap;
}

.button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid rgba(31, 35, 40, .15);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}
.button { background: var(--green); color: #fff; }
.button:hover { background: #166c2e; color: #fff; text-decoration: none; }
.button-small { padding: 5px 11px; }
.secondary-button { background: #f6f8fa; color: var(--text); }
.secondary-button:hover { background: #edf0f3; color: var(--text); text-decoration: none; }

.explore-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.explore-header-inner {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 30px;
}
.eyebrow {
  margin-bottom: 9px;
  color: #6e7781;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.explore-header h1 { margin-bottom: 6px; font-size: 29px; letter-spacing: -.035em; }
.explore-header p:last-child { margin-bottom: 0; color: var(--muted); }
.explore-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 260px;
  gap: 32px;
  min-height: 50vh;
  padding-block: 32px 48px;
}
.sidebar-title { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.category-nav { display: flex; flex-direction: column; gap: 3px; }
.category-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text);
}
.category-link svg { width: 16px; height: 16px; color: #6e7781; }
.category-link:hover { background: #eaeef2; color: var(--text); text-decoration: none; }
.category-link.active { background: #e3eaf1; font-weight: 600; }
.category-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: #8c959f;
}
.category-link .category-dot { margin-inline: 3px 2px; }
.category-code { background: #8b5cf6; }
.category-website { background: #2f81c4; }
.category-game { background: #d98439; }
.category-tool { background: #3a9866; }
.category-other { background: #8c959f; }
.sidebar-note { margin-top: 28px; padding: 20px 10px 0; border-top: 1px solid var(--border); }
.sidebar-note p, .sidebar-note a { font-size: 12px; }
.sidebar-note p { color: var(--muted); }
.sidebar-note a { font-weight: 600; }
.explore-main { min-width: 0; }
.projects-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.projects-heading h2 { margin-bottom: 5px; font-size: 20px; }
.projects-heading p { margin: 0; color: var(--muted); }
.result-count {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.searchbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
}
.searchbar svg { position: absolute; width: 16px; height: 16px; margin-left: 12px; color: #6e7781; }
.searchbar input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 12px 6px 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.searchbar button, .inline-form button, .list-row button {
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f6f8fa;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.searchbar button:hover, .inline-form button:hover, .list-row button:hover { background: #eaeef2; }
.collection-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  background: #edf1f5;
  font-size: 12px;
  font-weight: 600;
}
.collection-heading span:last-child { color: var(--muted); font-weight: 400; }
.project-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: var(--surface);
}
.project-row { display: flex; gap: 12px; padding: 20px 16px; border-bottom: 1px solid #e5e9ed; }
.project-row:last-child { border-bottom: 0; }
.project-icon { width: 19px; height: 19px; margin-top: 2px; color: #6e7781; }
.project-content { min-width: 0; }
.project-title-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.project-title-line h3 { margin: 0; font-size: 15px; font-weight: 400; overflow-wrap: anywhere; }
.path-divider { color: #8c959f; }
.status-pill, .badge {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.project-description { margin: 8px 0 12px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.project-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.project-meta span { display: inline-flex; align-items: center; gap: 6px; }
.empty { padding: 56px 20px; text-align: center; }
.empty-icon { display: grid; width: 48px; height: 48px; margin: 0 auto 15px; place-items: center; border-radius: 50%; background: #edf1f5; color: #6e7781; }
.empty-icon svg { width: 23px; height: 23px; }
.empty h3 { margin-bottom: 7px; font-size: 16px; }
.empty p { margin-bottom: 12px; color: var(--muted); }
.text-link { font-weight: 600; }
.side-card { margin-bottom: 16px; padding: 17px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.side-card h2 { margin-bottom: 9px; font-size: 14px; }
.side-card p { margin-bottom: 13px; color: var(--muted); font-size: 12px; }
.side-card p:last-child { margin-bottom: 0; }
.side-card-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.side-card-heading svg { width: 17px; height: 17px; color: var(--green); }
.side-card-heading h2 { margin: 0; }
.side-card .side-card-note { padding-top: 12px; border-top: 1px solid #e5e9ed; }
.aside-help { color: var(--muted); font-size: 12px; }

.project-header { padding-top: 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.back { display: inline-block; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.project-header-title { display: flex; gap: 11px; align-items: flex-start; }
.project-header-title > svg { width: 22px; height: 22px; margin-top: 3px; color: #6e7781; }
.project-path { color: var(--link); font-size: 20px; overflow-wrap: anywhere; }
.project-path .badge { margin-left: 7px; vertical-align: middle; }
.project-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.project-tabs { display: flex; margin-top: 22px; }
.project-tab { padding: 10px 12px; border-bottom: 2px solid #fd8c73; font-weight: 600; }
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; min-height: 50vh; padding-block: 32px 48px; }
.content-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.content-panel-heading { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #f6f8fa; }
.content-panel-heading svg { width: 16px; height: 16px; color: #6e7781; }
.content-panel-heading h2 { margin: 0; font-size: 13px; }
.content-panel-body { min-height: 200px; padding: 28px 32px; }
.content-panel-body h1 { padding-bottom: 12px; border-bottom: 1px solid #e5e9ed; font-size: 26px; overflow-wrap: anywhere; }
.description { line-height: 1.7; overflow-wrap: anywhere; }
.project-aside h2 { margin-bottom: 12px; font-size: 16px; }
.project-aside > p { color: var(--muted); }
.download-card { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.download-card h3 { margin-bottom: 10px; font-size: 14px; }
.download-card .filename { color: var(--muted); overflow-wrap: anywhere; }
.download-card .button { width: 100%; }
.download-card .hint { margin-top: 12px; }

.page, .narrow { min-height: 60vh; padding-block: 52px 70px; }
.narrow { max-width: 570px; }
.page h1, .narrow h1 { margin-bottom: 10px; font-size: 28px; letter-spacing: -.02em; }
.page h2 { margin-top: 35px; font-size: 20px; }
.page > p, .narrow > p, .section-heading p { color: var(--muted); }
.muted { color: #6e7781; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading p { margin-bottom: 0; }
.form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
.form p { margin: 0; }
.form p label { display: block; }
.form label { font-size: 13px; font-weight: 600; }
.form input:not([type="checkbox"]), .form textarea, .form select, .inline-form input {
  width: 100%;
  margin: 6px 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
.form input[type="file"] { padding: 8px; }
.form button { align-self: flex-start; margin-top: 8px; }
.form .checkbox { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.checkbox input { margin-top: 5px; }
.hint, .helptext { color: var(--muted); font-size: 12px; }
.form .helptext { display: block; }
.form ul:not(.errorlist) { color: var(--muted); font-size: 12px; }
.errorlist { padding-left: 20px; color: #cf222e; font-size: 13px; }
.notices { padding-top: 16px; }
.notice, .info, .answer { margin: 15px 0; padding: 14px 16px; border: 1px solid #b6d7f4; border-radius: 6px; background: #ddf4ff; font-size: 13px; }
.notice.success { border-color: #aceebb; background: #dafbe1; }
.notice.error { border-color: #ffcecb; background: #ffebe9; color: #a40e26; }
.answer { border-color: var(--border); background: var(--surface); font-size: 14px; }
.list { margin: 24px 0 40px; padding: 0 20px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 0; border-bottom: 1px solid #e5e9ed; }
.list-row:last-child { border-bottom: 0; }
.list-row p { margin: 4px 0; color: var(--muted); font-size: 12px; }
.list > p { padding: 15px 0; color: var(--muted); }
.item-title { font-weight: 600; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form input { width: 180px; margin: 0; }
.list-row .danger { color: #cf222e; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 26px 36px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.footer strong { color: var(--text); font-size: 14px; }
.footer-divider { padding-inline: 5px; color: #8c959f; }

@media (max-width: 1050px) {
  .explore-layout { grid-template-columns: 170px minmax(0, 1fr); gap: 24px; }
  .explore-aside { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .side-card { margin-bottom: 0; }
  .aside-help { grid-column: 1 / -1; }
}
@media (max-width: 850px) {
  .nav { gap: 12px 18px; flex-wrap: wrap; }
  .nav-search { order: 4; width: 100%; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .nav-links { order: 3; width: 100%; gap: 16px; font-size: 13px; }
  .nav-search { order: 4; }
  .explore-header-inner { min-height: 0; align-items: flex-start; flex-direction: column; }
  .explore-header h1 { font-size: 25px; }
  .explore-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; }
  .category-nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-note { display: none; }
  .explore-aside { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .aside-help { grid-column: auto; }
  .project-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .content-panel-body { padding: 22px 18px; }
  .project-path { font-size: 17px; }
  .section-heading, .moderation-row { align-items: flex-start; flex-direction: column; }
  .list-row { flex-wrap: wrap; }
  .footer { flex-direction: column; gap: 8px; }
}
