:root {
  --bg: #09060d;
  --bg-deep: #050308;
  --panel: rgba(19, 14, 27, 0.94);
  --panel-soft: rgba(27, 20, 38, 0.88);
  --panel-border: rgba(195, 138, 255, 0.16);
  --primary: #9b5dff;
  --primary-strong: #d6c2ff;
  --primary-soft: rgba(155, 93, 255, 0.12);
  --text: #ece4f5;
  --text-soft: #b8a9cc;
  --text-faint: #8d7f9f;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  --radius-lg: 16px;
  --radius-md: 10px;
  --shell: min(1240px, calc(100vw - 32px));
  --header-fit-scale: 1;
  --mobile-menu-scale: 1;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.progressive-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #120d18;
}

.progressive-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.progressive-preview,
.progressive-full {
  position: absolute;
  inset: 0;
}

.progressive-preview {
  z-index: 2;
  filter: blur(0.5px) saturate(0.95);
  transform: scale(1.02);
  opacity: 1;
  transition: opacity 180ms ease;
}

.progressive-full {
  z-index: 1;
}

.progressive-media.is-loaded .progressive-preview {
  opacity: 0;
  pointer-events: none;
}

.progressive-loop {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #120d18;
}

.progressive-loop video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loop-preview,
.loop-full {
  position: absolute;
  inset: 0;
}

.loop-preview {
  z-index: 2;
  opacity: 1;
  transition: opacity 180ms ease;
}

.loop-full {
  z-index: 1;
}

.progressive-loop.is-loaded .loop-preview {
  opacity: 0;
  pointer-events: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

main {
  position: relative;
  z-index: 1;
  padding-top: 130px;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.home-layout-wide {
  width: min(1920px, calc(100vw - 44px));
  margin: 0 auto 28px;
}

.particle-canvas,
.site-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.particle-canvas {
  z-index: 0;
}

.site-backdrop {
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(28, 18, 46, 0.96), rgba(9, 6, 13, 0));
}

.site-backdrop-grid {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(58, 35, 92, 0.7), rgba(31, 18, 50, 0.46));
  clip-path: polygon(0 0, 100% 120px, 100% 100%, 0 calc(100% - 120px));
  animation: slantShift 22s ease-in-out infinite alternate;
}

.site-glow {
  display: none;
}

@keyframes slantShift {
  0%,
  100% {
    clip-path: polygon(0 0, 100% 120px, 100% 100%, 0 calc(100% - 120px));
  }
  50% {
    clip-path: polygon(0 0, 100% 54px, 100% 100%, 0 calc(100% - 54px));
  }
}

.site-header {
  position: fixed;
  top: 18px;
  width: 100%;
  z-index: 10;
  display: flex;
  justify-content: center;
}

.site-header-inner {
  --header-pad-x: clamp(12px, calc(2vw * var(--header-fit-scale) + 12px), 32px);
  --header-gap: clamp(10px, calc(2.3vw * var(--header-fit-scale) + 10px), 46px);
  --nav-gap: clamp(8px, calc(1.15vw * var(--header-fit-scale) + 8px), 22px);
  --social-gap: clamp(8px, calc(0.75vw * var(--header-fit-scale) + 8px), 16px);
  --brand-size: clamp(1.65rem, calc(2.05vw * var(--header-fit-scale) + 1rem), 2.9rem);
  --nav-size: clamp(0.86rem, calc(1.12vw * var(--header-fit-scale) + 0.58rem), 1.85rem);
  --social-size: clamp(1rem, calc(1.18vw * var(--header-fit-scale) + 0.55rem), 2.1rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--header-gap);
  width: auto;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding: 15px var(--header-pad-x);
  background: rgba(16, 12, 23, 0.92);
  border: 1px solid rgba(195, 138, 255, 0.12);
  border-radius: 16px;
  box-shadow: 6px 6px 18px rgba(0, 0, 0, 0.48);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  font-family: "Space Grotesk", sans-serif;
}

.brand-copy {
  color: var(--primary);
  font-size: var(--brand-size);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--header-gap);
  min-width: 0;
}

.nav-list,
.social-list,
.footer-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: var(--nav-gap);
  padding: 0;
  margin: 0;
}

.nav-list,
.social-list {
  min-width: 0;
}

.nav-list a {
  color: rgba(255, 255, 255, 0.94);
  font-family: "Space Grotesk", sans-serif;
  font-size: var(--nav-size);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--primary);
  transform: translateY(-2px);
}

.social-list {
  gap: var(--social-gap);
  flex-wrap: nowrap;
}

.social-list a {
  color: rgba(255, 255, 255, 0.94);
  font-size: var(--social-size);
  transition: color 180ms ease, transform 180ms ease;
  line-height: 1;
}

.social-list a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.social-list a:hover i,
.social-list a:focus-visible i {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: rgba(195, 138, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.05;
}

p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.button,
.feature-link,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(195, 138, 255, 0.22);
  background: rgba(195, 138, 255, 0.08);
  color: var(--text);
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.feature-link:hover,
.panel-link:hover {
  transform: translateY(-2px);
  border-color: rgba(195, 138, 255, 0.4);
  background: rgba(195, 138, 255, 0.14);
}

.tag-row,
.meta-row,
.cta-row,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip,
.chip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(195, 138, 255, 0.18);
  background: rgba(195, 138, 255, 0.08);
  color: var(--text);
  font-size: 0.84rem;
}

.chip-button {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.chip-button:hover,
.chip-button.is-active {
  transform: translateY(-1px);
  border-color: rgba(195, 138, 255, 0.38);
  background: rgba(195, 138, 255, 0.16);
}

.home-layout,
.home-splash,
.home-feature,
.home-top-grid,
.home-projects,
.page-title-block,
.browse-layout,
.project-card-grid,
.tools-filter-row,
.tool-grid,
.detail-hero,
.detail-layout,
.empty-state-panel {
  margin-bottom: 28px;
}

.home-splash-link {
  display: block;
  max-width: 840px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-splash-link:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.4);
}

.home-splash-managed {
  border-radius: 10px;
}

.home-feature {
  text-align: left;
  padding: 4px 0 8px;
}

.home-feature h1 {
  color: var(--primary);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 500;
  margin-bottom: 0;
}

.home-feature p {
  max-width: 820px;
  margin: 12px 0 0;
}

.home-feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.home-section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
  text-align: center;
}

.home-section-heading h2,
.page-title-block h1 {
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.home-section-heading a {
  color: var(--primary-strong);
  font-weight: 700;
}

.update-button,
.project-button,
.project-card,
.tool-grid-card,
.browse-sidebar,
.browse-panel,
.detail-article,
.detail-aside-card,
.empty-state-card,
.home-column-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.update-button,
.project-button {
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.update-button:hover,
.project-button:hover,
.project-card:hover,
.tool-grid-card:hover {
  transform: translateY(-3px);
  border-color: rgba(195, 138, 255, 0.32);
}

.update-button img,
.project-button img,
.project-card-media img,
.tool-grid-card img,
.detail-hero-media img,
.browse-item img,
.mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-button img,
.project-button img {
  aspect-ratio: 16 / 9;
  background: #110c18;
}

.update-button-copy,
.project-button-copy,
.project-card-copy,
.tool-grid-copy,
.browse-item-copy {
  padding: 16px 18px;
}

.update-button-copy h3,
.project-button-copy h3,
.project-card-copy h2,
.tool-grid-copy h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.home-project-head h3 {
  margin-bottom: 0;
}

.update-button-copy p,
.project-button-copy p {
  color: var(--text-faint);
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr) minmax(250px, 310px);
  gap: 40px;
  align-items: start;
}

.home-side-rail {
  display: grid;
  gap: 22px;
  align-self: start;
  width: 100%;
  max-width: 310px;
}

.home-main-column {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  min-width: 0;
}

.home-splash-link {
  max-width: none;
}

.home-column-panel {
  padding: 20px;
}

.home-updates-panel .home-stack-list {
  gap: 12px;
}

.home-tools-panel {
  align-self: start;
}

.home-tools-rail {
  justify-self: end;
  max-width: 310px;
}

.home-stack-list {
  display: grid;
  gap: 14px;
}

.home-list-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.home-list-card img {
  width: 76px;
  height: 76px;
  max-height: none;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  object-fit: cover;
}

.update-button-copy h3,
.browse-item-copy strong {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
}

.list-card-date,
.browse-item-date {
  display: block;
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 0.72rem;
  line-height: 1.2;
}

.tool-card-list {
  display: grid;
  gap: 12px;
}

.tool-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--panel-soft);
  border: 1px solid transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(195, 138, 255, 0.32);
  background: rgba(195, 138, 255, 0.12);
}

.tool-card img {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.tool-card:not(:has(img)) {
  grid-template-columns: 1fr;
}

.home-tools-rail .home-list-card {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
}

.home-tools-rail .home-list-card img {
  width: 54px;
  height: 54px;
}

.page-title-block {
  padding-top: 8px;
}

.page-title-block h1 {
  text-align: center;
}

.browse-layout {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.browse-sidebar {
  position: sticky;
  top: 104px;
  padding: 22px;
}

.filter-title,
.aside-title {
  margin: 0 0 12px;
  color: var(--primary-strong);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-select-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.filter-select-wrap {
  display: grid;
  gap: 8px;
}

.filter-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(195, 138, 255, 0.18);
  border-radius: 10px;
  background: #120d18;
  color: #ffffff;
  padding: 0 12px;
}

.filter-select option {
  background: #120d18;
  color: #ffffff;
}

.browse-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.browse-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(195, 138, 255, 0.06);
  border: 1px solid transparent;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.browse-item:hover,
.browse-item.is-active {
  transform: translateY(-1px);
  border-color: rgba(195, 138, 255, 0.28);
  background: rgba(195, 138, 255, 0.12);
}

.browse-item[hidden] {
  display: none;
}

.browse-item img {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

.browse-item-copy strong {
  display: block;
}

.browse-preview {
  min-height: 760px;
}

.browse-panel {
  display: none;
  padding: 26px;
}

.browse-panel.is-active {
  display: block;
}

.browse-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.browse-panel h2 {
  color: var(--primary);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.browse-panel-prose {
  margin-top: 18px;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-project-card img {
  max-height: 150px;
}

.home-project-managed {
  max-height: 150px;
}

.home-project-card .progressive-loop {
  background: #110c18;
}

.home-project-card .progressive-loop.home-project-managed {
  aspect-ratio: 4 / 3 !important;
  max-height: 220px;
}

.home-project-card .progressive-loop video {
  object-fit: contain;
}

.home-project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.home-project-date {
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 0.82rem;
  line-height: 1.2;
}

.project-card,
.tool-grid-card {
  overflow: hidden;
}

.tool-grid-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.tool-grid-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius-lg);
}

.tool-grid-link:focus-visible {
  outline: 2px solid rgba(214, 194, 255, 0.92);
  outline-offset: -2px;
}

.tool-grid-media {
  display: block;
  pointer-events: none;
}

.tool-grid-media img {
  width: 96px;
  height: 96px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
}

.tool-icon-fallback {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.7rem;
}

.tool-icon-fallback-small {
  width: 54px;
  height: 54px;
  font-size: 1rem;
}

.tool-detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.tool-detail-top h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.tool-detail-button {
  flex-shrink: 0;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  font-size: 1rem;
  white-space: nowrap;
}

.tool-grid-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  padding: 0;
  pointer-events: none;
}

.tool-grid-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-grid-copy h2 {
  margin: 0;
}

.tool-grid-repo-button {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.84rem;
  pointer-events: auto;
}

.tool-grid-copy p {
  margin: 0;
}

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 8px;
}

.project-card-head h2 {
  font-size: 1.55rem;
  margin: 0;
}

.project-card-subhead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.project-card-tag-row {
  gap: 8px;
  margin-bottom: 8px;
}

.project-card-tag-row .tag-chip {
  min-height: 26px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.project-card-date {
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 0.84rem;
}

.project-card-media {
  display: block;
}

.project-card-media img,
.tool-grid-card img,
.project-card-media .progressive-media,
.project-card-media .progressive-loop {
  aspect-ratio: 16 / 9;
}

.project-card-media .progressive-media,
.project-card-media .progressive-loop,
.detail-hero-media .progressive-media,
.detail-hero-media .progressive-loop {
  height: 100%;
}

.detail-hero {
  display: grid;
  grid-template-columns: 1fr minmax(360px, 560px);
  gap: 26px;
  align-items: center;
  margin-top: 8px;
}

.detail-hero-simple {
  grid-template-columns: 1fr 300px;
}

.detail-hero-copy-first {
  grid-template-columns: minmax(0, 920px);
}

.detail-hero-centered {
  justify-content: center;
}

.detail-hero-copy-centered {
  text-align: center;
  justify-self: center;
}

.page-tool-detail .detail-hero {
  align-items: start;
}

.page-tool-detail .detail-hero-copy h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
}

.detail-hero-copy h1 {
  color: var(--primary);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 500;
  margin-bottom: 12px;
}

.detail-summary {
  max-width: 760px;
  margin-bottom: 16px;
}

.detail-hero-copy-centered .detail-summary {
  margin-left: auto;
  margin-right: auto;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--text-faint);
}

.detail-meta-split {
  align-items: center;
  justify-content: space-between;
}

.detail-meta-split .tag-row {
  justify-content: flex-start;
}

.detail-date {
  white-space: nowrap;
}

.detail-hero-media {
  overflow: hidden;
  border-radius: 18px;
  max-height: 360px;
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.detail-hero-media img {
  object-fit: cover;
}

.detail-hero-project .detail-hero-media img {
  aspect-ratio: 16 / 9;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
  margin-top: 12px;
}

.detail-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.detail-layout-update {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.detail-layout-with-aside {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.detail-layout-spacer {
  min-height: 1px;
}

.detail-article {
  padding: 32px;
  background: rgba(17, 13, 24, 0.92);
}

.detail-aside {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 104px;
}

.detail-aside-card {
  padding: 20px;
  background: rgba(17, 13, 24, 0.9);
}

.detail-aside-card[data-toc-card] {
  display: none;
}

.detail-aside-card[data-toc-card].is-ready {
  display: block;
}

.toc-list,
.stack-list {
  display: grid;
  gap: 10px;
}

.toc-link,
.stack-link {
  color: var(--text-soft);
}

.toc-h3 {
  padding-left: 14px;
  color: var(--text-faint);
}

.stack-link strong {
  display: block;
  color: var(--text);
}

.stack-link span,
.toc-empty {
  color: var(--text-faint);
}

.mini-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.mini-card img {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

.detail-prose {
  display: grid;
  gap: 22px;
}

.detail-prose > p,
.detail-prose > ul,
.detail-prose > ol {
  max-width: 74ch;
  margin-left: auto;
  margin-right: auto;
}

.detail-prose h2 {
  color: var(--primary);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 600;
  margin-top: 8px;
}

.detail-prose h3 {
  color: var(--primary-strong);
  font-size: 1.2rem;
  font-weight: 600;
}

.detail-prose p,
.detail-prose li {
  font-size: 1.04rem;
}

.detail-prose ul,
.detail-prose ol {
  padding-left: 20px;
}

.detail-prose a {
  color: var(--primary-strong);
}

.detail-prose a:not(.inline-card-link) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-aside-card[hidden] {
  display: none;
}

.media-frame,
.media-gallery,
.embed-frame {
  margin: 0;
}

.media-frame,
.media-gallery {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.media-frame .progressive-media,
.media-gallery .progressive-media {
  --content-media-max-height: min(38rem, 52vh);
  width: min(100%, calc(var(--content-media-max-height) * (var(--ratio-w) / var(--ratio-h))));
  max-height: var(--content-media-max-height);
}

.media-frame img,
.media-gallery img {
  width: 100%;
  max-height: min(38rem, 52vh);
  border-radius: 16px;
  box-shadow: var(--shadow);
  object-fit: contain;
}

.page-project-detail .detail-prose .media-frame-gif {
  max-width: min(100%, 920px);
  margin: 0 auto;
}

.media-frame figcaption,
.media-gallery figcaption {
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.media-gallery-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.content-columns {
  display: grid;
  grid-template-columns: var(--column-widths, repeat(2, minmax(0, 1fr)));
  gap: 18px;
  align-items: start;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.content-columns-text {
  max-width: none;
}

.detail-prose > .content-columns {
  width: 100%;
  justify-self: stretch;
}

.content-columns-media,
.content-columns-text {
  grid-template-columns: var(--column-widths, repeat(2, minmax(0, 1fr)));
}

.content-columns-media + .content-columns-text {
  margin-top: -2px;
}

.content-column {
  min-width: 0;
}

.content-column-text {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  max-width: none;
  justify-self: stretch;
}

.content-columns-text .content-column-text {
  max-width: none;
}

.content-column-media {
  display: flex;
  align-items: flex-start;
}

.content-column-media .media-frame,
.content-column-media .media-gallery {
  width: 100%;
}

.content-columns-media .media-frame .progressive-media,
.content-columns-media .media-gallery .progressive-media {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
}

.content-columns-media .media-frame,
.content-columns-media .media-gallery {
  display: block;
}

.content-columns-media .progressive-media img {
  object-fit: contain;
}

.content-columns-media .media-frame img,
.content-columns-media .media-gallery img {
  width: 100%;
  max-height: min(38rem, 52vh);
}


.embed-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.embed-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.inline-card-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(195, 138, 255, 0.18);
  background: rgba(195, 138, 255, 0.08);
}

.inline-card-wrap {
  display: flex;
  justify-content: center;
}

.panel-link {
  white-space: nowrap;
}

.inline-card-label {
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}

.inline-card-meta {
  color: var(--text-faint);
  font-size: 0.92rem;
}

.callout {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(195, 138, 255, 0.18);
  background: rgba(195, 138, 255, 0.06);
}

.callout-warning {
  border-color: rgba(255, 194, 120, 0.24);
  background: rgba(255, 194, 120, 0.07);
}

.site-footer {
  padding: 10px 0 30px;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(195, 138, 255, 0.1);
}

.footer-brand {
  color: var(--primary);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-links {
  gap: 18px;
}

.footer-links a {
  color: var(--text-faint);
  font-size: 0.94rem;
  letter-spacing: 0.02em;
}

.footer-links a:hover {
  color: var(--text);
}

.browse-panel h2 {
  font-weight: 500;
}

.tool-detail-header {
  max-width: 1040px;
  margin: 0 auto 34px;
}

.tool-detail-header-copy {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.tool-detail-header-copy h1 {
  color: var(--primary);
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 500;
}

.tool-detail-tag-row {
  justify-content: center;
}

.tool-primary-button {
  gap: 12px;
  width: min(100%, 520px);
  min-height: 60px;
  padding: 0 28px;
  font-size: 1rem;
}

.tool-detail-body {
  display: grid;
  gap: 24px;
  align-items: start;
}

.tool-detail-body-showcase {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
}

.tool-detail-body-plain {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

.tool-detail-article {
  min-height: 100%;
}

.tool-detail-showcase {
  display: grid;
  gap: 18px;
}

.tool-showcase-frame {
  padding: 0;
}

.tool-showcase-frame img,
.tool-showcase-frame .progressive-media {
  max-height: min(22rem, 38vh);
}

.project-hero-actions {
  margin-bottom: 16px;
}

.project-hero-button {
  min-height: 58px;
  min-width: min(100%, 320px);
  padding: 0 28px;
  font-size: 1rem;
}

.tag-row-compact .tag-chip {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.76rem;
}

@media (max-width: 1080px) {
  .home-layout,
  .detail-hero,
  .detail-layout,
  .browse-layout,
  .project-card-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .home-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .home-main-column {
    grid-column: 1 / -1;
    order: 1;
  }

  .home-side-rail {
    max-width: none;
  }

  .home-tools-rail {
    justify-self: stretch;
    order: 3;
  }

  .home-layout > .home-side-rail:first-of-type {
    order: 2;
  }

  .browse-sidebar,
  .detail-aside {
    position: static;
  }

  .home-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-feature-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-layout-with-aside,
  .tool-detail-body-showcase,
  .page-tool-detail .detail-hero {
    grid-template-columns: 1fr;
  }

  .tool-detail-body-plain {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 840px) {
  main {
    padding-top: 132px;
  }

  .site-header {
    top: 10px;
  }

  .site-header-inner {
    align-items: start;
    border-radius: 16px;
    gap: 14px;
    padding: 14px 18px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(195, 138, 255, 0.14);
    background: rgba(16, 12, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
    align-items: center;
  }

  .nav-list,
  .social-list,
  .footer-links {
    flex-wrap: wrap;
    width: 100%;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px clamp(12px, 3vw, 18px);
    justify-content: stretch;
  }

  .nav-list a {
    font-size: clamp(1.05rem, calc(1.16rem * var(--mobile-menu-scale)), 1.22rem);
    display: flex;
    justify-content: center;
  }

  .social-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(32px, 7vw, 44px), 1fr));
    gap: 10px clamp(10px, 2.8vw, 16px);
    justify-content: stretch;
  }

  .social-list a {
    font-size: clamp(1.16rem, calc(1.34rem * var(--mobile-menu-scale)), 1.42rem);
    display: flex;
    justify-content: center;
  }

  .update-button,
  .project-button {
    min-width: 0;
  }

  .home-project-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-project-grid,
  .filter-select-row {
    grid-template-columns: 1fr;
  }

  .home-list-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .home-list-card img {
    width: 72px;
    height: 72px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-feature {
    text-align: center;
  }

  .home-feature p {
    margin-left: auto;
    margin-right: auto;
  }

  .home-feature-top {
    align-items: center;
  }

  .tool-grid-head,
  .project-card-subhead {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-meta-split {
    flex-direction: column;
    align-items: center;
  }

  .detail-meta-split .tag-row {
    justify-content: center;
  }

  .browse-layout {
    grid-template-columns: 1fr;
  }

  .browse-preview {
    order: 1;
  }

  .browse-sidebar {
    order: 2;
    padding: 16px;
  }

  .browse-list {
    max-height: 220px;
    overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browse-item {
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: start;
  }

  .browse-item img {
    width: 62px;
    height: 62px;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header-inner {
    max-width: calc(100% - 20px);
    padding: 12px 14px;
  }

  .site-nav {
    padding: 14px 12px;
  }

  .nav-list {
    gap: 10px 12px;
  }

  .social-list {
    gap: 8px 10px;
    grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  }

  .detail-article {
    padding: 24px 20px;
  }

  .content-columns,
  .content-columns-media,
  .content-columns-text {
    grid-template-columns: 1fr;
  }

  .content-columns-text .content-column-text {
    max-width: 74ch;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 980px) {
  .browse-layout {
    grid-template-columns: 1fr;
  }

  .browse-preview {
    order: 1;
  }

  .browse-sidebar {
    order: 2;
    position: static;
    padding: 16px;
  }

  .browse-list {
    max-height: 220px;
    overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browse-item {
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: start;
  }

  .browse-item img {
    width: 62px;
    height: 62px;
  }
}
